diff --git a/discovery/kubernetes/endpoints.go b/discovery/kubernetes/endpoints.go index 07e8b06f2..1454cba27 100644 --- a/discovery/kubernetes/endpoints.go +++ b/discovery/kubernetes/endpoints.go @@ -23,8 +23,8 @@ import ( "github.com/prometheus/common/log" "github.com/prometheus/common/model" "golang.org/x/net/context" - apiv1 "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/tools/cache" + apiv1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" ) // Endpoints discovers new endpoint targets. diff --git a/discovery/kubernetes/endpoints_test.go b/discovery/kubernetes/endpoints_test.go index 296249f7e..630e804dc 100644 --- a/discovery/kubernetes/endpoints_test.go +++ b/discovery/kubernetes/endpoints_test.go @@ -19,8 +19,9 @@ import ( "github.com/prometheus/common/log" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/tools/cache" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" ) func endpointsStoreKeyFunc(obj interface{}) (string, error) { @@ -40,7 +41,7 @@ func makeTestEndpointsDiscovery() (*Endpoints, *fakeInformer, *fakeInformer, *fa func makeEndpoints() *v1.Endpoints { return &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "testendpoints", Namespace: "default", }, @@ -123,7 +124,7 @@ func TestEndpointsDiscoveryInitial(t *testing.T) { func TestEndpointsDiscoveryAdd(t *testing.T) { n, _, eps, pods := makeTestEndpointsDiscovery() pods.GetStore().Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "testpod", Namespace: "default", }, @@ -164,7 +165,7 @@ func TestEndpointsDiscoveryAdd(t *testing.T) { go func() { eps.Add( &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "testendpoints", Namespace: "default", }, @@ -273,7 +274,7 @@ func TestEndpointsDiscoveryUpdate(t *testing.T) { afterStart: func() { go func() { eps.Update(&v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "testendpoints", Namespace: "default", }, diff --git a/discovery/kubernetes/kubernetes.go b/discovery/kubernetes/kubernetes.go index 768e64978..58b8db844 100644 --- a/discovery/kubernetes/kubernetes.go +++ b/discovery/kubernetes/kubernetes.go @@ -23,12 +23,12 @@ import ( "github.com/prometheus/common/log" "github.com/prometheus/common/model" "golang.org/x/net/context" - "k8s.io/client-go/1.5/kubernetes" - "k8s.io/client-go/1.5/pkg/api" - apiv1 "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/util/runtime" - "k8s.io/client-go/1.5/rest" - "k8s.io/client-go/1.5/tools/cache" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/pkg/api" + apiv1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/cache" ) const ( @@ -111,8 +111,8 @@ func New(l log.Logger, conf *config.KubernetesSDConfig) (*Kubernetes, error) { CAFile: conf.TLSConfig.CAFile, CertFile: conf.TLSConfig.CertFile, KeyFile: conf.TLSConfig.KeyFile, + Insecure: conf.TLSConfig.InsecureSkipVerify, }, - Insecure: conf.TLSConfig.InsecureSkipVerify, } token := conf.BearerToken if conf.BearerTokenFile != "" { @@ -147,7 +147,7 @@ const resyncPeriod = 10 * time.Minute // Run implements the TargetProvider interface. func (k *Kubernetes) Run(ctx context.Context, ch chan<- []*config.TargetGroup) { - rclient := k.client.Core().GetRESTClient() + rclient := k.client.Core().RESTClient() switch k.role { case "endpoints": diff --git a/discovery/kubernetes/node.go b/discovery/kubernetes/node.go index ea9143d07..518307d4e 100644 --- a/discovery/kubernetes/node.go +++ b/discovery/kubernetes/node.go @@ -23,9 +23,9 @@ import ( "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/util/strutil" "golang.org/x/net/context" - "k8s.io/client-go/1.5/pkg/api" - apiv1 "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/tools/cache" + "k8s.io/client-go/pkg/api" + apiv1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" ) // Node discovers Kubernetes nodes. diff --git a/discovery/kubernetes/node_test.go b/discovery/kubernetes/node_test.go index 9f78f7b02..4c84141ae 100644 --- a/discovery/kubernetes/node_test.go +++ b/discovery/kubernetes/node_test.go @@ -25,8 +25,9 @@ import ( "github.com/prometheus/prometheus/config" "github.com/stretchr/testify/require" "golang.org/x/net/context" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/tools/cache" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" ) type fakeInformer struct { @@ -46,18 +47,21 @@ func newFakeInformer(f func(obj interface{}) (string, error)) *fakeInformer { return i } -func (i *fakeInformer) AddEventHandler(handler cache.ResourceEventHandler) error { - i.handlers = append(i.handlers, handler) +func (i *fakeInformer) AddEventHandler(h cache.ResourceEventHandler) { + i.handlers = append(i.handlers, h) // Only now that there is a registered handler, we are able to handle deltas. i.blockDeltas.Unlock() - return nil +} + +func (i *fakeInformer) AddEventHandlerWithResyncPeriod(h cache.ResourceEventHandler, _ time.Duration) { + i.AddEventHandler(h) } func (i *fakeInformer) GetStore() cache.Store { return i.store } -func (i *fakeInformer) GetController() cache.ControllerInterface { +func (i *fakeInformer) GetController() cache.Controller { return nil } @@ -160,7 +164,7 @@ func makeTestNodeDiscovery() (*Node, *fakeInformer) { func makeNode(name, address string, labels map[string]string, annotations map[string]string) *v1.Node { return &v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, Annotations: annotations, diff --git a/discovery/kubernetes/pod.go b/discovery/kubernetes/pod.go index 7a4e2e210..ef8ce6d04 100644 --- a/discovery/kubernetes/pod.go +++ b/discovery/kubernetes/pod.go @@ -24,9 +24,9 @@ import ( "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/util/strutil" "golang.org/x/net/context" - "k8s.io/client-go/1.5/pkg/api" - apiv1 "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/tools/cache" + "k8s.io/client-go/pkg/api" + apiv1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" ) // Pod discovers new pod targets. diff --git a/discovery/kubernetes/pod_test.go b/discovery/kubernetes/pod_test.go index c683e825b..39e687754 100644 --- a/discovery/kubernetes/pod_test.go +++ b/discovery/kubernetes/pod_test.go @@ -19,8 +19,9 @@ import ( "github.com/prometheus/common/log" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/tools/cache" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" ) func podStoreKeyFunc(obj interface{}) (string, error) { @@ -38,7 +39,7 @@ func makeTestPodDiscovery() (*Pod, *fakeInformer) { func makeMultiPortPod() *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "testpod", Namespace: "default", Labels: map[string]string{"testlabel": "testvalue"}, @@ -82,7 +83,7 @@ func makeMultiPortPod() *v1.Pod { func makePod() *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "testpod", Namespace: "default", }, @@ -266,7 +267,7 @@ func TestPodDiscoveryDeleteUnknownCacheState(t *testing.T) { func TestPodDiscoveryUpdate(t *testing.T) { n, i := makeTestPodDiscovery() i.GetStore().Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "testpod", Namespace: "default", }, diff --git a/discovery/kubernetes/service.go b/discovery/kubernetes/service.go index 47f79a179..8806ba29c 100644 --- a/discovery/kubernetes/service.go +++ b/discovery/kubernetes/service.go @@ -23,8 +23,8 @@ import ( "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/util/strutil" "golang.org/x/net/context" - apiv1 "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/tools/cache" + apiv1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" ) // Service implements discovery of Kubernetes services. diff --git a/discovery/kubernetes/service_test.go b/discovery/kubernetes/service_test.go index fc4fce73b..727f0d85f 100644 --- a/discovery/kubernetes/service_test.go +++ b/discovery/kubernetes/service_test.go @@ -20,8 +20,9 @@ import ( "github.com/prometheus/common/log" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/tools/cache" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/tools/cache" ) func serviceStoreKeyFunc(obj interface{}) (string, error) { @@ -39,7 +40,7 @@ func makeTestServiceDiscovery() (*Service, *fakeInformer) { func makeMultiPortService() *v1.Service { return &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "testservice", Namespace: "default", Labels: map[string]string{"testlabel": "testvalue"}, @@ -64,7 +65,7 @@ func makeMultiPortService() *v1.Service { func makeSuffixedService(suffix string) *v1.Service { return &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("testservice%s", suffix), Namespace: "default", }, diff --git a/vendor/github.com/blang/semver/LICENSE b/vendor/github.com/blang/semver/LICENSE deleted file mode 100644 index 5ba5c86fc..000000000 --- a/vendor/github.com/blang/semver/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License - -Copyright (c) 2014 Benedikt Lang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/vendor/github.com/blang/semver/json.go b/vendor/github.com/blang/semver/json.go deleted file mode 100644 index a74bf7c44..000000000 --- a/vendor/github.com/blang/semver/json.go +++ /dev/null @@ -1,23 +0,0 @@ -package semver - -import ( - "encoding/json" -) - -// MarshalJSON implements the encoding/json.Marshaler interface. -func (v Version) MarshalJSON() ([]byte, error) { - return json.Marshal(v.String()) -} - -// UnmarshalJSON implements the encoding/json.Unmarshaler interface. -func (v *Version) UnmarshalJSON(data []byte) (err error) { - var versionString string - - if err = json.Unmarshal(data, &versionString); err != nil { - return - } - - *v, err = Parse(versionString) - - return -} diff --git a/vendor/github.com/blang/semver/semver.go b/vendor/github.com/blang/semver/semver.go deleted file mode 100644 index bbf85ce97..000000000 --- a/vendor/github.com/blang/semver/semver.go +++ /dev/null @@ -1,395 +0,0 @@ -package semver - -import ( - "errors" - "fmt" - "strconv" - "strings" -) - -const ( - numbers string = "0123456789" - alphas = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-" - alphanum = alphas + numbers -) - -// SpecVersion is the latest fully supported spec version of semver -var SpecVersion = Version{ - Major: 2, - Minor: 0, - Patch: 0, -} - -// Version represents a semver compatible version -type Version struct { - Major uint64 - Minor uint64 - Patch uint64 - Pre []PRVersion - Build []string //No Precendence -} - -// Version to string -func (v Version) String() string { - b := make([]byte, 0, 5) - b = strconv.AppendUint(b, v.Major, 10) - b = append(b, '.') - b = strconv.AppendUint(b, v.Minor, 10) - b = append(b, '.') - b = strconv.AppendUint(b, v.Patch, 10) - - if len(v.Pre) > 0 { - b = append(b, '-') - b = append(b, v.Pre[0].String()...) - - for _, pre := range v.Pre[1:] { - b = append(b, '.') - b = append(b, pre.String()...) - } - } - - if len(v.Build) > 0 { - b = append(b, '+') - b = append(b, v.Build[0]...) - - for _, build := range v.Build[1:] { - b = append(b, '.') - b = append(b, build...) - } - } - - return string(b) -} - -// Equals checks if v is equal to o. -func (v Version) Equals(o Version) bool { - return (v.Compare(o) == 0) -} - -// EQ checks if v is equal to o. -func (v Version) EQ(o Version) bool { - return (v.Compare(o) == 0) -} - -// NE checks if v is not equal to o. -func (v Version) NE(o Version) bool { - return (v.Compare(o) != 0) -} - -// GT checks if v is greater than o. -func (v Version) GT(o Version) bool { - return (v.Compare(o) == 1) -} - -// GTE checks if v is greater than or equal to o. -func (v Version) GTE(o Version) bool { - return (v.Compare(o) >= 0) -} - -// GE checks if v is greater than or equal to o. -func (v Version) GE(o Version) bool { - return (v.Compare(o) >= 0) -} - -// LT checks if v is less than o. -func (v Version) LT(o Version) bool { - return (v.Compare(o) == -1) -} - -// LTE checks if v is less than or equal to o. -func (v Version) LTE(o Version) bool { - return (v.Compare(o) <= 0) -} - -// LE checks if v is less than or equal to o. -func (v Version) LE(o Version) bool { - return (v.Compare(o) <= 0) -} - -// Compare compares Versions v to o: -// -1 == v is less than o -// 0 == v is equal to o -// 1 == v is greater than o -func (v Version) Compare(o Version) int { - if v.Major != o.Major { - if v.Major > o.Major { - return 1 - } - return -1 - } - if v.Minor != o.Minor { - if v.Minor > o.Minor { - return 1 - } - return -1 - } - if v.Patch != o.Patch { - if v.Patch > o.Patch { - return 1 - } - return -1 - } - - // Quick comparison if a version has no prerelease versions - if len(v.Pre) == 0 && len(o.Pre) == 0 { - return 0 - } else if len(v.Pre) == 0 && len(o.Pre) > 0 { - return 1 - } else if len(v.Pre) > 0 && len(o.Pre) == 0 { - return -1 - } - - i := 0 - for ; i < len(v.Pre) && i < len(o.Pre); i++ { - if comp := v.Pre[i].Compare(o.Pre[i]); comp == 0 { - continue - } else if comp == 1 { - return 1 - } else { - return -1 - } - } - - // If all pr versions are the equal but one has further prversion, this one greater - if i == len(v.Pre) && i == len(o.Pre) { - return 0 - } else if i == len(v.Pre) && i < len(o.Pre) { - return -1 - } else { - return 1 - } - -} - -// Validate validates v and returns error in case -func (v Version) Validate() error { - // Major, Minor, Patch already validated using uint64 - - for _, pre := range v.Pre { - if !pre.IsNum { //Numeric prerelease versions already uint64 - if len(pre.VersionStr) == 0 { - return fmt.Errorf("Prerelease can not be empty %q", pre.VersionStr) - } - if !containsOnly(pre.VersionStr, alphanum) { - return fmt.Errorf("Invalid character(s) found in prerelease %q", pre.VersionStr) - } - } - } - - for _, build := range v.Build { - if len(build) == 0 { - return fmt.Errorf("Build meta data can not be empty %q", build) - } - if !containsOnly(build, alphanum) { - return fmt.Errorf("Invalid character(s) found in build meta data %q", build) - } - } - - return nil -} - -// New is an alias for Parse and returns a pointer, parses version string and returns a validated Version or error -func New(s string) (vp *Version, err error) { - v, err := Parse(s) - vp = &v - return -} - -// Make is an alias for Parse, parses version string and returns a validated Version or error -func Make(s string) (Version, error) { - return Parse(s) -} - -// Parse parses version string and returns a validated Version or error -func Parse(s string) (Version, error) { - if len(s) == 0 { - return Version{}, errors.New("Version string empty") - } - - // Split into major.minor.(patch+pr+meta) - parts := strings.SplitN(s, ".", 3) - if len(parts) != 3 { - return Version{}, errors.New("No Major.Minor.Patch elements found") - } - - // Major - if !containsOnly(parts[0], numbers) { - return Version{}, fmt.Errorf("Invalid character(s) found in major number %q", parts[0]) - } - if hasLeadingZeroes(parts[0]) { - return Version{}, fmt.Errorf("Major number must not contain leading zeroes %q", parts[0]) - } - major, err := strconv.ParseUint(parts[0], 10, 64) - if err != nil { - return Version{}, err - } - - // Minor - if !containsOnly(parts[1], numbers) { - return Version{}, fmt.Errorf("Invalid character(s) found in minor number %q", parts[1]) - } - if hasLeadingZeroes(parts[1]) { - return Version{}, fmt.Errorf("Minor number must not contain leading zeroes %q", parts[1]) - } - minor, err := strconv.ParseUint(parts[1], 10, 64) - if err != nil { - return Version{}, err - } - - v := Version{} - v.Major = major - v.Minor = minor - - var build, prerelease []string - patchStr := parts[2] - - if buildIndex := strings.IndexRune(patchStr, '+'); buildIndex != -1 { - build = strings.Split(patchStr[buildIndex+1:], ".") - patchStr = patchStr[:buildIndex] - } - - if preIndex := strings.IndexRune(patchStr, '-'); preIndex != -1 { - prerelease = strings.Split(patchStr[preIndex+1:], ".") - patchStr = patchStr[:preIndex] - } - - if !containsOnly(patchStr, numbers) { - return Version{}, fmt.Errorf("Invalid character(s) found in patch number %q", patchStr) - } - if hasLeadingZeroes(patchStr) { - return Version{}, fmt.Errorf("Patch number must not contain leading zeroes %q", patchStr) - } - patch, err := strconv.ParseUint(patchStr, 10, 64) - if err != nil { - return Version{}, err - } - - v.Patch = patch - - // Prerelease - for _, prstr := range prerelease { - parsedPR, err := NewPRVersion(prstr) - if err != nil { - return Version{}, err - } - v.Pre = append(v.Pre, parsedPR) - } - - // Build meta data - for _, str := range build { - if len(str) == 0 { - return Version{}, errors.New("Build meta data is empty") - } - if !containsOnly(str, alphanum) { - return Version{}, fmt.Errorf("Invalid character(s) found in build meta data %q", str) - } - v.Build = append(v.Build, str) - } - - return v, nil -} - -// MustParse is like Parse but panics if the version cannot be parsed. -func MustParse(s string) Version { - v, err := Parse(s) - if err != nil { - panic(`semver: Parse(` + s + `): ` + err.Error()) - } - return v -} - -// PRVersion represents a PreRelease Version -type PRVersion struct { - VersionStr string - VersionNum uint64 - IsNum bool -} - -// NewPRVersion creates a new valid prerelease version -func NewPRVersion(s string) (PRVersion, error) { - if len(s) == 0 { - return PRVersion{}, errors.New("Prerelease is empty") - } - v := PRVersion{} - if containsOnly(s, numbers) { - if hasLeadingZeroes(s) { - return PRVersion{}, fmt.Errorf("Numeric PreRelease version must not contain leading zeroes %q", s) - } - num, err := strconv.ParseUint(s, 10, 64) - - // Might never be hit, but just in case - if err != nil { - return PRVersion{}, err - } - v.VersionNum = num - v.IsNum = true - } else if containsOnly(s, alphanum) { - v.VersionStr = s - v.IsNum = false - } else { - return PRVersion{}, fmt.Errorf("Invalid character(s) found in prerelease %q", s) - } - return v, nil -} - -// IsNumeric checks if prerelease-version is numeric -func (v PRVersion) IsNumeric() bool { - return v.IsNum -} - -// Compare compares two PreRelease Versions v and o: -// -1 == v is less than o -// 0 == v is equal to o -// 1 == v is greater than o -func (v PRVersion) Compare(o PRVersion) int { - if v.IsNum && !o.IsNum { - return -1 - } else if !v.IsNum && o.IsNum { - return 1 - } else if v.IsNum && o.IsNum { - if v.VersionNum == o.VersionNum { - return 0 - } else if v.VersionNum > o.VersionNum { - return 1 - } else { - return -1 - } - } else { // both are Alphas - if v.VersionStr == o.VersionStr { - return 0 - } else if v.VersionStr > o.VersionStr { - return 1 - } else { - return -1 - } - } -} - -// PreRelease version to string -func (v PRVersion) String() string { - if v.IsNum { - return strconv.FormatUint(v.VersionNum, 10) - } - return v.VersionStr -} - -func containsOnly(s string, set string) bool { - return strings.IndexFunc(s, func(r rune) bool { - return !strings.ContainsRune(set, r) - }) == -1 -} - -func hasLeadingZeroes(s string) bool { - return len(s) > 1 && s[0] == '0' -} - -// NewBuildVersion creates a new valid build version -func NewBuildVersion(s string) (string, error) { - if len(s) == 0 { - return "", errors.New("Buildversion is empty") - } - if !containsOnly(s, alphanum) { - return "", fmt.Errorf("Invalid character(s) found in build meta data %q", s) - } - return s, nil -} diff --git a/vendor/github.com/blang/semver/sort.go b/vendor/github.com/blang/semver/sort.go deleted file mode 100644 index e18f88082..000000000 --- a/vendor/github.com/blang/semver/sort.go +++ /dev/null @@ -1,28 +0,0 @@ -package semver - -import ( - "sort" -) - -// Versions represents multiple versions. -type Versions []Version - -// Len returns length of version collection -func (s Versions) Len() int { - return len(s) -} - -// Swap swaps two versions inside the collection by its indices -func (s Versions) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -// Less checks if version at index i is less than version at index j -func (s Versions) Less(i, j int) bool { - return s[i].LT(s[j]) -} - -// Sort sorts a slice of versions -func Sort(versions []Version) { - sort.Sort(Versions(versions)) -} diff --git a/vendor/github.com/blang/semver/sql.go b/vendor/github.com/blang/semver/sql.go deleted file mode 100644 index eb4d80266..000000000 --- a/vendor/github.com/blang/semver/sql.go +++ /dev/null @@ -1,30 +0,0 @@ -package semver - -import ( - "database/sql/driver" - "fmt" -) - -// Scan implements the database/sql.Scanner interface. -func (v *Version) Scan(src interface{}) (err error) { - var str string - switch src := src.(type) { - case string: - str = src - case []byte: - str = string(src) - default: - return fmt.Errorf("Version.Scan: cannot convert %T to string.", src) - } - - if t, err := Parse(str); err == nil { - *v = t - } - - return -} - -// Value implements the database/sql/driver.Valuer interface. -func (v Version) Value() (driver.Value, error) { - return v.String(), nil -} diff --git a/vendor/github.com/coreos/go-oidc/LICENSE b/vendor/github.com/coreos/go-oidc/LICENSE deleted file mode 100644 index e06d20818..000000000 --- a/vendor/github.com/coreos/go-oidc/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/vendor/github.com/coreos/go-oidc/NOTICE b/vendor/github.com/coreos/go-oidc/NOTICE deleted file mode 100644 index b39ddfa5c..000000000 --- a/vendor/github.com/coreos/go-oidc/NOTICE +++ /dev/null @@ -1,5 +0,0 @@ -CoreOS Project -Copyright 2014 CoreOS, Inc - -This product includes software developed at CoreOS, Inc. -(http://www.coreos.com/). diff --git a/vendor/github.com/coreos/go-oidc/http/client.go b/vendor/github.com/coreos/go-oidc/http/client.go deleted file mode 100644 index fd079b495..000000000 --- a/vendor/github.com/coreos/go-oidc/http/client.go +++ /dev/null @@ -1,7 +0,0 @@ -package http - -import "net/http" - -type Client interface { - Do(*http.Request) (*http.Response, error) -} diff --git a/vendor/github.com/coreos/go-oidc/http/http.go b/vendor/github.com/coreos/go-oidc/http/http.go deleted file mode 100644 index c3f512151..000000000 --- a/vendor/github.com/coreos/go-oidc/http/http.go +++ /dev/null @@ -1,156 +0,0 @@ -package http - -import ( - "encoding/base64" - "encoding/json" - "errors" - "log" - "net/http" - "net/url" - "path" - "strconv" - "strings" - "time" -) - -func WriteError(w http.ResponseWriter, code int, msg string) { - e := struct { - Error string `json:"error"` - }{ - Error: msg, - } - b, err := json.Marshal(e) - if err != nil { - log.Printf("go-oidc: failed to marshal %#v: %v", e, err) - code = http.StatusInternalServerError - b = []byte(`{"error":"server_error"}`) - } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(code) - w.Write(b) -} - -// BasicAuth parses a username and password from the request's -// Authorization header. This was pulled from golang master: -// https://codereview.appspot.com/76540043 -func BasicAuth(r *http.Request) (username, password string, ok bool) { - auth := r.Header.Get("Authorization") - if auth == "" { - return - } - - if !strings.HasPrefix(auth, "Basic ") { - return - } - c, err := base64.StdEncoding.DecodeString(strings.TrimPrefix(auth, "Basic ")) - if err != nil { - return - } - cs := string(c) - s := strings.IndexByte(cs, ':') - if s < 0 { - return - } - return cs[:s], cs[s+1:], true -} - -func cacheControlMaxAge(hdr string) (time.Duration, bool, error) { - for _, field := range strings.Split(hdr, ",") { - parts := strings.SplitN(strings.TrimSpace(field), "=", 2) - k := strings.ToLower(strings.TrimSpace(parts[0])) - if k != "max-age" { - continue - } - - if len(parts) == 1 { - return 0, false, errors.New("max-age has no value") - } - - v := strings.TrimSpace(parts[1]) - if v == "" { - return 0, false, errors.New("max-age has empty value") - } - - age, err := strconv.Atoi(v) - if err != nil { - return 0, false, err - } - - if age <= 0 { - return 0, false, nil - } - - return time.Duration(age) * time.Second, true, nil - } - - return 0, false, nil -} - -func expires(date, expires string) (time.Duration, bool, error) { - if date == "" || expires == "" { - return 0, false, nil - } - - te, err := time.Parse(time.RFC1123, expires) - if err != nil { - return 0, false, err - } - - td, err := time.Parse(time.RFC1123, date) - if err != nil { - return 0, false, err - } - - ttl := te.Sub(td) - - // headers indicate data already expired, caller should not - // have to care about this case - if ttl <= 0 { - return 0, false, nil - } - - return ttl, true, nil -} - -func Cacheable(hdr http.Header) (time.Duration, bool, error) { - ttl, ok, err := cacheControlMaxAge(hdr.Get("Cache-Control")) - if err != nil || ok { - return ttl, ok, err - } - - return expires(hdr.Get("Date"), hdr.Get("Expires")) -} - -// MergeQuery appends additional query values to an existing URL. -func MergeQuery(u url.URL, q url.Values) url.URL { - uv := u.Query() - for k, vs := range q { - for _, v := range vs { - uv.Add(k, v) - } - } - u.RawQuery = uv.Encode() - return u -} - -// NewResourceLocation appends a resource id to the end of the requested URL path. -func NewResourceLocation(reqURL *url.URL, id string) string { - var u url.URL - u = *reqURL - u.Path = path.Join(u.Path, id) - u.RawQuery = "" - u.Fragment = "" - return u.String() -} - -// CopyRequest returns a clone of the provided *http.Request. -// The returned object is a shallow copy of the struct and a -// deep copy of its Header field. -func CopyRequest(r *http.Request) *http.Request { - r2 := *r - r2.Header = make(http.Header) - for k, s := range r.Header { - r2.Header[k] = s - } - return &r2 -} diff --git a/vendor/github.com/coreos/go-oidc/http/url.go b/vendor/github.com/coreos/go-oidc/http/url.go deleted file mode 100644 index df60eb1a6..000000000 --- a/vendor/github.com/coreos/go-oidc/http/url.go +++ /dev/null @@ -1,29 +0,0 @@ -package http - -import ( - "errors" - "net/url" -) - -// ParseNonEmptyURL checks that a string is a parsable URL which is also not empty -// since `url.Parse("")` does not return an error. Must contian a scheme and a host. -func ParseNonEmptyURL(u string) (*url.URL, error) { - if u == "" { - return nil, errors.New("url is empty") - } - - ur, err := url.Parse(u) - if err != nil { - return nil, err - } - - if ur.Scheme == "" { - return nil, errors.New("url scheme is empty") - } - - if ur.Host == "" { - return nil, errors.New("url host is empty") - } - - return ur, nil -} diff --git a/vendor/github.com/coreos/go-oidc/jose/claims.go b/vendor/github.com/coreos/go-oidc/jose/claims.go deleted file mode 100644 index 8b48bfd23..000000000 --- a/vendor/github.com/coreos/go-oidc/jose/claims.go +++ /dev/null @@ -1,126 +0,0 @@ -package jose - -import ( - "encoding/json" - "fmt" - "math" - "time" -) - -type Claims map[string]interface{} - -func (c Claims) Add(name string, value interface{}) { - c[name] = value -} - -func (c Claims) StringClaim(name string) (string, bool, error) { - cl, ok := c[name] - if !ok { - return "", false, nil - } - - v, ok := cl.(string) - if !ok { - return "", false, fmt.Errorf("unable to parse claim as string: %v", name) - } - - return v, true, nil -} - -func (c Claims) StringsClaim(name string) ([]string, bool, error) { - cl, ok := c[name] - if !ok { - return nil, false, nil - } - - if v, ok := cl.([]string); ok { - return v, true, nil - } - - // When unmarshaled, []string will become []interface{}. - if v, ok := cl.([]interface{}); ok { - var ret []string - for _, vv := range v { - str, ok := vv.(string) - if !ok { - return nil, false, fmt.Errorf("unable to parse claim as string array: %v", name) - } - ret = append(ret, str) - } - return ret, true, nil - } - - return nil, false, fmt.Errorf("unable to parse claim as string array: %v", name) -} - -func (c Claims) Int64Claim(name string) (int64, bool, error) { - cl, ok := c[name] - if !ok { - return 0, false, nil - } - - v, ok := cl.(int64) - if !ok { - vf, ok := cl.(float64) - if !ok { - return 0, false, fmt.Errorf("unable to parse claim as int64: %v", name) - } - v = int64(vf) - } - - return v, true, nil -} - -func (c Claims) Float64Claim(name string) (float64, bool, error) { - cl, ok := c[name] - if !ok { - return 0, false, nil - } - - v, ok := cl.(float64) - if !ok { - vi, ok := cl.(int64) - if !ok { - return 0, false, fmt.Errorf("unable to parse claim as float64: %v", name) - } - v = float64(vi) - } - - return v, true, nil -} - -func (c Claims) TimeClaim(name string) (time.Time, bool, error) { - v, ok, err := c.Float64Claim(name) - if !ok || err != nil { - return time.Time{}, ok, err - } - - s := math.Trunc(v) - ns := (v - s) * math.Pow(10, 9) - return time.Unix(int64(s), int64(ns)).UTC(), true, nil -} - -func decodeClaims(payload []byte) (Claims, error) { - var c Claims - if err := json.Unmarshal(payload, &c); err != nil { - return nil, fmt.Errorf("malformed JWT claims, unable to decode: %v", err) - } - return c, nil -} - -func marshalClaims(c Claims) ([]byte, error) { - b, err := json.Marshal(c) - if err != nil { - return nil, err - } - return b, nil -} - -func encodeClaims(c Claims) (string, error) { - b, err := marshalClaims(c) - if err != nil { - return "", err - } - - return encodeSegment(b), nil -} diff --git a/vendor/github.com/coreos/go-oidc/jose/jose.go b/vendor/github.com/coreos/go-oidc/jose/jose.go deleted file mode 100644 index 620992659..000000000 --- a/vendor/github.com/coreos/go-oidc/jose/jose.go +++ /dev/null @@ -1,112 +0,0 @@ -package jose - -import ( - "encoding/base64" - "encoding/json" - "fmt" - "strings" -) - -const ( - HeaderMediaType = "typ" - HeaderKeyAlgorithm = "alg" - HeaderKeyID = "kid" -) - -const ( - // Encryption Algorithm Header Parameter Values for JWS - // See: https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#page-6 - AlgHS256 = "HS256" - AlgHS384 = "HS384" - AlgHS512 = "HS512" - AlgRS256 = "RS256" - AlgRS384 = "RS384" - AlgRS512 = "RS512" - AlgES256 = "ES256" - AlgES384 = "ES384" - AlgES512 = "ES512" - AlgPS256 = "PS256" - AlgPS384 = "PS384" - AlgPS512 = "PS512" - AlgNone = "none" -) - -const ( - // Algorithm Header Parameter Values for JWE - // See: https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#section-4.1 - AlgRSA15 = "RSA1_5" - AlgRSAOAEP = "RSA-OAEP" - AlgRSAOAEP256 = "RSA-OAEP-256" - AlgA128KW = "A128KW" - AlgA192KW = "A192KW" - AlgA256KW = "A256KW" - AlgDir = "dir" - AlgECDHES = "ECDH-ES" - AlgECDHESA128KW = "ECDH-ES+A128KW" - AlgECDHESA192KW = "ECDH-ES+A192KW" - AlgECDHESA256KW = "ECDH-ES+A256KW" - AlgA128GCMKW = "A128GCMKW" - AlgA192GCMKW = "A192GCMKW" - AlgA256GCMKW = "A256GCMKW" - AlgPBES2HS256A128KW = "PBES2-HS256+A128KW" - AlgPBES2HS384A192KW = "PBES2-HS384+A192KW" - AlgPBES2HS512A256KW = "PBES2-HS512+A256KW" -) - -const ( - // Encryption Algorithm Header Parameter Values for JWE - // See: https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#page-22 - EncA128CBCHS256 = "A128CBC-HS256" - EncA128CBCHS384 = "A128CBC-HS384" - EncA256CBCHS512 = "A256CBC-HS512" - EncA128GCM = "A128GCM" - EncA192GCM = "A192GCM" - EncA256GCM = "A256GCM" -) - -type JOSEHeader map[string]string - -func (j JOSEHeader) Validate() error { - if _, exists := j[HeaderKeyAlgorithm]; !exists { - return fmt.Errorf("header missing %q parameter", HeaderKeyAlgorithm) - } - - return nil -} - -func decodeHeader(seg string) (JOSEHeader, error) { - b, err := decodeSegment(seg) - if err != nil { - return nil, err - } - - var h JOSEHeader - err = json.Unmarshal(b, &h) - if err != nil { - return nil, err - } - - return h, nil -} - -func encodeHeader(h JOSEHeader) (string, error) { - b, err := json.Marshal(h) - if err != nil { - return "", err - } - - return encodeSegment(b), nil -} - -// Decode JWT specific base64url encoding with padding stripped -func decodeSegment(seg string) ([]byte, error) { - if l := len(seg) % 4; l != 0 { - seg += strings.Repeat("=", 4-l) - } - return base64.URLEncoding.DecodeString(seg) -} - -// Encode JWT specific base64url encoding with padding stripped -func encodeSegment(seg []byte) string { - return strings.TrimRight(base64.URLEncoding.EncodeToString(seg), "=") -} diff --git a/vendor/github.com/coreos/go-oidc/jose/jwk.go b/vendor/github.com/coreos/go-oidc/jose/jwk.go deleted file mode 100644 index b7a8e2355..000000000 --- a/vendor/github.com/coreos/go-oidc/jose/jwk.go +++ /dev/null @@ -1,135 +0,0 @@ -package jose - -import ( - "bytes" - "encoding/base64" - "encoding/binary" - "encoding/json" - "math/big" - "strings" -) - -// JSON Web Key -// https://tools.ietf.org/html/draft-ietf-jose-json-web-key-36#page-5 -type JWK struct { - ID string - Type string - Alg string - Use string - Exponent int - Modulus *big.Int - Secret []byte -} - -type jwkJSON struct { - ID string `json:"kid"` - Type string `json:"kty"` - Alg string `json:"alg"` - Use string `json:"use"` - Exponent string `json:"e"` - Modulus string `json:"n"` -} - -func (j *JWK) MarshalJSON() ([]byte, error) { - t := jwkJSON{ - ID: j.ID, - Type: j.Type, - Alg: j.Alg, - Use: j.Use, - Exponent: encodeExponent(j.Exponent), - Modulus: encodeModulus(j.Modulus), - } - - return json.Marshal(&t) -} - -func (j *JWK) UnmarshalJSON(data []byte) error { - var t jwkJSON - err := json.Unmarshal(data, &t) - if err != nil { - return err - } - - e, err := decodeExponent(t.Exponent) - if err != nil { - return err - } - - n, err := decodeModulus(t.Modulus) - if err != nil { - return err - } - - j.ID = t.ID - j.Type = t.Type - j.Alg = t.Alg - j.Use = t.Use - j.Exponent = e - j.Modulus = n - - return nil -} - -type JWKSet struct { - Keys []JWK `json:"keys"` -} - -func decodeExponent(e string) (int, error) { - decE, err := decodeBase64URLPaddingOptional(e) - if err != nil { - return 0, err - } - var eBytes []byte - if len(decE) < 8 { - eBytes = make([]byte, 8-len(decE), 8) - eBytes = append(eBytes, decE...) - } else { - eBytes = decE - } - eReader := bytes.NewReader(eBytes) - var E uint64 - err = binary.Read(eReader, binary.BigEndian, &E) - if err != nil { - return 0, err - } - return int(E), nil -} - -func encodeExponent(e int) string { - b := make([]byte, 8) - binary.BigEndian.PutUint64(b, uint64(e)) - var idx int - for ; idx < 8; idx++ { - if b[idx] != 0x0 { - break - } - } - return base64.URLEncoding.EncodeToString(b[idx:]) -} - -// Turns a URL encoded modulus of a key into a big int. -func decodeModulus(n string) (*big.Int, error) { - decN, err := decodeBase64URLPaddingOptional(n) - if err != nil { - return nil, err - } - N := big.NewInt(0) - N.SetBytes(decN) - return N, nil -} - -func encodeModulus(n *big.Int) string { - return base64.URLEncoding.EncodeToString(n.Bytes()) -} - -// decodeBase64URLPaddingOptional decodes Base64 whether there is padding or not. -// The stdlib version currently doesn't handle this. -// We can get rid of this is if this bug: -// https://github.com/golang/go/issues/4237 -// ever closes. -func decodeBase64URLPaddingOptional(e string) ([]byte, error) { - if m := len(e) % 4; m != 0 { - e += strings.Repeat("=", 4-m) - } - return base64.URLEncoding.DecodeString(e) -} diff --git a/vendor/github.com/coreos/go-oidc/jose/jws.go b/vendor/github.com/coreos/go-oidc/jose/jws.go deleted file mode 100644 index 1049ece83..000000000 --- a/vendor/github.com/coreos/go-oidc/jose/jws.go +++ /dev/null @@ -1,51 +0,0 @@ -package jose - -import ( - "fmt" - "strings" -) - -type JWS struct { - RawHeader string - Header JOSEHeader - RawPayload string - Payload []byte - Signature []byte -} - -// Given a raw encoded JWS token parses it and verifies the structure. -func ParseJWS(raw string) (JWS, error) { - parts := strings.Split(raw, ".") - if len(parts) != 3 { - return JWS{}, fmt.Errorf("malformed JWS, only %d segments", len(parts)) - } - - rawSig := parts[2] - jws := JWS{ - RawHeader: parts[0], - RawPayload: parts[1], - } - - header, err := decodeHeader(jws.RawHeader) - if err != nil { - return JWS{}, fmt.Errorf("malformed JWS, unable to decode header, %s", err) - } - if err = header.Validate(); err != nil { - return JWS{}, fmt.Errorf("malformed JWS, %s", err) - } - jws.Header = header - - payload, err := decodeSegment(jws.RawPayload) - if err != nil { - return JWS{}, fmt.Errorf("malformed JWS, unable to decode payload: %s", err) - } - jws.Payload = payload - - sig, err := decodeSegment(rawSig) - if err != nil { - return JWS{}, fmt.Errorf("malformed JWS, unable to decode signature: %s", err) - } - jws.Signature = sig - - return jws, nil -} diff --git a/vendor/github.com/coreos/go-oidc/jose/jwt.go b/vendor/github.com/coreos/go-oidc/jose/jwt.go deleted file mode 100644 index 3b3e9634b..000000000 --- a/vendor/github.com/coreos/go-oidc/jose/jwt.go +++ /dev/null @@ -1,82 +0,0 @@ -package jose - -import "strings" - -type JWT JWS - -func ParseJWT(token string) (jwt JWT, err error) { - jws, err := ParseJWS(token) - if err != nil { - return - } - - return JWT(jws), nil -} - -func NewJWT(header JOSEHeader, claims Claims) (jwt JWT, err error) { - jwt = JWT{} - - jwt.Header = header - jwt.Header[HeaderMediaType] = "JWT" - - claimBytes, err := marshalClaims(claims) - if err != nil { - return - } - jwt.Payload = claimBytes - - eh, err := encodeHeader(header) - if err != nil { - return - } - jwt.RawHeader = eh - - ec, err := encodeClaims(claims) - if err != nil { - return - } - jwt.RawPayload = ec - - return -} - -func (j *JWT) KeyID() (string, bool) { - kID, ok := j.Header[HeaderKeyID] - return kID, ok -} - -func (j *JWT) Claims() (Claims, error) { - return decodeClaims(j.Payload) -} - -// Encoded data part of the token which may be signed. -func (j *JWT) Data() string { - return strings.Join([]string{j.RawHeader, j.RawPayload}, ".") -} - -// Full encoded JWT token string in format: header.claims.signature -func (j *JWT) Encode() string { - d := j.Data() - s := encodeSegment(j.Signature) - return strings.Join([]string{d, s}, ".") -} - -func NewSignedJWT(claims Claims, s Signer) (*JWT, error) { - header := JOSEHeader{ - HeaderKeyAlgorithm: s.Alg(), - HeaderKeyID: s.ID(), - } - - jwt, err := NewJWT(header, claims) - if err != nil { - return nil, err - } - - sig, err := s.Sign([]byte(jwt.Data())) - if err != nil { - return nil, err - } - jwt.Signature = sig - - return &jwt, nil -} diff --git a/vendor/github.com/coreos/go-oidc/jose/sig.go b/vendor/github.com/coreos/go-oidc/jose/sig.go deleted file mode 100755 index 7b2b253cc..000000000 --- a/vendor/github.com/coreos/go-oidc/jose/sig.go +++ /dev/null @@ -1,24 +0,0 @@ -package jose - -import ( - "fmt" -) - -type Verifier interface { - ID() string - Alg() string - Verify(sig []byte, data []byte) error -} - -type Signer interface { - Verifier - Sign(data []byte) (sig []byte, err error) -} - -func NewVerifier(jwk JWK) (Verifier, error) { - if jwk.Type != "RSA" { - return nil, fmt.Errorf("unsupported key type %q", jwk.Type) - } - - return NewVerifierRSA(jwk) -} diff --git a/vendor/github.com/coreos/go-oidc/jose/sig_hmac.go b/vendor/github.com/coreos/go-oidc/jose/sig_hmac.go deleted file mode 100755 index b3ca3ef3d..000000000 --- a/vendor/github.com/coreos/go-oidc/jose/sig_hmac.go +++ /dev/null @@ -1,67 +0,0 @@ -package jose - -import ( - "bytes" - "crypto" - "crypto/hmac" - _ "crypto/sha256" - "errors" - "fmt" -) - -type VerifierHMAC struct { - KeyID string - Hash crypto.Hash - Secret []byte -} - -type SignerHMAC struct { - VerifierHMAC -} - -func NewVerifierHMAC(jwk JWK) (*VerifierHMAC, error) { - if jwk.Alg != "" && jwk.Alg != "HS256" { - return nil, fmt.Errorf("unsupported key algorithm %q", jwk.Alg) - } - - v := VerifierHMAC{ - KeyID: jwk.ID, - Secret: jwk.Secret, - Hash: crypto.SHA256, - } - - return &v, nil -} - -func (v *VerifierHMAC) ID() string { - return v.KeyID -} - -func (v *VerifierHMAC) Alg() string { - return "HS256" -} - -func (v *VerifierHMAC) Verify(sig []byte, data []byte) error { - h := hmac.New(v.Hash.New, v.Secret) - h.Write(data) - if !bytes.Equal(sig, h.Sum(nil)) { - return errors.New("invalid hmac signature") - } - return nil -} - -func NewSignerHMAC(kid string, secret []byte) *SignerHMAC { - return &SignerHMAC{ - VerifierHMAC: VerifierHMAC{ - KeyID: kid, - Secret: secret, - Hash: crypto.SHA256, - }, - } -} - -func (s *SignerHMAC) Sign(data []byte) ([]byte, error) { - h := hmac.New(s.Hash.New, s.Secret) - h.Write(data) - return h.Sum(nil), nil -} diff --git a/vendor/github.com/coreos/go-oidc/jose/sig_rsa.go b/vendor/github.com/coreos/go-oidc/jose/sig_rsa.go deleted file mode 100755 index 004e45dd8..000000000 --- a/vendor/github.com/coreos/go-oidc/jose/sig_rsa.go +++ /dev/null @@ -1,67 +0,0 @@ -package jose - -import ( - "crypto" - "crypto/rand" - "crypto/rsa" - "fmt" -) - -type VerifierRSA struct { - KeyID string - Hash crypto.Hash - PublicKey rsa.PublicKey -} - -type SignerRSA struct { - PrivateKey rsa.PrivateKey - VerifierRSA -} - -func NewVerifierRSA(jwk JWK) (*VerifierRSA, error) { - if jwk.Alg != "" && jwk.Alg != "RS256" { - return nil, fmt.Errorf("unsupported key algorithm %q", jwk.Alg) - } - - v := VerifierRSA{ - KeyID: jwk.ID, - PublicKey: rsa.PublicKey{ - N: jwk.Modulus, - E: jwk.Exponent, - }, - Hash: crypto.SHA256, - } - - return &v, nil -} - -func NewSignerRSA(kid string, key rsa.PrivateKey) *SignerRSA { - return &SignerRSA{ - PrivateKey: key, - VerifierRSA: VerifierRSA{ - KeyID: kid, - PublicKey: key.PublicKey, - Hash: crypto.SHA256, - }, - } -} - -func (v *VerifierRSA) ID() string { - return v.KeyID -} - -func (v *VerifierRSA) Alg() string { - return "RS256" -} - -func (v *VerifierRSA) Verify(sig []byte, data []byte) error { - h := v.Hash.New() - h.Write(data) - return rsa.VerifyPKCS1v15(&v.PublicKey, v.Hash, h.Sum(nil), sig) -} - -func (s *SignerRSA) Sign(data []byte) ([]byte, error) { - h := s.Hash.New() - h.Write(data) - return rsa.SignPKCS1v15(rand.Reader, &s.PrivateKey, s.Hash, h.Sum(nil)) -} diff --git a/vendor/github.com/coreos/go-oidc/key/key.go b/vendor/github.com/coreos/go-oidc/key/key.go deleted file mode 100644 index 208c1fc14..000000000 --- a/vendor/github.com/coreos/go-oidc/key/key.go +++ /dev/null @@ -1,153 +0,0 @@ -package key - -import ( - "crypto/rand" - "crypto/rsa" - "encoding/hex" - "encoding/json" - "io" - "time" - - "github.com/coreos/go-oidc/jose" -) - -func NewPublicKey(jwk jose.JWK) *PublicKey { - return &PublicKey{jwk: jwk} -} - -type PublicKey struct { - jwk jose.JWK -} - -func (k *PublicKey) MarshalJSON() ([]byte, error) { - return json.Marshal(&k.jwk) -} - -func (k *PublicKey) UnmarshalJSON(data []byte) error { - var jwk jose.JWK - if err := json.Unmarshal(data, &jwk); err != nil { - return err - } - k.jwk = jwk - return nil -} - -func (k *PublicKey) ID() string { - return k.jwk.ID -} - -func (k *PublicKey) Verifier() (jose.Verifier, error) { - return jose.NewVerifierRSA(k.jwk) -} - -type PrivateKey struct { - KeyID string - PrivateKey *rsa.PrivateKey -} - -func (k *PrivateKey) ID() string { - return k.KeyID -} - -func (k *PrivateKey) Signer() jose.Signer { - return jose.NewSignerRSA(k.ID(), *k.PrivateKey) -} - -func (k *PrivateKey) JWK() jose.JWK { - return jose.JWK{ - ID: k.KeyID, - Type: "RSA", - Alg: "RS256", - Use: "sig", - Exponent: k.PrivateKey.PublicKey.E, - Modulus: k.PrivateKey.PublicKey.N, - } -} - -type KeySet interface { - ExpiresAt() time.Time -} - -type PublicKeySet struct { - keys []PublicKey - index map[string]*PublicKey - expiresAt time.Time -} - -func NewPublicKeySet(jwks []jose.JWK, exp time.Time) *PublicKeySet { - keys := make([]PublicKey, len(jwks)) - index := make(map[string]*PublicKey) - for i, jwk := range jwks { - keys[i] = *NewPublicKey(jwk) - index[keys[i].ID()] = &keys[i] - } - return &PublicKeySet{ - keys: keys, - index: index, - expiresAt: exp, - } -} - -func (s *PublicKeySet) ExpiresAt() time.Time { - return s.expiresAt -} - -func (s *PublicKeySet) Keys() []PublicKey { - return s.keys -} - -func (s *PublicKeySet) Key(id string) *PublicKey { - return s.index[id] -} - -type PrivateKeySet struct { - keys []*PrivateKey - ActiveKeyID string - expiresAt time.Time -} - -func NewPrivateKeySet(keys []*PrivateKey, exp time.Time) *PrivateKeySet { - return &PrivateKeySet{ - keys: keys, - ActiveKeyID: keys[0].ID(), - expiresAt: exp.UTC(), - } -} - -func (s *PrivateKeySet) Keys() []*PrivateKey { - return s.keys -} - -func (s *PrivateKeySet) ExpiresAt() time.Time { - return s.expiresAt -} - -func (s *PrivateKeySet) Active() *PrivateKey { - for i, k := range s.keys { - if k.ID() == s.ActiveKeyID { - return s.keys[i] - } - } - - return nil -} - -type GeneratePrivateKeyFunc func() (*PrivateKey, error) - -func GeneratePrivateKey() (*PrivateKey, error) { - pk, err := rsa.GenerateKey(rand.Reader, 2048) - if err != nil { - return nil, err - } - keyID := make([]byte, 20) - if _, err := io.ReadFull(rand.Reader, keyID); err != nil { - return nil, err - } - - k := PrivateKey{ - KeyID: hex.EncodeToString(keyID), - PrivateKey: pk, - } - - return &k, nil -} diff --git a/vendor/github.com/coreos/go-oidc/key/manager.go b/vendor/github.com/coreos/go-oidc/key/manager.go deleted file mode 100644 index 476ab6a8d..000000000 --- a/vendor/github.com/coreos/go-oidc/key/manager.go +++ /dev/null @@ -1,99 +0,0 @@ -package key - -import ( - "errors" - "time" - - "github.com/jonboulle/clockwork" - - "github.com/coreos/go-oidc/jose" - "github.com/coreos/pkg/health" -) - -type PrivateKeyManager interface { - ExpiresAt() time.Time - Signer() (jose.Signer, error) - JWKs() ([]jose.JWK, error) - PublicKeys() ([]PublicKey, error) - - WritableKeySetRepo - health.Checkable -} - -func NewPrivateKeyManager() PrivateKeyManager { - return &privateKeyManager{ - clock: clockwork.NewRealClock(), - } -} - -type privateKeyManager struct { - keySet *PrivateKeySet - clock clockwork.Clock -} - -func (m *privateKeyManager) ExpiresAt() time.Time { - if m.keySet == nil { - return m.clock.Now().UTC() - } - - return m.keySet.ExpiresAt() -} - -func (m *privateKeyManager) Signer() (jose.Signer, error) { - if err := m.Healthy(); err != nil { - return nil, err - } - - return m.keySet.Active().Signer(), nil -} - -func (m *privateKeyManager) JWKs() ([]jose.JWK, error) { - if err := m.Healthy(); err != nil { - return nil, err - } - - keys := m.keySet.Keys() - jwks := make([]jose.JWK, len(keys)) - for i, k := range keys { - jwks[i] = k.JWK() - } - return jwks, nil -} - -func (m *privateKeyManager) PublicKeys() ([]PublicKey, error) { - jwks, err := m.JWKs() - if err != nil { - return nil, err - } - keys := make([]PublicKey, len(jwks)) - for i, jwk := range jwks { - keys[i] = *NewPublicKey(jwk) - } - return keys, nil -} - -func (m *privateKeyManager) Healthy() error { - if m.keySet == nil { - return errors.New("private key manager uninitialized") - } - - if len(m.keySet.Keys()) == 0 { - return errors.New("private key manager zero keys") - } - - if m.keySet.ExpiresAt().Before(m.clock.Now().UTC()) { - return errors.New("private key manager keys expired") - } - - return nil -} - -func (m *privateKeyManager) Set(keySet KeySet) error { - privKeySet, ok := keySet.(*PrivateKeySet) - if !ok { - return errors.New("unable to cast to PrivateKeySet") - } - - m.keySet = privKeySet - return nil -} diff --git a/vendor/github.com/coreos/go-oidc/key/repo.go b/vendor/github.com/coreos/go-oidc/key/repo.go deleted file mode 100644 index 1acdeb361..000000000 --- a/vendor/github.com/coreos/go-oidc/key/repo.go +++ /dev/null @@ -1,55 +0,0 @@ -package key - -import ( - "errors" - "sync" -) - -var ErrorNoKeys = errors.New("no keys found") - -type WritableKeySetRepo interface { - Set(KeySet) error -} - -type ReadableKeySetRepo interface { - Get() (KeySet, error) -} - -type PrivateKeySetRepo interface { - WritableKeySetRepo - ReadableKeySetRepo -} - -func NewPrivateKeySetRepo() PrivateKeySetRepo { - return &memPrivateKeySetRepo{} -} - -type memPrivateKeySetRepo struct { - mu sync.RWMutex - pks PrivateKeySet -} - -func (r *memPrivateKeySetRepo) Set(ks KeySet) error { - pks, ok := ks.(*PrivateKeySet) - if !ok { - return errors.New("unable to cast to PrivateKeySet") - } else if pks == nil { - return errors.New("nil KeySet") - } - - r.mu.Lock() - defer r.mu.Unlock() - - r.pks = *pks - return nil -} - -func (r *memPrivateKeySetRepo) Get() (KeySet, error) { - r.mu.RLock() - defer r.mu.RUnlock() - - if r.pks.keys == nil { - return nil, ErrorNoKeys - } - return KeySet(&r.pks), nil -} diff --git a/vendor/github.com/coreos/go-oidc/key/rotate.go b/vendor/github.com/coreos/go-oidc/key/rotate.go deleted file mode 100644 index bc6cdfb1b..000000000 --- a/vendor/github.com/coreos/go-oidc/key/rotate.go +++ /dev/null @@ -1,159 +0,0 @@ -package key - -import ( - "errors" - "log" - "time" - - ptime "github.com/coreos/pkg/timeutil" - "github.com/jonboulle/clockwork" -) - -var ( - ErrorPrivateKeysExpired = errors.New("private keys have expired") -) - -func NewPrivateKeyRotator(repo PrivateKeySetRepo, ttl time.Duration) *PrivateKeyRotator { - return &PrivateKeyRotator{ - repo: repo, - ttl: ttl, - - keep: 2, - generateKey: GeneratePrivateKey, - clock: clockwork.NewRealClock(), - } -} - -type PrivateKeyRotator struct { - repo PrivateKeySetRepo - generateKey GeneratePrivateKeyFunc - clock clockwork.Clock - keep int - ttl time.Duration -} - -func (r *PrivateKeyRotator) expiresAt() time.Time { - return r.clock.Now().UTC().Add(r.ttl) -} - -func (r *PrivateKeyRotator) Healthy() error { - pks, err := r.privateKeySet() - if err != nil { - return err - } - - if r.clock.Now().After(pks.ExpiresAt()) { - return ErrorPrivateKeysExpired - } - - return nil -} - -func (r *PrivateKeyRotator) privateKeySet() (*PrivateKeySet, error) { - ks, err := r.repo.Get() - if err != nil { - return nil, err - } - - pks, ok := ks.(*PrivateKeySet) - if !ok { - return nil, errors.New("unable to cast to PrivateKeySet") - } - return pks, nil -} - -func (r *PrivateKeyRotator) nextRotation() (time.Duration, error) { - pks, err := r.privateKeySet() - if err == ErrorNoKeys { - return 0, nil - } - if err != nil { - return 0, err - } - - now := r.clock.Now() - - // Ideally, we want to rotate after half the TTL has elapsed. - idealRotationTime := pks.ExpiresAt().Add(-r.ttl / 2) - - // If we are past the ideal rotation time, rotate immediatly. - return max(0, idealRotationTime.Sub(now)), nil -} - -func max(a, b time.Duration) time.Duration { - if a > b { - return a - } - return b -} - -func (r *PrivateKeyRotator) Run() chan struct{} { - attempt := func() { - k, err := r.generateKey() - if err != nil { - log.Printf("go-oidc: failed generating signing key: %v", err) - return - } - - exp := r.expiresAt() - if err := rotatePrivateKeys(r.repo, k, r.keep, exp); err != nil { - log.Printf("go-oidc: key rotation failed: %v", err) - return - } - } - - stop := make(chan struct{}) - go func() { - for { - var nextRotation time.Duration - var sleep time.Duration - var err error - for { - if nextRotation, err = r.nextRotation(); err == nil { - break - } - sleep = ptime.ExpBackoff(sleep, time.Minute) - log.Printf("go-oidc: error getting nextRotation, retrying in %v: %v", sleep, err) - time.Sleep(sleep) - } - - select { - case <-r.clock.After(nextRotation): - attempt() - case <-stop: - return - } - } - }() - - return stop -} - -func rotatePrivateKeys(repo PrivateKeySetRepo, k *PrivateKey, keep int, exp time.Time) error { - ks, err := repo.Get() - if err != nil && err != ErrorNoKeys { - return err - } - - var keys []*PrivateKey - if ks != nil { - pks, ok := ks.(*PrivateKeySet) - if !ok { - return errors.New("unable to cast to PrivateKeySet") - } - keys = pks.Keys() - } - - keys = append([]*PrivateKey{k}, keys...) - if l := len(keys); l > keep { - keys = keys[0:keep] - } - - nks := PrivateKeySet{ - keys: keys, - ActiveKeyID: k.ID(), - expiresAt: exp, - } - - return repo.Set(KeySet(&nks)) -} diff --git a/vendor/github.com/coreos/go-oidc/key/sync.go b/vendor/github.com/coreos/go-oidc/key/sync.go deleted file mode 100644 index b887f7b5a..000000000 --- a/vendor/github.com/coreos/go-oidc/key/sync.go +++ /dev/null @@ -1,91 +0,0 @@ -package key - -import ( - "errors" - "log" - "time" - - "github.com/jonboulle/clockwork" - - "github.com/coreos/pkg/timeutil" -) - -func NewKeySetSyncer(r ReadableKeySetRepo, w WritableKeySetRepo) *KeySetSyncer { - return &KeySetSyncer{ - readable: r, - writable: w, - clock: clockwork.NewRealClock(), - } -} - -type KeySetSyncer struct { - readable ReadableKeySetRepo - writable WritableKeySetRepo - clock clockwork.Clock -} - -func (s *KeySetSyncer) Run() chan struct{} { - stop := make(chan struct{}) - go func() { - var failing bool - var next time.Duration - for { - exp, err := syncKeySet(s.readable, s.writable, s.clock) - if err != nil || exp == 0 { - if !failing { - failing = true - next = time.Second - } else { - next = timeutil.ExpBackoff(next, time.Minute) - } - if exp == 0 { - log.Printf("Synced to already expired key set, retrying in %v: %v", next, err) - - } else { - log.Printf("Failed syncing key set, retrying in %v: %v", next, err) - } - } else { - failing = false - next = exp / 2 - } - - select { - case <-s.clock.After(next): - continue - case <-stop: - return - } - } - }() - - return stop -} - -func Sync(r ReadableKeySetRepo, w WritableKeySetRepo) (time.Duration, error) { - return syncKeySet(r, w, clockwork.NewRealClock()) -} - -// syncKeySet copies the keyset from r to the KeySet at w and returns the duration in which the KeySet will expire. -// If keyset has already expired, returns a zero duration. -func syncKeySet(r ReadableKeySetRepo, w WritableKeySetRepo, clock clockwork.Clock) (exp time.Duration, err error) { - var ks KeySet - ks, err = r.Get() - if err != nil { - return - } - - if ks == nil { - err = errors.New("no source KeySet") - return - } - - if err = w.Set(ks); err != nil { - return - } - - now := clock.Now() - if ks.ExpiresAt().After(now) { - exp = ks.ExpiresAt().Sub(now) - } - return -} diff --git a/vendor/github.com/coreos/go-oidc/oauth2/error.go b/vendor/github.com/coreos/go-oidc/oauth2/error.go deleted file mode 100644 index 50d890949..000000000 --- a/vendor/github.com/coreos/go-oidc/oauth2/error.go +++ /dev/null @@ -1,29 +0,0 @@ -package oauth2 - -const ( - ErrorAccessDenied = "access_denied" - ErrorInvalidClient = "invalid_client" - ErrorInvalidGrant = "invalid_grant" - ErrorInvalidRequest = "invalid_request" - ErrorServerError = "server_error" - ErrorUnauthorizedClient = "unauthorized_client" - ErrorUnsupportedGrantType = "unsupported_grant_type" - ErrorUnsupportedResponseType = "unsupported_response_type" -) - -type Error struct { - Type string `json:"error"` - Description string `json:"error_description,omitempty"` - State string `json:"state,omitempty"` -} - -func (e *Error) Error() string { - if e.Description != "" { - return e.Type + ": " + e.Description - } - return e.Type -} - -func NewError(typ string) *Error { - return &Error{Type: typ} -} diff --git a/vendor/github.com/coreos/go-oidc/oauth2/oauth2.go b/vendor/github.com/coreos/go-oidc/oauth2/oauth2.go deleted file mode 100644 index 72d1d6715..000000000 --- a/vendor/github.com/coreos/go-oidc/oauth2/oauth2.go +++ /dev/null @@ -1,416 +0,0 @@ -package oauth2 - -import ( - "encoding/json" - "errors" - "fmt" - "io/ioutil" - "mime" - "net/http" - "net/url" - "sort" - "strconv" - "strings" - - phttp "github.com/coreos/go-oidc/http" -) - -// ResponseTypesEqual compares two response_type values. If either -// contains a space, it is treated as an unordered list. For example, -// comparing "code id_token" and "id_token code" would evaluate to true. -func ResponseTypesEqual(r1, r2 string) bool { - if !strings.Contains(r1, " ") || !strings.Contains(r2, " ") { - // fast route, no split needed - return r1 == r2 - } - - // split, sort, and compare - r1Fields := strings.Fields(r1) - r2Fields := strings.Fields(r2) - if len(r1Fields) != len(r2Fields) { - return false - } - sort.Strings(r1Fields) - sort.Strings(r2Fields) - for i, r1Field := range r1Fields { - if r1Field != r2Fields[i] { - return false - } - } - return true -} - -const ( - // OAuth2.0 response types registered by OIDC. - // - // See: https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#RegistryContents - ResponseTypeCode = "code" - ResponseTypeCodeIDToken = "code id_token" - ResponseTypeCodeIDTokenToken = "code id_token token" - ResponseTypeIDToken = "id_token" - ResponseTypeIDTokenToken = "id_token token" - ResponseTypeToken = "token" - ResponseTypeNone = "none" -) - -const ( - GrantTypeAuthCode = "authorization_code" - GrantTypeClientCreds = "client_credentials" - GrantTypeUserCreds = "password" - GrantTypeImplicit = "implicit" - GrantTypeRefreshToken = "refresh_token" - - AuthMethodClientSecretPost = "client_secret_post" - AuthMethodClientSecretBasic = "client_secret_basic" - AuthMethodClientSecretJWT = "client_secret_jwt" - AuthMethodPrivateKeyJWT = "private_key_jwt" -) - -type Config struct { - Credentials ClientCredentials - Scope []string - RedirectURL string - AuthURL string - TokenURL string - - // Must be one of the AuthMethodXXX methods above. Right now, only - // AuthMethodClientSecretPost and AuthMethodClientSecretBasic are supported. - AuthMethod string -} - -type Client struct { - hc phttp.Client - creds ClientCredentials - scope []string - authURL *url.URL - redirectURL *url.URL - tokenURL *url.URL - authMethod string -} - -type ClientCredentials struct { - ID string - Secret string -} - -func NewClient(hc phttp.Client, cfg Config) (c *Client, err error) { - if len(cfg.Credentials.ID) == 0 { - err = errors.New("missing client id") - return - } - - if len(cfg.Credentials.Secret) == 0 { - err = errors.New("missing client secret") - return - } - - if cfg.AuthMethod == "" { - cfg.AuthMethod = AuthMethodClientSecretBasic - } else if cfg.AuthMethod != AuthMethodClientSecretPost && cfg.AuthMethod != AuthMethodClientSecretBasic { - err = fmt.Errorf("auth method %q is not supported", cfg.AuthMethod) - return - } - - au, err := phttp.ParseNonEmptyURL(cfg.AuthURL) - if err != nil { - return - } - - tu, err := phttp.ParseNonEmptyURL(cfg.TokenURL) - if err != nil { - return - } - - // Allow empty redirect URL in the case where the client - // only needs to verify a given token. - ru, err := url.Parse(cfg.RedirectURL) - if err != nil { - return - } - - c = &Client{ - creds: cfg.Credentials, - scope: cfg.Scope, - redirectURL: ru, - authURL: au, - tokenURL: tu, - hc: hc, - authMethod: cfg.AuthMethod, - } - - return -} - -// Return the embedded HTTP client -func (c *Client) HttpClient() phttp.Client { - return c.hc -} - -// Generate the url for initial redirect to oauth provider. -func (c *Client) AuthCodeURL(state, accessType, prompt string) string { - v := c.commonURLValues() - v.Set("state", state) - if strings.ToLower(accessType) == "offline" { - v.Set("access_type", "offline") - } - - if prompt != "" { - v.Set("prompt", prompt) - } - v.Set("response_type", "code") - - q := v.Encode() - u := *c.authURL - if u.RawQuery == "" { - u.RawQuery = q - } else { - u.RawQuery += "&" + q - } - return u.String() -} - -func (c *Client) commonURLValues() url.Values { - return url.Values{ - "redirect_uri": {c.redirectURL.String()}, - "scope": {strings.Join(c.scope, " ")}, - "client_id": {c.creds.ID}, - } -} - -func (c *Client) newAuthenticatedRequest(urlToken string, values url.Values) (*http.Request, error) { - var req *http.Request - var err error - switch c.authMethod { - case AuthMethodClientSecretPost: - values.Set("client_secret", c.creds.Secret) - req, err = http.NewRequest("POST", urlToken, strings.NewReader(values.Encode())) - if err != nil { - return nil, err - } - case AuthMethodClientSecretBasic: - req, err = http.NewRequest("POST", urlToken, strings.NewReader(values.Encode())) - if err != nil { - return nil, err - } - encodedID := url.QueryEscape(c.creds.ID) - encodedSecret := url.QueryEscape(c.creds.Secret) - req.SetBasicAuth(encodedID, encodedSecret) - default: - panic("misconfigured client: auth method not supported") - } - - req.Header.Set("Content-Type", "application/x-www-form-urlencoded") - return req, nil - -} - -// ClientCredsToken posts the client id and secret to obtain a token scoped to the OAuth2 client via the "client_credentials" grant type. -// May not be supported by all OAuth2 servers. -func (c *Client) ClientCredsToken(scope []string) (result TokenResponse, err error) { - v := url.Values{ - "scope": {strings.Join(scope, " ")}, - "grant_type": {GrantTypeClientCreds}, - } - - req, err := c.newAuthenticatedRequest(c.tokenURL.String(), v) - if err != nil { - return - } - - resp, err := c.hc.Do(req) - if err != nil { - return - } - defer resp.Body.Close() - - return parseTokenResponse(resp) -} - -// UserCredsToken posts the username and password to obtain a token scoped to the OAuth2 client via the "password" grant_type -// May not be supported by all OAuth2 servers. -func (c *Client) UserCredsToken(username, password string) (result TokenResponse, err error) { - v := url.Values{ - "scope": {strings.Join(c.scope, " ")}, - "grant_type": {GrantTypeUserCreds}, - "username": {username}, - "password": {password}, - } - - req, err := c.newAuthenticatedRequest(c.tokenURL.String(), v) - if err != nil { - return - } - - resp, err := c.hc.Do(req) - if err != nil { - return - } - defer resp.Body.Close() - - return parseTokenResponse(resp) -} - -// RequestToken requests a token from the Token Endpoint with the specified grantType. -// If 'grantType' == GrantTypeAuthCode, then 'value' should be the authorization code. -// If 'grantType' == GrantTypeRefreshToken, then 'value' should be the refresh token. -func (c *Client) RequestToken(grantType, value string) (result TokenResponse, err error) { - v := c.commonURLValues() - - v.Set("grant_type", grantType) - v.Set("client_secret", c.creds.Secret) - switch grantType { - case GrantTypeAuthCode: - v.Set("code", value) - case GrantTypeRefreshToken: - v.Set("refresh_token", value) - default: - err = fmt.Errorf("unsupported grant_type: %v", grantType) - return - } - - req, err := c.newAuthenticatedRequest(c.tokenURL.String(), v) - if err != nil { - return - } - - resp, err := c.hc.Do(req) - if err != nil { - return - } - defer resp.Body.Close() - - return parseTokenResponse(resp) -} - -func parseTokenResponse(resp *http.Response) (result TokenResponse, err error) { - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - return - } - badStatusCode := resp.StatusCode < 200 || resp.StatusCode > 299 - - contentType, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return - } - - result = TokenResponse{ - RawBody: body, - } - - newError := func(typ, desc, state string) error { - if typ == "" { - return fmt.Errorf("unrecognized error %s", body) - } - return &Error{typ, desc, state} - } - - if contentType == "application/x-www-form-urlencoded" || contentType == "text/plain" { - var vals url.Values - vals, err = url.ParseQuery(string(body)) - if err != nil { - return - } - if error := vals.Get("error"); error != "" || badStatusCode { - err = newError(error, vals.Get("error_description"), vals.Get("state")) - return - } - e := vals.Get("expires_in") - if e == "" { - e = vals.Get("expires") - } - if e != "" { - result.Expires, err = strconv.Atoi(e) - if err != nil { - return - } - } - result.AccessToken = vals.Get("access_token") - result.TokenType = vals.Get("token_type") - result.IDToken = vals.Get("id_token") - result.RefreshToken = vals.Get("refresh_token") - result.Scope = vals.Get("scope") - } else { - var r struct { - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` - IDToken string `json:"id_token"` - RefreshToken string `json:"refresh_token"` - Scope string `json:"scope"` - State string `json:"state"` - ExpiresIn json.Number `json:"expires_in"` // Azure AD returns string - Expires int `json:"expires"` - Error string `json:"error"` - Desc string `json:"error_description"` - } - if err = json.Unmarshal(body, &r); err != nil { - return - } - if r.Error != "" || badStatusCode { - err = newError(r.Error, r.Desc, r.State) - return - } - result.AccessToken = r.AccessToken - result.TokenType = r.TokenType - result.IDToken = r.IDToken - result.RefreshToken = r.RefreshToken - result.Scope = r.Scope - if expiresIn, err := r.ExpiresIn.Int64(); err != nil { - result.Expires = r.Expires - } else { - result.Expires = int(expiresIn) - } - } - return -} - -type TokenResponse struct { - AccessToken string - TokenType string - Expires int - IDToken string - RefreshToken string // OPTIONAL. - Scope string // OPTIONAL, if identical to the scope requested by the client, otherwise, REQUIRED. - RawBody []byte // In case callers need some other non-standard info from the token response -} - -type AuthCodeRequest struct { - ResponseType string - ClientID string - RedirectURL *url.URL - Scope []string - State string -} - -func ParseAuthCodeRequest(q url.Values) (AuthCodeRequest, error) { - acr := AuthCodeRequest{ - ResponseType: q.Get("response_type"), - ClientID: q.Get("client_id"), - State: q.Get("state"), - Scope: make([]string, 0), - } - - qs := strings.TrimSpace(q.Get("scope")) - if qs != "" { - acr.Scope = strings.Split(qs, " ") - } - - err := func() error { - if acr.ClientID == "" { - return NewError(ErrorInvalidRequest) - } - - redirectURL := q.Get("redirect_uri") - if redirectURL != "" { - ru, err := url.Parse(redirectURL) - if err != nil { - return NewError(ErrorInvalidRequest) - } - acr.RedirectURL = ru - } - - return nil - }() - - return acr, err -} diff --git a/vendor/github.com/coreos/go-oidc/oidc/client.go b/vendor/github.com/coreos/go-oidc/oidc/client.go deleted file mode 100644 index 7a3cb40f6..000000000 --- a/vendor/github.com/coreos/go-oidc/oidc/client.go +++ /dev/null @@ -1,846 +0,0 @@ -package oidc - -import ( - "encoding/json" - "errors" - "fmt" - "net/http" - "net/mail" - "net/url" - "sync" - "time" - - phttp "github.com/coreos/go-oidc/http" - "github.com/coreos/go-oidc/jose" - "github.com/coreos/go-oidc/key" - "github.com/coreos/go-oidc/oauth2" -) - -const ( - // amount of time that must pass after the last key sync - // completes before another attempt may begin - keySyncWindow = 5 * time.Second -) - -var ( - DefaultScope = []string{"openid", "email", "profile"} - - supportedAuthMethods = map[string]struct{}{ - oauth2.AuthMethodClientSecretBasic: struct{}{}, - oauth2.AuthMethodClientSecretPost: struct{}{}, - } -) - -type ClientCredentials oauth2.ClientCredentials - -type ClientIdentity struct { - Credentials ClientCredentials - Metadata ClientMetadata -} - -type JWAOptions struct { - // SigningAlg specifies an JWA alg for signing JWTs. - // - // Specifying this field implies different actions depending on the context. It may - // require objects be serialized and signed as a JWT instead of plain JSON, or - // require an existing JWT object use the specified alg. - // - // See: http://openid.net/specs/openid-connect-registration-1_0.html#ClientMetadata - SigningAlg string - // EncryptionAlg, if provided, specifies that the returned or sent object be stored - // (or nested) within a JWT object and encrypted with the provided JWA alg. - EncryptionAlg string - // EncryptionEnc specifies the JWA enc algorithm to use with EncryptionAlg. If - // EncryptionAlg is provided and EncryptionEnc is omitted, this field defaults - // to A128CBC-HS256. - // - // If EncryptionEnc is provided EncryptionAlg must also be specified. - EncryptionEnc string -} - -func (opt JWAOptions) valid() error { - if opt.EncryptionEnc != "" && opt.EncryptionAlg == "" { - return errors.New("encryption encoding provided with no encryption algorithm") - } - return nil -} - -func (opt JWAOptions) defaults() JWAOptions { - if opt.EncryptionAlg != "" && opt.EncryptionEnc == "" { - opt.EncryptionEnc = jose.EncA128CBCHS256 - } - return opt -} - -var ( - // Ensure ClientMetadata satisfies these interfaces. - _ json.Marshaler = &ClientMetadata{} - _ json.Unmarshaler = &ClientMetadata{} -) - -// ClientMetadata holds metadata that the authorization server associates -// with a client identifier. The fields range from human-facing display -// strings such as client name, to items that impact the security of the -// protocol, such as the list of valid redirect URIs. -// -// See http://openid.net/specs/openid-connect-registration-1_0.html#ClientMetadata -// -// TODO: support language specific claim representations -// http://openid.net/specs/openid-connect-registration-1_0.html#LanguagesAndScripts -type ClientMetadata struct { - RedirectURIs []url.URL // Required - - // A list of OAuth 2.0 "response_type" values that the client wishes to restrict - // itself to. Either "code", "token", or another registered extension. - // - // If omitted, only "code" will be used. - ResponseTypes []string - // A list of OAuth 2.0 grant types the client wishes to restrict itself to. - // The grant type values used by OIDC are "authorization_code", "implicit", - // and "refresh_token". - // - // If ommitted, only "authorization_code" will be used. - GrantTypes []string - // "native" or "web". If omitted, "web". - ApplicationType string - - // List of email addresses. - Contacts []mail.Address - // Name of client to be presented to the end-user. - ClientName string - // URL that references a logo for the Client application. - LogoURI *url.URL - // URL of the home page of the Client. - ClientURI *url.URL - // Profile data policies and terms of use to be provided to the end user. - PolicyURI *url.URL - TermsOfServiceURI *url.URL - - // URL to or the value of the client's JSON Web Key Set document. - JWKSURI *url.URL - JWKS *jose.JWKSet - - // URL referencing a flie with a single JSON array of redirect URIs. - SectorIdentifierURI *url.URL - - SubjectType string - - // Options to restrict the JWS alg and enc values used for server responses and requests. - IDTokenResponseOptions JWAOptions - UserInfoResponseOptions JWAOptions - RequestObjectOptions JWAOptions - - // Client requested authorization method and signing options for the token endpoint. - // - // Defaults to "client_secret_basic" - TokenEndpointAuthMethod string - TokenEndpointAuthSigningAlg string - - // DefaultMaxAge specifies the maximum amount of time in seconds before an authorized - // user must reauthroize. - // - // If 0, no limitation is placed on the maximum. - DefaultMaxAge int64 - // RequireAuthTime specifies if the auth_time claim in the ID token is required. - RequireAuthTime bool - - // Default Authentication Context Class Reference values for authentication requests. - DefaultACRValues []string - - // URI that a third party can use to initiate a login by the relaying party. - // - // See: http://openid.net/specs/openid-connect-core-1_0.html#ThirdPartyInitiatedLogin - InitiateLoginURI *url.URL - // Pre-registered request_uri values that may be cached by the server. - RequestURIs []url.URL -} - -// Defaults returns a shallow copy of ClientMetadata with default -// values replacing omitted fields. -func (m ClientMetadata) Defaults() ClientMetadata { - if len(m.ResponseTypes) == 0 { - m.ResponseTypes = []string{oauth2.ResponseTypeCode} - } - if len(m.GrantTypes) == 0 { - m.GrantTypes = []string{oauth2.GrantTypeAuthCode} - } - if m.ApplicationType == "" { - m.ApplicationType = "web" - } - if m.TokenEndpointAuthMethod == "" { - m.TokenEndpointAuthMethod = oauth2.AuthMethodClientSecretBasic - } - m.IDTokenResponseOptions = m.IDTokenResponseOptions.defaults() - m.UserInfoResponseOptions = m.UserInfoResponseOptions.defaults() - m.RequestObjectOptions = m.RequestObjectOptions.defaults() - return m -} - -func (m *ClientMetadata) MarshalJSON() ([]byte, error) { - e := m.toEncodableStruct() - return json.Marshal(&e) -} - -func (m *ClientMetadata) UnmarshalJSON(data []byte) error { - var e encodableClientMetadata - if err := json.Unmarshal(data, &e); err != nil { - return err - } - meta, err := e.toStruct() - if err != nil { - return err - } - if err := meta.Valid(); err != nil { - return err - } - *m = meta - return nil -} - -type encodableClientMetadata struct { - RedirectURIs []string `json:"redirect_uris"` // Required - ResponseTypes []string `json:"response_types,omitempty"` - GrantTypes []string `json:"grant_types,omitempty"` - ApplicationType string `json:"application_type,omitempty"` - Contacts []string `json:"contacts,omitempty"` - ClientName string `json:"client_name,omitempty"` - LogoURI string `json:"logo_uri,omitempty"` - ClientURI string `json:"client_uri,omitempty"` - PolicyURI string `json:"policy_uri,omitempty"` - TermsOfServiceURI string `json:"tos_uri,omitempty"` - JWKSURI string `json:"jwks_uri,omitempty"` - JWKS *jose.JWKSet `json:"jwks,omitempty"` - SectorIdentifierURI string `json:"sector_identifier_uri,omitempty"` - SubjectType string `json:"subject_type,omitempty"` - IDTokenSignedResponseAlg string `json:"id_token_signed_response_alg,omitempty"` - IDTokenEncryptedResponseAlg string `json:"id_token_encrypted_response_alg,omitempty"` - IDTokenEncryptedResponseEnc string `json:"id_token_encrypted_response_enc,omitempty"` - UserInfoSignedResponseAlg string `json:"userinfo_signed_response_alg,omitempty"` - UserInfoEncryptedResponseAlg string `json:"userinfo_encrypted_response_alg,omitempty"` - UserInfoEncryptedResponseEnc string `json:"userinfo_encrypted_response_enc,omitempty"` - RequestObjectSigningAlg string `json:"request_object_signing_alg,omitempty"` - RequestObjectEncryptionAlg string `json:"request_object_encryption_alg,omitempty"` - RequestObjectEncryptionEnc string `json:"request_object_encryption_enc,omitempty"` - TokenEndpointAuthMethod string `json:"token_endpoint_auth_method,omitempty"` - TokenEndpointAuthSigningAlg string `json:"token_endpoint_auth_signing_alg,omitempty"` - DefaultMaxAge int64 `json:"default_max_age,omitempty"` - RequireAuthTime bool `json:"require_auth_time,omitempty"` - DefaultACRValues []string `json:"default_acr_values,omitempty"` - InitiateLoginURI string `json:"initiate_login_uri,omitempty"` - RequestURIs []string `json:"request_uris,omitempty"` -} - -func (c *encodableClientMetadata) toStruct() (ClientMetadata, error) { - p := stickyErrParser{} - m := ClientMetadata{ - RedirectURIs: p.parseURIs(c.RedirectURIs, "redirect_uris"), - ResponseTypes: c.ResponseTypes, - GrantTypes: c.GrantTypes, - ApplicationType: c.ApplicationType, - Contacts: p.parseEmails(c.Contacts, "contacts"), - ClientName: c.ClientName, - LogoURI: p.parseURI(c.LogoURI, "logo_uri"), - ClientURI: p.parseURI(c.ClientURI, "client_uri"), - PolicyURI: p.parseURI(c.PolicyURI, "policy_uri"), - TermsOfServiceURI: p.parseURI(c.TermsOfServiceURI, "tos_uri"), - JWKSURI: p.parseURI(c.JWKSURI, "jwks_uri"), - JWKS: c.JWKS, - SectorIdentifierURI: p.parseURI(c.SectorIdentifierURI, "sector_identifier_uri"), - SubjectType: c.SubjectType, - TokenEndpointAuthMethod: c.TokenEndpointAuthMethod, - TokenEndpointAuthSigningAlg: c.TokenEndpointAuthSigningAlg, - DefaultMaxAge: c.DefaultMaxAge, - RequireAuthTime: c.RequireAuthTime, - DefaultACRValues: c.DefaultACRValues, - InitiateLoginURI: p.parseURI(c.InitiateLoginURI, "initiate_login_uri"), - RequestURIs: p.parseURIs(c.RequestURIs, "request_uris"), - IDTokenResponseOptions: JWAOptions{ - c.IDTokenSignedResponseAlg, - c.IDTokenEncryptedResponseAlg, - c.IDTokenEncryptedResponseEnc, - }, - UserInfoResponseOptions: JWAOptions{ - c.UserInfoSignedResponseAlg, - c.UserInfoEncryptedResponseAlg, - c.UserInfoEncryptedResponseEnc, - }, - RequestObjectOptions: JWAOptions{ - c.RequestObjectSigningAlg, - c.RequestObjectEncryptionAlg, - c.RequestObjectEncryptionEnc, - }, - } - if p.firstErr != nil { - return ClientMetadata{}, p.firstErr - } - return m, nil -} - -// stickyErrParser parses URIs and email addresses. Once it encounters -// a parse error, subsequent calls become no-op. -type stickyErrParser struct { - firstErr error -} - -func (p *stickyErrParser) parseURI(s, field string) *url.URL { - if p.firstErr != nil || s == "" { - return nil - } - u, err := url.Parse(s) - if err == nil { - if u.Host == "" { - err = errors.New("no host in URI") - } else if u.Scheme != "http" && u.Scheme != "https" { - err = errors.New("invalid URI scheme") - } - } - if err != nil { - p.firstErr = fmt.Errorf("failed to parse %s: %v", field, err) - return nil - } - return u -} - -func (p *stickyErrParser) parseURIs(s []string, field string) []url.URL { - if p.firstErr != nil || len(s) == 0 { - return nil - } - uris := make([]url.URL, len(s)) - for i, val := range s { - if val == "" { - p.firstErr = fmt.Errorf("invalid URI in field %s", field) - return nil - } - if u := p.parseURI(val, field); u != nil { - uris[i] = *u - } - } - return uris -} - -func (p *stickyErrParser) parseEmails(s []string, field string) []mail.Address { - if p.firstErr != nil || len(s) == 0 { - return nil - } - addrs := make([]mail.Address, len(s)) - for i, addr := range s { - if addr == "" { - p.firstErr = fmt.Errorf("invalid email in field %s", field) - return nil - } - a, err := mail.ParseAddress(addr) - if err != nil { - p.firstErr = fmt.Errorf("invalid email in field %s: %v", field, err) - return nil - } - addrs[i] = *a - } - return addrs -} - -func (m *ClientMetadata) toEncodableStruct() encodableClientMetadata { - return encodableClientMetadata{ - RedirectURIs: urisToStrings(m.RedirectURIs), - ResponseTypes: m.ResponseTypes, - GrantTypes: m.GrantTypes, - ApplicationType: m.ApplicationType, - Contacts: emailsToStrings(m.Contacts), - ClientName: m.ClientName, - LogoURI: uriToString(m.LogoURI), - ClientURI: uriToString(m.ClientURI), - PolicyURI: uriToString(m.PolicyURI), - TermsOfServiceURI: uriToString(m.TermsOfServiceURI), - JWKSURI: uriToString(m.JWKSURI), - JWKS: m.JWKS, - SectorIdentifierURI: uriToString(m.SectorIdentifierURI), - SubjectType: m.SubjectType, - IDTokenSignedResponseAlg: m.IDTokenResponseOptions.SigningAlg, - IDTokenEncryptedResponseAlg: m.IDTokenResponseOptions.EncryptionAlg, - IDTokenEncryptedResponseEnc: m.IDTokenResponseOptions.EncryptionEnc, - UserInfoSignedResponseAlg: m.UserInfoResponseOptions.SigningAlg, - UserInfoEncryptedResponseAlg: m.UserInfoResponseOptions.EncryptionAlg, - UserInfoEncryptedResponseEnc: m.UserInfoResponseOptions.EncryptionEnc, - RequestObjectSigningAlg: m.RequestObjectOptions.SigningAlg, - RequestObjectEncryptionAlg: m.RequestObjectOptions.EncryptionAlg, - RequestObjectEncryptionEnc: m.RequestObjectOptions.EncryptionEnc, - TokenEndpointAuthMethod: m.TokenEndpointAuthMethod, - TokenEndpointAuthSigningAlg: m.TokenEndpointAuthSigningAlg, - DefaultMaxAge: m.DefaultMaxAge, - RequireAuthTime: m.RequireAuthTime, - DefaultACRValues: m.DefaultACRValues, - InitiateLoginURI: uriToString(m.InitiateLoginURI), - RequestURIs: urisToStrings(m.RequestURIs), - } -} - -func uriToString(u *url.URL) string { - if u == nil { - return "" - } - return u.String() -} - -func urisToStrings(urls []url.URL) []string { - if len(urls) == 0 { - return nil - } - sli := make([]string, len(urls)) - for i, u := range urls { - sli[i] = u.String() - } - return sli -} - -func emailsToStrings(addrs []mail.Address) []string { - if len(addrs) == 0 { - return nil - } - sli := make([]string, len(addrs)) - for i, addr := range addrs { - sli[i] = addr.String() - } - return sli -} - -// Valid determines if a ClientMetadata conforms with the OIDC specification. -// -// Valid is called by UnmarshalJSON. -// -// NOTE(ericchiang): For development purposes Valid does not mandate 'https' for -// URLs fields where the OIDC spec requires it. This may change in future releases -// of this package. See: https://github.com/coreos/go-oidc/issues/34 -func (m *ClientMetadata) Valid() error { - if len(m.RedirectURIs) == 0 { - return errors.New("zero redirect URLs") - } - - validURI := func(u *url.URL, fieldName string) error { - if u.Host == "" { - return fmt.Errorf("no host for uri field %s", fieldName) - } - if u.Scheme != "http" && u.Scheme != "https" { - return fmt.Errorf("uri field %s scheme is not http or https", fieldName) - } - return nil - } - - uris := []struct { - val *url.URL - name string - }{ - {m.LogoURI, "logo_uri"}, - {m.ClientURI, "client_uri"}, - {m.PolicyURI, "policy_uri"}, - {m.TermsOfServiceURI, "tos_uri"}, - {m.JWKSURI, "jwks_uri"}, - {m.SectorIdentifierURI, "sector_identifier_uri"}, - {m.InitiateLoginURI, "initiate_login_uri"}, - } - - for _, uri := range uris { - if uri.val == nil { - continue - } - if err := validURI(uri.val, uri.name); err != nil { - return err - } - } - - uriLists := []struct { - vals []url.URL - name string - }{ - {m.RedirectURIs, "redirect_uris"}, - {m.RequestURIs, "request_uris"}, - } - for _, list := range uriLists { - for _, uri := range list.vals { - if err := validURI(&uri, list.name); err != nil { - return err - } - } - } - - options := []struct { - option JWAOptions - name string - }{ - {m.IDTokenResponseOptions, "id_token response"}, - {m.UserInfoResponseOptions, "userinfo response"}, - {m.RequestObjectOptions, "request_object"}, - } - for _, option := range options { - if err := option.option.valid(); err != nil { - return fmt.Errorf("invalid JWA values for %s: %v", option.name, err) - } - } - return nil -} - -type ClientRegistrationResponse struct { - ClientID string // Required - ClientSecret string - RegistrationAccessToken string - RegistrationClientURI string - // If IsZero is true, unspecified. - ClientIDIssuedAt time.Time - // Time at which the client_secret will expire. - // If IsZero is true, it will not expire. - ClientSecretExpiresAt time.Time - - ClientMetadata -} - -type encodableClientRegistrationResponse struct { - ClientID string `json:"client_id"` // Required - ClientSecret string `json:"client_secret,omitempty"` - RegistrationAccessToken string `json:"registration_access_token,omitempty"` - RegistrationClientURI string `json:"registration_client_uri,omitempty"` - ClientIDIssuedAt int64 `json:"client_id_issued_at,omitempty"` - // Time at which the client_secret will expire, in seconds since the epoch. - // If 0 it will not expire. - ClientSecretExpiresAt int64 `json:"client_secret_expires_at"` // Required - - encodableClientMetadata -} - -func unixToSec(t time.Time) int64 { - if t.IsZero() { - return 0 - } - return t.Unix() -} - -func (c *ClientRegistrationResponse) MarshalJSON() ([]byte, error) { - e := encodableClientRegistrationResponse{ - ClientID: c.ClientID, - ClientSecret: c.ClientSecret, - RegistrationAccessToken: c.RegistrationAccessToken, - RegistrationClientURI: c.RegistrationClientURI, - ClientIDIssuedAt: unixToSec(c.ClientIDIssuedAt), - ClientSecretExpiresAt: unixToSec(c.ClientSecretExpiresAt), - encodableClientMetadata: c.ClientMetadata.toEncodableStruct(), - } - return json.Marshal(&e) -} - -func secToUnix(sec int64) time.Time { - if sec == 0 { - return time.Time{} - } - return time.Unix(sec, 0) -} - -func (c *ClientRegistrationResponse) UnmarshalJSON(data []byte) error { - var e encodableClientRegistrationResponse - if err := json.Unmarshal(data, &e); err != nil { - return err - } - if e.ClientID == "" { - return errors.New("no client_id in client registration response") - } - metadata, err := e.encodableClientMetadata.toStruct() - if err != nil { - return err - } - *c = ClientRegistrationResponse{ - ClientID: e.ClientID, - ClientSecret: e.ClientSecret, - RegistrationAccessToken: e.RegistrationAccessToken, - RegistrationClientURI: e.RegistrationClientURI, - ClientIDIssuedAt: secToUnix(e.ClientIDIssuedAt), - ClientSecretExpiresAt: secToUnix(e.ClientSecretExpiresAt), - ClientMetadata: metadata, - } - return nil -} - -type ClientConfig struct { - HTTPClient phttp.Client - Credentials ClientCredentials - Scope []string - RedirectURL string - ProviderConfig ProviderConfig - KeySet key.PublicKeySet -} - -func NewClient(cfg ClientConfig) (*Client, error) { - // Allow empty redirect URL in the case where the client - // only needs to verify a given token. - ru, err := url.Parse(cfg.RedirectURL) - if err != nil { - return nil, fmt.Errorf("invalid redirect URL: %v", err) - } - - c := Client{ - credentials: cfg.Credentials, - httpClient: cfg.HTTPClient, - scope: cfg.Scope, - redirectURL: ru.String(), - providerConfig: newProviderConfigRepo(cfg.ProviderConfig), - keySet: cfg.KeySet, - } - - if c.httpClient == nil { - c.httpClient = http.DefaultClient - } - - if c.scope == nil { - c.scope = make([]string, len(DefaultScope)) - copy(c.scope, DefaultScope) - } - - return &c, nil -} - -type Client struct { - httpClient phttp.Client - providerConfig *providerConfigRepo - credentials ClientCredentials - redirectURL string - scope []string - keySet key.PublicKeySet - providerSyncer *ProviderConfigSyncer - - keySetSyncMutex sync.RWMutex - lastKeySetSync time.Time -} - -func (c *Client) Healthy() error { - now := time.Now().UTC() - - cfg := c.providerConfig.Get() - - if cfg.Empty() { - return errors.New("oidc client provider config empty") - } - - if !cfg.ExpiresAt.IsZero() && cfg.ExpiresAt.Before(now) { - return errors.New("oidc client provider config expired") - } - - return nil -} - -func (c *Client) OAuthClient() (*oauth2.Client, error) { - cfg := c.providerConfig.Get() - authMethod, err := chooseAuthMethod(cfg) - if err != nil { - return nil, err - } - - ocfg := oauth2.Config{ - Credentials: oauth2.ClientCredentials(c.credentials), - RedirectURL: c.redirectURL, - AuthURL: cfg.AuthEndpoint.String(), - TokenURL: cfg.TokenEndpoint.String(), - Scope: c.scope, - AuthMethod: authMethod, - } - - return oauth2.NewClient(c.httpClient, ocfg) -} - -func chooseAuthMethod(cfg ProviderConfig) (string, error) { - if len(cfg.TokenEndpointAuthMethodsSupported) == 0 { - return oauth2.AuthMethodClientSecretBasic, nil - } - - for _, authMethod := range cfg.TokenEndpointAuthMethodsSupported { - if _, ok := supportedAuthMethods[authMethod]; ok { - return authMethod, nil - } - } - - return "", errors.New("no supported auth methods") -} - -// SyncProviderConfig starts the provider config syncer -func (c *Client) SyncProviderConfig(discoveryURL string) chan struct{} { - r := NewHTTPProviderConfigGetter(c.httpClient, discoveryURL) - s := NewProviderConfigSyncer(r, c.providerConfig) - stop := s.Run() - s.WaitUntilInitialSync() - return stop -} - -func (c *Client) maybeSyncKeys() error { - tooSoon := func() bool { - return time.Now().UTC().Before(c.lastKeySetSync.Add(keySyncWindow)) - } - - // ignore request to sync keys if a sync operation has been - // attempted too recently - if tooSoon() { - return nil - } - - c.keySetSyncMutex.Lock() - defer c.keySetSyncMutex.Unlock() - - // check again, as another goroutine may have been holding - // the lock while updating the keys - if tooSoon() { - return nil - } - - cfg := c.providerConfig.Get() - r := NewRemotePublicKeyRepo(c.httpClient, cfg.KeysEndpoint.String()) - w := &clientKeyRepo{client: c} - _, err := key.Sync(r, w) - c.lastKeySetSync = time.Now().UTC() - - return err -} - -type clientKeyRepo struct { - client *Client -} - -func (r *clientKeyRepo) Set(ks key.KeySet) error { - pks, ok := ks.(*key.PublicKeySet) - if !ok { - return errors.New("unable to cast to PublicKey") - } - r.client.keySet = *pks - return nil -} - -func (c *Client) ClientCredsToken(scope []string) (jose.JWT, error) { - cfg := c.providerConfig.Get() - - if !cfg.SupportsGrantType(oauth2.GrantTypeClientCreds) { - return jose.JWT{}, fmt.Errorf("%v grant type is not supported", oauth2.GrantTypeClientCreds) - } - - oac, err := c.OAuthClient() - if err != nil { - return jose.JWT{}, err - } - - t, err := oac.ClientCredsToken(scope) - if err != nil { - return jose.JWT{}, err - } - - jwt, err := jose.ParseJWT(t.IDToken) - if err != nil { - return jose.JWT{}, err - } - - return jwt, c.VerifyJWT(jwt) -} - -// ExchangeAuthCode exchanges an OAuth2 auth code for an OIDC JWT ID token. -func (c *Client) ExchangeAuthCode(code string) (jose.JWT, error) { - oac, err := c.OAuthClient() - if err != nil { - return jose.JWT{}, err - } - - t, err := oac.RequestToken(oauth2.GrantTypeAuthCode, code) - if err != nil { - return jose.JWT{}, err - } - - jwt, err := jose.ParseJWT(t.IDToken) - if err != nil { - return jose.JWT{}, err - } - - return jwt, c.VerifyJWT(jwt) -} - -// RefreshToken uses a refresh token to exchange for a new OIDC JWT ID Token. -func (c *Client) RefreshToken(refreshToken string) (jose.JWT, error) { - oac, err := c.OAuthClient() - if err != nil { - return jose.JWT{}, err - } - - t, err := oac.RequestToken(oauth2.GrantTypeRefreshToken, refreshToken) - if err != nil { - return jose.JWT{}, err - } - - jwt, err := jose.ParseJWT(t.IDToken) - if err != nil { - return jose.JWT{}, err - } - - return jwt, c.VerifyJWT(jwt) -} - -func (c *Client) VerifyJWT(jwt jose.JWT) error { - var keysFunc func() []key.PublicKey - if kID, ok := jwt.KeyID(); ok { - keysFunc = c.keysFuncWithID(kID) - } else { - keysFunc = c.keysFuncAll() - } - - v := NewJWTVerifier( - c.providerConfig.Get().Issuer.String(), - c.credentials.ID, - c.maybeSyncKeys, keysFunc) - - return v.Verify(jwt) -} - -// keysFuncWithID returns a function that retrieves at most unexpired -// public key from the Client that matches the provided ID -func (c *Client) keysFuncWithID(kID string) func() []key.PublicKey { - return func() []key.PublicKey { - c.keySetSyncMutex.RLock() - defer c.keySetSyncMutex.RUnlock() - - if c.keySet.ExpiresAt().Before(time.Now()) { - return []key.PublicKey{} - } - - k := c.keySet.Key(kID) - if k == nil { - return []key.PublicKey{} - } - - return []key.PublicKey{*k} - } -} - -// keysFuncAll returns a function that retrieves all unexpired public -// keys from the Client -func (c *Client) keysFuncAll() func() []key.PublicKey { - return func() []key.PublicKey { - c.keySetSyncMutex.RLock() - defer c.keySetSyncMutex.RUnlock() - - if c.keySet.ExpiresAt().Before(time.Now()) { - return []key.PublicKey{} - } - - return c.keySet.Keys() - } -} - -type providerConfigRepo struct { - mu sync.RWMutex - config ProviderConfig // do not access directly, use Get() -} - -func newProviderConfigRepo(pc ProviderConfig) *providerConfigRepo { - return &providerConfigRepo{sync.RWMutex{}, pc} -} - -// returns an error to implement ProviderConfigSetter -func (r *providerConfigRepo) Set(cfg ProviderConfig) error { - r.mu.Lock() - defer r.mu.Unlock() - r.config = cfg - return nil -} - -func (r *providerConfigRepo) Get() ProviderConfig { - r.mu.RLock() - defer r.mu.RUnlock() - return r.config -} diff --git a/vendor/github.com/coreos/go-oidc/oidc/identity.go b/vendor/github.com/coreos/go-oidc/oidc/identity.go deleted file mode 100644 index 9bfa8e343..000000000 --- a/vendor/github.com/coreos/go-oidc/oidc/identity.go +++ /dev/null @@ -1,44 +0,0 @@ -package oidc - -import ( - "errors" - "time" - - "github.com/coreos/go-oidc/jose" -) - -type Identity struct { - ID string - Name string - Email string - ExpiresAt time.Time -} - -func IdentityFromClaims(claims jose.Claims) (*Identity, error) { - if claims == nil { - return nil, errors.New("nil claim set") - } - - var ident Identity - var err error - var ok bool - - if ident.ID, ok, err = claims.StringClaim("sub"); err != nil { - return nil, err - } else if !ok { - return nil, errors.New("missing required claim: sub") - } - - if ident.Email, _, err = claims.StringClaim("email"); err != nil { - return nil, err - } - - exp, ok, err := claims.TimeClaim("exp") - if err != nil { - return nil, err - } else if ok { - ident.ExpiresAt = exp - } - - return &ident, nil -} diff --git a/vendor/github.com/coreos/go-oidc/oidc/interface.go b/vendor/github.com/coreos/go-oidc/oidc/interface.go deleted file mode 100644 index 248cac0b4..000000000 --- a/vendor/github.com/coreos/go-oidc/oidc/interface.go +++ /dev/null @@ -1,3 +0,0 @@ -package oidc - -type LoginFunc func(ident Identity, sessionKey string) (redirectURL string, err error) diff --git a/vendor/github.com/coreos/go-oidc/oidc/key.go b/vendor/github.com/coreos/go-oidc/oidc/key.go deleted file mode 100755 index 82a0f567d..000000000 --- a/vendor/github.com/coreos/go-oidc/oidc/key.go +++ /dev/null @@ -1,67 +0,0 @@ -package oidc - -import ( - "encoding/json" - "errors" - "net/http" - "time" - - phttp "github.com/coreos/go-oidc/http" - "github.com/coreos/go-oidc/jose" - "github.com/coreos/go-oidc/key" -) - -// DefaultPublicKeySetTTL is the default TTL set on the PublicKeySet if no -// Cache-Control header is provided by the JWK Set document endpoint. -const DefaultPublicKeySetTTL = 24 * time.Hour - -// NewRemotePublicKeyRepo is responsible for fetching the JWK Set document. -func NewRemotePublicKeyRepo(hc phttp.Client, ep string) *remotePublicKeyRepo { - return &remotePublicKeyRepo{hc: hc, ep: ep} -} - -type remotePublicKeyRepo struct { - hc phttp.Client - ep string -} - -// Get returns a PublicKeySet fetched from the JWK Set document endpoint. A TTL -// is set on the Key Set to avoid it having to be re-retrieved for every -// encryption event. This TTL is typically controlled by the endpoint returning -// a Cache-Control header, but defaults to 24 hours if no Cache-Control header -// is found. -func (r *remotePublicKeyRepo) Get() (key.KeySet, error) { - req, err := http.NewRequest("GET", r.ep, nil) - if err != nil { - return nil, err - } - - resp, err := r.hc.Do(req) - if err != nil { - return nil, err - } - defer resp.Body.Close() - - var d struct { - Keys []jose.JWK `json:"keys"` - } - if err := json.NewDecoder(resp.Body).Decode(&d); err != nil { - return nil, err - } - - if len(d.Keys) == 0 { - return nil, errors.New("zero keys in response") - } - - ttl, ok, err := phttp.Cacheable(resp.Header) - if err != nil { - return nil, err - } - if !ok { - ttl = DefaultPublicKeySetTTL - } - - exp := time.Now().UTC().Add(ttl) - ks := key.NewPublicKeySet(d.Keys, exp) - return ks, nil -} diff --git a/vendor/github.com/coreos/go-oidc/oidc/provider.go b/vendor/github.com/coreos/go-oidc/oidc/provider.go deleted file mode 100644 index ca2838440..000000000 --- a/vendor/github.com/coreos/go-oidc/oidc/provider.go +++ /dev/null @@ -1,690 +0,0 @@ -package oidc - -import ( - "encoding/json" - "errors" - "fmt" - "log" - "net/http" - "net/url" - "strings" - "sync" - "time" - - "github.com/coreos/pkg/timeutil" - "github.com/jonboulle/clockwork" - - phttp "github.com/coreos/go-oidc/http" - "github.com/coreos/go-oidc/oauth2" -) - -const ( - // Subject Identifier types defined by the OIDC spec. Specifies if the provider - // should provide the same sub claim value to all clients (public) or a unique - // value for each client (pairwise). - // - // See: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes - SubjectTypePublic = "public" - SubjectTypePairwise = "pairwise" -) - -var ( - // Default values for omitted provider config fields. - // - // Use ProviderConfig's Defaults method to fill a provider config with these values. - DefaultGrantTypesSupported = []string{oauth2.GrantTypeAuthCode, oauth2.GrantTypeImplicit} - DefaultResponseModesSupported = []string{"query", "fragment"} - DefaultTokenEndpointAuthMethodsSupported = []string{oauth2.AuthMethodClientSecretBasic} - DefaultClaimTypesSupported = []string{"normal"} -) - -const ( - MaximumProviderConfigSyncInterval = 24 * time.Hour - MinimumProviderConfigSyncInterval = time.Minute - - discoveryConfigPath = "/.well-known/openid-configuration" -) - -// internally configurable for tests -var minimumProviderConfigSyncInterval = MinimumProviderConfigSyncInterval - -var ( - // Ensure ProviderConfig satisfies these interfaces. - _ json.Marshaler = &ProviderConfig{} - _ json.Unmarshaler = &ProviderConfig{} -) - -// ProviderConfig represents the OpenID Provider Metadata specifying what -// configurations a provider supports. -// -// See: http://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata -type ProviderConfig struct { - Issuer *url.URL // Required - AuthEndpoint *url.URL // Required - TokenEndpoint *url.URL // Required if grant types other than "implicit" are supported - UserInfoEndpoint *url.URL - KeysEndpoint *url.URL // Required - RegistrationEndpoint *url.URL - EndSessionEndpoint *url.URL - CheckSessionIFrame *url.URL - - // Servers MAY choose not to advertise some supported scope values even when this - // parameter is used, although those defined in OpenID Core SHOULD be listed, if supported. - ScopesSupported []string - // OAuth2.0 response types supported. - ResponseTypesSupported []string // Required - // OAuth2.0 response modes supported. - // - // If omitted, defaults to DefaultResponseModesSupported. - ResponseModesSupported []string - // OAuth2.0 grant types supported. - // - // If omitted, defaults to DefaultGrantTypesSupported. - GrantTypesSupported []string - ACRValuesSupported []string - // SubjectTypesSupported specifies strategies for providing values for the sub claim. - SubjectTypesSupported []string // Required - - // JWA signing and encryption algorith values supported for ID tokens. - IDTokenSigningAlgValues []string // Required - IDTokenEncryptionAlgValues []string - IDTokenEncryptionEncValues []string - - // JWA signing and encryption algorith values supported for user info responses. - UserInfoSigningAlgValues []string - UserInfoEncryptionAlgValues []string - UserInfoEncryptionEncValues []string - - // JWA signing and encryption algorith values supported for request objects. - ReqObjSigningAlgValues []string - ReqObjEncryptionAlgValues []string - ReqObjEncryptionEncValues []string - - TokenEndpointAuthMethodsSupported []string - TokenEndpointAuthSigningAlgValuesSupported []string - DisplayValuesSupported []string - ClaimTypesSupported []string - ClaimsSupported []string - ServiceDocs *url.URL - ClaimsLocalsSupported []string - UILocalsSupported []string - ClaimsParameterSupported bool - RequestParameterSupported bool - RequestURIParamaterSupported bool - RequireRequestURIRegistration bool - - Policy *url.URL - TermsOfService *url.URL - - // Not part of the OpenID Provider Metadata - ExpiresAt time.Time -} - -// Defaults returns a shallow copy of ProviderConfig with default -// values replacing omitted fields. -// -// var cfg oidc.ProviderConfig -// // Fill provider config with default values for omitted fields. -// cfg = cfg.Defaults() -// -func (p ProviderConfig) Defaults() ProviderConfig { - setDefault := func(val *[]string, defaultVal []string) { - if len(*val) == 0 { - *val = defaultVal - } - } - setDefault(&p.GrantTypesSupported, DefaultGrantTypesSupported) - setDefault(&p.ResponseModesSupported, DefaultResponseModesSupported) - setDefault(&p.TokenEndpointAuthMethodsSupported, DefaultTokenEndpointAuthMethodsSupported) - setDefault(&p.ClaimTypesSupported, DefaultClaimTypesSupported) - return p -} - -func (p *ProviderConfig) MarshalJSON() ([]byte, error) { - e := p.toEncodableStruct() - return json.Marshal(&e) -} - -func (p *ProviderConfig) UnmarshalJSON(data []byte) error { - var e encodableProviderConfig - if err := json.Unmarshal(data, &e); err != nil { - return err - } - conf, err := e.toStruct() - if err != nil { - return err - } - if err := conf.Valid(); err != nil { - return err - } - *p = conf - return nil -} - -type encodableProviderConfig struct { - Issuer string `json:"issuer"` - AuthEndpoint string `json:"authorization_endpoint"` - TokenEndpoint string `json:"token_endpoint"` - UserInfoEndpoint string `json:"userinfo_endpoint,omitempty"` - KeysEndpoint string `json:"jwks_uri"` - RegistrationEndpoint string `json:"registration_endpoint,omitempty"` - EndSessionEndpoint string `json:"end_session_endpoint,omitempty"` - CheckSessionIFrame string `json:"check_session_iframe,omitempty"` - - // Use 'omitempty' for all slices as per OIDC spec: - // "Claims that return multiple values are represented as JSON arrays. - // Claims with zero elements MUST be omitted from the response." - // http://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse - - ScopesSupported []string `json:"scopes_supported,omitempty"` - ResponseTypesSupported []string `json:"response_types_supported,omitempty"` - ResponseModesSupported []string `json:"response_modes_supported,omitempty"` - GrantTypesSupported []string `json:"grant_types_supported,omitempty"` - ACRValuesSupported []string `json:"acr_values_supported,omitempty"` - SubjectTypesSupported []string `json:"subject_types_supported,omitempty"` - - IDTokenSigningAlgValues []string `json:"id_token_signing_alg_values_supported,omitempty"` - IDTokenEncryptionAlgValues []string `json:"id_token_encryption_alg_values_supported,omitempty"` - IDTokenEncryptionEncValues []string `json:"id_token_encryption_enc_values_supported,omitempty"` - UserInfoSigningAlgValues []string `json:"userinfo_signing_alg_values_supported,omitempty"` - UserInfoEncryptionAlgValues []string `json:"userinfo_encryption_alg_values_supported,omitempty"` - UserInfoEncryptionEncValues []string `json:"userinfo_encryption_enc_values_supported,omitempty"` - ReqObjSigningAlgValues []string `json:"request_object_signing_alg_values_supported,omitempty"` - ReqObjEncryptionAlgValues []string `json:"request_object_encryption_alg_values_supported,omitempty"` - ReqObjEncryptionEncValues []string `json:"request_object_encryption_enc_values_supported,omitempty"` - - TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported,omitempty"` - TokenEndpointAuthSigningAlgValuesSupported []string `json:"token_endpoint_auth_signing_alg_values_supported,omitempty"` - - DisplayValuesSupported []string `json:"display_values_supported,omitempty"` - ClaimTypesSupported []string `json:"claim_types_supported,omitempty"` - ClaimsSupported []string `json:"claims_supported,omitempty"` - ServiceDocs string `json:"service_documentation,omitempty"` - ClaimsLocalsSupported []string `json:"claims_locales_supported,omitempty"` - UILocalsSupported []string `json:"ui_locales_supported,omitempty"` - ClaimsParameterSupported bool `json:"claims_parameter_supported,omitempty"` - RequestParameterSupported bool `json:"request_parameter_supported,omitempty"` - RequestURIParamaterSupported bool `json:"request_uri_parameter_supported,omitempty"` - RequireRequestURIRegistration bool `json:"require_request_uri_registration,omitempty"` - - Policy string `json:"op_policy_uri,omitempty"` - TermsOfService string `json:"op_tos_uri,omitempty"` -} - -func (cfg ProviderConfig) toEncodableStruct() encodableProviderConfig { - return encodableProviderConfig{ - Issuer: uriToString(cfg.Issuer), - AuthEndpoint: uriToString(cfg.AuthEndpoint), - TokenEndpoint: uriToString(cfg.TokenEndpoint), - UserInfoEndpoint: uriToString(cfg.UserInfoEndpoint), - KeysEndpoint: uriToString(cfg.KeysEndpoint), - RegistrationEndpoint: uriToString(cfg.RegistrationEndpoint), - EndSessionEndpoint: uriToString(cfg.EndSessionEndpoint), - CheckSessionIFrame: uriToString(cfg.CheckSessionIFrame), - ScopesSupported: cfg.ScopesSupported, - ResponseTypesSupported: cfg.ResponseTypesSupported, - ResponseModesSupported: cfg.ResponseModesSupported, - GrantTypesSupported: cfg.GrantTypesSupported, - ACRValuesSupported: cfg.ACRValuesSupported, - SubjectTypesSupported: cfg.SubjectTypesSupported, - IDTokenSigningAlgValues: cfg.IDTokenSigningAlgValues, - IDTokenEncryptionAlgValues: cfg.IDTokenEncryptionAlgValues, - IDTokenEncryptionEncValues: cfg.IDTokenEncryptionEncValues, - UserInfoSigningAlgValues: cfg.UserInfoSigningAlgValues, - UserInfoEncryptionAlgValues: cfg.UserInfoEncryptionAlgValues, - UserInfoEncryptionEncValues: cfg.UserInfoEncryptionEncValues, - ReqObjSigningAlgValues: cfg.ReqObjSigningAlgValues, - ReqObjEncryptionAlgValues: cfg.ReqObjEncryptionAlgValues, - ReqObjEncryptionEncValues: cfg.ReqObjEncryptionEncValues, - TokenEndpointAuthMethodsSupported: cfg.TokenEndpointAuthMethodsSupported, - TokenEndpointAuthSigningAlgValuesSupported: cfg.TokenEndpointAuthSigningAlgValuesSupported, - DisplayValuesSupported: cfg.DisplayValuesSupported, - ClaimTypesSupported: cfg.ClaimTypesSupported, - ClaimsSupported: cfg.ClaimsSupported, - ServiceDocs: uriToString(cfg.ServiceDocs), - ClaimsLocalsSupported: cfg.ClaimsLocalsSupported, - UILocalsSupported: cfg.UILocalsSupported, - ClaimsParameterSupported: cfg.ClaimsParameterSupported, - RequestParameterSupported: cfg.RequestParameterSupported, - RequestURIParamaterSupported: cfg.RequestURIParamaterSupported, - RequireRequestURIRegistration: cfg.RequireRequestURIRegistration, - Policy: uriToString(cfg.Policy), - TermsOfService: uriToString(cfg.TermsOfService), - } -} - -func (e encodableProviderConfig) toStruct() (ProviderConfig, error) { - p := stickyErrParser{} - conf := ProviderConfig{ - Issuer: p.parseURI(e.Issuer, "issuer"), - AuthEndpoint: p.parseURI(e.AuthEndpoint, "authorization_endpoint"), - TokenEndpoint: p.parseURI(e.TokenEndpoint, "token_endpoint"), - UserInfoEndpoint: p.parseURI(e.UserInfoEndpoint, "userinfo_endpoint"), - KeysEndpoint: p.parseURI(e.KeysEndpoint, "jwks_uri"), - RegistrationEndpoint: p.parseURI(e.RegistrationEndpoint, "registration_endpoint"), - EndSessionEndpoint: p.parseURI(e.EndSessionEndpoint, "end_session_endpoint"), - CheckSessionIFrame: p.parseURI(e.CheckSessionIFrame, "check_session_iframe"), - ScopesSupported: e.ScopesSupported, - ResponseTypesSupported: e.ResponseTypesSupported, - ResponseModesSupported: e.ResponseModesSupported, - GrantTypesSupported: e.GrantTypesSupported, - ACRValuesSupported: e.ACRValuesSupported, - SubjectTypesSupported: e.SubjectTypesSupported, - IDTokenSigningAlgValues: e.IDTokenSigningAlgValues, - IDTokenEncryptionAlgValues: e.IDTokenEncryptionAlgValues, - IDTokenEncryptionEncValues: e.IDTokenEncryptionEncValues, - UserInfoSigningAlgValues: e.UserInfoSigningAlgValues, - UserInfoEncryptionAlgValues: e.UserInfoEncryptionAlgValues, - UserInfoEncryptionEncValues: e.UserInfoEncryptionEncValues, - ReqObjSigningAlgValues: e.ReqObjSigningAlgValues, - ReqObjEncryptionAlgValues: e.ReqObjEncryptionAlgValues, - ReqObjEncryptionEncValues: e.ReqObjEncryptionEncValues, - TokenEndpointAuthMethodsSupported: e.TokenEndpointAuthMethodsSupported, - TokenEndpointAuthSigningAlgValuesSupported: e.TokenEndpointAuthSigningAlgValuesSupported, - DisplayValuesSupported: e.DisplayValuesSupported, - ClaimTypesSupported: e.ClaimTypesSupported, - ClaimsSupported: e.ClaimsSupported, - ServiceDocs: p.parseURI(e.ServiceDocs, "service_documentation"), - ClaimsLocalsSupported: e.ClaimsLocalsSupported, - UILocalsSupported: e.UILocalsSupported, - ClaimsParameterSupported: e.ClaimsParameterSupported, - RequestParameterSupported: e.RequestParameterSupported, - RequestURIParamaterSupported: e.RequestURIParamaterSupported, - RequireRequestURIRegistration: e.RequireRequestURIRegistration, - Policy: p.parseURI(e.Policy, "op_policy-uri"), - TermsOfService: p.parseURI(e.TermsOfService, "op_tos_uri"), - } - if p.firstErr != nil { - return ProviderConfig{}, p.firstErr - } - return conf, nil -} - -// Empty returns if a ProviderConfig holds no information. -// -// This case generally indicates a ProviderConfigGetter has experienced an error -// and has nothing to report. -func (p ProviderConfig) Empty() bool { - return p.Issuer == nil -} - -func contains(sli []string, ele string) bool { - for _, s := range sli { - if s == ele { - return true - } - } - return false -} - -// Valid determines if a ProviderConfig conforms with the OIDC specification. -// If Valid returns successfully it guarantees required field are non-nil and -// URLs are well formed. -// -// Valid is called by UnmarshalJSON. -// -// NOTE(ericchiang): For development purposes Valid does not mandate 'https' for -// URLs fields where the OIDC spec requires it. This may change in future releases -// of this package. See: https://github.com/coreos/go-oidc/issues/34 -func (p ProviderConfig) Valid() error { - grantTypes := p.GrantTypesSupported - if len(grantTypes) == 0 { - grantTypes = DefaultGrantTypesSupported - } - implicitOnly := true - for _, grantType := range grantTypes { - if grantType != oauth2.GrantTypeImplicit { - implicitOnly = false - break - } - } - - if len(p.SubjectTypesSupported) == 0 { - return errors.New("missing required field subject_types_supported") - } - if len(p.IDTokenSigningAlgValues) == 0 { - return errors.New("missing required field id_token_signing_alg_values_supported") - } - - if len(p.ScopesSupported) != 0 && !contains(p.ScopesSupported, "openid") { - return errors.New("scoped_supported must be unspecified or include 'openid'") - } - - if !contains(p.IDTokenSigningAlgValues, "RS256") { - return errors.New("id_token_signing_alg_values_supported must include 'RS256'") - } - if contains(p.TokenEndpointAuthMethodsSupported, "none") { - return errors.New("token_endpoint_auth_signing_alg_values_supported cannot include 'none'") - } - - uris := []struct { - val *url.URL - name string - required bool - }{ - {p.Issuer, "issuer", true}, - {p.AuthEndpoint, "authorization_endpoint", true}, - {p.TokenEndpoint, "token_endpoint", !implicitOnly}, - {p.UserInfoEndpoint, "userinfo_endpoint", false}, - {p.KeysEndpoint, "jwks_uri", true}, - {p.RegistrationEndpoint, "registration_endpoint", false}, - {p.EndSessionEndpoint, "end_session_endpoint", false}, - {p.CheckSessionIFrame, "check_session_iframe", false}, - {p.ServiceDocs, "service_documentation", false}, - {p.Policy, "op_policy_uri", false}, - {p.TermsOfService, "op_tos_uri", false}, - } - - for _, uri := range uris { - if uri.val == nil { - if !uri.required { - continue - } - return fmt.Errorf("empty value for required uri field %s", uri.name) - } - if uri.val.Host == "" { - return fmt.Errorf("no host for uri field %s", uri.name) - } - if uri.val.Scheme != "http" && uri.val.Scheme != "https" { - return fmt.Errorf("uri field %s schemeis not http or https", uri.name) - } - } - return nil -} - -// Supports determines if provider supports a client given their respective metadata. -func (p ProviderConfig) Supports(c ClientMetadata) error { - if err := p.Valid(); err != nil { - return fmt.Errorf("invalid provider config: %v", err) - } - if err := c.Valid(); err != nil { - return fmt.Errorf("invalid client config: %v", err) - } - - // Fill default values for omitted fields - c = c.Defaults() - p = p.Defaults() - - // Do the supported values list the requested one? - supports := []struct { - supported []string - requested string - name string - }{ - {p.IDTokenSigningAlgValues, c.IDTokenResponseOptions.SigningAlg, "id_token_signed_response_alg"}, - {p.IDTokenEncryptionAlgValues, c.IDTokenResponseOptions.EncryptionAlg, "id_token_encryption_response_alg"}, - {p.IDTokenEncryptionEncValues, c.IDTokenResponseOptions.EncryptionEnc, "id_token_encryption_response_enc"}, - {p.UserInfoSigningAlgValues, c.UserInfoResponseOptions.SigningAlg, "userinfo_signed_response_alg"}, - {p.UserInfoEncryptionAlgValues, c.UserInfoResponseOptions.EncryptionAlg, "userinfo_encryption_response_alg"}, - {p.UserInfoEncryptionEncValues, c.UserInfoResponseOptions.EncryptionEnc, "userinfo_encryption_response_enc"}, - {p.ReqObjSigningAlgValues, c.RequestObjectOptions.SigningAlg, "request_object_signing_alg"}, - {p.ReqObjEncryptionAlgValues, c.RequestObjectOptions.EncryptionAlg, "request_object_encryption_alg"}, - {p.ReqObjEncryptionEncValues, c.RequestObjectOptions.EncryptionEnc, "request_object_encryption_enc"}, - } - for _, field := range supports { - if field.requested == "" { - continue - } - if !contains(field.supported, field.requested) { - return fmt.Errorf("provider does not support requested value for field %s", field.name) - } - } - - stringsEqual := func(s1, s2 string) bool { return s1 == s2 } - - // For lists, are the list of requested values a subset of the supported ones? - supportsAll := []struct { - supported []string - requested []string - name string - // OAuth2.0 response_type can be space separated lists where order doesn't matter. - // For example "id_token token" is the same as "token id_token" - // Support a custom compare method. - comp func(s1, s2 string) bool - }{ - {p.GrantTypesSupported, c.GrantTypes, "grant_types", stringsEqual}, - {p.ResponseTypesSupported, c.ResponseTypes, "response_type", oauth2.ResponseTypesEqual}, - } - for _, field := range supportsAll { - requestLoop: - for _, req := range field.requested { - for _, sup := range field.supported { - if field.comp(req, sup) { - continue requestLoop - } - } - return fmt.Errorf("provider does not support requested value for field %s", field.name) - } - } - - // TODO(ericchiang): Are there more checks we feel comfortable with begin strict about? - - return nil -} - -func (p ProviderConfig) SupportsGrantType(grantType string) bool { - var supported []string - if len(p.GrantTypesSupported) == 0 { - supported = DefaultGrantTypesSupported - } else { - supported = p.GrantTypesSupported - } - - for _, t := range supported { - if t == grantType { - return true - } - } - return false -} - -type ProviderConfigGetter interface { - Get() (ProviderConfig, error) -} - -type ProviderConfigSetter interface { - Set(ProviderConfig) error -} - -type ProviderConfigSyncer struct { - from ProviderConfigGetter - to ProviderConfigSetter - clock clockwork.Clock - - initialSyncDone bool - initialSyncWait sync.WaitGroup -} - -func NewProviderConfigSyncer(from ProviderConfigGetter, to ProviderConfigSetter) *ProviderConfigSyncer { - return &ProviderConfigSyncer{ - from: from, - to: to, - clock: clockwork.NewRealClock(), - } -} - -func (s *ProviderConfigSyncer) Run() chan struct{} { - stop := make(chan struct{}) - - var next pcsStepper - next = &pcsStepNext{aft: time.Duration(0)} - - s.initialSyncWait.Add(1) - go func() { - for { - select { - case <-s.clock.After(next.after()): - next = next.step(s.sync) - case <-stop: - return - } - } - }() - - return stop -} - -func (s *ProviderConfigSyncer) WaitUntilInitialSync() { - s.initialSyncWait.Wait() -} - -func (s *ProviderConfigSyncer) sync() (time.Duration, error) { - cfg, err := s.from.Get() - if err != nil { - return 0, err - } - - if err = s.to.Set(cfg); err != nil { - return 0, fmt.Errorf("error setting provider config: %v", err) - } - - if !s.initialSyncDone { - s.initialSyncWait.Done() - s.initialSyncDone = true - } - - return nextSyncAfter(cfg.ExpiresAt, s.clock), nil -} - -type pcsStepFunc func() (time.Duration, error) - -type pcsStepper interface { - after() time.Duration - step(pcsStepFunc) pcsStepper -} - -type pcsStepNext struct { - aft time.Duration -} - -func (n *pcsStepNext) after() time.Duration { - return n.aft -} - -func (n *pcsStepNext) step(fn pcsStepFunc) (next pcsStepper) { - ttl, err := fn() - if err == nil { - next = &pcsStepNext{aft: ttl} - } else { - next = &pcsStepRetry{aft: time.Second} - log.Printf("go-oidc: provider config sync falied, retyring in %v: %v", next.after(), err) - } - return -} - -type pcsStepRetry struct { - aft time.Duration -} - -func (r *pcsStepRetry) after() time.Duration { - return r.aft -} - -func (r *pcsStepRetry) step(fn pcsStepFunc) (next pcsStepper) { - ttl, err := fn() - if err == nil { - next = &pcsStepNext{aft: ttl} - } else { - next = &pcsStepRetry{aft: timeutil.ExpBackoff(r.aft, time.Minute)} - log.Printf("go-oidc: provider config sync falied, retyring in %v: %v", next.after(), err) - } - return -} - -func nextSyncAfter(exp time.Time, clock clockwork.Clock) time.Duration { - if exp.IsZero() { - return MaximumProviderConfigSyncInterval - } - - t := exp.Sub(clock.Now()) / 2 - if t > MaximumProviderConfigSyncInterval { - t = MaximumProviderConfigSyncInterval - } else if t < minimumProviderConfigSyncInterval { - t = minimumProviderConfigSyncInterval - } - - return t -} - -type httpProviderConfigGetter struct { - hc phttp.Client - issuerURL string - clock clockwork.Clock -} - -func NewHTTPProviderConfigGetter(hc phttp.Client, issuerURL string) *httpProviderConfigGetter { - return &httpProviderConfigGetter{ - hc: hc, - issuerURL: issuerURL, - clock: clockwork.NewRealClock(), - } -} - -func (r *httpProviderConfigGetter) Get() (cfg ProviderConfig, err error) { - // If the Issuer value contains a path component, any terminating / MUST be removed before - // appending /.well-known/openid-configuration. - // https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest - discoveryURL := strings.TrimSuffix(r.issuerURL, "/") + discoveryConfigPath - req, err := http.NewRequest("GET", discoveryURL, nil) - if err != nil { - return - } - - resp, err := r.hc.Do(req) - if err != nil { - return - } - defer resp.Body.Close() - - if err = json.NewDecoder(resp.Body).Decode(&cfg); err != nil { - return - } - - var ttl time.Duration - var ok bool - ttl, ok, err = phttp.Cacheable(resp.Header) - if err != nil { - return - } else if ok { - cfg.ExpiresAt = r.clock.Now().UTC().Add(ttl) - } - - // The issuer value returned MUST be identical to the Issuer URL that was directly used to retrieve the configuration information. - // http://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationValidation - if !urlEqual(cfg.Issuer.String(), r.issuerURL) { - err = fmt.Errorf(`"issuer" in config (%v) does not match provided issuer URL (%v)`, cfg.Issuer, r.issuerURL) - return - } - - return -} - -func FetchProviderConfig(hc phttp.Client, issuerURL string) (ProviderConfig, error) { - if hc == nil { - hc = http.DefaultClient - } - - g := NewHTTPProviderConfigGetter(hc, issuerURL) - return g.Get() -} - -func WaitForProviderConfig(hc phttp.Client, issuerURL string) (pcfg ProviderConfig) { - return waitForProviderConfig(hc, issuerURL, clockwork.NewRealClock()) -} - -func waitForProviderConfig(hc phttp.Client, issuerURL string, clock clockwork.Clock) (pcfg ProviderConfig) { - var sleep time.Duration - var err error - for { - pcfg, err = FetchProviderConfig(hc, issuerURL) - if err == nil { - break - } - - sleep = timeutil.ExpBackoff(sleep, time.Minute) - fmt.Printf("Failed fetching provider config, trying again in %v: %v\n", sleep, err) - time.Sleep(sleep) - } - - return -} diff --git a/vendor/github.com/coreos/go-oidc/oidc/transport.go b/vendor/github.com/coreos/go-oidc/oidc/transport.go deleted file mode 100644 index 61c926d7f..000000000 --- a/vendor/github.com/coreos/go-oidc/oidc/transport.go +++ /dev/null @@ -1,88 +0,0 @@ -package oidc - -import ( - "fmt" - "net/http" - "sync" - - phttp "github.com/coreos/go-oidc/http" - "github.com/coreos/go-oidc/jose" -) - -type TokenRefresher interface { - // Verify checks if the provided token is currently valid or not. - Verify(jose.JWT) error - - // Refresh attempts to authenticate and retrieve a new token. - Refresh() (jose.JWT, error) -} - -type ClientCredsTokenRefresher struct { - Issuer string - OIDCClient *Client -} - -func (c *ClientCredsTokenRefresher) Verify(jwt jose.JWT) (err error) { - _, err = VerifyClientClaims(jwt, c.Issuer) - return -} - -func (c *ClientCredsTokenRefresher) Refresh() (jwt jose.JWT, err error) { - if err = c.OIDCClient.Healthy(); err != nil { - err = fmt.Errorf("unable to authenticate, unhealthy OIDC client: %v", err) - return - } - - jwt, err = c.OIDCClient.ClientCredsToken([]string{"openid"}) - if err != nil { - err = fmt.Errorf("unable to verify auth code with issuer: %v", err) - return - } - - return -} - -type AuthenticatedTransport struct { - TokenRefresher - http.RoundTripper - - mu sync.Mutex - jwt jose.JWT -} - -func (t *AuthenticatedTransport) verifiedJWT() (jose.JWT, error) { - t.mu.Lock() - defer t.mu.Unlock() - - if t.TokenRefresher.Verify(t.jwt) == nil { - return t.jwt, nil - } - - jwt, err := t.TokenRefresher.Refresh() - if err != nil { - return jose.JWT{}, fmt.Errorf("unable to acquire valid JWT: %v", err) - } - - t.jwt = jwt - return t.jwt, nil -} - -// SetJWT sets the JWT held by the Transport. -// This is useful for cases in which you want to set an initial JWT. -func (t *AuthenticatedTransport) SetJWT(jwt jose.JWT) { - t.mu.Lock() - defer t.mu.Unlock() - - t.jwt = jwt -} - -func (t *AuthenticatedTransport) RoundTrip(r *http.Request) (*http.Response, error) { - jwt, err := t.verifiedJWT() - if err != nil { - return nil, err - } - - req := phttp.CopyRequest(r) - req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", jwt.Encode())) - return t.RoundTripper.RoundTrip(req) -} diff --git a/vendor/github.com/coreos/go-oidc/oidc/util.go b/vendor/github.com/coreos/go-oidc/oidc/util.go deleted file mode 100644 index f2a5a195e..000000000 --- a/vendor/github.com/coreos/go-oidc/oidc/util.go +++ /dev/null @@ -1,109 +0,0 @@ -package oidc - -import ( - "crypto/rand" - "encoding/base64" - "errors" - "fmt" - "net" - "net/http" - "net/url" - "strings" - "time" - - "github.com/coreos/go-oidc/jose" -) - -// RequestTokenExtractor funcs extract a raw encoded token from a request. -type RequestTokenExtractor func(r *http.Request) (string, error) - -// ExtractBearerToken is a RequestTokenExtractor which extracts a bearer token from a request's -// Authorization header. -func ExtractBearerToken(r *http.Request) (string, error) { - ah := r.Header.Get("Authorization") - if ah == "" { - return "", errors.New("missing Authorization header") - } - - if len(ah) <= 6 || strings.ToUpper(ah[0:6]) != "BEARER" { - return "", errors.New("should be a bearer token") - } - - val := ah[7:] - if len(val) == 0 { - return "", errors.New("bearer token is empty") - } - - return val, nil -} - -// CookieTokenExtractor returns a RequestTokenExtractor which extracts a token from the named cookie in a request. -func CookieTokenExtractor(cookieName string) RequestTokenExtractor { - return func(r *http.Request) (string, error) { - ck, err := r.Cookie(cookieName) - if err != nil { - return "", fmt.Errorf("token cookie not found in request: %v", err) - } - - if ck.Value == "" { - return "", errors.New("token cookie found but is empty") - } - - return ck.Value, nil - } -} - -func NewClaims(iss, sub string, aud interface{}, iat, exp time.Time) jose.Claims { - return jose.Claims{ - // required - "iss": iss, - "sub": sub, - "aud": aud, - "iat": iat.Unix(), - "exp": exp.Unix(), - } -} - -func GenClientID(hostport string) (string, error) { - b, err := randBytes(32) - if err != nil { - return "", err - } - - var host string - if strings.Contains(hostport, ":") { - host, _, err = net.SplitHostPort(hostport) - if err != nil { - return "", err - } - } else { - host = hostport - } - - return fmt.Sprintf("%s@%s", base64.URLEncoding.EncodeToString(b), host), nil -} - -func randBytes(n int) ([]byte, error) { - b := make([]byte, n) - got, err := rand.Read(b) - if err != nil { - return nil, err - } else if n != got { - return nil, errors.New("unable to generate enough random data") - } - return b, nil -} - -// urlEqual checks two urls for equality using only the host and path portions. -func urlEqual(url1, url2 string) bool { - u1, err := url.Parse(url1) - if err != nil { - return false - } - u2, err := url.Parse(url2) - if err != nil { - return false - } - - return strings.ToLower(u1.Host+u1.Path) == strings.ToLower(u2.Host+u2.Path) -} diff --git a/vendor/github.com/coreos/go-oidc/oidc/verification.go b/vendor/github.com/coreos/go-oidc/oidc/verification.go deleted file mode 100644 index d9c6afa69..000000000 --- a/vendor/github.com/coreos/go-oidc/oidc/verification.go +++ /dev/null @@ -1,190 +0,0 @@ -package oidc - -import ( - "errors" - "fmt" - "time" - - "github.com/jonboulle/clockwork" - - "github.com/coreos/go-oidc/jose" - "github.com/coreos/go-oidc/key" -) - -func VerifySignature(jwt jose.JWT, keys []key.PublicKey) (bool, error) { - jwtBytes := []byte(jwt.Data()) - for _, k := range keys { - v, err := k.Verifier() - if err != nil { - return false, err - } - if v.Verify(jwt.Signature, jwtBytes) == nil { - return true, nil - } - } - return false, nil -} - -// containsString returns true if the given string(needle) is found -// in the string array(haystack). -func containsString(needle string, haystack []string) bool { - for _, v := range haystack { - if v == needle { - return true - } - } - return false -} - -// Verify claims in accordance with OIDC spec -// http://openid.net/specs/openid-connect-basic-1_0.html#IDTokenValidation -func VerifyClaims(jwt jose.JWT, issuer, clientID string) error { - now := time.Now().UTC() - - claims, err := jwt.Claims() - if err != nil { - return err - } - - ident, err := IdentityFromClaims(claims) - if err != nil { - return err - } - - if ident.ExpiresAt.Before(now) { - return errors.New("token is expired") - } - - // iss REQUIRED. Issuer Identifier for the Issuer of the response. - // The iss value is a case sensitive URL using the https scheme that contains scheme, - // host, and optionally, port number and path components and no query or fragment components. - if iss, exists := claims["iss"].(string); exists { - if !urlEqual(iss, issuer) { - return fmt.Errorf("invalid claim value: 'iss'. expected=%s, found=%s.", issuer, iss) - } - } else { - return errors.New("missing claim: 'iss'") - } - - // iat REQUIRED. Time at which the JWT was issued. - // Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z - // as measured in UTC until the date/time. - if _, exists := claims["iat"].(float64); !exists { - return errors.New("missing claim: 'iat'") - } - - // aud REQUIRED. Audience(s) that this ID Token is intended for. - // It MUST contain the OAuth 2.0 client_id of the Relying Party as an audience value. - // It MAY also contain identifiers for other audiences. In the general case, the aud - // value is an array of case sensitive strings. In the common special case when there - // is one audience, the aud value MAY be a single case sensitive string. - if aud, ok, err := claims.StringClaim("aud"); err == nil && ok { - if aud != clientID { - return fmt.Errorf("invalid claims, 'aud' claim and 'client_id' do not match, aud=%s, client_id=%s", aud, clientID) - } - } else if aud, ok, err := claims.StringsClaim("aud"); err == nil && ok { - if !containsString(clientID, aud) { - return fmt.Errorf("invalid claims, cannot find 'client_id' in 'aud' claim, aud=%v, client_id=%s", aud, clientID) - } - } else { - return errors.New("invalid claim value: 'aud' is required, and should be either string or string array") - } - - return nil -} - -// VerifyClientClaims verifies all the required claims are valid for a "client credentials" JWT. -// Returns the client ID if valid, or an error if invalid. -func VerifyClientClaims(jwt jose.JWT, issuer string) (string, error) { - claims, err := jwt.Claims() - if err != nil { - return "", fmt.Errorf("failed to parse JWT claims: %v", err) - } - - iss, ok, err := claims.StringClaim("iss") - if err != nil { - return "", fmt.Errorf("failed to parse 'iss' claim: %v", err) - } else if !ok { - return "", errors.New("missing required 'iss' claim") - } else if !urlEqual(iss, issuer) { - return "", fmt.Errorf("'iss' claim does not match expected issuer, iss=%s", iss) - } - - sub, ok, err := claims.StringClaim("sub") - if err != nil { - return "", fmt.Errorf("failed to parse 'sub' claim: %v", err) - } else if !ok { - return "", errors.New("missing required 'sub' claim") - } - - if aud, ok, err := claims.StringClaim("aud"); err == nil && ok { - if aud != sub { - return "", fmt.Errorf("invalid claims, 'aud' claim and 'sub' claim do not match, aud=%s, sub=%s", aud, sub) - } - } else if aud, ok, err := claims.StringsClaim("aud"); err == nil && ok { - if !containsString(sub, aud) { - return "", fmt.Errorf("invalid claims, cannot find 'sud' in 'aud' claim, aud=%v, sub=%s", aud, sub) - } - } else { - return "", errors.New("invalid claim value: 'aud' is required, and should be either string or string array") - } - - now := time.Now().UTC() - exp, ok, err := claims.TimeClaim("exp") - if err != nil { - return "", fmt.Errorf("failed to parse 'exp' claim: %v", err) - } else if !ok { - return "", errors.New("missing required 'exp' claim") - } else if exp.Before(now) { - return "", fmt.Errorf("token already expired at: %v", exp) - } - - return sub, nil -} - -type JWTVerifier struct { - issuer string - clientID string - syncFunc func() error - keysFunc func() []key.PublicKey - clock clockwork.Clock -} - -func NewJWTVerifier(issuer, clientID string, syncFunc func() error, keysFunc func() []key.PublicKey) JWTVerifier { - return JWTVerifier{ - issuer: issuer, - clientID: clientID, - syncFunc: syncFunc, - keysFunc: keysFunc, - clock: clockwork.NewRealClock(), - } -} - -func (v *JWTVerifier) Verify(jwt jose.JWT) error { - // Verify claims before verifying the signature. This is an optimization to throw out - // tokens we know are invalid without undergoing an expensive signature check and - // possibly a re-sync event. - if err := VerifyClaims(jwt, v.issuer, v.clientID); err != nil { - return fmt.Errorf("oidc: JWT claims invalid: %v", err) - } - - ok, err := VerifySignature(jwt, v.keysFunc()) - if err != nil { - return fmt.Errorf("oidc: JWT signature verification failed: %v", err) - } else if ok { - return nil - } - - if err = v.syncFunc(); err != nil { - return fmt.Errorf("oidc: failed syncing KeySet: %v", err) - } - - ok, err = VerifySignature(jwt, v.keysFunc()) - if err != nil { - return fmt.Errorf("oidc: JWT signature verification failed: %v", err) - } else if !ok { - return errors.New("oidc: unable to verify JWT signature: no matching keys") - } - - return nil -} diff --git a/vendor/github.com/coreos/pkg/LICENSE b/vendor/github.com/coreos/pkg/LICENSE deleted file mode 100644 index e06d20818..000000000 --- a/vendor/github.com/coreos/pkg/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/vendor/github.com/coreos/pkg/NOTICE b/vendor/github.com/coreos/pkg/NOTICE deleted file mode 100644 index b39ddfa5c..000000000 --- a/vendor/github.com/coreos/pkg/NOTICE +++ /dev/null @@ -1,5 +0,0 @@ -CoreOS Project -Copyright 2014 CoreOS, Inc - -This product includes software developed at CoreOS, Inc. -(http://www.coreos.com/). diff --git a/vendor/github.com/coreos/pkg/health/health.go b/vendor/github.com/coreos/pkg/health/health.go deleted file mode 100644 index a1c3610fa..000000000 --- a/vendor/github.com/coreos/pkg/health/health.go +++ /dev/null @@ -1,127 +0,0 @@ -package health - -import ( - "expvar" - "fmt" - "log" - "net/http" - - "github.com/coreos/pkg/httputil" -) - -// Checkables should return nil when the thing they are checking is healthy, and an error otherwise. -type Checkable interface { - Healthy() error -} - -// Checker provides a way to make an endpoint which can be probed for system health. -type Checker struct { - // Checks are the Checkables to be checked when probing. - Checks []Checkable - - // Unhealthyhandler is called when one or more of the checks are unhealthy. - // If not provided DefaultUnhealthyHandler is called. - UnhealthyHandler UnhealthyHandler - - // HealthyHandler is called when all checks are healthy. - // If not provided, DefaultHealthyHandler is called. - HealthyHandler http.HandlerFunc -} - -func (c Checker) ServeHTTP(w http.ResponseWriter, r *http.Request) { - unhealthyHandler := c.UnhealthyHandler - if unhealthyHandler == nil { - unhealthyHandler = DefaultUnhealthyHandler - } - - successHandler := c.HealthyHandler - if successHandler == nil { - successHandler = DefaultHealthyHandler - } - - if r.Method != "GET" { - w.Header().Set("Allow", "GET") - w.WriteHeader(http.StatusMethodNotAllowed) - return - } - - if err := Check(c.Checks); err != nil { - unhealthyHandler(w, r, err) - return - } - - successHandler(w, r) -} - -type UnhealthyHandler func(w http.ResponseWriter, r *http.Request, err error) - -type StatusResponse struct { - Status string `json:"status"` - Details *StatusResponseDetails `json:"details,omitempty"` -} - -type StatusResponseDetails struct { - Code int `json:"code,omitempty"` - Message string `json:"message,omitempty"` -} - -func Check(checks []Checkable) (err error) { - errs := []error{} - for _, c := range checks { - if e := c.Healthy(); e != nil { - errs = append(errs, e) - } - } - - switch len(errs) { - case 0: - err = nil - case 1: - err = errs[0] - default: - err = fmt.Errorf("multiple health check failure: %v", errs) - } - - return -} - -func DefaultHealthyHandler(w http.ResponseWriter, r *http.Request) { - err := httputil.WriteJSONResponse(w, http.StatusOK, StatusResponse{ - Status: "ok", - }) - if err != nil { - // TODO(bobbyrullo): replace with logging from new logging pkg, - // once it lands. - log.Printf("Failed to write JSON response: %v", err) - } -} - -func DefaultUnhealthyHandler(w http.ResponseWriter, r *http.Request, err error) { - writeErr := httputil.WriteJSONResponse(w, http.StatusInternalServerError, StatusResponse{ - Status: "error", - Details: &StatusResponseDetails{ - Code: http.StatusInternalServerError, - Message: err.Error(), - }, - }) - if writeErr != nil { - // TODO(bobbyrullo): replace with logging from new logging pkg, - // once it lands. - log.Printf("Failed to write JSON response: %v", err) - } -} - -// ExpvarHandler is copied from https://golang.org/src/expvar/expvar.go, where it's sadly unexported. -func ExpvarHandler(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/json; charset=utf-8") - fmt.Fprintf(w, "{\n") - first := true - expvar.Do(func(kv expvar.KeyValue) { - if !first { - fmt.Fprintf(w, ",\n") - } - first = false - fmt.Fprintf(w, "%q: %s", kv.Key, kv.Value) - }) - fmt.Fprintf(w, "\n}\n") -} diff --git a/vendor/github.com/coreos/pkg/httputil/cookie.go b/vendor/github.com/coreos/pkg/httputil/cookie.go deleted file mode 100644 index c37a37bb2..000000000 --- a/vendor/github.com/coreos/pkg/httputil/cookie.go +++ /dev/null @@ -1,21 +0,0 @@ -package httputil - -import ( - "net/http" - "time" -) - -// DeleteCookies effectively deletes all named cookies -// by wiping all data and setting to expire immediately. -func DeleteCookies(w http.ResponseWriter, cookieNames ...string) { - for _, n := range cookieNames { - c := &http.Cookie{ - Name: n, - Value: "", - Path: "/", - MaxAge: -1, - Expires: time.Time{}, - } - http.SetCookie(w, c) - } -} diff --git a/vendor/github.com/coreos/pkg/httputil/json.go b/vendor/github.com/coreos/pkg/httputil/json.go deleted file mode 100644 index 0b0923503..000000000 --- a/vendor/github.com/coreos/pkg/httputil/json.go +++ /dev/null @@ -1,27 +0,0 @@ -package httputil - -import ( - "encoding/json" - "net/http" -) - -const ( - JSONContentType = "application/json" -) - -func WriteJSONResponse(w http.ResponseWriter, code int, resp interface{}) error { - enc, err := json.Marshal(resp) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - return err - } - - w.Header().Set("Content-Type", JSONContentType) - w.WriteHeader(code) - - _, err = w.Write(enc) - if err != nil { - return err - } - return nil -} diff --git a/vendor/github.com/coreos/pkg/timeutil/backoff.go b/vendor/github.com/coreos/pkg/timeutil/backoff.go deleted file mode 100644 index b34fb4966..000000000 --- a/vendor/github.com/coreos/pkg/timeutil/backoff.go +++ /dev/null @@ -1,15 +0,0 @@ -package timeutil - -import ( - "time" -) - -func ExpBackoff(prev, max time.Duration) time.Duration { - if prev == 0 { - return time.Second - } - if prev > max/2 { - return max - } - return 2 * prev -} diff --git a/vendor/github.com/gogo/protobuf/proto/Makefile b/vendor/github.com/gogo/protobuf/proto/Makefile index 23a6b1734..41c717573 100644 --- a/vendor/github.com/gogo/protobuf/proto/Makefile +++ b/vendor/github.com/gogo/protobuf/proto/Makefile @@ -39,5 +39,5 @@ test: install generate-test-pbs generate-test-pbs: make install make -C testdata - protoc-min-version --version="3.0.0" --proto_path=.:../../../../ --gogo_out=. proto3_proto/proto3.proto + protoc-min-version --version="3.0.0" --proto_path=.:../../../../:../protobuf --gogo_out=Mtestdata/test.proto=github.com/gogo/protobuf/proto/testdata,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:. proto3_proto/proto3.proto make diff --git a/vendor/github.com/gogo/protobuf/proto/clone.go b/vendor/github.com/gogo/protobuf/proto/clone.go index 79edb8611..5d4cba4b5 100644 --- a/vendor/github.com/gogo/protobuf/proto/clone.go +++ b/vendor/github.com/gogo/protobuf/proto/clone.go @@ -84,14 +84,20 @@ func mergeStruct(out, in reflect.Value) { mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i]) } - if emIn, ok := in.Addr().Interface().(extensionsMap); ok { - emOut := out.Addr().Interface().(extensionsMap) - mergeExtension(emOut.ExtensionMap(), emIn.ExtensionMap()) - } else if emIn, ok := in.Addr().Interface().(extensionsBytes); ok { + if emIn, ok := in.Addr().Interface().(extensionsBytes); ok { emOut := out.Addr().Interface().(extensionsBytes) bIn := emIn.GetExtensions() bOut := emOut.GetExtensions() *bOut = append(*bOut, *bIn...) + } else if emIn, ok := extendable(in.Addr().Interface()); ok { + emOut, _ := extendable(out.Addr().Interface()) + mIn, muIn := emIn.extensionsRead() + if mIn != nil { + mOut := emOut.extensionsWrite() + muIn.Lock() + mergeExtension(mOut, mIn) + muIn.Unlock() + } } uf := in.FieldByName("XXX_unrecognized") diff --git a/vendor/github.com/gogo/protobuf/proto/decode.go b/vendor/github.com/gogo/protobuf/proto/decode.go index 7b06266d1..737f2731d 100644 --- a/vendor/github.com/gogo/protobuf/proto/decode.go +++ b/vendor/github.com/gogo/protobuf/proto/decode.go @@ -61,7 +61,6 @@ var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for // int32, int64, uint32, uint64, bool, and enum // protocol buffer types. func DecodeVarint(buf []byte) (x uint64, n int) { - // x, n already 0 for shift := uint(0); shift < 64; shift += 7 { if n >= len(buf) { return 0, 0 @@ -78,13 +77,7 @@ func DecodeVarint(buf []byte) (x uint64, n int) { return 0, 0 } -// DecodeVarint reads a varint-encoded integer from the Buffer. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -func (p *Buffer) DecodeVarint() (x uint64, err error) { - // x, err already 0 - +func (p *Buffer) decodeVarintSlow() (x uint64, err error) { i := p.index l := len(p.buf) @@ -107,6 +100,107 @@ func (p *Buffer) DecodeVarint() (x uint64, err error) { return } +// DecodeVarint reads a varint-encoded integer from the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) DecodeVarint() (x uint64, err error) { + i := p.index + buf := p.buf + + if i >= len(buf) { + return 0, io.ErrUnexpectedEOF + } else if buf[i] < 0x80 { + p.index++ + return uint64(buf[i]), nil + } else if len(buf)-i < 10 { + return p.decodeVarintSlow() + } + + var b uint64 + // we already checked the first byte + x = uint64(buf[i]) - 0x80 + i++ + + b = uint64(buf[i]) + i++ + x += b << 7 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 7 + + b = uint64(buf[i]) + i++ + x += b << 14 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 14 + + b = uint64(buf[i]) + i++ + x += b << 21 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 21 + + b = uint64(buf[i]) + i++ + x += b << 28 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 28 + + b = uint64(buf[i]) + i++ + x += b << 35 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 35 + + b = uint64(buf[i]) + i++ + x += b << 42 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 42 + + b = uint64(buf[i]) + i++ + x += b << 49 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 49 + + b = uint64(buf[i]) + i++ + x += b << 56 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 56 + + b = uint64(buf[i]) + i++ + x += b << 63 + if b&0x80 == 0 { + goto done + } + // x -= 0x80 << 63 // Always zero. + + return 0, errOverflow + +done: + p.index = i + return x, nil +} + // DecodeFixed64 reads a 64-bit integer from the Buffer. // This is the format for the // fixed64, sfixed64, and double protocol buffer types. @@ -340,6 +434,8 @@ func (p *Buffer) DecodeGroup(pb Message) error { // Buffer and places the decoded result in pb. If the struct // underlying pb does not match the data in the buffer, the results can be // unpredictable. +// +// Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal. func (p *Buffer) Unmarshal(pb Message) error { // If the object can unmarshal itself, let it. if u, ok := pb.(Unmarshaler); ok { @@ -378,6 +474,11 @@ func (o *Buffer) unmarshalType(st reflect.Type, prop *StructProperties, is_group wire := int(u & 0x7) if wire == WireEndGroup { if is_group { + if required > 0 { + // Not enough information to determine the exact field. + // (See below.) + return &RequiredNotSetError{"{Unknown}"} + } return nil // input is satisfied } return fmt.Errorf("proto: %s: wiretype end group for non-group", st) @@ -390,16 +491,20 @@ func (o *Buffer) unmarshalType(st reflect.Type, prop *StructProperties, is_group if !ok { // Maybe it's an extension? if prop.extendable { - if e := structPointer_Interface(base, st).(extendableProto); isExtensionField(e, int32(tag)) { - if err = o.skip(st, tag, wire); err == nil { - if ee, eok := e.(extensionsMap); eok { - ext := ee.ExtensionMap()[int32(tag)] // may be missing - ext.enc = append(ext.enc, o.buf[oi:o.index]...) - ee.ExtensionMap()[int32(tag)] = ext - } else if ee, eok := e.(extensionsBytes); eok { - ext := ee.GetExtensions() + if e, eok := structPointer_Interface(base, st).(extensionsBytes); eok { + if isExtensionField(e, int32(tag)) { + if err = o.skip(st, tag, wire); err == nil { + ext := e.GetExtensions() *ext = append(*ext, o.buf[oi:o.index]...) } + continue + } + } else if e, _ := extendable(structPointer_Interface(base, st)); isExtensionField(e, int32(tag)) { + if err = o.skip(st, tag, wire); err == nil { + extmap := e.extensionsWrite() + ext := extmap[int32(tag)] // may be missing + ext.enc = append(ext.enc, o.buf[oi:o.index]...) + extmap[int32(tag)] = ext } continue } diff --git a/vendor/github.com/gogo/protobuf/proto/decode_gogo.go b/vendor/github.com/gogo/protobuf/proto/decode_gogo.go index 603dabec3..6fb74de4c 100644 --- a/vendor/github.com/gogo/protobuf/proto/decode_gogo.go +++ b/vendor/github.com/gogo/protobuf/proto/decode_gogo.go @@ -1,5 +1,7 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -96,7 +98,7 @@ func setPtrCustomType(base structPointer, f field, v interface{}) { if v == nil { return } - structPointer_SetStructPointer(base, f, structPointer(reflect.ValueOf(v).Pointer())) + structPointer_SetStructPointer(base, f, toStructPointer(reflect.ValueOf(v))) } func setCustomType(base structPointer, f field, value interface{}) { @@ -163,7 +165,8 @@ func (o *Buffer) dec_custom_slice_bytes(p *Properties, base structPointer) error } newBas := appendStructPointer(base, p.field, p.ctype) - setCustomType(newBas, 0, custom) + var zero field + setCustomType(newBas, zero, custom) return nil } diff --git a/vendor/github.com/gogo/protobuf/proto/duration.go b/vendor/github.com/gogo/protobuf/proto/duration.go new file mode 100644 index 000000000..93464c91c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/duration.go @@ -0,0 +1,100 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +// This file implements conversions between google.protobuf.Duration +// and time.Duration. + +import ( + "errors" + "fmt" + "time" +) + +const ( + // Range of a Duration in seconds, as specified in + // google/protobuf/duration.proto. This is about 10,000 years in seconds. + maxSeconds = int64(10000 * 365.25 * 24 * 60 * 60) + minSeconds = -maxSeconds +) + +// validateDuration determines whether the Duration is valid according to the +// definition in google/protobuf/duration.proto. A valid Duration +// may still be too large to fit into a time.Duration (the range of Duration +// is about 10,000 years, and the range of time.Duration is about 290). +func validateDuration(d *duration) error { + if d == nil { + return errors.New("duration: nil Duration") + } + if d.Seconds < minSeconds || d.Seconds > maxSeconds { + return fmt.Errorf("duration: %#v: seconds out of range", d) + } + if d.Nanos <= -1e9 || d.Nanos >= 1e9 { + return fmt.Errorf("duration: %#v: nanos out of range", d) + } + // Seconds and Nanos must have the same sign, unless d.Nanos is zero. + if (d.Seconds < 0 && d.Nanos > 0) || (d.Seconds > 0 && d.Nanos < 0) { + return fmt.Errorf("duration: %#v: seconds and nanos have different signs", d) + } + return nil +} + +// DurationFromProto converts a Duration to a time.Duration. DurationFromProto +// returns an error if the Duration is invalid or is too large to be +// represented in a time.Duration. +func durationFromProto(p *duration) (time.Duration, error) { + if err := validateDuration(p); err != nil { + return 0, err + } + d := time.Duration(p.Seconds) * time.Second + if int64(d/time.Second) != p.Seconds { + return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) + } + if p.Nanos != 0 { + d += time.Duration(p.Nanos) + if (d < 0) != (p.Nanos < 0) { + return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) + } + } + return d, nil +} + +// DurationProto converts a time.Duration to a Duration. +func durationProto(d time.Duration) *duration { + nanos := d.Nanoseconds() + secs := nanos / 1e9 + nanos -= secs * 1e9 + return &duration{ + Seconds: secs, + Nanos: int32(nanos), + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/duration_gogo.go b/vendor/github.com/gogo/protobuf/proto/duration_gogo.go new file mode 100644 index 000000000..18e2a5f77 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/duration_gogo.go @@ -0,0 +1,203 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "reflect" + "time" +) + +var durationType = reflect.TypeOf((*time.Duration)(nil)).Elem() + +type duration struct { + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` +} + +func (m *duration) Reset() { *m = duration{} } +func (*duration) ProtoMessage() {} +func (*duration) String() string { return "duration" } + +func init() { + RegisterType((*duration)(nil), "gogo.protobuf.proto.duration") +} + +func (o *Buffer) decDuration() (time.Duration, error) { + b, err := o.DecodeRawBytes(true) + if err != nil { + return 0, err + } + dproto := &duration{} + if err := Unmarshal(b, dproto); err != nil { + return 0, err + } + return durationFromProto(dproto) +} + +func (o *Buffer) dec_duration(p *Properties, base structPointer) error { + d, err := o.decDuration() + if err != nil { + return err + } + word64_Set(structPointer_Word64(base, p.field), o, uint64(d)) + return nil +} + +func (o *Buffer) dec_ref_duration(p *Properties, base structPointer) error { + d, err := o.decDuration() + if err != nil { + return err + } + word64Val_Set(structPointer_Word64Val(base, p.field), o, uint64(d)) + return nil +} + +func (o *Buffer) dec_slice_duration(p *Properties, base structPointer) error { + d, err := o.decDuration() + if err != nil { + return err + } + newBas := appendStructPointer(base, p.field, reflect.SliceOf(reflect.PtrTo(durationType))) + var zero field + setPtrCustomType(newBas, zero, &d) + return nil +} + +func (o *Buffer) dec_slice_ref_duration(p *Properties, base structPointer) error { + d, err := o.decDuration() + if err != nil { + return err + } + structPointer_Word64Slice(base, p.field).Append(uint64(d)) + return nil +} + +func size_duration(p *Properties, base structPointer) (n int) { + structp := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(structp) { + return 0 + } + dur := structPointer_Interface(structp, durationType).(*time.Duration) + d := durationProto(*dur) + size := Size(d) + return size + sizeVarint(uint64(size)) + len(p.tagcode) +} + +func (o *Buffer) enc_duration(p *Properties, base structPointer) error { + structp := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(structp) { + return ErrNil + } + dur := structPointer_Interface(structp, durationType).(*time.Duration) + d := durationProto(*dur) + data, err := Marshal(d) + if err != nil { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + return nil +} + +func size_ref_duration(p *Properties, base structPointer) (n int) { + dur := structPointer_InterfaceAt(base, p.field, durationType).(*time.Duration) + d := durationProto(*dur) + size := Size(d) + return size + sizeVarint(uint64(size)) + len(p.tagcode) +} + +func (o *Buffer) enc_ref_duration(p *Properties, base structPointer) error { + dur := structPointer_InterfaceAt(base, p.field, durationType).(*time.Duration) + d := durationProto(*dur) + data, err := Marshal(d) + if err != nil { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + return nil +} + +func size_slice_duration(p *Properties, base structPointer) (n int) { + pdurs := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(reflect.PtrTo(durationType))).(*[]*time.Duration) + durs := *pdurs + for i := 0; i < len(durs); i++ { + if durs[i] == nil { + return 0 + } + dproto := durationProto(*durs[i]) + size := Size(dproto) + n += len(p.tagcode) + size + sizeVarint(uint64(size)) + } + return n +} + +func (o *Buffer) enc_slice_duration(p *Properties, base structPointer) error { + pdurs := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(reflect.PtrTo(durationType))).(*[]*time.Duration) + durs := *pdurs + for i := 0; i < len(durs); i++ { + if durs[i] == nil { + return errRepeatedHasNil + } + dproto := durationProto(*durs[i]) + data, err := Marshal(dproto) + if err != nil { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + } + return nil +} + +func size_slice_ref_duration(p *Properties, base structPointer) (n int) { + pdurs := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(durationType)).(*[]time.Duration) + durs := *pdurs + for i := 0; i < len(durs); i++ { + dproto := durationProto(durs[i]) + size := Size(dproto) + n += len(p.tagcode) + size + sizeVarint(uint64(size)) + } + return n +} + +func (o *Buffer) enc_slice_ref_duration(p *Properties, base structPointer) error { + pdurs := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(durationType)).(*[]time.Duration) + durs := *pdurs + for i := 0; i < len(durs); i++ { + dproto := durationProto(durs[i]) + data, err := Marshal(dproto) + if err != nil { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + } + return nil +} diff --git a/vendor/github.com/gogo/protobuf/proto/encode.go b/vendor/github.com/gogo/protobuf/proto/encode.go index eb7e0474e..2b30f8462 100644 --- a/vendor/github.com/gogo/protobuf/proto/encode.go +++ b/vendor/github.com/gogo/protobuf/proto/encode.go @@ -70,6 +70,10 @@ var ( // ErrNil is the error returned if Marshal is called with nil. ErrNil = errors.New("proto: Marshal called with nil") + + // ErrTooLarge is the error returned if Marshal is called with a + // message that encodes to >2GB. + ErrTooLarge = errors.New("proto: message encodes to over 2 GB") ) // The fundamental encoders that put bytes on the wire. @@ -78,6 +82,10 @@ var ( const maxVarintBytes = 10 // maximum length of a varint +// maxMarshalSize is the largest allowed size of an encoded protobuf, +// since C++ and Java use signed int32s for the size. +const maxMarshalSize = 1<<31 - 1 + // EncodeVarint returns the varint encoding of x. // This is the format for the // int32, int64, uint32, uint64, bool, and enum @@ -226,10 +234,6 @@ func Marshal(pb Message) ([]byte, error) { } p := NewBuffer(nil) err := p.Marshal(pb) - var state errorState - if err != nil && !state.shouldContinue(err, nil) { - return nil, err - } if p.buf == nil && err == nil { // Return a non-nil slice on success. return []byte{}, nil @@ -258,11 +262,8 @@ func (p *Buffer) Marshal(pb Message) error { // Can the object marshal itself? if m, ok := pb.(Marshaler); ok { data, err := m.Marshal() - if err != nil { - return err - } p.buf = append(p.buf, data...) - return nil + return err } t, base, err := getbase(pb) @@ -274,9 +275,12 @@ func (p *Buffer) Marshal(pb Message) error { } if collectStats { - stats.Encode++ + (stats).Encode++ // Parens are to work around a goimports bug. } + if len(p.buf) > maxMarshalSize { + return ErrTooLarge + } return err } @@ -298,7 +302,7 @@ func Size(pb Message) (n int) { } if collectStats { - stats.Size++ + (stats).Size++ // Parens are to work around a goimports bug. } return @@ -1003,7 +1007,6 @@ func size_slice_struct_message(p *Properties, base structPointer) (n int) { if p.isMarshaler { m := structPointer_Interface(structp, p.stype).(Marshaler) data, _ := m.Marshal() - n += len(p.tagcode) n += sizeRawBytes(data) continue } @@ -1062,10 +1065,32 @@ func size_slice_struct_group(p *Properties, base structPointer) (n int) { // Encode an extension map. func (o *Buffer) enc_map(p *Properties, base structPointer) error { - v := *structPointer_ExtMap(base, p.field) - if err := encodeExtensionMap(v); err != nil { + exts := structPointer_ExtMap(base, p.field) + if err := encodeExtensionsMap(*exts); err != nil { return err } + + return o.enc_map_body(*exts) +} + +func (o *Buffer) enc_exts(p *Properties, base structPointer) error { + exts := structPointer_Extensions(base, p.field) + + v, mu := exts.extensionsRead() + if v == nil { + return nil + } + + mu.Lock() + defer mu.Unlock() + if err := encodeExtensionsMap(v); err != nil { + return err + } + + return o.enc_map_body(v) +} + +func (o *Buffer) enc_map_body(v map[int32]Extension) error { // Fast-path for common cases: zero or one extensions. if len(v) <= 1 { for _, e := range v { @@ -1088,8 +1113,13 @@ func (o *Buffer) enc_map(p *Properties, base structPointer) error { } func size_map(p *Properties, base structPointer) int { - v := *structPointer_ExtMap(base, p.field) - return sizeExtensionMap(v) + v := structPointer_ExtMap(base, p.field) + return extensionsMapSize(*v) +} + +func size_exts(p *Properties, base structPointer) int { + v := structPointer_Extensions(base, p.field) + return extensionsSize(v) } // Encode a map field. @@ -1118,7 +1148,7 @@ func (o *Buffer) enc_new_map(p *Properties, base structPointer) error { if err := p.mkeyprop.enc(o, p.mkeyprop, keybase); err != nil { return err } - if err := p.mvalprop.enc(o, p.mvalprop, valbase); err != nil { + if err := p.mvalprop.enc(o, p.mvalprop, valbase); err != nil && err != ErrNil { return err } return nil @@ -1128,11 +1158,6 @@ func (o *Buffer) enc_new_map(p *Properties, base structPointer) error { for _, key := range v.MapKeys() { val := v.MapIndex(key) - // The only illegal map entry values are nil message pointers. - if val.Kind() == reflect.Ptr && val.IsNil() { - return errors.New("proto: map has nil element") - } - keycopy.Set(key) valcopy.Set(val) @@ -1220,6 +1245,9 @@ func (o *Buffer) enc_struct(prop *StructProperties, base structPointer) error { return err } } + if len(o.buf) > maxMarshalSize { + return ErrTooLarge + } } } @@ -1236,6 +1264,9 @@ func (o *Buffer) enc_struct(prop *StructProperties, base structPointer) error { // Add unrecognized fields at the end. if prop.unrecField.IsValid() { v := *structPointer_Bytes(base, prop.unrecField) + if len(o.buf)+len(v) > maxMarshalSize { + return ErrTooLarge + } if len(v) > 0 { o.buf = append(o.buf, v...) } diff --git a/vendor/github.com/gogo/protobuf/proto/encode_gogo.go b/vendor/github.com/gogo/protobuf/proto/encode_gogo.go index f77cfb1ee..32111b7f4 100644 --- a/vendor/github.com/gogo/protobuf/proto/encode_gogo.go +++ b/vendor/github.com/gogo/protobuf/proto/encode_gogo.go @@ -1,7 +1,7 @@ -// Extensions for Protocol Buffers to create more go like structures. +// Protocol Buffers for Go with Gadgets // -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf // // Go support for Protocol Buffers - Google's data interchange format // @@ -196,12 +196,10 @@ func size_ref_struct_message(p *Properties, base structPointer) int { // Encode a slice of references to message struct pointers ([]struct). func (o *Buffer) enc_slice_ref_struct_message(p *Properties, base structPointer) error { var state errorState - ss := structPointer_GetStructPointer(base, p.field) - ss1 := structPointer_GetRefStructPointer(ss, field(0)) - size := p.stype.Size() - l := structPointer_Len(base, p.field) + ss := structPointer_StructRefSlice(base, p.field, p.stype.Size()) + l := ss.Len() for i := 0; i < l; i++ { - structp := structPointer_Add(ss1, field(uintptr(i)*size)) + structp := ss.Index(i) if structPointer_IsNil(structp) { return errRepeatedHasNil } @@ -233,13 +231,11 @@ func (o *Buffer) enc_slice_ref_struct_message(p *Properties, base structPointer) //TODO this is only copied, please fix this func size_slice_ref_struct_message(p *Properties, base structPointer) (n int) { - ss := structPointer_GetStructPointer(base, p.field) - ss1 := structPointer_GetRefStructPointer(ss, field(0)) - size := p.stype.Size() - l := structPointer_Len(base, p.field) + ss := structPointer_StructRefSlice(base, p.field, p.stype.Size()) + l := ss.Len() n += l * len(p.tagcode) for i := 0; i < l; i++ { - structp := structPointer_Add(ss1, field(uintptr(i)*size)) + structp := ss.Index(i) if structPointer_IsNil(structp) { return // return the size up to this point } diff --git a/vendor/github.com/gogo/protobuf/proto/equal.go b/vendor/github.com/gogo/protobuf/proto/equal.go index f5db1def3..2ed1cf596 100644 --- a/vendor/github.com/gogo/protobuf/proto/equal.go +++ b/vendor/github.com/gogo/protobuf/proto/equal.go @@ -54,13 +54,17 @@ Equality is defined in this way: in a proto3 .proto file, fields are not "set"; specifically, zero length proto3 "bytes" fields are equal (nil == {}). - Two repeated fields are equal iff their lengths are the same, - and their corresponding elements are equal (a "bytes" field, - although represented by []byte, is not a repeated field) + and their corresponding elements are equal. Note a "bytes" field, + although represented by []byte, is not a repeated field and the + rule for the scalar fields described above applies. - Two unset fields are equal. - Two unknown field sets are equal if their current encoded state is equal. - Two extension sets are equal iff they have corresponding elements that are pairwise equal. + - Two map fields are equal iff their lengths are the same, + and they contain the same set of elements. Zero-length map + fields are equal. - Every other combination of things are not equal. The return value is undefined if a and b are not protocol buffers. @@ -121,9 +125,16 @@ func equalStruct(v1, v2 reflect.Value) bool { } } + if em1 := v1.FieldByName("XXX_InternalExtensions"); em1.IsValid() { + em2 := v2.FieldByName("XXX_InternalExtensions") + if !equalExtensions(v1.Type(), em1.Interface().(XXX_InternalExtensions), em2.Interface().(XXX_InternalExtensions)) { + return false + } + } + if em1 := v1.FieldByName("XXX_extensions"); em1.IsValid() { em2 := v2.FieldByName("XXX_extensions") - if !equalExtensions(v1.Type(), em1.Interface().(map[int32]Extension), em2.Interface().(map[int32]Extension)) { + if !equalExtMap(v1.Type(), em1.Interface().(map[int32]Extension), em2.Interface().(map[int32]Extension)) { return false } } @@ -184,6 +195,13 @@ func equalAny(v1, v2 reflect.Value, prop *Properties) bool { } return true case reflect.Ptr: + // Maps may have nil values in them, so check for nil. + if v1.IsNil() && v2.IsNil() { + return true + } + if v1.IsNil() != v2.IsNil() { + return false + } return equalAny(v1.Elem(), v2.Elem(), prop) case reflect.Slice: if v1.Type().Elem().Kind() == reflect.Uint8 { @@ -223,8 +241,14 @@ func equalAny(v1, v2 reflect.Value, prop *Properties) bool { } // base is the struct type that the extensions are based on. -// em1 and em2 are extension maps. -func equalExtensions(base reflect.Type, em1, em2 map[int32]Extension) bool { +// x1 and x2 are InternalExtensions. +func equalExtensions(base reflect.Type, x1, x2 XXX_InternalExtensions) bool { + em1, _ := x1.extensionsRead() + em2, _ := x2.extensionsRead() + return equalExtMap(base, em1, em2) +} + +func equalExtMap(base reflect.Type, em1, em2 map[int32]Extension) bool { if len(em1) != len(em2) { return false } diff --git a/vendor/github.com/gogo/protobuf/proto/extensions.go b/vendor/github.com/gogo/protobuf/proto/extensions.go index 6180347e3..0dfcb538e 100644 --- a/vendor/github.com/gogo/protobuf/proto/extensions.go +++ b/vendor/github.com/gogo/protobuf/proto/extensions.go @@ -52,23 +52,112 @@ type ExtensionRange struct { Start, End int32 // both inclusive } -// extendableProto is an interface implemented by any protocol buffer that may be extended. +// extendableProto is an interface implemented by any protocol buffer generated by the current +// proto compiler that may be extended. type extendableProto interface { Message ExtensionRangeArray() []ExtensionRange + extensionsWrite() map[int32]Extension + extensionsRead() (map[int32]Extension, sync.Locker) } -type extensionsMap interface { - extendableProto +// extendableProtoV1 is an interface implemented by a protocol buffer generated by the previous +// version of the proto compiler that may be extended. +type extendableProtoV1 interface { + Message + ExtensionRangeArray() []ExtensionRange ExtensionMap() map[int32]Extension } type extensionsBytes interface { - extendableProto + Message + ExtensionRangeArray() []ExtensionRange GetExtensions() *[]byte } +// extensionAdapter is a wrapper around extendableProtoV1 that implements extendableProto. +type extensionAdapter struct { + extendableProtoV1 +} + +func (e extensionAdapter) extensionsWrite() map[int32]Extension { + return e.ExtensionMap() +} + +func (e extensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) { + return e.ExtensionMap(), notLocker{} +} + +// notLocker is a sync.Locker whose Lock and Unlock methods are nops. +type notLocker struct{} + +func (n notLocker) Lock() {} +func (n notLocker) Unlock() {} + +// extendable returns the extendableProto interface for the given generated proto message. +// If the proto message has the old extension format, it returns a wrapper that implements +// the extendableProto interface. +func extendable(p interface{}) (extendableProto, bool) { + if ep, ok := p.(extendableProto); ok { + return ep, ok + } + if ep, ok := p.(extendableProtoV1); ok { + return extensionAdapter{ep}, ok + } + return nil, false +} + +// XXX_InternalExtensions is an internal representation of proto extensions. +// +// Each generated message struct type embeds an anonymous XXX_InternalExtensions field, +// thus gaining the unexported 'extensions' method, which can be called only from the proto package. +// +// The methods of XXX_InternalExtensions are not concurrency safe in general, +// but calls to logically read-only methods such as has and get may be executed concurrently. +type XXX_InternalExtensions struct { + // The struct must be indirect so that if a user inadvertently copies a + // generated message and its embedded XXX_InternalExtensions, they + // avoid the mayhem of a copied mutex. + // + // The mutex serializes all logically read-only operations to p.extensionMap. + // It is up to the client to ensure that write operations to p.extensionMap are + // mutually exclusive with other accesses. + p *struct { + mu sync.Mutex + extensionMap map[int32]Extension + } +} + +// extensionsWrite returns the extension map, creating it on first use. +func (e *XXX_InternalExtensions) extensionsWrite() map[int32]Extension { + if e.p == nil { + e.p = new(struct { + mu sync.Mutex + extensionMap map[int32]Extension + }) + e.p.extensionMap = make(map[int32]Extension) + } + return e.p.extensionMap +} + +// extensionsRead returns the extensions map for read-only use. It may be nil. +// The caller must hold the returned mutex's lock when accessing Elements within the map. +func (e *XXX_InternalExtensions) extensionsRead() (map[int32]Extension, sync.Locker) { + if e.p == nil { + return nil, nil + } + return e.p.extensionMap, &e.p.mu +} + +type extensionRange interface { + Message + ExtensionRangeArray() []ExtensionRange +} + var extendableProtoType = reflect.TypeOf((*extendableProto)(nil)).Elem() +var extendableProtoV1Type = reflect.TypeOf((*extendableProtoV1)(nil)).Elem() +var extendableBytesType = reflect.TypeOf((*extensionsBytes)(nil)).Elem() +var extensionRangeType = reflect.TypeOf((*extensionRange)(nil)).Elem() // ExtensionDesc represents an extension specification. // Used in generated code from the protocol compiler. @@ -78,6 +167,7 @@ type ExtensionDesc struct { Field int32 // field number Name string // fully-qualified name of extension, for text formatting Tag string // protobuf tag style + Filename string // name of the file in which the extension is defined } func (ed *ExtensionDesc) repeated() bool { @@ -101,20 +191,23 @@ type Extension struct { } // SetRawExtension is for testing only. -func SetRawExtension(base extendableProto, id int32, b []byte) { - if ebase, ok := base.(extensionsMap); ok { - ebase.ExtensionMap()[id] = Extension{enc: b} - } else if ebase, ok := base.(extensionsBytes); ok { +func SetRawExtension(base Message, id int32, b []byte) { + if ebase, ok := base.(extensionsBytes); ok { clearExtension(base, id) ext := ebase.GetExtensions() *ext = append(*ext, b...) - } else { - panic("unreachable") + return } + epb, ok := extendable(base) + if !ok { + return + } + extmap := epb.extensionsWrite() + extmap[id] = Extension{enc: b} } // isExtensionField returns true iff the given field number is in an extension range. -func isExtensionField(pb extendableProto, field int32) bool { +func isExtensionField(pb extensionRange, field int32) bool { for _, er := range pb.ExtensionRangeArray() { if er.Start <= field && field <= er.End { return true @@ -125,8 +218,12 @@ func isExtensionField(pb extendableProto, field int32) bool { // checkExtensionTypes checks that the given extension is valid for pb. func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error { + var pbi interface{} = pb // Check the extended type. - if a, b := reflect.TypeOf(pb), reflect.TypeOf(extension.ExtendedType); a != b { + if ea, ok := pbi.(extensionAdapter); ok { + pbi = ea.extendableProtoV1 + } + if a, b := reflect.TypeOf(pbi), reflect.TypeOf(extension.ExtendedType); a != b { return errors.New("proto: bad extended type; " + b.String() + " does not extend " + a.String()) } // Check the range. @@ -172,43 +269,57 @@ func extensionProperties(ed *ExtensionDesc) *Properties { return prop } -// encodeExtensionMap encodes any unmarshaled (unencoded) extensions in m. -func encodeExtensionMap(m map[int32]Extension) error { +// encode encodes any unmarshaled (unencoded) extensions in e. +func encodeExtensions(e *XXX_InternalExtensions) error { + m, mu := e.extensionsRead() + if m == nil { + return nil // fast path + } + mu.Lock() + defer mu.Unlock() + return encodeExtensionsMap(m) +} + +// encode encodes any unmarshaled (unencoded) extensions in e. +func encodeExtensionsMap(m map[int32]Extension) error { for k, e := range m { - err := encodeExtension(&e) - if err != nil { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + et := reflect.TypeOf(e.desc.ExtensionType) + props := extensionProperties(e.desc) + + p := NewBuffer(nil) + // If e.value has type T, the encoder expects a *struct{ X T }. + // Pass a *T with a zero field and hope it all works out. + x := reflect.New(et) + x.Elem().Set(reflect.ValueOf(e.value)) + if err := props.enc(p, props, toStructPointer(x)); err != nil { return err } + e.enc = p.buf m[k] = e } return nil } -func encodeExtension(e *Extension) error { - if e.value == nil || e.desc == nil { - // Extension is only in its encoded form. - return nil +func extensionsSize(e *XXX_InternalExtensions) (n int) { + m, mu := e.extensionsRead() + if m == nil { + return 0 } - // We don't skip extensions that have an encoded form set, - // because the extension value may have been mutated after - // the last time this function was called. - - et := reflect.TypeOf(e.desc.ExtensionType) - props := extensionProperties(e.desc) - - p := NewBuffer(nil) - // If e.value has type T, the encoder expects a *struct{ X T }. - // Pass a *T with a zero field and hope it all works out. - x := reflect.New(et) - x.Elem().Set(reflect.ValueOf(e.value)) - if err := props.enc(p, props, toStructPointer(x)); err != nil { - return err - } - e.enc = p.buf - return nil + mu.Lock() + defer mu.Unlock() + return extensionsMapSize(m) } -func sizeExtensionMap(m map[int32]Extension) (n int) { +func extensionsMapSize(m map[int32]Extension) (n int) { for _, e := range m { if e.value == nil || e.desc == nil { // Extension is only in its encoded form. @@ -233,12 +344,8 @@ func sizeExtensionMap(m map[int32]Extension) (n int) { } // HasExtension returns whether the given extension is present in pb. -func HasExtension(pb extendableProto, extension *ExtensionDesc) bool { - // TODO: Check types, field numbers, etc.? - if epb, doki := pb.(extensionsMap); doki { - _, ok := epb.ExtensionMap()[extension.Field] - return ok - } else if epb, doki := pb.(extensionsBytes); doki { +func HasExtension(pb Message, extension *ExtensionDesc) bool { + if epb, doki := pb.(extensionsBytes); doki { ext := epb.GetExtensions() buf := *ext o := 0 @@ -258,7 +365,19 @@ func HasExtension(pb extendableProto, extension *ExtensionDesc) bool { } return false } - panic("unreachable") + // TODO: Check types, field numbers, etc.? + epb, ok := extendable(pb) + if !ok { + return false + } + extmap, mu := epb.extensionsRead() + if extmap == nil { + return false + } + mu.Lock() + _, ok = extmap[extension.Field] + mu.Unlock() + return ok } func deleteExtension(pb extensionsBytes, theFieldNum int32, offset int) int { @@ -281,64 +400,32 @@ func deleteExtension(pb extensionsBytes, theFieldNum int32, offset int) int { return -1 } -func clearExtension(pb extendableProto, fieldNum int32) { - if epb, doki := pb.(extensionsMap); doki { - delete(epb.ExtensionMap(), fieldNum) - } else if epb, doki := pb.(extensionsBytes); doki { +// ClearExtension removes the given extension from pb. +func ClearExtension(pb Message, extension *ExtensionDesc) { + clearExtension(pb, extension.Field) +} + +func clearExtension(pb Message, fieldNum int32) { + if epb, doki := pb.(extensionsBytes); doki { offset := 0 for offset != -1 { offset = deleteExtension(epb, fieldNum, offset) } - } else { - panic("unreachable") + return + } + epb, ok := extendable(pb) + if !ok { + return } -} - -// ClearExtension removes the given extension from pb. -func ClearExtension(pb extendableProto, extension *ExtensionDesc) { // TODO: Check types, field numbers, etc.? - clearExtension(pb, extension.Field) + extmap := epb.extensionsWrite() + delete(extmap, fieldNum) } // GetExtension parses and returns the given extension of pb. -// If the extension is not present it returns ErrMissingExtension. -func GetExtension(pb extendableProto, extension *ExtensionDesc) (interface{}, error) { - if err := checkExtensionTypes(pb, extension); err != nil { - return nil, err - } - - if epb, doki := pb.(extensionsMap); doki { - emap := epb.ExtensionMap() - e, ok := emap[extension.Field] - if !ok { - // defaultExtensionValue returns the default value or - // ErrMissingExtension if there is no default. - return defaultExtensionValue(extension) - } - if e.value != nil { - // Already decoded. Check the descriptor, though. - if e.desc != extension { - // This shouldn't happen. If it does, it means that - // GetExtension was called twice with two different - // descriptors with the same field number. - return nil, errors.New("proto: descriptor conflict") - } - return e.value, nil - } - - v, err := decodeExtension(e.enc, extension) - if err != nil { - return nil, err - } - - // Remember the decoded version and drop the encoded version. - // That way it is safe to mutate what we return. - e.value = v - e.desc = extension - e.enc = nil - emap[extension.Field] = e - return e.value, nil - } else if epb, doki := pb.(extensionsBytes); doki { +// If the extension is not present and has no default value it returns ErrMissingExtension. +func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) { + if epb, doki := pb.(extensionsBytes); doki { ext := epb.GetExtensions() o := 0 for o < len(*ext) { @@ -360,7 +447,50 @@ func GetExtension(pb extendableProto, extension *ExtensionDesc) (interface{}, er } return defaultExtensionValue(extension) } - panic("unreachable") + epb, ok := extendable(pb) + if !ok { + return nil, errors.New("proto: not an extendable proto") + } + if err := checkExtensionTypes(epb, extension); err != nil { + return nil, err + } + + emap, mu := epb.extensionsRead() + if emap == nil { + return defaultExtensionValue(extension) + } + mu.Lock() + defer mu.Unlock() + e, ok := emap[extension.Field] + if !ok { + // defaultExtensionValue returns the default value or + // ErrMissingExtension if there is no default. + return defaultExtensionValue(extension) + } + + if e.value != nil { + // Already decoded. Check the descriptor, though. + if e.desc != extension { + // This shouldn't happen. If it does, it means that + // GetExtension was called twice with two different + // descriptors with the same field number. + return nil, errors.New("proto: descriptor conflict") + } + return e.value, nil + } + + v, err := decodeExtension(e.enc, extension) + if err != nil { + return nil, err + } + + // Remember the decoded version and drop the encoded version. + // That way it is safe to mutate what we return. + e.value = v + e.desc = extension + e.enc = nil + emap[extension.Field] = e + return e.value, nil } // defaultExtensionValue returns the default value for extension. @@ -434,14 +564,9 @@ func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) { // GetExtensions returns a slice of the extensions present in pb that are also listed in es. // The returned slice has the same length as es; missing extensions will appear as nil elements. func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { - epb, ok := pb.(extendableProto) - if !ok { - err = errors.New("proto: not an extendable proto") - return - } extensions = make([]interface{}, len(es)) for i, e := range es { - extensions[i], err = GetExtension(epb, e) + extensions[i], err = GetExtension(pb, e) if err == ErrMissingExtension { err = nil } @@ -452,9 +577,58 @@ func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, e return } +// ExtensionDescs returns a new slice containing pb's extension descriptors, in undefined order. +// For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing +// just the Field field, which defines the extension's field number. +func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) { + epb, ok := extendable(pb) + if !ok { + return nil, fmt.Errorf("proto: %T is not an extendable proto.Message", pb) + } + registeredExtensions := RegisteredExtensions(pb) + + emap, mu := epb.extensionsRead() + if emap == nil { + return nil, nil + } + mu.Lock() + defer mu.Unlock() + extensions := make([]*ExtensionDesc, 0, len(emap)) + for extid, e := range emap { + desc := e.desc + if desc == nil { + desc = registeredExtensions[extid] + if desc == nil { + desc = &ExtensionDesc{Field: extid} + } + } + + extensions = append(extensions, desc) + } + return extensions, nil +} + // SetExtension sets the specified extension of pb to the specified value. -func SetExtension(pb extendableProto, extension *ExtensionDesc, value interface{}) error { - if err := checkExtensionTypes(pb, extension); err != nil { +func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error { + if epb, doki := pb.(extensionsBytes); doki { + ClearExtension(pb, extension) + ext := epb.GetExtensions() + et := reflect.TypeOf(extension.ExtensionType) + props := extensionProperties(extension) + p := NewBuffer(nil) + x := reflect.New(et) + x.Elem().Set(reflect.ValueOf(value)) + if err := props.enc(p, props, toStructPointer(x)); err != nil { + return err + } + *ext = append(*ext, p.buf...) + return nil + } + epb, ok := extendable(pb) + if !ok { + return errors.New("proto: not an extendable proto") + } + if err := checkExtensionTypes(epb, extension); err != nil { return err } typ := reflect.TypeOf(extension.ExtensionType) @@ -469,26 +643,27 @@ func SetExtension(pb extendableProto, extension *ExtensionDesc, value interface{ if reflect.ValueOf(value).IsNil() { return fmt.Errorf("proto: SetExtension called with nil value of type %T", value) } - return setExtension(pb, extension, value) + + extmap := epb.extensionsWrite() + extmap[extension.Field] = Extension{desc: extension, value: value} + return nil } -func setExtension(pb extendableProto, extension *ExtensionDesc, value interface{}) error { - if epb, doki := pb.(extensionsMap); doki { - epb.ExtensionMap()[extension.Field] = Extension{desc: extension, value: value} - } else if epb, doki := pb.(extensionsBytes); doki { - ClearExtension(pb, extension) +// ClearAllExtensions clears all extensions from pb. +func ClearAllExtensions(pb Message) { + if epb, doki := pb.(extensionsBytes); doki { ext := epb.GetExtensions() - et := reflect.TypeOf(extension.ExtensionType) - props := extensionProperties(extension) - p := NewBuffer(nil) - x := reflect.New(et) - x.Elem().Set(reflect.ValueOf(value)) - if err := props.enc(p, props, toStructPointer(x)); err != nil { - return err - } - *ext = append(*ext, p.buf...) + *ext = []byte{} + return + } + epb, ok := extendable(pb) + if !ok { + return + } + m := epb.extensionsWrite() + for k := range m { + delete(m, k) } - return nil } // A global registry of extensions. diff --git a/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go b/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go index 86b1fa234..ea6478f00 100644 --- a/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go +++ b/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go @@ -1,5 +1,7 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,9 +35,10 @@ import ( "reflect" "sort" "strings" + "sync" ) -func GetBoolExtension(pb extendableProto, extension *ExtensionDesc, ifnotset bool) bool { +func GetBoolExtension(pb Message, extension *ExtensionDesc, ifnotset bool) bool { if reflect.ValueOf(pb).IsNil() { return ifnotset } @@ -60,8 +63,12 @@ func (this *Extension) Compare(that *Extension) int { return bytes.Compare(this.enc, that.enc) } +func SizeOfInternalExtension(m extendableProto) (n int) { + return SizeOfExtensionMap(m.extensionsWrite()) +} + func SizeOfExtensionMap(m map[int32]Extension) (n int) { - return sizeExtensionMap(m) + return extensionsMapSize(m) } type sortableMapElem struct { @@ -94,6 +101,10 @@ func (this sortableExtensions) String() string { return "map[" + strings.Join(ss, ",") + "]" } +func StringFromInternalExtension(m extendableProto) string { + return StringFromExtensionsMap(m.extensionsWrite()) +} + func StringFromExtensionsMap(m map[int32]Extension) string { return newSortableExtensionsFromMap(m).String() } @@ -106,8 +117,12 @@ func StringFromExtensionsBytes(ext []byte) string { return StringFromExtensionsMap(m) } +func EncodeInternalExtension(m extendableProto, data []byte) (n int, err error) { + return EncodeExtensionMap(m.extensionsWrite(), data) +} + func EncodeExtensionMap(m map[int32]Extension, data []byte) (n int, err error) { - if err := encodeExtensionMap(m); err != nil { + if err := encodeExtensionsMap(m); err != nil { return 0, err } keys := make([]int, 0, len(m)) @@ -125,7 +140,7 @@ func GetRawExtension(m map[int32]Extension, id int32) ([]byte, error) { if m[id].value == nil || m[id].desc == nil { return m[id].enc, nil } - if err := encodeExtensionMap(m); err != nil { + if err := encodeExtensionsMap(m); err != nil { return nil, err } return m[id].enc, nil @@ -189,15 +204,42 @@ func NewExtension(e []byte) Extension { return ee } -func AppendExtension(e extendableProto, tag int32, buf []byte) { - if ee, eok := e.(extensionsMap); eok { - ext := ee.ExtensionMap()[int32(tag)] // may be missing - ext.enc = append(ext.enc, buf...) - ee.ExtensionMap()[int32(tag)] = ext - } else if ee, eok := e.(extensionsBytes); eok { +func AppendExtension(e Message, tag int32, buf []byte) { + if ee, eok := e.(extensionsBytes); eok { ext := ee.GetExtensions() *ext = append(*ext, buf...) + return } + if ee, eok := e.(extendableProto); eok { + m := ee.extensionsWrite() + ext := m[int32(tag)] // may be missing + ext.enc = append(ext.enc, buf...) + m[int32(tag)] = ext + } +} + +func encodeExtension(e *Extension) error { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + return nil + } + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + et := reflect.TypeOf(e.desc.ExtensionType) + props := extensionProperties(e.desc) + + p := NewBuffer(nil) + // If e.value has type T, the encoder expects a *struct{ X T }. + // Pass a *T with a zero field and hope it all works out. + x := reflect.New(et) + x.Elem().Set(reflect.ValueOf(e.value)) + if err := props.enc(p, props, toStructPointer(x)); err != nil { + return err + } + e.enc = p.buf + return nil } func (this Extension) GoString() string { @@ -209,7 +251,7 @@ func (this Extension) GoString() string { return fmt.Sprintf("proto.NewExtension(%#v)", this.enc) } -func SetUnsafeExtension(pb extendableProto, fieldNum int32, value interface{}) error { +func SetUnsafeExtension(pb Message, fieldNum int32, value interface{}) error { typ := reflect.TypeOf(pb).Elem() ext, ok := extensionMaps[typ] if !ok { @@ -219,10 +261,10 @@ func SetUnsafeExtension(pb extendableProto, fieldNum int32, value interface{}) e if !ok { return errors.New("proto: bad extension number; not in declared ranges") } - return setExtension(pb, desc, value) + return SetExtension(pb, desc, value) } -func GetUnsafeExtension(pb extendableProto, fieldNum int32) (interface{}, error) { +func GetUnsafeExtension(pb Message, fieldNum int32) (interface{}, error) { typ := reflect.TypeOf(pb).Elem() ext, ok := extensionMaps[typ] if !ok { @@ -234,3 +276,19 @@ func GetUnsafeExtension(pb extendableProto, fieldNum int32) (interface{}, error) } return GetExtension(pb, desc) } + +func NewUnsafeXXX_InternalExtensions(m map[int32]Extension) XXX_InternalExtensions { + x := &XXX_InternalExtensions{ + p: new(struct { + mu sync.Mutex + extensionMap map[int32]Extension + }), + } + x.p.extensionMap = m + return *x +} + +func GetUnsafeExtensionsMap(extendable Message) map[int32]Extension { + pb := extendable.(extendableProto) + return pb.extensionsWrite() +} diff --git a/vendor/github.com/gogo/protobuf/proto/lib.go b/vendor/github.com/gogo/protobuf/proto/lib.go index 2e35ae2d2..7580bb45c 100644 --- a/vendor/github.com/gogo/protobuf/proto/lib.go +++ b/vendor/github.com/gogo/protobuf/proto/lib.go @@ -308,7 +308,7 @@ func GetStats() Stats { return stats } // temporary Buffer and are fine for most applications. type Buffer struct { buf []byte // encode/decode byte stream - index int // write point + index int // read point // pools of basic types to amortize allocation. bools []bool @@ -889,6 +889,10 @@ func isProto3Zero(v reflect.Value) bool { return false } +// ProtoPackageIsVersion2 is referenced from generated protocol buffer files +// to assert that that code is compatible with this version of the proto package. +const GoGoProtoPackageIsVersion2 = true + // ProtoPackageIsVersion1 is referenced from generated protocol buffer files // to assert that that code is compatible with this version of the proto package. const GoGoProtoPackageIsVersion1 = true diff --git a/vendor/github.com/gogo/protobuf/proto/lib_gogo.go b/vendor/github.com/gogo/protobuf/proto/lib_gogo.go index a6c2c06b2..4b4f7c909 100644 --- a/vendor/github.com/gogo/protobuf/proto/lib_gogo.go +++ b/vendor/github.com/gogo/protobuf/proto/lib_gogo.go @@ -1,5 +1,7 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/vendor/github.com/gogo/protobuf/proto/message_set.go b/vendor/github.com/gogo/protobuf/proto/message_set.go index e25e01e63..fd982decd 100644 --- a/vendor/github.com/gogo/protobuf/proto/message_set.go +++ b/vendor/github.com/gogo/protobuf/proto/message_set.go @@ -149,9 +149,21 @@ func skipVarint(buf []byte) []byte { // MarshalMessageSet encodes the extension map represented by m in the message set wire format. // It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option. -func MarshalMessageSet(m map[int32]Extension) ([]byte, error) { - if err := encodeExtensionMap(m); err != nil { - return nil, err +func MarshalMessageSet(exts interface{}) ([]byte, error) { + var m map[int32]Extension + switch exts := exts.(type) { + case *XXX_InternalExtensions: + if err := encodeExtensions(exts); err != nil { + return nil, err + } + m, _ = exts.extensionsRead() + case map[int32]Extension: + if err := encodeExtensionsMap(exts); err != nil { + return nil, err + } + m = exts + default: + return nil, errors.New("proto: not an extension map") } // Sort extension IDs to provide a deterministic encoding. @@ -178,7 +190,17 @@ func MarshalMessageSet(m map[int32]Extension) ([]byte, error) { // UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. // It is called by generated Unmarshal methods on protocol buffer messages with the message_set_wire_format option. -func UnmarshalMessageSet(buf []byte, m map[int32]Extension) error { +func UnmarshalMessageSet(buf []byte, exts interface{}) error { + var m map[int32]Extension + switch exts := exts.(type) { + case *XXX_InternalExtensions: + m = exts.extensionsWrite() + case map[int32]Extension: + m = exts + default: + return errors.New("proto: not an extension map") + } + ms := new(messageSet) if err := Unmarshal(buf, ms); err != nil { return err @@ -209,7 +231,16 @@ func UnmarshalMessageSet(buf []byte, m map[int32]Extension) error { // MarshalMessageSetJSON encodes the extension map represented by m in JSON format. // It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option. -func MarshalMessageSetJSON(m map[int32]Extension) ([]byte, error) { +func MarshalMessageSetJSON(exts interface{}) ([]byte, error) { + var m map[int32]Extension + switch exts := exts.(type) { + case *XXX_InternalExtensions: + m, _ = exts.extensionsRead() + case map[int32]Extension: + m = exts + default: + return nil, errors.New("proto: not an extension map") + } var b bytes.Buffer b.WriteByte('{') @@ -252,7 +283,7 @@ func MarshalMessageSetJSON(m map[int32]Extension) ([]byte, error) { // UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format. // It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option. -func UnmarshalMessageSetJSON(buf []byte, m map[int32]Extension) error { +func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error { // Common-case fast path. if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) { return nil diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go b/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go new file mode 100644 index 000000000..fb512e2e1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go @@ -0,0 +1,484 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +build appengine js + +// This file contains an implementation of proto field accesses using package reflect. +// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can +// be used on App Engine. + +package proto + +import ( + "math" + "reflect" +) + +// A structPointer is a pointer to a struct. +type structPointer struct { + v reflect.Value +} + +// toStructPointer returns a structPointer equivalent to the given reflect value. +// The reflect value must itself be a pointer to a struct. +func toStructPointer(v reflect.Value) structPointer { + return structPointer{v} +} + +// IsNil reports whether p is nil. +func structPointer_IsNil(p structPointer) bool { + return p.v.IsNil() +} + +// Interface returns the struct pointer as an interface value. +func structPointer_Interface(p structPointer, _ reflect.Type) interface{} { + return p.v.Interface() +} + +// A field identifies a field in a struct, accessible from a structPointer. +// In this implementation, a field is identified by the sequence of field indices +// passed to reflect's FieldByIndex. +type field []int + +// toField returns a field equivalent to the given reflect field. +func toField(f *reflect.StructField) field { + return f.Index +} + +// invalidField is an invalid field identifier. +var invalidField = field(nil) + +// IsValid reports whether the field identifier is valid. +func (f field) IsValid() bool { return f != nil } + +// field returns the given field in the struct as a reflect value. +func structPointer_field(p structPointer, f field) reflect.Value { + // Special case: an extension map entry with a value of type T + // passes a *T to the struct-handling code with a zero field, + // expecting that it will be treated as equivalent to *struct{ X T }, + // which has the same memory layout. We have to handle that case + // specially, because reflect will panic if we call FieldByIndex on a + // non-struct. + if f == nil { + return p.v.Elem() + } + + return p.v.Elem().FieldByIndex(f) +} + +// ifield returns the given field in the struct as an interface value. +func structPointer_ifield(p structPointer, f field) interface{} { + return structPointer_field(p, f).Addr().Interface() +} + +// Bytes returns the address of a []byte field in the struct. +func structPointer_Bytes(p structPointer, f field) *[]byte { + return structPointer_ifield(p, f).(*[]byte) +} + +// BytesSlice returns the address of a [][]byte field in the struct. +func structPointer_BytesSlice(p structPointer, f field) *[][]byte { + return structPointer_ifield(p, f).(*[][]byte) +} + +// Bool returns the address of a *bool field in the struct. +func structPointer_Bool(p structPointer, f field) **bool { + return structPointer_ifield(p, f).(**bool) +} + +// BoolVal returns the address of a bool field in the struct. +func structPointer_BoolVal(p structPointer, f field) *bool { + return structPointer_ifield(p, f).(*bool) +} + +// BoolSlice returns the address of a []bool field in the struct. +func structPointer_BoolSlice(p structPointer, f field) *[]bool { + return structPointer_ifield(p, f).(*[]bool) +} + +// String returns the address of a *string field in the struct. +func structPointer_String(p structPointer, f field) **string { + return structPointer_ifield(p, f).(**string) +} + +// StringVal returns the address of a string field in the struct. +func structPointer_StringVal(p structPointer, f field) *string { + return structPointer_ifield(p, f).(*string) +} + +// StringSlice returns the address of a []string field in the struct. +func structPointer_StringSlice(p structPointer, f field) *[]string { + return structPointer_ifield(p, f).(*[]string) +} + +// Extensions returns the address of an extension map field in the struct. +func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions { + return structPointer_ifield(p, f).(*XXX_InternalExtensions) +} + +// ExtMap returns the address of an extension map field in the struct. +func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { + return structPointer_ifield(p, f).(*map[int32]Extension) +} + +// NewAt returns the reflect.Value for a pointer to a field in the struct. +func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { + return structPointer_field(p, f).Addr() +} + +// SetStructPointer writes a *struct field in the struct. +func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { + structPointer_field(p, f).Set(q.v) +} + +// GetStructPointer reads a *struct field in the struct. +func structPointer_GetStructPointer(p structPointer, f field) structPointer { + return structPointer{structPointer_field(p, f)} +} + +// StructPointerSlice the address of a []*struct field in the struct. +func structPointer_StructPointerSlice(p structPointer, f field) structPointerSlice { + return structPointerSlice{structPointer_field(p, f)} +} + +// A structPointerSlice represents the address of a slice of pointers to structs +// (themselves messages or groups). That is, v.Type() is *[]*struct{...}. +type structPointerSlice struct { + v reflect.Value +} + +func (p structPointerSlice) Len() int { return p.v.Len() } +func (p structPointerSlice) Index(i int) structPointer { return structPointer{p.v.Index(i)} } +func (p structPointerSlice) Append(q structPointer) { + p.v.Set(reflect.Append(p.v, q.v)) +} + +var ( + int32Type = reflect.TypeOf(int32(0)) + uint32Type = reflect.TypeOf(uint32(0)) + float32Type = reflect.TypeOf(float32(0)) + int64Type = reflect.TypeOf(int64(0)) + uint64Type = reflect.TypeOf(uint64(0)) + float64Type = reflect.TypeOf(float64(0)) +) + +// A word32 represents a field of type *int32, *uint32, *float32, or *enum. +// That is, v.Type() is *int32, *uint32, *float32, or *enum and v is assignable. +type word32 struct { + v reflect.Value +} + +// IsNil reports whether p is nil. +func word32_IsNil(p word32) bool { + return p.v.IsNil() +} + +// Set sets p to point at a newly allocated word with bits set to x. +func word32_Set(p word32, o *Buffer, x uint32) { + t := p.v.Type().Elem() + switch t { + case int32Type: + if len(o.int32s) == 0 { + o.int32s = make([]int32, uint32PoolSize) + } + o.int32s[0] = int32(x) + p.v.Set(reflect.ValueOf(&o.int32s[0])) + o.int32s = o.int32s[1:] + return + case uint32Type: + if len(o.uint32s) == 0 { + o.uint32s = make([]uint32, uint32PoolSize) + } + o.uint32s[0] = x + p.v.Set(reflect.ValueOf(&o.uint32s[0])) + o.uint32s = o.uint32s[1:] + return + case float32Type: + if len(o.float32s) == 0 { + o.float32s = make([]float32, uint32PoolSize) + } + o.float32s[0] = math.Float32frombits(x) + p.v.Set(reflect.ValueOf(&o.float32s[0])) + o.float32s = o.float32s[1:] + return + } + + // must be enum + p.v.Set(reflect.New(t)) + p.v.Elem().SetInt(int64(int32(x))) +} + +// Get gets the bits pointed at by p, as a uint32. +func word32_Get(p word32) uint32 { + elem := p.v.Elem() + switch elem.Kind() { + case reflect.Int32: + return uint32(elem.Int()) + case reflect.Uint32: + return uint32(elem.Uint()) + case reflect.Float32: + return math.Float32bits(float32(elem.Float())) + } + panic("unreachable") +} + +// Word32 returns a reference to a *int32, *uint32, *float32, or *enum field in the struct. +func structPointer_Word32(p structPointer, f field) word32 { + return word32{structPointer_field(p, f)} +} + +// A word32Val represents a field of type int32, uint32, float32, or enum. +// That is, v.Type() is int32, uint32, float32, or enum and v is assignable. +type word32Val struct { + v reflect.Value +} + +// Set sets *p to x. +func word32Val_Set(p word32Val, x uint32) { + switch p.v.Type() { + case int32Type: + p.v.SetInt(int64(x)) + return + case uint32Type: + p.v.SetUint(uint64(x)) + return + case float32Type: + p.v.SetFloat(float64(math.Float32frombits(x))) + return + } + + // must be enum + p.v.SetInt(int64(int32(x))) +} + +// Get gets the bits pointed at by p, as a uint32. +func word32Val_Get(p word32Val) uint32 { + elem := p.v + switch elem.Kind() { + case reflect.Int32: + return uint32(elem.Int()) + case reflect.Uint32: + return uint32(elem.Uint()) + case reflect.Float32: + return math.Float32bits(float32(elem.Float())) + } + panic("unreachable") +} + +// Word32Val returns a reference to a int32, uint32, float32, or enum field in the struct. +func structPointer_Word32Val(p structPointer, f field) word32Val { + return word32Val{structPointer_field(p, f)} +} + +// A word32Slice is a slice of 32-bit values. +// That is, v.Type() is []int32, []uint32, []float32, or []enum. +type word32Slice struct { + v reflect.Value +} + +func (p word32Slice) Append(x uint32) { + n, m := p.v.Len(), p.v.Cap() + if n < m { + p.v.SetLen(n + 1) + } else { + t := p.v.Type().Elem() + p.v.Set(reflect.Append(p.v, reflect.Zero(t))) + } + elem := p.v.Index(n) + switch elem.Kind() { + case reflect.Int32: + elem.SetInt(int64(int32(x))) + case reflect.Uint32: + elem.SetUint(uint64(x)) + case reflect.Float32: + elem.SetFloat(float64(math.Float32frombits(x))) + } +} + +func (p word32Slice) Len() int { + return p.v.Len() +} + +func (p word32Slice) Index(i int) uint32 { + elem := p.v.Index(i) + switch elem.Kind() { + case reflect.Int32: + return uint32(elem.Int()) + case reflect.Uint32: + return uint32(elem.Uint()) + case reflect.Float32: + return math.Float32bits(float32(elem.Float())) + } + panic("unreachable") +} + +// Word32Slice returns a reference to a []int32, []uint32, []float32, or []enum field in the struct. +func structPointer_Word32Slice(p structPointer, f field) word32Slice { + return word32Slice{structPointer_field(p, f)} +} + +// word64 is like word32 but for 64-bit values. +type word64 struct { + v reflect.Value +} + +func word64_Set(p word64, o *Buffer, x uint64) { + t := p.v.Type().Elem() + switch t { + case int64Type: + if len(o.int64s) == 0 { + o.int64s = make([]int64, uint64PoolSize) + } + o.int64s[0] = int64(x) + p.v.Set(reflect.ValueOf(&o.int64s[0])) + o.int64s = o.int64s[1:] + return + case uint64Type: + if len(o.uint64s) == 0 { + o.uint64s = make([]uint64, uint64PoolSize) + } + o.uint64s[0] = x + p.v.Set(reflect.ValueOf(&o.uint64s[0])) + o.uint64s = o.uint64s[1:] + return + case float64Type: + if len(o.float64s) == 0 { + o.float64s = make([]float64, uint64PoolSize) + } + o.float64s[0] = math.Float64frombits(x) + p.v.Set(reflect.ValueOf(&o.float64s[0])) + o.float64s = o.float64s[1:] + return + } + panic("unreachable") +} + +func word64_IsNil(p word64) bool { + return p.v.IsNil() +} + +func word64_Get(p word64) uint64 { + elem := p.v.Elem() + switch elem.Kind() { + case reflect.Int64: + return uint64(elem.Int()) + case reflect.Uint64: + return elem.Uint() + case reflect.Float64: + return math.Float64bits(elem.Float()) + } + panic("unreachable") +} + +func structPointer_Word64(p structPointer, f field) word64 { + return word64{structPointer_field(p, f)} +} + +// word64Val is like word32Val but for 64-bit values. +type word64Val struct { + v reflect.Value +} + +func word64Val_Set(p word64Val, o *Buffer, x uint64) { + switch p.v.Type() { + case int64Type: + p.v.SetInt(int64(x)) + return + case uint64Type: + p.v.SetUint(x) + return + case float64Type: + p.v.SetFloat(math.Float64frombits(x)) + return + } + panic("unreachable") +} + +func word64Val_Get(p word64Val) uint64 { + elem := p.v + switch elem.Kind() { + case reflect.Int64: + return uint64(elem.Int()) + case reflect.Uint64: + return elem.Uint() + case reflect.Float64: + return math.Float64bits(elem.Float()) + } + panic("unreachable") +} + +func structPointer_Word64Val(p structPointer, f field) word64Val { + return word64Val{structPointer_field(p, f)} +} + +type word64Slice struct { + v reflect.Value +} + +func (p word64Slice) Append(x uint64) { + n, m := p.v.Len(), p.v.Cap() + if n < m { + p.v.SetLen(n + 1) + } else { + t := p.v.Type().Elem() + p.v.Set(reflect.Append(p.v, reflect.Zero(t))) + } + elem := p.v.Index(n) + switch elem.Kind() { + case reflect.Int64: + elem.SetInt(int64(int64(x))) + case reflect.Uint64: + elem.SetUint(uint64(x)) + case reflect.Float64: + elem.SetFloat(float64(math.Float64frombits(x))) + } +} + +func (p word64Slice) Len() int { + return p.v.Len() +} + +func (p word64Slice) Index(i int) uint64 { + elem := p.v.Index(i) + switch elem.Kind() { + case reflect.Int64: + return uint64(elem.Int()) + case reflect.Uint64: + return uint64(elem.Uint()) + case reflect.Float64: + return math.Float64bits(float64(elem.Float())) + } + panic("unreachable") +} + +func structPointer_Word64Slice(p structPointer, f field) word64Slice { + return word64Slice{structPointer_field(p, f)} +} diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go b/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go new file mode 100644 index 000000000..1763a5f22 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go @@ -0,0 +1,85 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +build appengine js + +package proto + +import ( + "reflect" +) + +func structPointer_FieldPointer(p structPointer, f field) structPointer { + panic("not implemented") +} + +func appendStructPointer(base structPointer, f field, typ reflect.Type) structPointer { + panic("not implemented") +} + +func structPointer_InterfaceAt(p structPointer, f field, t reflect.Type) interface{} { + panic("not implemented") +} + +func structPointer_InterfaceRef(p structPointer, f field, t reflect.Type) interface{} { + panic("not implemented") +} + +func structPointer_GetRefStructPointer(p structPointer, f field) structPointer { + panic("not implemented") +} + +func structPointer_Add(p structPointer, size field) structPointer { + panic("not implemented") +} + +func structPointer_Len(p structPointer, f field) int { + panic("not implemented") +} + +func structPointer_GetSliceHeader(p structPointer, f field) *reflect.SliceHeader { + panic("not implemented") +} + +func structPointer_Copy(oldptr structPointer, newptr structPointer, size int) { + panic("not implemented") +} + +func structPointer_StructRefSlice(p structPointer, f field, size uintptr) *structRefSlice { + panic("not implemented") +} + +type structRefSlice struct{} + +func (v *structRefSlice) Len() int { + panic("not implemented") +} + +func (v *structRefSlice) Index(i int) structPointer { + panic("not implemented") +} diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go index e9be0fe92..6b5567d47 100644 --- a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go +++ b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go @@ -29,7 +29,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +build !appengine +// +build !appengine,!js // This file contains the implementation of the proto field accesses using package unsafe. @@ -126,6 +126,10 @@ func structPointer_StringSlice(p structPointer, f field) *[]string { } // ExtMap returns the address of an extension map field in the struct. +func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions { + return (*XXX_InternalExtensions)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { return (*map[int32]Extension)(unsafe.Pointer(uintptr(p) + uintptr(f))) } diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go index 6bc85fa98..f156a29f0 100644 --- a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go +++ b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go @@ -1,5 +1,7 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -24,7 +26,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +build !appengine +// +build !appengine,!js // This file contains the implementation of the proto field accesses using package unsafe. @@ -70,16 +72,13 @@ func structPointer_Copy(oldptr structPointer, newptr structPointer, size int) { func appendStructPointer(base structPointer, f field, typ reflect.Type) structPointer { size := typ.Elem().Size() - oldHeader := structPointer_GetSliceHeader(base, f) - newLen := oldHeader.Len + 1 - slice := reflect.MakeSlice(typ, newLen, newLen) - bas := toStructPointer(slice) - for i := 0; i < oldHeader.Len; i++ { - newElemptr := uintptr(bas) + uintptr(i)*size - oldElemptr := oldHeader.Data + uintptr(i)*size - copyUintPtr(oldElemptr, newElemptr, int(size)) - } + oldHeader := structPointer_GetSliceHeader(base, f) + oldSlice := reflect.NewAt(typ, unsafe.Pointer(oldHeader)).Elem() + newLen := oldHeader.Len + 1 + newSlice := reflect.MakeSlice(typ, newLen, newLen) + reflect.Copy(newSlice, oldSlice) + bas := toStructPointer(newSlice) oldHeader.Data = uintptr(bas) oldHeader.Len = newLen oldHeader.Cap = newLen @@ -106,3 +105,24 @@ func structPointer_Add(p structPointer, size field) structPointer { func structPointer_Len(p structPointer, f field) int { return len(*(*[]interface{})(unsafe.Pointer(structPointer_GetRefStructPointer(p, f)))) } + +func structPointer_StructRefSlice(p structPointer, f field, size uintptr) *structRefSlice { + return &structRefSlice{p: p, f: f, size: size} +} + +// A structRefSlice represents a slice of structs (themselves submessages or groups). +type structRefSlice struct { + p structPointer + f field + size uintptr +} + +func (v *structRefSlice) Len() int { + return structPointer_Len(v.p, v.f) +} + +func (v *structRefSlice) Index(i int) structPointer { + ss := structPointer_GetStructPointer(v.p, v.f) + ss1 := structPointer_GetRefStructPointer(ss, 0) + return structPointer_Add(ss1, field(uintptr(i)*v.size)) +} diff --git a/vendor/github.com/gogo/protobuf/proto/properties.go b/vendor/github.com/gogo/protobuf/proto/properties.go index 5e6a0b3ba..44b332052 100644 --- a/vendor/github.com/gogo/protobuf/proto/properties.go +++ b/vendor/github.com/gogo/protobuf/proto/properties.go @@ -1,7 +1,7 @@ -// Extensions for Protocol Buffers to create more go like structures. +// Protocol Buffers for Go with Gadgets // -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf // // Go support for Protocol Buffers - Google's data interchange format // @@ -190,10 +190,11 @@ type Properties struct { proto3 bool // whether this is known to be a proto3 field; set for []byte only oneof bool // whether this is a oneof field - Default string // default value - HasDefault bool // whether an explicit default was provided - CustomType string - def_uint64 uint64 + Default string // default value + HasDefault bool // whether an explicit default was provided + CustomType string + StdTime bool + StdDuration bool enc encoder valEnc valueEncoder // set for bool and numeric types only @@ -340,6 +341,10 @@ func (p *Properties) Parse(s string) { p.OrigName = strings.Split(f, "=")[1] case strings.HasPrefix(f, "customtype="): p.CustomType = strings.Split(f, "=")[1] + case f == "stdtime": + p.StdTime = true + case f == "stdduration": + p.StdDuration = true } } } @@ -355,11 +360,22 @@ func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lock p.enc = nil p.dec = nil p.size = nil - if len(p.CustomType) > 0 { + isMap := typ.Kind() == reflect.Map + if len(p.CustomType) > 0 && !isMap { p.setCustomEncAndDec(typ) p.setTag(lockGetProp) return } + if p.StdTime && !isMap { + p.setTimeEncAndDec(typ) + p.setTag(lockGetProp) + return + } + if p.StdDuration && !isMap { + p.setDurationEncAndDec(typ) + p.setTag(lockGetProp) + return + } switch t1 := typ; t1.Kind() { default: fmt.Fprintf(os.Stderr, "proto: no coders for %v\n", t1) @@ -542,17 +558,13 @@ func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lock p.dec = (*Buffer).dec_slice_int64 p.packedDec = (*Buffer).dec_slice_packed_int64 case reflect.Uint8: - p.enc = (*Buffer).enc_slice_byte p.dec = (*Buffer).dec_slice_byte - p.size = size_slice_byte - // This is a []byte, which is either a bytes field, - // or the value of a map field. In the latter case, - // we always encode an empty []byte, so we should not - // use the proto3 enc/size funcs. - // f == nil iff this is the key/value of a map field. - if p.proto3 && f != nil { + if p.proto3 { p.enc = (*Buffer).enc_proto3_slice_byte p.size = size_proto3_slice_byte + } else { + p.enc = (*Buffer).enc_slice_byte + p.size = size_slice_byte } case reflect.Float32, reflect.Float64: switch t2.Bits() { @@ -634,6 +646,10 @@ func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lock // so we need encoders for the pointer to this type. vtype = reflect.PtrTo(vtype) } + + p.mvalprop.CustomType = p.CustomType + p.mvalprop.StdDuration = p.StdDuration + p.mvalprop.StdTime = p.StdTime p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) } p.setTag(lockGetProp) @@ -744,7 +760,9 @@ func getPropertiesLocked(t reflect.Type) *StructProperties { propertiesMap[t] = prop // build properties - prop.extendable = reflect.PtrTo(t).Implements(extendableProtoType) + prop.extendable = reflect.PtrTo(t).Implements(extendableProtoType) || + reflect.PtrTo(t).Implements(extendableProtoV1Type) || + reflect.PtrTo(t).Implements(extendableBytesType) prop.unrecField = invalidField prop.Prop = make([]*Properties, t.NumField()) prop.order = make([]int, t.NumField()) @@ -756,7 +774,11 @@ func getPropertiesLocked(t reflect.Type) *StructProperties { name := f.Name p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false) - if f.Name == "XXX_extensions" { // special case + if f.Name == "XXX_InternalExtensions" { // special case + p.enc = (*Buffer).enc_exts + p.dec = nil // not needed + p.size = size_exts + } else if f.Name == "XXX_extensions" { // special case if len(f.Tag.Get("protobuf")) > 0 { p.enc = (*Buffer).enc_ext_slice_byte p.dec = nil // not needed @@ -766,13 +788,14 @@ func getPropertiesLocked(t reflect.Type) *StructProperties { p.dec = nil // not needed p.size = size_map } - } - if f.Name == "XXX_unrecognized" { // special case + } else if f.Name == "XXX_unrecognized" { // special case prop.unrecField = toField(&f) } - oneof := f.Tag.Get("protobuf_oneof") != "" // special case - if oneof { + oneof := f.Tag.Get("protobuf_oneof") // special case + if oneof != "" { isOneofMessage = true + // Oneof fields don't use the traditional protobuf tag. + p.OrigName = oneof } prop.Prop[i] = p prop.order[i] = i @@ -783,7 +806,7 @@ func getPropertiesLocked(t reflect.Type) *StructProperties { } print("\n") } - if p.enc == nil && !strings.HasPrefix(f.Name, "XXX_") && !oneof { + if p.enc == nil && !strings.HasPrefix(f.Name, "XXX_") && oneof == "" { fmt.Fprintln(os.Stderr, "proto: no encoder for", f.Name, f.Type.String(), "[GetProperties]") } } @@ -917,7 +940,29 @@ func RegisterType(x Message, name string) { } // MessageName returns the fully-qualified proto name for the given message type. -func MessageName(x Message) string { return revProtoTypes[reflect.TypeOf(x)] } +func MessageName(x Message) string { + type xname interface { + XXX_MessageName() string + } + if m, ok := x.(xname); ok { + return m.XXX_MessageName() + } + return revProtoTypes[reflect.TypeOf(x)] +} // MessageType returns the message type (pointer to struct) for a named message. func MessageType(name string) reflect.Type { return protoTypes[name] } + +// A registry of all linked proto files. +var ( + protoFiles = make(map[string][]byte) // file name => fileDescriptor +) + +// RegisterFile is called from generated code and maps from the +// full file name of a .proto file to its compressed FileDescriptorProto. +func RegisterFile(filename string, fileDescriptor []byte) { + protoFiles[filename] = fileDescriptor +} + +// FileDescriptor returns the compressed FileDescriptorProto for a .proto file. +func FileDescriptor(filename string) []byte { return protoFiles[filename] } diff --git a/vendor/github.com/gogo/protobuf/proto/properties_gogo.go b/vendor/github.com/gogo/protobuf/proto/properties_gogo.go index 8daf9f776..b6b7176c5 100644 --- a/vendor/github.com/gogo/protobuf/proto/properties_gogo.go +++ b/vendor/github.com/gogo/protobuf/proto/properties_gogo.go @@ -1,5 +1,7 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -49,6 +51,51 @@ func (p *Properties) setCustomEncAndDec(typ reflect.Type) { } } +func (p *Properties) setDurationEncAndDec(typ reflect.Type) { + if p.Repeated { + if typ.Elem().Kind() == reflect.Ptr { + p.enc = (*Buffer).enc_slice_duration + p.dec = (*Buffer).dec_slice_duration + p.size = size_slice_duration + } else { + p.enc = (*Buffer).enc_slice_ref_duration + p.dec = (*Buffer).dec_slice_ref_duration + p.size = size_slice_ref_duration + } + } else if typ.Kind() == reflect.Ptr { + p.enc = (*Buffer).enc_duration + p.dec = (*Buffer).dec_duration + p.size = size_duration + } else { + p.enc = (*Buffer).enc_ref_duration + p.dec = (*Buffer).dec_ref_duration + p.size = size_ref_duration + } +} + +func (p *Properties) setTimeEncAndDec(typ reflect.Type) { + if p.Repeated { + if typ.Elem().Kind() == reflect.Ptr { + p.enc = (*Buffer).enc_slice_time + p.dec = (*Buffer).dec_slice_time + p.size = size_slice_time + } else { + p.enc = (*Buffer).enc_slice_ref_time + p.dec = (*Buffer).dec_slice_ref_time + p.size = size_slice_ref_time + } + } else if typ.Kind() == reflect.Ptr { + p.enc = (*Buffer).enc_time + p.dec = (*Buffer).dec_time + p.size = size_time + } else { + p.enc = (*Buffer).enc_ref_time + p.dec = (*Buffer).dec_ref_time + p.size = size_ref_time + } + +} + func (p *Properties) setSliceOfNonPointerStructs(typ reflect.Type) { t2 := typ.Elem() p.sstype = typ diff --git a/vendor/github.com/gogo/protobuf/proto/skip_gogo.go b/vendor/github.com/gogo/protobuf/proto/skip_gogo.go index 4fe7e0815..5a5fd93f7 100644 --- a/vendor/github.com/gogo/protobuf/proto/skip_gogo.go +++ b/vendor/github.com/gogo/protobuf/proto/skip_gogo.go @@ -1,5 +1,7 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/vendor/github.com/gogo/protobuf/proto/text.go b/vendor/github.com/gogo/protobuf/proto/text.go index b60be28ab..d63732fcb 100644 --- a/vendor/github.com/gogo/protobuf/proto/text.go +++ b/vendor/github.com/gogo/protobuf/proto/text.go @@ -1,7 +1,7 @@ -// Extensions for Protocol Buffers to create more go like structures. +// Protocol Buffers for Go with Gadgets // -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf // // Go support for Protocol Buffers - Google's data interchange format // @@ -50,6 +50,8 @@ import ( "reflect" "sort" "strings" + "sync" + "time" ) var ( @@ -159,7 +161,7 @@ func (w *textWriter) indent() { w.ind++ } func (w *textWriter) unindent() { if w.ind == 0 { - log.Printf("proto: textWriter unindented too far") + log.Print("proto: textWriter unindented too far") return } w.ind-- @@ -180,7 +182,93 @@ type raw interface { Bytes() []byte } -func writeStruct(w *textWriter, sv reflect.Value) error { +func requiresQuotes(u string) bool { + // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. + for _, ch := range u { + switch { + case ch == '.' || ch == '/' || ch == '_': + continue + case '0' <= ch && ch <= '9': + continue + case 'A' <= ch && ch <= 'Z': + continue + case 'a' <= ch && ch <= 'z': + continue + default: + return true + } + } + return false +} + +// isAny reports whether sv is a google.protobuf.Any message +func isAny(sv reflect.Value) bool { + type wkt interface { + XXX_WellKnownType() string + } + t, ok := sv.Addr().Interface().(wkt) + return ok && t.XXX_WellKnownType() == "Any" +} + +// writeProto3Any writes an expanded google.protobuf.Any message. +// +// It returns (false, nil) if sv value can't be unmarshaled (e.g. because +// required messages are not linked in). +// +// It returns (true, error) when sv was written in expanded format or an error +// was encountered. +func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) { + turl := sv.FieldByName("TypeUrl") + val := sv.FieldByName("Value") + if !turl.IsValid() || !val.IsValid() { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + b, ok := val.Interface().([]byte) + if !ok { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + parts := strings.Split(turl.String(), "/") + mt := MessageType(parts[len(parts)-1]) + if mt == nil { + return false, nil + } + m := reflect.New(mt.Elem()) + if err := Unmarshal(b, m.Interface().(Message)); err != nil { + return false, nil + } + w.Write([]byte("[")) + u := turl.String() + if requiresQuotes(u) { + writeString(w, u) + } else { + w.Write([]byte(u)) + } + if w.compact { + w.Write([]byte("]:<")) + } else { + w.Write([]byte("]: <\n")) + w.ind++ + } + if err := tm.writeStruct(w, m.Elem()); err != nil { + return true, err + } + if w.compact { + w.Write([]byte("> ")) + } else { + w.ind-- + w.Write([]byte(">\n")) + } + return true, nil +} + +func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { + if tm.ExpandAny && isAny(sv) { + if canExpand, err := tm.writeProto3Any(w, sv); canExpand { + return err + } + } st := sv.Type() sprops := GetProperties(st) for i := 0; i < sv.NumField(); i++ { @@ -233,10 +321,10 @@ func writeStruct(w *textWriter, sv reflect.Value) error { continue } if len(props.Enum) > 0 { - if err := writeEnum(w, v, props); err != nil { + if err := tm.writeEnum(w, v, props); err != nil { return err } - } else if err := writeAny(w, v, props); err != nil { + } else if err := tm.writeAny(w, v, props); err != nil { return err } if err := w.WriteByte('\n'); err != nil { @@ -278,7 +366,7 @@ func writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if err := writeAny(w, key, props.mkeyprop); err != nil { + if err := tm.writeAny(w, key, props.mkeyprop); err != nil { return err } if err := w.WriteByte('\n'); err != nil { @@ -295,7 +383,7 @@ func writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if err := writeAny(w, val, props.mvalprop); err != nil { + if err := tm.writeAny(w, val, props.mvalprop); err != nil { return err } if err := w.WriteByte('\n'); err != nil { @@ -367,10 +455,10 @@ func writeStruct(w *textWriter, sv reflect.Value) error { } if len(props.Enum) > 0 { - if err := writeEnum(w, fv, props); err != nil { + if err := tm.writeEnum(w, fv, props); err != nil { return err } - } else if err := writeAny(w, fv, props); err != nil { + } else if err := tm.writeAny(w, fv, props); err != nil { return err } @@ -387,8 +475,8 @@ func writeStruct(w *textWriter, sv reflect.Value) error { pv = reflect.New(sv.Type()) pv.Elem().Set(sv) } - if pv.Type().Implements(extendableProtoType) { - if err := writeExtensions(w, pv); err != nil { + if pv.Type().Implements(extensionRangeType) { + if err := tm.writeExtensions(w, pv); err != nil { return err } } @@ -418,20 +506,45 @@ func writeRaw(w *textWriter, b []byte) error { } // writeAny writes an arbitrary field. -func writeAny(w *textWriter, v reflect.Value, props *Properties) error { +func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { v = reflect.Indirect(v) - if props != nil && len(props.CustomType) > 0 { - custom, ok := v.Interface().(Marshaler) - if ok { - data, err := custom.Marshal() + if props != nil { + if len(props.CustomType) > 0 { + custom, ok := v.Interface().(Marshaler) + if ok { + data, err := custom.Marshal() + if err != nil { + return err + } + if err := writeString(w, string(data)); err != nil { + return err + } + return nil + } + } else if props.StdTime { + t, ok := v.Interface().(time.Time) + if !ok { + return fmt.Errorf("stdtime is not time.Time, but %T", v.Interface()) + } + tproto, err := timestampProto(t) if err != nil { return err } - if err := writeString(w, string(data)); err != nil { - return err + props.StdTime = false + err = tm.writeAny(w, reflect.ValueOf(tproto), props) + props.StdTime = true + return err + } else if props.StdDuration { + d, ok := v.Interface().(time.Duration) + if !ok { + return fmt.Errorf("stdtime is not time.Duration, but %T", v.Interface()) } - return nil + dproto := durationProto(d) + props.StdDuration = false + err := tm.writeAny(w, reflect.ValueOf(dproto), props) + props.StdDuration = true + return err } } @@ -481,15 +594,15 @@ func writeAny(w *textWriter, v reflect.Value, props *Properties) error { } } w.indent() - if tm, ok := v.Interface().(encoding.TextMarshaler); ok { - text, err := tm.MarshalText() + if etm, ok := v.Interface().(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() if err != nil { return err } if _, err = w.Write(text); err != nil { return err } - } else if err := writeStruct(w, v); err != nil { + } else if err := tm.writeStruct(w, v); err != nil { return err } w.unindent() @@ -633,30 +746,39 @@ func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } // writeExtensions writes all the extensions in pv. // pv is assumed to be a pointer to a protocol message struct that is extendable. -func writeExtensions(w *textWriter, pv reflect.Value) error { +func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error { emap := extensionMaps[pv.Type().Elem()] - ep := pv.Interface().(extendableProto) + e := pv.Interface().(Message) - // Order the extensions by ID. - // This isn't strictly necessary, but it will give us - // canonical output, which will also make testing easier. var m map[int32]Extension - if em, ok := ep.(extensionsMap); ok { - m = em.ExtensionMap() - } else if em, ok := ep.(extensionsBytes); ok { + var mu sync.Locker + if em, ok := e.(extensionsBytes); ok { eb := em.GetExtensions() var err error m, err = BytesToExtensionsMap(*eb) if err != nil { return err } + mu = notLocker{} + } else if _, ok := e.(extendableProto); ok { + ep, _ := extendable(e) + m, mu = ep.extensionsRead() + if m == nil { + return nil + } } + // Order the extensions by ID. + // This isn't strictly necessary, but it will give us + // canonical output, which will also make testing easier. + + mu.Lock() ids := make([]int32, 0, len(m)) for id := range m { ids = append(ids, id) } sort.Sort(int32Slice(ids)) + mu.Unlock() for _, extNum := range ids { ext := m[extNum] @@ -672,20 +794,20 @@ func writeExtensions(w *textWriter, pv reflect.Value) error { continue } - pb, err := GetExtension(ep, desc) + pb, err := GetExtension(e, desc) if err != nil { return fmt.Errorf("failed getting extension: %v", err) } // Repeated extensions will appear as a slice. if !desc.repeated() { - if err := writeExtension(w, desc.Name, pb); err != nil { + if err := tm.writeExtension(w, desc.Name, pb); err != nil { return err } } else { v := reflect.ValueOf(pb) for i := 0; i < v.Len(); i++ { - if err := writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { + if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { return err } } @@ -694,7 +816,7 @@ func writeExtensions(w *textWriter, pv reflect.Value) error { return nil } -func writeExtension(w *textWriter, name string, pb interface{}) error { +func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error { if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil { return err } @@ -703,7 +825,7 @@ func writeExtension(w *textWriter, name string, pb interface{}) error { return err } } - if err := writeAny(w, reflect.ValueOf(pb), nil); err != nil { + if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil { return err } if err := w.WriteByte('\n'); err != nil { @@ -730,12 +852,13 @@ func (w *textWriter) writeIndent() { // TextMarshaler is a configurable text format marshaler. type TextMarshaler struct { - Compact bool // use compact text format (one line). + Compact bool // use compact text format (one line). + ExpandAny bool // expand google.protobuf.Any messages of known types } // Marshal writes a given protocol buffer in text format. // The only errors returned are from w. -func (m *TextMarshaler) Marshal(w io.Writer, pb Message) error { +func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error { val := reflect.ValueOf(pb) if pb == nil || val.IsNil() { w.Write([]byte("")) @@ -750,11 +873,11 @@ func (m *TextMarshaler) Marshal(w io.Writer, pb Message) error { aw := &textWriter{ w: ww, complete: true, - compact: m.Compact, + compact: tm.Compact, } - if tm, ok := pb.(encoding.TextMarshaler); ok { - text, err := tm.MarshalText() + if etm, ok := pb.(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() if err != nil { return err } @@ -768,7 +891,7 @@ func (m *TextMarshaler) Marshal(w io.Writer, pb Message) error { } // Dereference the received pointer so we don't have outer < and >. v := reflect.Indirect(val) - if err := writeStruct(aw, v); err != nil { + if err := tm.writeStruct(aw, v); err != nil { return err } if bw != nil { @@ -778,9 +901,9 @@ func (m *TextMarshaler) Marshal(w io.Writer, pb Message) error { } // Text is the same as Marshal, but returns the string directly. -func (m *TextMarshaler) Text(pb Message) string { +func (tm *TextMarshaler) Text(pb Message) string { var buf bytes.Buffer - m.Marshal(&buf, pb) + tm.Marshal(&buf, pb) return buf.String() } diff --git a/vendor/github.com/gogo/protobuf/proto/text_gogo.go b/vendor/github.com/gogo/protobuf/proto/text_gogo.go index cdb23373c..1d6c6aa0e 100644 --- a/vendor/github.com/gogo/protobuf/proto/text_gogo.go +++ b/vendor/github.com/gogo/protobuf/proto/text_gogo.go @@ -1,5 +1,7 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -31,10 +33,10 @@ import ( "reflect" ) -func writeEnum(w *textWriter, v reflect.Value, props *Properties) error { +func (tm *TextMarshaler) writeEnum(w *textWriter, v reflect.Value, props *Properties) error { m, ok := enumStringMaps[props.Enum] if !ok { - if err := writeAny(w, v, props); err != nil { + if err := tm.writeAny(w, v, props); err != nil { return err } } @@ -46,7 +48,7 @@ func writeEnum(w *textWriter, v reflect.Value, props *Properties) error { } s, ok := m[key] if !ok { - if err := writeAny(w, v, props); err != nil { + if err := tm.writeAny(w, v, props); err != nil { return err } } diff --git a/vendor/github.com/gogo/protobuf/proto/text_parser.go b/vendor/github.com/gogo/protobuf/proto/text_parser.go index 61b4bc8cc..9db12e960 100644 --- a/vendor/github.com/gogo/protobuf/proto/text_parser.go +++ b/vendor/github.com/gogo/protobuf/proto/text_parser.go @@ -1,7 +1,7 @@ -// Extensions for Protocol Buffers to create more go like structures. +// Protocol Buffers for Go with Gadgets // -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. -// http://github.com/gogo/protobuf/gogoproto +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf // // Go support for Protocol Buffers - Google's data interchange format // @@ -46,9 +46,13 @@ import ( "reflect" "strconv" "strings" + "time" "unicode/utf8" ) +// Error string emitted when deserializing Any and fields are already set +const anyRepeatedlyUnpacked = "Any message unpacked multiple times, or %q already set" + type ParseError struct { Message string Line int // 1-based line number @@ -168,7 +172,7 @@ func (p *textParser) advance() { p.cur.offset, p.cur.line = p.offset, p.line p.cur.unquoted = "" switch p.s[0] { - case '<', '>', '{', '}', ':', '[', ']', ';', ',': + case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/': // Single symbol p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] case '"', '\'': @@ -456,7 +460,10 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { fieldSet := make(map[string]bool) // A struct is a sequence of "name: value", terminated by one of // '>' or '}', or the end of the input. A name may also be - // "[extension]". + // "[extension]" or "[type/url]". + // + // The whole struct can also be an expanded Any message, like: + // [type/url] < ... struct contents ... > for { tok := p.next() if tok.err != nil { @@ -466,33 +473,74 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { break } if tok.value == "[" { - // Looks like an extension. + // Looks like an extension or an Any. // // TODO: Check whether we need to handle // namespace rooted names (e.g. ".something.Foo"). - tok = p.next() - if tok.err != nil { - return tok.err + extName, err := p.consumeExtName() + if err != nil { + return err } + + if s := strings.LastIndex(extName, "/"); s >= 0 { + // If it contains a slash, it's an Any type URL. + messageName := extName[s+1:] + mt := MessageType(messageName) + if mt == nil { + return p.errorf("unrecognized message %q in google.protobuf.Any", messageName) + } + tok = p.next() + if tok.err != nil { + return tok.err + } + // consume an optional colon + if tok.value == ":" { + tok = p.next() + if tok.err != nil { + return tok.err + } + } + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + v := reflect.New(mt.Elem()) + if pe := p.readStruct(v.Elem(), terminator); pe != nil { + return pe + } + b, err := Marshal(v.Interface().(Message)) + if err != nil { + return p.errorf("failed to marshal message of type %q: %v", messageName, err) + } + if fieldSet["type_url"] { + return p.errorf(anyRepeatedlyUnpacked, "type_url") + } + if fieldSet["value"] { + return p.errorf(anyRepeatedlyUnpacked, "value") + } + sv.FieldByName("TypeUrl").SetString(extName) + sv.FieldByName("Value").SetBytes(b) + fieldSet["type_url"] = true + fieldSet["value"] = true + continue + } + var desc *ExtensionDesc // This could be faster, but it's functional. // TODO: Do something smarter than a linear scan. for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) { - if d.Name == tok.value { + if d.Name == extName { desc = d break } } if desc == nil { - return p.errorf("unrecognized extension %q", tok.value) - } - // Check the extension terminator. - tok = p.next() - if tok.err != nil { - return tok.err - } - if tok.value != "]" { - return p.errorf("unrecognized extension terminator %q", tok.value) + return p.errorf("unrecognized extension %q", extName) } props := &Properties{} @@ -519,7 +567,7 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { } reqFieldErr = err } - ep := sv.Addr().Interface().(extendableProto) + ep := sv.Addr().Interface().(Message) if !rep { SetExtension(ep, desc, ext.Interface()) } else { @@ -550,7 +598,11 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { props = oop.Prop nv := reflect.New(oop.Type.Elem()) dst = nv.Elem().Field(0) - sv.Field(oop.Field).Set(nv) + field := sv.Field(oop.Field) + if !field.IsNil() { + return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name) + } + field.Set(nv) } if !dst.IsValid() { return p.errorf("unknown field name %q in %v", name, st) @@ -571,8 +623,9 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { // The map entry should be this sequence of tokens: // < key : KEY value : VALUE > - // Technically the "key" and "value" could come in any order, - // but in practice they won't. + // However, implementations may omit key or value, and technically + // we should support them in any order. See b/28924776 for a time + // this went wrong. tok := p.next() var terminator string @@ -584,32 +637,39 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { default: return p.errorf("expected '{' or '<', found %q", tok.value) } - if err := p.consumeToken("key"); err != nil { - return err - } - if err := p.consumeToken(":"); err != nil { - return err - } - if err := p.readAny(key, props.mkeyprop); err != nil { - return err - } - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - if err := p.consumeToken("value"); err != nil { - return err - } - if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { - return err - } - if err := p.readAny(val, props.mvalprop); err != nil { - return err - } - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - if err := p.consumeToken(terminator); err != nil { - return err + for { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == terminator { + break + } + switch tok.value { + case "key": + if err := p.consumeToken(":"); err != nil { + return err + } + if err := p.readAny(key, props.mkeyprop); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + case "value": + if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { + return err + } + if err := p.readAny(val, props.mvalprop); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + default: + p.back() + return p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value) + } } dst.SetMapIndex(key, val) @@ -632,7 +692,8 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { return err } reqFieldErr = err - } else if props.Required { + } + if props.Required { reqCount-- } @@ -648,6 +709,35 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { return reqFieldErr } +// consumeExtName consumes extension name or expanded Any type URL and the +// following ']'. It returns the name or URL consumed. +func (p *textParser) consumeExtName() (string, error) { + tok := p.next() + if tok.err != nil { + return "", tok.err + } + + // If extension name or type url is quoted, it's a single token. + if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] { + name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0])) + if err != nil { + return "", err + } + return name, p.consumeToken("]") + } + + // Consume everything up to "]" + var parts []string + for tok.value != "]" { + parts = append(parts, tok.value) + tok = p.next() + if tok.err != nil { + return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) + } + } + return strings.Join(parts, ""), nil +} + // consumeOptionalSeparator consumes an optional semicolon or comma. // It is used in readStruct to provide backward compatibility. func (p *textParser) consumeOptionalSeparator() error { @@ -708,6 +798,80 @@ func (p *textParser) readAny(v reflect.Value, props *Properties) error { } return nil } + if props.StdTime { + fv := v + p.back() + props.StdTime = false + tproto := ×tamp{} + err := p.readAny(reflect.ValueOf(tproto).Elem(), props) + props.StdTime = true + if err != nil { + return err + } + tim, err := timestampFromProto(tproto) + if err != nil { + return err + } + if props.Repeated { + t := reflect.TypeOf(v.Interface()) + if t.Kind() == reflect.Slice { + if t.Elem().Kind() == reflect.Ptr { + ts := fv.Interface().([]*time.Time) + ts = append(ts, &tim) + fv.Set(reflect.ValueOf(ts)) + return nil + } else { + ts := fv.Interface().([]time.Time) + ts = append(ts, tim) + fv.Set(reflect.ValueOf(ts)) + return nil + } + } + } + if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { + v.Set(reflect.ValueOf(&tim)) + } else { + v.Set(reflect.Indirect(reflect.ValueOf(&tim))) + } + return nil + } + if props.StdDuration { + fv := v + p.back() + props.StdDuration = false + dproto := &duration{} + err := p.readAny(reflect.ValueOf(dproto).Elem(), props) + props.StdDuration = true + if err != nil { + return err + } + dur, err := durationFromProto(dproto) + if err != nil { + return err + } + if props.Repeated { + t := reflect.TypeOf(v.Interface()) + if t.Kind() == reflect.Slice { + if t.Elem().Kind() == reflect.Ptr { + ds := fv.Interface().([]*time.Duration) + ds = append(ds, &dur) + fv.Set(reflect.ValueOf(ds)) + return nil + } else { + ds := fv.Interface().([]time.Duration) + ds = append(ds, dur) + fv.Set(reflect.ValueOf(ds)) + return nil + } + } + } + if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { + v.Set(reflect.ValueOf(&dur)) + } else { + v.Set(reflect.Indirect(reflect.ValueOf(&dur))) + } + return nil + } switch fv := v; fv.Kind() { case reflect.Slice: at := v.Type() @@ -750,12 +914,12 @@ func (p *textParser) readAny(v reflect.Value, props *Properties) error { fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) return p.readAny(fv.Index(fv.Len()-1), props) case reflect.Bool: - // Either "true", "false", 1 or 0. + // true/1/t/True or false/f/0/False. switch tok.value { - case "true", "1": + case "true", "1", "t", "True": fv.SetBool(true) return nil - case "false", "0": + case "false", "0", "f", "False": fv.SetBool(false) return nil } diff --git a/vendor/github.com/gogo/protobuf/proto/timestamp.go b/vendor/github.com/gogo/protobuf/proto/timestamp.go new file mode 100644 index 000000000..9324f6542 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/timestamp.go @@ -0,0 +1,113 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +// This file implements operations on google.protobuf.Timestamp. + +import ( + "errors" + "fmt" + "time" +) + +const ( + // Seconds field of the earliest valid Timestamp. + // This is time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + minValidSeconds = -62135596800 + // Seconds field just after the latest valid Timestamp. + // This is time.Date(10000, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + maxValidSeconds = 253402300800 +) + +// validateTimestamp determines whether a Timestamp is valid. +// A valid timestamp represents a time in the range +// [0001-01-01, 10000-01-01) and has a Nanos field +// in the range [0, 1e9). +// +// If the Timestamp is valid, validateTimestamp returns nil. +// Otherwise, it returns an error that describes +// the problem. +// +// Every valid Timestamp can be represented by a time.Time, but the converse is not true. +func validateTimestamp(ts *timestamp) error { + if ts == nil { + return errors.New("timestamp: nil Timestamp") + } + if ts.Seconds < minValidSeconds { + return fmt.Errorf("timestamp: %#v before 0001-01-01", ts) + } + if ts.Seconds >= maxValidSeconds { + return fmt.Errorf("timestamp: %#v after 10000-01-01", ts) + } + if ts.Nanos < 0 || ts.Nanos >= 1e9 { + return fmt.Errorf("timestamp: %#v: nanos not in range [0, 1e9)", ts) + } + return nil +} + +// TimestampFromProto converts a google.protobuf.Timestamp proto to a time.Time. +// It returns an error if the argument is invalid. +// +// Unlike most Go functions, if Timestamp returns an error, the first return value +// is not the zero time.Time. Instead, it is the value obtained from the +// time.Unix function when passed the contents of the Timestamp, in the UTC +// locale. This may or may not be a meaningful time; many invalid Timestamps +// do map to valid time.Times. +// +// A nil Timestamp returns an error. The first return value in that case is +// undefined. +func timestampFromProto(ts *timestamp) (time.Time, error) { + // Don't return the zero value on error, because corresponds to a valid + // timestamp. Instead return whatever time.Unix gives us. + var t time.Time + if ts == nil { + t = time.Unix(0, 0).UTC() // treat nil like the empty Timestamp + } else { + t = time.Unix(ts.Seconds, int64(ts.Nanos)).UTC() + } + return t, validateTimestamp(ts) +} + +// TimestampProto converts the time.Time to a google.protobuf.Timestamp proto. +// It returns an error if the resulting Timestamp is invalid. +func timestampProto(t time.Time) (*timestamp, error) { + seconds := t.Unix() + nanos := int32(t.Sub(time.Unix(seconds, 0))) + ts := ×tamp{ + Seconds: seconds, + Nanos: nanos, + } + if err := validateTimestamp(ts); err != nil { + return nil, err + } + return ts, nil +} diff --git a/vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go b/vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go new file mode 100644 index 000000000..d42764743 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go @@ -0,0 +1,229 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "reflect" + "time" +) + +var timeType = reflect.TypeOf((*time.Time)(nil)).Elem() + +type timestamp struct { + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` +} + +func (m *timestamp) Reset() { *m = timestamp{} } +func (*timestamp) ProtoMessage() {} +func (*timestamp) String() string { return "timestamp" } + +func init() { + RegisterType((*timestamp)(nil), "gogo.protobuf.proto.timestamp") +} + +func (o *Buffer) decTimestamp() (time.Time, error) { + b, err := o.DecodeRawBytes(true) + if err != nil { + return time.Time{}, err + } + tproto := ×tamp{} + if err := Unmarshal(b, tproto); err != nil { + return time.Time{}, err + } + return timestampFromProto(tproto) +} + +func (o *Buffer) dec_time(p *Properties, base structPointer) error { + t, err := o.decTimestamp() + if err != nil { + return err + } + setPtrCustomType(base, p.field, &t) + return nil +} + +func (o *Buffer) dec_ref_time(p *Properties, base structPointer) error { + t, err := o.decTimestamp() + if err != nil { + return err + } + setCustomType(base, p.field, &t) + return nil +} + +func (o *Buffer) dec_slice_time(p *Properties, base structPointer) error { + t, err := o.decTimestamp() + if err != nil { + return err + } + newBas := appendStructPointer(base, p.field, reflect.SliceOf(reflect.PtrTo(timeType))) + var zero field + setPtrCustomType(newBas, zero, &t) + return nil +} + +func (o *Buffer) dec_slice_ref_time(p *Properties, base structPointer) error { + t, err := o.decTimestamp() + if err != nil { + return err + } + newBas := appendStructPointer(base, p.field, reflect.SliceOf(timeType)) + var zero field + setCustomType(newBas, zero, &t) + return nil +} + +func size_time(p *Properties, base structPointer) (n int) { + structp := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(structp) { + return 0 + } + tim := structPointer_Interface(structp, timeType).(*time.Time) + t, err := timestampProto(*tim) + if err != nil { + return 0 + } + size := Size(t) + return size + sizeVarint(uint64(size)) + len(p.tagcode) +} + +func (o *Buffer) enc_time(p *Properties, base structPointer) error { + structp := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(structp) { + return ErrNil + } + tim := structPointer_Interface(structp, timeType).(*time.Time) + t, err := timestampProto(*tim) + if err != nil { + return err + } + data, err := Marshal(t) + if err != nil { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + return nil +} + +func size_ref_time(p *Properties, base structPointer) (n int) { + tim := structPointer_InterfaceAt(base, p.field, timeType).(*time.Time) + t, err := timestampProto(*tim) + if err != nil { + return 0 + } + size := Size(t) + return size + sizeVarint(uint64(size)) + len(p.tagcode) +} + +func (o *Buffer) enc_ref_time(p *Properties, base structPointer) error { + tim := structPointer_InterfaceAt(base, p.field, timeType).(*time.Time) + t, err := timestampProto(*tim) + if err != nil { + return err + } + data, err := Marshal(t) + if err != nil { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + return nil +} + +func size_slice_time(p *Properties, base structPointer) (n int) { + ptims := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(reflect.PtrTo(timeType))).(*[]*time.Time) + tims := *ptims + for i := 0; i < len(tims); i++ { + if tims[i] == nil { + return 0 + } + tproto, err := timestampProto(*tims[i]) + if err != nil { + return 0 + } + size := Size(tproto) + n += len(p.tagcode) + size + sizeVarint(uint64(size)) + } + return n +} + +func (o *Buffer) enc_slice_time(p *Properties, base structPointer) error { + ptims := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(reflect.PtrTo(timeType))).(*[]*time.Time) + tims := *ptims + for i := 0; i < len(tims); i++ { + if tims[i] == nil { + return errRepeatedHasNil + } + tproto, err := timestampProto(*tims[i]) + if err != nil { + return err + } + data, err := Marshal(tproto) + if err != nil { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + } + return nil +} + +func size_slice_ref_time(p *Properties, base structPointer) (n int) { + ptims := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(timeType)).(*[]time.Time) + tims := *ptims + for i := 0; i < len(tims); i++ { + tproto, err := timestampProto(tims[i]) + if err != nil { + return 0 + } + size := Size(tproto) + n += len(p.tagcode) + size + sizeVarint(uint64(size)) + } + return n +} + +func (o *Buffer) enc_slice_ref_time(p *Properties, base structPointer) error { + ptims := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(timeType)).(*[]time.Time) + tims := *ptims + for i := 0; i < len(tims); i++ { + tproto, err := timestampProto(tims[i]) + if err != nil { + return err + } + data, err := Marshal(tproto) + if err != nil { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + } + return nil +} diff --git a/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go b/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go index c52878dd5..ceadde6a5 100644 --- a/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go +++ b/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go @@ -1,4 +1,6 @@ -// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. // http://github.com/gogo/protobuf // // Redistribution and use in source and binary forms, with or without diff --git a/vendor/github.com/jonboulle/clockwork/LICENSE b/vendor/github.com/jonboulle/clockwork/LICENSE deleted file mode 100644 index 5c304d1a4..000000000 --- a/vendor/github.com/jonboulle/clockwork/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/jonboulle/clockwork/clockwork.go b/vendor/github.com/jonboulle/clockwork/clockwork.go deleted file mode 100644 index 4b6918b52..000000000 --- a/vendor/github.com/jonboulle/clockwork/clockwork.go +++ /dev/null @@ -1,161 +0,0 @@ -package clockwork - -import ( - "sync" - "time" -) - -// Clock provides an interface that packages can use instead of directly -// using the time module, so that chronology-related behavior can be tested -type Clock interface { - After(d time.Duration) <-chan time.Time - Sleep(d time.Duration) - Now() time.Time -} - -// FakeClock provides an interface for a clock which can be -// manually advanced through time -type FakeClock interface { - Clock - // Advance advances the FakeClock to a new point in time, ensuring any existing - // sleepers are notified appropriately before returning - Advance(d time.Duration) - // BlockUntil will block until the FakeClock has the given number of - // sleepers (callers of Sleep or After) - BlockUntil(n int) -} - -// NewRealClock returns a Clock which simply delegates calls to the actual time -// package; it should be used by packages in production. -func NewRealClock() Clock { - return &realClock{} -} - -// NewFakeClock returns a FakeClock implementation which can be -// manually advanced through time for testing. -func NewFakeClock() FakeClock { - return &fakeClock{ - l: sync.RWMutex{}, - } -} - -type realClock struct{} - -func (rc *realClock) After(d time.Duration) <-chan time.Time { - return time.After(d) -} - -func (rc *realClock) Sleep(d time.Duration) { - time.Sleep(d) -} - -func (rc *realClock) Now() time.Time { - return time.Now() -} - -type fakeClock struct { - sleepers []*sleeper - blockers []*blocker - time time.Time - - l sync.RWMutex -} - -// sleeper represents a caller of After or Sleep -type sleeper struct { - until time.Time - done chan time.Time -} - -// blocker represents a caller of BlockUntil -type blocker struct { - count int - ch chan struct{} -} - -// After mimics time.After; it waits for the given duration to elapse on the -// fakeClock, then sends the current time on the returned channel. -func (fc *fakeClock) After(d time.Duration) <-chan time.Time { - fc.l.Lock() - defer fc.l.Unlock() - now := fc.time - done := make(chan time.Time, 1) - if d.Nanoseconds() == 0 { - // special case - trigger immediately - done <- now - } else { - // otherwise, add to the set of sleepers - s := &sleeper{ - until: now.Add(d), - done: done, - } - fc.sleepers = append(fc.sleepers, s) - // and notify any blockers - fc.blockers = notifyBlockers(fc.blockers, len(fc.sleepers)) - } - return done -} - -// notifyBlockers notifies all the blockers waiting until the -// given number of sleepers are waiting on the fakeClock. It -// returns an updated slice of blockers (i.e. those still waiting) -func notifyBlockers(blockers []*blocker, count int) (newBlockers []*blocker) { - for _, b := range blockers { - if b.count == count { - close(b.ch) - } else { - newBlockers = append(newBlockers, b) - } - } - return -} - -// Sleep blocks until the given duration has passed on the fakeClock -func (fc *fakeClock) Sleep(d time.Duration) { - <-fc.After(d) -} - -// Time returns the current time of the fakeClock -func (fc *fakeClock) Now() time.Time { - fc.l.Lock() - defer fc.l.Unlock() - return fc.time -} - -// Advance advances fakeClock to a new point in time, ensuring channels from any -// previous invocations of After are notified appropriately before returning -func (fc *fakeClock) Advance(d time.Duration) { - fc.l.Lock() - defer fc.l.Unlock() - end := fc.time.Add(d) - var newSleepers []*sleeper - for _, s := range fc.sleepers { - if end.Sub(s.until) >= 0 { - s.done <- end - } else { - newSleepers = append(newSleepers, s) - } - } - fc.sleepers = newSleepers - fc.blockers = notifyBlockers(fc.blockers, len(fc.sleepers)) - fc.time = end -} - -// BlockUntil will block until the fakeClock has the given number of sleepers -// (callers of Sleep or After) -func (fc *fakeClock) BlockUntil(n int) { - fc.l.Lock() - // Fast path: current number of sleepers is what we're looking for - if len(fc.sleepers) == n { - fc.l.Unlock() - return - } - // Otherwise, set up a new blocker - b := &blocker{ - count: n, - ch: make(chan struct{}), - } - fc.blockers = append(fc.blockers, b) - fc.l.Unlock() - <-b.ch -} diff --git a/vendor/github.com/pborman/uuid/CONTRIBUTORS b/vendor/github.com/pborman/uuid/CONTRIBUTORS deleted file mode 100644 index b382a04ed..000000000 --- a/vendor/github.com/pborman/uuid/CONTRIBUTORS +++ /dev/null @@ -1 +0,0 @@ -Paul Borman diff --git a/vendor/github.com/pborman/uuid/LICENSE b/vendor/github.com/pborman/uuid/LICENSE deleted file mode 100644 index 5dc68268d..000000000 --- a/vendor/github.com/pborman/uuid/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009,2014 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/pborman/uuid/dce.go b/vendor/github.com/pborman/uuid/dce.go deleted file mode 100755 index 50a0f2d09..000000000 --- a/vendor/github.com/pborman/uuid/dce.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uuid - -import ( - "encoding/binary" - "fmt" - "os" -) - -// A Domain represents a Version 2 domain -type Domain byte - -// Domain constants for DCE Security (Version 2) UUIDs. -const ( - Person = Domain(0) - Group = Domain(1) - Org = Domain(2) -) - -// NewDCESecurity returns a DCE Security (Version 2) UUID. -// -// The domain should be one of Person, Group or Org. -// On a POSIX system the id should be the users UID for the Person -// domain and the users GID for the Group. The meaning of id for -// the domain Org or on non-POSIX systems is site defined. -// -// For a given domain/id pair the same token may be returned for up to -// 7 minutes and 10 seconds. -func NewDCESecurity(domain Domain, id uint32) UUID { - uuid := NewUUID() - if uuid != nil { - uuid[6] = (uuid[6] & 0x0f) | 0x20 // Version 2 - uuid[9] = byte(domain) - binary.BigEndian.PutUint32(uuid[0:], id) - } - return uuid -} - -// NewDCEPerson returns a DCE Security (Version 2) UUID in the person -// domain with the id returned by os.Getuid. -// -// NewDCEPerson(Person, uint32(os.Getuid())) -func NewDCEPerson() UUID { - return NewDCESecurity(Person, uint32(os.Getuid())) -} - -// NewDCEGroup returns a DCE Security (Version 2) UUID in the group -// domain with the id returned by os.Getgid. -// -// NewDCEGroup(Group, uint32(os.Getgid())) -func NewDCEGroup() UUID { - return NewDCESecurity(Group, uint32(os.Getgid())) -} - -// Domain returns the domain for a Version 2 UUID or false. -func (uuid UUID) Domain() (Domain, bool) { - if v, _ := uuid.Version(); v != 2 { - return 0, false - } - return Domain(uuid[9]), true -} - -// Id returns the id for a Version 2 UUID or false. -func (uuid UUID) Id() (uint32, bool) { - if v, _ := uuid.Version(); v != 2 { - return 0, false - } - return binary.BigEndian.Uint32(uuid[0:4]), true -} - -func (d Domain) String() string { - switch d { - case Person: - return "Person" - case Group: - return "Group" - case Org: - return "Org" - } - return fmt.Sprintf("Domain%d", int(d)) -} diff --git a/vendor/github.com/pborman/uuid/doc.go b/vendor/github.com/pborman/uuid/doc.go deleted file mode 100755 index d8bd013e6..000000000 --- a/vendor/github.com/pborman/uuid/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// The uuid package generates and inspects UUIDs. -// -// UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security Services. -package uuid diff --git a/vendor/github.com/pborman/uuid/hash.go b/vendor/github.com/pborman/uuid/hash.go deleted file mode 100644 index cdd4192fd..000000000 --- a/vendor/github.com/pborman/uuid/hash.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uuid - -import ( - "crypto/md5" - "crypto/sha1" - "hash" -) - -// Well known Name Space IDs and UUIDs -var ( - NameSpace_DNS = Parse("6ba7b810-9dad-11d1-80b4-00c04fd430c8") - NameSpace_URL = Parse("6ba7b811-9dad-11d1-80b4-00c04fd430c8") - NameSpace_OID = Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8") - NameSpace_X500 = Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8") - NIL = Parse("00000000-0000-0000-0000-000000000000") -) - -// NewHash returns a new UUID dervied from the hash of space concatenated with -// data generated by h. The hash should be at least 16 byte in length. The -// first 16 bytes of the hash are used to form the UUID. The version of the -// UUID will be the lower 4 bits of version. NewHash is used to implement -// NewMD5 and NewSHA1. -func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID { - h.Reset() - h.Write(space) - h.Write([]byte(data)) - s := h.Sum(nil) - uuid := make([]byte, 16) - copy(uuid, s) - uuid[6] = (uuid[6] & 0x0f) | uint8((version&0xf)<<4) - uuid[8] = (uuid[8] & 0x3f) | 0x80 // RFC 4122 variant - return uuid -} - -// NewMD5 returns a new MD5 (Version 3) UUID based on the -// supplied name space and data. -// -// NewHash(md5.New(), space, data, 3) -func NewMD5(space UUID, data []byte) UUID { - return NewHash(md5.New(), space, data, 3) -} - -// NewSHA1 returns a new SHA1 (Version 5) UUID based on the -// supplied name space and data. -// -// NewHash(sha1.New(), space, data, 5) -func NewSHA1(space UUID, data []byte) UUID { - return NewHash(sha1.New(), space, data, 5) -} diff --git a/vendor/github.com/pborman/uuid/json.go b/vendor/github.com/pborman/uuid/json.go deleted file mode 100644 index 760580a50..000000000 --- a/vendor/github.com/pborman/uuid/json.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2014 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uuid - -import "errors" - -func (u UUID) MarshalJSON() ([]byte, error) { - if len(u) == 0 { - return []byte(`""`), nil - } - return []byte(`"` + u.String() + `"`), nil -} - -func (u *UUID) UnmarshalJSON(data []byte) error { - if len(data) == 0 || string(data) == `""` { - return nil - } - if len(data) < 2 || data[0] != '"' || data[len(data)-1] != '"' { - return errors.New("invalid UUID format") - } - data = data[1 : len(data)-1] - uu := Parse(string(data)) - if uu == nil { - return errors.New("invalid UUID format") - } - *u = uu - return nil -} diff --git a/vendor/github.com/pborman/uuid/node.go b/vendor/github.com/pborman/uuid/node.go deleted file mode 100755 index dd0a8ac18..000000000 --- a/vendor/github.com/pborman/uuid/node.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uuid - -import "net" - -var ( - interfaces []net.Interface // cached list of interfaces - ifname string // name of interface being used - nodeID []byte // hardware for version 1 UUIDs -) - -// NodeInterface returns the name of the interface from which the NodeID was -// derived. The interface "user" is returned if the NodeID was set by -// SetNodeID. -func NodeInterface() string { - return ifname -} - -// SetNodeInterface selects the hardware address to be used for Version 1 UUIDs. -// If name is "" then the first usable interface found will be used or a random -// Node ID will be generated. If a named interface cannot be found then false -// is returned. -// -// SetNodeInterface never fails when name is "". -func SetNodeInterface(name string) bool { - if interfaces == nil { - var err error - interfaces, err = net.Interfaces() - if err != nil && name != "" { - return false - } - } - - for _, ifs := range interfaces { - if len(ifs.HardwareAddr) >= 6 && (name == "" || name == ifs.Name) { - if setNodeID(ifs.HardwareAddr) { - ifname = ifs.Name - return true - } - } - } - - // We found no interfaces with a valid hardware address. If name - // does not specify a specific interface generate a random Node ID - // (section 4.1.6) - if name == "" { - if nodeID == nil { - nodeID = make([]byte, 6) - } - randomBits(nodeID) - return true - } - return false -} - -// NodeID returns a slice of a copy of the current Node ID, setting the Node ID -// if not already set. -func NodeID() []byte { - if nodeID == nil { - SetNodeInterface("") - } - nid := make([]byte, 6) - copy(nid, nodeID) - return nid -} - -// SetNodeID sets the Node ID to be used for Version 1 UUIDs. The first 6 bytes -// of id are used. If id is less than 6 bytes then false is returned and the -// Node ID is not set. -func SetNodeID(id []byte) bool { - if setNodeID(id) { - ifname = "user" - return true - } - return false -} - -func setNodeID(id []byte) bool { - if len(id) < 6 { - return false - } - if nodeID == nil { - nodeID = make([]byte, 6) - } - copy(nodeID, id) - return true -} - -// NodeID returns the 6 byte node id encoded in uuid. It returns nil if uuid is -// not valid. The NodeID is only well defined for version 1 and 2 UUIDs. -func (uuid UUID) NodeID() []byte { - if len(uuid) != 16 { - return nil - } - node := make([]byte, 6) - copy(node, uuid[10:]) - return node -} diff --git a/vendor/github.com/pborman/uuid/time.go b/vendor/github.com/pborman/uuid/time.go deleted file mode 100755 index 7ebc9bef1..000000000 --- a/vendor/github.com/pborman/uuid/time.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2014 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uuid - -import ( - "encoding/binary" - "sync" - "time" -) - -// A Time represents a time as the number of 100's of nanoseconds since 15 Oct -// 1582. -type Time int64 - -const ( - lillian = 2299160 // Julian day of 15 Oct 1582 - unix = 2440587 // Julian day of 1 Jan 1970 - epoch = unix - lillian // Days between epochs - g1582 = epoch * 86400 // seconds between epochs - g1582ns100 = g1582 * 10000000 // 100s of a nanoseconds between epochs -) - -var ( - mu sync.Mutex - lasttime uint64 // last time we returned - clock_seq uint16 // clock sequence for this run - - timeNow = time.Now // for testing -) - -// UnixTime converts t the number of seconds and nanoseconds using the Unix -// epoch of 1 Jan 1970. -func (t Time) UnixTime() (sec, nsec int64) { - sec = int64(t - g1582ns100) - nsec = (sec % 10000000) * 100 - sec /= 10000000 - return sec, nsec -} - -// GetTime returns the current Time (100s of nanoseconds since 15 Oct 1582) and -// clock sequence as well as adjusting the clock sequence as needed. An error -// is returned if the current time cannot be determined. -func GetTime() (Time, uint16, error) { - defer mu.Unlock() - mu.Lock() - return getTime() -} - -func getTime() (Time, uint16, error) { - t := timeNow() - - // If we don't have a clock sequence already, set one. - if clock_seq == 0 { - setClockSequence(-1) - } - now := uint64(t.UnixNano()/100) + g1582ns100 - - // If time has gone backwards with this clock sequence then we - // increment the clock sequence - if now <= lasttime { - clock_seq = ((clock_seq + 1) & 0x3fff) | 0x8000 - } - lasttime = now - return Time(now), clock_seq, nil -} - -// ClockSequence returns the current clock sequence, generating one if not -// already set. The clock sequence is only used for Version 1 UUIDs. -// -// The uuid package does not use global static storage for the clock sequence or -// the last time a UUID was generated. Unless SetClockSequence a new random -// clock sequence is generated the first time a clock sequence is requested by -// ClockSequence, GetTime, or NewUUID. (section 4.2.1.1) sequence is generated -// for -func ClockSequence() int { - defer mu.Unlock() - mu.Lock() - return clockSequence() -} - -func clockSequence() int { - if clock_seq == 0 { - setClockSequence(-1) - } - return int(clock_seq & 0x3fff) -} - -// SetClockSeq sets the clock sequence to the lower 14 bits of seq. Setting to -// -1 causes a new sequence to be generated. -func SetClockSequence(seq int) { - defer mu.Unlock() - mu.Lock() - setClockSequence(seq) -} - -func setClockSequence(seq int) { - if seq == -1 { - var b [2]byte - randomBits(b[:]) // clock sequence - seq = int(b[0])<<8 | int(b[1]) - } - old_seq := clock_seq - clock_seq = uint16(seq&0x3fff) | 0x8000 // Set our variant - if old_seq != clock_seq { - lasttime = 0 - } -} - -// Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in -// uuid. It returns false if uuid is not valid. The time is only well defined -// for version 1 and 2 UUIDs. -func (uuid UUID) Time() (Time, bool) { - if len(uuid) != 16 { - return 0, false - } - time := int64(binary.BigEndian.Uint32(uuid[0:4])) - time |= int64(binary.BigEndian.Uint16(uuid[4:6])) << 32 - time |= int64(binary.BigEndian.Uint16(uuid[6:8])&0xfff) << 48 - return Time(time), true -} - -// ClockSequence returns the clock sequence encoded in uuid. It returns false -// if uuid is not valid. The clock sequence is only well defined for version 1 -// and 2 UUIDs. -func (uuid UUID) ClockSequence() (int, bool) { - if len(uuid) != 16 { - return 0, false - } - return int(binary.BigEndian.Uint16(uuid[8:10])) & 0x3fff, true -} diff --git a/vendor/github.com/pborman/uuid/util.go b/vendor/github.com/pborman/uuid/util.go deleted file mode 100644 index de40b102c..000000000 --- a/vendor/github.com/pborman/uuid/util.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uuid - -import ( - "io" -) - -// randomBits completely fills slice b with random data. -func randomBits(b []byte) { - if _, err := io.ReadFull(rander, b); err != nil { - panic(err.Error()) // rand should never fail - } -} - -// xvalues returns the value of a byte as a hexadecimal digit or 255. -var xvalues = []byte{ - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 255, 255, 255, 255, 255, - 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, -} - -// xtob converts the the first two hex bytes of x into a byte. -func xtob(x string) (byte, bool) { - b1 := xvalues[x[0]] - b2 := xvalues[x[1]] - return (b1 << 4) | b2, b1 != 255 && b2 != 255 -} diff --git a/vendor/github.com/pborman/uuid/uuid.go b/vendor/github.com/pborman/uuid/uuid.go deleted file mode 100755 index 2920fae63..000000000 --- a/vendor/github.com/pborman/uuid/uuid.go +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uuid - -import ( - "bytes" - "crypto/rand" - "fmt" - "io" - "strings" -) - -// A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC -// 4122. -type UUID []byte - -// A Version represents a UUIDs version. -type Version byte - -// A Variant represents a UUIDs variant. -type Variant byte - -// Constants returned by Variant. -const ( - Invalid = Variant(iota) // Invalid UUID - RFC4122 // The variant specified in RFC4122 - Reserved // Reserved, NCS backward compatibility. - Microsoft // Reserved, Microsoft Corporation backward compatibility. - Future // Reserved for future definition. -) - -var rander = rand.Reader // random function - -// New returns a new random (version 4) UUID as a string. It is a convenience -// function for NewRandom().String(). -func New() string { - return NewRandom().String() -} - -// Parse decodes s into a UUID or returns nil. Both the UUID form of -// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and -// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded. -func Parse(s string) UUID { - if len(s) == 36+9 { - if strings.ToLower(s[:9]) != "urn:uuid:" { - return nil - } - s = s[9:] - } else if len(s) != 36 { - return nil - } - if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' { - return nil - } - uuid := make([]byte, 16) - for i, x := range []int{ - 0, 2, 4, 6, - 9, 11, - 14, 16, - 19, 21, - 24, 26, 28, 30, 32, 34} { - if v, ok := xtob(s[x:]); !ok { - return nil - } else { - uuid[i] = v - } - } - return uuid -} - -// Equal returns true if uuid1 and uuid2 are equal. -func Equal(uuid1, uuid2 UUID) bool { - return bytes.Equal(uuid1, uuid2) -} - -// String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -// , or "" if uuid is invalid. -func (uuid UUID) String() string { - if uuid == nil || len(uuid) != 16 { - return "" - } - b := []byte(uuid) - return fmt.Sprintf("%08x-%04x-%04x-%04x-%012x", - b[:4], b[4:6], b[6:8], b[8:10], b[10:]) -} - -// URN returns the RFC 2141 URN form of uuid, -// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, or "" if uuid is invalid. -func (uuid UUID) URN() string { - if uuid == nil || len(uuid) != 16 { - return "" - } - b := []byte(uuid) - return fmt.Sprintf("urn:uuid:%08x-%04x-%04x-%04x-%012x", - b[:4], b[4:6], b[6:8], b[8:10], b[10:]) -} - -// Variant returns the variant encoded in uuid. It returns Invalid if -// uuid is invalid. -func (uuid UUID) Variant() Variant { - if len(uuid) != 16 { - return Invalid - } - switch { - case (uuid[8] & 0xc0) == 0x80: - return RFC4122 - case (uuid[8] & 0xe0) == 0xc0: - return Microsoft - case (uuid[8] & 0xe0) == 0xe0: - return Future - default: - return Reserved - } - panic("unreachable") -} - -// Version returns the verison of uuid. It returns false if uuid is not -// valid. -func (uuid UUID) Version() (Version, bool) { - if len(uuid) != 16 { - return 0, false - } - return Version(uuid[6] >> 4), true -} - -func (v Version) String() string { - if v > 15 { - return fmt.Sprintf("BAD_VERSION_%d", v) - } - return fmt.Sprintf("VERSION_%d", v) -} - -func (v Variant) String() string { - switch v { - case RFC4122: - return "RFC4122" - case Reserved: - return "Reserved" - case Microsoft: - return "Microsoft" - case Future: - return "Future" - case Invalid: - return "Invalid" - } - return fmt.Sprintf("BadVariant%d", int(v)) -} - -// SetRand sets the random number generator to r, which implents io.Reader. -// If r.Read returns an error when the package requests random data then -// a panic will be issued. -// -// Calling SetRand with nil sets the random number generator to the default -// generator. -func SetRand(r io.Reader) { - if r == nil { - rander = rand.Reader - return - } - rander = r -} diff --git a/vendor/github.com/pborman/uuid/version1.go b/vendor/github.com/pborman/uuid/version1.go deleted file mode 100644 index 0127eacfa..000000000 --- a/vendor/github.com/pborman/uuid/version1.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uuid - -import ( - "encoding/binary" -) - -// NewUUID returns a Version 1 UUID based on the current NodeID and clock -// sequence, and the current time. If the NodeID has not been set by SetNodeID -// or SetNodeInterface then it will be set automatically. If the NodeID cannot -// be set NewUUID returns nil. If clock sequence has not been set by -// SetClockSequence then it will be set automatically. If GetTime fails to -// return the current NewUUID returns nil. -func NewUUID() UUID { - if nodeID == nil { - SetNodeInterface("") - } - - now, seq, err := GetTime() - if err != nil { - return nil - } - - uuid := make([]byte, 16) - - time_low := uint32(now & 0xffffffff) - time_mid := uint16((now >> 32) & 0xffff) - time_hi := uint16((now >> 48) & 0x0fff) - time_hi |= 0x1000 // Version 1 - - binary.BigEndian.PutUint32(uuid[0:], time_low) - binary.BigEndian.PutUint16(uuid[4:], time_mid) - binary.BigEndian.PutUint16(uuid[6:], time_hi) - binary.BigEndian.PutUint16(uuid[8:], seq) - copy(uuid[10:], nodeID) - - return uuid -} diff --git a/vendor/github.com/pborman/uuid/version4.go b/vendor/github.com/pborman/uuid/version4.go deleted file mode 100644 index b3d4a368d..000000000 --- a/vendor/github.com/pborman/uuid/version4.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uuid - -// Random returns a Random (Version 4) UUID or panics. -// -// The strength of the UUIDs is based on the strength of the crypto/rand -// package. -// -// A note about uniqueness derived from from the UUID Wikipedia entry: -// -// Randomly generated UUIDs have 122 random bits. One's annual risk of being -// hit by a meteorite is estimated to be one chance in 17 billion, that -// means the probability is about 0.00000000006 (6 × 10−11), -// equivalent to the odds of creating a few tens of trillions of UUIDs in a -// year and having one duplicate. -func NewRandom() UUID { - uuid := make([]byte, 16) - randomBits([]byte(uuid)) - uuid[6] = (uuid[6] & 0x0f) | 0x40 // Version 4 - uuid[8] = (uuid[8] & 0x3f) | 0x80 // Variant is 10 - return uuid -} diff --git a/vendor/k8s.io/client-go/1.5/LICENSE b/vendor/k8s.io/apimachinery/LICENSE similarity index 99% rename from vendor/k8s.io/client-go/1.5/LICENSE rename to vendor/k8s.io/apimachinery/LICENSE index 00b240110..d64569567 100644 --- a/vendor/k8s.io/client-go/1.5/LICENSE +++ b/vendor/k8s.io/apimachinery/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2014 The Kubernetes Authors. + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS b/vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS new file mode 100755 index 000000000..ae828ad25 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS @@ -0,0 +1,27 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- derekwaynecarr +- caesarxuchao +- mikedanese +- liggitt +- nikhiljindal +- gmarek +- erictune +- saad-ali +- janetkuo +- timstclair +- eparis +- timothysc +- dims +- spxtr +- hongchaodeng +- krousey +- satnam6502 +- cjcullen +- david-mcmahon +- goltermann diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/errors/doc.go b/vendor/k8s.io/apimachinery/pkg/api/errors/doc.go similarity index 91% rename from vendor/k8s.io/client-go/1.5/pkg/api/errors/doc.go rename to vendor/k8s.io/apimachinery/pkg/api/errors/doc.go index 58751ed0e..167baf680 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/errors/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/api/errors/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package errors provides detailed error types for api field validation. -package errors +package errors // import "k8s.io/apimachinery/pkg/api/errors" diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/errors/errors.go b/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go similarity index 65% rename from vendor/k8s.io/client-go/1.5/pkg/api/errors/errors.go rename to vendor/k8s.io/apimachinery/pkg/api/errors/errors.go index 17567dcd7..560c889b9 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/errors/errors.go +++ b/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go @@ -22,33 +22,32 @@ import ( "net/http" "strings" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/util/validation/field" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/validation/field" ) // HTTP Status codes not in the golang http package. const ( StatusUnprocessableEntity = 422 StatusTooManyRequests = 429 - // 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 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 + ErrStatus metav1.Status } // APIStatus is exposed by errors that can be converted to an api.Status object // for finer grained details. type APIStatus interface { - Status() unversioned.Status + Status() metav1.Status } var _ error = &StatusError{} @@ -59,8 +58,8 @@ func (e *StatusError) Error() string { } // 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 { +// of StatusError. +func (e *StatusError) Status() metav1.Status { return e.ErrStatus } @@ -82,23 +81,23 @@ 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, +// FromObject generates an StatusError from an metav1.Status, if that is the type of obj; otherwise, // returns an UnexpecteObjectError. func FromObject(obj runtime.Object) error { switch t := obj.(type) { - case *unversioned.Status: + case *metav1.Status: return &StatusError{*t} } return &UnexpectedObjectError{obj} } // NewNotFound returns a new error which indicates that the resource of the kind and the name was not found. -func NewNotFound(qualifiedResource unversioned.GroupResource, name string) *StatusError { - return &StatusError{unversioned.Status{ - Status: unversioned.StatusFailure, +func NewNotFound(qualifiedResource schema.GroupResource, name string) *StatusError { + return &StatusError{metav1.Status{ + Status: metav1.StatusFailure, Code: http.StatusNotFound, - Reason: unversioned.StatusReasonNotFound, - Details: &unversioned.StatusDetails{ + Reason: metav1.StatusReasonNotFound, + Details: &metav1.StatusDetails{ Group: qualifiedResource.Group, Kind: qualifiedResource.Resource, Name: name, @@ -108,12 +107,12 @@ func NewNotFound(qualifiedResource unversioned.GroupResource, name string) *Stat } // 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, +func NewAlreadyExists(qualifiedResource schema.GroupResource, name string) *StatusError { + return &StatusError{metav1.Status{ + Status: metav1.StatusFailure, Code: http.StatusConflict, - Reason: unversioned.StatusReasonAlreadyExists, - Details: &unversioned.StatusDetails{ + Reason: metav1.StatusReasonAlreadyExists, + Details: &metav1.StatusDetails{ Group: qualifiedResource.Group, Kind: qualifiedResource.Resource, Name: name, @@ -129,21 +128,21 @@ func NewUnauthorized(reason string) *StatusError { if len(message) == 0 { message = "not authorized" } - return &StatusError{unversioned.Status{ - Status: unversioned.StatusFailure, + return &StatusError{metav1.Status{ + Status: metav1.StatusFailure, Code: http.StatusUnauthorized, - Reason: unversioned.StatusReasonUnauthorized, + Reason: metav1.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, +func NewForbidden(qualifiedResource schema.GroupResource, name string, err error) *StatusError { + return &StatusError{metav1.Status{ + Status: metav1.StatusFailure, Code: http.StatusForbidden, - Reason: unversioned.StatusReasonForbidden, - Details: &unversioned.StatusDetails{ + Reason: metav1.StatusReasonForbidden, + Details: &metav1.StatusDetails{ Group: qualifiedResource.Group, Kind: qualifiedResource.Resource, Name: name, @@ -153,12 +152,12 @@ func NewForbidden(qualifiedResource unversioned.GroupResource, name string, 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, +func NewConflict(qualifiedResource schema.GroupResource, name string, err error) *StatusError { + return &StatusError{metav1.Status{ + Status: metav1.StatusFailure, Code: http.StatusConflict, - Reason: unversioned.StatusReasonConflict, - Details: &unversioned.StatusDetails{ + Reason: metav1.StatusReasonConflict, + Details: &metav1.StatusDetails{ Group: qualifiedResource.Group, Kind: qualifiedResource.Resource, Name: name, @@ -169,30 +168,30 @@ func NewConflict(qualifiedResource unversioned.GroupResource, name string, err e // 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, + return &StatusError{metav1.Status{ + Status: metav1.StatusFailure, Code: http.StatusGone, - Reason: unversioned.StatusReasonGone, + Reason: metav1.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)) +func NewInvalid(qualifiedKind schema.GroupKind, name string, errs field.ErrorList) *StatusError { + causes := make([]metav1.StatusCause, 0, len(errs)) for i := range errs { err := errs[i] - causes = append(causes, unversioned.StatusCause{ - Type: unversioned.CauseType(err.Type), + causes = append(causes, metav1.StatusCause{ + Type: metav1.CauseType(err.Type), Message: err.ErrorBody(), Field: err.Field, }) } - return &StatusError{unversioned.Status{ - Status: unversioned.StatusFailure, + return &StatusError{metav1.Status{ + Status: metav1.StatusFailure, Code: StatusUnprocessableEntity, // RFC 4918: StatusUnprocessableEntity - Reason: unversioned.StatusReasonInvalid, - Details: &unversioned.StatusDetails{ + Reason: metav1.StatusReasonInvalid, + Details: &metav1.StatusDetails{ Group: qualifiedKind.Group, Kind: qualifiedKind.Kind, Name: name, @@ -204,31 +203,31 @@ func NewInvalid(qualifiedKind unversioned.GroupKind, name string, errs field.Err // 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, + return &StatusError{metav1.Status{ + Status: metav1.StatusFailure, Code: http.StatusBadRequest, - Reason: unversioned.StatusReasonBadRequest, + Reason: metav1.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, + return &StatusError{metav1.Status{ + Status: metav1.StatusFailure, Code: http.StatusServiceUnavailable, - Reason: unversioned.StatusReasonServiceUnavailable, + Reason: metav1.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, +func NewMethodNotSupported(qualifiedResource schema.GroupResource, action string) *StatusError { + return &StatusError{metav1.Status{ + Status: metav1.StatusFailure, Code: http.StatusMethodNotAllowed, - Reason: unversioned.StatusReasonMethodNotAllowed, - Details: &unversioned.StatusDetails{ + Reason: metav1.StatusReasonMethodNotAllowed, + Details: &metav1.StatusDetails{ Group: qualifiedResource.Group, Kind: qualifiedResource.Resource, }, @@ -238,12 +237,12 @@ func NewMethodNotSupported(qualifiedResource unversioned.GroupResource, action s // 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, +func NewServerTimeout(qualifiedResource schema.GroupResource, operation string, retryAfterSeconds int) *StatusError { + return &StatusError{metav1.Status{ + Status: metav1.StatusFailure, Code: http.StatusInternalServerError, - Reason: unversioned.StatusReasonServerTimeout, - Details: &unversioned.StatusDetails{ + Reason: metav1.StatusReasonServerTimeout, + Details: &metav1.StatusDetails{ Group: qualifiedResource.Group, Kind: qualifiedResource.Resource, Name: operation, @@ -255,18 +254,18 @@ func NewServerTimeout(qualifiedResource unversioned.GroupResource, operation str // 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) +func NewServerTimeoutForKind(qualifiedKind schema.GroupKind, operation string, retryAfterSeconds int) *StatusError { + return NewServerTimeout(schema.GroupResource{Group: qualifiedKind.Group, Resource: qualifiedKind.Kind}, operation, retryAfterSeconds) } // NewInternalError returns an error indicating the item is invalid and cannot be processed. func NewInternalError(err error) *StatusError { - return &StatusError{unversioned.Status{ - Status: unversioned.StatusFailure, + return &StatusError{metav1.Status{ + Status: metav1.StatusFailure, Code: http.StatusInternalServerError, - Reason: unversioned.StatusReasonInternalError, - Details: &unversioned.StatusDetails{ - Causes: []unversioned.StatusCause{{Message: err.Error()}}, + Reason: metav1.StatusReasonInternalError, + Details: &metav1.StatusDetails{ + Causes: []metav1.StatusCause{{Message: err.Error()}}, }, Message: fmt.Sprintf("Internal error occurred: %v", err), }} @@ -275,56 +274,57 @@ func NewInternalError(err error) *StatusError { // 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, + return &StatusError{metav1.Status{ + Status: metav1.StatusFailure, Code: StatusServerTimeout, - Reason: unversioned.StatusReasonTimeout, + Reason: metav1.StatusReasonTimeout, Message: fmt.Sprintf("Timeout: %s", message), - Details: &unversioned.StatusDetails{ + Details: &metav1.StatusDetails{ RetryAfterSeconds: int32(retryAfterSeconds), }, }} } // NewGenericServerResponse returns a new error for server responses that are not in a recognizable form. -func NewGenericServerResponse(code int, verb string, qualifiedResource unversioned.GroupResource, name, serverMessage string, retryAfterSeconds int, isUnexpectedResponse bool) *StatusError { - reason := unversioned.StatusReasonUnknown +func NewGenericServerResponse(code int, verb string, qualifiedResource schema.GroupResource, name, serverMessage string, retryAfterSeconds int, isUnexpectedResponse bool) *StatusError { + reason := metav1.StatusReasonUnknown message := fmt.Sprintf("the server responded with the status code %d but did not return more information", code) switch code { case http.StatusConflict: if verb == "POST" { - reason = unversioned.StatusReasonAlreadyExists + reason = metav1.StatusReasonAlreadyExists } else { - reason = unversioned.StatusReasonConflict + reason = metav1.StatusReasonConflict } message = "the server reported a conflict" case http.StatusNotFound: - reason = unversioned.StatusReasonNotFound + reason = metav1.StatusReasonNotFound message = "the server could not find the requested resource" case http.StatusBadRequest: - reason = unversioned.StatusReasonBadRequest + reason = metav1.StatusReasonBadRequest message = "the server rejected our request for an unknown reason" case http.StatusUnauthorized: - reason = unversioned.StatusReasonUnauthorized + reason = metav1.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" + reason = metav1.StatusReasonForbidden + // the server message has details about who is trying to perform what action. Keep its message. + message = serverMessage case http.StatusMethodNotAllowed: - reason = unversioned.StatusReasonMethodNotAllowed + reason = metav1.StatusReasonMethodNotAllowed message = "the server does not allow this method on the requested resource" case StatusUnprocessableEntity: - reason = unversioned.StatusReasonInvalid + reason = metav1.StatusReasonInvalid message = "the server rejected our request due to an error in our request" case StatusServerTimeout: - reason = unversioned.StatusReasonServerTimeout + reason = metav1.StatusReasonServerTimeout message = "the server cannot complete the requested operation at this time, try again later" case StatusTooManyRequests: - reason = unversioned.StatusReasonTimeout + reason = metav1.StatusReasonTimeout message = "the server has received too many requests and has asked us to try again later" default: if code >= 500 { - reason = unversioned.StatusReasonInternalError + reason = metav1.StatusReasonInternalError message = fmt.Sprintf("an error on the server (%q) has prevented the request from succeeding", serverMessage) } } @@ -334,22 +334,22 @@ func NewGenericServerResponse(code int, verb string, qualifiedResource unversion case !qualifiedResource.Empty(): message = fmt.Sprintf("%s (%s %s)", message, strings.ToLower(verb), qualifiedResource.String()) } - var causes []unversioned.StatusCause + var causes []metav1.StatusCause if isUnexpectedResponse { - causes = []unversioned.StatusCause{ + causes = []metav1.StatusCause{ { - Type: unversioned.CauseTypeUnexpectedServerResponse, + Type: metav1.CauseTypeUnexpectedServerResponse, Message: serverMessage, }, } } else { causes = nil } - return &StatusError{unversioned.Status{ - Status: unversioned.StatusFailure, + return &StatusError{metav1.Status{ + Status: metav1.StatusFailure, Code: int32(code), Reason: reason, - Details: &unversioned.StatusDetails{ + Details: &metav1.StatusDetails{ Group: qualifiedResource.Group, Kind: qualifiedResource.Resource, Name: name, @@ -363,56 +363,73 @@ func NewGenericServerResponse(code int, verb string, qualifiedResource unversion // IsNotFound returns true if the specified error was created by NewNotFound. func IsNotFound(err error) bool { - return reasonForError(err) == unversioned.StatusReasonNotFound + return reasonForError(err) == metav1.StatusReasonNotFound } // IsAlreadyExists determines if the err is an error which indicates that a specified resource already exists. func IsAlreadyExists(err error) bool { - return reasonForError(err) == unversioned.StatusReasonAlreadyExists + return reasonForError(err) == metav1.StatusReasonAlreadyExists } // IsConflict determines if the err is an error which indicates the provided update conflicts. func IsConflict(err error) bool { - return reasonForError(err) == unversioned.StatusReasonConflict + return reasonForError(err) == metav1.StatusReasonConflict } // IsInvalid determines if the err is an error which indicates the provided resource is not valid. func IsInvalid(err error) bool { - return reasonForError(err) == unversioned.StatusReasonInvalid + return reasonForError(err) == metav1.StatusReasonInvalid } // IsMethodNotSupported determines if the err is an error which indicates the provided action could not // be performed because it is not supported by the server. func IsMethodNotSupported(err error) bool { - return reasonForError(err) == unversioned.StatusReasonMethodNotAllowed + return reasonForError(err) == metav1.StatusReasonMethodNotAllowed } // IsBadRequest determines if err is an error which indicates that the request is invalid. func IsBadRequest(err error) bool { - return reasonForError(err) == unversioned.StatusReasonBadRequest + return reasonForError(err) == metav1.StatusReasonBadRequest } // IsUnauthorized determines if err is an error which indicates that the request is unauthorized and // requires authentication by the user. func IsUnauthorized(err error) bool { - return reasonForError(err) == unversioned.StatusReasonUnauthorized + return reasonForError(err) == metav1.StatusReasonUnauthorized } // IsForbidden determines if err is an error which indicates that the request is forbidden and cannot // be completed as requested. func IsForbidden(err error) bool { - return reasonForError(err) == unversioned.StatusReasonForbidden + return reasonForError(err) == metav1.StatusReasonForbidden +} + +// IsTimeout determines if err is an error which indicates that request times out due to long +// processing. +func IsTimeout(err error) bool { + return reasonForError(err) == metav1.StatusReasonTimeout } // IsServerTimeout determines if err is an error which indicates that the request needs to be retried // by the client. func IsServerTimeout(err error) bool { - return reasonForError(err) == unversioned.StatusReasonServerTimeout + return reasonForError(err) == metav1.StatusReasonServerTimeout } // IsInternalError determines if err is an error which indicates an internal server error. func IsInternalError(err error) bool { - return reasonForError(err) == unversioned.StatusReasonInternalError + return reasonForError(err) == metav1.StatusReasonInternalError +} + +// IsTooManyRequests determines if err is an error which indicates that there are too many requests +// that the server cannot handle. +// TODO: update IsTooManyRequests() when the TooManyRequests(429) error returned from the API server has a non-empty Reason field +func IsTooManyRequests(err error) bool { + switch t := err.(type) { + case APIStatus: + return t.Status().Code == StatusTooManyRequests + } + return false } // IsUnexpectedServerError returns true if the server response was not in the expected API format, @@ -422,7 +439,7 @@ func IsUnexpectedServerError(err error) bool { case APIStatus: if d := t.Status().Details; d != nil { for _, cause := range d.Causes { - if cause.Type == unversioned.CauseTypeUnexpectedServerResponse { + if cause.Type == metav1.CauseTypeUnexpectedServerResponse { return true } } @@ -444,7 +461,7 @@ func SuggestsClientDelay(err error) (int, bool) { case APIStatus: if t.Status().Details != nil { switch t.Status().Reason { - case unversioned.StatusReasonServerTimeout, unversioned.StatusReasonTimeout: + case metav1.StatusReasonServerTimeout, metav1.StatusReasonTimeout: return int(t.Status().Details.RetryAfterSeconds), true } } @@ -452,10 +469,10 @@ func SuggestsClientDelay(err error) (int, bool) { return 0, false } -func reasonForError(err error) unversioned.StatusReason { +func reasonForError(err error) metav1.StatusReason { switch t := err.(type) { case APIStatus: return t.Status().Reason } - return unversioned.StatusReasonUnknown + return metav1.StatusReasonUnknown } diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS b/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS new file mode 100755 index 000000000..6044c031e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS @@ -0,0 +1,26 @@ +reviewers: +- thockin +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- derekwaynecarr +- caesarxuchao +- mikedanese +- liggitt +- nikhiljindal +- gmarek +- kargakis +- janetkuo +- ncdc +- eparis +- dims +- krousey +- markturansky +- fabioy +- resouer +- david-mcmahon +- mfojtik +- jianhuiz +- feihujiang +- ghodss diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/mapper.go b/vendor/k8s.io/apimachinery/pkg/api/meta/default.go similarity index 56% rename from vendor/k8s.io/client-go/1.5/pkg/api/mapper.go rename to vendor/k8s.io/apimachinery/pkg/api/meta/default.go index 17e624f93..5ea906a2a 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/mapper.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/default.go @@ -14,28 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package meta import ( "strings" - "k8s.io/client-go/1.5/pkg/api/meta" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/sets" ) -// Instantiates a DefaultRESTMapper based on types registered in api.Scheme -func NewDefaultRESTMapper(defaultGroupVersions []unversioned.GroupVersion, interfacesFunc meta.VersionInterfacesFunc, - importPathPrefix string, ignoredKinds, rootScoped sets.String) *meta.DefaultRESTMapper { - return NewDefaultRESTMapperFromScheme(defaultGroupVersions, interfacesFunc, importPathPrefix, ignoredKinds, rootScoped, Scheme) -} +// NewDefaultRESTMapperFromScheme instantiates a DefaultRESTMapper based on types registered in the given scheme. +func NewDefaultRESTMapperFromScheme(defaultGroupVersions []schema.GroupVersion, interfacesFunc VersionInterfacesFunc, + importPathPrefix string, ignoredKinds, rootScoped sets.String, scheme *runtime.Scheme) *DefaultRESTMapper { -// Instantiates a DefaultRESTMapper based on types registered in the given scheme. -func NewDefaultRESTMapperFromScheme(defaultGroupVersions []unversioned.GroupVersion, interfacesFunc meta.VersionInterfacesFunc, - importPathPrefix string, ignoredKinds, rootScoped sets.String, scheme *runtime.Scheme) *meta.DefaultRESTMapper { - - mapper := meta.NewDefaultRESTMapper(defaultGroupVersions, interfacesFunc) + mapper := NewDefaultRESTMapper(defaultGroupVersions, interfacesFunc) // enumerate all supported versions, get the kinds, and register with the mapper how to address // our resources. for _, gv := range defaultGroupVersions { @@ -47,9 +40,9 @@ func NewDefaultRESTMapperFromScheme(defaultGroupVersions []unversioned.GroupVers if !strings.Contains(oType.PkgPath(), importPathPrefix) || ignoredKinds.Has(kind) { continue } - scope := meta.RESTScopeNamespace + scope := RESTScopeNamespace if rootScoped.Has(kind) { - scope = meta.RESTScopeRoot + scope = RESTScopeRoot } mapper.Add(gvk, scope) } diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/meta/doc.go b/vendor/k8s.io/apimachinery/pkg/api/meta/doc.go similarity index 92% rename from vendor/k8s.io/client-go/1.5/pkg/api/meta/doc.go rename to vendor/k8s.io/apimachinery/pkg/api/meta/doc.go index a3b18a5c9..b6d42acf8 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/meta/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package meta provides functions for retrieving API metadata from objects // belonging to the Kubernetes API -package meta +package meta // import "k8s.io/apimachinery/pkg/api/meta" diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/meta/errors.go b/vendor/k8s.io/apimachinery/pkg/api/meta/errors.go similarity index 86% rename from vendor/k8s.io/client-go/1.5/pkg/api/meta/errors.go rename to vendor/k8s.io/apimachinery/pkg/api/meta/errors.go index e8d10ab9e..1503bd6d8 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/meta/errors.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/errors.go @@ -19,15 +19,15 @@ package meta import ( "fmt" - "k8s.io/client-go/1.5/pkg/api/unversioned" + "k8s.io/apimachinery/pkg/runtime/schema" ) // AmbiguousResourceError is returned if the RESTMapper finds multiple matches for a resource type AmbiguousResourceError struct { - PartialResource unversioned.GroupVersionResource + PartialResource schema.GroupVersionResource - MatchingResources []unversioned.GroupVersionResource - MatchingKinds []unversioned.GroupVersionKind + MatchingResources []schema.GroupVersionResource + MatchingKinds []schema.GroupVersionKind } func (e *AmbiguousResourceError) Error() string { @@ -44,10 +44,10 @@ func (e *AmbiguousResourceError) Error() string { // AmbiguousKindError is returned if the RESTMapper finds multiple matches for a kind type AmbiguousKindError struct { - PartialKind unversioned.GroupVersionKind + PartialKind schema.GroupVersionKind - MatchingResources []unversioned.GroupVersionResource - MatchingKinds []unversioned.GroupVersionKind + MatchingResources []schema.GroupVersionResource + MatchingKinds []schema.GroupVersionKind } func (e *AmbiguousKindError) Error() string { @@ -76,7 +76,7 @@ func IsAmbiguousError(err error) bool { // NoResourceMatchError is returned if the RESTMapper can't find any match for a resource type NoResourceMatchError struct { - PartialResource unversioned.GroupVersionResource + PartialResource schema.GroupVersionResource } func (e *NoResourceMatchError) Error() string { @@ -85,7 +85,7 @@ func (e *NoResourceMatchError) Error() string { // NoKindMatchError is returned if the RESTMapper can't find any match for a kind type NoKindMatchError struct { - PartialKind unversioned.GroupVersionKind + PartialKind schema.GroupVersionKind } func (e *NoKindMatchError) Error() string { diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/meta/firsthit_restmapper.go b/vendor/k8s.io/apimachinery/pkg/api/meta/firsthit_restmapper.go similarity index 78% rename from vendor/k8s.io/client-go/1.5/pkg/api/meta/firsthit_restmapper.go rename to vendor/k8s.io/apimachinery/pkg/api/meta/firsthit_restmapper.go index 224e71530..fd2210022 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/meta/firsthit_restmapper.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/firsthit_restmapper.go @@ -19,8 +19,8 @@ package meta import ( "fmt" - "k8s.io/client-go/1.5/pkg/api/unversioned" - utilerrors "k8s.io/client-go/1.5/pkg/util/errors" + "k8s.io/apimachinery/pkg/runtime/schema" + utilerrors "k8s.io/apimachinery/pkg/util/errors" ) // FirstHitRESTMapper is a wrapper for multiple RESTMappers which returns the @@ -33,7 +33,7 @@ func (m FirstHitRESTMapper) String() string { return fmt.Sprintf("FirstHitRESTMapper{\n\t%v\n}", m.MultiRESTMapper) } -func (m FirstHitRESTMapper) ResourceFor(resource unversioned.GroupVersionResource) (unversioned.GroupVersionResource, error) { +func (m FirstHitRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) { errors := []error{} for _, t := range m.MultiRESTMapper { ret, err := t.ResourceFor(resource) @@ -43,10 +43,10 @@ func (m FirstHitRESTMapper) ResourceFor(resource unversioned.GroupVersionResourc errors = append(errors, err) } - return unversioned.GroupVersionResource{}, collapseAggregateErrors(errors) + return schema.GroupVersionResource{}, collapseAggregateErrors(errors) } -func (m FirstHitRESTMapper) KindFor(resource unversioned.GroupVersionResource) (unversioned.GroupVersionKind, error) { +func (m FirstHitRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { errors := []error{} for _, t := range m.MultiRESTMapper { ret, err := t.KindFor(resource) @@ -56,13 +56,13 @@ func (m FirstHitRESTMapper) KindFor(resource unversioned.GroupVersionResource) ( errors = append(errors, err) } - return unversioned.GroupVersionKind{}, collapseAggregateErrors(errors) + return schema.GroupVersionKind{}, collapseAggregateErrors(errors) } // RESTMapping provides the REST mapping for the resource based on the // kind and version. This implementation supports multiple REST schemas and // return the first match. -func (m FirstHitRESTMapper) RESTMapping(gk unversioned.GroupKind, versions ...string) (*RESTMapping, error) { +func (m FirstHitRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) { errors := []error{} for _, t := range m.MultiRESTMapper { ret, err := t.RESTMapping(gk, versions...) diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/meta/help.go b/vendor/k8s.io/apimachinery/pkg/api/meta/help.go similarity index 69% rename from vendor/k8s.io/client-go/1.5/pkg/api/meta/help.go rename to vendor/k8s.io/apimachinery/pkg/api/meta/help.go index d44a57d19..930441fa6 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/meta/help.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/help.go @@ -20,12 +20,18 @@ import ( "fmt" "reflect" - "k8s.io/client-go/1.5/pkg/conversion" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" ) // IsListType returns true if the provided Object has a slice called Items func IsListType(obj runtime.Object) bool { + // if we're a runtime.Unstructured, check whether this is a list. + // TODO: refactor GetItemsPtr to use an interface that returns []runtime.Object + if unstructured, ok := obj.(runtime.Unstructured); ok { + return unstructured.IsList() + } + _, err := GetItemsPtr(obj) return err == nil } @@ -39,6 +45,7 @@ func GetItemsPtr(list runtime.Object) (interface{}, error) { if err != nil { return nil, err } + items := v.FieldByName("Items") if !items.IsValid() { return nil, fmt.Errorf("no Items field in %#v", list) @@ -57,6 +64,57 @@ func GetItemsPtr(list runtime.Object) (interface{}, error) { } } +// EachListItem invokes fn on each runtime.Object in the list. Any error immediately terminates +// the loop. +func EachListItem(obj runtime.Object, fn func(runtime.Object) error) error { + // TODO: Change to an interface call? + itemsPtr, err := GetItemsPtr(obj) + if err != nil { + return err + } + items, err := conversion.EnforcePtr(itemsPtr) + if err != nil { + return err + } + len := items.Len() + if len == 0 { + return nil + } + takeAddr := false + if elemType := items.Type().Elem(); elemType.Kind() != reflect.Ptr && elemType.Kind() != reflect.Interface { + if !items.Index(0).CanAddr() { + return fmt.Errorf("unable to take address of items in %T for EachListItem", obj) + } + takeAddr = true + } + + for i := 0; i < len; i++ { + raw := items.Index(i) + if takeAddr { + raw = raw.Addr() + } + switch item := raw.Interface().(type) { + case *runtime.RawExtension: + if err := fn(item.Object); err != nil { + return err + } + case runtime.Object: + if err := fn(item); err != nil { + return err + } + default: + obj, ok := item.(runtime.Object) + if !ok { + return fmt.Errorf("%v: item[%v]: Expected object, got %#v(%s)", obj, i, raw.Interface(), raw.Kind()) + } + if err := fn(obj); err != nil { + return err + } + } + } + return nil +} + // ExtractList returns obj's Items element as an array of runtime.Objects. // Returns an error if obj is not a List type (does not have an Items member). func ExtractList(obj runtime.Object) ([]runtime.Object, error) { @@ -117,6 +175,13 @@ func SetList(list runtime.Object, objects []runtime.Object) error { slice := reflect.MakeSlice(items.Type(), len(objects), len(objects)) for i := range objects { dest := slice.Index(i) + + // check to see if you're directly assignable + if reflect.TypeOf(objects[i]).AssignableTo(dest.Type()) { + dest.Set(reflect.ValueOf(objects[i])) + continue + } + src, err := conversion.EnforcePtr(objects[i]) if err != nil { return err diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/meta/interfaces.go b/vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go similarity index 70% rename from vendor/k8s.io/client-go/1.5/pkg/api/meta/interfaces.go rename to vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go index ce37cc70e..524b1ebd8 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/meta/interfaces.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go @@ -17,10 +17,10 @@ limitations under the License. package meta import ( - "k8s.io/client-go/1.5/pkg/api/meta/metatypes" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/types" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" ) // VersionInterfaces contains the interfaces one should use for dealing with types of a particular version. @@ -29,45 +29,6 @@ type VersionInterfaces struct { 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) - GetClusterName() string - SetClusterName(clusterName string) -} - -var _ Object = &runtime.Unstructured{} - type ListMetaAccessor interface { GetListMeta() List } @@ -75,10 +36,10 @@ type ListMetaAccessor interface { // 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 List metav1.List // Type exposes the type and APIVersion of versioned or internal API objects. -type Type unversioned.Type +type Type metav1.Type // MetadataAccessor lets you work with object and list metadata from any of the versioned or // internal API objects. Attempting to set or retrieve a field on an object that does @@ -143,7 +104,7 @@ 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 + GroupVersionKind schema.GroupVersionKind // Scope contains the information needed to deal with REST Resources that are in a resource hierarchy Scope RESTScope @@ -163,21 +124,23 @@ type RESTMapping struct { // TODO: split into sub-interfaces type RESTMapper interface { // KindFor takes a partial resource and returns the single match. Returns an error if there are multiple matches - KindFor(resource unversioned.GroupVersionResource) (unversioned.GroupVersionKind, error) + KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) // KindsFor takes a partial resource and returns the list of potential kinds in priority order - KindsFor(resource unversioned.GroupVersionResource) ([]unversioned.GroupVersionKind, error) + KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error) // ResourceFor takes a partial resource and returns the single match. Returns an error if there are multiple matches - ResourceFor(input unversioned.GroupVersionResource) (unversioned.GroupVersionResource, error) + ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error) // ResourcesFor takes a partial resource and returns the list of potential resource in priority order - ResourcesFor(input unversioned.GroupVersionResource) ([]unversioned.GroupVersionResource, error) + ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error) // RESTMapping identifies a preferred resource mapping for the provided group kind. - RESTMapping(gk unversioned.GroupKind, versions ...string) (*RESTMapping, error) - // RESTMappings returns all resource mappings for the provided group kind. - RESTMappings(gk unversioned.GroupKind) ([]*RESTMapping, error) + RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) + // RESTMappings returns all resource mappings for the provided group kind if no + // version search is provided. Otherwise identifies a preferred resource mapping for + // the provided version(s). + RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) AliasesForResource(resource string) ([]string, bool) ResourceSingularizer(resource string) (singular string, err error) diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/meta/meta.go b/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go similarity index 88% rename from vendor/k8s.io/client-go/1.5/pkg/api/meta/meta.go rename to vendor/k8s.io/apimachinery/pkg/api/meta/meta.go index a234bb0fe..7492324ed 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/meta/meta.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go @@ -20,13 +20,13 @@ import ( "fmt" "reflect" - "k8s.io/client-go/1.5/pkg/api/meta/metatypes" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/conversion" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/types" - "github.com/golang/glog" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" ) // errNotList is returned when an object implements the Object style interfaces but not the List style @@ -42,21 +42,21 @@ func ListAccessor(obj interface{}) (List, error) { switch t := obj.(type) { case List: return t, nil - case unversioned.List: + case metav1.List: return t, nil case ListMetaAccessor: if m := t.GetListMeta(); m != nil { return m, nil } return nil, errNotList - case unversioned.ListMetaAccessor: + case metav1.ListMetaAccessor: if m := t.GetListMeta(); m != nil { return m, nil } return nil, errNotList - case Object: + case metav1.Object: return t, nil - case ObjectMetaAccessor: + case metav1.ObjectMetaAccessor: if m := t.GetObjectMeta(); m != nil { return m, nil } @@ -75,16 +75,16 @@ var errNotObject = fmt.Errorf("object does not implement the Object interfaces") // 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) { +func Accessor(obj interface{}) (metav1.Object, error) { switch t := obj.(type) { - case Object: + case metav1.Object: return t, nil - case ObjectMetaAccessor: + case metav1.ObjectMetaAccessor: if m := t.GetObjectMeta(); m != nil { return m, nil } return nil, errNotObject - case List, unversioned.List, ListMetaAccessor, unversioned.ListMetaAccessor: + case List, metav1.List, ListMetaAccessor, metav1.ListMetaAccessor: return nil, errNotObject default: return nil, errNotObject @@ -140,9 +140,9 @@ func (obj objectAccessor) GetAPIVersion() string { func (obj objectAccessor) SetAPIVersion(version string) { gvk := obj.GetObjectKind().GroupVersionKind() - gv, err := unversioned.ParseGroupVersion(version) + gv, err := schema.ParseGroupVersion(version) if err != nil { - gv = unversioned.GroupVersion{Version: version} + gv = schema.GroupVersion{Version: version} } gvk.Group, gvk.Version = gv.Group, gv.Version obj.GetObjectKind().SetGroupVersionKind(gvk) @@ -313,7 +313,7 @@ func (resourceAccessor) SetResourceVersion(obj runtime.Object, version string) e } // extractFromOwnerReference extracts v to o. v is the OwnerReferences field of an object. -func extractFromOwnerReference(v reflect.Value, o *metatypes.OwnerReference) error { +func extractFromOwnerReference(v reflect.Value, o *metav1.OwnerReference) error { if err := runtime.Field(v, "APIVersion", &o.APIVersion); err != nil { return err } @@ -334,11 +334,19 @@ func extractFromOwnerReference(v reflect.Value, o *metatypes.OwnerReference) err controller := *controllerPtr o.Controller = &controller } + var blockOwnerDeletionPtr *bool + if err := runtime.Field(v, "BlockOwnerDeletion", &blockOwnerDeletionPtr); err != nil { + return err + } + if blockOwnerDeletionPtr != nil { + block := *blockOwnerDeletionPtr + o.BlockOwnerDeletion = &block + } return nil } // setOwnerReference sets v to o. v is the OwnerReferences field of an object. -func setOwnerReference(v reflect.Value, o *metatypes.OwnerReference) error { +func setOwnerReference(v reflect.Value, o *metav1.OwnerReference) error { if err := runtime.SetField(o.APIVersion, v, "APIVersion"); err != nil { return err } @@ -357,6 +365,12 @@ func setOwnerReference(v reflect.Value, o *metatypes.OwnerReference) error { return err } } + if o.BlockOwnerDeletion != nil { + block := *(o.BlockOwnerDeletion) + if err := runtime.SetField(&block, v, "BlockOwnerDeletion"); err != nil { + return err + } + } return nil } @@ -371,8 +385,8 @@ type genericAccessor struct { kind *string resourceVersion *string selfLink *string - creationTimestamp *unversioned.Time - deletionTimestamp **unversioned.Time + creationTimestamp *metav1.Time + deletionTimestamp **metav1.Time labels *map[string]string annotations *map[string]string ownerReferences reflect.Value @@ -467,19 +481,19 @@ func (a genericAccessor) SetSelfLink(selfLink string) { *a.selfLink = selfLink } -func (a genericAccessor) GetCreationTimestamp() unversioned.Time { +func (a genericAccessor) GetCreationTimestamp() metav1.Time { return *a.creationTimestamp } -func (a genericAccessor) SetCreationTimestamp(timestamp unversioned.Time) { +func (a genericAccessor) SetCreationTimestamp(timestamp metav1.Time) { *a.creationTimestamp = timestamp } -func (a genericAccessor) GetDeletionTimestamp() *unversioned.Time { +func (a genericAccessor) GetDeletionTimestamp() *metav1.Time { return *a.deletionTimestamp } -func (a genericAccessor) SetDeletionTimestamp(timestamp *unversioned.Time) { +func (a genericAccessor) SetDeletionTimestamp(timestamp *metav1.Time) { *a.deletionTimestamp = timestamp } @@ -520,8 +534,8 @@ func (a genericAccessor) SetFinalizers(finalizers []string) { *a.finalizers = finalizers } -func (a genericAccessor) GetOwnerReferences() []metatypes.OwnerReference { - var ret []metatypes.OwnerReference +func (a genericAccessor) GetOwnerReferences() []metav1.OwnerReference { + var ret []metav1.OwnerReference s := a.ownerReferences if s.Kind() != reflect.Ptr || s.Elem().Kind() != reflect.Slice { glog.Errorf("expect %v to be a pointer to slice", s) @@ -529,7 +543,7 @@ func (a genericAccessor) GetOwnerReferences() []metatypes.OwnerReference { } 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) + ret = make([]metav1.OwnerReference, s.Len(), s.Len()+1) for i := 0; i < s.Len(); i++ { if err := extractFromOwnerReference(s.Index(i), &ret[i]); err != nil { glog.Errorf("extractFromOwnerReference failed: %v", err) @@ -539,7 +553,7 @@ func (a genericAccessor) GetOwnerReferences() []metatypes.OwnerReference { return ret } -func (a genericAccessor) SetOwnerReferences(references []metatypes.OwnerReference) { +func (a genericAccessor) SetOwnerReferences(references []metav1.OwnerReference) { s := a.ownerReferences if s.Kind() != reflect.Ptr || s.Elem().Kind() != reflect.Slice { glog.Errorf("expect %v to be a pointer to slice", s) diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/meta/multirestmapper.go b/vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go similarity index 79% rename from vendor/k8s.io/client-go/1.5/pkg/api/meta/multirestmapper.go rename to vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go index 4534271f0..d32b0dbf7 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/meta/multirestmapper.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go @@ -20,9 +20,9 @@ import ( "fmt" "strings" - "k8s.io/client-go/1.5/pkg/api/unversioned" - utilerrors "k8s.io/client-go/1.5/pkg/util/errors" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/runtime/schema" + utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/apimachinery/pkg/util/sets" ) // MultiRESTMapper is a wrapper for multiple RESTMappers. @@ -51,8 +51,8 @@ func (m MultiRESTMapper) ResourceSingularizer(resource string) (singular string, return } -func (m MultiRESTMapper) ResourcesFor(resource unversioned.GroupVersionResource) ([]unversioned.GroupVersionResource, error) { - allGVRs := []unversioned.GroupVersionResource{} +func (m MultiRESTMapper) ResourcesFor(resource schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { + allGVRs := []schema.GroupVersionResource{} for _, t := range m { gvrs, err := t.ResourcesFor(resource) // ignore "no match" errors, but any other error percolates back up @@ -86,8 +86,8 @@ func (m MultiRESTMapper) ResourcesFor(resource unversioned.GroupVersionResource) return allGVRs, nil } -func (m MultiRESTMapper) KindsFor(resource unversioned.GroupVersionResource) (gvk []unversioned.GroupVersionKind, err error) { - allGVKs := []unversioned.GroupVersionKind{} +func (m MultiRESTMapper) KindsFor(resource schema.GroupVersionResource) (gvk []schema.GroupVersionKind, err error) { + allGVKs := []schema.GroupVersionKind{} for _, t := range m { gvks, err := t.KindsFor(resource) // ignore "no match" errors, but any other error percolates back up @@ -121,34 +121,34 @@ func (m MultiRESTMapper) KindsFor(resource unversioned.GroupVersionResource) (gv return allGVKs, nil } -func (m MultiRESTMapper) ResourceFor(resource unversioned.GroupVersionResource) (unversioned.GroupVersionResource, error) { +func (m MultiRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) { resources, err := m.ResourcesFor(resource) if err != nil { - return unversioned.GroupVersionResource{}, err + return schema.GroupVersionResource{}, err } if len(resources) == 1 { return resources[0], nil } - return unversioned.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: resource, MatchingResources: resources} + return schema.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: resource, MatchingResources: resources} } -func (m MultiRESTMapper) KindFor(resource unversioned.GroupVersionResource) (unversioned.GroupVersionKind, error) { +func (m MultiRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { kinds, err := m.KindsFor(resource) if err != nil { - return unversioned.GroupVersionKind{}, err + return schema.GroupVersionKind{}, err } if len(kinds) == 1 { return kinds[0], nil } - return unversioned.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: resource, MatchingKinds: kinds} + return schema.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: resource, MatchingKinds: kinds} } // RESTMapping provides the REST mapping for the resource based on the // kind and version. This implementation supports multiple REST schemas and // return the first match. -func (m MultiRESTMapper) RESTMapping(gk unversioned.GroupKind, versions ...string) (*RESTMapping, error) { +func (m MultiRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) { allMappings := []*RESTMapping{} errors := []error{} @@ -171,7 +171,7 @@ func (m MultiRESTMapper) RESTMapping(gk unversioned.GroupKind, versions ...strin return allMappings[0], nil } if len(allMappings) > 1 { - var kinds []unversioned.GroupVersionKind + var kinds []schema.GroupVersionKind for _, m := range allMappings { kinds = append(kinds, m.GroupVersionKind) } @@ -185,12 +185,12 @@ func (m MultiRESTMapper) RESTMapping(gk unversioned.GroupKind, versions ...strin // RESTMappings returns all possible RESTMappings for the provided group kind, or an error // if the type is not recognized. -func (m MultiRESTMapper) RESTMappings(gk unversioned.GroupKind) ([]*RESTMapping, error) { +func (m MultiRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) { var allMappings []*RESTMapping var errors []error for _, t := range m { - currMappings, err := t.RESTMappings(gk) + currMappings, err := t.RESTMappings(gk, versions...) // ignore "no match" errors, but any other error percolates back up if IsNoMatchError(err) { continue diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/meta/priority.go b/vendor/k8s.io/apimachinery/pkg/api/meta/priority.go similarity index 75% rename from vendor/k8s.io/client-go/1.5/pkg/api/meta/priority.go rename to vendor/k8s.io/apimachinery/pkg/api/meta/priority.go index 2f7fe102b..91203d11f 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/meta/priority.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/priority.go @@ -19,7 +19,7 @@ package meta import ( "fmt" - "k8s.io/client-go/1.5/pkg/api/unversioned" + "k8s.io/apimachinery/pkg/runtime/schema" ) const ( @@ -39,13 +39,13 @@ type PriorityRESTMapper struct { // 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 + ResourcePriority []schema.GroupVersionResource // KindPriority is a list of priority patterns to apply to matching kinds. // The list of all matching kinds is narrowed based on the patterns until only one remains. // A pattern with no matches is skipped. A pattern with more than one match uses its // matches as the list to continue matching against. - KindPriority []unversioned.GroupVersionKind + KindPriority []schema.GroupVersionKind } func (m PriorityRESTMapper) String() string { @@ -53,18 +53,18 @@ func (m PriorityRESTMapper) String() string { } // 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) { +func (m PriorityRESTMapper) ResourceFor(partiallySpecifiedResource schema.GroupVersionResource) (schema.GroupVersionResource, error) { originalGVRs, err := m.Delegate.ResourcesFor(partiallySpecifiedResource) if err != nil { - return unversioned.GroupVersionResource{}, err + return schema.GroupVersionResource{}, err } if len(originalGVRs) == 1 { return originalGVRs[0], nil } - remainingGVRs := append([]unversioned.GroupVersionResource{}, originalGVRs...) + remainingGVRs := append([]schema.GroupVersionResource{}, originalGVRs...) for _, pattern := range m.ResourcePriority { - matchedGVRs := []unversioned.GroupVersionResource{} + matchedGVRs := []schema.GroupVersionResource{} for _, gvr := range remainingGVRs { if resourceMatches(pattern, gvr) { matchedGVRs = append(matchedGVRs, gvr) @@ -85,22 +85,22 @@ func (m PriorityRESTMapper) ResourceFor(partiallySpecifiedResource unversioned.G } } - return unversioned.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: partiallySpecifiedResource, MatchingResources: originalGVRs} + return schema.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: partiallySpecifiedResource, MatchingResources: originalGVRs} } // KindFor finds all kinds, then passes them through the KindPriority patterns to find a single matching hit. -func (m PriorityRESTMapper) KindFor(partiallySpecifiedResource unversioned.GroupVersionResource) (unversioned.GroupVersionKind, error) { +func (m PriorityRESTMapper) KindFor(partiallySpecifiedResource schema.GroupVersionResource) (schema.GroupVersionKind, error) { originalGVKs, err := m.Delegate.KindsFor(partiallySpecifiedResource) if err != nil { - return unversioned.GroupVersionKind{}, err + return schema.GroupVersionKind{}, err } if len(originalGVKs) == 1 { return originalGVKs[0], nil } - remainingGVKs := append([]unversioned.GroupVersionKind{}, originalGVKs...) + remainingGVKs := append([]schema.GroupVersionKind{}, originalGVKs...) for _, pattern := range m.KindPriority { - matchedGVKs := []unversioned.GroupVersionKind{} + matchedGVKs := []schema.GroupVersionKind{} for _, gvr := range remainingGVKs { if kindMatches(pattern, gvr) { matchedGVKs = append(matchedGVKs, gvr) @@ -121,10 +121,10 @@ func (m PriorityRESTMapper) KindFor(partiallySpecifiedResource unversioned.Group } } - return unversioned.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: partiallySpecifiedResource, MatchingKinds: originalGVKs} + return schema.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: partiallySpecifiedResource, MatchingKinds: originalGVKs} } -func resourceMatches(pattern unversioned.GroupVersionResource, resource unversioned.GroupVersionResource) bool { +func resourceMatches(pattern schema.GroupVersionResource, resource schema.GroupVersionResource) bool { if pattern.Group != AnyGroup && pattern.Group != resource.Group { return false } @@ -138,7 +138,7 @@ func resourceMatches(pattern unversioned.GroupVersionResource, resource unversio return true } -func kindMatches(pattern unversioned.GroupVersionKind, kind unversioned.GroupVersionKind) bool { +func kindMatches(pattern schema.GroupVersionKind, kind schema.GroupVersionKind) bool { if pattern.Group != AnyGroup && pattern.Group != kind.Group { return false } @@ -152,7 +152,7 @@ func kindMatches(pattern unversioned.GroupVersionKind, kind unversioned.GroupVer return true } -func (m PriorityRESTMapper) RESTMapping(gk unversioned.GroupKind, versions ...string) (mapping *RESTMapping, err error) { +func (m PriorityRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (mapping *RESTMapping, err error) { mappings, err := m.Delegate.RESTMappings(gk) if err != nil { return nil, err @@ -161,11 +161,11 @@ func (m PriorityRESTMapper) RESTMapping(gk unversioned.GroupKind, versions ...st // any versions the user provides take priority priorities := m.KindPriority if len(versions) > 0 { - priorities = make([]unversioned.GroupVersionKind, 0, len(m.KindPriority)+len(versions)) + priorities = make([]schema.GroupVersionKind, 0, len(m.KindPriority)+len(versions)) for _, version := range versions { - gv, err := unversioned.ParseGroupVersion(version) - if err != nil { - return nil, err + gv := schema.GroupVersion{ + Version: version, + Group: gk.Group, } priorities = append(priorities, gv.WithKind(AnyKind)) } @@ -198,15 +198,15 @@ func (m PriorityRESTMapper) RESTMapping(gk unversioned.GroupKind, versions ...st return remaining[0], nil } - var kinds []unversioned.GroupVersionKind + var kinds []schema.GroupVersionKind for _, m := range mappings { kinds = append(kinds, m.GroupVersionKind) } return nil, &AmbiguousKindError{PartialKind: gk.WithVersion(""), MatchingKinds: kinds} } -func (m PriorityRESTMapper) RESTMappings(gk unversioned.GroupKind) ([]*RESTMapping, error) { - return m.Delegate.RESTMappings(gk) +func (m PriorityRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) { + return m.Delegate.RESTMappings(gk, versions...) } func (m PriorityRESTMapper) AliasesForResource(alias string) (aliases []string, ok bool) { @@ -217,10 +217,10 @@ func (m PriorityRESTMapper) ResourceSingularizer(resource string) (singular stri return m.Delegate.ResourceSingularizer(resource) } -func (m PriorityRESTMapper) ResourcesFor(partiallySpecifiedResource unversioned.GroupVersionResource) ([]unversioned.GroupVersionResource, error) { +func (m PriorityRESTMapper) ResourcesFor(partiallySpecifiedResource schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { return m.Delegate.ResourcesFor(partiallySpecifiedResource) } -func (m PriorityRESTMapper) KindsFor(partiallySpecifiedResource unversioned.GroupVersionResource) (gvk []unversioned.GroupVersionKind, err error) { +func (m PriorityRESTMapper) KindsFor(partiallySpecifiedResource schema.GroupVersionResource) (gvk []schema.GroupVersionKind, err error) { return m.Delegate.KindsFor(partiallySpecifiedResource) } diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/meta/restmapper.go b/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go similarity index 73% rename from vendor/k8s.io/client-go/1.5/pkg/api/meta/restmapper.go rename to vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go index 063f48e4b..bf4c77a82 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/meta/restmapper.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go @@ -22,8 +22,8 @@ import ( "sort" "strings" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // Implements RESTScope interface @@ -70,13 +70,13 @@ var RESTScopeRoot = &restScope{ // TODO: Only accept plural for some operations for increased control? // (`get pod bar` vs `get pods bar`) type DefaultRESTMapper struct { - defaultGroupVersions []unversioned.GroupVersion + defaultGroupVersions []schema.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 + resourceToKind map[schema.GroupVersionResource]schema.GroupVersionKind + kindToPluralResource map[schema.GroupVersionKind]schema.GroupVersionResource + kindToScope map[schema.GroupVersionKind]RESTScope + singularToPlural map[schema.GroupVersionResource]schema.GroupVersionResource + pluralToSingular map[schema.GroupVersionResource]schema.GroupVersionResource interfacesFunc VersionInterfacesFunc @@ -92,19 +92,19 @@ 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) +type VersionInterfacesFunc func(version schema.GroupVersion) (*VersionInterfaces, error) // NewDefaultRESTMapper initializes a mapping between Kind and APIVersion // to a resource name and back based on the objects in a runtime.Scheme // and the Kubernetes API conventions. Takes a group name, a priority list of the versions // to search when an object has no default version (set empty to return an error), // and a function that retrieves the correct metadata for a given version. -func NewDefaultRESTMapper(defaultGroupVersions []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) +func NewDefaultRESTMapper(defaultGroupVersions []schema.GroupVersion, f VersionInterfacesFunc) *DefaultRESTMapper { + resourceToKind := make(map[schema.GroupVersionResource]schema.GroupVersionKind) + kindToPluralResource := make(map[schema.GroupVersionKind]schema.GroupVersionResource) + kindToScope := make(map[schema.GroupVersionKind]RESTScope) + singularToPlural := make(map[schema.GroupVersionResource]schema.GroupVersionResource) + pluralToSingular := make(map[schema.GroupVersionResource]schema.GroupVersionResource) aliasToResource := make(map[string][]string) // TODO: verify name mappings work correctly when versions differ @@ -120,7 +120,7 @@ func NewDefaultRESTMapper(defaultGroupVersions []unversioned.GroupVersion, f Ver } } -func (m *DefaultRESTMapper) Add(kind unversioned.GroupVersionKind, scope RESTScope) { +func (m *DefaultRESTMapper) Add(kind schema.GroupVersionKind, scope RESTScope) { plural, singular := KindToResource(kind) m.singularToPlural[singular] = plural @@ -144,10 +144,10 @@ var unpluralizedSuffixes = []string{ // 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) { +func KindToResource(kind schema.GroupVersionKind) ( /*plural*/ schema.GroupVersionResource /*singular*/, schema.GroupVersionResource) { kindName := kind.Kind if len(kindName) == 0 { - return unversioned.GroupVersionResource{}, unversioned.GroupVersionResource{} + return schema.GroupVersionResource{}, schema.GroupVersionResource{} } singularName := strings.ToLower(kindName) singular := kind.GroupVersion().WithResource(singularName) @@ -171,13 +171,13 @@ func KindToResource(kind unversioned.GroupVersionKind) ( /*plural*/ unversioned. // 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} + partialResource := schema.GroupVersionResource{Resource: resourceType} resources, err := m.ResourcesFor(partialResource) if err != nil { return resourceType, err } - singular := unversioned.GroupVersionResource{} + singular := schema.GroupVersionResource{} for _, curr := range resources { currSingular, ok := m.pluralToSingular[curr] if !ok { @@ -201,7 +201,7 @@ func (m *DefaultRESTMapper) ResourceSingularizer(resourceType string) (string, e } // coerceResourceForMatching makes the resource lower case and converts internal versions to unspecified (legacy behavior) -func coerceResourceForMatching(resource unversioned.GroupVersionResource) unversioned.GroupVersionResource { +func coerceResourceForMatching(resource schema.GroupVersionResource) schema.GroupVersionResource { resource.Resource = strings.ToLower(resource.Resource) if resource.Version == runtime.APIVersionInternal { resource.Version = "" @@ -210,7 +210,7 @@ func coerceResourceForMatching(resource unversioned.GroupVersionResource) unvers return resource } -func (m *DefaultRESTMapper) ResourcesFor(input unversioned.GroupVersionResource) ([]unversioned.GroupVersionResource, error) { +func (m *DefaultRESTMapper) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { resource := coerceResourceForMatching(input) hasResource := len(resource.Resource) > 0 @@ -221,7 +221,7 @@ func (m *DefaultRESTMapper) ResourcesFor(input unversioned.GroupVersionResource) return nil, fmt.Errorf("a resource must be present, got: %v", resource) } - ret := []unversioned.GroupVersionResource{} + ret := []schema.GroupVersionResource{} switch { case hasGroup && hasVersion: // fully qualified. Find the exact match @@ -297,19 +297,19 @@ func (m *DefaultRESTMapper) ResourcesFor(input unversioned.GroupVersionResource) return ret, nil } -func (m *DefaultRESTMapper) ResourceFor(resource unversioned.GroupVersionResource) (unversioned.GroupVersionResource, error) { +func (m *DefaultRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) { resources, err := m.ResourcesFor(resource) if err != nil { - return unversioned.GroupVersionResource{}, err + return schema.GroupVersionResource{}, err } if len(resources) == 1 { return resources[0], nil } - return unversioned.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: resource, MatchingResources: resources} + return schema.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: resource, MatchingResources: resources} } -func (m *DefaultRESTMapper) KindsFor(input unversioned.GroupVersionResource) ([]unversioned.GroupVersionKind, error) { +func (m *DefaultRESTMapper) KindsFor(input schema.GroupVersionResource) ([]schema.GroupVersionKind, error) { resource := coerceResourceForMatching(input) hasResource := len(resource.Resource) > 0 @@ -320,7 +320,7 @@ func (m *DefaultRESTMapper) KindsFor(input unversioned.GroupVersionResource) ([] return nil, fmt.Errorf("a resource must be present, got: %v", resource) } - ret := []unversioned.GroupVersionKind{} + ret := []schema.GroupVersionKind{} switch { // fully qualified. Find the exact match case hasGroup && hasVersion: @@ -376,21 +376,21 @@ func (m *DefaultRESTMapper) KindsFor(input unversioned.GroupVersionResource) ([] return ret, nil } -func (m *DefaultRESTMapper) KindFor(resource unversioned.GroupVersionResource) (unversioned.GroupVersionKind, error) { +func (m *DefaultRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { kinds, err := m.KindsFor(resource) if err != nil { - return unversioned.GroupVersionKind{}, err + return schema.GroupVersionKind{}, err } if len(kinds) == 1 { return kinds[0], nil } - return unversioned.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: resource, MatchingKinds: kinds} + return schema.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: resource, MatchingKinds: kinds} } type kindByPreferredGroupVersion struct { - list []unversioned.GroupVersionKind - sortOrder []unversioned.GroupVersion + list []schema.GroupVersionKind + sortOrder []schema.GroupVersion } func (o kindByPreferredGroupVersion) Len() int { return len(o.list) } @@ -427,8 +427,8 @@ func (o kindByPreferredGroupVersion) Less(i, j int) bool { } type resourceByPreferredGroupVersion struct { - list []unversioned.GroupVersionResource - sortOrder []unversioned.GroupVersion + list []schema.GroupVersionResource + sortOrder []schema.GroupVersion } func (o resourceByPreferredGroupVersion) Len() int { return len(o.list) } @@ -468,91 +468,56 @@ func (o resourceByPreferredGroupVersion) Less(i, j int) bool { // 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. -// TODO: consider refactoring to use RESTMappings in a way that preserves version ordering and preference -func (m *DefaultRESTMapper) RESTMapping(gk unversioned.GroupKind, versions ...string) (*RESTMapping, error) { - // Pick an appropriate version - var gvk *unversioned.GroupVersionKind +func (m *DefaultRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) { + mappings, err := m.RESTMappings(gk, versions...) + if err != nil { + return nil, err + } + if len(mappings) == 0 { + return nil, &NoKindMatchError{PartialKind: gk.WithVersion("")} + } + // since we rely on RESTMappings method + // take the first match and return to the caller + // as this was the existing behavior. + return mappings[0], nil +} + +// RESTMappings returns the RESTMappings for the provided group kind. If a version search order +// is not provided, the search order provided to DefaultRESTMapper will be used. +func (m *DefaultRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) { + mappings := make([]*RESTMapping, 0) + potentialGVK := make([]schema.GroupVersionKind, 0) hadVersion := false + + // Pick an appropriate version for _, version := range versions { if len(version) == 0 || version == runtime.APIVersionInternal { continue } - currGVK := gk.WithVersion(version) hadVersion = true if _, ok := m.kindToPluralResource[currGVK]; ok { - gvk = &currGVK + potentialGVK = append(potentialGVK, currGVK) break } } // Use the default preferred versions - if !hadVersion && (gvk == nil) { + if !hadVersion && len(potentialGVK) == 0 { 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 - } + potentialGVK = append(potentialGVK, gk.WithVersion(gv.Version)) } } - if gvk == nil { + + if len(potentialGVK) == 0 { return nil, &NoKindMatchError{PartialKind: gk.WithVersion("")} } - // 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: %v", gvk.GroupVersion().String(), err) - } - - retVal := &RESTMapping{ - Resource: resource.Resource, - GroupVersionKind: *gvk, - Scope: scope, - - ObjectConvertor: interfaces.ObjectConvertor, - MetadataAccessor: interfaces.MetadataAccessor, - } - - return retVal, nil -} - -// RESTMappings returns the RESTMappings for the provided group kind in a rough internal preferred order. If no -// kind is found it will return a NoResourceMatchError. -func (m *DefaultRESTMapper) RESTMappings(gk unversioned.GroupKind) ([]*RESTMapping, error) { - // Use the default preferred versions - var mappings []*RESTMapping - for _, gv := range m.defaultGroupVersions { - if gv.Group != gk.Group { - continue - } - - gvk := gk.WithVersion(gv.Version) - gvr, ok := m.kindToPluralResource[gvk] + for _, gvk := range potentialGVK { + //Ensure we have a REST mapping + res, ok := m.kindToPluralResource[gvk] if !ok { continue } @@ -569,7 +534,7 @@ func (m *DefaultRESTMapper) RESTMappings(gk unversioned.GroupKind) ([]*RESTMappi } mappings = append(mappings, &RESTMapping{ - Resource: gvr.Resource, + Resource: res.Resource, GroupVersionKind: gvk, Scope: scope, @@ -579,7 +544,7 @@ func (m *DefaultRESTMapper) RESTMappings(gk unversioned.GroupKind) ([]*RESTMappi } if len(mappings) == 0 { - return nil, &NoResourceMatchError{PartialResource: unversioned.GroupVersionResource{Group: gk.Group, Resource: gk.Kind}} + return nil, &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Group: gk.Group, Resource: gk.Kind}} } return mappings, nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/meta/unstructured.go b/vendor/k8s.io/apimachinery/pkg/api/meta/unstructured.go similarity index 71% rename from vendor/k8s.io/client-go/1.5/pkg/api/meta/unstructured.go rename to vendor/k8s.io/apimachinery/pkg/api/meta/unstructured.go index fef6e86d0..3ebf24815 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/meta/unstructured.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/unstructured.go @@ -17,15 +17,15 @@ limitations under the License. package meta import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" ) // InterfacesForUnstructured returns VersionInterfaces suitable for -// dealing with runtime.Unstructured objects. -func InterfacesForUnstructured(unversioned.GroupVersion) (*VersionInterfaces, error) { +// dealing with unstructured.Unstructured objects. +func InterfacesForUnstructured(schema.GroupVersion) (*VersionInterfaces, error) { return &VersionInterfaces{ - ObjectConvertor: &runtime.UnstructuredObjectConverter{}, + ObjectConvertor: &unstructured.UnstructuredObjectConverter{}, MetadataAccessor: NewAccessor(), }, nil } diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS b/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS new file mode 100755 index 000000000..b905e57f0 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS @@ -0,0 +1,17 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- derekwaynecarr +- mikedanese +- saad-ali +- janetkuo +- timstclair +- eparis +- timothysc +- jbeda +- xiang90 +- mbohlool +- david-mcmahon +- goltermann diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/resource/amount.go b/vendor/k8s.io/apimachinery/pkg/api/resource/amount.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/api/resource/amount.go rename to vendor/k8s.io/apimachinery/pkg/api/resource/amount.go diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go new file mode 100644 index 000000000..87fb5f580 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go @@ -0,0 +1,71 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. +// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto +// DO NOT EDIT! + +/* + Package resource is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto + + It has these top-level messages: + Quantity +*/ +package resource + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +const _ = proto.GoGoProtoPackageIsVersion1 + +func (m *Quantity) Reset() { *m = Quantity{} } +func (*Quantity) ProtoMessage() {} +func (*Quantity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func init() { + proto.RegisterType((*Quantity)(nil), "k8s.io.apimachinery.pkg.api.resource.Quantity") +} + +var fileDescriptorGenerated = []byte{ + // 253 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x8f, 0xb1, 0x4a, 0x03, 0x41, + 0x10, 0x86, 0x77, 0x1b, 0x89, 0x57, 0x06, 0x11, 0x49, 0xb1, 0x17, 0xc4, 0x42, 0x04, 0x77, 0x0a, + 0x9b, 0x60, 0x69, 0x6f, 0xa1, 0xa5, 0xdd, 0xdd, 0x65, 0xdc, 0x2c, 0x67, 0x76, 0x8f, 0xd9, 0x59, + 0x21, 0x5d, 0x4a, 0xcb, 0x94, 0x96, 0xb9, 0xb7, 0x49, 0x99, 0xd2, 0xc2, 0xc2, 0x3b, 0x5f, 0x44, + 0x72, 0xc9, 0x81, 0x08, 0x76, 0xf3, 0xfd, 0xc3, 0x37, 0xfc, 0x93, 0xdc, 0x97, 0x93, 0xa0, 0xad, + 0x87, 0x32, 0xe6, 0x48, 0x0e, 0x19, 0x03, 0xbc, 0xa2, 0x9b, 0x7a, 0x82, 0xc3, 0x22, 0xab, 0xec, + 0x3c, 0x2b, 0x66, 0xd6, 0x21, 0x2d, 0xa0, 0x2a, 0xcd, 0x2e, 0x00, 0xc2, 0xe0, 0x23, 0x15, 0x08, + 0x06, 0x1d, 0x52, 0xc6, 0x38, 0xd5, 0x15, 0x79, 0xf6, 0xc3, 0x8b, 0xbd, 0xa5, 0x7f, 0x5b, 0xba, + 0x2a, 0xcd, 0x2e, 0xd0, 0xbd, 0x35, 0xba, 0x36, 0x96, 0x67, 0x31, 0xd7, 0x85, 0x9f, 0x83, 0xf1, + 0xc6, 0x43, 0x27, 0xe7, 0xf1, 0xb9, 0xa3, 0x0e, 0xba, 0x69, 0x7f, 0x74, 0x74, 0xf3, 0x5f, 0x95, + 0xc8, 0xf6, 0x05, 0xac, 0xe3, 0xc0, 0xf4, 0xb7, 0xc9, 0xf9, 0x24, 0x19, 0x3c, 0xc4, 0xcc, 0xb1, + 0xe5, 0xc5, 0xf0, 0x34, 0x39, 0x0a, 0x4c, 0xd6, 0x99, 0x33, 0x39, 0x96, 0x97, 0xc7, 0x8f, 0x07, + 0xba, 0x3d, 0x79, 0x5f, 0xa7, 0xe2, 0xad, 0x4e, 0xc5, 0xaa, 0x4e, 0xc5, 0xba, 0x4e, 0xc5, 0xf2, + 0x73, 0x2c, 0xee, 0xae, 0x36, 0x8d, 0x12, 0xdb, 0x46, 0x89, 0x8f, 0x46, 0x89, 0x65, 0xab, 0xe4, + 0xa6, 0x55, 0x72, 0xdb, 0x2a, 0xf9, 0xd5, 0x2a, 0xb9, 0xfa, 0x56, 0xe2, 0x69, 0xd0, 0x7f, 0xf2, + 0x13, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x3c, 0xf3, 0xc9, 0x3f, 0x01, 0x00, 0x00, +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/resource/generated.proto b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto similarity index 96% rename from vendor/k8s.io/client-go/1.5/pkg/api/resource/generated.proto rename to vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto index c26921d57..608299da4 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/resource/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -19,9 +19,9 @@ limitations under the License. syntax = 'proto2'; -package k8s.io.kubernetes.pkg.api.resource; +package k8s.io.apimachinery.pkg.api.resource; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "resource"; diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/resource/math.go b/vendor/k8s.io/apimachinery/pkg/api/resource/math.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/api/resource/math.go rename to vendor/k8s.io/apimachinery/pkg/api/resource/math.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/resource/quantity.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go similarity index 99% rename from vendor/k8s.io/client-go/1.5/pkg/api/resource/quantity.go rename to vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go index df8bcd510..3a9560882 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/resource/quantity.go +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go @@ -29,7 +29,7 @@ import ( "github.com/go-openapi/spec" inf "gopkg.in/inf.v0" - "k8s.io/client-go/1.5/pkg/genericapiserver/openapi/common" + "k8s.io/apimachinery/pkg/openapi" ) // Quantity is a fixed-point representation of a number. @@ -399,8 +399,8 @@ func (q Quantity) DeepCopy() Quantity { } // OpenAPIDefinition returns openAPI definition for this type. -func (_ Quantity) OpenAPIDefinition() common.OpenAPIDefinition { - return common.OpenAPIDefinition{ +func (_ Quantity) OpenAPIDefinition() openapi.OpenAPIDefinition { + return openapi.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/resource/quantity_proto.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/api/resource/quantity_proto.go rename to vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/resource/scale_int.go b/vendor/k8s.io/apimachinery/pkg/api/resource/scale_int.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/api/resource/scale_int.go rename to vendor/k8s.io/apimachinery/pkg/api/resource/scale_int.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/resource/suffix.go b/vendor/k8s.io/apimachinery/pkg/api/resource/suffix.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/api/resource/suffix.go rename to vendor/k8s.io/apimachinery/pkg/api/resource/suffix.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/apimachinery/announced/announced.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go similarity index 91% rename from vendor/k8s.io/client-go/1.5/pkg/apimachinery/announced/announced.go rename to vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go index 18195480b..2c8568c1f 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apimachinery/announced/announced.go +++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go @@ -24,16 +24,8 @@ package announced import ( "fmt" - "k8s.io/client-go/1.5/pkg/apimachinery/registered" - "k8s.io/client-go/1.5/pkg/runtime" -) - -var ( - DefaultGroupFactoryRegistry = make(APIGroupFactoryRegistry) - - // These functions will announce your group or version. - AnnounceGroupVersion = DefaultGroupFactoryRegistry.AnnounceGroupVersion - AnnounceGroup = DefaultGroupFactoryRegistry.AnnounceGroup + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" ) // APIGroupFactoryRegistry allows for groups and versions to announce themselves, diff --git a/vendor/k8s.io/client-go/1.5/pkg/apimachinery/announced/group_factory.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go similarity index 83% rename from vendor/k8s.io/client-go/1.5/pkg/apimachinery/announced/group_factory.go rename to vendor/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go index 2895b15c2..afb03295d 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apimachinery/announced/group_factory.go +++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go @@ -21,13 +21,12 @@ import ( "github.com/golang/glog" - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/meta" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/apimachinery" - "k8s.io/client-go/1.5/pkg/apimachinery/registered" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/apimachinery" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/sets" ) type SchemeFunc func(*runtime.Scheme) error @@ -43,10 +42,16 @@ type GroupVersionFactoryArgs struct { // GroupMetaFactoryArgs contains the group-level args of a GroupMetaFactory. type GroupMetaFactoryArgs struct { + // GroupName is the name of the API-Group + // + // example: 'servicecatalog.k8s.io' GroupName string VersionPreferenceOrder []string - ImportPrefix string - + // ImportPrefix is the base go package of the API-Group + // + // example: 'k8s.io/kubernetes/pkg/apis/autoscaling' + ImportPrefix string + // RootScopedKinds are resources that are not namespaced. RootScopedKinds sets.String // nil is allowed IgnoredKinds sets.String // nil is allowed @@ -79,8 +84,8 @@ func NewGroupMetaFactory(groupArgs *GroupMetaFactoryArgs, versions VersionToSche // programmer importing the wrong set of packages. If this assumption doesn't // work for you, just call DefaultGroupFactoryRegistry.AnnouncePreconstructedFactory // yourself. -func (gmf *GroupMetaFactory) Announce() *GroupMetaFactory { - if err := DefaultGroupFactoryRegistry.AnnouncePreconstructedFactory(gmf); err != nil { +func (gmf *GroupMetaFactory) Announce(groupFactoryRegistry APIGroupFactoryRegistry) *GroupMetaFactory { + if err := groupFactoryRegistry.AnnouncePreconstructedFactory(gmf); err != nil { panic(err) } return gmf @@ -107,7 +112,7 @@ type GroupMetaFactory struct { VersionArgs map[string]*GroupVersionFactoryArgs // assembled by Register() - prioritizedVersionList []unversioned.GroupVersion + prioritizedVersionList []schema.GroupVersion } // Register constructs the finalized prioritized version list and sanity checks @@ -124,11 +129,11 @@ func (gmf *GroupMetaFactory) Register(m *registered.APIRegistrationManager) erro if pvSet.Len() != len(gmf.GroupArgs.VersionPreferenceOrder) { return fmt.Errorf("preference order for group %v has duplicates: %v", gmf.GroupArgs.GroupName, gmf.GroupArgs.VersionPreferenceOrder) } - prioritizedVersions := []unversioned.GroupVersion{} + prioritizedVersions := []schema.GroupVersion{} for _, v := range gmf.GroupArgs.VersionPreferenceOrder { prioritizedVersions = append( prioritizedVersions, - unversioned.GroupVersion{ + schema.GroupVersion{ Group: gmf.GroupArgs.GroupName, Version: v, }, @@ -136,7 +141,7 @@ func (gmf *GroupMetaFactory) Register(m *registered.APIRegistrationManager) erro } // Go through versions that weren't explicitly prioritized. - unprioritizedVersions := []unversioned.GroupVersion{} + unprioritizedVersions := []schema.GroupVersion{} for _, v := range gmf.VersionArgs { if v.GroupName != gmf.GroupArgs.GroupName { return fmt.Errorf("found %v/%v in group %v?", v.GroupName, v.VersionName, gmf.GroupArgs.GroupName) @@ -145,7 +150,7 @@ func (gmf *GroupMetaFactory) Register(m *registered.APIRegistrationManager) erro pvSet.Delete(v.VersionName) continue } - unprioritizedVersions = append(unprioritizedVersions, unversioned.GroupVersion{Group: v.GroupName, Version: v.VersionName}) + unprioritizedVersions = append(unprioritizedVersions, schema.GroupVersion{Group: v.GroupName, Version: v.VersionName}) } if len(unprioritizedVersions) > 1 { glog.Warningf("group %v has multiple unprioritized versions: %#v. They will have an arbitrary preference order!", gmf.GroupArgs.GroupName, unprioritizedVersions) @@ -159,7 +164,7 @@ func (gmf *GroupMetaFactory) Register(m *registered.APIRegistrationManager) erro return nil } -func (gmf *GroupMetaFactory) newRESTMapper(scheme *runtime.Scheme, externalVersions []unversioned.GroupVersion, groupMeta *apimachinery.GroupMeta) meta.RESTMapper { +func (gmf *GroupMetaFactory) newRESTMapper(scheme *runtime.Scheme, externalVersions []schema.GroupVersion, groupMeta *apimachinery.GroupMeta) meta.RESTMapper { // the list of kinds that are scoped at the root of the api hierarchy // if a kind is not enumerated here, it is assumed to have a namespace scope rootScoped := sets.NewString() @@ -171,7 +176,7 @@ func (gmf *GroupMetaFactory) newRESTMapper(scheme *runtime.Scheme, externalVersi ignoredKinds = gmf.GroupArgs.IgnoredKinds } - return api.NewDefaultRESTMapperFromScheme( + return meta.NewDefaultRESTMapperFromScheme( externalVersions, groupMeta.InterfacesFor, gmf.GroupArgs.ImportPrefix, @@ -183,7 +188,7 @@ func (gmf *GroupMetaFactory) newRESTMapper(scheme *runtime.Scheme, externalVersi // Enable enables group versions that are allowed, adds methods to the scheme, etc. func (gmf *GroupMetaFactory) Enable(m *registered.APIRegistrationManager, scheme *runtime.Scheme) error { - externalVersions := []unversioned.GroupVersion{} + externalVersions := []schema.GroupVersion{} for _, v := range gmf.prioritizedVersionList { if !m.IsAllowedVersion(v) { continue @@ -214,7 +219,7 @@ func (gmf *GroupMetaFactory) Enable(m *registered.APIRegistrationManager, scheme for _, v := range externalVersions { gvf := gmf.VersionArgs[v.Version] if err := groupMeta.AddVersionInterfaces( - unversioned.GroupVersion{Group: gvf.GroupName, Version: gvf.VersionName}, + schema.GroupVersion{Group: gvf.GroupName, Version: gvf.VersionName}, &meta.VersionInterfaces{ ObjectConvertor: scheme, MetadataAccessor: accessor, @@ -235,11 +240,11 @@ func (gmf *GroupMetaFactory) Enable(m *registered.APIRegistrationManager, scheme // RegisterAndEnable is provided only to allow this code to get added in multiple steps. // It's really bad that this is called in init() methods, but supporting this // temporarily lets us do the change incrementally. -func (gmf *GroupMetaFactory) RegisterAndEnable() error { - if err := gmf.Register(registered.DefaultAPIRegistrationManager); err != nil { +func (gmf *GroupMetaFactory) RegisterAndEnable(registry *registered.APIRegistrationManager, scheme *runtime.Scheme) error { + if err := gmf.Register(registry); err != nil { return err } - if err := gmf.Enable(registered.DefaultAPIRegistrationManager, api.Scheme); err != nil { + if err := gmf.Enable(registry, scheme); err != nil { return err } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apimachinery/doc.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go similarity index 91% rename from vendor/k8s.io/client-go/1.5/pkg/apimachinery/doc.go rename to vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go index ede22b3d6..b238454b2 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apimachinery/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go @@ -17,4 +17,4 @@ limitations under the License. // Package apimachinery contains the generic API machinery code that // is common to both server and clients. // This package should never import specific API objects. -package apimachinery +package apimachinery // import "k8s.io/apimachinery/pkg/apimachinery" diff --git a/vendor/k8s.io/client-go/1.5/pkg/apimachinery/registered/registered.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go similarity index 73% rename from vendor/k8s.io/client-go/1.5/pkg/apimachinery/registered/registered.go rename to vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go index 5ca48f514..f2e32c88c 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apimachinery/registered/registered.go +++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go @@ -19,20 +19,15 @@ package registered import ( "fmt" - "os" "sort" "strings" "github.com/golang/glog" - "k8s.io/client-go/1.5/pkg/api/meta" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/apimachinery" - "k8s.io/client-go/1.5/pkg/util/sets" -) - -var ( - DefaultAPIRegistrationManager = NewOrDie(os.Getenv("KUBE_API_VERSIONS")) + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/apimachinery" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/sets" ) // APIRegistrationManager provides the concept of what API groups are enabled. @@ -45,16 +40,16 @@ var ( // isn't easy right now because there are so many callers of this package. type APIRegistrationManager struct { // registeredGroupVersions stores all API group versions for which RegisterGroup is called. - registeredVersions map[unversioned.GroupVersion]struct{} + registeredVersions map[schema.GroupVersion]struct{} // thirdPartyGroupVersions are API versions which are dynamically // registered (and unregistered) via API calls to the apiserver - thirdPartyGroupVersions []unversioned.GroupVersion + thirdPartyGroupVersions []schema.GroupVersion // enabledVersions represents all enabled API versions. It should be a // subset of registeredVersions. Please call EnableVersions() to add // enabled versions. - enabledVersions map[unversioned.GroupVersion]struct{} + enabledVersions map[schema.GroupVersion]struct{} // map of group meta for all groups. groupMetaMap map[string]*apimachinery.GroupMeta @@ -63,7 +58,7 @@ type APIRegistrationManager struct { // KUBE_API_VERSIONS environment variable. The install package of each group // checks this list before add their versions to the latest package and // Scheme. This list is small and order matters, so represent as a slice - envRequestedVersions []unversioned.GroupVersion + envRequestedVersions []schema.GroupVersion } // NewAPIRegistrationManager constructs a new manager. The argument ought to be @@ -71,16 +66,16 @@ type APIRegistrationManager struct { // wish to test. func NewAPIRegistrationManager(kubeAPIVersions string) (*APIRegistrationManager, error) { m := &APIRegistrationManager{ - registeredVersions: map[unversioned.GroupVersion]struct{}{}, - thirdPartyGroupVersions: []unversioned.GroupVersion{}, - enabledVersions: map[unversioned.GroupVersion]struct{}{}, + registeredVersions: map[schema.GroupVersion]struct{}{}, + thirdPartyGroupVersions: []schema.GroupVersion{}, + enabledVersions: map[schema.GroupVersion]struct{}{}, groupMetaMap: map[string]*apimachinery.GroupMeta{}, - envRequestedVersions: []unversioned.GroupVersion{}, + envRequestedVersions: []schema.GroupVersion{}, } if len(kubeAPIVersions) != 0 { for _, version := range strings.Split(kubeAPIVersions, ",") { - gv, err := unversioned.ParseGroupVersion(version) + gv, err := schema.ParseGroupVersion(version) if err != nil { return nil, fmt.Errorf("invalid api version: %s in KUBE_API_VERSIONS: %s.", version, kubeAPIVersions) @@ -99,30 +94,8 @@ func NewOrDie(kubeAPIVersions string) *APIRegistrationManager { return m } -// People are calling global functions. Let them continue to do that (for now). -var ( - ValidateEnvRequestedVersions = DefaultAPIRegistrationManager.ValidateEnvRequestedVersions - AllPreferredGroupVersions = DefaultAPIRegistrationManager.AllPreferredGroupVersions - RESTMapper = DefaultAPIRegistrationManager.RESTMapper - GroupOrDie = DefaultAPIRegistrationManager.GroupOrDie - AddThirdPartyAPIGroupVersions = DefaultAPIRegistrationManager.AddThirdPartyAPIGroupVersions - IsThirdPartyAPIGroupVersion = DefaultAPIRegistrationManager.IsThirdPartyAPIGroupVersion - RegisteredGroupVersions = DefaultAPIRegistrationManager.RegisteredGroupVersions - IsRegisteredVersion = DefaultAPIRegistrationManager.IsRegisteredVersion - IsRegistered = DefaultAPIRegistrationManager.IsRegistered - Group = DefaultAPIRegistrationManager.Group - EnabledVersionsForGroup = DefaultAPIRegistrationManager.EnabledVersionsForGroup - EnabledVersions = DefaultAPIRegistrationManager.EnabledVersions - IsEnabledVersion = DefaultAPIRegistrationManager.IsEnabledVersion - IsAllowedVersion = DefaultAPIRegistrationManager.IsAllowedVersion - EnableVersions = DefaultAPIRegistrationManager.EnableVersions - RegisterGroup = DefaultAPIRegistrationManager.RegisterGroup - RegisterVersions = DefaultAPIRegistrationManager.RegisterVersions - InterfacesFor = DefaultAPIRegistrationManager.InterfacesFor -) - // RegisterVersions adds the given group versions to the list of registered group versions. -func (m *APIRegistrationManager) RegisterVersions(availableVersions []unversioned.GroupVersion) { +func (m *APIRegistrationManager) RegisterVersions(availableVersions []schema.GroupVersion) { for _, v := range availableVersions { m.registeredVersions[v] = struct{}{} } @@ -132,7 +105,7 @@ func (m *APIRegistrationManager) RegisterVersions(availableVersions []unversione func (m *APIRegistrationManager) RegisterGroup(groupMeta apimachinery.GroupMeta) error { groupName := groupMeta.GroupVersion.Group if _, found := m.groupMetaMap[groupName]; found { - return fmt.Errorf("group %v is already registered", m.groupMetaMap) + return fmt.Errorf("group %q is already registered in groupsMap: %v", groupName, m.groupMetaMap) } m.groupMetaMap[groupName] = &groupMeta return nil @@ -141,8 +114,8 @@ func (m *APIRegistrationManager) RegisterGroup(groupMeta apimachinery.GroupMeta) // EnableVersions adds the versions for the given group to the list of enabled versions. // Note that the caller should call RegisterGroup before calling this method. // The caller of this function is responsible to add the versions to scheme and RESTMapper. -func (m *APIRegistrationManager) EnableVersions(versions ...unversioned.GroupVersion) error { - var unregisteredVersions []unversioned.GroupVersion +func (m *APIRegistrationManager) EnableVersions(versions ...schema.GroupVersion) error { + var unregisteredVersions []schema.GroupVersion for _, v := range versions { if _, found := m.registeredVersions[v]; !found { unregisteredVersions = append(unregisteredVersions, v) @@ -158,7 +131,7 @@ func (m *APIRegistrationManager) EnableVersions(versions ...unversioned.GroupVer // IsAllowedVersion returns if the version is allowed by the KUBE_API_VERSIONS // environment variable. If the environment variable is empty, then it always // returns true. -func (m *APIRegistrationManager) IsAllowedVersion(v unversioned.GroupVersion) bool { +func (m *APIRegistrationManager) IsAllowedVersion(v schema.GroupVersion) bool { if len(m.envRequestedVersions) == 0 { return true } @@ -171,15 +144,15 @@ func (m *APIRegistrationManager) IsAllowedVersion(v unversioned.GroupVersion) bo } // IsEnabledVersion returns if a version is enabled. -func (m *APIRegistrationManager) IsEnabledVersion(v unversioned.GroupVersion) bool { +func (m *APIRegistrationManager) IsEnabledVersion(v schema.GroupVersion) bool { _, found := m.enabledVersions[v] return found } // EnabledVersions returns all enabled versions. Groups are randomly ordered, but versions within groups // are priority order from best to worst -func (m *APIRegistrationManager) EnabledVersions() []unversioned.GroupVersion { - ret := []unversioned.GroupVersion{} +func (m *APIRegistrationManager) EnabledVersions() []schema.GroupVersion { + ret := []schema.GroupVersion{} for _, groupMeta := range m.groupMetaMap { for _, version := range groupMeta.GroupVersions { if m.IsEnabledVersion(version) { @@ -191,13 +164,13 @@ func (m *APIRegistrationManager) EnabledVersions() []unversioned.GroupVersion { } // EnabledVersionsForGroup returns all enabled versions for a group in order of best to worst -func (m *APIRegistrationManager) EnabledVersionsForGroup(group string) []unversioned.GroupVersion { +func (m *APIRegistrationManager) EnabledVersionsForGroup(group string) []schema.GroupVersion { groupMeta, ok := m.groupMetaMap[group] if !ok { - return []unversioned.GroupVersion{} + return []schema.GroupVersion{} } - ret := []unversioned.GroupVersion{} + ret := []schema.GroupVersion{} for _, version := range groupMeta.GroupVersions { if m.IsEnabledVersion(version) { ret = append(ret, version) @@ -224,14 +197,14 @@ func (m *APIRegistrationManager) IsRegistered(group string) bool { } // IsRegisteredVersion returns if a version is registered. -func (m *APIRegistrationManager) IsRegisteredVersion(v unversioned.GroupVersion) bool { +func (m *APIRegistrationManager) IsRegisteredVersion(v schema.GroupVersion) bool { _, found := m.registeredVersions[v] return found } // RegisteredGroupVersions returns all registered group versions. -func (m *APIRegistrationManager) RegisteredGroupVersions() []unversioned.GroupVersion { - ret := []unversioned.GroupVersion{} +func (m *APIRegistrationManager) RegisteredGroupVersions() []schema.GroupVersion { + ret := []schema.GroupVersion{} for groupVersion := range m.registeredVersions { ret = append(ret, groupVersion) } @@ -239,7 +212,7 @@ func (m *APIRegistrationManager) RegisteredGroupVersions() []unversioned.GroupVe } // IsThirdPartyAPIGroupVersion returns true if the api version is a user-registered group/version. -func (m *APIRegistrationManager) IsThirdPartyAPIGroupVersion(gv unversioned.GroupVersion) bool { +func (m *APIRegistrationManager) IsThirdPartyAPIGroupVersion(gv schema.GroupVersion) bool { for ix := range m.thirdPartyGroupVersions { if m.thirdPartyGroupVersions[ix] == gv { return true @@ -252,9 +225,9 @@ func (m *APIRegistrationManager) IsThirdPartyAPIGroupVersion(gv unversioned.Grou // registers them in the API machinery and enables them. // Skips GroupVersions that are already registered. // Returns the list of GroupVersions that were skipped. -func (m *APIRegistrationManager) AddThirdPartyAPIGroupVersions(gvs ...unversioned.GroupVersion) []unversioned.GroupVersion { - filteredGVs := []unversioned.GroupVersion{} - skippedGVs := []unversioned.GroupVersion{} +func (m *APIRegistrationManager) AddThirdPartyAPIGroupVersions(gvs ...schema.GroupVersion) []schema.GroupVersion { + filteredGVs := []schema.GroupVersion{} + skippedGVs := []schema.GroupVersion{} for ix := range gvs { if !m.IsRegisteredVersion(gvs[ix]) { filteredGVs = append(filteredGVs, gvs[ix]) @@ -274,7 +247,7 @@ func (m *APIRegistrationManager) AddThirdPartyAPIGroupVersions(gvs ...unversione } // InterfacesFor is a union meta.VersionInterfacesFunc func for all registered types -func (m *APIRegistrationManager) InterfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) { +func (m *APIRegistrationManager) InterfacesFor(version schema.GroupVersion) (*meta.VersionInterfaces, error) { groupMeta, err := m.Group(version.Group) if err != nil { return nil, err @@ -303,7 +276,7 @@ func (m *APIRegistrationManager) GroupOrDie(group string) *apimachinery.GroupMet // 1. legacy kube group preferred version, extensions preferred version, metrics perferred version, legacy // kube any version, extensions any version, metrics any version, all other groups alphabetical preferred version, // all other groups alphabetical. -func (m *APIRegistrationManager) RESTMapper(versionPatterns ...unversioned.GroupVersion) meta.RESTMapper { +func (m *APIRegistrationManager) RESTMapper(versionPatterns ...schema.GroupVersion) meta.RESTMapper { unionMapper := meta.MultiRESTMapper{} unionedGroups := sets.NewString() for enabledVersion := range m.enabledVersions { @@ -315,8 +288,8 @@ func (m *APIRegistrationManager) RESTMapper(versionPatterns ...unversioned.Group } if len(versionPatterns) != 0 { - resourcePriority := []unversioned.GroupVersionResource{} - kindPriority := []unversioned.GroupVersionKind{} + resourcePriority := []schema.GroupVersionResource{} + kindPriority := []schema.GroupVersionKind{} for _, versionPriority := range versionPatterns { resourcePriority = append(resourcePriority, versionPriority.WithResource(meta.AnyResource)) kindPriority = append(kindPriority, versionPriority.WithKind(meta.AnyKind)) @@ -326,8 +299,8 @@ func (m *APIRegistrationManager) RESTMapper(versionPatterns ...unversioned.Group } if len(m.envRequestedVersions) != 0 { - resourcePriority := []unversioned.GroupVersionResource{} - kindPriority := []unversioned.GroupVersionKind{} + resourcePriority := []schema.GroupVersionResource{} + kindPriority := []schema.GroupVersionKind{} for _, versionPriority := range m.envRequestedVersions { resourcePriority = append(resourcePriority, versionPriority.WithResource(meta.AnyResource)) @@ -357,9 +330,9 @@ func (m *APIRegistrationManager) RESTMapper(versionPatterns ...unversioned.Group // prioritiesForGroups returns the resource and kind priorities for a PriorityRESTMapper, preferring the preferred version of each group first, // then any non-preferred version of the group second. -func (m *APIRegistrationManager) prioritiesForGroups(groups ...string) ([]unversioned.GroupVersionResource, []unversioned.GroupVersionKind) { - resourcePriority := []unversioned.GroupVersionResource{} - kindPriority := []unversioned.GroupVersionKind{} +func (m *APIRegistrationManager) prioritiesForGroups(groups ...string) ([]schema.GroupVersionResource, []schema.GroupVersionKind) { + resourcePriority := []schema.GroupVersionResource{} + kindPriority := []schema.GroupVersionKind{} for _, group := range groups { availableVersions := m.EnabledVersionsForGroup(group) @@ -369,8 +342,8 @@ func (m *APIRegistrationManager) prioritiesForGroups(groups ...string) ([]unvers } } for _, group := range groups { - resourcePriority = append(resourcePriority, unversioned.GroupVersionResource{Group: group, Version: meta.AnyVersion, Resource: meta.AnyResource}) - kindPriority = append(kindPriority, unversioned.GroupVersionKind{Group: group, Version: meta.AnyVersion, Kind: meta.AnyKind}) + resourcePriority = append(resourcePriority, schema.GroupVersionResource{Group: group, Version: meta.AnyVersion, Resource: meta.AnyResource}) + kindPriority = append(kindPriority, schema.GroupVersionKind{Group: group, Version: meta.AnyVersion, Kind: meta.AnyKind}) } return resourcePriority, kindPriority @@ -392,8 +365,8 @@ func (m *APIRegistrationManager) AllPreferredGroupVersions() string { // ValidateEnvRequestedVersions returns a list of versions that are requested in // the KUBE_API_VERSIONS environment variable, but not enabled. -func (m *APIRegistrationManager) ValidateEnvRequestedVersions() []unversioned.GroupVersion { - var missingVersions []unversioned.GroupVersion +func (m *APIRegistrationManager) ValidateEnvRequestedVersions() []schema.GroupVersion { + var missingVersions []schema.GroupVersion for _, v := range m.envRequestedVersions { if _, found := m.enabledVersions[v]; !found { missingVersions = append(missingVersions, v) diff --git a/vendor/k8s.io/client-go/1.5/pkg/apimachinery/types.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/types.go similarity index 74% rename from vendor/k8s.io/client-go/1.5/pkg/apimachinery/types.go rename to vendor/k8s.io/apimachinery/pkg/apimachinery/types.go index b3fc7b834..213e34bc0 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apimachinery/types.go +++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/types.go @@ -19,24 +19,18 @@ package apimachinery import ( "fmt" - "k8s.io/client-go/1.5/pkg/api/meta" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupMeta stores the metadata of a group. type GroupMeta struct { // GroupVersion represents the preferred version of the group. - GroupVersion unversioned.GroupVersion + GroupVersion schema.GroupVersion // GroupVersions is Group + all versions in that group. - GroupVersions []unversioned.GroupVersion - - // Codec is the default codec for serializing output that should use - // the preferred version. Use this Codec when writing to - // disk, a data store that is not dynamically versioned, or in tests. - // This codec can decode any object that the schema is aware of. - Codec runtime.Codec + GroupVersions []schema.GroupVersion // SelfLinker can set or get the SelfLink field of all API types. // TODO: when versioning changes, make this part of each API definition. @@ -52,16 +46,16 @@ type GroupMeta struct { // string, or an error if the version is not known. // TODO: make this stop being a func pointer and always use the default // function provided below once every place that populates this field has been changed. - InterfacesFor func(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) + InterfacesFor func(version schema.GroupVersion) (*meta.VersionInterfaces, error) // InterfacesByVersion stores the per-version interfaces. - InterfacesByVersion map[unversioned.GroupVersion]*meta.VersionInterfaces + InterfacesByVersion map[schema.GroupVersion]*meta.VersionInterfaces } // DefaultInterfacesFor returns the default Codec and ResourceVersioner for a given version // string, or an error if the version is not known. // TODO: Remove the "Default" prefix. -func (gm *GroupMeta) DefaultInterfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) { +func (gm *GroupMeta) DefaultInterfacesFor(version schema.GroupVersion) (*meta.VersionInterfaces, error) { if v, ok := gm.InterfacesByVersion[version]; ok { return v, nil } @@ -73,12 +67,12 @@ func (gm *GroupMeta) DefaultInterfacesFor(version unversioned.GroupVersion) (*me // (If you use this, be sure to set .InterfacesFor = .DefaultInterfacesFor) // TODO: remove the "Interfaces" suffix and make this also maintain the // .GroupVersions member. -func (gm *GroupMeta) AddVersionInterfaces(version unversioned.GroupVersion, interfaces *meta.VersionInterfaces) error { +func (gm *GroupMeta) AddVersionInterfaces(version schema.GroupVersion, interfaces *meta.VersionInterfaces) error { if e, a := gm.GroupVersion.Group, version.Group; a != e { return fmt.Errorf("got a version in group %v, but am in group %v", a, e) } if gm.InterfacesByVersion == nil { - gm.InterfacesByVersion = make(map[unversioned.GroupVersion]*meta.VersionInterfaces) + gm.InterfacesByVersion = make(map[schema.GroupVersion]*meta.VersionInterfaces) } gm.InterfacesByVersion[version] = interfaces diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS new file mode 100755 index 000000000..381a52509 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS @@ -0,0 +1,33 @@ +reviewers: +- thockin +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- caesarxuchao +- liggitt +- nikhiljindal +- gmarek +- erictune +- davidopp +- sttts +- quinton-hoole +- kargakis +- luxas +- janetkuo +- justinsb +- ncdc +- timothysc +- soltysh +- dims +- madhusudancs +- hongchaodeng +- krousey +- mml +- mbohlool +- david-mcmahon +- therc +- mqliang +- kevin-wangzefeng +- jianhuiz +- feihujiang diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go similarity index 74% rename from vendor/k8s.io/client-go/1.5/pkg/api/conversion.go rename to vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go index 782c7e5df..b9a8fd02d 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/conversion.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go @@ -14,25 +14,24 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package v1 import ( "fmt" + "strconv" + "strings" - "k8s.io/client-go/1.5/pkg/api/resource" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/conversion" - "k8s.io/client-go/1.5/pkg/fields" - "k8s.io/client-go/1.5/pkg/labels" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/util/intstr" - utillabels "k8s.io/client-go/1.5/pkg/util/labels" - "k8s.io/client-go/1.5/pkg/util/validation/field" + "k8s.io/apimachinery/pkg/api/resource" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" ) -func addConversionFuncs(scheme *runtime.Scheme) error { +func AddConversionFuncs(scheme *runtime.Scheme) error { return scheme.AddConversionFuncs( - Convert_unversioned_TypeMeta_To_unversioned_TypeMeta, + Convert_v1_TypeMeta_To_v1_TypeMeta, Convert_unversioned_ListMeta_To_unversioned_ListMeta, @@ -67,6 +66,8 @@ func addConversionFuncs(scheme *runtime.Scheme) error { Convert_map_to_unversioned_LabelSelector, Convert_unversioned_LabelSelector_to_map, + + Convert_Slice_string_To_Slice_int32, ) } @@ -153,31 +154,35 @@ func Convert_bool_To_Pointer_bool(in *bool, out **bool, s conversion.Scope) erro return nil } -func Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(in, out *unversioned.TypeMeta, s conversion.Scope) error { +// +k8s:conversion-fn=drop +func Convert_v1_TypeMeta_To_v1_TypeMeta(in, out *TypeMeta, s conversion.Scope) error { // These values are explicitly not copied //out.APIVersion = in.APIVersion //out.Kind = in.Kind return nil } -func Convert_unversioned_ListMeta_To_unversioned_ListMeta(in, out *unversioned.ListMeta, s conversion.Scope) error { +// +k8s:conversion-fn=copy-only +func Convert_unversioned_ListMeta_To_unversioned_ListMeta(in, out *ListMeta, s conversion.Scope) error { *out = *in return nil } +// +k8s:conversion-fn=copy-only func Convert_intstr_IntOrString_To_intstr_IntOrString(in, out *intstr.IntOrString, s conversion.Scope) error { *out = *in return nil } -func Convert_unversioned_Time_To_unversioned_Time(in *unversioned.Time, out *unversioned.Time, s conversion.Scope) error { +// +k8s:conversion-fn=copy-only +func Convert_unversioned_Time_To_unversioned_Time(in *Time, out *Time, s conversion.Scope) error { // Cannot deep copy these, because time.Time has unexported fields. *out = *in return nil } // Convert_Slice_string_To_unversioned_Time allows converting a URL query parameter value -func Convert_Slice_string_To_unversioned_Time(input *[]string, out *unversioned.Time, s conversion.Scope) error { +func Convert_Slice_string_To_unversioned_Time(input *[]string, out *Time, s conversion.Scope) error { str := "" if len(*input) > 0 { str = (*input)[0] @@ -219,27 +224,41 @@ func Convert_fields_Selector_To_string(in *fields.Selector, out *string, s conve return nil } +// +k8s:conversion-fn=copy-only func Convert_resource_Quantity_To_resource_Quantity(in *resource.Quantity, out *resource.Quantity, s conversion.Scope) error { *out = *in return nil } -func Convert_map_to_unversioned_LabelSelector(in *map[string]string, out *unversioned.LabelSelector, s conversion.Scope) error { +func Convert_map_to_unversioned_LabelSelector(in *map[string]string, out *LabelSelector, s conversion.Scope) error { if in == nil { return nil } - out = new(unversioned.LabelSelector) + out = new(LabelSelector) for labelKey, labelValue := range *in { - utillabels.AddLabelToSelector(out, labelKey, labelValue) + AddLabelToSelector(out, labelKey, labelValue) } return nil } -func Convert_unversioned_LabelSelector_to_map(in *unversioned.LabelSelector, out *map[string]string, s conversion.Scope) error { +func Convert_unversioned_LabelSelector_to_map(in *LabelSelector, out *map[string]string, s conversion.Scope) error { var err error - *out, err = unversioned.LabelSelectorAsMap(in) - if err != nil { - err = field.Invalid(field.NewPath("labelSelector"), *in, fmt.Sprintf("cannot convert to old selector: %v", err)) - } + *out, err = LabelSelectorAsMap(in) return err } + +// Convert_Slice_string_To_Slice_int32 converts multiple query parameters or +// a single query parameter with a comma delimited value to multiple int32. +// This is used for port forwarding which needs the ports as int32. +func Convert_Slice_string_To_Slice_int32(in *[]string, out *[]int32, s conversion.Scope) error { + for _, s := range *in { + for _, v := range strings.Split(s, ",") { + x, err := strconv.ParseUint(v, 10, 16) + if err != nil { + return fmt.Errorf("cannot convert to []int32: %v", err) + } + *out = append(*out, int32(x)) + } + } + return nil +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/doc.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go similarity index 90% rename from vendor/k8s.io/client-go/1.5/pkg/api/unversioned/doc.go rename to vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go index 02566d2a5..52273240f 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go @@ -16,5 +16,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:openapi-gen=true +// +k8s:defaulter-gen=TypeMeta -package unversioned +// +groupName=meta.k8s.io +package v1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/duration.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go similarity index 98% rename from vendor/k8s.io/client-go/1.5/pkg/api/unversioned/duration.go rename to vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go index ed54e515d..fea458dfb 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/duration.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package unversioned +package v1 import ( "encoding/json" diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go similarity index 58% rename from vendor/k8s.io/client-go/1.5/pkg/api/unversioned/generated.pb.go rename to vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go index a119204bc..72282474d 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,14 +15,14 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/pkg/api/unversioned/generated.proto +// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto // DO NOT EDIT! /* - Package unversioned is a generated protocol buffer package. + Package v1 is a generated protocol buffer package. It is generated from these files: - k8s.io/kubernetes/pkg/api/unversioned/generated.proto + k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto It has these top-level messages: APIGroup @@ -30,8 +30,10 @@ limitations under the License. APIResource APIResourceList APIVersions + DeleteOptions Duration ExportOptions + GetOptions GroupKind GroupResource GroupVersion @@ -41,6 +43,10 @@ limitations under the License. LabelSelector LabelSelectorRequirement ListMeta + ListOptions + ObjectMeta + OwnerReference + Preconditions RootPaths ServerAddressByClientCIDR Status @@ -49,14 +55,17 @@ limitations under the License. Time Timestamp TypeMeta + Verbs + WatchEvent */ -package unversioned +package v1 import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" import time "time" +import k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" import strings "strings" import reflect "reflect" @@ -93,113 +102,153 @@ func (m *APIVersions) Reset() { *m = APIVersions{} } func (*APIVersions) ProtoMessage() {} func (*APIVersions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } +func (m *DeleteOptions) Reset() { *m = DeleteOptions{} } +func (*DeleteOptions) ProtoMessage() {} +func (*DeleteOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + func (m *Duration) Reset() { *m = Duration{} } func (*Duration) ProtoMessage() {} -func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } +func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } func (m *ExportOptions) Reset() { *m = ExportOptions{} } func (*ExportOptions) ProtoMessage() {} -func (*ExportOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } +func (*ExportOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } + +func (m *GetOptions) Reset() { *m = GetOptions{} } +func (*GetOptions) ProtoMessage() {} +func (*GetOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } func (m *GroupKind) Reset() { *m = GroupKind{} } func (*GroupKind) ProtoMessage() {} -func (*GroupKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (*GroupKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } func (m *GroupResource) Reset() { *m = GroupResource{} } func (*GroupResource) ProtoMessage() {} -func (*GroupResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } +func (*GroupResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } func (m *GroupVersion) Reset() { *m = GroupVersion{} } func (*GroupVersion) ProtoMessage() {} -func (*GroupVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } +func (*GroupVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} } func (*GroupVersionForDiscovery) ProtoMessage() {} func (*GroupVersionForDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{10} + return fileDescriptorGenerated, []int{12} } func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } func (*GroupVersionKind) ProtoMessage() {} -func (*GroupVersionKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } +func (*GroupVersionKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } func (*GroupVersionResource) ProtoMessage() {} -func (*GroupVersionResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } +func (*GroupVersionResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } func (m *LabelSelector) Reset() { *m = LabelSelector{} } func (*LabelSelector) ProtoMessage() {} -func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } +func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } func (*LabelSelectorRequirement) ProtoMessage() {} func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{14} + return fileDescriptorGenerated, []int{16} } func (m *ListMeta) Reset() { *m = ListMeta{} } func (*ListMeta) ProtoMessage() {} -func (*ListMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } +func (*ListMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } + +func (m *ListOptions) Reset() { *m = ListOptions{} } +func (*ListOptions) ProtoMessage() {} +func (*ListOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } + +func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } +func (*ObjectMeta) ProtoMessage() {} +func (*ObjectMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } + +func (m *OwnerReference) Reset() { *m = OwnerReference{} } +func (*OwnerReference) ProtoMessage() {} +func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } + +func (m *Preconditions) Reset() { *m = Preconditions{} } +func (*Preconditions) ProtoMessage() {} +func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } func (m *RootPaths) Reset() { *m = RootPaths{} } func (*RootPaths) ProtoMessage() {} -func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } +func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } func (*ServerAddressByClientCIDR) ProtoMessage() {} func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{17} + return fileDescriptorGenerated, []int{23} } func (m *Status) Reset() { *m = Status{} } func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } +func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } func (m *StatusCause) Reset() { *m = StatusCause{} } func (*StatusCause) ProtoMessage() {} -func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } +func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } func (m *StatusDetails) Reset() { *m = StatusDetails{} } func (*StatusDetails) ProtoMessage() {} -func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } +func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } func (m *Time) Reset() { *m = Time{} } func (*Time) ProtoMessage() {} -func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } +func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } func (m *Timestamp) Reset() { *m = Timestamp{} } func (*Timestamp) ProtoMessage() {} -func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } +func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} } func (m *TypeMeta) Reset() { *m = TypeMeta{} } func (*TypeMeta) ProtoMessage() {} -func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } +func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} } + +func (m *Verbs) Reset() { *m = Verbs{} } +func (*Verbs) ProtoMessage() {} +func (*Verbs) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} } + +func (m *WatchEvent) Reset() { *m = WatchEvent{} } +func (*WatchEvent) ProtoMessage() {} +func (*WatchEvent) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{31} } func init() { - proto.RegisterType((*APIGroup)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.APIGroup") - proto.RegisterType((*APIGroupList)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.APIGroupList") - proto.RegisterType((*APIResource)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.APIResource") - proto.RegisterType((*APIResourceList)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.APIResourceList") - proto.RegisterType((*APIVersions)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.APIVersions") - proto.RegisterType((*Duration)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.Duration") - proto.RegisterType((*ExportOptions)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.ExportOptions") - proto.RegisterType((*GroupKind)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.GroupKind") - proto.RegisterType((*GroupResource)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.GroupResource") - proto.RegisterType((*GroupVersion)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.GroupVersion") - proto.RegisterType((*GroupVersionForDiscovery)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.GroupVersionForDiscovery") - proto.RegisterType((*GroupVersionKind)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.GroupVersionKind") - proto.RegisterType((*GroupVersionResource)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.GroupVersionResource") - proto.RegisterType((*LabelSelector)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.LabelSelector") - proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.LabelSelectorRequirement") - proto.RegisterType((*ListMeta)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.ListMeta") - proto.RegisterType((*RootPaths)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.RootPaths") - proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.ServerAddressByClientCIDR") - proto.RegisterType((*Status)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.Status") - proto.RegisterType((*StatusCause)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.StatusCause") - proto.RegisterType((*StatusDetails)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.StatusDetails") - proto.RegisterType((*Time)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.Time") - proto.RegisterType((*Timestamp)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.Timestamp") - proto.RegisterType((*TypeMeta)(nil), "k8s.io.client-go.1.5.pkg.api.unversioned.TypeMeta") + proto.RegisterType((*APIGroup)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIGroup") + proto.RegisterType((*APIGroupList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIGroupList") + proto.RegisterType((*APIResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIResource") + proto.RegisterType((*APIResourceList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIResourceList") + proto.RegisterType((*APIVersions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIVersions") + proto.RegisterType((*DeleteOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions") + proto.RegisterType((*Duration)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Duration") + proto.RegisterType((*ExportOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ExportOptions") + proto.RegisterType((*GetOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GetOptions") + proto.RegisterType((*GroupKind)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupKind") + proto.RegisterType((*GroupResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupResource") + proto.RegisterType((*GroupVersion)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersion") + proto.RegisterType((*GroupVersionForDiscovery)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery") + proto.RegisterType((*GroupVersionKind)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind") + proto.RegisterType((*GroupVersionResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource") + proto.RegisterType((*LabelSelector)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector") + proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement") + proto.RegisterType((*ListMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta") + proto.RegisterType((*ListOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ListOptions") + proto.RegisterType((*ObjectMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta") + proto.RegisterType((*OwnerReference)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference") + proto.RegisterType((*Preconditions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Preconditions") + proto.RegisterType((*RootPaths)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.RootPaths") + proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR") + proto.RegisterType((*Status)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Status") + proto.RegisterType((*StatusCause)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.StatusCause") + proto.RegisterType((*StatusDetails)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.StatusDetails") + proto.RegisterType((*Time)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Time") + proto.RegisterType((*Timestamp)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Timestamp") + proto.RegisterType((*TypeMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta") + proto.RegisterType((*Verbs)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Verbs") + proto.RegisterType((*WatchEvent)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.WatchEvent") } func (m *APIGroup) Marshal() (data []byte, err error) { size := m.Size() @@ -316,6 +365,31 @@ func (m *APIResource) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) i += copy(data[i:], m.Kind) + if m.Verbs != nil { + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Verbs.Size())) + n2, err := m.Verbs.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if len(m.ShortNames) > 0 { + for _, s := range m.ShortNames { + data[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } return i, nil } @@ -398,6 +472,55 @@ func (m *APIVersions) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *DeleteOptions) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeleteOptions) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.GracePeriodSeconds != nil { + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.GracePeriodSeconds)) + } + if m.Preconditions != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Preconditions.Size())) + n3, err := m.Preconditions.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.OrphanDependents != nil { + data[i] = 0x18 + i++ + if *m.OrphanDependents { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.PropagationPolicy != nil { + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(*m.PropagationPolicy))) + i += copy(data[i:], *m.PropagationPolicy) + } + return i, nil +} + func (m *Duration) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -453,6 +576,28 @@ func (m *ExportOptions) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *GetOptions) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *GetOptions) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ResourceVersion))) + i += copy(data[i:], m.ResourceVersion) + return i, nil +} + func (m *GroupKind) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -731,6 +876,260 @@ func (m *ListMeta) MarshalTo(data []byte) (int, error) { 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 *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())) + n4, err := m.CreationTimestamp.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + if m.DeletionTimestamp != nil { + data[i] = 0x4a + i++ + i = encodeVarintGenerated(data, i, uint64(m.DeletionTimestamp.Size())) + n5, err := m.DeletionTimestamp.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + } + 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) + } + } + data[i] = 0x7a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ClusterName))) + i += copy(data[i:], m.ClusterName) + return i, nil +} + +func (m *OwnerReference) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *OwnerReference) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) + i += copy(data[i:], m.Kind) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.UID))) + i += copy(data[i:], m.UID) + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.APIVersion))) + i += copy(data[i:], m.APIVersion) + if m.Controller != nil { + data[i] = 0x30 + i++ + if *m.Controller { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.BlockOwnerDeletion != nil { + data[i] = 0x38 + i++ + if *m.BlockOwnerDeletion { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + +func (m *Preconditions) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Preconditions) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.UID != nil { + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(*m.UID))) + i += copy(data[i:], *m.UID) + } + return i, nil +} + func (m *RootPaths) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -808,11 +1207,11 @@ func (m *Status) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n2, err := m.ListMeta.MarshalTo(data[i:]) + n6, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n2 + i += n6 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(len(m.Status))) @@ -829,11 +1228,11 @@ func (m *Status) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(m.Details.Size())) - n3, err := m.Details.MarshalTo(data[i:]) + n7, err := m.Details.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n3 + i += n7 } data[i] = 0x30 i++ @@ -966,6 +1365,69 @@ func (m *TypeMeta) MarshalTo(data []byte) (int, error) { return i, nil } +func (m Verbs) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m Verbs) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m) > 0 { + for _, s := range m { + data[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + return i, nil +} + +func (m *WatchEvent) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *WatchEvent) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Object.Size())) + n8, err := m.Object.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n8 + return i, nil +} + func encodeFixed64Generated(data []byte, offset int, v uint64) int { data[offset] = uint8(v) data[offset+1] = uint8(v >> 8) @@ -1035,6 +1497,16 @@ func (m *APIResource) Size() (n int) { n += 2 l = len(m.Kind) n += 1 + l + sovGenerated(uint64(l)) + if m.Verbs != nil { + l = m.Verbs.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.ShortNames) > 0 { + for _, s := range m.ShortNames { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -1070,6 +1542,26 @@ func (m *APIVersions) Size() (n int) { return n } +func (m *DeleteOptions) Size() (n int) { + var l int + _ = l + if m.GracePeriodSeconds != nil { + n += 1 + sovGenerated(uint64(*m.GracePeriodSeconds)) + } + if m.Preconditions != nil { + l = m.Preconditions.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.OrphanDependents != nil { + n += 2 + } + if m.PropagationPolicy != nil { + l = len(*m.PropagationPolicy) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *Duration) Size() (n int) { var l int _ = l @@ -1085,6 +1577,14 @@ func (m *ExportOptions) Size() (n int) { return n } +func (m *GetOptions) Size() (n int) { + var l int + _ = l + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *GroupKind) Size() (n int) { var l int _ = l @@ -1195,6 +1695,110 @@ func (m *ListMeta) Size() (n int) { 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 *ObjectMeta) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.GenerateName) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.SelfLink) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Generation)) + l = m.CreationTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.DeletionTimestamp != nil { + l = m.DeletionTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.DeletionGracePeriodSeconds != nil { + n += 1 + sovGenerated(uint64(*m.DeletionGracePeriodSeconds)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.OwnerReferences) > 0 { + for _, e := range m.OwnerReferences { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Finalizers) > 0 { + for _, s := range m.Finalizers { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.ClusterName) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *OwnerReference) Size() (n int) { + var l int + _ = l + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.APIVersion) + n += 1 + l + sovGenerated(uint64(l)) + if m.Controller != nil { + n += 2 + } + if m.BlockOwnerDeletion != nil { + n += 2 + } + return n +} + +func (m *Preconditions) Size() (n int) { + var l int + _ = l + if m.UID != nil { + l = len(*m.UID) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *RootPaths) Size() (n int) { var l int _ = l @@ -1285,6 +1889,28 @@ func (m *TypeMeta) Size() (n int) { return n } +func (m Verbs) Size() (n int) { + var l int + _ = l + if len(m) > 0 { + for _, s := range m { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *WatchEvent) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Object.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func sovGenerated(x uint64) (n int) { for { n++ @@ -1329,6 +1955,8 @@ func (this *APIResource) String() string { `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Namespaced:` + fmt.Sprintf("%v", this.Namespaced) + `,`, `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Verbs:` + strings.Replace(fmt.Sprintf("%v", this.Verbs), "Verbs", "Verbs", 1) + `,`, + `ShortNames:` + fmt.Sprintf("%v", this.ShortNames) + `,`, `}`, }, "") return s @@ -1344,6 +1972,19 @@ func (this *APIResourceList) String() string { }, "") return s } +func (this *DeleteOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeleteOptions{`, + `GracePeriodSeconds:` + valueToStringGenerated(this.GracePeriodSeconds) + `,`, + `Preconditions:` + strings.Replace(fmt.Sprintf("%v", this.Preconditions), "Preconditions", "Preconditions", 1) + `,`, + `OrphanDependents:` + valueToStringGenerated(this.OrphanDependents) + `,`, + `PropagationPolicy:` + valueToStringGenerated(this.PropagationPolicy) + `,`, + `}`, + }, "") + return s +} func (this *Duration) String() string { if this == nil { return "nil" @@ -1365,6 +2006,16 @@ func (this *ExportOptions) String() string { }, "") return s } +func (this *GetOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetOptions{`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `}`, + }, "") + return s +} func (this *GroupVersionForDiscovery) String() string { if this == nil { return "nil" @@ -1420,6 +2071,89 @@ func (this *ListMeta) String() string { }, "") return s } +func (this *ListOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListOptions{`, + `LabelSelector:` + fmt.Sprintf("%v", this.LabelSelector) + `,`, + `FieldSelector:` + fmt.Sprintf("%v", this.FieldSelector) + `,`, + `Watch:` + fmt.Sprintf("%v", this.Watch) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, + `}`, + }, "") + return s +} +func (this *ObjectMeta) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&ObjectMeta{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `GenerateName:` + fmt.Sprintf("%v", this.GenerateName) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `SelfLink:` + fmt.Sprintf("%v", this.SelfLink) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`, + `CreationTimestamp:` + strings.Replace(strings.Replace(this.CreationTimestamp.String(), "Time", "Time", 1), `&`, ``, 1) + `,`, + `DeletionTimestamp:` + strings.Replace(fmt.Sprintf("%v", this.DeletionTimestamp), "Time", "Time", 1) + `,`, + `DeletionGracePeriodSeconds:` + valueToStringGenerated(this.DeletionGracePeriodSeconds) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `OwnerReferences:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.OwnerReferences), "OwnerReference", "OwnerReference", 1), `&`, ``, 1) + `,`, + `Finalizers:` + fmt.Sprintf("%v", this.Finalizers) + `,`, + `ClusterName:` + fmt.Sprintf("%v", this.ClusterName) + `,`, + `}`, + }, "") + return s +} +func (this *OwnerReference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OwnerReference{`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, + `Controller:` + valueToStringGenerated(this.Controller) + `,`, + `BlockOwnerDeletion:` + valueToStringGenerated(this.BlockOwnerDeletion) + `,`, + `}`, + }, "") + return s +} +func (this *Preconditions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Preconditions{`, + `UID:` + valueToStringGenerated(this.UID) + `,`, + `}`, + }, "") + return s +} func (this *RootPaths) String() string { if this == nil { return "nil" @@ -1504,6 +2238,17 @@ func (this *TypeMeta) String() string { }, "") return s } +func (this *WatchEvent) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WatchEvent{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Object:` + strings.Replace(strings.Replace(this.Object.String(), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -1871,6 +2616,68 @@ func (m *APIResource) Unmarshal(data []byte) error { } m.Kind = string(data[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Verbs == nil { + m.Verbs = Verbs{} + } + if err := m.Verbs.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShortNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ShortNames = append(m.ShortNames, string(data[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -2112,6 +2919,160 @@ func (m *APIVersions) Unmarshal(data []byte) error { } return nil } +func (m *DeleteOptions) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GracePeriodSeconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.GracePeriodSeconds = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Preconditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Preconditions == nil { + m.Preconditions = &Preconditions{} + } + if err := m.Preconditions.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrphanDependents", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.OrphanDependents = &b + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PropagationPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := DeletionPropagation(data[iNdEx:postIndex]) + m.PropagationPolicy = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Duration) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -2271,6 +3232,85 @@ func (m *ExportOptions) Unmarshal(data []byte) error { } return nil } +func (m *GetOptions) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + 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 @@ -3414,6 +4454,1108 @@ func (m *ListMeta) Unmarshal(data []byte) error { } 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 *ObjectMeta) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ObjectMeta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ObjectMeta: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GenerateName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GenerateName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelfLink", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SelfLink = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = k8s_io_apimachinery_pkg_types.UID(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) + } + m.Generation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Generation |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CreationTimestamp.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DeletionTimestamp == nil { + m.DeletionTimestamp = &Time{} + } + if err := m.DeletionTimestamp.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionGracePeriodSeconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DeletionGracePeriodSeconds = &v + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + 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 + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClusterName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OwnerReference) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OwnerReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OwnerReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = k8s_io_apimachinery_pkg_types.UID(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Controller = &b + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockOwnerDeletion", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.BlockOwnerDeletion = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Preconditions) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Preconditions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Preconditions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := k8s_io_apimachinery_pkg_types.UID(data[iNdEx:postIndex]) + m.UID = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *RootPaths) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -4340,6 +6482,194 @@ func (m *TypeMeta) Unmarshal(data []byte) error { } return nil } +func (m *Verbs) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Verbs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Verbs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + *m = append(*m, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WatchEvent) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WatchEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WatchEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Object.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipGenerated(data []byte) (n int, err error) { l := len(data) iNdEx := 0 @@ -4446,91 +6776,140 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 1376 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0x47, 0xec, 0xae, 0x9f, 0x63, 0x92, 0x0e, 0xa9, 0x70, 0x2d, 0x11, 0x87, 0x45, 0xa0, - 0x54, 0x6a, 0x6d, 0x35, 0x02, 0x54, 0x15, 0xf1, 0x11, 0x27, 0x69, 0x15, 0x35, 0x49, 0xa3, 0x49, - 0x15, 0xa4, 0x16, 0x24, 0x36, 0xde, 0xb1, 0xb3, 0xb2, 0xbd, 0xbb, 0xec, 0xec, 0x56, 0x8d, 0x40, - 0xa2, 0x17, 0x24, 0x0e, 0x08, 0xe5, 0xc8, 0x05, 0xd4, 0x4a, 0xfc, 0x07, 0xfc, 0x13, 0x11, 0xa7, - 0x5e, 0x90, 0x38, 0xa0, 0x08, 0xca, 0x85, 0x2b, 0x57, 0x4e, 0xcc, 0xcc, 0xce, 0xec, 0x87, 0x53, - 0x93, 0x0d, 0xf4, 0xc0, 0x61, 0x15, 0xcf, 0xfb, 0x9e, 0xf7, 0x7e, 0xf3, 0xde, 0x0b, 0xbc, 0x39, - 0xb8, 0x46, 0x5b, 0x96, 0xd3, 0x1e, 0x04, 0x7b, 0xc4, 0xb3, 0x89, 0x4f, 0x68, 0xdb, 0x1d, 0xf4, - 0xdb, 0x86, 0x6b, 0xb5, 0x03, 0xfb, 0x3e, 0xf1, 0xa8, 0xe5, 0xd8, 0xc4, 0x6c, 0xf7, 0x89, 0x4d, - 0x3c, 0xc3, 0x27, 0x66, 0xcb, 0xf5, 0x1c, 0xdf, 0x41, 0xaf, 0x85, 0x6a, 0xad, 0x58, 0xad, 0xc5, - 0xd4, 0x5a, 0x4c, 0xad, 0x95, 0x50, 0x6b, 0x5c, 0xe9, 0x5b, 0xfe, 0x7e, 0xb0, 0xd7, 0xea, 0x3a, - 0xa3, 0x76, 0xdf, 0xe9, 0x3b, 0x6d, 0xa1, 0xbd, 0x17, 0xf4, 0xc4, 0x49, 0x1c, 0xc4, 0xaf, 0xd0, - 0x6a, 0xe3, 0xca, 0xb3, 0x83, 0xf1, 0x02, 0xdb, 0xb7, 0x46, 0x64, 0x3c, 0x88, 0xc6, 0xd5, 0x67, - 0x8b, 0x07, 0xbe, 0x35, 0x6c, 0x5b, 0xb6, 0x4f, 0x7d, 0x6f, 0x5c, 0x45, 0xff, 0xb1, 0x08, 0xda, - 0xf2, 0xf6, 0xfa, 0x4d, 0xcf, 0x09, 0x5c, 0xb4, 0x00, 0x53, 0xb6, 0x31, 0x22, 0xf5, 0xfc, 0x42, - 0x7e, 0xb1, 0xd2, 0x99, 0x3e, 0x3a, 0x6e, 0xe6, 0x9e, 0x1e, 0x37, 0xa7, 0xb6, 0x18, 0x0d, 0x0b, - 0x0e, 0x1a, 0x81, 0x26, 0x2f, 0x43, 0xeb, 0x85, 0x85, 0xe2, 0x62, 0x75, 0xe9, 0xbd, 0x56, 0xa6, - 0x9b, 0xb7, 0x84, 0x87, 0xdd, 0xf0, 0x78, 0xc3, 0xf1, 0x56, 0x2d, 0xda, 0x75, 0x18, 0xf7, 0xa0, - 0x33, 0x2b, 0xdd, 0x68, 0x92, 0x49, 0x71, 0xe4, 0x02, 0x7d, 0x91, 0x87, 0x59, 0xd7, 0x23, 0x3d, - 0xe2, 0x79, 0xc4, 0x94, 0xfc, 0x7a, 0x91, 0x45, 0xf7, 0x1c, 0xfc, 0xd6, 0xa5, 0xdf, 0xd9, 0xed, - 0x31, 0x07, 0xf8, 0x84, 0x4b, 0xf4, 0x7d, 0x1e, 0x1a, 0x94, 0x78, 0x4c, 0x6f, 0xd9, 0x34, 0x3d, - 0x42, 0x69, 0xe7, 0x60, 0x65, 0x68, 0x11, 0xdb, 0x5f, 0x59, 0x5f, 0xc5, 0xb4, 0x3e, 0x25, 0x32, - 0xf1, 0x7e, 0xc6, 0x88, 0x76, 0x26, 0x19, 0xea, 0xe8, 0x32, 0xa4, 0xc6, 0x44, 0x11, 0x8a, 0xff, - 0x21, 0x0e, 0xbd, 0x0f, 0xd3, 0xaa, 0x96, 0x1b, 0x16, 0xf5, 0xd1, 0x07, 0x50, 0xee, 0xf3, 0x03, - 0x65, 0x15, 0xe5, 0x11, 0xb6, 0x33, 0x46, 0xa8, 0x8c, 0x74, 0x5e, 0x90, 0x01, 0x95, 0xc5, 0x91, - 0x62, 0x69, 0x4e, 0x67, 0x75, 0xa9, 0x32, 0x21, 0x4c, 0xa8, 0x13, 0x78, 0x5d, 0x92, 0x01, 0x38, - 0x4b, 0x00, 0xfc, 0x2f, 0x75, 0x8d, 0x2e, 0x31, 0x19, 0x74, 0xf2, 0x8b, 0x5a, 0x07, 0x49, 0x39, - 0xd8, 0x8a, 0x38, 0x38, 0x21, 0xc5, 0xad, 0x0e, 0x2c, 0xdb, 0x14, 0x05, 0x4f, 0x58, 0xbd, 0xc5, - 0x68, 0x58, 0x70, 0xf4, 0x1f, 0xf2, 0x30, 0x93, 0x88, 0x43, 0x5c, 0xfa, 0x1a, 0x4c, 0xf7, 0x13, - 0x35, 0x97, 0x31, 0xcd, 0x49, 0xed, 0xe9, 0x24, 0x1e, 0x70, 0x4a, 0x12, 0xf5, 0xa0, 0xe2, 0x49, - 0x4b, 0x0a, 0xdd, 0x4b, 0xd9, 0x33, 0xa6, 0x82, 0x88, 0x5d, 0x25, 0x88, 0x14, 0xc7, 0xa6, 0xf5, - 0x3f, 0xc2, 0xec, 0x29, 0xbc, 0xa3, 0xc5, 0xc4, 0xa3, 0xe2, 0x85, 0x62, 0x77, 0x9d, 0xf0, 0x1e, - 0x4e, 0xc1, 0x61, 0xe1, 0xff, 0x81, 0xc3, 0xeb, 0xda, 0x37, 0x8f, 0x9a, 0xb9, 0x87, 0xbf, 0x2c, - 0xe4, 0xf4, 0x75, 0xd0, 0x56, 0x03, 0xd6, 0x6f, 0x78, 0x7a, 0xdf, 0x01, 0xcd, 0x94, 0xbf, 0x45, - 0x51, 0x8a, 0x9d, 0x57, 0xd4, 0xd3, 0x57, 0x32, 0x7f, 0x1d, 0x37, 0x6b, 0xbc, 0xb3, 0xb5, 0x14, - 0x01, 0x47, 0x2a, 0xfa, 0x87, 0x50, 0x5b, 0x7b, 0xe0, 0x3a, 0x9e, 0x7f, 0xdb, 0xf5, 0x45, 0x32, - 0x5e, 0x87, 0x32, 0x11, 0x04, 0x61, 0x4d, 0x8b, 0xc1, 0x1a, 0x8a, 0x61, 0xc9, 0x45, 0xaf, 0x42, - 0x89, 0x3c, 0x30, 0xba, 0xbe, 0x44, 0x5d, 0x4d, 0x8a, 0x95, 0xd6, 0x38, 0x11, 0x87, 0x3c, 0x66, - 0xbd, 0x22, 0x90, 0xc1, 0xc1, 0xc5, 0x35, 0x04, 0x30, 0x24, 0x76, 0x22, 0x0d, 0x21, 0x81, 0x43, - 0x5e, 0x84, 0xce, 0xc2, 0x24, 0x74, 0x26, 0xd2, 0x30, 0x84, 0x5a, 0xa8, 0xab, 0x1e, 0x4c, 0x26, - 0x0f, 0x97, 0x41, 0x53, 0xa0, 0x91, 0x5e, 0xa2, 0x5e, 0xa9, 0x0c, 0xe1, 0x48, 0x22, 0xe1, 0x6d, - 0x1f, 0x52, 0x28, 0xcf, 0xe6, 0xec, 0x12, 0x9c, 0x93, 0xd0, 0x90, 0xbe, 0x66, 0xa4, 0xd8, 0x39, - 0xf5, 0x58, 0x14, 0x3f, 0xe1, 0xe9, 0x73, 0xa8, 0x4f, 0xea, 0xaf, 0xff, 0xe1, 0x1d, 0x66, 0x0f, - 0x45, 0xff, 0x9a, 0x0d, 0x88, 0xa4, 0xa5, 0xec, 0xe5, 0xcb, 0xee, 0xe4, 0xf4, 0x3e, 0x94, 0xc8, - 0xc8, 0x77, 0x79, 0x98, 0x4b, 0x5d, 0xed, 0x4c, 0x15, 0x3f, 0x43, 0x50, 0x49, 0x70, 0x14, 0xcf, - 0x00, 0x8e, 0x9f, 0x0a, 0x50, 0xdb, 0x30, 0xf6, 0xc8, 0x70, 0x87, 0x0c, 0x49, 0xd7, 0x77, 0x3c, - 0xf4, 0x19, 0x54, 0x47, 0x86, 0xdf, 0xdd, 0x17, 0x54, 0x35, 0x2a, 0xd6, 0x32, 0x36, 0x91, 0x94, - 0xa9, 0xd6, 0x66, 0x6c, 0x67, 0xcd, 0xf6, 0xd9, 0x90, 0x7d, 0x51, 0xc6, 0x54, 0x4d, 0x70, 0x70, - 0xd2, 0x9d, 0x18, 0xf1, 0xe2, 0xcc, 0x5e, 0x2d, 0xef, 0x24, 0xff, 0x62, 0xb5, 0x48, 0xc5, 0x80, - 0xc9, 0x27, 0x81, 0xe5, 0x91, 0x11, 0x6b, 0x46, 0xf1, 0x88, 0xdf, 0x1c, 0x73, 0x80, 0x4f, 0xb8, - 0x6c, 0xbc, 0x0b, 0xb3, 0xe3, 0xd1, 0xa3, 0x59, 0x28, 0x0e, 0xc8, 0x41, 0x58, 0x31, 0xcc, 0x7f, - 0xa2, 0x39, 0x28, 0xdd, 0x37, 0x86, 0x81, 0x7c, 0x8f, 0x38, 0x3c, 0x5c, 0x2f, 0x5c, 0xcb, 0xeb, - 0xac, 0x35, 0xd7, 0x27, 0x05, 0x82, 0x5e, 0x4e, 0x18, 0xea, 0x54, 0x65, 0x54, 0xc5, 0x5b, 0xe4, - 0x20, 0xb4, 0xba, 0x06, 0x9a, 0xe3, 0xf2, 0xb5, 0xcc, 0xf1, 0x64, 0xdd, 0x2f, 0xa9, 0x5a, 0xde, - 0x96, 0x74, 0xd6, 0x19, 0x2f, 0xa4, 0xcc, 0x2b, 0x06, 0x8e, 0x54, 0x91, 0x0e, 0x65, 0x11, 0x0f, - 0x65, 0x80, 0xe0, 0x53, 0x04, 0x78, 0x33, 0xdc, 0x15, 0x14, 0x2c, 0x39, 0xfa, 0xa7, 0xa0, 0xf1, - 0x29, 0xb9, 0x49, 0x7c, 0x83, 0x43, 0x88, 0x92, 0x61, 0x6f, 0xc3, 0xb2, 0x07, 0x32, 0xb4, 0x08, - 0x42, 0x3b, 0x92, 0x8e, 0x23, 0x09, 0xb4, 0x0c, 0x33, 0x0a, 0x4e, 0xbb, 0x29, 0x8c, 0xbe, 0x24, - 0x95, 0x66, 0x70, 0x9a, 0x8d, 0xc7, 0xe5, 0xf5, 0xcb, 0x50, 0xc1, 0x8e, 0xe3, 0x6f, 0x1b, 0xfe, - 0x3e, 0x45, 0x4d, 0x28, 0xb9, 0xfc, 0x87, 0x1c, 0x79, 0x15, 0xfe, 0x18, 0x04, 0x07, 0x87, 0x74, - 0xfd, 0xab, 0x3c, 0x5c, 0x9c, 0x38, 0x80, 0xf8, 0x42, 0xd1, 0x8d, 0x4e, 0x32, 0xfc, 0x68, 0xa1, - 0x88, 0xe5, 0x70, 0x42, 0x0a, 0xbd, 0x0d, 0xb5, 0xd4, 0xd4, 0x92, 0x17, 0xb8, 0x20, 0xd5, 0x6a, - 0x29, 0x6f, 0x38, 0x2d, 0xab, 0xff, 0x59, 0x80, 0xf2, 0x8e, 0x6f, 0xf8, 0x01, 0x45, 0x1f, 0x81, - 0x36, 0x62, 0x09, 0x34, 0x0d, 0xdf, 0x10, 0x9e, 0xb3, 0x6f, 0x56, 0x2a, 0xf7, 0x71, 0xa6, 0x15, - 0x05, 0x47, 0x26, 0xf9, 0x60, 0xa3, 0xc2, 0x91, 0x8c, 0x2f, 0x1a, 0x6c, 0xa1, 0x7b, 0x2c, 0xb9, - 0xbc, 0x5b, 0xb0, 0x5d, 0x89, 0x1a, 0x7d, 0xd5, 0x01, 0xa2, 0x6e, 0xb1, 0x19, 0x92, 0xb1, 0xe2, - 0xa3, 0xb7, 0xa0, 0xec, 0x11, 0x83, 0xb2, 0x9a, 0x4d, 0x09, 0xc9, 0x79, 0x65, 0x12, 0x0b, 0x2a, - 0x43, 0xd7, 0xb4, 0x34, 0x2e, 0xce, 0x58, 0x4a, 0xa3, 0x7b, 0x70, 0xce, 0x64, 0x61, 0x59, 0xac, - 0x2f, 0x94, 0xc4, 0x45, 0xdf, 0xc8, 0xba, 0x5c, 0x08, 0x6b, 0xab, 0xa1, 0x6e, 0xa7, 0xca, 0x83, - 0x92, 0x07, 0xac, 0x2c, 0xf2, 0xbe, 0xda, 0x75, 0x4c, 0x52, 0x2f, 0x33, 0xcb, 0xa5, 0xb8, 0xaf, - 0xae, 0x30, 0x1a, 0x16, 0x1c, 0xfd, 0x90, 0x6d, 0x4a, 0xa1, 0xa5, 0x15, 0x23, 0xa0, 0x04, 0x5d, - 0x8d, 0xae, 0x11, 0x16, 0xfc, 0xa2, 0xd2, 0xb9, 0x73, 0xe0, 0x12, 0x76, 0x89, 0x8a, 0x10, 0xe3, - 0x87, 0xe8, 0x06, 0x89, 0x24, 0x15, 0x4e, 0x49, 0x12, 0x6b, 0xd1, 0x3d, 0x8b, 0x0c, 0x55, 0xa3, - 0x8f, 0x5a, 0xf4, 0x0d, 0x4e, 0xc4, 0x21, 0x4f, 0xff, 0x96, 0xf5, 0xcf, 0xd4, 0xe5, 0x32, 0x2c, - 0xbf, 0x51, 0xef, 0x2f, 0x64, 0xd8, 0x27, 0x26, 0x4e, 0x19, 0x74, 0x17, 0xca, 0x5d, 0x7e, 0x3f, - 0xf5, 0x0f, 0xc7, 0xd2, 0x99, 0x6a, 0x21, 0x52, 0x13, 0x63, 0x49, 0x1c, 0x19, 0x96, 0x42, 0x8b, - 0xe8, 0x26, 0x9c, 0xf7, 0x08, 0xeb, 0x79, 0xcb, 0x3d, 0x9f, 0x78, 0x3b, 0xa4, 0xeb, 0xd8, 0x66, - 0x58, 0xf2, 0x52, 0x94, 0xe4, 0xf3, 0x78, 0x5c, 0x00, 0x9f, 0xd4, 0x61, 0xab, 0xce, 0xd4, 0x1d, - 0xb6, 0xc1, 0xf1, 0xbc, 0x53, 0x69, 0x26, 0x5c, 0xf6, 0xa2, 0xbc, 0x2b, 0x65, 0xc5, 0xe7, 0xe9, - 0xb1, 0x0d, 0xdb, 0x09, 0xe1, 0x5e, 0x8a, 0xd3, 0xb3, 0xc5, 0x89, 0x38, 0xe4, 0x5d, 0x9f, 0xe3, - 0x13, 0xec, 0xcb, 0xc7, 0xcd, 0xdc, 0x21, 0xfb, 0x1e, 0x3d, 0x96, 0xd3, 0xec, 0x1e, 0x54, 0xb8, - 0x37, 0xf6, 0x20, 0x46, 0xee, 0xf3, 0x76, 0xa9, 0x7f, 0x0c, 0x1a, 0x87, 0x92, 0xe8, 0x95, 0xaa, - 0x3a, 0xf9, 0x89, 0xd5, 0x61, 0x0d, 0x89, 0x25, 0x3e, 0xdd, 0x1a, 0xa3, 0x86, 0x14, 0xaf, 0xfb, - 0x38, 0x21, 0xd5, 0xb9, 0x72, 0xf4, 0xdb, 0x7c, 0xee, 0x09, 0xfb, 0x7e, 0x66, 0xdf, 0xc3, 0xa7, - 0xf3, 0xf9, 0x23, 0xf6, 0x3d, 0x61, 0xdf, 0xaf, 0xec, 0x3b, 0xfc, 0x7d, 0x3e, 0x77, 0xb7, 0x9a, - 0x28, 0xe4, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x22, 0x00, 0xde, 0x9c, 0x10, 0x00, 0x00, + // 2160 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x19, 0xcd, 0x6f, 0x23, 0x57, + 0x3d, 0x63, 0xc7, 0x5e, 0xfb, 0xe7, 0x38, 0x1f, 0xaf, 0x59, 0x70, 0x23, 0x61, 0xa7, 0xd3, 0x0a, + 0xa5, 0xb0, 0xb5, 0x49, 0x0a, 0xd5, 0xb2, 0xc0, 0x42, 0x26, 0xce, 0x46, 0x51, 0x37, 0x9b, 0xe8, + 0xa5, 0xbb, 0x88, 0x65, 0x85, 0x98, 0xcc, 0xbc, 0x38, 0x43, 0xc6, 0x33, 0xc3, 0x7b, 0x63, 0x6f, + 0x4c, 0x0f, 0x54, 0x2a, 0x48, 0x1c, 0x10, 0xda, 0x23, 0x07, 0x84, 0xba, 0x82, 0x1b, 0x37, 0xfe, + 0x06, 0x24, 0xf6, 0x58, 0x89, 0x0b, 0x07, 0x64, 0xb1, 0xee, 0x81, 0x23, 0xf7, 0x9c, 0xd0, 0x7b, + 0xf3, 0xe6, 0xcb, 0x8e, 0x9b, 0x31, 0xed, 0xa1, 0xa7, 0x78, 0x7e, 0xdf, 0xef, 0xf7, 0xfd, 0x5e, + 0xe0, 0xe0, 0xfc, 0x36, 0x6b, 0x5a, 0x6e, 0xeb, 0xbc, 0x77, 0x42, 0xa8, 0x43, 0x7c, 0xc2, 0x5a, + 0x7d, 0xe2, 0x98, 0x2e, 0x6d, 0x49, 0x84, 0xee, 0x59, 0x5d, 0xdd, 0x38, 0xb3, 0x1c, 0x42, 0x07, + 0x2d, 0xef, 0xbc, 0xc3, 0x01, 0xac, 0xd5, 0x25, 0xbe, 0xde, 0xea, 0x6f, 0xb6, 0x3a, 0xc4, 0x21, + 0x54, 0xf7, 0x89, 0xd9, 0xf4, 0xa8, 0xeb, 0xbb, 0xe8, 0x8d, 0x80, 0xab, 0x99, 0xe4, 0x6a, 0x7a, + 0xe7, 0x1d, 0x0e, 0x60, 0x4d, 0xce, 0xd5, 0xec, 0x6f, 0xae, 0xbd, 0xd5, 0xb1, 0xfc, 0xb3, 0xde, + 0x49, 0xd3, 0x70, 0xbb, 0xad, 0x8e, 0xdb, 0x71, 0x5b, 0x82, 0xf9, 0xa4, 0x77, 0x2a, 0xbe, 0xc4, + 0x87, 0xf8, 0x15, 0x08, 0x5d, 0x9b, 0x6a, 0x0a, 0xed, 0x39, 0xbe, 0xd5, 0x25, 0xe3, 0x56, 0xac, + 0xbd, 0x73, 0x1d, 0x03, 0x33, 0xce, 0x48, 0x57, 0x9f, 0xe0, 0x7b, 0x7b, 0x1a, 0x5f, 0xcf, 0xb7, + 0xec, 0x96, 0xe5, 0xf8, 0xcc, 0xa7, 0xe3, 0x4c, 0xea, 0xdf, 0xf3, 0x50, 0xda, 0x3e, 0xda, 0xdf, + 0xa3, 0x6e, 0xcf, 0x43, 0xeb, 0x30, 0xef, 0xe8, 0x5d, 0x52, 0x53, 0xd6, 0x95, 0x8d, 0xb2, 0xb6, + 0xf0, 0x62, 0xd8, 0x98, 0x1b, 0x0d, 0x1b, 0xf3, 0x0f, 0xf4, 0x2e, 0xc1, 0x02, 0x83, 0x6c, 0x28, + 0xf5, 0x09, 0x65, 0x96, 0xeb, 0xb0, 0x5a, 0x6e, 0x3d, 0xbf, 0x51, 0xd9, 0xba, 0xdb, 0xcc, 0xe2, + 0xb4, 0xa6, 0x50, 0xf0, 0x28, 0x60, 0xbd, 0xe7, 0xd2, 0xb6, 0xc5, 0x0c, 0xb7, 0x4f, 0xe8, 0x40, + 0x5b, 0x96, 0x5a, 0x4a, 0x12, 0xc9, 0x70, 0xa4, 0x01, 0xfd, 0x4a, 0x81, 0x65, 0x8f, 0x92, 0x53, + 0x42, 0x29, 0x31, 0x25, 0xbe, 0x96, 0x5f, 0x57, 0x3e, 0x07, 0xb5, 0x35, 0xa9, 0x76, 0xf9, 0x68, + 0x4c, 0x3e, 0x9e, 0xd0, 0x88, 0xfe, 0xa4, 0xc0, 0x1a, 0x23, 0xb4, 0x4f, 0xe8, 0xb6, 0x69, 0x52, + 0xc2, 0x98, 0x36, 0xd8, 0xb1, 0x2d, 0xe2, 0xf8, 0x3b, 0xfb, 0x6d, 0xcc, 0x6a, 0xf3, 0xc2, 0x0f, + 0xdf, 0xcf, 0x66, 0xd0, 0xf1, 0x34, 0x39, 0x9a, 0x2a, 0x2d, 0x5a, 0x9b, 0x4a, 0xc2, 0xf0, 0xa7, + 0x98, 0xa1, 0x9e, 0xc2, 0x42, 0x18, 0xc8, 0xfb, 0x16, 0xf3, 0xd1, 0x23, 0x28, 0x76, 0xf8, 0x07, + 0xab, 0x29, 0xc2, 0xc0, 0x66, 0x36, 0x03, 0x43, 0x19, 0xda, 0xa2, 0xb4, 0xa7, 0x28, 0x3e, 0x19, + 0x96, 0xd2, 0xd4, 0x0f, 0x73, 0x50, 0xd9, 0x3e, 0xda, 0xc7, 0x84, 0xb9, 0x3d, 0x6a, 0x90, 0x0c, + 0x49, 0xb3, 0x05, 0xc0, 0xff, 0x32, 0x4f, 0x37, 0x88, 0x59, 0xcb, 0xad, 0x2b, 0x1b, 0x25, 0x0d, + 0x49, 0x3a, 0x78, 0x10, 0x61, 0x70, 0x82, 0x8a, 0x4b, 0x3d, 0xb7, 0x1c, 0x53, 0x44, 0x3b, 0x21, + 0xf5, 0x5d, 0xcb, 0x31, 0xb1, 0xc0, 0xa0, 0xfb, 0x50, 0xe8, 0x13, 0x7a, 0xc2, 0xfd, 0xcf, 0x13, + 0xe2, 0xeb, 0xd9, 0x8e, 0xf7, 0x88, 0xb3, 0x68, 0xe5, 0xd1, 0xb0, 0x51, 0x10, 0x3f, 0x71, 0x20, + 0x04, 0x35, 0x01, 0xd8, 0x99, 0x4b, 0x7d, 0x61, 0x4e, 0xad, 0xb0, 0x9e, 0xdf, 0x28, 0x6b, 0x8b, + 0xdc, 0xbe, 0xe3, 0x08, 0x8a, 0x13, 0x14, 0xea, 0x5f, 0x15, 0x58, 0x4a, 0x78, 0x41, 0x78, 0xfc, + 0x36, 0x2c, 0x74, 0x12, 0xf9, 0x26, 0x3d, 0xb2, 0x2a, 0x6d, 0x5f, 0x48, 0xe6, 0x22, 0x4e, 0x51, + 0x22, 0x02, 0x65, 0x2a, 0x25, 0x85, 0x75, 0xb5, 0x99, 0x39, 0x5c, 0xa1, 0x0d, 0xb1, 0xa6, 0x04, + 0x90, 0xe1, 0x58, 0xb2, 0xfa, 0x1f, 0x45, 0x84, 0x2e, 0xac, 0x34, 0xb4, 0x91, 0xa8, 0x66, 0x45, + 0x1c, 0x79, 0x61, 0x4a, 0x25, 0x5e, 0x53, 0x02, 0xb9, 0x2f, 0x44, 0x09, 0xdc, 0x29, 0xfd, 0xfe, + 0xa3, 0xc6, 0xdc, 0x07, 0xff, 0x5a, 0x9f, 0x53, 0x3f, 0xc9, 0x41, 0xb5, 0x4d, 0x6c, 0xe2, 0x93, + 0x43, 0xcf, 0x17, 0x27, 0xb8, 0x07, 0xa8, 0x43, 0x75, 0x83, 0x1c, 0x11, 0x6a, 0xb9, 0xe6, 0x31, + 0x31, 0x5c, 0xc7, 0x64, 0x22, 0x44, 0x79, 0xed, 0x4b, 0xa3, 0x61, 0x03, 0xed, 0x4d, 0x60, 0xf1, + 0x15, 0x1c, 0xc8, 0x86, 0xaa, 0x47, 0xc5, 0x6f, 0xcb, 0x97, 0x6d, 0x90, 0xa7, 0xdf, 0xdb, 0xd9, + 0xce, 0x7e, 0x94, 0x64, 0xd5, 0x56, 0x46, 0xc3, 0x46, 0x35, 0x05, 0xc2, 0x69, 0xe1, 0xe8, 0x07, + 0xb0, 0xec, 0x52, 0xef, 0x4c, 0x77, 0xda, 0xc4, 0x23, 0x8e, 0x49, 0x1c, 0x9f, 0x89, 0x92, 0x28, + 0x69, 0xab, 0xbc, 0x79, 0x1d, 0x8e, 0xe1, 0xf0, 0x04, 0x35, 0x7a, 0x0c, 0x2b, 0x1e, 0x75, 0x3d, + 0xbd, 0xa3, 0x73, 0x89, 0x47, 0xae, 0x6d, 0x19, 0x03, 0x51, 0x32, 0x65, 0xed, 0xd6, 0x68, 0xd8, + 0x58, 0x39, 0x1a, 0x47, 0x5e, 0x0e, 0x1b, 0xaf, 0x08, 0xd7, 0x71, 0x48, 0x8c, 0xc4, 0x93, 0x62, + 0xd4, 0x7d, 0x28, 0xb5, 0x7b, 0x54, 0x40, 0xd0, 0xf7, 0xa0, 0x64, 0xca, 0xdf, 0xd2, 0xab, 0xaf, + 0x85, 0x9d, 0x3d, 0xa4, 0xb9, 0x1c, 0x36, 0xaa, 0x7c, 0x80, 0x35, 0x43, 0x00, 0x8e, 0x58, 0xd4, + 0x27, 0x50, 0xdd, 0xbd, 0xf0, 0x5c, 0xea, 0x87, 0xf1, 0xfa, 0x2a, 0x14, 0x89, 0x00, 0x08, 0x69, + 0xa5, 0xb8, 0x1d, 0x05, 0x64, 0x58, 0x62, 0xd1, 0xeb, 0x50, 0x20, 0x17, 0xba, 0xe1, 0xcb, 0xbe, + 0x52, 0x95, 0x64, 0x85, 0x5d, 0x0e, 0xc4, 0x01, 0x4e, 0x3d, 0x04, 0xd8, 0x23, 0x91, 0xe8, 0x6d, + 0x58, 0x0a, 0x6b, 0x22, 0x5d, 0xaa, 0x5f, 0x96, 0xcc, 0x4b, 0x38, 0x8d, 0xc6, 0xe3, 0xf4, 0xea, + 0x13, 0x28, 0x8b, 0x72, 0xe6, 0xfd, 0x88, 0x9b, 0x20, 0xaa, 0x59, 0x4a, 0x89, 0x4c, 0x10, 0x14, + 0x38, 0xc0, 0x45, 0x0d, 0x2d, 0x37, 0xad, 0xa1, 0x25, 0xb2, 0xd7, 0x86, 0x6a, 0xc0, 0x1b, 0xf6, + 0xd8, 0x4c, 0x1a, 0x6e, 0x41, 0x29, 0x34, 0x53, 0x6a, 0x89, 0x66, 0x6b, 0x28, 0x08, 0x47, 0x14, + 0x09, 0x6d, 0x67, 0x90, 0x6a, 0x4d, 0xd9, 0x94, 0xbd, 0x09, 0x37, 0x64, 0x73, 0x90, 0xba, 0x96, + 0x24, 0xd9, 0x8d, 0xd0, 0x67, 0x21, 0x3e, 0xa1, 0xe9, 0x97, 0x50, 0x9b, 0x36, 0x90, 0x3f, 0x43, + 0xf3, 0xcc, 0x6e, 0x8a, 0xfa, 0x3b, 0x05, 0x96, 0x93, 0x92, 0xb2, 0x87, 0x2f, 0xbb, 0x92, 0xeb, + 0x47, 0x57, 0xc2, 0x23, 0x7f, 0x54, 0x60, 0x35, 0x75, 0xb4, 0x99, 0x22, 0x3e, 0x83, 0x51, 0xc9, + 0xe4, 0xc8, 0xcf, 0x90, 0x1c, 0xff, 0xc8, 0x41, 0xf5, 0xbe, 0x7e, 0x42, 0xec, 0x63, 0x62, 0x13, + 0xc3, 0x77, 0x29, 0x7a, 0x1f, 0x2a, 0x5d, 0xdd, 0x37, 0xce, 0x04, 0x34, 0x5c, 0x2e, 0xda, 0xd9, + 0xda, 0x5f, 0x4a, 0x52, 0xf3, 0x20, 0x16, 0xb3, 0xeb, 0xf8, 0x74, 0xa0, 0xbd, 0x22, 0x4d, 0xaa, + 0x24, 0x30, 0x38, 0xa9, 0x4d, 0x6c, 0x84, 0xe2, 0x7b, 0xf7, 0xc2, 0xe3, 0xfd, 0x7f, 0xf6, 0x45, + 0x34, 0x65, 0x02, 0x26, 0x3f, 0xef, 0x59, 0x94, 0x74, 0x89, 0xe3, 0xc7, 0x1b, 0xe1, 0xc1, 0x98, + 0x7c, 0x3c, 0xa1, 0x71, 0xed, 0x2e, 0x2c, 0x8f, 0x1b, 0x8f, 0x96, 0x21, 0x7f, 0x4e, 0x06, 0x41, + 0xbc, 0x30, 0xff, 0x89, 0x56, 0xa1, 0xd0, 0xd7, 0xed, 0x9e, 0xac, 0x46, 0x1c, 0x7c, 0xdc, 0xc9, + 0xdd, 0x56, 0xd4, 0x3f, 0x2b, 0x50, 0x9b, 0x66, 0x08, 0xfa, 0x4a, 0x42, 0x90, 0x56, 0x91, 0x56, + 0xe5, 0xdf, 0x25, 0x83, 0x40, 0xea, 0x2e, 0x94, 0x5c, 0x8f, 0xef, 0xf0, 0x2e, 0x95, 0x51, 0x7f, + 0x33, 0x8c, 0xe4, 0xa1, 0x84, 0x5f, 0x0e, 0x1b, 0x37, 0x53, 0xe2, 0x43, 0x04, 0x8e, 0x58, 0x91, + 0x0a, 0x45, 0x61, 0x0f, 0x9f, 0x27, 0x7c, 0xf2, 0x03, 0xef, 0xad, 0x8f, 0x04, 0x04, 0x4b, 0x8c, + 0xfa, 0x3e, 0x94, 0xf8, 0x62, 0x73, 0x40, 0x7c, 0x9d, 0x27, 0x10, 0x23, 0xf6, 0xe9, 0x7d, 0xcb, + 0x39, 0x97, 0xa6, 0x45, 0x09, 0x74, 0x2c, 0xe1, 0x38, 0xa2, 0xb8, 0xaa, 0xc5, 0xe6, 0x66, 0x6c, + 0xb1, 0x7f, 0xc9, 0x41, 0x85, 0x6b, 0x0f, 0xbb, 0xf6, 0x77, 0xa0, 0x6a, 0x27, 0xcf, 0x24, 0xad, + 0xb8, 0x29, 0x05, 0xa6, 0xb3, 0x14, 0xa7, 0x69, 0x39, 0xf3, 0xa9, 0x45, 0x6c, 0x33, 0x62, 0xce, + 0xa5, 0x99, 0xef, 0x25, 0x91, 0x38, 0x4d, 0xcb, 0x6b, 0xf1, 0x29, 0x8f, 0xb6, 0x9c, 0xbc, 0x51, + 0x2d, 0xfe, 0x90, 0x03, 0x71, 0x80, 0xbb, 0xea, 0xc4, 0xf3, 0xb3, 0x9d, 0x18, 0xdd, 0x81, 0x45, + 0x3e, 0x1e, 0xdd, 0x9e, 0x1f, 0xae, 0x27, 0x05, 0x31, 0x48, 0xd1, 0x68, 0xd8, 0x58, 0x7c, 0x2f, + 0x85, 0xc1, 0x63, 0x94, 0xea, 0x87, 0x00, 0x70, 0x78, 0xf2, 0x33, 0x62, 0x04, 0xd1, 0xba, 0x7e, + 0x29, 0xe7, 0xfd, 0x56, 0xde, 0x05, 0x39, 0x54, 0x3a, 0x24, 0xee, 0xb7, 0x09, 0x1c, 0x4e, 0x51, + 0xa2, 0x16, 0x94, 0xa3, 0x45, 0x5d, 0xf6, 0x92, 0x15, 0xc9, 0x56, 0x8e, 0xb6, 0x79, 0x1c, 0xd3, + 0xa4, 0x52, 0x67, 0xfe, 0xda, 0xd4, 0xd1, 0x20, 0xdf, 0xb3, 0x4c, 0x71, 0xf4, 0xb2, 0xf6, 0x8d, + 0x30, 0xfd, 0x1f, 0xee, 0xb7, 0x2f, 0x87, 0x8d, 0xd7, 0xa6, 0x5d, 0x71, 0xfd, 0x81, 0x47, 0x58, + 0xf3, 0xe1, 0x7e, 0x1b, 0x73, 0xe6, 0xab, 0x82, 0x51, 0x9c, 0x31, 0x18, 0x5b, 0x00, 0xf2, 0xd4, + 0x9c, 0xfb, 0x46, 0x10, 0x88, 0xf0, 0xd2, 0xb2, 0x17, 0x61, 0x70, 0x82, 0x0a, 0x31, 0x58, 0x31, + 0x28, 0x11, 0xbf, 0x79, 0xb8, 0x98, 0xaf, 0x77, 0xbd, 0x5a, 0x49, 0xec, 0x87, 0x5f, 0xcb, 0xd6, + 0x9d, 0x38, 0x9b, 0xf6, 0xaa, 0x54, 0xb3, 0xb2, 0x33, 0x2e, 0x0c, 0x4f, 0xca, 0x47, 0x2e, 0xac, + 0x98, 0x72, 0x5d, 0x8b, 0x95, 0x96, 0x67, 0x56, 0x7a, 0x93, 0x2b, 0x6c, 0x8f, 0x0b, 0xc2, 0x93, + 0xb2, 0xd1, 0x4f, 0x60, 0x2d, 0x04, 0x4e, 0xee, 0xcc, 0x35, 0x10, 0x9e, 0xaa, 0xf3, 0x2d, 0xbe, + 0x3d, 0x95, 0x0a, 0x7f, 0x8a, 0x04, 0x64, 0x42, 0xd1, 0x0e, 0x66, 0x4b, 0x45, 0x34, 0xf6, 0xef, + 0x66, 0x3b, 0x45, 0x9c, 0xfd, 0xcd, 0xe4, 0x4c, 0x89, 0xf6, 0x46, 0x39, 0x4e, 0xa4, 0x6c, 0x74, + 0x01, 0x15, 0xdd, 0x71, 0x5c, 0x5f, 0x0f, 0xb6, 0xf8, 0x05, 0xa1, 0x6a, 0x7b, 0x66, 0x55, 0xdb, + 0xb1, 0x8c, 0xb1, 0x19, 0x96, 0xc0, 0xe0, 0xa4, 0x2a, 0xf4, 0x14, 0x96, 0xdc, 0xa7, 0x0e, 0xa1, + 0x98, 0x9c, 0x12, 0x4a, 0x1c, 0x7e, 0xe5, 0xab, 0x0a, 0xed, 0xdf, 0xcc, 0xa8, 0x3d, 0xc5, 0x1c, + 0xa7, 0x74, 0x1a, 0xce, 0xf0, 0xb8, 0x16, 0x7e, 0xc7, 0x3d, 0xb5, 0x1c, 0xdd, 0xb6, 0x7e, 0x41, + 0x28, 0xab, 0x2d, 0xc6, 0x77, 0xdc, 0x7b, 0x11, 0x14, 0x27, 0x28, 0xd0, 0xb7, 0xa0, 0x62, 0xd8, + 0x3d, 0xe6, 0x13, 0x2a, 0x3a, 0xc4, 0x92, 0xa8, 0xa0, 0xe8, 0x7c, 0x3b, 0x31, 0x0a, 0x27, 0xe9, + 0xd6, 0xbe, 0x0d, 0x95, 0xff, 0x73, 0x2e, 0xf2, 0xb9, 0x3a, 0xee, 0xd0, 0x99, 0xe6, 0xea, 0xdf, + 0x72, 0xb0, 0x98, 0x76, 0x43, 0xb4, 0x8d, 0x29, 0x53, 0x1f, 0x12, 0xc2, 0x5e, 0x99, 0x9f, 0xda, + 0x2b, 0x65, 0x4b, 0x9a, 0xff, 0x2c, 0x2d, 0x69, 0x0b, 0x40, 0xf7, 0xac, 0xb0, 0x1b, 0x05, 0xdd, + 0x2d, 0xea, 0x27, 0xf1, 0xa5, 0x1c, 0x27, 0xa8, 0x78, 0xc0, 0x0c, 0xd7, 0xf1, 0xa9, 0x6b, 0xdb, + 0x84, 0x8a, 0x0e, 0x56, 0x0a, 0x02, 0xb6, 0x13, 0x41, 0x71, 0x82, 0x82, 0xdf, 0x71, 0x4f, 0x6c, + 0xd7, 0x38, 0x17, 0x2e, 0x08, 0xab, 0x4f, 0xf4, 0xae, 0x52, 0x70, 0xc7, 0xd5, 0x26, 0xb0, 0xf8, + 0x0a, 0x0e, 0xf5, 0x10, 0xd2, 0xb7, 0x52, 0x74, 0x37, 0x70, 0x80, 0x12, 0x5d, 0x1b, 0x67, 0x3b, + 0xbc, 0x7a, 0x0b, 0xca, 0xd8, 0x75, 0xfd, 0x23, 0xdd, 0x3f, 0x63, 0xa8, 0x01, 0x05, 0x8f, 0xff, + 0x90, 0x4f, 0x0e, 0xe2, 0x2d, 0x46, 0x60, 0x70, 0x00, 0x57, 0x7f, 0xab, 0xc0, 0xab, 0x53, 0x5f, + 0x00, 0xb8, 0x23, 0x8d, 0xe8, 0x4b, 0x9a, 0x14, 0x39, 0x32, 0xa6, 0xc3, 0x09, 0x2a, 0x3e, 0xfe, + 0x53, 0xcf, 0x06, 0xe3, 0xe3, 0x3f, 0xa5, 0x0d, 0xa7, 0x69, 0xd5, 0xff, 0xe6, 0xa0, 0x78, 0xec, + 0xeb, 0x7e, 0x8f, 0xa1, 0x27, 0x50, 0xe2, 0x55, 0x68, 0xea, 0xbe, 0x2e, 0x34, 0x67, 0x7e, 0x55, + 0x0b, 0xd7, 0xa8, 0x78, 0xf2, 0x85, 0x10, 0x1c, 0x49, 0xe4, 0x57, 0x5e, 0x26, 0xf4, 0x48, 0xf3, + 0xa2, 0xd6, 0x15, 0x68, 0xc7, 0x12, 0xcb, 0xd7, 0xfe, 0x2e, 0x61, 0x4c, 0xef, 0x84, 0x39, 0x1b, + 0xad, 0xfd, 0x07, 0x01, 0x18, 0x87, 0x78, 0xf4, 0x0e, 0x14, 0x29, 0xd1, 0x59, 0xb4, 0x8c, 0xd4, + 0x43, 0x91, 0x58, 0x40, 0x2f, 0x87, 0x8d, 0x05, 0x29, 0x5c, 0x7c, 0x63, 0x49, 0x8d, 0x1e, 0xc3, + 0x0d, 0x93, 0xf8, 0xba, 0x65, 0x07, 0x3b, 0x48, 0xe6, 0xf7, 0x8d, 0x40, 0x58, 0x3b, 0x60, 0xd5, + 0x2a, 0xdc, 0x26, 0xf9, 0x81, 0x43, 0x81, 0xbc, 0xde, 0x0c, 0xd7, 0x24, 0x22, 0x9f, 0x0b, 0x71, + 0xbd, 0xed, 0xb8, 0x26, 0xc1, 0x02, 0xa3, 0x3e, 0x53, 0xa0, 0x12, 0x48, 0xda, 0xd1, 0x7b, 0x8c, + 0xa0, 0xcd, 0xe8, 0x14, 0x41, 0xb8, 0xc3, 0x01, 0x39, 0xff, 0xde, 0xc0, 0x23, 0x97, 0xc3, 0x46, + 0x59, 0x90, 0xf1, 0x8f, 0xe8, 0x00, 0x09, 0x1f, 0xe5, 0xae, 0xf1, 0xd1, 0xeb, 0x50, 0x10, 0xfb, + 0x9e, 0x74, 0x66, 0xb4, 0xde, 0x89, 0x9d, 0x10, 0x07, 0x38, 0xf5, 0x0f, 0x39, 0xa8, 0xa6, 0x0e, + 0x97, 0x61, 0xc5, 0x8a, 0xee, 0x70, 0xb9, 0x0c, 0xef, 0x02, 0xd3, 0x1f, 0x3a, 0x7f, 0x04, 0x45, + 0x83, 0x9f, 0x2f, 0x7c, 0x69, 0xde, 0x9c, 0x25, 0x14, 0xc2, 0x33, 0x71, 0x26, 0x89, 0x4f, 0x86, + 0xa5, 0x40, 0xb4, 0x07, 0x2b, 0x94, 0xf8, 0x74, 0xb0, 0x7d, 0xea, 0x13, 0x9a, 0x5c, 0x3a, 0x0b, + 0xf1, 0x12, 0x82, 0xc7, 0x09, 0xf0, 0x24, 0x8f, 0x6a, 0xc3, 0x3c, 0x5f, 0x10, 0xb8, 0xdb, 0x59, + 0xea, 0x69, 0x2d, 0x72, 0x7b, 0xc8, 0x1c, 0xe2, 0xb9, 0x77, 0x1c, 0xdd, 0x71, 0x83, 0x64, 0x2f, + 0xc4, 0xde, 0x79, 0xc0, 0x81, 0x38, 0xc0, 0xdd, 0x59, 0xe5, 0x17, 0xd1, 0xdf, 0x3c, 0x6f, 0xcc, + 0x3d, 0x7b, 0xde, 0x98, 0xfb, 0xe8, 0xb9, 0xbc, 0x94, 0xfe, 0x18, 0xca, 0xf1, 0x3a, 0xf2, 0x39, + 0xab, 0x54, 0x7f, 0x0a, 0x25, 0x9e, 0x49, 0xe1, 0x1a, 0x7d, 0xcd, 0xf0, 0x48, 0xb7, 0xf5, 0x5c, + 0x96, 0xb6, 0xae, 0x6e, 0x41, 0xf0, 0xf6, 0xcc, 0x3b, 0xa1, 0xe5, 0x93, 0x6e, 0xaa, 0x13, 0xee, + 0x73, 0x00, 0x0e, 0xe0, 0x89, 0x7b, 0xf8, 0xaf, 0x15, 0x00, 0x71, 0xdf, 0xd8, 0xed, 0xf3, 0x3b, + 0xe2, 0x3a, 0xcc, 0xf3, 0x16, 0x3b, 0x6e, 0x98, 0x28, 0x01, 0x81, 0x41, 0x0f, 0xa1, 0xe8, 0x8a, + 0x35, 0x45, 0x3e, 0x50, 0xbe, 0x35, 0x35, 0x6b, 0xe4, 0xbf, 0x95, 0x9a, 0x58, 0x7f, 0xba, 0x7b, + 0xe1, 0x13, 0x87, 0xdb, 0x18, 0x67, 0x4c, 0xb0, 0xeb, 0x60, 0x29, 0x4c, 0x7b, 0xe3, 0xc5, 0xcb, + 0xfa, 0xdc, 0xc7, 0x2f, 0xeb, 0x73, 0xff, 0x7c, 0x59, 0x9f, 0xfb, 0x60, 0x54, 0x57, 0x5e, 0x8c, + 0xea, 0xca, 0xc7, 0xa3, 0xba, 0xf2, 0xef, 0x51, 0x5d, 0x79, 0xf6, 0x49, 0x7d, 0xee, 0x71, 0xae, + 0xbf, 0xf9, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb1, 0xe8, 0xc1, 0x2f, 0x98, 0x1b, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto similarity index 53% rename from vendor/k8s.io/client-go/1.5/pkg/api/unversioned/generated.proto rename to vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index cab7058aa..9d42018ec 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -19,13 +19,14 @@ limitations under the License. syntax = 'proto2'; -package k8s.io.kubernetes.pkg.api.unversioned; +package k8s.io.apimachinery.pkg.apis.meta.v1; -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "unversioned"; +option go_package = "v1"; // APIGroup contains the name, the supported versions, and the preferred version // of a group. @@ -38,6 +39,7 @@ message APIGroup { // preferredVersion is the version preferred by the API server, which // probably is the storage version. + // +optional optional GroupVersionForDiscovery preferredVersion = 3; // a map of client CIDR to server address that is serving this group. @@ -67,6 +69,13 @@ message APIResource { // kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') optional string kind = 3; + + // verbs is a list of supported kube verbs (this includes get, list, watch, create, + // update, patch, delete, deletecollection, and proxy) + optional Verbs verbs = 4; + + // shortNames is a list of suggested short names of the resource. + repeated string shortNames = 5; } // APIResourceList is a list of APIResource, it is used to expose the name of the @@ -98,6 +107,35 @@ message APIVersions { repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 2; } +// DeleteOptions may be provided when deleting an API object. +message DeleteOptions { + // The duration in seconds before the object should be deleted. Value must be non-negative integer. + // The value zero indicates delete immediately. If this value is nil, the default grace period for the + // specified type will be used. + // Defaults to a per object value if not specified. zero means delete immediately. + // +optional + optional int64 gracePeriodSeconds = 1; + + // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be + // returned. + // +optional + optional Preconditions preconditions = 2; + + // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. + // Should the dependent objects be orphaned. If true/false, the "orphan" + // finalizer will be added to/removed from the object's finalizers list. + // Either this field or PropagationPolicy may be set, but not both. + // +optional + optional bool orphanDependents = 3; + + // Whether and how garbage collection will be performed. + // Either this field or OrphanDependents may be set, but not both. + // The default policy is decided by the existing finalizer set in the + // metadata.finalizers and the resource-specific default policy. + // +optional + optional string propagationPolicy = 4; +} + // Duration is a wrapper around time.Duration which supports correct // marshaling to YAML and JSON. In particular, it marshals into strings, which // can be used as map keys in json. @@ -107,13 +145,22 @@ message Duration { // 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.` + // 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' + // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. optional bool exact = 2; } +// GetOptions is the standard query options to the standard REST get call. +message GetOptions { + // When specified: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + optional string resourceVersion = 1; +} + // 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 // @@ -185,9 +232,11 @@ message LabelSelector { // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels // map is equivalent to an element of matchExpressions, whose key field is "key", the // operator is "In", and the values array contains only "value". The requirements are ANDed. + // +optional map matchLabels = 1; // matchExpressions is a list of label selector requirements. The requirements are ANDed. + // +optional repeated LabelSelectorRequirement matchExpressions = 2; } @@ -205,6 +254,7 @@ message LabelSelectorRequirement { // the values array must be non-empty. If the operator is Exists or DoesNotExist, // the values array must be empty. This array is replaced during a strategic // merge patch. + // +optional repeated string values = 3; } @@ -214,6 +264,7 @@ message ListMeta { // SelfLink is a URL representing this object. // Populated by the system. // Read-only. + // +optional optional string selfLink = 1; // String that identifies the server's internal version of this object that @@ -222,9 +273,229 @@ message ListMeta { // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + // +optional optional string resourceVersion = 2; } +// ListOptions is the query options to a standard REST list call. +message ListOptions { + // A selector to restrict the list of returned objects by their labels. + // Defaults to everything. + // +optional + optional string labelSelector = 1; + + // A selector to restrict the list of returned objects by their fields. + // Defaults to everything. + // +optional + optional string fieldSelector = 2; + + // Watch for changes to the described resources and return them as a stream of + // add, update, and remove notifications. Specify resourceVersion. + // +optional + optional bool watch = 3; + + // When specified with a watch call, shows changes that occur after that particular version of a resource. + // Defaults to changes from the beginning of history. + // When specified for list: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + // +optional + optional string resourceVersion = 4; + + // Timeout for the list/watch call. + // +optional + optional int64 timeoutSeconds = 5; +} + +// ObjectMeta is metadata that all persisted resources must have, which includes all objects +// users must create. +message ObjectMeta { + // Name must be unique within a namespace. Is required when creating resources, although + // some resources may allow a client to request the generation of an appropriate name + // automatically. Name is primarily intended for creation idempotence and configuration + // definition. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + // +optional + optional string name = 1; + + // GenerateName is an optional prefix, used by the server, to generate a unique + // name ONLY IF the Name field has not been provided. + // If this field is used, the name returned to the client will be different + // than the name passed. This value will also be combined with a unique suffix. + // The provided value has the same validation rules as the Name field, + // and may be truncated by the length of the suffix required to make the value + // unique on the server. + // + // If this field is specified and the generated name exists, the server will + // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + // ServerTimeout indicating a unique name could not be found in the time allotted, and the client + // should retry (optionally after the time indicated in the Retry-After header). + // + // Applied only if Name is not specified. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency + // +optional + optional string generateName = 2; + + // Namespace defines the space within each name must be unique. An empty namespace is + // equivalent to the "default" namespace, but "default" is the canonical representation. + // Not all objects are required to be scoped to a namespace - the value of this field for + // those objects will be empty. + // + // Must be a DNS_LABEL. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/namespaces + // +optional + optional string namespace = 3; + + // SelfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // +optional + optional string selfLink = 4; + + // UID is the unique in time and space value for this object. It is typically generated by + // the server on successful creation of a resource and is not allowed to change on PUT + // operations. + // + // Populated by the system. + // Read-only. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional + optional string uid = 5; + + // An opaque value that represents the internal version of this object that can + // be used by clients to determine when objects have changed. May be used for optimistic + // concurrency, change detection, and the watch operation on a resource or set of resources. + // Clients must treat these values as opaque and passed unmodified back to the server. + // They may only be valid for a particular resource or set of resources. + // + // Populated by the system. + // Read-only. + // Value must be treated as opaque by clients and . + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + // +optional + optional string resourceVersion = 6; + + // A sequence number representing a specific generation of the desired state. + // Populated by the system. Read-only. + // +optional + optional int64 generation = 7; + + // CreationTimestamp is a timestamp representing the server time when this object was + // created. It is not guaranteed to be set in happens-before order across separate operations. + // Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. + // Read-only. + // Null for lists. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional Time creationTimestamp = 8; + + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This + // field is set by the server when a graceful deletion is requested by the user, and is not + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field. Once set, + // this value may not be unset or be set further into the future, although it may be shortened + // or the resource may be deleted prior to this time. For example, a user may request that + // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination + // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard + // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the + // API. In the presence of network partitions, this object may still exist after this + // timestamp, until an administrator or automated process can determine the resource is + // fully terminated. + // If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. + // Read-only. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional Time deletionTimestamp = 9; + + // Number of seconds allowed for this object to gracefully terminate before + // it will be removed from the system. Only set when deletionTimestamp is also set. + // May only be shortened. + // Read-only. + // +optional + optional int64 deletionGracePeriodSeconds = 10; + + // Map of string keys and values that can be used to organize and categorize + // (scope and select) objects. May match selectors of replication controllers + // and services. + // More info: http://kubernetes.io/docs/user-guide/labels + // +optional + map labels = 11; + + // Annotations is an unstructured key value map stored with a resource that may be + // set by external tools to store and retrieve arbitrary metadata. They are not + // queryable and should be preserved when modifying objects. + // More info: http://kubernetes.io/docs/user-guide/annotations + // +optional + map annotations = 12; + + // List of objects depended by this object. If ALL objects in the list have + // been deleted, this object will be garbage collected. If this object is managed by a controller, + // then an entry in this list will point to this controller, with the controller field set to true. + // There cannot be more than one managing controller. + // +optional + 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. + // +optional + repeated string finalizers = 14; + + // The name of the cluster which the object belongs to. + // This is used to distinguish resources with same name and namespace in different clusters. + // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + // +optional + optional string clusterName = 15; +} + +// OwnerReference contains enough information to let you identify an owning +// object. Currently, an owning object must be in the same namespace, so there +// is no namespace field. +message OwnerReference { + // API version of the referent. + optional string apiVersion = 5; + + // Kind of the referent. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + optional string kind = 1; + + // Name of the referent. + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + optional string name = 3; + + // UID of the referent. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + optional string uid = 4; + + // If true, this reference points to the managing controller. + // +optional + optional bool controller = 6; + + // If true, AND if the owner has the "foregroundDeletion" finalizer, then + // the owner cannot be deleted from the key-value store until this + // reference is removed. + // Defaults to false. + // To set this field, a user needs "delete" permission of the owner, + // otherwise 422 (Unprocessable Entity) will be returned. + // +optional + optional bool blockOwnerDeletion = 7; +} + +// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. +message Preconditions { + // Specifies the target UID. + // +optional + optional string uid = 1; +} + // RootPaths lists the paths available at root. // For example: "/healthz", "/apis". message RootPaths { @@ -246,29 +517,35 @@ message ServerAddressByClientCIDR { message Status { // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + // +optional 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 optional string status = 2; // A human-readable description of the status of this operation. + // +optional optional string message = 3; // A machine-readable description of why this operation is in the // "Failure" status. If this value is empty there // is no information available. A Reason clarifies an HTTP status // code but does not override it. + // +optional optional string reason = 4; // Extended data associated with the reason. Each reason may define its // own extended details. This field is optional and the data returned // is not guaranteed to conform to any schema except that defined by // the reason type. + // +optional optional StatusDetails details = 5; // Suggested HTTP return code for this status, 0 if not set. + // +optional optional int32 code = 6; } @@ -277,10 +554,12 @@ message Status { message StatusCause { // A machine-readable description of the cause of the error. If this value is // empty there is no information available. + // +optional optional string reason = 1; // A human-readable description of the cause of the error. This field may be // presented as-is to a reader. + // +optional optional string message = 2; // The field of the resource that has caused this error, as named by its JSON @@ -292,6 +571,7 @@ message StatusCause { // Examples: // "name" - the field "name" on the current resource // "items[0].name" - the field "name" on the first array entry in "items" + // +optional optional string field = 3; } @@ -304,21 +584,26 @@ message StatusCause { message StatusDetails { // The name attribute of the resource associated with the status StatusReason // (when there is a single name which can be described). + // +optional optional string name = 1; // The group attribute of the resource associated with the status StatusReason. + // +optional optional string group = 2; // The kind attribute of the resource associated with the status StatusReason. // On some operations may differ from the requested resource Kind. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + // +optional optional string kind = 3; // The Causes array includes more details associated with the StatusReason // failure. Not all StatusReasons may provide detailed causes. + // +optional repeated StatusCause causes = 4; // If specified, the time in seconds before the operation should be retried. + // +optional optional int32 retryAfterSeconds = 5; } @@ -367,12 +652,38 @@ message TypeMeta { // Cannot be updated. // In CamelCase. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + // +optional optional string kind = 1; // APIVersion defines the versioned schema of this representation of an object. // Servers should convert recognized schemas to the latest internal value, and // may reject unrecognized values. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + // +optional optional string apiVersion = 2; } +// Verbs masks the value so protobuf can generate +// +// +protobuf.nullable=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +message Verbs { + // items, if empty, will result in an empty slice + + repeated string items = 1; +} + +// Event represents a single event to a watched resource. +// +// +protobuf=true +message WatchEvent { + optional string type = 1; + + // Object is: + // * If Type is Added or Modified: the new state of the object. + // * If Type is Deleted: the state of the object immediately before deletion. + // * If Type is Error: *Status is recommended; other types may make sense + // depending on context. + optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 2; +} + diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go new file mode 100644 index 000000000..8b6fdef5a --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go @@ -0,0 +1,148 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "encoding/json" + "fmt" + "strings" + + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying +// concepts during lookup stages without having partially valid types +// +// +protobuf.options.(gogoproto.goproto_stringer)=false +type GroupResource struct { + Group string `protobuf:"bytes,1,opt,name=group"` + Resource string `protobuf:"bytes,2,opt,name=resource"` +} + +func (gr *GroupResource) String() string { + if len(gr.Group) == 0 { + return gr.Resource + } + return gr.Resource + "." + gr.Group +} + +// GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion +// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling +// +// +protobuf.options.(gogoproto.goproto_stringer)=false +type GroupVersionResource struct { + Group string `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) 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) 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"` +} + +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"` +} + +// Empty returns true if group and version are empty +func (gv GroupVersion) Empty() bool { + return len(gv.Group) == 0 && len(gv.Version) == 0 +} + +// String puts "group" and "version" into a single "group/version" string. For the legacy v1 +// it returns "v1". +func (gv GroupVersion) String() string { + // special case the internal apiVersion for the legacy kube types + if gv.Empty() { + return "" + } + + // special case of "v1" for backward compatibility + if len(gv.Group) == 0 && gv.Version == "v1" { + return gv.Version + } + if len(gv.Group) > 0 { + return gv.Group + "/" + gv.Version + } + return gv.Version +} + +// MarshalJSON implements the json.Marshaller interface. +func (gv GroupVersion) MarshalJSON() ([]byte, error) { + s := gv.String() + if strings.Count(s, "/") > 1 { + return []byte{}, fmt.Errorf("illegal GroupVersion %v: contains more than one /", s) + } + return json.Marshal(s) +} + +func (gv *GroupVersion) unmarshal(value []byte) error { + var s string + if err := json.Unmarshal(value, &s); err != nil { + return err + } + parsed, err := schema.ParseGroupVersion(s) + if err != nil { + return err + } + gv.Group, gv.Version = parsed.Group, parsed.Version + return nil +} + +// UnmarshalJSON implements the json.Unmarshaller interface. +func (gv *GroupVersion) UnmarshalJSON(value []byte) error { + return gv.unmarshal(value) +} + +// UnmarshalTEXT implements the Ugorji's encoding.TextUnmarshaler interface. +func (gv *GroupVersion) UnmarshalText(value []byte) error { + return gv.unmarshal(value) +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/helpers.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go similarity index 73% rename from vendor/k8s.io/client-go/1.5/pkg/api/unversioned/helpers.go rename to vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go index 22f98f174..b62dd9ee0 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/helpers.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go @@ -14,14 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package unversioned +package v1 import ( "fmt" - "k8s.io/client-go/1.5/pkg/labels" - "k8s.io/client-go/1.5/pkg/selection" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/selection" + "k8s.io/apimachinery/pkg/types" ) // LabelSelectorAsSelector converts the LabelSelector api type into a struct that implements @@ -36,7 +37,7 @@ func LabelSelectorAsSelector(ps *LabelSelector) (labels.Selector, error) { } selector := labels.NewSelector() for k, v := range ps.MatchLabels { - r, err := labels.NewRequirement(k, selection.Equals, sets.NewString(v)) + r, err := labels.NewRequirement(k, selection.Equals, []string{v}) if err != nil { return nil, err } @@ -56,7 +57,7 @@ func LabelSelectorAsSelector(ps *LabelSelector) (labels.Selector, error) { 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...)) + r, err := labels.NewRequirement(expr.Key, op, append([]string(nil), expr.Values...)) if err != nil { return nil, err } @@ -182,3 +183,52 @@ func ExtractGroupVersions(l *APIGroupList) []string { } return groupVersions } + +// HasAnnotation returns a bool if passed in annotation exists +func HasAnnotation(obj ObjectMeta, ann string) bool { + _, found := obj.Annotations[ann] + return found +} + +// SetMetaDataAnnotation sets the annotation and value +func SetMetaDataAnnotation(obj *ObjectMeta, ann string, value string) { + if obj.Annotations == nil { + obj.Annotations = make(map[string]string) + } + obj.Annotations[ann] = value +} + +// SingleObject returns a ListOptions for watching a single object. +func SingleObject(meta ObjectMeta) ListOptions { + return ListOptions{ + FieldSelector: fields.OneTermEqualSelector("metadata.name", meta.Name).String(), + ResourceVersion: meta.ResourceVersion, + } +} + +// NewDeleteOptions returns a DeleteOptions indicating the resource should +// be deleted within the specified grace period. Use zero to indicate +// immediate deletion. If you would prefer to use the default grace period, +// use &metav1.DeleteOptions{} directly. +func NewDeleteOptions(grace int64) *DeleteOptions { + return &DeleteOptions{GracePeriodSeconds: &grace} +} + +// NewPreconditionDeleteOptions returns a DeleteOptions with a UID precondition set. +func NewPreconditionDeleteOptions(uid string) *DeleteOptions { + u := types.UID(uid) + p := Preconditions{UID: &u} + return &DeleteOptions{Preconditions: &p} +} + +// NewUIDPreconditions returns a Preconditions with UID set. +func NewUIDPreconditions(uid string) *Preconditions { + u := types.UID(uid) + return &Preconditions{UID: &u} +} + +// HasObjectMetaSystemFieldValues returns true if fields that are managed by the system on ObjectMeta have values. +func HasObjectMetaSystemFieldValues(meta *ObjectMeta) bool { + return !meta.CreationTimestamp.Time.IsZero() || + len(meta.UID) != 0 +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/labels/labels.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go similarity index 50% rename from vendor/k8s.io/client-go/1.5/pkg/util/labels/labels.go rename to vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go index 37f60cffb..8b4c0423e 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/labels/labels.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go @@ -14,69 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -package labels - -import ( - "fmt" - - "k8s.io/client-go/1.5/pkg/api/unversioned" -) - -// Clones the given map and returns a new map with the given key and value added. -// Returns the given map, if labelKey is empty. -func CloneAndAddLabel(labels map[string]string, labelKey string, labelValue uint32) map[string]string { - if labelKey == "" { - // Don't need to add a label. - return labels - } - // Clone. - newLabels := map[string]string{} - for key, value := range labels { - newLabels[key] = value - } - newLabels[labelKey] = fmt.Sprintf("%d", labelValue) - return newLabels -} - -// CloneAndRemoveLabel clones the given map and returns a new map with the given key removed. -// Returns the given map, if labelKey is empty. -func CloneAndRemoveLabel(labels map[string]string, labelKey string) map[string]string { - if labelKey == "" { - // Don't need to add a label. - return labels - } - // Clone. - newLabels := map[string]string{} - for key, value := range labels { - newLabels[key] = value - } - delete(newLabels, labelKey) - return newLabels -} - -// AddLabel returns a map with the given key and value added to the given map. -func AddLabel(labels map[string]string, labelKey string, labelValue string) map[string]string { - if labelKey == "" { - // Don't need to add a label. - return labels - } - if labels == nil { - labels = make(map[string]string) - } - labels[labelKey] = labelValue - return labels -} +package v1 // Clones the given selector and returns a new selector with the given key and value added. // Returns the given selector, if labelKey is empty. -func CloneSelectorAndAddLabel(selector *unversioned.LabelSelector, labelKey string, labelValue uint32) *unversioned.LabelSelector { +func CloneSelectorAndAddLabel(selector *LabelSelector, labelKey, labelValue string) *LabelSelector { if labelKey == "" { // Don't need to add a label. return selector } // Clone. - newSelector := new(unversioned.LabelSelector) + newSelector := new(LabelSelector) // TODO(madhusudancs): Check if you can use deepCopy_extensions_LabelSelector here. newSelector.MatchLabels = make(map[string]string) @@ -85,10 +34,10 @@ func CloneSelectorAndAddLabel(selector *unversioned.LabelSelector, labelKey stri newSelector.MatchLabels[key] = val } } - newSelector.MatchLabels[labelKey] = fmt.Sprintf("%d", labelValue) + newSelector.MatchLabels[labelKey] = labelValue if selector.MatchExpressions != nil { - newMExps := make([]unversioned.LabelSelectorRequirement, len(selector.MatchExpressions)) + newMExps := make([]LabelSelectorRequirement, len(selector.MatchExpressions)) for i, me := range selector.MatchExpressions { newMExps[i].Key = me.Key newMExps[i].Operator = me.Operator @@ -108,7 +57,7 @@ func CloneSelectorAndAddLabel(selector *unversioned.LabelSelector, labelKey stri } // AddLabelToSelector returns a selector with the given key and value added to the given selector's MatchLabels. -func AddLabelToSelector(selector *unversioned.LabelSelector, labelKey string, labelValue string) *unversioned.LabelSelector { +func AddLabelToSelector(selector *LabelSelector, labelKey, labelValue string) *LabelSelector { if labelKey == "" { // Don't need to add a label. return selector @@ -121,6 +70,6 @@ func AddLabelToSelector(selector *unversioned.LabelSelector, labelKey string, la } // SelectorHasLabel checks if the given selector contains the given label key in its MatchLabels -func SelectorHasLabel(selector *unversioned.LabelSelector, labelKey string) bool { +func SelectorHasLabel(selector *LabelSelector, labelKey string) bool { return len(selector.MatchLabels[labelKey]) > 0 } diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go new file mode 100644 index 000000000..108e34f0f --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go @@ -0,0 +1,209 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" +) + +// 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.ObjectMetaAccessor() 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 +// TODO: Remove this function and use meta.ObjectMetaAccessor() instead. +func ListMetaFor(obj runtime.Object) (*ListMeta, error) { + v, err := conversion.EnforcePtr(obj) + if err != nil { + return nil, err + } + var meta *ListMeta + err = runtime.FieldPtr(v, "ListMeta", &meta) + return meta, err +} + +// TODO: move this, Object, List, and Type to a different package +type ObjectMetaAccessor interface { + GetObjectMeta() Object +} + +// Object lets you work with object metadata from any of the versioned or +// internal API objects. Attempting to set or retrieve a field on an object that does +// not support that field (Name, UID, Namespace on lists) will be a no-op and return +// a default value. +type Object interface { + GetNamespace() string + SetNamespace(namespace string) + GetName() string + SetName(name string) + GetGenerateName() string + SetGenerateName(name string) + GetUID() types.UID + SetUID(uid types.UID) + GetResourceVersion() string + SetResourceVersion(version string) + GetSelfLink() string + SetSelfLink(selfLink string) + GetCreationTimestamp() Time + SetCreationTimestamp(timestamp Time) + GetDeletionTimestamp() *Time + SetDeletionTimestamp(timestamp *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() []OwnerReference + SetOwnerReferences([]OwnerReference) + GetClusterName() string + SetClusterName(clusterName string) +} + +// ListMetaAccessor retrieves the list interface from an object +type ListMetaAccessor interface { + GetListMeta() List +} + +// List lets you work with list metadata from any of the versioned or +// internal API objects. Attempting to set or retrieve a field on an object that does +// not support that field will be a no-op and return a default value. +// TODO: move this, and TypeMeta and ListMeta, to a different package +type List interface { + GetResourceVersion() string + SetResourceVersion(version string) + GetSelfLink() string + SetSelfLink(selfLink string) +} + +// Type exposes the type and APIVersion of versioned or internal API objects. +// TODO: move this, and TypeMeta and ListMeta, to a different package +type Type interface { + GetAPIVersion() string + SetAPIVersion(version string) + GetKind() string + SetKind(kind string) +} + +func (meta *ListMeta) GetResourceVersion() string { return meta.ResourceVersion } +func (meta *ListMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } +func (meta *ListMeta) GetSelfLink() string { return meta.SelfLink } +func (meta *ListMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink } + +func (obj *TypeMeta) GetObjectKind() schema.ObjectKind { return obj } + +// SetGroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta +func (obj *TypeMeta) SetGroupVersionKind(gvk schema.GroupVersionKind) { + obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() +} + +// GroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta +func (obj *TypeMeta) GroupVersionKind() schema.GroupVersionKind { + return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) +} + +func (obj *ListMeta) GetListMeta() List { return obj } + +func (obj *ObjectMeta) GetObjectMeta() Object { return obj } + +// Namespace implements metav1.Object for any object with an ObjectMeta typed field. Allows +// fast, direct access to metadata fields for API objects. +func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } +func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } +func (meta *ObjectMeta) GetName() string { return meta.Name } +func (meta *ObjectMeta) SetName(name string) { meta.Name = name } +func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName } +func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName } +func (meta *ObjectMeta) GetUID() types.UID { return meta.UID } +func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid } +func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion } +func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } +func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink } +func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink } +func (meta *ObjectMeta) GetCreationTimestamp() Time { return meta.CreationTimestamp } +func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp Time) { + meta.CreationTimestamp = creationTimestamp +} +func (meta *ObjectMeta) GetDeletionTimestamp() *Time { return meta.DeletionTimestamp } +func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *Time) { + meta.DeletionTimestamp = deletionTimestamp +} +func (meta *ObjectMeta) 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() []OwnerReference { + ret := make([]OwnerReference, len(meta.OwnerReferences)) + for i := 0; i < len(meta.OwnerReferences); i++ { + ret[i].Kind = meta.OwnerReferences[i].Kind + ret[i].Name = meta.OwnerReferences[i].Name + ret[i].UID = meta.OwnerReferences[i].UID + ret[i].APIVersion = meta.OwnerReferences[i].APIVersion + if meta.OwnerReferences[i].Controller != nil { + value := *meta.OwnerReferences[i].Controller + ret[i].Controller = &value + } + if meta.OwnerReferences[i].BlockOwnerDeletion != nil { + value := *meta.OwnerReferences[i].BlockOwnerDeletion + ret[i].BlockOwnerDeletion = &value + } + } + return ret +} + +func (meta *ObjectMeta) SetOwnerReferences(references []OwnerReference) { + newReferences := make([]OwnerReference, len(references)) + for i := 0; i < len(references); i++ { + newReferences[i].Kind = references[i].Kind + newReferences[i].Name = references[i].Name + newReferences[i].UID = references[i].UID + newReferences[i].APIVersion = references[i].APIVersion + if references[i].Controller != nil { + value := *references[i].Controller + newReferences[i].Controller = &value + } + if references[i].BlockOwnerDeletion != nil { + value := *references[i].BlockOwnerDeletion + newReferences[i].BlockOwnerDeletion = &value + } + } + meta.OwnerReferences = newReferences +} + +func (meta *ObjectMeta) GetClusterName() string { + return meta.ClusterName +} +func (meta *ObjectMeta) SetClusterName(clusterName string) { + meta.ClusterName = clusterName +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go new file mode 100644 index 000000000..8645d1abc --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go @@ -0,0 +1,82 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name for this API. +const GroupName = "meta.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + +// WatchEventKind is name reserved for serializing watch events. +const WatchEventKind = "WatchEvent" + +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// AddToGroupVersion registers common meta types into schemas. +func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) { + scheme.AddKnownTypeWithName(groupVersion.WithKind(WatchEventKind), &WatchEvent{}) + scheme.AddKnownTypeWithName( + schema.GroupVersion{Group: groupVersion.Group, Version: runtime.APIVersionInternal}.WithKind(WatchEventKind), + &InternalEvent{}, + ) + // Supports legacy code paths, most callers should use metav1.ParameterCodec for now + scheme.AddKnownTypes(groupVersion, + &ListOptions{}, + &ExportOptions{}, + &GetOptions{}, + &DeleteOptions{}, + ) + scheme.AddConversionFuncs( + Convert_versioned_Event_to_watch_Event, + Convert_versioned_InternalEvent_to_versioned_Event, + Convert_watch_Event_to_versioned_Event, + Convert_versioned_Event_to_versioned_InternalEvent, + ) + + // register manually. This usually goes through the SchemeBuilder, which we cannot use here. + scheme.AddGeneratedDeepCopyFuncs(GetGeneratedDeepCopyFuncs()...) + AddConversionFuncs(scheme) + RegisterDefaults(scheme) +} + +// scheme is the registry for the common types that adhere to the meta v1 API spec. +var scheme = runtime.NewScheme() + +// ParameterCodec knows about query parameters used with the meta v1 API spec. +var ParameterCodec = runtime.NewParameterCodec(scheme) + +func init() { + scheme.AddUnversionedTypes(SchemeGroupVersion, + &ListOptions{}, + &ExportOptions{}, + &GetOptions{}, + &DeleteOptions{}, + ) + + // register manually. This usually goes through the SchemeBuilder, which we cannot use here. + scheme.AddGeneratedDeepCopyFuncs(GetGeneratedDeepCopyFuncs()...) + RegisterDefaults(scheme) +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/time.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go similarity index 96% rename from vendor/k8s.io/client-go/1.5/pkg/api/unversioned/time.go rename to vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go index aedc119d2..a1e01f344 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/time.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -package unversioned +package v1 import ( "encoding/json" "time" - "k8s.io/client-go/1.5/pkg/genericapiserver/openapi/common" + "k8s.io/apimachinery/pkg/openapi" "github.com/go-openapi/spec" "github.com/google/gofuzz" @@ -145,8 +145,8 @@ func (t Time) MarshalJSON() ([]byte, error) { return json.Marshal(t.UTC().Format(time.RFC3339)) } -func (_ Time) OpenAPIDefinition() common.OpenAPIDefinition { - return common.OpenAPIDefinition{ +func (_ Time) OpenAPIDefinition() openapi.OpenAPIDefinition { + return openapi.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/time_proto.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go similarity index 99% rename from vendor/k8s.io/client-go/1.5/pkg/api/unversioned/time_proto.go rename to vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go index ba25e9164..aea28e410 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/time_proto.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package unversioned +package v1 import ( "time" diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go similarity index 59% rename from vendor/k8s.io/client-go/1.5/pkg/api/unversioned/types.go rename to vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index 7d632b496..c6cf1fab8 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/types.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -23,9 +23,14 @@ limitations under the License. // (e.g. LabelSelector). // In the future, we will probably move these categories of objects into // separate packages. -package unversioned +package v1 -import "strings" +import ( + "fmt" + "strings" + + "k8s.io/apimachinery/pkg/types" +) // TypeMeta describes an individual object in an API response or request // with strings representing the type of the object and its API schema version. @@ -36,12 +41,14 @@ type TypeMeta struct { // Cannot be updated. // In CamelCase. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + // +optional Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` // APIVersion defines the versioned schema of this representation of an object. // Servers should convert recognized schemas to the latest internal value, and // may reject unrecognized values. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + // +optional APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"` } @@ -51,6 +58,7 @@ type ListMeta struct { // SelfLink is a URL representing this object. // Populated by the system. // Read-only. + // +optional SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,1,opt,name=selfLink"` // String that identifies the server's internal version of this object that @@ -59,42 +67,339 @@ type ListMeta struct { // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + // +optional ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"` } +// These are internal finalizer values for Kubernetes-like APIs, must be qualified name unless defined here +const ( + FinalizerOrphanDependents string = "orphan" + FinalizerDeleteDependents string = "foregroundDeletion" +) + +// ObjectMeta is metadata that all persisted resources must have, which includes all objects +// users must create. +type ObjectMeta struct { + // Name must be unique within a namespace. Is required when creating resources, although + // some resources may allow a client to request the generation of an appropriate name + // automatically. Name is primarily intended for creation idempotence and configuration + // definition. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + // +optional + Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` + + // GenerateName is an optional prefix, used by the server, to generate a unique + // name ONLY IF the Name field has not been provided. + // If this field is used, the name returned to the client will be different + // than the name passed. This value will also be combined with a unique suffix. + // The provided value has the same validation rules as the Name field, + // and may be truncated by the length of the suffix required to make the value + // unique on the server. + // + // If this field is specified and the generated name exists, the server will + // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + // ServerTimeout indicating a unique name could not be found in the time allotted, and the client + // should retry (optionally after the time indicated in the Retry-After header). + // + // Applied only if Name is not specified. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency + // +optional + GenerateName string `json:"generateName,omitempty" protobuf:"bytes,2,opt,name=generateName"` + + // Namespace defines the space within each name must be unique. An empty namespace is + // equivalent to the "default" namespace, but "default" is the canonical representation. + // Not all objects are required to be scoped to a namespace - the value of this field for + // those objects will be empty. + // + // Must be a DNS_LABEL. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/namespaces + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` + + // SelfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // +optional + SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,4,opt,name=selfLink"` + + // UID is the unique in time and space value for this object. It is typically generated by + // the server on successful creation of a resource and is not allowed to change on PUT + // operations. + // + // Populated by the system. + // Read-only. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional + UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` + + // An opaque value that represents the internal version of this object that can + // be used by clients to determine when objects have changed. May be used for optimistic + // concurrency, change detection, and the watch operation on a resource or set of resources. + // Clients must treat these values as opaque and passed unmodified back to the server. + // They may only be valid for a particular resource or set of resources. + // + // Populated by the system. + // Read-only. + // Value must be treated as opaque by clients and . + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + // +optional + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"` + + // A sequence number representing a specific generation of the desired state. + // Populated by the system. Read-only. + // +optional + Generation int64 `json:"generation,omitempty" protobuf:"varint,7,opt,name=generation"` + + // CreationTimestamp is a timestamp representing the server time when this object was + // created. It is not guaranteed to be set in happens-before order across separate operations. + // Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. + // Read-only. + // Null for lists. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + CreationTimestamp Time `json:"creationTimestamp,omitempty" protobuf:"bytes,8,opt,name=creationTimestamp"` + + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This + // field is set by the server when a graceful deletion is requested by the user, and is not + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field. Once set, + // this value may not be unset or be set further into the future, although it may be shortened + // or the resource may be deleted prior to this time. For example, a user may request that + // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination + // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard + // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the + // API. In the presence of network partitions, this object may still exist after this + // timestamp, until an administrator or automated process can determine the resource is + // fully terminated. + // If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. + // Read-only. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + DeletionTimestamp *Time `json:"deletionTimestamp,omitempty" protobuf:"bytes,9,opt,name=deletionTimestamp"` + + // Number of seconds allowed for this object to gracefully terminate before + // it will be removed from the system. Only set when deletionTimestamp is also set. + // May only be shortened. + // Read-only. + // +optional + DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty" protobuf:"varint,10,opt,name=deletionGracePeriodSeconds"` + + // Map of string keys and values that can be used to organize and categorize + // (scope and select) objects. May match selectors of replication controllers + // and services. + // More info: http://kubernetes.io/docs/user-guide/labels + // +optional + Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"` + + // Annotations is an unstructured key value map stored with a resource that may be + // set by external tools to store and retrieve arbitrary metadata. They are not + // queryable and should be preserved when modifying objects. + // More info: http://kubernetes.io/docs/user-guide/annotations + // +optional + Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"` + + // List of objects depended by this object. If ALL objects in the list have + // been deleted, this object will be garbage collected. If this object is managed by a controller, + // then an entry in this list will point to this controller, with the controller field set to true. + // There cannot be more than one managing controller. + // +optional + 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. + // +optional + Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` + + // The name of the cluster which the object belongs to. + // This is used to distinguish resources with same name and namespace in different clusters. + // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + // +optional + ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"` +} + +const ( + // NamespaceDefault means the object is in the default namespace which is applied when not specified by clients + NamespaceDefault string = "default" + // NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces + NamespaceAll string = "" + // NamespaceNone is the argument for a context when there is no namespace. + NamespaceNone string = "" + // NamespaceSystem is the system namespace where we place system components. + NamespaceSystem string = "kube-system" + // NamespacePublic is the namespace where we place public info (ConfigMaps) + NamespacePublic string = "kube-public" +) + +// OwnerReference contains enough information to let you identify an owning +// object. Currently, an owning object must be in the same namespace, so there +// is no namespace field. +type OwnerReference struct { + // API version of the referent. + APIVersion string `json:"apiVersion" protobuf:"bytes,5,opt,name=apiVersion"` + // Kind of the referent. + // More info: 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://kubernetes.io/docs/user-guide/identifiers#names + Name string `json:"name" protobuf:"bytes,3,opt,name=name"` + // UID of the referent. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + UID types.UID `json:"uid" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` + // If true, this reference points to the managing controller. + // +optional + Controller *bool `json:"controller,omitempty" protobuf:"varint,6,opt,name=controller"` + // If true, AND if the owner has the "foregroundDeletion" finalizer, then + // the owner cannot be deleted from the key-value store until this + // reference is removed. + // Defaults to false. + // To set this field, a user needs "delete" permission of the owner, + // otherwise 422 (Unprocessable Entity) will be returned. + // +optional + BlockOwnerDeletion *bool `json:"blockOwnerDeletion,omitempty" protobuf:"varint,7,opt,name=blockOwnerDeletion"` +} + +// ListOptions is the query options to a standard REST list call. +type ListOptions struct { + TypeMeta `json:",inline"` + + // A selector to restrict the list of returned objects by their labels. + // Defaults to everything. + // +optional + LabelSelector string `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"` + // A selector to restrict the list of returned objects by their fields. + // Defaults to everything. + // +optional + FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"` + // Watch for changes to the described resources and return them as a stream of + // add, update, and remove notifications. Specify resourceVersion. + // +optional + Watch bool `json:"watch,omitempty" protobuf:"varint,3,opt,name=watch"` + // When specified with a watch call, shows changes that occur after that particular version of a resource. + // Defaults to changes from the beginning of history. + // When specified for list: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + // +optional + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"` + // Timeout for the list/watch call. + // +optional + TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,5,opt,name=timeoutSeconds"` +} + // ExportOptions is the query options to the standard REST get call. type ExportOptions struct { TypeMeta `json:",inline"` - // Should this value be exported. Export strips fields that a user can not specify.` + // 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' + // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Exact bool `json:"exact" protobuf:"varint,2,opt,name=exact"` } +// GetOptions is the standard query options to the standard REST get call. +type GetOptions struct { + TypeMeta `json:",inline"` + // When specified: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,1,opt,name=resourceVersion"` +} + +// DeletionPropagation decides if a deletion will propagate to the dependents of +// the object, and how the garbage collector will handle the propagation. +type DeletionPropagation string + +const ( + // Orphans the dependents. + DeletePropagationOrphan DeletionPropagation = "Orphan" + // Deletes the object from the key-value store, the garbage collector will + // delete the dependents in the background. + DeletePropagationBackground DeletionPropagation = "Background" + // The object exists in the key-value store until the garbage collector + // deletes all the dependents whose ownerReference.blockOwnerDeletion=true + // from the key-value store. API sever will put the "foregroundDeletion" + // finalizer on the object, and sets its deletionTimestamp. This policy is + // cascading, i.e., the dependents will be deleted with Foreground. + DeletePropagationForeground DeletionPropagation = "Foreground" +) + +// DeleteOptions may be provided when deleting an API object. +type DeleteOptions struct { + TypeMeta `json:",inline"` + + // The duration in seconds before the object should be deleted. Value must be non-negative integer. + // The value zero indicates delete immediately. If this value is nil, the default grace period for the + // specified type will be used. + // Defaults to a per object value if not specified. zero means delete immediately. + // +optional + GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty" protobuf:"varint,1,opt,name=gracePeriodSeconds"` + + // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be + // returned. + // +optional + Preconditions *Preconditions `json:"preconditions,omitempty" protobuf:"bytes,2,opt,name=preconditions"` + + // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. + // Should the dependent objects be orphaned. If true/false, the "orphan" + // finalizer will be added to/removed from the object's finalizers list. + // Either this field or PropagationPolicy may be set, but not both. + // +optional + OrphanDependents *bool `json:"orphanDependents,omitempty" protobuf:"varint,3,opt,name=orphanDependents"` + + // Whether and how garbage collection will be performed. + // Either this field or OrphanDependents may be set, but not both. + // The default policy is decided by the existing finalizer set in the + // metadata.finalizers and the resource-specific default policy. + // +optional + PropagationPolicy *DeletionPropagation `json:"propagationPolicy,omitempty" protobuf:"varint,4,opt,name=propagationPolicy"` +} + +// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. +type Preconditions struct { + // Specifies the target UID. + // +optional + UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` +} + // Status is a return value for calls that don't return other objects. type Status struct { TypeMeta `json:",inline"` // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + // +optional ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Status of the operation. // One of: "Success" or "Failure". // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Status string `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` // A human-readable description of the status of this operation. + // +optional Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` // A machine-readable description of why this operation is in the // "Failure" status. If this value is empty there // is no information available. A Reason clarifies an HTTP status // code but does not override it. + // +optional Reason StatusReason `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason,casttype=StatusReason"` // Extended data associated with the reason. Each reason may define its // own extended details. This field is optional and the data returned // is not guaranteed to conform to any schema except that defined by // the reason type. + // +optional Details *StatusDetails `json:"details,omitempty" protobuf:"bytes,5,opt,name=details"` // Suggested HTTP return code for this status, 0 if not set. + // +optional Code int32 `json:"code,omitempty" protobuf:"varint,6,opt,name=code"` } @@ -107,17 +412,22 @@ type Status struct { type StatusDetails struct { // The name attribute of the resource associated with the status StatusReason // (when there is a single name which can be described). + // +optional Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` // The group attribute of the resource associated with the status StatusReason. + // +optional Group string `json:"group,omitempty" protobuf:"bytes,2,opt,name=group"` // The kind attribute of the resource associated with the status StatusReason. // On some operations may differ from the requested resource Kind. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + // +optional 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. + // +optional Causes []StatusCause `json:"causes,omitempty" protobuf:"bytes,4,rep,name=causes"` // If specified, the time in seconds before the operation should be retried. + // +optional RetryAfterSeconds int32 `json:"retryAfterSeconds,omitempty" protobuf:"varint,5,opt,name=retryAfterSeconds"` } @@ -257,9 +567,11 @@ const ( type StatusCause struct { // A machine-readable description of the cause of the error. If this value is // empty there is no information available. + // +optional Type CauseType `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason,casttype=CauseType"` // A human-readable description of the cause of the error. This field may be // presented as-is to a reader. + // +optional Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` // The field of the resource that has caused this error, as named by its JSON // serialization. May include dot and postfix notation for nested attributes. @@ -270,6 +582,7 @@ type StatusCause struct { // Examples: // "name" - the field "name" on the current resource // "items[0].name" - the field "name" on the first array entry in "items" + // +optional Field string `json:"field,omitempty" protobuf:"bytes,3,opt,name=field"` } @@ -336,6 +649,7 @@ type APIGroup struct { Versions []GroupVersionForDiscovery `json:"versions" protobuf:"bytes,2,rep,name=versions"` // preferredVersion is the version preferred by the API server, which // probably is the storage version. + // +optional PreferredVersion GroupVersionForDiscovery `json:"preferredVersion,omitempty" protobuf:"bytes,3,opt,name=preferredVersion"` // a map of client CIDR to server address that is serving this group. // This is to help clients reach servers in the most network-efficient way possible. @@ -374,6 +688,21 @@ type APIResource struct { Namespaced bool `json:"namespaced" protobuf:"varint,2,opt,name=namespaced"` // kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') Kind string `json:"kind" protobuf:"bytes,3,opt,name=kind"` + // verbs is a list of supported kube verbs (this includes get, list, watch, create, + // update, patch, delete, deletecollection, and proxy) + Verbs Verbs `json:"verbs" protobuf:"bytes,4,opt,name=verbs"` + // shortNames is a list of suggested short names of the resource. + ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,5,rep,name=shortNames"` +} + +// Verbs masks the value so protobuf can generate +// +// +protobuf.nullable=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +type Verbs []string + +func (vs Verbs) String() string { + return fmt.Sprintf("%v", []string(vs)) } // APIResourceList is a list of APIResource, it is used to expose the name of the @@ -429,8 +758,10 @@ type LabelSelector struct { // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels // map is equivalent to an element of matchExpressions, whose key field is "key", the // operator is "In", and the values array contains only "value". The requirements are ANDed. + // +optional MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"` // matchExpressions is a list of label selector requirements. The requirements are ANDed. + // +optional MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"` } @@ -446,6 +777,7 @@ type LabelSelectorRequirement struct { // the values array must be non-empty. If the operator is Exists or DoesNotExist, // the values array must be empty. This array is replaced during a strategic // merge patch. + // +optional Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` } diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/types_swagger_doc_generated.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go similarity index 53% rename from vendor/k8s.io/client-go/1.5/pkg/api/unversioned/types_swagger_doc_generated.go rename to vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go index 3f08115a6..950c00285 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/types_swagger_doc_generated.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package unversioned +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 @@ -53,6 +53,8 @@ var map_APIResource = map[string]string{ "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')", + "verbs": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", + "shortNames": "shortNames is a list of suggested short names of the resource.", } func (APIResource) SwaggerDoc() map[string]string { @@ -79,16 +81,37 @@ func (APIVersions) SwaggerDoc() map[string]string { return map_APIVersions } +var map_DeleteOptions = map[string]string{ + "": "DeleteOptions may be provided when deleting an API object.", + "gracePeriodSeconds": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "preconditions": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", + "orphanDependents": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "propagationPolicy": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", +} + +func (DeleteOptions) SwaggerDoc() map[string]string { + return map_DeleteOptions +} + var map_ExportOptions = map[string]string{ "": "ExportOptions is the query options to the standard REST get call.", - "export": "Should this value be exported. Export strips fields that a user can not specify.`", - "exact": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "export": "Should this value be exported. Export strips fields that a user can not specify.", + "exact": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", } func (ExportOptions) SwaggerDoc() map[string]string { return map_ExportOptions } +var map_GetOptions = map[string]string{ + "": "GetOptions is the standard query options to the standard REST get call.", + "resourceVersion": "When specified: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", +} + +func (GetOptions) SwaggerDoc() map[string]string { + return map_GetOptions +} + var map_GroupVersionForDiscovery = map[string]string{ "": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", "groupVersion": "groupVersion specifies the API group and version in the form \"group/version\"", @@ -130,6 +153,56 @@ func (ListMeta) SwaggerDoc() map[string]string { return map_ListMeta } +var map_ListOptions = map[string]string{ + "": "ListOptions is the query options to a standard REST list call.", + "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "timeoutSeconds": "Timeout for the list/watch call.", +} + +func (ListOptions) SwaggerDoc() map[string]string { + return map_ListOptions +} + +var map_ObjectMeta = map[string]string{ + "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: 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://kubernetes.io/docs/user-guide/namespaces", + "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.", + "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: 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 is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: 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://kubernetes.io/docs/user-guide/labels", + "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + "finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + "clusterName": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", +} + +func (ObjectMeta) SwaggerDoc() map[string]string { + return map_ObjectMeta +} + +var map_OwnerReference = map[string]string{ + "": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", + "apiVersion": "API version of the referent.", + "kind": "Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "name": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "uid": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "controller": "If true, this reference points to the managing controller.", + "blockOwnerDeletion": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", +} + +func (OwnerReference) SwaggerDoc() map[string]string { + return map_OwnerReference +} + var map_Patch = map[string]string{ "": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", } @@ -138,6 +211,15 @@ func (Patch) SwaggerDoc() map[string]string { return map_Patch } +var map_Preconditions = map[string]string{ + "": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "uid": "Specifies the target UID.", +} + +func (Preconditions) SwaggerDoc() map[string]string { + return map_Preconditions +} + var map_RootPaths = map[string]string{ "": "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", "paths": "paths are the paths available at root.", diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/unstructured.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go similarity index 73% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/unstructured.go rename to vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go index 54b38ddb3..ae20726b6 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/unstructured.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package runtime +package unstructured import ( "bytes" @@ -26,12 +26,73 @@ import ( "github.com/golang/glog" - "k8s.io/client-go/1.5/pkg/api/meta/metatypes" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/types" - "k8s.io/client-go/1.5/pkg/util/json" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/json" ) +// Unstructured allows objects that do not have Golang structs registered to be manipulated +// generically. This can be used to deal with the API objects from a plug-in. Unstructured +// objects still have functioning TypeMeta features-- kind, version, etc. +// +// WARNING: This object has accessors for the v1 standard metadata. You *MUST NOT* use this +// type if you are dealing with objects that are not in the server meta v1 schema. +// +// TODO: make the serialization part of this type distinct from the field accessors. +type Unstructured struct { + // Object is a JSON compatible map with string, float, int, bool, []interface{}, or + // map[string]interface{} + // children. + Object map[string]interface{} +} + +var _ metav1.Object = &Unstructured{} +var _ runtime.Unstructured = &Unstructured{} +var _ runtime.Unstructured = &UnstructuredList{} + +func (obj *Unstructured) GetObjectKind() schema.ObjectKind { return obj } +func (obj *UnstructuredList) GetObjectKind() schema.ObjectKind { return obj } + +func (obj *Unstructured) IsUnstructuredObject() {} +func (obj *UnstructuredList) IsUnstructuredObject() {} + +func (obj *Unstructured) IsList() bool { + if obj.Object != nil { + _, ok := obj.Object["items"] + return ok + } + return false +} +func (obj *UnstructuredList) IsList() bool { return true } + +func (obj *Unstructured) UnstructuredContent() map[string]interface{} { + if obj.Object == nil { + obj.Object = make(map[string]interface{}) + } + return obj.Object +} + +// UnstructuredContent returns a map contain an overlay of the Items field onto +// the Object field. Items always overwrites overlay. Changing "items" in the +// returned object will affect items in the underlying Items field, but changing +// the "items" slice itself will have no effect. +// TODO: expose SetUnstructuredContent on runtime.Unstructured that allows +// items to be changed. +func (obj *UnstructuredList) UnstructuredContent() map[string]interface{} { + out := obj.Object + if out == nil { + out = make(map[string]interface{}) + } + items := make([]interface{}, len(obj.Items)) + for i, item := range obj.Items { + items[i] = item.Object + } + out["items"] = items + return out +} + // MarshalJSON ensures that the unstructured object produces proper // JSON when passed to Go's standard JSON library. func (u *Unstructured) MarshalJSON() ([]byte, error) { @@ -141,38 +202,54 @@ func (u *Unstructured) setNestedMap(value map[string]string, fields ...string) { setNestedMap(u.Object, value, fields...) } -func extractOwnerReference(src interface{}) metatypes.OwnerReference { +func extractOwnerReference(src interface{}) metav1.OwnerReference { v := src.(map[string]interface{}) - controllerPtr, ok := (getNestedField(v, "controller")).(*bool) + // though this field is a *bool, but when decoded from JSON, it's + // unmarshalled as bool. + var controllerPtr *bool + controller, ok := (getNestedField(v, "controller")).(bool) if !ok { controllerPtr = nil } else { - if controllerPtr != nil { - controller := *controllerPtr - controllerPtr = &controller - } + controllerCopy := controller + controllerPtr = &controllerCopy } - return metatypes.OwnerReference{ - Kind: getNestedString(v, "kind"), - Name: getNestedString(v, "name"), - APIVersion: getNestedString(v, "apiVersion"), - UID: (types.UID)(getNestedString(v, "uid")), - Controller: controllerPtr, + var blockOwnerDeletionPtr *bool + blockOwnerDeletion, ok := (getNestedField(v, "blockOwnerDeletion")).(bool) + if !ok { + blockOwnerDeletionPtr = nil + } else { + blockOwnerDeletionCopy := blockOwnerDeletion + blockOwnerDeletionPtr = &blockOwnerDeletionCopy + } + return metav1.OwnerReference{ + Kind: getNestedString(v, "kind"), + Name: getNestedString(v, "name"), + APIVersion: getNestedString(v, "apiVersion"), + UID: (types.UID)(getNestedString(v, "uid")), + Controller: controllerPtr, + BlockOwnerDeletion: blockOwnerDeletionPtr, } } -func setOwnerReference(src metatypes.OwnerReference) map[string]interface{} { +func setOwnerReference(src metav1.OwnerReference) map[string]interface{} { ret := make(map[string]interface{}) controllerPtr := src.Controller if controllerPtr != nil { controller := *controllerPtr controllerPtr = &controller } + blockOwnerDeletionPtr := src.BlockOwnerDeletion + if blockOwnerDeletionPtr != nil { + blockOwnerDeletion := *blockOwnerDeletionPtr + blockOwnerDeletionPtr = &blockOwnerDeletion + } setNestedField(ret, src.Kind, "kind") setNestedField(ret, src.Name, "name") setNestedField(ret, src.APIVersion, "apiVersion") setNestedField(ret, string(src.UID), "uid") setNestedField(ret, controllerPtr, "controller") + setNestedField(ret, blockOwnerDeletionPtr, "blockOwnerDeletion") return ret } @@ -201,20 +278,20 @@ func getOwnerReferences(object map[string]interface{}) ([]map[string]interface{} return ownerReferences, nil } -func (u *Unstructured) GetOwnerReferences() []metatypes.OwnerReference { +func (u *Unstructured) GetOwnerReferences() []metav1.OwnerReference { original, err := getOwnerReferences(u.Object) if err != nil { glog.V(6).Info(err) return nil } - ret := make([]metatypes.OwnerReference, 0, len(original)) + ret := make([]metav1.OwnerReference, 0, len(original)) for i := 0; i < len(original); i++ { ret = append(ret, extractOwnerReference(original[i])) } return ret } -func (u *Unstructured) SetOwnerReferences(references []metatypes.OwnerReference) { +func (u *Unstructured) SetOwnerReferences(references []metav1.OwnerReference) { var newReferences = make([]map[string]interface{}, 0, len(references)) for i := 0; i < len(references); i++ { newReferences = append(newReferences, setOwnerReference(references[i])) @@ -286,19 +363,19 @@ func (u *Unstructured) SetSelfLink(selfLink string) { u.setNestedField(selfLink, "metadata", "selfLink") } -func (u *Unstructured) GetCreationTimestamp() unversioned.Time { - var timestamp unversioned.Time +func (u *Unstructured) GetCreationTimestamp() metav1.Time { + var timestamp metav1.Time timestamp.UnmarshalQueryParameter(getNestedString(u.Object, "metadata", "creationTimestamp")) return timestamp } -func (u *Unstructured) SetCreationTimestamp(timestamp unversioned.Time) { +func (u *Unstructured) SetCreationTimestamp(timestamp metav1.Time) { ts, _ := timestamp.MarshalQueryParameter() u.setNestedField(ts, "metadata", "creationTimestamp") } -func (u *Unstructured) GetDeletionTimestamp() *unversioned.Time { - var timestamp unversioned.Time +func (u *Unstructured) GetDeletionTimestamp() *metav1.Time { + var timestamp metav1.Time timestamp.UnmarshalQueryParameter(getNestedString(u.Object, "metadata", "deletionTimestamp")) if timestamp.IsZero() { return nil @@ -306,7 +383,7 @@ func (u *Unstructured) GetDeletionTimestamp() *unversioned.Time { return ×tamp } -func (u *Unstructured) SetDeletionTimestamp(timestamp *unversioned.Time) { +func (u *Unstructured) SetDeletionTimestamp(timestamp *metav1.Time) { ts, _ := timestamp.MarshalQueryParameter() u.setNestedField(ts, "metadata", "deletionTimestamp") } @@ -327,15 +404,15 @@ func (u *Unstructured) SetAnnotations(annotations map[string]string) { u.setNestedMap(annotations, "metadata", "annotations") } -func (u *Unstructured) SetGroupVersionKind(gvk unversioned.GroupVersionKind) { +func (u *Unstructured) SetGroupVersionKind(gvk schema.GroupVersionKind) { u.SetAPIVersion(gvk.GroupVersion().String()) u.SetKind(gvk.Kind) } -func (u *Unstructured) GroupVersionKind() unversioned.GroupVersionKind { - gv, err := unversioned.ParseGroupVersion(u.GetAPIVersion()) +func (u *Unstructured) GroupVersionKind() schema.GroupVersionKind { + gv, err := schema.ParseGroupVersion(u.GetAPIVersion()) if err != nil { - return unversioned.GroupVersionKind{} + return schema.GroupVersionKind{} } gvk := gv.WithKind(u.GetKind()) return gvk @@ -421,15 +498,15 @@ func (u *UnstructuredList) SetSelfLink(selfLink string) { u.setNestedField(selfLink, "metadata", "selfLink") } -func (u *UnstructuredList) SetGroupVersionKind(gvk unversioned.GroupVersionKind) { +func (u *UnstructuredList) SetGroupVersionKind(gvk schema.GroupVersionKind) { u.SetAPIVersion(gvk.GroupVersion().String()) u.SetKind(gvk.Kind) } -func (u *UnstructuredList) GroupVersionKind() unversioned.GroupVersionKind { - gv, err := unversioned.ParseGroupVersion(u.GetAPIVersion()) +func (u *UnstructuredList) GroupVersionKind() schema.GroupVersionKind { + gv, err := schema.ParseGroupVersion(u.GetAPIVersion()) if err != nil { - return unversioned.GroupVersionKind{} + return schema.GroupVersionKind{} } gvk := gv.WithKind(u.GetKind()) return gvk @@ -438,11 +515,11 @@ func (u *UnstructuredList) GroupVersionKind() unversioned.GroupVersionKind { // UnstructuredJSONScheme is capable of converting JSON data into the Unstructured // type, which can be used for generic access to objects without a predefined scheme. // TODO: move into serializer/json. -var UnstructuredJSONScheme Codec = unstructuredJSONScheme{} +var UnstructuredJSONScheme runtime.Codec = unstructuredJSONScheme{} type unstructuredJSONScheme struct{} -func (s unstructuredJSONScheme) Decode(data []byte, _ *unversioned.GroupVersionKind, obj Object) (Object, *unversioned.GroupVersionKind, error) { +func (s unstructuredJSONScheme) Decode(data []byte, _ *schema.GroupVersionKind, obj runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { var err error if obj != nil { err = s.decodeInto(data, obj) @@ -456,13 +533,13 @@ func (s unstructuredJSONScheme) Decode(data []byte, _ *unversioned.GroupVersionK gvk := obj.GetObjectKind().GroupVersionKind() if len(gvk.Kind) == 0 { - return nil, &gvk, NewMissingKindErr(string(data)) + return nil, &gvk, runtime.NewMissingKindErr(string(data)) } return obj, &gvk, nil } -func (unstructuredJSONScheme) Encode(obj Object, w io.Writer) error { +func (unstructuredJSONScheme) Encode(obj runtime.Object, w io.Writer) error { switch t := obj.(type) { case *Unstructured: return json.NewEncoder(w).Encode(t.Object) @@ -474,7 +551,7 @@ func (unstructuredJSONScheme) Encode(obj Object, w io.Writer) error { t.Object["items"] = items defer func() { delete(t.Object, "items") }() return json.NewEncoder(w).Encode(t.Object) - case *Unknown: + case *runtime.Unknown: // TODO: Unstructured needs to deal with ContentType. _, err := w.Write(t.Raw) return err @@ -483,7 +560,7 @@ func (unstructuredJSONScheme) Encode(obj Object, w io.Writer) error { } } -func (s unstructuredJSONScheme) decode(data []byte) (Object, error) { +func (s unstructuredJSONScheme) decode(data []byte) (runtime.Object, error) { type detector struct { Items gojson.RawMessage } @@ -504,16 +581,16 @@ func (s unstructuredJSONScheme) decode(data []byte) (Object, error) { return unstruct, err } -func (s unstructuredJSONScheme) decodeInto(data []byte, obj Object) error { +func (s unstructuredJSONScheme) decodeInto(data []byte, obj runtime.Object) error { switch x := obj.(type) { case *Unstructured: return s.decodeToUnstructured(data, x) case *UnstructuredList: return s.decodeToList(data, x) - case *VersionedObjects: + case *runtime.VersionedObjects: o, err := s.decode(data) if err == nil { - x.Objects = []Object{o} + x.Objects = []runtime.Object{o} } return err default: @@ -595,9 +672,9 @@ func (UnstructuredObjectConverter) Convert(in, out, context interface{}) error { return nil } -func (UnstructuredObjectConverter) ConvertToVersion(in Object, target GroupVersioner) (Object, error) { +func (UnstructuredObjectConverter) ConvertToVersion(in runtime.Object, target runtime.GroupVersioner) (runtime.Object, error) { if kind := in.GetObjectKind().GroupVersionKind(); !kind.Empty() { - gvk, ok := target.KindForGroupVersionKinds([]unversioned.GroupVersionKind{kind}) + gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{kind}) if !ok { // TODO: should this be a typed error? return nil, fmt.Errorf("%v is unstructured and is not suitable for converting to %q", kind, target) diff --git a/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/register.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go similarity index 50% rename from vendor/k8s.io/client-go/1.5/pkg/watch/versioned/register.go rename to vendor/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go index a1eaec494..a645501a1 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/register.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go @@ -14,35 +14,30 @@ See the License for the specific language governing permissions and limitations under the License. */ -package versioned +package v1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/conversion" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/watch" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" ) -// WatchEventKind is name reserved for serializing watch events. -const WatchEventKind = "WatchEvent" +// Event represents a single event to a watched resource. +// +// +protobuf=true +type WatchEvent struct { + Type string `json:"type" protobuf:"bytes,1,opt,name=type"` -// AddToGroupVersion registers the watch external and internal kinds with the scheme, and ensures the proper -// conversions are in place. -func AddToGroupVersion(scheme *runtime.Scheme, groupVersion unversioned.GroupVersion) { - scheme.AddKnownTypeWithName(groupVersion.WithKind(WatchEventKind), &Event{}) - scheme.AddKnownTypeWithName( - unversioned.GroupVersion{Group: groupVersion.Group, Version: runtime.APIVersionInternal}.WithKind(WatchEventKind), - &InternalEvent{}, - ) - scheme.AddConversionFuncs( - Convert_versioned_Event_to_watch_Event, - Convert_versioned_InternalEvent_to_versioned_Event, - Convert_watch_Event_to_versioned_Event, - Convert_versioned_Event_to_versioned_InternalEvent, - ) + // Object is: + // * If Type is Added or Modified: the new state of the object. + // * If Type is Deleted: the state of the object immediately before deletion. + // * If Type is Error: *Status is recommended; other types may make sense + // depending on context. + Object runtime.RawExtension `json:"object" protobuf:"bytes,2,opt,name=object"` } -func Convert_watch_Event_to_versioned_Event(in *watch.Event, out *Event, s conversion.Scope) error { +func Convert_watch_Event_to_versioned_Event(in *watch.Event, out *WatchEvent, s conversion.Scope) error { out.Type = string(in.Type) switch t := in.Object.(type) { case *runtime.Unknown: @@ -55,11 +50,11 @@ func Convert_watch_Event_to_versioned_Event(in *watch.Event, out *Event, s conve return nil } -func Convert_versioned_InternalEvent_to_versioned_Event(in *InternalEvent, out *Event, s conversion.Scope) error { +func Convert_versioned_InternalEvent_to_versioned_Event(in *InternalEvent, out *WatchEvent, s conversion.Scope) error { return Convert_watch_Event_to_versioned_Event((*watch.Event)(in), out, s) } -func Convert_versioned_Event_to_watch_Event(in *Event, out *watch.Event, s conversion.Scope) error { +func Convert_versioned_Event_to_watch_Event(in *WatchEvent, out *watch.Event, s conversion.Scope) error { out.Type = watch.EventType(in.Type) if in.Object.Object != nil { out.Object = in.Object.Object @@ -73,12 +68,13 @@ func Convert_versioned_Event_to_watch_Event(in *Event, out *watch.Event, s conve return nil } -func Convert_versioned_Event_to_versioned_InternalEvent(in *Event, out *InternalEvent, s conversion.Scope) error { +func Convert_versioned_Event_to_versioned_InternalEvent(in *WatchEvent, out *InternalEvent, s conversion.Scope) error { return Convert_versioned_Event_to_watch_Event(in, (*watch.Event)(out), s) } // InternalEvent makes watch.Event versioned +// +protobuf=false type InternalEvent watch.Event -func (e *InternalEvent) GetObjectKind() unversioned.ObjectKind { return unversioned.EmptyObjectKind } -func (e *Event) GetObjectKind() unversioned.ObjectKind { return unversioned.EmptyObjectKind } +func (e *InternalEvent) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } +func (e *WatchEvent) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/well_known_labels.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/well_known_labels.go new file mode 100644 index 000000000..bd17546a4 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/well_known_labels.go @@ -0,0 +1,84 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +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" + + // Historically fluentd was a manifest pod the was migrated to DaemonSet. + // To avoid situation during cluster upgrade when there are two instances + // of fluentd running on a node, kubelet need to mark node on which + // fluentd in not running as a manifest pod with LabelFluentdDsReady. + LabelFluentdDsReady = "alpha.kubernetes.io/fluentd-ds-ready" + + // When feature-gate for TaintBasedEvictions=true flag is enabled, + // TaintNodeNotReady would be automatically added by node controller + // when node is not ready, and removed when node becomes ready. + TaintNodeNotReady = "node.alpha.kubernetes.io/notReady" + + // When feature-gate for TaintBasedEvictions=true flag is enabled, + // TaintNodeUnreachable would be automatically added by node controller + // when node becomes unreachable (corresponding to NodeReady status ConditionUnknown) + // and removed when node becomes reachable (NodeReady status ConditionTrue). + TaintNodeUnreachable = "node.alpha.kubernetes.io/unreachable" +) + +// Role labels are applied to Nodes to mark their purpose. In particular, we +// usually want to distinguish the master, so that we can isolate privileged +// pods and operations. +// +// Originally we relied on not registering the master, on the fact that the +// master was Unschedulable, and on static manifests for master components. +// But we now do register masters in many environments, are generally moving +// away from static manifests (for better manageability), and working towards +// deprecating the unschedulable field (replacing it with taints & tolerations +// instead). +// +// Even with tainting, a label remains the easiest way of making a positive +// selection, so that pods can schedule only to master nodes for example, and +// thus installations will likely define a label for their master nodes. +// +// So that we can recognize master nodes in consequent places though (such as +// kubectl get nodes), we encourage installations to use the well-known labels. +// We define NodeLabelRole, which is the preferred form, but we will also recognize +// other forms that are known to be in widespread use (NodeLabelKubeadmAlphaRole). + +const ( + // NodeLabelRole is the preferred label applied to a Node as a hint that it has a particular purpose (defined by the value). + NodeLabelRole = "kubernetes.io/role" + + // NodeLabelKubeadmAlphaRole is a label that kubeadm applies to a Node as a hint that it has a particular purpose. + // Use of NodeLabelRole is preferred. + NodeLabelKubeadmAlphaRole = "kubeadm.alpha.kubernetes.io/role" + + // NodeLabelRoleMaster is the value of a NodeLabelRole or NodeLabelKubeadmAlphaRole label, indicating a master node. + // A master node typically runs kubernetes system components and will not typically run user workloads. + NodeLabelRoleMaster = "master" + + // NodeLabelRoleNode is the value of a NodeLabelRole or NodeLabelKubeadmAlphaRole label, indicating a "normal" node, + // as opposed to a RoleMaster node. + NodeLabelRoleNode = "node" +) diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..b5f7360e2 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go @@ -0,0 +1,554 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1 + +import ( + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" + reflect "reflect" +) + +// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them. +func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc { + return []conversion.GeneratedDeepCopyFunc{ + {Fn: DeepCopy_v1_APIGroup, InType: reflect.TypeOf(&APIGroup{})}, + {Fn: DeepCopy_v1_APIGroupList, InType: reflect.TypeOf(&APIGroupList{})}, + {Fn: DeepCopy_v1_APIResource, InType: reflect.TypeOf(&APIResource{})}, + {Fn: DeepCopy_v1_APIResourceList, InType: reflect.TypeOf(&APIResourceList{})}, + {Fn: DeepCopy_v1_APIVersions, InType: reflect.TypeOf(&APIVersions{})}, + {Fn: DeepCopy_v1_DeleteOptions, InType: reflect.TypeOf(&DeleteOptions{})}, + {Fn: DeepCopy_v1_Duration, InType: reflect.TypeOf(&Duration{})}, + {Fn: DeepCopy_v1_ExportOptions, InType: reflect.TypeOf(&ExportOptions{})}, + {Fn: DeepCopy_v1_GetOptions, InType: reflect.TypeOf(&GetOptions{})}, + {Fn: DeepCopy_v1_GroupKind, InType: reflect.TypeOf(&GroupKind{})}, + {Fn: DeepCopy_v1_GroupResource, InType: reflect.TypeOf(&GroupResource{})}, + {Fn: DeepCopy_v1_GroupVersion, InType: reflect.TypeOf(&GroupVersion{})}, + {Fn: DeepCopy_v1_GroupVersionForDiscovery, InType: reflect.TypeOf(&GroupVersionForDiscovery{})}, + {Fn: DeepCopy_v1_GroupVersionKind, InType: reflect.TypeOf(&GroupVersionKind{})}, + {Fn: DeepCopy_v1_GroupVersionResource, InType: reflect.TypeOf(&GroupVersionResource{})}, + {Fn: DeepCopy_v1_InternalEvent, InType: reflect.TypeOf(&InternalEvent{})}, + {Fn: DeepCopy_v1_LabelSelector, InType: reflect.TypeOf(&LabelSelector{})}, + {Fn: DeepCopy_v1_LabelSelectorRequirement, InType: reflect.TypeOf(&LabelSelectorRequirement{})}, + {Fn: DeepCopy_v1_ListMeta, InType: reflect.TypeOf(&ListMeta{})}, + {Fn: DeepCopy_v1_ListOptions, InType: reflect.TypeOf(&ListOptions{})}, + {Fn: DeepCopy_v1_ObjectMeta, InType: reflect.TypeOf(&ObjectMeta{})}, + {Fn: DeepCopy_v1_OwnerReference, InType: reflect.TypeOf(&OwnerReference{})}, + {Fn: DeepCopy_v1_Patch, InType: reflect.TypeOf(&Patch{})}, + {Fn: DeepCopy_v1_Preconditions, InType: reflect.TypeOf(&Preconditions{})}, + {Fn: DeepCopy_v1_RootPaths, InType: reflect.TypeOf(&RootPaths{})}, + {Fn: DeepCopy_v1_ServerAddressByClientCIDR, InType: reflect.TypeOf(&ServerAddressByClientCIDR{})}, + {Fn: DeepCopy_v1_Status, InType: reflect.TypeOf(&Status{})}, + {Fn: DeepCopy_v1_StatusCause, InType: reflect.TypeOf(&StatusCause{})}, + {Fn: DeepCopy_v1_StatusDetails, InType: reflect.TypeOf(&StatusDetails{})}, + {Fn: DeepCopy_v1_Time, InType: reflect.TypeOf(&Time{})}, + {Fn: DeepCopy_v1_Timestamp, InType: reflect.TypeOf(&Timestamp{})}, + {Fn: DeepCopy_v1_TypeMeta, InType: reflect.TypeOf(&TypeMeta{})}, + {Fn: DeepCopy_v1_WatchEvent, InType: reflect.TypeOf(&WatchEvent{})}, + } +} + +func DeepCopy_v1_APIGroup(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*APIGroup) + out := out.(*APIGroup) + *out = *in + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]GroupVersionForDiscovery, len(*in)) + copy(*out, *in) + } + if in.ServerAddressByClientCIDRs != nil { + in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs + *out = make([]ServerAddressByClientCIDR, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1_APIGroupList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*APIGroupList) + out := out.(*APIGroupList) + *out = *in + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]APIGroup, len(*in)) + for i := range *in { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { + return err + } else { + (*out)[i] = *newVal.(*APIGroup) + } + } + } + return nil + } +} + +func DeepCopy_v1_APIResource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*APIResource) + out := out.(*APIResource) + *out = *in + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make(Verbs, len(*in)) + copy(*out, *in) + } + if in.ShortNames != nil { + in, out := &in.ShortNames, &out.ShortNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1_APIResourceList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*APIResourceList) + out := out.(*APIResourceList) + *out = *in + if in.APIResources != nil { + in, out := &in.APIResources, &out.APIResources + *out = make([]APIResource, len(*in)) + for i := range *in { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { + return err + } else { + (*out)[i] = *newVal.(*APIResource) + } + } + } + return nil + } +} + +func DeepCopy_v1_APIVersions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*APIVersions) + out := out.(*APIVersions) + *out = *in + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ServerAddressByClientCIDRs != nil { + in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs + *out = make([]ServerAddressByClientCIDR, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1_DeleteOptions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*DeleteOptions) + out := out.(*DeleteOptions) + *out = *in + if in.GracePeriodSeconds != nil { + in, out := &in.GracePeriodSeconds, &out.GracePeriodSeconds + *out = new(int64) + **out = **in + } + if in.Preconditions != nil { + in, out := &in.Preconditions, &out.Preconditions + if newVal, err := c.DeepCopy(*in); err != nil { + return err + } else { + *out = newVal.(*Preconditions) + } + } + if in.OrphanDependents != nil { + in, out := &in.OrphanDependents, &out.OrphanDependents + *out = new(bool) + **out = **in + } + if in.PropagationPolicy != nil { + in, out := &in.PropagationPolicy, &out.PropagationPolicy + *out = new(DeletionPropagation) + **out = **in + } + return nil + } +} + +func DeepCopy_v1_Duration(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Duration) + out := out.(*Duration) + *out = *in + return nil + } +} + +func DeepCopy_v1_ExportOptions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ExportOptions) + out := out.(*ExportOptions) + *out = *in + return nil + } +} + +func DeepCopy_v1_GetOptions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*GetOptions) + out := out.(*GetOptions) + *out = *in + return nil + } +} + +func DeepCopy_v1_GroupKind(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*GroupKind) + out := out.(*GroupKind) + *out = *in + return nil + } +} + +func DeepCopy_v1_GroupResource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*GroupResource) + out := out.(*GroupResource) + *out = *in + return nil + } +} + +func DeepCopy_v1_GroupVersion(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*GroupVersion) + out := out.(*GroupVersion) + *out = *in + return nil + } +} + +func DeepCopy_v1_GroupVersionForDiscovery(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*GroupVersionForDiscovery) + out := out.(*GroupVersionForDiscovery) + *out = *in + return nil + } +} + +func DeepCopy_v1_GroupVersionKind(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*GroupVersionKind) + out := out.(*GroupVersionKind) + *out = *in + return nil + } +} + +func DeepCopy_v1_GroupVersionResource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*GroupVersionResource) + out := out.(*GroupVersionResource) + *out = *in + return nil + } +} + +func DeepCopy_v1_InternalEvent(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*InternalEvent) + out := out.(*InternalEvent) + *out = *in + // in.Object is kind 'Interface' + if in.Object != nil { + if newVal, err := c.DeepCopy(&in.Object); err != nil { + return err + } else { + out.Object = *newVal.(*runtime.Object) + } + } + return nil + } +} + +func DeepCopy_v1_LabelSelector(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*LabelSelector) + out := out.(*LabelSelector) + *out = *in + if in.MatchLabels != nil { + in, out := &in.MatchLabels, &out.MatchLabels + *out = make(map[string]string) + for key, val := range *in { + (*out)[key] = val + } + } + if in.MatchExpressions != nil { + in, out := &in.MatchExpressions, &out.MatchExpressions + *out = make([]LabelSelectorRequirement, len(*in)) + for i := range *in { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { + return err + } else { + (*out)[i] = *newVal.(*LabelSelectorRequirement) + } + } + } + return nil + } +} + +func DeepCopy_v1_LabelSelectorRequirement(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*LabelSelectorRequirement) + out := out.(*LabelSelectorRequirement) + *out = *in + if in.Values != nil { + in, out := &in.Values, &out.Values + *out = make([]string, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1_ListMeta(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ListMeta) + out := out.(*ListMeta) + *out = *in + return nil + } +} + +func DeepCopy_v1_ListOptions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ListOptions) + out := out.(*ListOptions) + *out = *in + if in.TimeoutSeconds != nil { + in, out := &in.TimeoutSeconds, &out.TimeoutSeconds + *out = new(int64) + **out = **in + } + return nil + } +} + +func DeepCopy_v1_ObjectMeta(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ObjectMeta) + out := out.(*ObjectMeta) + *out = *in + out.CreationTimestamp = in.CreationTimestamp.DeepCopy() + if in.DeletionTimestamp != nil { + in, out := &in.DeletionTimestamp, &out.DeletionTimestamp + *out = new(Time) + **out = (*in).DeepCopy() + } + if in.DeletionGracePeriodSeconds != nil { + in, out := &in.DeletionGracePeriodSeconds, &out.DeletionGracePeriodSeconds + *out = new(int64) + **out = **in + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string) + for key, val := range *in { + (*out)[key] = val + } + } + if in.OwnerReferences != nil { + in, out := &in.OwnerReferences, &out.OwnerReferences + *out = make([]OwnerReference, len(*in)) + for i := range *in { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { + return err + } else { + (*out)[i] = *newVal.(*OwnerReference) + } + } + } + if in.Finalizers != nil { + in, out := &in.Finalizers, &out.Finalizers + *out = make([]string, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1_OwnerReference(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*OwnerReference) + out := out.(*OwnerReference) + *out = *in + if in.Controller != nil { + in, out := &in.Controller, &out.Controller + *out = new(bool) + **out = **in + } + if in.BlockOwnerDeletion != nil { + in, out := &in.BlockOwnerDeletion, &out.BlockOwnerDeletion + *out = new(bool) + **out = **in + } + return nil + } +} + +func DeepCopy_v1_Patch(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Patch) + out := out.(*Patch) + *out = *in + return nil + } +} + +func DeepCopy_v1_Preconditions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Preconditions) + out := out.(*Preconditions) + *out = *in + if in.UID != nil { + in, out := &in.UID, &out.UID + *out = new(types.UID) + **out = **in + } + return nil + } +} + +func DeepCopy_v1_RootPaths(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RootPaths) + out := out.(*RootPaths) + *out = *in + if in.Paths != nil { + in, out := &in.Paths, &out.Paths + *out = make([]string, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1_ServerAddressByClientCIDR(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ServerAddressByClientCIDR) + out := out.(*ServerAddressByClientCIDR) + *out = *in + return nil + } +} + +func DeepCopy_v1_Status(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Status) + out := out.(*Status) + *out = *in + if in.Details != nil { + in, out := &in.Details, &out.Details + if newVal, err := c.DeepCopy(*in); err != nil { + return err + } else { + *out = newVal.(*StatusDetails) + } + } + return nil + } +} + +func DeepCopy_v1_StatusCause(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*StatusCause) + out := out.(*StatusCause) + *out = *in + return nil + } +} + +func DeepCopy_v1_StatusDetails(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*StatusDetails) + out := out.(*StatusDetails) + *out = *in + if in.Causes != nil { + in, out := &in.Causes, &out.Causes + *out = make([]StatusCause, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1_Time(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Time) + out := out.(*Time) + *out = in.DeepCopy() + return nil + } +} + +func DeepCopy_v1_Timestamp(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Timestamp) + out := out.(*Timestamp) + *out = *in + return nil + } +} + +func DeepCopy_v1_TypeMeta(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*TypeMeta) + out := out.(*TypeMeta) + *out = *in + return nil + } +} + +func DeepCopy_v1_WatchEvent(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*WatchEvent) + out := out.(*WatchEvent) + *out = *in + if newVal, err := c.DeepCopy(&in.Object); err != nil { + return err + } else { + out.Object = *newVal.(*runtime.RawExtension) + } + return nil + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go new file mode 100644 index 000000000..6df448eb9 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/OWNERS b/vendor/k8s.io/apimachinery/pkg/conversion/OWNERS new file mode 100644 index 000000000..c25e7faf2 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/conversion/OWNERS @@ -0,0 +1,10 @@ +approvers: +- derekwaynecarr +- lavalamp +- smarterclayton +- wojtek-t +reviewers: +- derekwaynecarr +- lavalamp +- smarterclayton +- wojtek-t diff --git a/vendor/k8s.io/client-go/1.5/pkg/conversion/cloner.go b/vendor/k8s.io/apimachinery/pkg/conversion/cloner.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/conversion/cloner.go rename to vendor/k8s.io/apimachinery/pkg/conversion/cloner.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/conversion/converter.go b/vendor/k8s.io/apimachinery/pkg/conversion/converter.go similarity index 99% rename from vendor/k8s.io/client-go/1.5/pkg/conversion/converter.go rename to vendor/k8s.io/apimachinery/pkg/conversion/converter.go index 8941b18ae..9ab468ebe 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/conversion/converter.go +++ b/vendor/k8s.io/apimachinery/pkg/conversion/converter.go @@ -431,10 +431,10 @@ func (c *Converter) SetStructFieldCopy(srcFieldType interface{}, srcFieldName st } // RegisterDefaultingFunc registers a value-defaulting func with the Converter. -// defaultingFunc must take one parameters: a pointer to the input type. +// defaultingFunc must take one parameter: a pointer to the input type. // // Example: -// c.RegisteDefaultingFunc( +// c.RegisterDefaultingFunc( // func(in *v1.Pod) { // // defaulting logic... // }) diff --git a/vendor/k8s.io/client-go/1.5/pkg/conversion/deep_equal.go b/vendor/k8s.io/apimachinery/pkg/conversion/deep_equal.go similarity index 94% rename from vendor/k8s.io/client-go/1.5/pkg/conversion/deep_equal.go rename to vendor/k8s.io/apimachinery/pkg/conversion/deep_equal.go index 9edb3a82e..f21abe1e5 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/conversion/deep_equal.go +++ b/vendor/k8s.io/apimachinery/pkg/conversion/deep_equal.go @@ -17,7 +17,7 @@ limitations under the License. package conversion import ( - "k8s.io/client-go/1.5/pkg/third_party/forked/golang/reflect" + "k8s.io/apimachinery/third_party/forked/golang/reflect" ) // The code for this type must be located in third_party, since it forks from diff --git a/vendor/k8s.io/client-go/1.5/pkg/conversion/doc.go b/vendor/k8s.io/apimachinery/pkg/conversion/doc.go similarity index 93% rename from vendor/k8s.io/client-go/1.5/pkg/conversion/doc.go rename to vendor/k8s.io/apimachinery/pkg/conversion/doc.go index 0c46ef2d1..7415d8164 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/conversion/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/conversion/doc.go @@ -21,4 +21,4 @@ limitations under the License. // but for the fields which did not change, copying is automated. This makes it // easy to modify the structures you use in memory without affecting the format // you store on disk or respond to in your external API calls. -package conversion +package conversion // import "k8s.io/apimachinery/pkg/conversion" diff --git a/vendor/k8s.io/client-go/1.5/pkg/conversion/helper.go b/vendor/k8s.io/apimachinery/pkg/conversion/helper.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/conversion/helper.go rename to vendor/k8s.io/apimachinery/pkg/conversion/helper.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/conversion/queryparams/convert.go b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/conversion/queryparams/convert.go rename to vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/conversion/queryparams/doc.go b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go similarity index 89% rename from vendor/k8s.io/client-go/1.5/pkg/conversion/queryparams/doc.go rename to vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go index 4c1002a4c..7b763de6f 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/conversion/queryparams/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package queryparams provides conversion from versioned // runtime objects to URL query values -package queryparams +package queryparams // import "k8s.io/apimachinery/pkg/conversion/queryparams" diff --git a/vendor/k8s.io/client-go/1.5/pkg/fields/doc.go b/vendor/k8s.io/apimachinery/pkg/fields/doc.go similarity index 92% rename from vendor/k8s.io/client-go/1.5/pkg/fields/doc.go rename to vendor/k8s.io/apimachinery/pkg/fields/doc.go index 49059e263..c39b8039a 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/fields/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/fields/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package fields implements a simple field system, parsing and matching // selectors with sets of fields. -package fields +package fields // import "k8s.io/apimachinery/pkg/fields" diff --git a/vendor/k8s.io/client-go/1.5/pkg/fields/fields.go b/vendor/k8s.io/apimachinery/pkg/fields/fields.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/fields/fields.go rename to vendor/k8s.io/apimachinery/pkg/fields/fields.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/fields/requirements.go b/vendor/k8s.io/apimachinery/pkg/fields/requirements.go similarity index 95% rename from vendor/k8s.io/client-go/1.5/pkg/fields/requirements.go rename to vendor/k8s.io/apimachinery/pkg/fields/requirements.go index 1ab540aa6..70d94ded8 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/fields/requirements.go +++ b/vendor/k8s.io/apimachinery/pkg/fields/requirements.go @@ -16,7 +16,7 @@ limitations under the License. package fields -import "k8s.io/client-go/1.5/pkg/selection" +import "k8s.io/apimachinery/pkg/selection" // Requirements is AND of all requirements. type Requirements []Requirement diff --git a/vendor/k8s.io/client-go/1.5/pkg/fields/selector.go b/vendor/k8s.io/apimachinery/pkg/fields/selector.go similarity index 57% rename from vendor/k8s.io/client-go/1.5/pkg/fields/selector.go rename to vendor/k8s.io/apimachinery/pkg/fields/selector.go index cd61a0130..bb156b4cb 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/fields/selector.go +++ b/vendor/k8s.io/apimachinery/pkg/fields/selector.go @@ -17,11 +17,12 @@ limitations under the License. package fields import ( + "bytes" "fmt" "sort" "strings" - "k8s.io/client-go/1.5/pkg/selection" + "k8s.io/apimachinery/pkg/selection" ) // Selector represents a field selector. @@ -90,7 +91,7 @@ func (t *hasTerm) Requirements() Requirements { } func (t *hasTerm) String() string { - return fmt.Sprintf("%v=%v", t.field, t.value) + return fmt.Sprintf("%v=%v", t.field, EscapeValue(t.value)) } type notHasTerm struct { @@ -126,7 +127,7 @@ func (t *notHasTerm) Requirements() Requirements { } func (t *notHasTerm) String() string { - return fmt.Sprintf("%v!=%v", t.field, t.value) + return fmt.Sprintf("%v!=%v", t.field, EscapeValue(t.value)) } type andTerm []Selector @@ -212,6 +213,81 @@ func SelectorFromSet(ls Set) Selector { return andTerm(items) } +// valueEscaper prefixes \,= characters with a backslash +var valueEscaper = strings.NewReplacer( + // escape \ characters + `\`, `\\`, + // then escape , and = characters to allow unambiguous parsing of the value in a fieldSelector + `,`, `\,`, + `=`, `\=`, +) + +// Escapes an arbitrary literal string for use as a fieldSelector value +func EscapeValue(s string) string { + return valueEscaper.Replace(s) +} + +// InvalidEscapeSequence indicates an error occurred unescaping a field selector +type InvalidEscapeSequence struct { + sequence string +} + +func (i InvalidEscapeSequence) Error() string { + return fmt.Sprintf("invalid field selector: invalid escape sequence: %s", i.sequence) +} + +// UnescapedRune indicates an error occurred unescaping a field selector +type UnescapedRune struct { + r rune +} + +func (i UnescapedRune) Error() string { + return fmt.Sprintf("invalid field selector: unescaped character in value: %v", i.r) +} + +// Unescapes a fieldSelector value and returns the original literal value. +// May return the original string if it contains no escaped or special characters. +func UnescapeValue(s string) (string, error) { + // if there's no escaping or special characters, just return to avoid allocation + if !strings.ContainsAny(s, `\,=`) { + return s, nil + } + + v := bytes.NewBuffer(make([]byte, 0, len(s))) + inSlash := false + for _, c := range s { + if inSlash { + switch c { + case '\\', ',', '=': + // omit the \ for recognized escape sequences + v.WriteRune(c) + default: + // error on unrecognized escape sequences + return "", InvalidEscapeSequence{sequence: string([]rune{'\\', c})} + } + inSlash = false + continue + } + + switch c { + case '\\': + inSlash = true + case ',', '=': + // unescaped , and = characters are not allowed in field selector values + return "", UnescapedRune{r: c} + default: + v.WriteRune(c) + } + } + + // Ending with a single backslash is an invalid sequence + if inSlash { + return "", InvalidEscapeSequence{sequence: "\\"} + } + + return v.String(), nil +} + // ParseSelectorOrDie takes a string representing a selector and returns an // object suitable for matching, or panic when an error occur. func ParseSelectorOrDie(s string) Selector { @@ -239,29 +315,83 @@ func ParseAndTransformSelector(selector string, fn TransformFunc) (Selector, err // Function to transform selectors. type TransformFunc func(field, value string) (newField, newValue string, err error) -func try(selectorPiece, op string) (lhs, rhs string, ok bool) { - pieces := strings.Split(selectorPiece, op) - if len(pieces) == 2 { - return pieces[0], pieces[1], true +// splitTerms returns the comma-separated terms contained in the given fieldSelector. +// Backslash-escaped commas are treated as data instead of delimiters, and are included in the returned terms, with the leading backslash preserved. +func splitTerms(fieldSelector string) []string { + if len(fieldSelector) == 0 { + return nil } - return "", "", false + + terms := make([]string, 0, 1) + startIndex := 0 + inSlash := false + for i, c := range fieldSelector { + switch { + case inSlash: + inSlash = false + case c == '\\': + inSlash = true + case c == ',': + terms = append(terms, fieldSelector[startIndex:i]) + startIndex = i + 1 + } + } + + terms = append(terms, fieldSelector[startIndex:]) + + return terms +} + +const ( + notEqualOperator = "!=" + doubleEqualOperator = "==" + equalOperator = "=" +) + +// termOperators holds the recognized operators supported in fieldSelectors. +// doubleEqualOperator and equal are equivalent, but doubleEqualOperator is checked first +// to avoid leaving a leading = character on the rhs value. +var termOperators = []string{notEqualOperator, doubleEqualOperator, equalOperator} + +// splitTerm returns the lhs, operator, and rhs parsed from the given term, along with an indicator of whether the parse was successful. +// no escaping of special characters is supported in the lhs value, so the first occurance of a recognized operator is used as the split point. +// the literal rhs is returned, and the caller is responsible for applying any desired unescaping. +func splitTerm(term string) (lhs, op, rhs string, ok bool) { + for i := range term { + remaining := term[i:] + for _, op := range termOperators { + if strings.HasPrefix(remaining, op) { + return term[0:i], op, term[i+len(op):], true + } + } + } + return "", "", "", false } func parseSelector(selector string, fn TransformFunc) (Selector, error) { - parts := strings.Split(selector, ",") + parts := splitTerms(selector) sort.StringSlice(parts).Sort() var items []Selector for _, part := range parts { if part == "" { continue } - if lhs, rhs, ok := try(part, "!="); ok { - items = append(items, ¬HasTerm{field: lhs, value: rhs}) - } else if lhs, rhs, ok := try(part, "=="); ok { - items = append(items, &hasTerm{field: lhs, value: rhs}) - } else if lhs, rhs, ok := try(part, "="); ok { - items = append(items, &hasTerm{field: lhs, value: rhs}) - } else { + lhs, op, rhs, ok := splitTerm(part) + if !ok { + return nil, fmt.Errorf("invalid selector: '%s'; can't understand '%s'", selector, part) + } + unescapedRHS, err := UnescapeValue(rhs) + if err != nil { + return nil, err + } + switch op { + case notEqualOperator: + items = append(items, ¬HasTerm{field: lhs, value: unescapedRHS}) + case doubleEqualOperator: + items = append(items, &hasTerm{field: lhs, value: unescapedRHS}) + case equalOperator: + items = append(items, &hasTerm{field: lhs, value: unescapedRHS}) + default: return nil, fmt.Errorf("invalid selector: '%s'; can't understand '%s'", selector, part) } } @@ -276,3 +406,8 @@ func parseSelector(selector string, fn TransformFunc) (Selector, error) { func OneTermEqualSelector(k, v string) Selector { return &hasTerm{field: k, value: v} } + +// AndSelectors creates a selector that is the logical AND of all the given selectors +func AndSelectors(selectors ...Selector) Selector { + return andTerm(selectors) +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/labels/doc.go b/vendor/k8s.io/apimachinery/pkg/labels/doc.go similarity index 92% rename from vendor/k8s.io/client-go/1.5/pkg/labels/doc.go rename to vendor/k8s.io/apimachinery/pkg/labels/doc.go index 35ba78809..82de0051b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/labels/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/labels/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package labels implements a simple label system, parsing and matching // selectors with sets of labels. -package labels +package labels // import "k8s.io/apimachinery/pkg/labels" diff --git a/vendor/k8s.io/client-go/1.5/pkg/labels/labels.go b/vendor/k8s.io/apimachinery/pkg/labels/labels.go similarity index 51% rename from vendor/k8s.io/client-go/1.5/pkg/labels/labels.go rename to vendor/k8s.io/apimachinery/pkg/labels/labels.go index 822b137a9..0d0caa77d 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/labels/labels.go +++ b/vendor/k8s.io/apimachinery/pkg/labels/labels.go @@ -17,6 +17,7 @@ limitations under the License. package labels import ( + "fmt" "sort" "strings" ) @@ -78,3 +79,103 @@ func FormatLabels(labelMap map[string]string) string { } return l } + +// Conflicts takes 2 maps and returns true if there a key match between +// the maps but the value doesn't match, and returns false in other cases +func Conflicts(labels1, labels2 Set) bool { + small := labels1 + big := labels2 + if len(labels2) < len(labels1) { + small = labels2 + big = labels1 + } + + for k, v := range small { + if val, match := big[k]; match { + if val != v { + return true + } + } + } + + return false +} + +// Merge combines given maps, and does not check for any conflicts +// between the maps. In case of conflicts, second map (labels2) wins +func Merge(labels1, labels2 Set) Set { + mergedMap := Set{} + + for k, v := range labels1 { + mergedMap[k] = v + } + for k, v := range labels2 { + mergedMap[k] = v + } + return mergedMap +} + +// Equals returns true if the given maps are equal +func Equals(labels1, labels2 Set) bool { + if len(labels1) != len(labels2) { + return false + } + + for k, v := range labels1 { + value, ok := labels2[k] + if !ok { + return false + } + if value != v { + return false + } + } + return true +} + +// AreLabelsInWhiteList verifies if the provided label list +// is in the provided whitelist and returns true, otherwise false. +func AreLabelsInWhiteList(labels, whitelist Set) bool { + if len(whitelist) == 0 { + return true + } + + for k, v := range labels { + value, ok := whitelist[k] + if !ok { + return false + } + if value != v { + return false + } + } + return true +} + +// ConvertSelectorToLabelsMap converts selector string to labels map +// and validates keys and values +func ConvertSelectorToLabelsMap(selector string) (Set, error) { + labelsMap := Set{} + + if len(selector) == 0 { + return labelsMap, nil + } + + labels := strings.Split(selector, ",") + for _, label := range labels { + l := strings.Split(label, "=") + if len(l) != 2 { + return labelsMap, fmt.Errorf("invalid selector: %s", l) + } + key := strings.TrimSpace(l[0]) + if err := validateLabelKey(key); err != nil { + return labelsMap, err + } + value := strings.TrimSpace(l[1]) + if err := validateLabelValue(value); err != nil { + return labelsMap, err + } + labelsMap[key] = value + } + return labelsMap, nil +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/labels/selector.go b/vendor/k8s.io/apimachinery/pkg/labels/selector.go similarity index 91% rename from vendor/k8s.io/client-go/1.5/pkg/labels/selector.go rename to vendor/k8s.io/apimachinery/pkg/labels/selector.go index c6b8fd1d6..9bddc35a6 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/labels/selector.go +++ b/vendor/k8s.io/apimachinery/pkg/labels/selector.go @@ -24,9 +24,9 @@ import ( "strings" "github.com/golang/glog" - "k8s.io/client-go/1.5/pkg/selection" - "k8s.io/client-go/1.5/pkg/util/sets" - "k8s.io/client-go/1.5/pkg/util/validation" + "k8s.io/apimachinery/pkg/selection" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/validation" ) // Requirements is AND of all requirements. @@ -62,7 +62,7 @@ type nothingSelector struct{} func (n nothingSelector) Matches(_ Labels) bool { return false } func (n nothingSelector) Empty() bool { return false } -func (n nothingSelector) String() string { return "" } +func (n nothingSelector) String() string { return "" } func (n nothingSelector) Add(_ ...Requirement) Selector { return n } func (n nothingSelector) Requirements() (Requirements, bool) { return nil, false } @@ -91,9 +91,12 @@ func (a ByKey) Less(i, j int) bool { return a[i].key < a[j].key } // Requirement implements both set based match and exact match // Requirement should be initialized via NewRequirement constructor for creating a valid Requirement. type Requirement struct { - key string - operator selection.Operator - strValues sets.String + key string + operator selection.Operator + // In huge majority of cases we have at most one value here. + // It is generally faster to operate on a single-element slice + // than on a single-element map, so we have a slice here. + strValues []string } // NewRequirement is the constructor for a Requirement. @@ -107,7 +110,7 @@ type Requirement struct { // of characters. See validateLabelKey for more details. // // The empty string is a valid value in the input values set. -func NewRequirement(key string, op selection.Operator, vals sets.String) (*Requirement, error) { +func NewRequirement(key string, op selection.Operator, vals []string) (*Requirement, error) { if err := validateLabelKey(key); err != nil { return nil, err } @@ -128,8 +131,8 @@ func NewRequirement(key string, op selection.Operator, vals sets.String) (*Requi if len(vals) != 1 { return nil, fmt.Errorf("for 'Gt', 'Lt' operators, exactly one value is required") } - for val := range vals { - if _, err := strconv.ParseInt(val, 10, 64); err != nil { + for i := range vals { + if _, err := strconv.ParseInt(vals[i], 10, 64); err != nil { return nil, fmt.Errorf("for 'Gt', 'Lt' operators, the value must be an integer") } } @@ -137,14 +140,24 @@ func NewRequirement(key string, op selection.Operator, vals sets.String) (*Requi return nil, fmt.Errorf("operator '%v' is not recognized", op) } - for v := range vals { - if err := validateLabelValue(v); err != nil { + for i := range vals { + if err := validateLabelValue(vals[i]); err != nil { return nil, err } } + sort.Strings(vals) return &Requirement{key: key, operator: op, strValues: vals}, nil } +func (r *Requirement) hasValue(value string) bool { + for i := range r.strValues { + if r.strValues[i] == value { + return true + } + } + return false +} + // Matches returns true if the Requirement matches the input Labels. // There is a match in the following cases: // (1) The operator is Exists and Labels has the Requirement's key. @@ -162,12 +175,12 @@ func (r *Requirement) Matches(ls Labels) bool { if !ls.Has(r.key) { return false } - return r.strValues.Has(ls.Get(r.key)) + return r.hasValue(ls.Get(r.key)) case selection.NotIn, selection.NotEquals: if !ls.Has(r.key) { return true } - return !r.strValues.Has(ls.Get(r.key)) + return !r.hasValue(ls.Get(r.key)) case selection.Exists: return ls.Has(r.key) case selection.DoesNotExist: @@ -189,10 +202,10 @@ func (r *Requirement) Matches(ls Labels) bool { } var rValue int64 - for strValue := range r.strValues { - rValue, err = strconv.ParseInt(strValue, 10, 64) + for i := range r.strValues { + rValue, err = strconv.ParseInt(r.strValues[i], 10, 64) if err != nil { - glog.V(10).Infof("ParseInt failed for value %+v in requirement %#v, for 'Gt', 'Lt' operators, the value must be an integer", strValue, r) + glog.V(10).Infof("ParseInt failed for value %+v in requirement %#v, for 'Gt', 'Lt' operators, the value must be an integer", r.strValues[i], r) return false } } @@ -210,8 +223,8 @@ func (r *Requirement) Operator() selection.Operator { } func (r *Requirement) Values() sets.String { ret := sets.String{} - for k := range r.strValues { - ret.Insert(k) + for i := range r.strValues { + ret.Insert(r.strValues[i]) } return ret } @@ -258,9 +271,9 @@ func (r *Requirement) String() string { buffer.WriteString("(") } if len(r.strValues) == 1 { - buffer.WriteString(r.strValues.List()[0]) + buffer.WriteString(r.strValues[0]) } else { // only > 1 since == 0 prohibited by NewRequirement - buffer.WriteString(strings.Join(r.strValues.List(), ",")) + buffer.WriteString(strings.Join(r.strValues, ",")) } switch r.operator { @@ -561,7 +574,7 @@ func (p *Parser) parseRequirement() (*Requirement, error) { return nil, err } if operator == selection.Exists || operator == selection.DoesNotExist { // operator found lookahead set checked - return NewRequirement(key, operator, nil) + return NewRequirement(key, operator, []string{}) } operator, err = p.parseOperator() if err != nil { @@ -577,7 +590,7 @@ func (p *Parser) parseRequirement() (*Requirement, error) { if err != nil { return nil, err } - return NewRequirement(key, operator, values) + return NewRequirement(key, operator, values.List()) } @@ -715,15 +728,16 @@ func (p *Parser) parseExactValue() (sets.String, error) { // as they parse different selectors with different syntaxes. // The input will cause an error if it does not follow this form: // -// ::= | "," ] -// ::= [!] KEY [ | ] -// ::= "" | -// ::= | -// ::= "notin" -// ::= "in" -// ::= "(" ")" -// ::= VALUE | VALUE "," -// ::= ["="|"=="|"!="] VALUE +// ::= | "," +// ::= [!] KEY [ | ] +// ::= "" | +// ::= | +// ::= "notin" +// ::= "in" +// ::= "(" ")" +// ::= VALUE | VALUE "," +// ::= ["="|"=="|"!="] VALUE +// // KEY is a sequence of one or more characters following [ DNS_SUBDOMAIN "/" ] DNS_LABEL. Max length is 63 characters. // VALUE is a sequence of zero or more characters "([A-Za-z0-9_-\.])". Max length is 63 characters. // Delimiter is white space: (' ', '\t') @@ -779,12 +793,12 @@ func validateLabelValue(v string) error { // SelectorFromSet returns a Selector which will match exactly the given Set. A // nil and empty Sets are considered equivalent to Everything(). func SelectorFromSet(ls Set) Selector { - if ls == nil { + if ls == nil || len(ls) == 0 { return internalSelector{} } var requirements internalSelector for label, value := range ls { - if r, err := NewRequirement(label, selection.Equals, sets.NewString(value)); err != nil { + if r, err := NewRequirement(label, selection.Equals, []string{value}); err != nil { //TODO: double check errors when input comes from serialization? return internalSelector{} } else { @@ -793,23 +807,23 @@ func SelectorFromSet(ls Set) Selector { } // sort to have deterministic string representation sort.Sort(ByKey(requirements)) - return internalSelector(requirements) + return requirements } // SelectorFromValidatedSet returns a Selector which will match exactly the given Set. // A nil and empty Sets are considered equivalent to Everything(). // It assumes that Set is already validated and doesn't do any validation. func SelectorFromValidatedSet(ls Set) Selector { - if ls == nil { + if ls == nil || len(ls) == 0 { return internalSelector{} } var requirements internalSelector for label, value := range ls { - requirements = append(requirements, Requirement{key: label, operator: selection.Equals, strValues: sets.NewString(value)}) + requirements = append(requirements, Requirement{key: label, operator: selection.Equals, strValues: []string{value}}) } // sort to have deterministic string representation sort.Sort(ByKey(requirements)) - return internalSelector(requirements) + return requirements } // ParseToRequirements takes a string representing a selector and returns a list of diff --git a/vendor/k8s.io/client-go/1.5/pkg/genericapiserver/openapi/common/common.go b/vendor/k8s.io/apimachinery/pkg/openapi/common.go similarity index 59% rename from vendor/k8s.io/client-go/1.5/pkg/genericapiserver/openapi/common/common.go rename to vendor/k8s.io/apimachinery/pkg/openapi/common.go index 48c4f9c01..605776ed8 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/genericapiserver/openapi/common/common.go +++ b/vendor/k8s.io/apimachinery/pkg/openapi/common.go @@ -14,9 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -package common +package openapi -import "github.com/go-openapi/spec" +import ( + "github.com/emicklei/go-restful" + "github.com/go-openapi/spec" + "strings" +) // OpenAPIDefinition describes single type. Normally these definitions are auto-generated using gen-openapi. type OpenAPIDefinition struct { @@ -24,8 +28,10 @@ type OpenAPIDefinition struct { Dependencies []string } +type ReferenceCallback func(path string) spec.Ref + // OpenAPIDefinitions is collection of all definitions. -type OpenAPIDefinitions map[string]OpenAPIDefinition +type GetOpenAPIDefinitions func(ReferenceCallback) map[string]OpenAPIDefinition // OpenAPIDefinitionGetter gets openAPI definitions for a given type. If a type implements this interface, // the definition returned by it will be used, otherwise the auto-generated definitions will be used. See @@ -35,6 +41,48 @@ type OpenAPIDefinitionGetter interface { OpenAPIDefinition() *OpenAPIDefinition } +// Config is set of configuration for openAPI spec generation. +type Config struct { + // List of supported protocols such as https, http, etc. + ProtocolList []string + + // Info is general information about the API. + Info *spec.Info + + // DefaultResponse will be used if an operation does not have any responses listed. It + // will show up as ... "responses" : {"default" : $DefaultResponse} in the spec. + DefaultResponse *spec.Response + + // CommonResponses will be added as a response to all operation specs. This is a good place to add common + // responses such as authorization failed. + CommonResponses map[int]spec.Response + + // List of webservice's path prefixes to ignore + IgnorePrefixes []string + + // OpenAPIDefinitions should provide definition for all models used by routes. Failure to provide this map + // or any of the models will result in spec generation failure. + GetDefinitions GetOpenAPIDefinitions + + // GetOperationIDAndTags returns operation id and tags for a restful route. It is an optional function to customize operation IDs. + GetOperationIDAndTags func(servePath string, r *restful.Route) (string, []string, error) + + // GetDefinitionName returns a friendly name for a definition base on the serving path. parameter `name` is the full name of the definition. + // It is an optional function to customize model names. + GetDefinitionName func(servePath string, name string) (string, spec.Extensions) + + // PostProcessSpec runs after the spec is ready to serve. It allows a final modification to the spec before serving. + PostProcessSpec func(*spec.Swagger) (*spec.Swagger, error) + + // SecurityDefinitions is list of all security definitions for OpenAPI service. If this is not nil, the user of config + // is responsible to provide DefaultSecurity and (maybe) add unauthorized response to CommonResponses. + SecurityDefinitions *spec.SecurityDefinitions + + // DefaultSecurity for all operations. This will pass as spec.SwaggerProps.Security to OpenAPI. + // For most cases, this will be list of acceptable definitions in SecurityDefinitions. + DefaultSecurity []map[string][]string +} + // This function is a reference for converting go (or any custom type) to a simple open API type,format pair. There are // two ways to customize spec for a type. If you add it here, a type will be converted to a simple type and the type // comment (the comment that is added before type definition) will be lost. The spec will still have the property @@ -103,3 +151,10 @@ func GetOpenAPITypeFormat(typeName string) (string, string) { } return mapped[0], mapped[1] } + +func EscapeJsonPointer(p string) string { + // Escaping reference name using rfc6901 + p = strings.Replace(p, "~", "~0", -1) + p = strings.Replace(p, "/", "~1", -1) + return p +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/doc.go b/vendor/k8s.io/apimachinery/pkg/openapi/doc.go similarity index 83% rename from vendor/k8s.io/client-go/1.5/pkg/apis/apps/doc.go rename to vendor/k8s.io/apimachinery/pkg/openapi/doc.go index 23aa5a09b..5ed572cc1 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/openapi/doc.go @@ -14,7 +14,5 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register -// +k8s:openapi-gen=true - -package apps +// package openapi holds shared codes and types between open API code generator and spec generator. +package openapi diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/OWNERS b/vendor/k8s.io/apimachinery/pkg/runtime/OWNERS new file mode 100644 index 000000000..a49419f70 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/OWNERS @@ -0,0 +1,19 @@ +approvers: +- caesarxuchao +- deads2k +- lavalamp +- smarterclayton +reviewers: +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- derekwaynecarr +- caesarxuchao +- mikedanese +- nikhiljindal +- gmarek +- krousey +- timothysc +- piosz +- mbohlool diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/codec.go b/vendor/k8s.io/apimachinery/pkg/runtime/codec.go similarity index 67% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/codec.go rename to vendor/k8s.io/apimachinery/pkg/runtime/codec.go index 10ea163a1..d9748f066 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/codec.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/codec.go @@ -24,8 +24,8 @@ import ( "net/url" "reflect" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/conversion/queryparams" + "k8s.io/apimachinery/pkg/conversion/queryparams" + "k8s.io/apimachinery/pkg/runtime/schema" ) // codec binds an encoder and decoder. @@ -76,9 +76,27 @@ func EncodeOrDie(e Encoder, obj Object) string { return string(bytes) } +// DefaultingSerializer invokes defaulting after decoding. +type DefaultingSerializer struct { + Defaulter ObjectDefaulter + Decoder Decoder + // Encoder is optional to allow this type to be used as both a Decoder and an Encoder + Encoder +} + +// Decode performs a decode and then allows the defaulter to act on the provided object. +func (d DefaultingSerializer) Decode(data []byte, defaultGVK *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) { + obj, gvk, err := d.Decoder.Decode(data, defaultGVK, into) + if err != nil { + return obj, gvk, err + } + d.Defaulter.Default(obj) + return obj, gvk, nil +} + // UseOrCreateObject returns obj if the canonical ObjectKind returned by the provided typer matches gvk, or // invokes the ObjectCreator to instantiate a new gvk. Returns an error if the typer cannot find the object. -func UseOrCreateObject(t ObjectTyper, c ObjectCreater, gvk unversioned.GroupVersionKind, obj Object) (Object, error) { +func UseOrCreateObject(t ObjectTyper, c ObjectCreater, gvk schema.GroupVersionKind, obj Object) (Object, error) { if obj != nil { kinds, _, err := t.ObjectKinds(obj) if err != nil { @@ -111,7 +129,7 @@ type NoopDecoder struct { var _ Serializer = NoopDecoder{} -func (n NoopDecoder) Decode(data []byte, gvk *unversioned.GroupVersionKind, into Object) (Object, *unversioned.GroupVersionKind, error) { +func (n NoopDecoder) Decode(data []byte, gvk *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) { return nil, nil, fmt.Errorf("decoding is not allowed for this codec: %v", reflect.TypeOf(n.Encoder)) } @@ -135,7 +153,7 @@ var _ ParameterCodec = ¶meterCodec{} // DecodeParameters converts the provided url.Values into an object of type From with the kind of into, and then // converts that object to into (if necessary). Returns an error if the operation cannot be completed. -func (c *parameterCodec) DecodeParameters(parameters url.Values, from unversioned.GroupVersion, into Object) error { +func (c *parameterCodec) DecodeParameters(parameters url.Values, from schema.GroupVersion, into Object) error { if len(parameters) == 0 { return nil } @@ -143,11 +161,12 @@ func (c *parameterCodec) DecodeParameters(parameters url.Values, from unversione if err != nil { return err } - targetGVK := targetGVKs[0] - if targetGVK.GroupVersion() == from { - return c.convertor.Convert(¶meters, into, nil) + for i := range targetGVKs { + if targetGVKs[i].GroupVersion() == from { + return c.convertor.Convert(¶meters, into, nil) + } } - input, err := c.creator.New(from.WithKind(targetGVK.Kind)) + input, err := c.creator.New(from.WithKind(targetGVKs[0].Kind)) if err != nil { return err } @@ -159,7 +178,7 @@ func (c *parameterCodec) DecodeParameters(parameters url.Values, from unversione // EncodeParameters converts the provided object into the to version, then converts that object to url.Values. // Returns an error if conversion is not possible. -func (c *parameterCodec) EncodeParameters(obj Object, to unversioned.GroupVersion) (url.Values, error) { +func (c *parameterCodec) EncodeParameters(obj Object, to schema.GroupVersion) (url.Values, error) { gvks, _, err := c.typer.ObjectKinds(obj) if err != nil { return nil, err @@ -176,27 +195,44 @@ func (c *parameterCodec) EncodeParameters(obj Object, to unversioned.GroupVersio } type base64Serializer struct { - Serializer + Encoder + Decoder } -func NewBase64Serializer(s Serializer) Serializer { - return &base64Serializer{s} +func NewBase64Serializer(e Encoder, d Decoder) Serializer { + return &base64Serializer{e, d} } func (s base64Serializer) Encode(obj Object, stream io.Writer) error { e := base64.NewEncoder(base64.StdEncoding, stream) - err := s.Serializer.Encode(obj, e) + err := s.Encoder.Encode(obj, e) e.Close() return err } -func (s base64Serializer) Decode(data []byte, defaults *unversioned.GroupVersionKind, into Object) (Object, *unversioned.GroupVersionKind, error) { +func (s base64Serializer) Decode(data []byte, defaults *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) { out := make([]byte, base64.StdEncoding.DecodedLen(len(data))) n, err := base64.StdEncoding.Decode(out, data) if err != nil { return nil, nil, err } - return s.Serializer.Decode(out[:n], defaults, into) + return s.Decoder.Decode(out[:n], defaults, into) +} + +// SerializerInfoForMediaType returns the first info in types that has a matching media type (which cannot +// include media-type parameters), or the first info with an empty media type, or false if no type matches. +func SerializerInfoForMediaType(types []SerializerInfo, mediaType string) (SerializerInfo, bool) { + for _, info := range types { + if info.MediaType == mediaType { + return info, true + } + } + for _, info := range types { + if len(info.MediaType) == 0 { + return info, true + } + } + return SerializerInfo{}, false } var ( @@ -209,30 +245,30 @@ var ( type internalGroupVersioner struct{} // KindForGroupVersionKinds returns an internal Kind if one is found, or converts the first provided kind to the internal version. -func (internalGroupVersioner) KindForGroupVersionKinds(kinds []unversioned.GroupVersionKind) (unversioned.GroupVersionKind, bool) { +func (internalGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { for _, kind := range kinds { if kind.Version == APIVersionInternal { return kind, true } } for _, kind := range kinds { - return unversioned.GroupVersionKind{Group: kind.Group, Version: APIVersionInternal, Kind: kind.Kind}, true + return schema.GroupVersionKind{Group: kind.Group, Version: APIVersionInternal, Kind: kind.Kind}, true } - return unversioned.GroupVersionKind{}, false + return schema.GroupVersionKind{}, false } type disabledGroupVersioner struct{} // KindForGroupVersionKinds returns false for any input. -func (disabledGroupVersioner) KindForGroupVersionKinds(kinds []unversioned.GroupVersionKind) (unversioned.GroupVersionKind, bool) { - return unversioned.GroupVersionKind{}, false +func (disabledGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { + return schema.GroupVersionKind{}, false } // GroupVersioners implements GroupVersioner and resolves to the first exact match for any kind. type GroupVersioners []GroupVersioner // KindForGroupVersionKinds returns the first match of any of the group versioners, or false if no match occured. -func (gvs GroupVersioners) KindForGroupVersionKinds(kinds []unversioned.GroupVersionKind) (unversioned.GroupVersionKind, bool) { +func (gvs GroupVersioners) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { for _, gv := range gvs { target, ok := gv.KindForGroupVersionKinds(kinds) if !ok { @@ -240,22 +276,22 @@ func (gvs GroupVersioners) KindForGroupVersionKinds(kinds []unversioned.GroupVer } return target, true } - return unversioned.GroupVersionKind{}, false + return schema.GroupVersionKind{}, false } -// Assert that unversioned.GroupVersion and GroupVersions implement GroupVersioner -var _ GroupVersioner = unversioned.GroupVersion{} -var _ GroupVersioner = unversioned.GroupVersions{} +// Assert that schema.GroupVersion and GroupVersions implement GroupVersioner +var _ GroupVersioner = schema.GroupVersion{} +var _ GroupVersioner = schema.GroupVersions{} var _ GroupVersioner = multiGroupVersioner{} type multiGroupVersioner struct { - target unversioned.GroupVersion - acceptedGroupKinds []unversioned.GroupKind + target schema.GroupVersion + acceptedGroupKinds []schema.GroupKind } // NewMultiGroupVersioner returns the provided group version for any kind that matches one of the provided group kinds. // Kind may be empty in the provided group kind, in which case any kind will match. -func NewMultiGroupVersioner(gv unversioned.GroupVersion, groupKinds ...unversioned.GroupKind) GroupVersioner { +func NewMultiGroupVersioner(gv schema.GroupVersion, groupKinds ...schema.GroupKind) GroupVersioner { if len(groupKinds) == 0 || (len(groupKinds) == 1 && groupKinds[0].Group == gv.Group) { return gv } @@ -264,7 +300,7 @@ func NewMultiGroupVersioner(gv unversioned.GroupVersion, groupKinds ...unversion // KindForGroupVersionKinds returns the target group version if any kind matches any of the original group kinds. It will // use the originating kind where possible. -func (v multiGroupVersioner) KindForGroupVersionKinds(kinds []unversioned.GroupVersionKind) (unversioned.GroupVersionKind, bool) { +func (v multiGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { for _, src := range kinds { for _, kind := range v.acceptedGroupKinds { if kind.Group != src.Group { @@ -276,5 +312,5 @@ func (v multiGroupVersioner) KindForGroupVersionKinds(kinds []unversioned.GroupV return v.target.WithKind(src.Kind), true } } - return unversioned.GroupVersionKind{}, false + return schema.GroupVersionKind{}, false } diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/codec_check.go b/vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go similarity index 91% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/codec_check.go rename to vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go index 1f9755e92..1d34ec1a8 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/codec_check.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go @@ -20,14 +20,14 @@ import ( "fmt" "reflect" - "k8s.io/client-go/1.5/pkg/api/unversioned" + "k8s.io/apimachinery/pkg/runtime/schema" ) // CheckCodec makes sure that the codec can encode objects like internalType, // decode all of the external types listed, and also decode them into the given // object. (Will modify internalObject.) (Assumes JSON serialization.) // TODO: verify that the correct external version is chosen on encode... -func CheckCodec(c Codec, internalType Object, externalTypes ...unversioned.GroupVersionKind) error { +func CheckCodec(c Codec, internalType Object, externalTypes ...schema.GroupVersionKind) error { _, err := Encode(c, internalType) if err != nil { return fmt.Errorf("Internal type not encodable: %v", err) diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/conversion.go b/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go similarity index 98% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/conversion.go rename to vendor/k8s.io/apimachinery/pkg/runtime/conversion.go index 822304db2..8eedffc9c 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/conversion.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go @@ -23,7 +23,7 @@ import ( "strconv" "strings" - "k8s.io/client-go/1.5/pkg/conversion" + "k8s.io/apimachinery/pkg/conversion" ) // JSONKeyMapper uses the struct tags on a conversion to determine the key value for diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/doc.go b/vendor/k8s.io/apimachinery/pkg/runtime/doc.go similarity index 97% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/doc.go rename to vendor/k8s.io/apimachinery/pkg/runtime/doc.go index a9d084d9f..06b45df66 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/doc.go @@ -42,4 +42,4 @@ limitations under the License. // As a bonus, a few common types useful from all api objects and versions // are provided in types.go. -package runtime +package runtime // import "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/embedded.go b/vendor/k8s.io/apimachinery/pkg/runtime/embedded.go similarity index 89% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/embedded.go rename to vendor/k8s.io/apimachinery/pkg/runtime/embedded.go index 7184a7d34..e8825a787 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/embedded.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/embedded.go @@ -19,21 +19,21 @@ package runtime import ( "errors" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/conversion" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime/schema" ) type encodable struct { E Encoder `json:"-"` obj Object - versions []unversioned.GroupVersion + versions []schema.GroupVersion } -func (e encodable) GetObjectKind() unversioned.ObjectKind { return e.obj.GetObjectKind() } +func (e encodable) GetObjectKind() schema.ObjectKind { return e.obj.GetObjectKind() } // NewEncodable creates an object that will be encoded with the provided codec on demand. // Provided as a convenience for test cases dealing with internal objects. -func NewEncodable(e Encoder, obj Object, versions ...unversioned.GroupVersion) Object { +func NewEncodable(e Encoder, obj Object, versions ...schema.GroupVersion) Object { if _, ok := obj.(*Unknown); ok { return obj } @@ -52,7 +52,7 @@ func (re encodable) MarshalJSON() ([]byte, error) { // NewEncodableList creates an object that will be encoded with the provided codec on demand. // Provided as a convenience for test cases dealing with internal objects. -func NewEncodableList(e Encoder, objects []Object, versions ...unversioned.GroupVersion) []Object { +func NewEncodableList(e Encoder, objects []Object, versions ...schema.GroupVersion) []Object { out := make([]Object, len(objects)) for i := range objects { if _, ok := objects[i].(*Unknown); ok { diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/error.go b/vendor/k8s.io/apimachinery/pkg/runtime/error.go similarity index 93% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/error.go rename to vendor/k8s.io/apimachinery/pkg/runtime/error.go index 098e5bcf2..c9a0e1696 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/error.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/error.go @@ -20,16 +20,16 @@ import ( "fmt" "reflect" - "k8s.io/client-go/1.5/pkg/api/unversioned" + "k8s.io/apimachinery/pkg/runtime/schema" ) type notRegisteredErr struct { - gvk unversioned.GroupVersionKind + gvk schema.GroupVersionKind t reflect.Type } // NewNotRegisteredErr is exposed for testing. -func NewNotRegisteredErr(gvk unversioned.GroupVersionKind, t reflect.Type) error { +func NewNotRegisteredErr(gvk schema.GroupVersionKind, t reflect.Type) error { return ¬RegisteredErr{gvk: gvk, t: t} } diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/extension.go b/vendor/k8s.io/apimachinery/pkg/runtime/extension.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/extension.go rename to vendor/k8s.io/apimachinery/pkg/runtime/extension.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go similarity index 85% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/generated.pb.go rename to vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go index bdf9aa92b..9947bd8e1 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,14 +15,14 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/pkg/runtime/generated.proto +// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto // DO NOT EDIT! /* Package runtime is a generated protocol buffer package. It is generated from these files: - k8s.io/kubernetes/pkg/runtime/generated.proto + k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto It has these top-level messages: RawExtension @@ -62,9 +62,9 @@ func (*Unknown) ProtoMessage() {} func (*Unknown) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } func init() { - proto.RegisterType((*RawExtension)(nil), "k8s.io.client-go.1.5.pkg.runtime.RawExtension") - proto.RegisterType((*TypeMeta)(nil), "k8s.io.client-go.1.5.pkg.runtime.TypeMeta") - proto.RegisterType((*Unknown)(nil), "k8s.io.client-go.1.5.pkg.runtime.Unknown") + proto.RegisterType((*RawExtension)(nil), "k8s.io.apimachinery.pkg.runtime.RawExtension") + proto.RegisterType((*TypeMeta)(nil), "k8s.io.apimachinery.pkg.runtime.TypeMeta") + proto.RegisterType((*Unknown)(nil), "k8s.io.apimachinery.pkg.runtime.Unknown") } func (m *RawExtension) Marshal() (data []byte, err error) { size := m.Size() @@ -738,29 +738,30 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 380 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x90, 0xcf, 0x4e, 0x2a, 0x31, - 0x14, 0xc6, 0x19, 0x20, 0x81, 0x5b, 0x48, 0xb8, 0xe9, 0x5d, 0xdc, 0x91, 0x44, 0x20, 0x6c, 0x94, - 0x05, 0x6d, 0x24, 0x31, 0x71, 0xcb, 0x10, 0x16, 0xc6, 0x98, 0x98, 0x89, 0xb8, 0x70, 0xe5, 0x30, - 0xd4, 0xb1, 0x19, 0x69, 0x27, 0x9d, 0x4e, 0xd0, 0x9d, 0x8f, 0xe0, 0x63, 0xb1, 0x64, 0xe9, 0x8a, - 0x28, 0x3e, 0x83, 0x7b, 0x4b, 0x29, 0x7f, 0x04, 0xe2, 0xe2, 0x24, 0x33, 0xe7, 0xfc, 0xbe, 0xef, - 0x7c, 0xa7, 0xa0, 0x19, 0x9e, 0xc5, 0x88, 0x72, 0x1c, 0x26, 0x7d, 0x22, 0x18, 0x91, 0x24, 0xc6, - 0x51, 0x18, 0x60, 0x91, 0x30, 0x49, 0x87, 0x04, 0x07, 0x84, 0x11, 0xe1, 0x49, 0x32, 0x40, 0x91, - 0xe0, 0x92, 0xc3, 0xc3, 0x05, 0x8e, 0xd6, 0x38, 0x52, 0x38, 0x32, 0x78, 0xb9, 0x19, 0x50, 0xf9, - 0x90, 0xf4, 0x91, 0xcf, 0x87, 0x38, 0xe0, 0x01, 0xc7, 0x5a, 0xd5, 0x4f, 0xee, 0xf5, 0x9f, 0xfe, - 0xd1, 0x5f, 0x0b, 0xb7, 0x72, 0x6b, 0xff, 0x72, 0x2f, 0xa2, 0x58, 0x90, 0x98, 0x27, 0xc2, 0xdf, - 0x49, 0x50, 0x3e, 0xd9, 0xaf, 0x49, 0x24, 0x7d, 0xc4, 0x94, 0xc9, 0x58, 0x8a, 0x6d, 0x49, 0xbd, - 0x01, 0x8a, 0xae, 0x37, 0xea, 0x3e, 0x49, 0xc2, 0x62, 0xca, 0x19, 0x3c, 0x00, 0x19, 0xe1, 0x8d, - 0x6c, 0xab, 0x66, 0x1d, 0x17, 0x9d, 0xdc, 0x6c, 0x5a, 0xcd, 0xa8, 0xb1, 0x3b, 0xef, 0xd5, 0xef, - 0x40, 0xfe, 0xfa, 0x39, 0x22, 0x97, 0x44, 0x7a, 0xb0, 0x05, 0x80, 0x4a, 0x72, 0x43, 0xc4, 0x5c, - 0xa4, 0xe9, 0x3f, 0x0e, 0x1c, 0x4f, 0xab, 0x29, 0xa5, 0x00, 0xed, 0xab, 0x73, 0x33, 0x71, 0x37, - 0x28, 0x58, 0x03, 0xd9, 0x90, 0xb2, 0x81, 0x9d, 0xd6, 0x74, 0xd1, 0xd0, 0xd9, 0x0b, 0xd5, 0x73, - 0xf5, 0xa4, 0xfe, 0x65, 0x81, 0x5c, 0x8f, 0x85, 0x8c, 0x8f, 0x18, 0xec, 0x81, 0xbc, 0x34, 0xdb, - 0xb4, 0x7f, 0xa1, 0x75, 0x84, 0x7e, 0x7d, 0x60, 0xb4, 0x0c, 0xe7, 0xfc, 0x35, 0xd6, 0xab, 0xb8, - 0xee, 0xca, 0x6a, 0x79, 0x5f, 0x7a, 0xf7, 0x3e, 0xd8, 0x06, 0x25, 0x9f, 0x33, 0xf5, 0x10, 0xb2, - 0xcb, 0x7c, 0x3e, 0xa0, 0x2c, 0xb0, 0x33, 0x3a, 0xea, 0x7f, 0xe3, 0x57, 0xea, 0xfc, 0x1c, 0xbb, - 0xdb, 0x3c, 0x3c, 0x05, 0x05, 0xd3, 0x9a, 0xaf, 0xb6, 0xb3, 0x5a, 0xfe, 0xcf, 0xc8, 0x0b, 0x9d, - 0xf5, 0xc8, 0xdd, 0xe4, 0x9c, 0xc6, 0xf8, 0xa3, 0x92, 0x9a, 0xa8, 0x7a, 0x53, 0xf5, 0x32, 0xab, - 0x58, 0x63, 0x55, 0x13, 0x55, 0xef, 0xaa, 0x5e, 0x3f, 0x2b, 0xa9, 0xdb, 0x9c, 0x39, 0xf2, 0x3b, - 0x00, 0x00, 0xff, 0xff, 0x32, 0xc1, 0x73, 0x2d, 0x94, 0x02, 0x00, 0x00, + // 391 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x90, 0x4f, 0x8b, 0xd3, 0x40, + 0x18, 0xc6, 0x93, 0x6d, 0xa1, 0xeb, 0xb4, 0xb0, 0x32, 0x1e, 0x8c, 0x7b, 0x98, 0x2c, 0x3d, 0xd9, + 0x83, 0x33, 0xb0, 0x22, 0x78, 0xdd, 0x94, 0x82, 0x22, 0x82, 0x0c, 0xfe, 0x01, 0x4f, 0x4e, 0x93, + 0x31, 0x1d, 0x62, 0xdf, 0x09, 0x93, 0x89, 0xb1, 0x37, 0x3f, 0x82, 0x1f, 0xab, 0xc7, 0x1e, 0x3d, + 0x15, 0x1b, 0x3f, 0x84, 0x57, 0xe9, 0x74, 0x5a, 0x6b, 0x45, 0xf6, 0x96, 0x79, 0x9f, 0xe7, 0xf7, + 0xbc, 0xcf, 0x1b, 0xf4, 0xac, 0x78, 0x5a, 0x51, 0xa5, 0x59, 0x51, 0x4f, 0xa5, 0x01, 0x69, 0x65, + 0xc5, 0x3e, 0x4b, 0xc8, 0xb4, 0x61, 0x5e, 0x10, 0xa5, 0x9a, 0x8b, 0x74, 0xa6, 0x40, 0x9a, 0x05, + 0x2b, 0x8b, 0x9c, 0x99, 0x1a, 0xac, 0x9a, 0x4b, 0x96, 0x4b, 0x90, 0x46, 0x58, 0x99, 0xd1, 0xd2, + 0x68, 0xab, 0x71, 0xbc, 0x03, 0xe8, 0x31, 0x40, 0xcb, 0x22, 0xa7, 0x1e, 0xb8, 0x7c, 0x94, 0x2b, + 0x3b, 0xab, 0xa7, 0x34, 0xd5, 0x73, 0x96, 0xeb, 0x5c, 0x33, 0xc7, 0x4d, 0xeb, 0x8f, 0xee, 0xe5, + 0x1e, 0xee, 0x6b, 0x97, 0x77, 0xf9, 0xf8, 0x7f, 0x05, 0x6a, 0xab, 0x3e, 0x31, 0x05, 0xb6, 0xb2, + 0xe6, 0xb4, 0xc4, 0x70, 0x84, 0x06, 0x5c, 0x34, 0x93, 0x2f, 0x56, 0x42, 0xa5, 0x34, 0xe0, 0x07, + 0xa8, 0x63, 0x44, 0x13, 0x85, 0x57, 0xe1, 0xc3, 0x41, 0xd2, 0x6b, 0xd7, 0x71, 0x87, 0x8b, 0x86, + 0x6f, 0x67, 0xc3, 0x0f, 0xe8, 0xfc, 0xf5, 0xa2, 0x94, 0x2f, 0xa5, 0x15, 0xf8, 0x1a, 0x21, 0x51, + 0xaa, 0xb7, 0xd2, 0x6c, 0x21, 0xe7, 0xbe, 0x93, 0xe0, 0xe5, 0x3a, 0x0e, 0xda, 0x75, 0x8c, 0x6e, + 0x5e, 0x3d, 0xf7, 0x0a, 0x3f, 0x72, 0xe1, 0x2b, 0xd4, 0x2d, 0x14, 0x64, 0xd1, 0x99, 0x73, 0x0f, + 0xbc, 0xbb, 0xfb, 0x42, 0x41, 0xc6, 0x9d, 0x32, 0xfc, 0x15, 0xa2, 0xde, 0x1b, 0x28, 0x40, 0x37, + 0x80, 0xdf, 0xa1, 0x73, 0xeb, 0xb7, 0xb9, 0xfc, 0xfe, 0xf5, 0x88, 0xde, 0xf2, 0xc3, 0xe8, 0xbe, + 0x5e, 0x72, 0xd7, 0x87, 0x1f, 0x0a, 0xf3, 0x43, 0xd8, 0xfe, 0xc2, 0xb3, 0x7f, 0x2f, 0xc4, 0x37, + 0xe8, 0x22, 0xd5, 0x60, 0x25, 0xd8, 0x09, 0xa4, 0x3a, 0x53, 0x90, 0x47, 0x1d, 0x57, 0xf6, 0xbe, + 0xcf, 0xbb, 0x18, 0xff, 0x2d, 0xf3, 0x53, 0x3f, 0x7e, 0x82, 0xfa, 0x7e, 0xb4, 0x5d, 0x1d, 0x75, + 0x1d, 0x7e, 0xcf, 0xe3, 0xfd, 0xf1, 0x1f, 0x89, 0x1f, 0xfb, 0x92, 0xd1, 0x72, 0x43, 0x82, 0xd5, + 0x86, 0x04, 0xdf, 0x37, 0x24, 0xf8, 0xda, 0x92, 0x70, 0xd9, 0x92, 0x70, 0xd5, 0x92, 0xf0, 0x47, + 0x4b, 0xc2, 0x6f, 0x3f, 0x49, 0xf0, 0xbe, 0xe7, 0x8f, 0xfc, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x5d, + 0x24, 0xc6, 0x1a, 0x81, 0x02, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/generated.proto b/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto similarity index 91% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/generated.proto rename to vendor/k8s.io/apimachinery/pkg/runtime/generated.proto index 17951fd30..57fc84078 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -19,10 +19,9 @@ limitations under the License. syntax = 'proto2'; -package k8s.io.kubernetes.pkg.runtime; +package k8s.io.apimachinery.pkg.runtime; -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "runtime"; @@ -85,7 +84,7 @@ message RawExtension { // runtime.TypeMeta `json:",inline"` // ... // other fields // } -// func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *unversioned.GroupVersionKind) { unversioned.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind +// func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind // // TypeMeta is provided here for convenience. You may use it directly from this package or define // your own with the same fields. @@ -94,8 +93,10 @@ message RawExtension { // +protobuf=true // +k8s:openapi-gen=true message TypeMeta { + // +optional optional string apiVersion = 1; + // +optional optional string kind = 2; } diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/helper.go b/vendor/k8s.io/apimachinery/pkg/runtime/helper.go similarity index 95% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/helper.go rename to vendor/k8s.io/apimachinery/pkg/runtime/helper.go index 3c2c68325..a6c1a8d34 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/helper.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/helper.go @@ -21,9 +21,9 @@ import ( "io" "reflect" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/conversion" - "k8s.io/client-go/1.5/pkg/util/errors" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/errors" ) // unsafeObjectConvertor implements ObjectConvertor using the unsafe conversion path. @@ -173,7 +173,7 @@ type MultiObjectTyper []ObjectTyper var _ ObjectTyper = MultiObjectTyper{} -func (m MultiObjectTyper) ObjectKinds(obj Object) (gvks []unversioned.GroupVersionKind, unversionedType bool, err error) { +func (m MultiObjectTyper) ObjectKinds(obj Object) (gvks []schema.GroupVersionKind, unversionedType bool, err error) { for _, t := range m { gvks, unversionedType, err = t.ObjectKinds(obj) if err == nil { @@ -183,7 +183,7 @@ func (m MultiObjectTyper) ObjectKinds(obj Object) (gvks []unversioned.GroupVersi return } -func (m MultiObjectTyper) Recognizes(gvk unversioned.GroupVersionKind) bool { +func (m MultiObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool { for _, t := range m { if t.Recognizes(gvk) { return true diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/interfaces.go b/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go similarity index 80% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/interfaces.go rename to vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go index caed60a2b..fcb18ba11 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/interfaces.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go @@ -20,7 +20,7 @@ import ( "io" "net/url" - "k8s.io/client-go/1.5/pkg/api/unversioned" + "k8s.io/apimachinery/pkg/runtime/schema" ) const ( @@ -36,7 +36,7 @@ type GroupVersioner interface { // target is known. In general, if the return target is not in the input list, the caller is expected to invoke // Scheme.New(target) and then perform a conversion between the current Go type and the destination Go type. // Sophisticated implementations may use additional information about the input kinds to pick a destination kind. - KindForGroupVersionKinds(kinds []unversioned.GroupVersionKind) (target unversioned.GroupVersionKind, ok bool) + KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (target schema.GroupVersionKind, ok bool) } // Encoders write objects to a serialized form @@ -55,7 +55,7 @@ type Decoder interface { // guaranteed to be populated. The returned object is not guaranteed to match into. If defaults are // provided, they are applied to the data by default. If no defaults or partial defaults are provided, the // type of the into may be used to guide conversion decisions. - Decode(data []byte, defaults *unversioned.GroupVersionKind, into Object) (Object, *unversioned.GroupVersionKind, error) + Decode(data []byte, defaults *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) } // Serializer is the core interface for transforming objects into a serialized format and back. @@ -76,9 +76,9 @@ type Codec Serializer type ParameterCodec interface { // DecodeParameters takes the given url.Values in the specified group version and decodes them // into the provided object, or returns an error. - DecodeParameters(parameters url.Values, from unversioned.GroupVersion, into Object) error + DecodeParameters(parameters url.Values, from schema.GroupVersion, into Object) error // EncodeParameters encodes the provided object as query parameters or returns an error. - EncodeParameters(obj Object, to unversioned.GroupVersion) (url.Values, error) + EncodeParameters(obj Object, to schema.GroupVersion) (url.Values, error) } // Framer is a factory for creating readers and writers that obey a particular framing pattern. @@ -89,20 +89,28 @@ type Framer interface { // SerializerInfo contains information about a specific serialization format type SerializerInfo struct { - Serializer - // EncodesAsText indicates this serializer can be encoded to UTF-8 safely. - EncodesAsText bool // MediaType is the value that represents this serializer over the wire. MediaType string + // EncodesAsText indicates this serializer can be encoded to UTF-8 safely. + EncodesAsText bool + // Serializer is the individual object serializer for this media type. + Serializer Serializer + // PrettySerializer, if set, can serialize this object in a form biased towards + // readability. + PrettySerializer Serializer + // StreamSerializer, if set, describes the streaming serialization format + // for this media type. + StreamSerializer *StreamSerializerInfo } // StreamSerializerInfo contains information about a specific stream serialization format type StreamSerializerInfo struct { - SerializerInfo + // EncodesAsText indicates this serializer can be encoded to UTF-8 safely. + EncodesAsText bool + // Serializer is the top level object serializer for this type when streaming + Serializer // Framer is the factory for retrieving streams that separate objects on the wire Framer - // Embedded is the type of the nested serialization that should be used. - Embedded SerializerInfo } // NegotiatedSerializer is an interface used for obtaining encoders, decoders, and serializers @@ -110,21 +118,7 @@ type StreamSerializerInfo struct { // that performs HTTP content negotiation to accept multiple formats. type NegotiatedSerializer interface { // SupportedMediaTypes is the media types supported for reading and writing single objects. - SupportedMediaTypes() []string - // SerializerForMediaType returns a serializer for the provided media type. params is the set of - // parameters applied to the media type that may modify the resulting output. ok will be false - // if no serializer matched the media type. - SerializerForMediaType(mediaType string, params map[string]string) (s SerializerInfo, ok bool) - - // SupportedStreamingMediaTypes returns the media types of the supported streaming serializers. - // Streaming serializers control how multiple objects are written to a stream output. - SupportedStreamingMediaTypes() []string - // StreamingSerializerForMediaType returns a serializer for the provided media type that supports - // reading and writing multiple objects to a stream. It returns a framer and serializer, or an - // error if no such serializer can be created. Params is the set of parameters applied to the - // media type that may modify the resulting output. ok will be false if no serializer matched - // the media type. - StreamingSerializerForMediaType(mediaType string, params map[string]string) (s StreamSerializerInfo, ok bool) + SupportedMediaTypes() []SerializerInfo // EncoderForVersion returns an encoder that ensures objects being written to the provided // serializer are in the provided group version. @@ -138,9 +132,8 @@ type NegotiatedSerializer interface { // that can read and write data at rest. This would commonly be used by client tools that must // read files, or server side storage interfaces that persist restful objects. type StorageSerializer interface { - // SerializerForMediaType returns a serializer for the provided media type. Options is a set of - // parameters applied to the media type that may modify the resulting output. - SerializerForMediaType(mediaType string, options map[string]string) (SerializerInfo, bool) + // SupportedMediaTypes are the media types supported for reading and writing objects. + SupportedMediaTypes() []SerializerInfo // UniversalDeserializer returns a Serializer that can read objects in multiple supported formats // by introspecting the data at rest. @@ -169,6 +162,12 @@ type NestedObjectDecoder interface { /////////////////////////////////////////////////////////////////////////////// // Non-codec interfaces +type ObjectDefaulter interface { + // Default takes an object (must be a pointer) and applies any default values. + // Defaulters may not error. + Default(in Object) +} + type ObjectVersioner interface { ConvertToVersion(in Object, gv GroupVersioner) (out Object, err error) } @@ -192,16 +191,16 @@ type ObjectTyper interface { // ObjectKinds returns the all possible group,version,kind of the provided object, true if // the object is unversioned, or an error if the object is not recognized // (IsNotRegisteredError will return true). - ObjectKinds(Object) ([]unversioned.GroupVersionKind, bool, error) + ObjectKinds(Object) ([]schema.GroupVersionKind, bool, error) // Recognizes returns true if the scheme is able to handle the provided version and kind, // or more precisely that the provided version is a possible conversion or decoding // target. - Recognizes(gvk unversioned.GroupVersionKind) bool + Recognizes(gvk schema.GroupVersionKind) bool } // ObjectCreater contains methods for instantiating an object by kind and version. type ObjectCreater interface { - New(kind unversioned.GroupVersionKind) (out Object, err error) + New(kind schema.GroupVersionKind) (out Object, err error) } // ObjectCopier duplicates an object. @@ -234,5 +233,19 @@ type SelfLinker interface { // serializers to set the kind, version, and group the object is represented as. An Object may choose // to return a no-op ObjectKindAccessor in cases where it is not expected to be serialized. type Object interface { - GetObjectKind() unversioned.ObjectKind + GetObjectKind() schema.ObjectKind +} + +// Unstructured objects store values as map[string]interface{}, with only values that can be serialized +// to JSON allowed. +type Unstructured interface { + // IsUnstructuredObject is a marker interface to allow objects that can be serialized but not introspected + // to bypass conversion. + IsUnstructuredObject() + // IsList returns true if this type is a list or matches the list convention - has an array called "items". + IsList() bool + // UnstructuredContent returns a non-nil, mutable map of the contents of this object. Values may be + // []interface{}, map[string]interface{}, or any primitive type. Contents are typically serialized to + // and from JSON. + UnstructuredContent() map[string]interface{} } diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/register.go b/vendor/k8s.io/apimachinery/pkg/runtime/register.go similarity index 73% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/register.go rename to vendor/k8s.io/apimachinery/pkg/runtime/register.go index 7515b795e..2ec6db820 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/register.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/register.go @@ -16,32 +16,27 @@ limitations under the License. package runtime -import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" -) +import "k8s.io/apimachinery/pkg/runtime/schema" // SetGroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta -func (obj *TypeMeta) SetGroupVersionKind(gvk unversioned.GroupVersionKind) { +func (obj *TypeMeta) SetGroupVersionKind(gvk schema.GroupVersionKind) { obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() } // GroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta -func (obj *TypeMeta) GroupVersionKind() unversioned.GroupVersionKind { - return unversioned.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) +func (obj *TypeMeta) GroupVersionKind() schema.GroupVersionKind { + return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) } -func (obj *Unknown) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } - -func (obj *Unstructured) GetObjectKind() unversioned.ObjectKind { return obj } -func (obj *UnstructuredList) GetObjectKind() unversioned.ObjectKind { return obj } +func (obj *Unknown) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } // GetObjectKind implements Object for VersionedObjects, returning an empty ObjectKind // interface if no objects are provided, or the ObjectKind interface of the object in the // highest array position. -func (obj *VersionedObjects) GetObjectKind() unversioned.ObjectKind { +func (obj *VersionedObjects) GetObjectKind() schema.ObjectKind { last := obj.Last() if last == nil { - return unversioned.EmptyObjectKind + return schema.EmptyObjectKind } return last.GetObjectKind() } diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go new file mode 100644 index 000000000..dfe4c5f53 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go @@ -0,0 +1,59 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. +// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto +// DO NOT EDIT! + +/* + Package schema is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto + + It has these top-level messages: +*/ +package schema + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +const _ = proto.GoGoProtoPackageIsVersion1 + +var fileDescriptorGenerated = []byte{ + // 199 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0xce, 0x2f, 0x4e, 0x05, 0x31, + 0x10, 0xc7, 0xf1, 0xd6, 0x20, 0x90, 0xc8, 0x27, 0x46, 0x12, 0x0c, 0x1d, 0x81, 0x41, 0x73, 0x01, + 0x3c, 0xae, 0xbb, 0x6f, 0xe8, 0x36, 0xa5, 0x7f, 0xd2, 0x4e, 0x49, 0x70, 0x1c, 0x81, 0x63, 0xad, + 0x5c, 0x89, 0x64, 0xcb, 0x45, 0x48, 0xda, 0x15, 0x84, 0x04, 0xd7, 0x5f, 0x9a, 0xcf, 0xe4, 0x7b, + 0xf9, 0xe8, 0xee, 0x8b, 0xb2, 0x11, 0x5d, 0x9d, 0x28, 0x07, 0x62, 0x2a, 0xf8, 0x4a, 0xe1, 0x1c, + 0x33, 0x1e, 0x1f, 0x3a, 0x59, 0xaf, 0xe7, 0xc5, 0x06, 0xca, 0x6f, 0x98, 0x9c, 0xc1, 0x5c, 0x03, + 0x5b, 0x4f, 0x58, 0xe6, 0x85, 0xbc, 0x46, 0x43, 0x81, 0xb2, 0x66, 0x3a, 0xab, 0x94, 0x23, 0xc7, + 0xab, 0xeb, 0xe1, 0xd4, 0x6f, 0xa7, 0x92, 0x33, 0xea, 0x70, 0x6a, 0xb8, 0xd3, 0xad, 0xb1, 0xbc, + 0xd4, 0x49, 0xcd, 0xd1, 0xa3, 0x89, 0x26, 0x62, 0xe7, 0x53, 0x7d, 0xee, 0xab, 0x8f, 0xfe, 0x1a, + 0x67, 0x4f, 0x77, 0xff, 0xe5, 0x54, 0xb6, 0x2f, 0x68, 0x03, 0x17, 0xce, 0x7f, 0x5b, 0x1e, 0x6e, + 0xd6, 0x1d, 0xc4, 0xb6, 0x83, 0xf8, 0xdc, 0x41, 0xbc, 0x37, 0x90, 0x6b, 0x03, 0xb9, 0x35, 0x90, + 0x5f, 0x0d, 0xe4, 0xc7, 0x37, 0x88, 0xa7, 0x8b, 0x51, 0xf3, 0x13, 0x00, 0x00, 0xff, 0xff, 0xd9, + 0x82, 0x09, 0xbe, 0x07, 0x01, 0x00, 0x00, +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto new file mode 100644 index 000000000..ebc1a263d --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto @@ -0,0 +1,28 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.apimachinery.pkg.runtime.schema; + +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "schema"; + diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/group_version.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go similarity index 72% rename from vendor/k8s.io/client-go/1.5/pkg/api/unversioned/group_version.go rename to vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go index dfbfe3a32..1a9bba106 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/group_version.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go @@ -14,10 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -package unversioned +package schema import ( - "encoding/json" "fmt" "strings" ) @@ -39,11 +38,9 @@ func ParseResourceArg(arg string) (*GroupVersionResource, GroupResource) { // 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"` + Group string + Resource string } func (gr GroupResource) WithVersion(version string) GroupVersionResource { @@ -72,13 +69,11 @@ func ParseGroupResource(gr string) GroupResource { } // 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 +// to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling 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"` + Group string + Version string + Resource string } func (gvr GroupVersionResource) Empty() bool { @@ -99,11 +94,9 @@ func (gvr *GroupVersionResource) String() string { // 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"` + Group string + Kind string } func (gk GroupKind) Empty() bool { @@ -122,13 +115,11 @@ func (gk *GroupKind) String() string { } // 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 +// to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling 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"` + Group string + Version string + Kind string } // Empty returns true if group, version, and kind are empty @@ -149,11 +140,9 @@ func (gvk GroupVersionKind) String() string { } // 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"` + Group string + Version string } // Empty returns true if group and version are empty @@ -228,38 +217,6 @@ 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) -} - // GroupVersions can be used to represent a set of desired group versions. // TODO: Move GroupVersions to a package under pkg/runtime, since it's used by scheme. // TODO: Introduce an adapter type between GroupVersions and runtime.GroupVersioner, and use LegacyCodec(GroupVersion) @@ -268,17 +225,37 @@ type GroupVersions []GroupVersion // KindForGroupVersionKinds identifies the preferred GroupVersionKind out of a list. It returns ok false // if none of the options match the group. -func (gvs GroupVersions) KindForGroupVersionKinds(kinds []GroupVersionKind) (target GroupVersionKind, ok bool) { +func (gvs GroupVersions) KindForGroupVersionKinds(kinds []GroupVersionKind) (GroupVersionKind, bool) { + var targets []GroupVersionKind for _, gv := range gvs { target, ok := gv.KindForGroupVersionKinds(kinds) if !ok { continue } - return target, true + targets = append(targets, target) + } + if len(targets) == 1 { + return targets[0], true + } + if len(targets) > 1 { + return bestMatch(kinds, targets), true } return GroupVersionKind{}, false } +// bestMatch tries to pick best matching GroupVersionKind and falls back to the first +// found if no exact match exists. +func bestMatch(kinds []GroupVersionKind, targets []GroupVersionKind) GroupVersionKind { + for _, gvk := range targets { + for _, k := range kinds { + if k == gvk { + return k + } + } + } + return targets[0] +} + // ToAPIVersionAndKind is a convenience method for satisfying runtime.Object on types that // do not use TypeMeta. func (gvk *GroupVersionKind) ToAPIVersionAndKind() (string, string) { @@ -298,28 +275,3 @@ func FromAPIVersionAndKind(apiVersion, kind string) GroupVersionKind { } 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/vendor/k8s.io/apimachinery/pkg/runtime/schema/interfaces.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/interfaces.go new file mode 100644 index 000000000..b57066845 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/interfaces.go @@ -0,0 +1,40 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package schema + +// All objects that are serialized from a Scheme encode their type information. This interface is used +// by serialization to set type information from the Scheme onto the serialized version of an object. +// For objects that cannot be serialized or have unique requirements, this interface may be a no-op. +type ObjectKind interface { + // SetGroupVersionKind sets or clears the intended serialized kind of an object. Passing kind nil + // should clear the current setting. + SetGroupVersionKind(kind GroupVersionKind) + // GroupVersionKind returns the stored group, version, and kind of an object, or nil if the object does + // not expose or provide these fields. + GroupVersionKind() GroupVersionKind +} + +// EmptyObjectKind implements the ObjectKind interface as a noop +var EmptyObjectKind = emptyObjectKind{} + +type emptyObjectKind struct{} + +// SetGroupVersionKind implements the ObjectKind interface +func (emptyObjectKind) SetGroupVersionKind(gvk GroupVersionKind) {} + +// GroupVersionKind implements the ObjectKind interface +func (emptyObjectKind) GroupVersionKind() GroupVersionKind { return GroupVersionKind{} } diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/scheme.go b/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go similarity index 85% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/scheme.go rename to vendor/k8s.io/apimachinery/pkg/runtime/scheme.go index 51eb10a8f..fbec6ad9b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/scheme.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go @@ -21,8 +21,8 @@ import ( "net/url" "reflect" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/conversion" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime/schema" ) // Scheme defines methods for serializing and deserializing API objects, a type @@ -43,14 +43,14 @@ import ( type Scheme struct { // versionMap allows one to figure out the go type of an object with // the given version and name. - gvkToType map[unversioned.GroupVersionKind]reflect.Type + gvkToType map[schema.GroupVersionKind]reflect.Type // typeToGroupVersion allows one to find metadata for a given go object. // The reflect.Type we index by should *not* be a pointer. - typeToGVK map[reflect.Type][]unversioned.GroupVersionKind + typeToGVK map[reflect.Type][]schema.GroupVersionKind // unversionedTypes are transformed without conversion in ConvertToVersion. - unversionedTypes map[reflect.Type]unversioned.GroupVersionKind + unversionedTypes map[reflect.Type]schema.GroupVersionKind // unversionedKinds are the names of kinds that can be created in the context of any group // or version @@ -61,6 +61,10 @@ type Scheme struct { // resource field labels in that version to internal version. fieldLabelConversionFuncs map[string]map[string]FieldLabelConversionFunc + // defaulterFuncs is an array of interfaces to be called with an object to provide defaulting + // the provided object must be a pointer. + defaulterFuncs map[reflect.Type]func(interface{}) + // converter stores all registered conversion functions. It also has // default coverting behavior. converter *conversion.Converter @@ -76,12 +80,13 @@ type FieldLabelConversionFunc func(label, value string) (internalLabel, internal // NewScheme creates a new Scheme. This scheme is pluggable by default. func NewScheme() *Scheme { s := &Scheme{ - gvkToType: map[unversioned.GroupVersionKind]reflect.Type{}, - typeToGVK: map[reflect.Type][]unversioned.GroupVersionKind{}, - unversionedTypes: map[reflect.Type]unversioned.GroupVersionKind{}, + gvkToType: map[schema.GroupVersionKind]reflect.Type{}, + typeToGVK: map[reflect.Type][]schema.GroupVersionKind{}, + unversionedTypes: map[reflect.Type]schema.GroupVersionKind{}, unversionedKinds: map[string]reflect.Type{}, cloner: conversion.NewCloner(), fieldLabelConversionFuncs: map[string]map[string]FieldLabelConversionFunc{}, + defaulterFuncs: map[reflect.Type]func(interface{}){}, } s.converter = conversion.NewConverter(s.nameFunc) @@ -140,7 +145,7 @@ func (s *Scheme) Converter() *conversion.Converter { // // TODO: there is discussion about removing unversioned and replacing it with objects that are manifest into // every version with particular schemas. Resolve this method at that point. -func (s *Scheme) AddUnversionedTypes(version unversioned.GroupVersion, types ...Object) { +func (s *Scheme) AddUnversionedTypes(version schema.GroupVersion, types ...Object) { s.AddKnownTypes(version, types...) for _, obj := range types { t := reflect.TypeOf(obj).Elem() @@ -157,23 +162,14 @@ func (s *Scheme) AddUnversionedTypes(version unversioned.GroupVersion, types ... // All objects passed to types should be pointers to structs. The name that go reports for // the struct becomes the "kind" field when encoding. Version may not be empty - use the // APIVersionInternal constant if you have a type that does not have a formal version. -func (s *Scheme) AddKnownTypes(gv unversioned.GroupVersion, types ...Object) { - if len(gv.Version) == 0 { - panic(fmt.Sprintf("version is required on all types: %s %v", gv, types[0])) - } +func (s *Scheme) AddKnownTypes(gv schema.GroupVersion, types ...Object) { for _, obj := range types { t := reflect.TypeOf(obj) if t.Kind() != reflect.Ptr { panic("All types must be pointers to structs.") } t = t.Elem() - if t.Kind() != reflect.Struct { - panic("All types must be pointers to structs.") - } - - gvk := gv.WithKind(t.Name()) - s.gvkToType[gvk] = t - s.typeToGVK[t] = append(s.typeToGVK[t], gvk) + s.AddKnownTypeWithName(gv.WithKind(t.Name()), obj) } } @@ -181,7 +177,7 @@ func (s *Scheme) AddKnownTypes(gv unversioned.GroupVersion, types ...Object) { // be encoded as. Useful for testing when you don't want to make multiple packages to define // your structs. Version may not be empty - use the APIVersionInternal constant if you have a // type that does not have a formal version. -func (s *Scheme) AddKnownTypeWithName(gvk unversioned.GroupVersionKind, obj Object) { +func (s *Scheme) AddKnownTypeWithName(gvk schema.GroupVersionKind, obj Object) { t := reflect.TypeOf(obj) if len(gvk.Version) == 0 { panic(fmt.Sprintf("version is required on all types: %s %v", gvk, t)) @@ -194,12 +190,22 @@ func (s *Scheme) AddKnownTypeWithName(gvk unversioned.GroupVersionKind, obj Obje panic("All types must be pointers to structs.") } + if oldT, found := s.gvkToType[gvk]; found && oldT != t { + panic(fmt.Sprintf("Double registration of different types for %v: old=%v.%v, new=%v.%v", gvk, oldT.PkgPath(), oldT.Name(), t.PkgPath(), t.Name())) + } + s.gvkToType[gvk] = t + + for _, existingGvk := range s.typeToGVK[t] { + if existingGvk == gvk { + return + } + } s.typeToGVK[t] = append(s.typeToGVK[t], gvk) } // KnownTypes returns the types known for the given version. -func (s *Scheme) KnownTypes(gv unversioned.GroupVersion) map[string]reflect.Type { +func (s *Scheme) KnownTypes(gv schema.GroupVersion) map[string]reflect.Type { types := make(map[string]reflect.Type) for gvk, t := range s.gvkToType { if gv != gvk.GroupVersion() { @@ -212,23 +218,23 @@ func (s *Scheme) KnownTypes(gv unversioned.GroupVersion) map[string]reflect.Type } // AllKnownTypes returns the all known types. -func (s *Scheme) AllKnownTypes() map[unversioned.GroupVersionKind]reflect.Type { +func (s *Scheme) AllKnownTypes() map[schema.GroupVersionKind]reflect.Type { return s.gvkToType } // ObjectKind returns the group,version,kind of the go object and true if this object // is considered unversioned, or an error if it's not a pointer or is unregistered. -func (s *Scheme) ObjectKind(obj Object) (unversioned.GroupVersionKind, bool, error) { +func (s *Scheme) ObjectKind(obj Object) (schema.GroupVersionKind, bool, error) { gvks, unversionedType, err := s.ObjectKinds(obj) if err != nil { - return unversioned.GroupVersionKind{}, false, err + return schema.GroupVersionKind{}, false, err } return gvks[0], unversionedType, nil } // ObjectKinds returns all possible group,version,kind of the go object, true if the // object is considered unversioned, or an error if it's not a pointer or is unregistered. -func (s *Scheme) ObjectKinds(obj Object) ([]unversioned.GroupVersionKind, bool, error) { +func (s *Scheme) ObjectKinds(obj Object) ([]schema.GroupVersionKind, bool, error) { v, err := conversion.EnforcePtr(obj) if err != nil { return nil, false, err @@ -237,7 +243,7 @@ func (s *Scheme) ObjectKinds(obj Object) ([]unversioned.GroupVersionKind, bool, gvks, ok := s.typeToGVK[t] if !ok { - return nil, false, NewNotRegisteredErr(unversioned.GroupVersionKind{}, t) + return nil, false, NewNotRegisteredErr(schema.GroupVersionKind{}, t) } _, unversionedType := s.unversionedTypes[t] @@ -246,7 +252,7 @@ func (s *Scheme) ObjectKinds(obj Object) ([]unversioned.GroupVersionKind, bool, // Recognizes returns true if the scheme is able to handle the provided group,version,kind // of an object. -func (s *Scheme) Recognizes(gvk unversioned.GroupVersionKind) bool { +func (s *Scheme) Recognizes(gvk schema.GroupVersionKind) bool { _, exists := s.gvkToType[gvk] return exists } @@ -267,7 +273,7 @@ func (s *Scheme) IsUnversioned(obj Object) (bool, bool) { // New returns a new API object of the given version and name, or an error if it hasn't // been registered. The version and kind fields must be specified. -func (s *Scheme) New(kind unversioned.GroupVersionKind) (Object, error) { +func (s *Scheme) New(kind schema.GroupVersionKind) (Object, error) { if t, exists := s.gvkToType[kind]; exists { return reflect.New(t).Interface().(Object), nil } @@ -421,6 +427,22 @@ func (s *Scheme) AddDefaultingFuncs(defaultingFuncs ...interface{}) error { return nil } +// AddTypeDefaultingFuncs registers a function that is passed a pointer to an +// object and can default fields on the object. These functions will be invoked +// when Default() is called. The function will never be called unless the +// defaulted object matches srcType. If this function is invoked twice with the +// same srcType, the fn passed to the later call will be used instead. +func (s *Scheme) AddTypeDefaultingFunc(srcType Object, fn func(interface{})) { + s.defaulterFuncs[reflect.TypeOf(srcType)] = fn +} + +// Default sets defaults on the provided Object. +func (s *Scheme) Default(src Object) { + if fn, ok := s.defaulterFuncs[reflect.TypeOf(src)]; ok { + fn(src) + } +} + // Copy does a deep copy of an API object. func (s *Scheme) Copy(src Object) (Object, error) { dst, err := s.DeepCopy(src) @@ -493,11 +515,20 @@ func (s *Scheme) convertToVersion(copy bool, in Object, target GroupVersioner) ( } kinds, ok := s.typeToGVK[t] if !ok || len(kinds) == 0 { - return nil, NewNotRegisteredErr(unversioned.GroupVersionKind{}, t) + return nil, NewNotRegisteredErr(schema.GroupVersionKind{}, t) } gvk, ok := target.KindForGroupVersionKinds(kinds) if !ok { + // try to see if this type is listed as unversioned (for legacy support) + // TODO: when we move to server API versions, we should completely remove the unversioned concept + if unversionedKind, ok := s.unversionedTypes[t]; ok { + if gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{unversionedKind}); ok { + return copyAndSetTargetKind(copy, s, in, gvk) + } + return copyAndSetTargetKind(copy, s, in, unversionedKind) + } + // TODO: should this be a typed error? return nil, fmt.Errorf("%v is not suitable for converting to %q", t, target) } @@ -511,7 +542,7 @@ func (s *Scheme) convertToVersion(copy bool, in Object, target GroupVersioner) ( // type is unversioned, no conversion necessary if unversionedKind, ok := s.unversionedTypes[t]; ok { - if gvk, ok := target.KindForGroupVersionKinds([]unversioned.GroupVersionKind{unversionedKind}); ok { + if gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{unversionedKind}); ok { return copyAndSetTargetKind(copy, s, in, gvk) } return copyAndSetTargetKind(copy, s, in, unversionedKind) @@ -546,7 +577,7 @@ func (s *Scheme) generateConvertMeta(in interface{}) (conversion.FieldMatchingFl } // copyAndSetTargetKind performs a conditional copy before returning the object, or an error if copy was not successful. -func copyAndSetTargetKind(copy bool, copier ObjectCopier, obj Object, kind unversioned.GroupVersionKind) (Object, error) { +func copyAndSetTargetKind(copy bool, copier ObjectCopier, obj Object, kind schema.GroupVersionKind) (Object, error) { if copy { copied, err := copier.Copy(obj) if err != nil { @@ -559,11 +590,11 @@ func copyAndSetTargetKind(copy bool, copier ObjectCopier, obj Object, kind unver } // setTargetKind sets the kind on an object, taking into account whether the target kind is the internal version. -func setTargetKind(obj Object, kind unversioned.GroupVersionKind) { +func setTargetKind(obj Object, kind schema.GroupVersionKind) { if kind.Version == APIVersionInternal { // internal is a special case // TODO: look at removing the need to special case this - obj.GetObjectKind().SetGroupVersionKind(unversioned.GroupVersionKind{}) + obj.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{}) return } obj.GetObjectKind().SetGroupVersionKind(kind) diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/scheme_builder.go b/vendor/k8s.io/apimachinery/pkg/runtime/scheme_builder.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/scheme_builder.go rename to vendor/k8s.io/apimachinery/pkg/runtime/scheme_builder.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/codec_factory.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go similarity index 54% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/codec_factory.go rename to vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go index 6d0c9f046..65f451124 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/codec_factory.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go @@ -17,11 +17,11 @@ limitations under the License. package serializer import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/runtime/serializer/json" - "k8s.io/client-go/1.5/pkg/runtime/serializer/recognizer" - "k8s.io/client-go/1.5/pkg/runtime/serializer/versioning" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer/json" + "k8s.io/apimachinery/pkg/runtime/serializer/recognizer" + "k8s.io/apimachinery/pkg/runtime/serializer/versioning" ) // serializerExtensions are for serializers that are conditionally compiled in @@ -36,25 +36,12 @@ type serializerType struct { Serializer runtime.Serializer PrettySerializer runtime.Serializer - // RawSerializer serializes an object without adding a type wrapper. Some serializers, like JSON - // automatically include identifying type information with the JSON. Others, like Protobuf, need - // a wrapper object that includes type information. This serializer should be set if the serializer - // can serialize / deserialize objects without type info. Note that this serializer will always - // be expected to pass into or a gvk to Decode, since no type information will be available on - // the object itself. - RawSerializer runtime.Serializer - // Specialize gives the type the opportunity to return a different serializer implementation if - // the content type contains alternate operations. Here it is used to implement "pretty" as an - // option to application/json, but could also be used to allow serializers to perform type - // defaulting or alter output. - Specialize func(map[string]string) (runtime.Serializer, bool) AcceptStreamContentTypes []string StreamContentType string Framer runtime.Framer StreamSerializer runtime.Serializer - StreamSpecialize func(map[string]string) (runtime.Serializer, bool) } func newSerializersForScheme(scheme *runtime.Scheme, mf json.MetaFactory) []serializerType { @@ -71,10 +58,8 @@ func newSerializersForScheme(scheme *runtime.Scheme, mf json.MetaFactory) []seri Serializer: jsonSerializer, PrettySerializer: jsonPrettySerializer, - AcceptStreamContentTypes: []string{"application/json", "application/json;stream=watch"}, - StreamContentType: "application/json", - Framer: json.Framer, - StreamSerializer: jsonSerializer, + Framer: json.Framer, + StreamSerializer: jsonSerializer, }, { AcceptContentTypes: []string{"application/yaml"}, @@ -82,13 +67,6 @@ func newSerializersForScheme(scheme *runtime.Scheme, mf json.MetaFactory) []seri FileExtensions: []string{"yaml"}, EncodesAsText: true, Serializer: yamlSerializer, - - // TODO: requires runtime.RawExtension to properly distinguish when the nested content is - // yaml, because the yaml encoder invokes MarshalJSON first - //AcceptStreamContentTypes: []string{"application/yaml", "application/yaml;stream=watch"}, - //StreamContentType: "application/yaml;stream=watch", - //Framer: json.YAMLFramer, - //StreamSerializer: yamlSerializer, }, } @@ -103,11 +81,10 @@ func newSerializersForScheme(scheme *runtime.Scheme, mf json.MetaFactory) []seri // CodecFactory provides methods for retrieving codecs and serializers for specific // versions and content types. type CodecFactory struct { - scheme *runtime.Scheme - serializers []serializerType - universal runtime.Decoder - accepts []string - streamingAccepts []string + scheme *runtime.Scheme + serializers []serializerType + universal runtime.Decoder + accepts []runtime.SerializerInfo legacySerializer runtime.Serializer } @@ -126,7 +103,7 @@ func NewCodecFactory(scheme *runtime.Scheme) CodecFactory { // newCodecFactory is a helper for testing that allows a different metafactory to be specified. func newCodecFactory(scheme *runtime.Scheme, serializers []serializerType) CodecFactory { decoders := make([]runtime.Decoder, 0, len(serializers)) - accepts := []string{} + var accepts []runtime.SerializerInfo alreadyAccepted := make(map[string]struct{}) var legacySerializer runtime.Serializer @@ -137,8 +114,21 @@ func newCodecFactory(scheme *runtime.Scheme, serializers []serializerType) Codec continue } alreadyAccepted[mediaType] = struct{}{} - accepts = append(accepts, mediaType) - if mediaType == "application/json" { + info := runtime.SerializerInfo{ + MediaType: d.ContentType, + EncodesAsText: d.EncodesAsText, + Serializer: d.Serializer, + PrettySerializer: d.PrettySerializer, + } + if d.StreamSerializer != nil { + info.StreamSerializer = &runtime.StreamSerializerInfo{ + Serializer: d.StreamSerializer, + EncodesAsText: d.EncodesAsText, + Framer: d.Framer, + } + } + accepts = append(accepts, info) + if mediaType == runtime.ContentTypeJSON { legacySerializer = d.Serializer } } @@ -147,45 +137,22 @@ func newCodecFactory(scheme *runtime.Scheme, serializers []serializerType) Codec legacySerializer = serializers[0].Serializer } - streamAccepts := []string{} - alreadyAccepted = make(map[string]struct{}) - for _, d := range serializers { - if len(d.StreamContentType) == 0 { - continue - } - for _, mediaType := range d.AcceptStreamContentTypes { - if _, ok := alreadyAccepted[mediaType]; ok { - continue - } - alreadyAccepted[mediaType] = struct{}{} - streamAccepts = append(streamAccepts, mediaType) - } - } - return CodecFactory{ scheme: scheme, serializers: serializers, universal: recognizer.NewDecoder(decoders...), - accepts: accepts, - streamingAccepts: streamAccepts, + accepts: accepts, legacySerializer: legacySerializer, } } -var _ runtime.NegotiatedSerializer = &CodecFactory{} - // SupportedMediaTypes returns the RFC2046 media types that this factory has serializers for. -func (f CodecFactory) SupportedMediaTypes() []string { +func (f CodecFactory) SupportedMediaTypes() []runtime.SerializerInfo { return f.accepts } -// SupportedStreamingMediaTypes returns the RFC2046 media types that this factory has stream serializers for. -func (f CodecFactory) SupportedStreamingMediaTypes() []string { - return f.streamingAccepts -} - // LegacyCodec encodes output to a given API versions, and decodes output into the internal form from // any recognized source. The returned codec will always encode output to JSON. If a type is not // found in the list of versions an error will be returned. @@ -195,8 +162,8 @@ func (f CodecFactory) SupportedStreamingMediaTypes() []string { // // TODO: make this call exist only in pkg/api, and initialize it with the set of default versions. // All other callers will be forced to request a Codec directly. -func (f CodecFactory) LegacyCodec(version ...unversioned.GroupVersion) runtime.Codec { - return versioning.NewCodecForScheme(f.scheme, f.legacySerializer, f.universal, unversioned.GroupVersions(version), runtime.InternalGroupVersioner) +func (f CodecFactory) LegacyCodec(version ...schema.GroupVersion) runtime.Codec { + return versioning.NewDefaultingCodecForScheme(f.scheme, f.legacySerializer, f.universal, schema.GroupVersions(version), runtime.InternalGroupVersioner) } // UniversalDeserializer can convert any stored data recognized by this factory into a Go object that satisfies @@ -214,12 +181,12 @@ func (f CodecFactory) UniversalDeserializer() runtime.Decoder { // // TODO: the decoder will eventually be removed in favor of dealing with objects in their versioned form // TODO: only accept a group versioner -func (f CodecFactory) UniversalDecoder(versions ...unversioned.GroupVersion) runtime.Decoder { +func (f CodecFactory) UniversalDecoder(versions ...schema.GroupVersion) runtime.Decoder { var versioner runtime.GroupVersioner if len(versions) == 0 { versioner = runtime.InternalGroupVersioner } else { - versioner = unversioned.GroupVersions(versions) + versioner = schema.GroupVersions(versions) } return f.CodecForVersions(nil, f.universal, nil, versioner) } @@ -235,7 +202,7 @@ func (f CodecFactory) CodecForVersions(encoder runtime.Encoder, decoder runtime. if decode == nil { decode = runtime.InternalGroupVersioner } - return versioning.NewCodecForScheme(f.scheme, encoder, decoder, encode, decode) + return versioning.NewDefaultingCodecForScheme(f.scheme, encoder, decoder, encode, decode) } // DecoderToVersion returns a decoder that targets the provided group version. @@ -248,93 +215,15 @@ func (f CodecFactory) EncoderForVersion(encoder runtime.Encoder, gv runtime.Grou return f.CodecForVersions(encoder, nil, gv, nil) } -// SerializerForMediaType returns a serializer that matches the provided RFC2046 mediaType, or false if no such -// serializer exists -func (f CodecFactory) SerializerForMediaType(mediaType string, params map[string]string) (runtime.SerializerInfo, bool) { - for _, s := range f.serializers { - for _, accepted := range s.AcceptContentTypes { - if accepted == mediaType { - // specialization abstracts variants to the content type - if s.Specialize != nil && len(params) > 0 { - serializer, ok := s.Specialize(params) - // TODO: return formatted mediaType+params - return runtime.SerializerInfo{Serializer: serializer, MediaType: s.ContentType, EncodesAsText: s.EncodesAsText}, ok - } - - // legacy support for ?pretty=1 continues, but this is more formally defined - if v, ok := params["pretty"]; ok && v == "1" && s.PrettySerializer != nil { - return runtime.SerializerInfo{Serializer: s.PrettySerializer, MediaType: s.ContentType, EncodesAsText: s.EncodesAsText}, true - } - - // return the base variant - return runtime.SerializerInfo{Serializer: s.Serializer, MediaType: s.ContentType, EncodesAsText: s.EncodesAsText}, true - } - } - } - return runtime.SerializerInfo{}, false -} - -// StreamingSerializerForMediaType returns a serializer that matches the provided RFC2046 mediaType, or false if no such -// serializer exists -func (f CodecFactory) StreamingSerializerForMediaType(mediaType string, params map[string]string) (runtime.StreamSerializerInfo, bool) { - for _, s := range f.serializers { - for _, accepted := range s.AcceptStreamContentTypes { - if accepted == mediaType { - // TODO: accept params - nested, ok := f.SerializerForMediaType(s.ContentType, nil) - if !ok { - panic("no serializer defined for internal content type") - } - - if s.StreamSpecialize != nil && len(params) > 0 { - serializer, ok := s.StreamSpecialize(params) - // TODO: return formatted mediaType+params - return runtime.StreamSerializerInfo{ - SerializerInfo: runtime.SerializerInfo{ - Serializer: serializer, - MediaType: s.StreamContentType, - EncodesAsText: s.EncodesAsText, - }, - Framer: s.Framer, - Embedded: nested, - }, ok - } - - return runtime.StreamSerializerInfo{ - SerializerInfo: runtime.SerializerInfo{ - Serializer: s.StreamSerializer, - MediaType: s.StreamContentType, - EncodesAsText: s.EncodesAsText, - }, - Framer: s.Framer, - Embedded: nested, - }, true - } - } - } - return runtime.StreamSerializerInfo{}, false -} - -// SerializerForFileExtension returns a serializer for the provided extension, or false if no serializer matches. -func (f CodecFactory) SerializerForFileExtension(extension string) (runtime.Serializer, bool) { - for _, s := range f.serializers { - for _, ext := range s.FileExtensions { - if extension == ext { - return s.Serializer, true - } - } - } - return nil, false -} - // DirectCodecFactory provides methods for retrieving "DirectCodec"s, which do not do conversion. type DirectCodecFactory struct { CodecFactory } -// EncoderForVersion returns an encoder that does not do conversion. gv is ignored. -func (f DirectCodecFactory) EncoderForVersion(serializer runtime.Encoder, _ runtime.GroupVersioner) runtime.Encoder { +// EncoderForVersion returns an encoder that does not do conversion. +func (f DirectCodecFactory) EncoderForVersion(serializer runtime.Encoder, version runtime.GroupVersioner) runtime.Encoder { return versioning.DirectEncoder{ + Version: version, Encoder: serializer, ObjectTyper: f.CodecFactory.scheme, } diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/json/json.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go similarity index 94% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/json/json.go rename to vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go index 513f6d969..28bb91b53 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/json/json.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go @@ -23,11 +23,11 @@ import ( "github.com/ghodss/yaml" "github.com/ugorji/go/codec" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/runtime/serializer/recognizer" - "k8s.io/client-go/1.5/pkg/util/framer" - utilyaml "k8s.io/client-go/1.5/pkg/util/yaml" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer/recognizer" + "k8s.io/apimachinery/pkg/util/framer" + utilyaml "k8s.io/apimachinery/pkg/util/yaml" ) // NewSerializer creates a JSON serializer that handles encoding versioned objects into the proper JSON form. If typer @@ -71,7 +71,7 @@ var _ recognizer.RecognizingDecoder = &Serializer{} // extracted and no decoding will be performed. If into is not registered with the typer, then the object will be straight decoded using // normal JSON/YAML unmarshalling. If into is provided and the original data is not fully qualified with kind/version/group, the type of // the into will be used to alter the returned gvk. On success or most errors, the method will return the calculated schema kind. -func (s *Serializer) Decode(originalData []byte, gvk *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.GroupVersionKind, error) { +func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { if versioned, ok := into.(*runtime.VersionedObjects); ok { into = versioned.Last() obj, actual, err := s.Decode(originalData, gvk, into) @@ -194,7 +194,7 @@ func (s *Serializer) RecognizesData(peek io.Reader) (ok, unknown bool, err error // we could potentially look for '---' return false, true, nil } - _, ok = utilyaml.GuessJSONStream(peek, 2048) + _, _, ok = utilyaml.GuessJSONStream(peek, 2048) return ok, false, nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/json/meta.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta.go similarity index 81% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/json/meta.go rename to vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta.go index d9dacf437..df3f5f989 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/json/meta.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta.go @@ -20,7 +20,7 @@ import ( "encoding/json" "fmt" - "k8s.io/client-go/1.5/pkg/api/unversioned" + "k8s.io/apimachinery/pkg/runtime/schema" ) // MetaFactory is used to store and retrieve the version and kind @@ -28,7 +28,7 @@ import ( type MetaFactory interface { // Interpret should return the version and kind of the wire-format of // the object. - Interpret(data []byte) (*unversioned.GroupVersionKind, error) + Interpret(data []byte) (*schema.GroupVersionKind, error) } // DefaultMetaFactory is a default factory for versioning objects in JSON. The object @@ -45,17 +45,19 @@ type SimpleMetaFactory struct { // Interpret will return the APIVersion and Kind of the JSON wire-format // encoding of an object, or an error. -func (SimpleMetaFactory) Interpret(data []byte) (*unversioned.GroupVersionKind, error) { +func (SimpleMetaFactory) Interpret(data []byte) (*schema.GroupVersionKind, error) { findKind := struct { + // +optional APIVersion string `json:"apiVersion,omitempty"` - Kind string `json:"kind,omitempty"` + // +optional + Kind string `json:"kind,omitempty"` }{} if err := json.Unmarshal(data, &findKind); err != nil { return nil, fmt.Errorf("couldn't get version/kind; json parse error: %v", err) } - gv, err := unversioned.ParseGroupVersion(findKind.APIVersion) + gv, err := schema.ParseGroupVersion(findKind.APIVersion) if err != nil { return nil, err } - return &unversioned.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: findKind.Kind}, nil + return &schema.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: findKind.Kind}, nil } diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/negotiated_codec.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/negotiated_codec.go new file mode 100644 index 000000000..a42b4a41a --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/negotiated_codec.go @@ -0,0 +1,43 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package serializer + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +// TODO: We should split negotiated serializers that we can change versions on from those we can change +// serialization formats on +type negotiatedSerializerWrapper struct { + info runtime.SerializerInfo +} + +func NegotiatedSerializerWrapper(info runtime.SerializerInfo) runtime.NegotiatedSerializer { + return &negotiatedSerializerWrapper{info} +} + +func (n *negotiatedSerializerWrapper) SupportedMediaTypes() []runtime.SerializerInfo { + return []runtime.SerializerInfo{n.info} +} + +func (n *negotiatedSerializerWrapper) EncoderForVersion(e runtime.Encoder, _ runtime.GroupVersioner) runtime.Encoder { + return e +} + +func (n *negotiatedSerializerWrapper) DecoderToVersion(d runtime.Decoder, _gv runtime.GroupVersioner) runtime.Decoder { + return d +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/protobuf/doc.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/doc.go similarity index 88% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/protobuf/doc.go rename to vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/doc.go index 381748d69..72d0ac79b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/protobuf/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package protobuf provides a Kubernetes serializer for the protobuf format. -package protobuf +package protobuf // import "k8s.io/apimachinery/pkg/runtime/serializer/protobuf" diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/protobuf/protobuf.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go similarity index 94% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/protobuf/protobuf.go rename to vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go index b64bf62f4..8d4ea7118 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/protobuf/protobuf.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go @@ -24,10 +24,10 @@ import ( "github.com/gogo/protobuf/proto" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/runtime/serializer/recognizer" - "k8s.io/client-go/1.5/pkg/util/framer" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer/recognizer" + "k8s.io/apimachinery/pkg/util/framer" ) var ( @@ -36,7 +36,7 @@ var ( // byte being reserved for the encoding style. The only encoding style defined is 0x00, which means that // the rest of the byte stream is a message of type k8s.io.kubernetes.pkg.runtime.Unknown (proto2). // - // See k8s.io/kubernetes/pkg/runtime/generated.proto for details of the runtime.Unknown message. + // See k8s.io/apimachinery/pkg/runtime/generated.proto for details of the runtime.Unknown message. // // This encoding scheme is experimental, and is subject to change at any time. protoEncodingPrefix = []byte{0x6b, 0x38, 0x73, 0x00} @@ -85,7 +85,7 @@ var _ recognizer.RecognizingDecoder = &Serializer{} // be straight decoded using normal protobuf unmarshalling (the MarshalTo interface). If into is provided and the original data is // not fully qualified with kind/version/group, the type of the into will be used to alter the returned gvk. On success or most // errors, the method will return the calculated schema kind. -func (s *Serializer) Decode(originalData []byte, gvk *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.GroupVersionKind, error) { +func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { if versioned, ok := into.(*runtime.VersionedObjects); ok { into = versioned.Last() obj, actual, err := s.Decode(originalData, gvk, into) @@ -255,7 +255,7 @@ func (s *Serializer) RecognizesData(peek io.Reader) (bool, bool, error) { } // copyKindDefaults defaults dst to the value in src if dst does not have a value set. -func copyKindDefaults(dst, src *unversioned.GroupVersionKind) { +func copyKindDefaults(dst, src *schema.GroupVersionKind) { if src == nil { return } @@ -316,7 +316,7 @@ var _ runtime.Serializer = &RawSerializer{} // be straight decoded using normal protobuf unmarshalling (the MarshalTo interface). If into is provided and the original data is // not fully qualified with kind/version/group, the type of the into will be used to alter the returned gvk. On success or most // errors, the method will return the calculated schema kind. -func (s *RawSerializer) Decode(originalData []byte, gvk *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.GroupVersionKind, error) { +func (s *RawSerializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { if into == nil { return nil, nil, fmt.Errorf("this serializer requires an object to decode into: %#v", s) } @@ -341,7 +341,7 @@ func (s *RawSerializer) Decode(originalData []byte, gvk *unversioned.GroupVersio } data := originalData - actual := &unversioned.GroupVersionKind{} + actual := &schema.GroupVersionKind{} copyKindDefaults(actual, gvk) if intoUnknown, ok := into.(*runtime.Unknown); ok && intoUnknown != nil { @@ -386,7 +386,7 @@ func (s *RawSerializer) Decode(originalData []byte, gvk *unversioned.GroupVersio } // unmarshalToObject is the common code between decode in the raw and normal serializer. -func unmarshalToObject(typer runtime.ObjectTyper, creater runtime.ObjectCreater, actual *unversioned.GroupVersionKind, into runtime.Object, data []byte) (runtime.Object, *unversioned.GroupVersionKind, error) { +func unmarshalToObject(typer runtime.ObjectTyper, creater runtime.ObjectCreater, actual *schema.GroupVersionKind, into runtime.Object, data []byte) (runtime.Object, *schema.GroupVersionKind, error) { // use the target if necessary obj, err := runtime.UseOrCreateObject(typer, creater, *actual, into) if err != nil { diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/protobuf_extension.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf_extension.go similarity index 74% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/protobuf_extension.go rename to vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf_extension.go index c47383b99..545cf78df 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/protobuf_extension.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf_extension.go @@ -17,8 +17,8 @@ limitations under the License. package serializer import ( - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/runtime/serializer/protobuf" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer/protobuf" ) const ( @@ -26,8 +26,7 @@ const ( // depending on it unintentionally. // TODO: potentially move to pkg/api (since it's part of the Kube public API) and pass it in to the // CodecFactory on initialization. - contentTypeProtobuf = "application/vnd.kubernetes.protobuf" - contentTypeProtobufWatch = contentTypeProtobuf + ";stream=watch" + contentTypeProtobuf = "application/vnd.kubernetes.protobuf" ) func protobufSerializer(scheme *runtime.Scheme) (serializerType, bool) { @@ -38,12 +37,9 @@ func protobufSerializer(scheme *runtime.Scheme) (serializerType, bool) { ContentType: contentTypeProtobuf, FileExtensions: []string{"pb"}, Serializer: serializer, - RawSerializer: raw, - AcceptStreamContentTypes: []string{contentTypeProtobuf, contentTypeProtobufWatch}, - StreamContentType: contentTypeProtobufWatch, - Framer: protobuf.LengthDelimitedFramer, - StreamSerializer: raw, + Framer: protobuf.LengthDelimitedFramer, + StreamSerializer: raw, }, true } diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/recognizer/recognizer.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/recognizer.go similarity index 93% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/recognizer/recognizer.go rename to vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/recognizer.go index bc29015ca..38497ab53 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/recognizer/recognizer.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/recognizer.go @@ -22,8 +22,8 @@ import ( "fmt" "io" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) type RecognizingDecoder interface { @@ -81,7 +81,7 @@ func (d *decoder) RecognizesData(peek io.Reader) (bool, bool, error) { return false, anyUnknown, lastErr } -func (d *decoder) Decode(data []byte, gvk *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.GroupVersionKind, error) { +func (d *decoder) Decode(data []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { var ( lastErr error skipped []runtime.Decoder diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/streaming/streaming.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go similarity index 90% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/streaming/streaming.go rename to vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go index ffdcf2e26..91fd4ed4f 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/streaming/streaming.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go @@ -23,8 +23,8 @@ import ( "fmt" "io" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // Encoder is a runtime.Encoder on a stream. @@ -37,7 +37,7 @@ type Encoder interface { // Decoder is a runtime.Decoder from a stream. type Decoder interface { // Decode will return io.EOF when no more objects are available. - Decode(defaults *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.GroupVersionKind, error) + Decode(defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) // Close closes the underlying stream. Close() error } @@ -71,7 +71,7 @@ func NewDecoder(r io.ReadCloser, d runtime.Decoder) Decoder { var ErrObjectTooLarge = fmt.Errorf("object to decode was longer than maximum allowed size") // Decode reads the next object from the stream and decodes it. -func (d *decoder) Decode(defaults *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.GroupVersionKind, error) { +func (d *decoder) Decode(defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { base := 0 for { n, err := d.reader.Read(d.buf[base:]) diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/versioning/versioning.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go similarity index 75% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/versioning/versioning.go rename to vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go index 310d1aa91..829d4fa89 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/versioning/versioning.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go @@ -19,8 +19,9 @@ package versioning import ( "io" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) // NewCodecForScheme is a convenience method for callers that are using a scheme. @@ -32,7 +33,19 @@ func NewCodecForScheme( encodeVersion runtime.GroupVersioner, decodeVersion runtime.GroupVersioner, ) runtime.Codec { - return NewCodec(encoder, decoder, runtime.UnsafeObjectConvertor(scheme), scheme, scheme, scheme, encodeVersion, decodeVersion) + return NewCodec(encoder, decoder, runtime.UnsafeObjectConvertor(scheme), scheme, scheme, scheme, nil, encodeVersion, decodeVersion) +} + +// NewDefaultingCodecForScheme is a convenience method for callers that are using a scheme. +func NewDefaultingCodecForScheme( + // TODO: I should be a scheme interface? + scheme *runtime.Scheme, + encoder runtime.Encoder, + decoder runtime.Decoder, + encodeVersion runtime.GroupVersioner, + decodeVersion runtime.GroupVersioner, +) runtime.Codec { + return NewCodec(encoder, decoder, runtime.UnsafeObjectConvertor(scheme), scheme, scheme, scheme, scheme, encodeVersion, decodeVersion) } // NewCodec takes objects in their internal versions and converts them to external versions before @@ -45,6 +58,7 @@ func NewCodec( creater runtime.ObjectCreater, copier runtime.ObjectCopier, typer runtime.ObjectTyper, + defaulter runtime.ObjectDefaulter, encodeVersion runtime.GroupVersioner, decodeVersion runtime.GroupVersioner, ) runtime.Codec { @@ -55,6 +69,7 @@ func NewCodec( creater: creater, copier: copier, typer: typer, + defaulter: defaulter, encodeVersion: encodeVersion, decodeVersion: decodeVersion, @@ -69,6 +84,7 @@ type codec struct { creater runtime.ObjectCreater copier runtime.ObjectCopier typer runtime.ObjectTyper + defaulter runtime.ObjectDefaulter encodeVersion runtime.GroupVersioner decodeVersion runtime.GroupVersioner @@ -77,7 +93,7 @@ type codec struct { // Decode attempts a decode of the object, then tries to convert it to the internal version. If into is provided and the decoding is // successful, the returned runtime.Object will be the value passed as into. Note that this may bypass conversion if you pass an // into that matches the serialized version. -func (c *codec) Decode(data []byte, defaultGVK *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.GroupVersionKind, error) { +func (c *codec) Decode(data []byte, defaultGVK *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { versioned, isVersioned := into.(*runtime.VersionedObjects) if isVersioned { into = versioned.Last() @@ -102,11 +118,31 @@ func (c *codec) Decode(data []byte, defaultGVK *unversioned.GroupVersionKind, in } return into, gvk, nil } + + // perform defaulting if requested + if c.defaulter != nil { + // create a copy to ensure defaulting is not applied to the original versioned objects + if isVersioned { + copied, err := c.copier.Copy(obj) + if err != nil { + utilruntime.HandleError(err) + copied = obj + } + versioned.Objects = []runtime.Object{copied} + } + c.defaulter.Default(obj) + } else { + if isVersioned { + versioned.Objects = []runtime.Object{obj} + } + } + if err := c.convertor.Convert(obj, into, c.decodeVersion); err != nil { return nil, gvk, err } + if isVersioned { - versioned.Objects = []runtime.Object{obj, into} + versioned.Objects = append(versioned.Objects, into) return versioned, gvk, nil } return into, gvk, nil @@ -117,10 +153,17 @@ func (c *codec) Decode(data []byte, defaultGVK *unversioned.GroupVersionKind, in // create a copy, because ConvertToVersion does not guarantee non-mutation of objects copied, err := c.copier.Copy(obj) if err != nil { + utilruntime.HandleError(err) copied = obj } versioned.Objects = []runtime.Object{copied} } + + // perform defaulting if requested + if c.defaulter != nil { + c.defaulter.Default(obj) + } + out, err := c.convertor.ConvertToVersion(obj, c.decodeVersion) if err != nil { return nil, gvk, err @@ -138,7 +181,7 @@ func (c *codec) Decode(data []byte, defaultGVK *unversioned.GroupVersionKind, in // conversion if necessary. Unversioned objects (according to the ObjectTyper) are output as is. func (c *codec) Encode(obj runtime.Object, w io.Writer) error { switch obj.(type) { - case *runtime.Unknown, *runtime.Unstructured, *runtime.UnstructuredList: + case *runtime.Unknown, runtime.Unstructured: return c.encoder.Encode(obj, w) } @@ -184,6 +227,7 @@ func (c *codec) Encode(obj runtime.Object, w io.Writer) error { // DirectEncoder serializes an object and ensures the GVK is set. type DirectEncoder struct { + Version runtime.GroupVersioner runtime.Encoder runtime.ObjectTyper } @@ -199,7 +243,14 @@ func (e DirectEncoder) Encode(obj runtime.Object, stream io.Writer) error { } kind := obj.GetObjectKind() oldGVK := kind.GroupVersionKind() - kind.SetGroupVersionKind(gvks[0]) + gvk := gvks[0] + if e.Version != nil { + preferredGVK, ok := e.Version.KindForGroupVersionKinds(gvks) + if ok { + gvk = preferredGVK + } + } + kind.SetGroupVersionKind(gvk) err = e.Encoder.Encode(obj, stream) kind.SetGroupVersionKind(oldGVK) return err @@ -211,12 +262,12 @@ type DirectDecoder struct { } // Decode does not do conversion. It removes the gvk during deserialization. -func (d DirectDecoder) Decode(data []byte, defaults *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.GroupVersionKind, error) { +func (d DirectDecoder) Decode(data []byte, defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { obj, gvk, err := d.Decoder.Decode(data, defaults, into) if obj != nil { kind := obj.GetObjectKind() // clearing the gvk is just a convention of a codec - kind.SetGroupVersionKind(unversioned.GroupVersionKind{}) + kind.SetGroupVersionKind(schema.GroupVersionKind{}) } return obj, gvk, err } diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/swagger_doc_generator.go b/vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/swagger_doc_generator.go rename to vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/types.go b/vendor/k8s.io/apimachinery/pkg/runtime/types.go similarity index 85% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/types.go rename to vendor/k8s.io/apimachinery/pkg/runtime/types.go index 2ac265ccd..f972c5e69 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/types.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/types.go @@ -25,7 +25,7 @@ package runtime // runtime.TypeMeta `json:",inline"` // ... // other fields // } -// func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *unversioned.GroupVersionKind) { unversioned.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind +// func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind // // TypeMeta is provided here for convenience. You may use it directly from this package or define // your own with the same fields. @@ -34,8 +34,10 @@ package runtime // +protobuf=true // +k8s:openapi-gen=true type TypeMeta struct { + // +optional APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"` - Kind string `json:"kind,omitempty" yaml:"kind,omitempty" protobuf:"bytes,2,opt,name=kind"` + // +optional + Kind string `json:"kind,omitempty" yaml:"kind,omitempty" protobuf:"bytes,2,opt,name=kind"` } const ( @@ -120,17 +122,6 @@ type Unknown struct { ContentType string `protobuf:"bytes,4,opt,name=contentType"` } -// Unstructured allows objects that do not have Golang structs registered to be manipulated -// generically. This can be used to deal with the API objects from a plug-in. Unstructured -// objects still have functioning TypeMeta features-- kind, version, etc. -// TODO: Make this object have easy access to field based accessors and settors for -// metadata and field mutatation. -type Unstructured struct { - // Object is a JSON compatible map with string, float, int, []interface{}, or map[string]interface{} - // children. - Object map[string]interface{} -} - // VersionedObjects is used by Decoders to give callers a way to access all versions // of an object during the decoding process. type VersionedObjects struct { diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/types_proto.go b/vendor/k8s.io/apimachinery/pkg/runtime/types_proto.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/types_proto.go rename to vendor/k8s.io/apimachinery/pkg/runtime/types_proto.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go similarity index 64% rename from vendor/k8s.io/client-go/1.5/pkg/runtime/zz_generated.deepcopy.go rename to vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go index c9f30ba2b..b75b3ebb2 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/zz_generated.deepcopy.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,26 +21,36 @@ limitations under the License. package runtime import ( - conversion "k8s.io/client-go/1.5/pkg/conversion" + conversion "k8s.io/apimachinery/pkg/conversion" + reflect "reflect" ) +// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them. +func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc { + return []conversion.GeneratedDeepCopyFunc{ + {Fn: DeepCopy_runtime_RawExtension, InType: reflect.TypeOf(&RawExtension{})}, + {Fn: DeepCopy_runtime_TypeMeta, InType: reflect.TypeOf(&TypeMeta{})}, + {Fn: DeepCopy_runtime_Unknown, InType: reflect.TypeOf(&Unknown{})}, + } +} + func DeepCopy_runtime_RawExtension(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*RawExtension) out := out.(*RawExtension) + *out = *in if in.Raw != nil { in, out := &in.Raw, &out.Raw *out = make([]byte, len(*in)) copy(*out, *in) - } else { - out.Raw = nil } - if in.Object == nil { - out.Object = nil - } else if newVal, err := c.DeepCopy(&in.Object); err != nil { - return err - } else { - out.Object = *newVal.(*Object) + // in.Object is kind 'Interface' + if in.Object != nil { + if newVal, err := c.DeepCopy(&in.Object); err != nil { + return err + } else { + out.Object = *newVal.(*Object) + } } return nil } @@ -50,8 +60,7 @@ func DeepCopy_runtime_TypeMeta(in interface{}, out interface{}, c *conversion.Cl { in := in.(*TypeMeta) out := out.(*TypeMeta) - out.APIVersion = in.APIVersion - out.Kind = in.Kind + *out = *in return nil } } @@ -60,16 +69,12 @@ func DeepCopy_runtime_Unknown(in interface{}, out interface{}, c *conversion.Clo { in := in.(*Unknown) out := out.(*Unknown) - out.TypeMeta = in.TypeMeta + *out = *in if in.Raw != nil { in, out := &in.Raw, &out.Raw *out = make([]byte, len(*in)) copy(*out, *in) - } else { - out.Raw = nil } - out.ContentEncoding = in.ContentEncoding - out.ContentType = in.ContentType return nil } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/selection/operator.go b/vendor/k8s.io/apimachinery/pkg/selection/operator.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/selection/operator.go rename to vendor/k8s.io/apimachinery/pkg/selection/operator.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/types/doc.go b/vendor/k8s.io/apimachinery/pkg/types/doc.go similarity index 92% rename from vendor/k8s.io/client-go/1.5/pkg/types/doc.go rename to vendor/k8s.io/apimachinery/pkg/types/doc.go index 783cbcdc8..5667fa992 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/types/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/types/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package types implements various generic types used throughout kubernetes. -package types +package types // import "k8s.io/apimachinery/pkg/types" diff --git a/vendor/k8s.io/client-go/1.5/pkg/types/namespacedname.go b/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/types/namespacedname.go rename to vendor/k8s.io/apimachinery/pkg/types/namespacedname.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/types/nodename.go b/vendor/k8s.io/apimachinery/pkg/types/nodename.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/types/nodename.go rename to vendor/k8s.io/apimachinery/pkg/types/nodename.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/v1/doc.go b/vendor/k8s.io/apimachinery/pkg/types/patch.go similarity index 56% rename from vendor/k8s.io/client-go/1.5/pkg/api/v1/doc.go rename to vendor/k8s.io/apimachinery/pkg/types/patch.go index 16aa549cb..d522d1dbd 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/v1/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/types/patch.go @@ -14,9 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/api -// +k8s:openapi-gen=true +package types -// Package v1 is the v1 version of the API. -package v1 +// Similarly to above, these are constants to support HTTP PATCH utilized by +// both the client and server that didn't make sense for a whole package to be +// dedicated to. +type PatchType string + +const ( + JSONPatchType PatchType = "application/json-patch+json" + MergePatchType PatchType = "application/merge-patch+json" + StrategicMergePatchType PatchType = "application/strategic-merge-patch+json" +) diff --git a/vendor/k8s.io/client-go/1.5/pkg/types/uid.go b/vendor/k8s.io/apimachinery/pkg/types/uid.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/types/uid.go rename to vendor/k8s.io/apimachinery/pkg/types/uid.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/types/unix_user_id.go b/vendor/k8s.io/apimachinery/pkg/types/unix_user_id.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/types/unix_user_id.go rename to vendor/k8s.io/apimachinery/pkg/types/unix_user_id.go diff --git a/vendor/k8s.io/apimachinery/pkg/util/diff/diff.go b/vendor/k8s.io/apimachinery/pkg/util/diff/diff.go new file mode 100644 index 000000000..0f730875e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/diff/diff.go @@ -0,0 +1,280 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package diff + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "sort" + "strings" + "text/tabwriter" + + "github.com/davecgh/go-spew/spew" + + "k8s.io/apimachinery/pkg/util/validation/field" +) + +// StringDiff diffs a and b and returns a human readable diff. +func StringDiff(a, b string) string { + ba := []byte(a) + bb := []byte(b) + out := []byte{} + i := 0 + for ; i < len(ba) && i < len(bb); i++ { + if ba[i] != bb[i] { + break + } + out = append(out, ba[i]) + } + out = append(out, []byte("\n\nA: ")...) + out = append(out, ba[i:]...) + out = append(out, []byte("\n\nB: ")...) + out = append(out, bb[i:]...) + out = append(out, []byte("\n\n")...) + return string(out) +} + +// ObjectDiff writes the two objects out as JSON and prints out the identical part of +// the objects followed by the remaining part of 'a' and finally the remaining part of 'b'. +// For debugging tests. +func ObjectDiff(a, b interface{}) string { + ab, err := json.Marshal(a) + if err != nil { + panic(fmt.Sprintf("a: %v", err)) + } + bb, err := json.Marshal(b) + if err != nil { + panic(fmt.Sprintf("b: %v", err)) + } + return StringDiff(string(ab), string(bb)) +} + +// ObjectGoPrintDiff is like ObjectDiff, but uses go-spew to print the objects, +// which shows absolutely everything by recursing into every single pointer +// (go's %#v formatters OTOH stop at a certain point). This is needed when you +// can't figure out why reflect.DeepEqual is returning false and nothing is +// showing you differences. This will. +func ObjectGoPrintDiff(a, b interface{}) string { + s := spew.ConfigState{DisableMethods: true} + return StringDiff( + s.Sprintf("%#v", a), + s.Sprintf("%#v", b), + ) +} + +func ObjectReflectDiff(a, b interface{}) string { + vA, vB := reflect.ValueOf(a), reflect.ValueOf(b) + if vA.Type() != vB.Type() { + return fmt.Sprintf("type A %T and type B %T do not match", a, b) + } + diffs := objectReflectDiff(field.NewPath("object"), vA, vB) + if len(diffs) == 0 { + return "" + } + out := []string{""} + for _, d := range diffs { + out = append(out, + fmt.Sprintf("%s:", d.path), + limit(fmt.Sprintf(" a: %#v", d.a), 80), + limit(fmt.Sprintf(" b: %#v", d.b), 80), + ) + } + return strings.Join(out, "\n") +} + +func limit(s string, max int) string { + if len(s) > max { + return s[:max] + } + return s +} + +func public(s string) bool { + if len(s) == 0 { + return false + } + return s[:1] == strings.ToUpper(s[:1]) +} + +type diff struct { + path *field.Path + a, b interface{} +} + +type orderedDiffs []diff + +func (d orderedDiffs) Len() int { return len(d) } +func (d orderedDiffs) Swap(i, j int) { d[i], d[j] = d[j], d[i] } +func (d orderedDiffs) Less(i, j int) bool { + a, b := d[i].path.String(), d[j].path.String() + if a < b { + return true + } + return false +} + +func objectReflectDiff(path *field.Path, a, b reflect.Value) []diff { + switch a.Type().Kind() { + case reflect.Struct: + var changes []diff + for i := 0; i < a.Type().NumField(); i++ { + if !public(a.Type().Field(i).Name) { + if reflect.DeepEqual(a.Interface(), b.Interface()) { + continue + } + return []diff{{path: path, a: fmt.Sprintf("%#v", a), b: fmt.Sprintf("%#v", b)}} + } + if sub := objectReflectDiff(path.Child(a.Type().Field(i).Name), a.Field(i), b.Field(i)); len(sub) > 0 { + changes = append(changes, sub...) + } else { + if !reflect.DeepEqual(a.Field(i).Interface(), b.Field(i).Interface()) { + changes = append(changes, diff{path: path, a: a.Field(i).Interface(), b: b.Field(i).Interface()}) + } + } + } + return changes + case reflect.Ptr, reflect.Interface: + if a.IsNil() || b.IsNil() { + switch { + case a.IsNil() && b.IsNil(): + return nil + case a.IsNil(): + return []diff{{path: path, a: nil, b: b.Interface()}} + default: + return []diff{{path: path, a: a.Interface(), b: nil}} + } + } + return objectReflectDiff(path, a.Elem(), b.Elem()) + case reflect.Chan: + if !reflect.DeepEqual(a.Interface(), b.Interface()) { + return []diff{{path: path, a: a.Interface(), b: b.Interface()}} + } + return nil + case reflect.Slice: + lA, lB := a.Len(), b.Len() + l := lA + if lB < lA { + l = lB + } + if lA == lB && lA == 0 { + if a.IsNil() != b.IsNil() { + return []diff{{path: path, a: a.Interface(), b: b.Interface()}} + } + return nil + } + for i := 0; i < l; i++ { + if !reflect.DeepEqual(a.Index(i), b.Index(i)) { + return objectReflectDiff(path.Index(i), a.Index(i), b.Index(i)) + } + } + var diffs []diff + for i := l; i < lA; i++ { + diffs = append(diffs, diff{path: path.Index(i), a: a.Index(i), b: nil}) + } + for i := l; i < lB; i++ { + diffs = append(diffs, diff{path: path.Index(i), a: nil, b: b.Index(i)}) + } + if len(diffs) == 0 { + diffs = append(diffs, diff{path: path, a: a, b: b}) + } + return diffs + case reflect.Map: + if reflect.DeepEqual(a.Interface(), b.Interface()) { + return nil + } + aKeys := make(map[interface{}]interface{}) + for _, key := range a.MapKeys() { + aKeys[key.Interface()] = a.MapIndex(key).Interface() + } + var missing []diff + for _, key := range b.MapKeys() { + if _, ok := aKeys[key.Interface()]; ok { + delete(aKeys, key.Interface()) + if reflect.DeepEqual(a.MapIndex(key).Interface(), b.MapIndex(key).Interface()) { + continue + } + missing = append(missing, objectReflectDiff(path.Key(fmt.Sprintf("%s", key.Interface())), a.MapIndex(key), b.MapIndex(key))...) + continue + } + missing = append(missing, diff{path: path.Key(fmt.Sprintf("%s", key.Interface())), a: nil, b: b.MapIndex(key).Interface()}) + } + for key, value := range aKeys { + missing = append(missing, diff{path: path.Key(fmt.Sprintf("%s", key)), a: value, b: nil}) + } + if len(missing) == 0 { + missing = append(missing, diff{path: path, a: a.Interface(), b: b.Interface()}) + } + sort.Sort(orderedDiffs(missing)) + return missing + default: + if reflect.DeepEqual(a.Interface(), b.Interface()) { + return nil + } + if !a.CanInterface() { + return []diff{{path: path, a: fmt.Sprintf("%#v", a), b: fmt.Sprintf("%#v", b)}} + } + return []diff{{path: path, a: a.Interface(), b: b.Interface()}} + } +} + +// ObjectGoPrintSideBySide prints a and b as textual dumps side by side, +// enabling easy visual scanning for mismatches. +func ObjectGoPrintSideBySide(a, b interface{}) string { + s := spew.ConfigState{ + Indent: " ", + // Extra deep spew. + DisableMethods: true, + } + sA := s.Sdump(a) + sB := s.Sdump(b) + + linesA := strings.Split(sA, "\n") + linesB := strings.Split(sB, "\n") + width := 0 + for _, s := range linesA { + l := len(s) + if l > width { + width = l + } + } + for _, s := range linesB { + l := len(s) + if l > width { + width = l + } + } + buf := &bytes.Buffer{} + w := tabwriter.NewWriter(buf, width, 0, 1, ' ', 0) + max := len(linesA) + if len(linesB) > max { + max = len(linesB) + } + for i := 0; i < max; i++ { + var a, b string + if i < len(linesA) { + a = linesA[i] + } + if i < len(linesB) { + b = linesB[i] + } + fmt.Fprintf(w, "%s\t%s\n", a, b) + } + w.Flush() + return buf.String() +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/errors/doc.go b/vendor/k8s.io/apimachinery/pkg/util/errors/doc.go similarity index 91% rename from vendor/k8s.io/client-go/1.5/pkg/util/errors/doc.go rename to vendor/k8s.io/apimachinery/pkg/util/errors/doc.go index b3b39bc38..5d4d6250a 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/errors/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/util/errors/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package errors implements various utility functions and types around errors. -package errors +package errors // import "k8s.io/apimachinery/pkg/util/errors" diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/errors/errors.go b/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/util/errors/errors.go rename to vendor/k8s.io/apimachinery/pkg/util/errors/errors.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/framer/framer.go b/vendor/k8s.io/apimachinery/pkg/util/framer/framer.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/util/framer/framer.go rename to vendor/k8s.io/apimachinery/pkg/util/framer/framer.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/intstr/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go similarity index 78% rename from vendor/k8s.io/client-go/1.5/pkg/util/intstr/generated.pb.go rename to vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go index de36b07ae..7b9c554e0 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/intstr/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,14 +15,14 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/pkg/util/intstr/generated.proto +// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto // DO NOT EDIT! /* Package intstr is a generated protocol buffer package. It is generated from these files: - k8s.io/kubernetes/pkg/util/intstr/generated.proto + k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto It has these top-level messages: IntOrString @@ -49,7 +49,7 @@ func (*IntOrString) ProtoMessage() {} func (*IntOrString) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } func init() { - proto.RegisterType((*IntOrString)(nil), "k8s.io.client-go.1.5.pkg.util.intstr.IntOrString") + proto.RegisterType((*IntOrString)(nil), "k8s.io.apimachinery.pkg.util.intstr.IntOrString") } func (m *IntOrString) Marshal() (data []byte, err error) { size := m.Size() @@ -352,21 +352,23 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 256 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x32, 0xcc, 0xb6, 0x28, 0xd6, - 0xcb, 0xcc, 0xd7, 0xcf, 0x2e, 0x4d, 0x4a, 0x2d, 0xca, 0x4b, 0x2d, 0x49, 0x2d, 0xd6, 0x2f, 0xc8, - 0x4e, 0xd7, 0x2f, 0x2d, 0xc9, 0xcc, 0xd1, 0xcf, 0xcc, 0x2b, 0x29, 0x2e, 0x29, 0xd2, 0x4f, 0x4f, - 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x84, - 0x68, 0xd1, 0x43, 0x68, 0xd1, 0x03, 0x6a, 0xd1, 0x03, 0x69, 0xd1, 0x83, 0x68, 0x91, 0xd2, 0x4d, - 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, - 0xeb, 0x4c, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0xa2, 0xd2, 0x44, 0x46, 0x2e, - 0x6e, 0xcf, 0xbc, 0x12, 0xff, 0xa2, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0x74, 0x21, 0x0d, 0x2e, 0x96, - 0x92, 0xca, 0x82, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x66, 0x27, 0x91, 0x13, 0xf7, 0xe4, 0x19, - 0x1e, 0xdd, 0x93, 0x67, 0x09, 0x01, 0x8a, 0xfd, 0x82, 0xd2, 0x41, 0x60, 0x15, 0x42, 0x6a, 0x5c, - 0x6c, 0x40, 0x2b, 0xc3, 0x12, 0x73, 0x24, 0x98, 0x80, 0x6a, 0x59, 0x9d, 0xf8, 0xa0, 0x6a, 0xd9, - 0x3c, 0xc1, 0xa2, 0x41, 0x50, 0x59, 0x90, 0x3a, 0xa0, 0xbb, 0x40, 0xea, 0x98, 0x81, 0xea, 0x38, - 0x11, 0xea, 0x82, 0xc1, 0xa2, 0x41, 0x50, 0x59, 0x2b, 0x8e, 0x19, 0x0b, 0xe4, 0x19, 0x1a, 0xee, - 0x28, 0x30, 0x38, 0x69, 0x9c, 0x78, 0x28, 0xc7, 0x70, 0x01, 0x88, 0x6f, 0x00, 0x71, 0xc3, 0x23, - 0x39, 0xc6, 0x13, 0x40, 0x7c, 0x01, 0x88, 0x1f, 0x00, 0xf1, 0x84, 0xc7, 0x72, 0x0c, 0x51, 0x6c, - 0x10, 0xcf, 0x02, 0x02, 0x00, 0x00, 0xff, 0xff, 0x68, 0x57, 0xfb, 0xfa, 0x43, 0x01, 0x00, 0x00, + // 288 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x4c, 0x8f, 0x31, 0x4b, 0xf4, 0x30, + 0x1c, 0xc6, 0x93, 0xf7, 0xee, 0x3d, 0xb4, 0x82, 0x43, 0x71, 0x38, 0x1c, 0xd2, 0xa2, 0x20, 0x5d, + 0x4c, 0x56, 0x71, 0xec, 0x76, 0x20, 0x08, 0x3d, 0x71, 0x70, 0x6b, 0xef, 0x62, 0x2e, 0xf4, 0x2e, + 0x09, 0xe9, 0xbf, 0x42, 0xb7, 0xfb, 0x08, 0xba, 0x39, 0xfa, 0x71, 0x3a, 0xde, 0xe8, 0x20, 0x87, + 0xad, 0xdf, 0xc2, 0x49, 0x9a, 0x16, 0x74, 0x4a, 0x9e, 0xe7, 0xf9, 0xfd, 0x02, 0xf1, 0x6e, 0xf2, + 0xab, 0x82, 0x4a, 0xcd, 0xf2, 0x32, 0xe3, 0x56, 0x71, 0xe0, 0x05, 0x7b, 0xe2, 0x6a, 0xa9, 0x2d, + 0x1b, 0x86, 0xd4, 0xc8, 0x4d, 0xba, 0x58, 0x49, 0xc5, 0x6d, 0xc5, 0x4c, 0x2e, 0x58, 0x09, 0x72, + 0xcd, 0xa4, 0x82, 0x02, 0x2c, 0x13, 0x5c, 0x71, 0x9b, 0x02, 0x5f, 0x52, 0x63, 0x35, 0x68, 0xff, + 0xbc, 0x97, 0xe8, 0x5f, 0x89, 0x9a, 0x5c, 0xd0, 0x4e, 0xa2, 0xbd, 0x74, 0x7a, 0x29, 0x24, 0xac, + 0xca, 0x8c, 0x2e, 0xf4, 0x86, 0x09, 0x2d, 0x34, 0x73, 0x6e, 0x56, 0x3e, 0xba, 0xe4, 0x82, 0xbb, + 0xf5, 0x6f, 0x9e, 0xbd, 0x60, 0xef, 0x68, 0xa6, 0xe0, 0xd6, 0xce, 0xc1, 0x4a, 0x25, 0xfc, 0xc8, + 0x1b, 0x43, 0x65, 0xf8, 0x14, 0x87, 0x38, 0x1a, 0xc5, 0x27, 0xf5, 0x3e, 0x40, 0xed, 0x3e, 0x18, + 0xdf, 0x55, 0x86, 0x7f, 0x0f, 0x67, 0xe2, 0x08, 0xff, 0xc2, 0x9b, 0x48, 0x05, 0xf7, 0xe9, 0x7a, + 0xfa, 0x2f, 0xc4, 0xd1, 0xff, 0xf8, 0x78, 0x60, 0x27, 0x33, 0xd7, 0x26, 0xc3, 0xda, 0x71, 0x05, + 0xd8, 0x8e, 0x1b, 0x85, 0x38, 0x3a, 0xfc, 0xe5, 0xe6, 0xae, 0x4d, 0x86, 0xf5, 0xfa, 0xe0, 0xf5, + 0x2d, 0x40, 0xdb, 0x8f, 0x10, 0xc5, 0x51, 0xdd, 0x10, 0xb4, 0x6b, 0x08, 0x7a, 0x6f, 0x08, 0xda, + 0xb6, 0x04, 0xd7, 0x2d, 0xc1, 0xbb, 0x96, 0xe0, 0xcf, 0x96, 0xe0, 0xe7, 0x2f, 0x82, 0x1e, 0x26, + 0xfd, 0x67, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x55, 0xdf, 0x2a, 0x60, 0x01, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/intstr/generated.proto b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto similarity index 93% rename from vendor/k8s.io/client-go/1.5/pkg/util/intstr/generated.proto rename to vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto index 4dc4e994a..cccaf6f68 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/intstr/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ limitations under the License. syntax = 'proto2'; -package k8s.io.kubernetes.pkg.util.intstr; +package k8s.io.apimachinery.pkg.util.intstr; // Package-wide variables from generator "generated". option go_package = "intstr"; diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/intstr/intstr.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go similarity index 88% rename from vendor/k8s.io/client-go/1.5/pkg/util/intstr/intstr.go rename to vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go index 28c0c0ed4..02586b348 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/intstr/intstr.go +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go @@ -20,12 +20,14 @@ import ( "encoding/json" "fmt" "math" + "runtime/debug" "strconv" "strings" - "k8s.io/client-go/1.5/pkg/genericapiserver/openapi/common" + "k8s.io/apimachinery/pkg/openapi" "github.com/go-openapi/spec" + "github.com/golang/glog" "github.com/google/gofuzz" ) @@ -57,6 +59,9 @@ const ( // than int32. // TODO: convert to (val int32) func FromInt(val int) IntOrString { + if val > math.MaxInt32 || val < math.MinInt32 { + glog.Errorf("value: %d overflows int32\n%s\n", val, debug.Stack()) + } return IntOrString{Type: Int, IntVal: int32(val)} } @@ -65,6 +70,16 @@ func FromString(val string) IntOrString { return IntOrString{Type: String, StrVal: val} } +// Parse the given string and try to convert it to an integer before +// setting it as a string value. +func Parse(val string) IntOrString { + i, err := strconv.Atoi(val) + if err != nil { + return FromString(val) + } + return FromInt(i) +} + // UnmarshalJSON implements the json.Unmarshaller interface. func (intstr *IntOrString) UnmarshalJSON(value []byte) error { if value[0] == '"' { @@ -105,8 +120,8 @@ func (intstr IntOrString) MarshalJSON() ([]byte, error) { } } -func (_ IntOrString) OpenAPIDefinition() common.OpenAPIDefinition { - return common.OpenAPIDefinition{ +func (_ IntOrString) OpenAPIDefinition() openapi.OpenAPIDefinition { + return openapi.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/json/json.go b/vendor/k8s.io/apimachinery/pkg/util/json/json.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/util/json/json.go rename to vendor/k8s.io/apimachinery/pkg/util/json/json.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/net/http.go b/vendor/k8s.io/apimachinery/pkg/util/net/http.go similarity index 98% rename from vendor/k8s.io/client-go/1.5/pkg/util/net/http.go rename to vendor/k8s.io/apimachinery/pkg/util/net/http.go index bfe2e0937..c32082e93 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/net/http.go +++ b/vendor/k8s.io/apimachinery/pkg/util/net/http.go @@ -138,6 +138,10 @@ func CloneTLSConfig(cfg *tls.Config) *tls.Config { } } +type TLSClientConfigHolder interface { + TLSClientConfig() *tls.Config +} + func TLSClientConfig(transport http.RoundTripper) (*tls.Config, error) { if transport == nil { return nil, nil @@ -146,6 +150,8 @@ func TLSClientConfig(transport http.RoundTripper) (*tls.Config, error) { switch transport := transport.(type) { case *http.Transport: return transport.TLSClientConfig, nil + case TLSClientConfigHolder: + return transport.TLSClientConfig(), nil case RoundTripperWrapper: return TLSClientConfig(transport.WrappedRoundTripper()) default: diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/net/interface.go b/vendor/k8s.io/apimachinery/pkg/util/net/interface.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/util/net/interface.go rename to vendor/k8s.io/apimachinery/pkg/util/net/interface.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/net/port_range.go b/vendor/k8s.io/apimachinery/pkg/util/net/port_range.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/util/net/port_range.go rename to vendor/k8s.io/apimachinery/pkg/util/net/port_range.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/net/port_split.go b/vendor/k8s.io/apimachinery/pkg/util/net/port_split.go similarity index 98% rename from vendor/k8s.io/client-go/1.5/pkg/util/net/port_split.go rename to vendor/k8s.io/apimachinery/pkg/util/net/port_split.go index 74983498d..c0fd4e20f 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/net/port_split.go +++ b/vendor/k8s.io/apimachinery/pkg/util/net/port_split.go @@ -19,7 +19,7 @@ package net import ( "strings" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/sets" ) var validSchemes = sets.NewString("http", "https", "") diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/net/util.go b/vendor/k8s.io/apimachinery/pkg/util/net/util.go similarity index 81% rename from vendor/k8s.io/client-go/1.5/pkg/util/net/util.go rename to vendor/k8s.io/apimachinery/pkg/util/net/util.go index 1348f4dee..461144f0b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/net/util.go +++ b/vendor/k8s.io/apimachinery/pkg/util/net/util.go @@ -19,6 +19,7 @@ package net import ( "net" "reflect" + "syscall" ) // IPNetEqual checks if the two input IPNets are representing the same subnet. @@ -34,3 +35,12 @@ func IPNetEqual(ipnet1, ipnet2 *net.IPNet) bool { } return false } + +// Returns if the given err is "connection reset by peer" error. +func IsConnectionReset(err error) bool { + opErr, ok := err.(*net.OpError) + if ok && opErr.Err.Error() == syscall.ECONNRESET.Error() { + return true + } + return false +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/rand/rand.go b/vendor/k8s.io/apimachinery/pkg/util/rand/rand.go similarity index 84% rename from vendor/k8s.io/client-go/1.5/pkg/util/rand/rand.go rename to vendor/k8s.io/apimachinery/pkg/util/rand/rand.go index 134c15260..db109c2cd 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/rand/rand.go +++ b/vendor/k8s.io/apimachinery/pkg/util/rand/rand.go @@ -23,8 +23,6 @@ import ( "time" ) -var letters = []rune("abcdefghijklmnopqrstuvwxyz0123456789") -var numLetters = len(letters) var rng = struct { sync.Mutex rand *rand.Rand @@ -72,12 +70,16 @@ func Perm(n int) []int { return rng.rand.Perm(n) } -// String generates a random alphanumeric string n characters long. This will -// panic if n is less than zero. +// We omit vowels from the set of available characters to reduce the chances +// of "bad words" being formed. +var alphanums = []rune("bcdfghjklmnpqrstvwxz0123456789") + +// String generates a random alphanumeric string, without vowels, which is n +// characters long. This will panic if n is less than zero. func String(length int) string { b := make([]rune, length) for i := range b { - b[i] = letters[Intn(numLetters)] + b[i] = alphanums[Intn(len(alphanums))] } return string(b) } diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/runtime/runtime.go b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go similarity index 76% rename from vendor/k8s.io/client-go/1.5/pkg/util/runtime/runtime.go rename to vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go index 976de49d5..748174e19 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/runtime/runtime.go +++ b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go @@ -19,6 +19,8 @@ package runtime import ( "fmt" "runtime" + "sync" + "time" "github.com/golang/glog" ) @@ -79,7 +81,18 @@ func getCallers(r interface{}) string { // ErrorHandlers is a list of functions which will be invoked when an unreturnable // error occurs. -var ErrorHandlers = []func(error){logError} +// TODO(lavalamp): for testability, this and the below HandleError function +// should be packaged up into a testable and reusable object. +var ErrorHandlers = []func(error){ + logError, + (&rudimentaryErrorBackoff{ + lastErrorTime: time.Now(), + // 1ms was the number folks were able to stomach as a global rate limit. + // If you need to log errors more than 1000 times a second you + // should probably consider fixing your code instead. :) + minPeriod: time.Millisecond, + }).OnError, +} // HandlerError is a method to invoke when a non-user facing piece of code cannot // return an error and needs to indicate it has been ignored. Invoking this method @@ -101,6 +114,26 @@ func logError(err error) { glog.ErrorDepth(2, err) } +type rudimentaryErrorBackoff struct { + minPeriod time.Duration // immutable + // TODO(lavalamp): use the clock for testability. Need to move that + // package for that to be accessible here. + lastErrorTimeLock sync.Mutex + lastErrorTime time.Time +} + +// OnError will block if it is called more often than the embedded period time. +// This will prevent overly tight hot error loops. +func (r *rudimentaryErrorBackoff) OnError(error) { + r.lastErrorTimeLock.Lock() + defer r.lastErrorTimeLock.Unlock() + d := time.Since(r.lastErrorTime) + if d < r.minPeriod { + time.Sleep(r.minPeriod - d) + } + r.lastErrorTime = time.Now() +} + // GetCaller returns the caller of the function that calls it. func GetCaller() string { var pc [1]uintptr diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/sets/byte.go b/vendor/k8s.io/apimachinery/pkg/util/sets/byte.go similarity index 99% rename from vendor/k8s.io/client-go/1.5/pkg/util/sets/byte.go rename to vendor/k8s.io/apimachinery/pkg/util/sets/byte.go index 3d6d0dfe4..a460e4b1f 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/sets/byte.go +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/byte.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/sets/doc.go b/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go similarity index 94% rename from vendor/k8s.io/client-go/1.5/pkg/util/sets/doc.go rename to vendor/k8s.io/apimachinery/pkg/util/sets/doc.go index c5e541621..28a6a7d5c 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/sets/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/sets/empty.go b/vendor/k8s.io/apimachinery/pkg/util/sets/empty.go similarity index 95% rename from vendor/k8s.io/client-go/1.5/pkg/util/sets/empty.go rename to vendor/k8s.io/apimachinery/pkg/util/sets/empty.go index 5654edd77..cd22b953a 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/sets/empty.go +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/empty.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/sets/int.go b/vendor/k8s.io/apimachinery/pkg/util/sets/int.go similarity index 99% rename from vendor/k8s.io/client-go/1.5/pkg/util/sets/int.go rename to vendor/k8s.io/apimachinery/pkg/util/sets/int.go index 6d32f84c7..0614e9fb0 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/sets/int.go +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/int.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/sets/int64.go b/vendor/k8s.io/apimachinery/pkg/util/sets/int64.go similarity index 99% rename from vendor/k8s.io/client-go/1.5/pkg/util/sets/int64.go rename to vendor/k8s.io/apimachinery/pkg/util/sets/int64.go index 1de18319b..82e1ba782 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/sets/int64.go +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/int64.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/sets/string.go b/vendor/k8s.io/apimachinery/pkg/util/sets/string.go similarity index 99% rename from vendor/k8s.io/client-go/1.5/pkg/util/sets/string.go rename to vendor/k8s.io/apimachinery/pkg/util/sets/string.go index da66eaf8e..baef7a6a2 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/sets/string.go +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/string.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/validation/field/errors.go b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go similarity index 85% rename from vendor/k8s.io/client-go/1.5/pkg/util/validation/field/errors.go rename to vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go index 0e303e37a..43c779a11 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/validation/field/errors.go +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go @@ -17,11 +17,12 @@ limitations under the License. package field import ( - "encoding/json" "fmt" + "reflect" "strings" - utilerrors "k8s.io/client-go/1.5/pkg/util/errors" + utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/apimachinery/pkg/util/sets" ) // Error is an implementation of the 'error' interface, which represents a @@ -48,14 +49,33 @@ func (v *Error) ErrorBody() string { case ErrorTypeRequired, ErrorTypeForbidden, ErrorTypeTooLong, ErrorTypeInternal: s = fmt.Sprintf("%s", v.Type) default: - var bad string - badBytes, err := json.Marshal(v.BadValue) - if err != nil { - bad = err.Error() - } else { - bad = string(badBytes) + value := v.BadValue + valueType := reflect.TypeOf(value) + if value == nil || valueType == nil { + value = "null" + } else if valueType.Kind() == reflect.Ptr { + if reflectValue := reflect.ValueOf(value); reflectValue.IsNil() { + value = "null" + } else { + value = reflectValue.Elem().Interface() + } + } + switch t := value.(type) { + case int64, int32, float64, float32, bool: + // use simple printer for simple types + s = fmt.Sprintf("%s: %v", v.Type, value) + case string: + s = fmt.Sprintf("%s: %q", v.Type, t) + case fmt.Stringer: + // anything that defines String() is better than raw struct + s = fmt.Sprintf("%s: %s", v.Type, t.String()) + default: + // fallback to raw struct + // TODO: internal types have panic guards against json.Marshalling to prevent + // accidental use of internal types in external serialized form. For now, use + // %#v, although it would be better to show a more expressive output in the future + s = fmt.Sprintf("%s: %#v", v.Type, value) } - s = fmt.Sprintf("%s: %s", v.Type, bad) } if len(v.Detail) != 0 { s += fmt.Sprintf(": %s", v.Detail) @@ -201,9 +221,15 @@ func NewErrorTypeMatcher(t ErrorType) utilerrors.Matcher { // ToAggregate converts the ErrorList into an errors.Aggregate. func (list ErrorList) ToAggregate() utilerrors.Aggregate { - errs := make([]error, len(list)) - for i := range list { - errs[i] = list[i] + errs := make([]error, 0, len(list)) + errorMsgs := sets.NewString() + for _, err := range list { + msg := fmt.Sprintf("%v", err) + if errorMsgs.Has(msg) { + continue + } + errorMsgs.Insert(msg) + errs = append(errs, err) } return utilerrors.NewAggregate(errs) } diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/validation/field/path.go b/vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/util/validation/field/path.go rename to vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go similarity index 74% rename from vendor/k8s.io/client-go/1.5/pkg/util/validation/validation.go rename to vendor/k8s.io/apimachinery/pkg/util/validation/validation.go index aac2357d7..a0afc26e7 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/validation/validation.go +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go @@ -27,6 +27,7 @@ import ( const qnameCharFmt string = "[A-Za-z0-9]" const qnameExtCharFmt string = "[-A-Za-z0-9_.]" const qualifiedNameFmt string = "(" + qnameCharFmt + qnameExtCharFmt + "*)?" + qnameCharFmt +const qualifiedNameErrMsg string = "must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character" const qualifiedNameMaxLength int = 63 var qualifiedNameRegexp = regexp.MustCompile("^" + qualifiedNameFmt + "$") @@ -51,8 +52,8 @@ func IsQualifiedName(value string) []string { errs = append(errs, prefixEach(msgs, "prefix part ")...) } default: - return append(errs, RegexError(qualifiedNameFmt, "MyName", "my.name", "123-abc")+ - " with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName'") + return append(errs, "a qualified name "+RegexError(qualifiedNameErrMsg, qualifiedNameFmt, "MyName", "my.name", "123-abc")+ + " with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')") } if len(name) == 0 { @@ -61,12 +62,13 @@ func IsQualifiedName(value string) []string { errs = append(errs, "name part "+MaxLenError(qualifiedNameMaxLength)) } if !qualifiedNameRegexp.MatchString(name) { - errs = append(errs, "name part "+RegexError(qualifiedNameFmt, "MyName", "my.name", "123-abc")) + errs = append(errs, "name part "+RegexError(qualifiedNameErrMsg, qualifiedNameFmt, "MyName", "my.name", "123-abc")) } return errs } const labelValueFmt string = "(" + qualifiedNameFmt + ")?" +const labelValueErrMsg string = "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character" const LabelValueMaxLength int = 63 var labelValueRegexp = regexp.MustCompile("^" + labelValueFmt + "$") @@ -80,12 +82,13 @@ func IsValidLabelValue(value string) []string { errs = append(errs, MaxLenError(LabelValueMaxLength)) } if !labelValueRegexp.MatchString(value) { - errs = append(errs, RegexError(labelValueFmt, "MyValue", "my_value", "12345")) + errs = append(errs, RegexError(labelValueErrMsg, labelValueFmt, "MyValue", "my_value", "12345")) } return errs } const dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?" +const dns1123LabelErrMsg string = "a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character" const DNS1123LabelMaxLength int = 63 var dns1123LabelRegexp = regexp.MustCompile("^" + dns1123LabelFmt + "$") @@ -98,12 +101,13 @@ func IsDNS1123Label(value string) []string { errs = append(errs, MaxLenError(DNS1123LabelMaxLength)) } if !dns1123LabelRegexp.MatchString(value) { - errs = append(errs, RegexError(dns1123LabelFmt, "my-name", "123-abc")) + errs = append(errs, RegexError(dns1123LabelErrMsg, dns1123LabelFmt, "my-name", "123-abc")) } return errs } const dns1123SubdomainFmt string = dns1123LabelFmt + "(\\." + dns1123LabelFmt + ")*" +const dns1123SubdomainErrorMsg string = "a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character" const DNS1123SubdomainMaxLength int = 253 var dns1123SubdomainRegexp = regexp.MustCompile("^" + dns1123SubdomainFmt + "$") @@ -116,12 +120,13 @@ func IsDNS1123Subdomain(value string) []string { errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength)) } if !dns1123SubdomainRegexp.MatchString(value) { - errs = append(errs, RegexError(dns1123SubdomainFmt, "example.com")) + errs = append(errs, RegexError(dns1123SubdomainErrorMsg, dns1123SubdomainFmt, "example.com")) } return errs } const dns1035LabelFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?" +const dns1035LabelErrMsg string = "a DNS-1035 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character" const DNS1035LabelMaxLength int = 63 var dns1035LabelRegexp = regexp.MustCompile("^" + dns1035LabelFmt + "$") @@ -134,7 +139,7 @@ func IsDNS1035Label(value string) []string { errs = append(errs, MaxLenError(DNS1035LabelMaxLength)) } if !dns1035LabelRegexp.MatchString(value) { - errs = append(errs, RegexError(dns1035LabelFmt, "my-name", "abc-123")) + errs = append(errs, RegexError(dns1035LabelErrMsg, dns1035LabelFmt, "my-name", "abc-123")) } return errs } @@ -143,24 +148,26 @@ func IsDNS1035Label(value string) []string { // examples: // - valid: *.bar.com, *.foo.bar.com // - invalid: *.*.bar.com, *.foo.*.com, *bar.com, f*.bar.com, * -const wildcardDNF1123SubdomainFmt = "\\*\\." + dns1123SubdomainFmt +const wildcardDNS1123SubdomainFmt = "\\*\\." + dns1123SubdomainFmt +const wildcardDNS1123SubdomainErrMsg = "a wildcard DNS-1123 subdomain must start with '*.', followed by a valid DNS subdomain, which must consist of lower case alphanumeric characters, '-' or '.' and end with an alphanumeric character" // IsWildcardDNS1123Subdomain tests for a string that conforms to the definition of a // wildcard subdomain in DNS (RFC 1034 section 4.3.3). func IsWildcardDNS1123Subdomain(value string) []string { - wildcardDNS1123SubdomainRegexp := regexp.MustCompile("^\\*\\." + dns1123SubdomainFmt + "$") + wildcardDNS1123SubdomainRegexp := regexp.MustCompile("^" + wildcardDNS1123SubdomainFmt + "$") var errs []string if len(value) > DNS1123SubdomainMaxLength { errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength)) } if !wildcardDNS1123SubdomainRegexp.MatchString(value) { - errs = append(errs, RegexError(wildcardDNF1123SubdomainFmt, "*.example.com")) + errs = append(errs, RegexError(wildcardDNS1123SubdomainErrMsg, wildcardDNS1123SubdomainFmt, "*.example.com")) } return errs } const cIdentifierFmt string = "[A-Za-z_][A-Za-z0-9_]*" +const identifierErrMsg string = "a valid C identifier must start with alphabetic character or '_', followed by a string of alphanumeric characters or '_'" var cIdentifierRegexp = regexp.MustCompile("^" + cIdentifierFmt + "$") @@ -168,7 +175,7 @@ var cIdentifierRegexp = regexp.MustCompile("^" + cIdentifierFmt + "$") // in C. This checks the format, but not the length. func IsCIdentifier(value string) []string { if !cIdentifierRegexp.MatchString(value) { - return []string{RegexError(cIdentifierFmt, "my_name", "MY_NAME", "MyName")} + return []string{RegexError(identifierErrMsg, cIdentifierFmt, "my_name", "MY_NAME", "MyName")} } return nil } @@ -225,7 +232,7 @@ func IsValidPortName(port string) []string { errs = append(errs, "must contain only alpha-numeric characters (a-z, 0-9), and hyphens (-)") } if !portNameOneLetterRegexp.MatchString(port) { - errs = append(errs, "must contain at least one letter (a-z)") + errs = append(errs, "must contain at least one letter or number (a-z, 0-9)") } if strings.Contains(port, "--") { errs = append(errs, "must not contain consecutive hyphens") @@ -245,17 +252,19 @@ func IsValidIP(value string) []string { } const percentFmt string = "[0-9]+%" +const percentErrMsg string = "a valid percent string must be a numeric string followed by an ending '%'" var percentRegexp = regexp.MustCompile("^" + percentFmt + "$") func IsValidPercent(percent string) []string { if !percentRegexp.MatchString(percent) { - return []string{RegexError(percentFmt, "1%", "93%")} + return []string{RegexError(percentErrMsg, percentFmt, "1%", "93%")} } return nil } const httpHeaderNameFmt string = "[-A-Za-z0-9]+" +const httpHeaderNameErrMsg string = "a valid HTTP header must consist of alphanumeric characters or '-'" var httpHeaderNameRegexp = regexp.MustCompile("^" + httpHeaderNameFmt + "$") @@ -263,12 +272,13 @@ var httpHeaderNameRegexp = regexp.MustCompile("^" + httpHeaderNameFmt + "$") // definition of a valid header field name (a stricter subset than RFC7230). func IsHTTPHeaderName(value string) []string { if !httpHeaderNameRegexp.MatchString(value) { - return []string{RegexError(httpHeaderNameFmt, "X-Header-Name")} + return []string{RegexError(httpHeaderNameErrMsg, httpHeaderNameFmt, "X-Header-Name")} } return nil } const configMapKeyFmt = `[-._a-zA-Z0-9]+` +const configMapKeyErrMsg string = "a valid config key must consist of alphanumeric characters, '-', '_' or '.'" var configMapKeyRegexp = regexp.MustCompile("^" + configMapKeyFmt + "$") @@ -279,12 +289,11 @@ func IsConfigMapKey(value string) []string { errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength)) } if !configMapKeyRegexp.MatchString(value) { - errs = append(errs, RegexError(configMapKeyFmt, "key.name", "KEY_NAME", "key-name")) + errs = append(errs, RegexError(configMapKeyErrMsg, configMapKeyFmt, "key.name", "KEY_NAME", "key-name")) } if value == "." { errs = append(errs, `must not be '.'`) - } - if value == ".." { + } else if value == ".." { errs = append(errs, `must not be '..'`) } else if strings.HasPrefix(value, "..") { errs = append(errs, `must not start with '..'`) @@ -299,19 +308,19 @@ func MaxLenError(length int) string { } // RegexError returns a string explanation of a regex validation failure. -func RegexError(fmt string, examples ...string) string { - s := "must match the regex " + fmt +func RegexError(msg string, fmt string, examples ...string) string { if len(examples) == 0 { - return s + return msg + " (regex used for validation is '" + fmt + "')" } - s += " (e.g. " + msg += " (e.g. " for i := range examples { if i > 0 { - s += " or " + msg += " or " } - s += "'" + examples[i] + "'" + msg += "'" + examples[i] + "', " } - return s + ")" + msg += "regex used for validation is '" + fmt + "')" + return msg } // EmptyError returns a string explanation of a "must not be empty" validation diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/wait/doc.go b/vendor/k8s.io/apimachinery/pkg/util/wait/doc.go similarity index 91% rename from vendor/k8s.io/client-go/1.5/pkg/util/wait/doc.go rename to vendor/k8s.io/apimachinery/pkg/util/wait/doc.go index ff89dc170..3f0c968ec 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/wait/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/util/wait/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package wait provides tools for polling or listening for changes // to a condition. -package wait +package wait // import "k8s.io/apimachinery/pkg/util/wait" diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/wait/wait.go b/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go similarity index 61% rename from vendor/k8s.io/client-go/1.5/pkg/util/wait/wait.go rename to vendor/k8s.io/apimachinery/pkg/util/wait/wait.go index b58a6288d..4704afd91 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/wait/wait.go +++ b/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go @@ -20,6 +20,8 @@ import ( "errors" "math/rand" "time" + + "k8s.io/apimachinery/pkg/util/runtime" ) // For any test of the style: @@ -34,33 +36,42 @@ var ForeverTestTimeout = time.Second * 30 // NeverStop may be passed to Until to make it never stop. var NeverStop <-chan struct{} = make(chan struct{}) -// Forever is syntactic sugar on top of Until +// Forever calls f every period for ever. +// +// Forever is syntactic sugar on top of Until. func Forever(f func(), period time.Duration) { Until(f, period, NeverStop) } // Until loops until stop channel is closed, running f every period. -// Until is syntactic sugar on top of JitterUntil with zero jitter -// factor, with sliding = true (which means the timer for period -// starts after the f completes). +// +// Until is syntactic sugar on top of JitterUntil with zero jitter factor and +// with sliding = true (which means the timer for period starts after the f +// completes). func Until(f func(), period time.Duration, stopCh <-chan struct{}) { JitterUntil(f, period, 0.0, true, stopCh) } // NonSlidingUntil loops until stop channel is closed, running f every -// period. NonSlidingUntil is syntactic sugar on top of JitterUntil -// with zero jitter factor, with sliding = false (meaning the timer for -// period starts at the same time as the function starts). +// period. +// +// NonSlidingUntil is syntactic sugar on top of JitterUntil with zero jitter +// factor, with sliding = false (meaning the timer for period starts at the same +// time as the function starts). func NonSlidingUntil(f func(), period time.Duration, stopCh <-chan struct{}) { JitterUntil(f, period, 0.0, false, stopCh) } // JitterUntil loops until stop channel is closed, running f every period. +// // If jitterFactor is positive, the period is jittered before every run of f. -// If jitterFactor is not positive, the period is unchanged. -// Catches any panics, and keeps going. f may not be invoked if -// stop channel is already closed. Pass NeverStop to Until if you -// don't want it stop. +// If jitterFactor is not positive, the period is unchanged and not jitterd. +// +// If slidingis true, the period is computed after f runs. If it is false then +// period includes the runtime for f. +// +// Close stopCh to stop. f may not be invoked if stop channel is already +// closed. Pass NeverStop to if you don't want it stop. func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding bool, stopCh <-chan struct{}) { for { @@ -81,6 +92,7 @@ func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding b } func() { + defer runtime.HandleCrash() f() }() @@ -101,9 +113,11 @@ func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding b } } -// Jitter returns a time.Duration between duration and duration + maxFactor * duration, -// to allow clients to avoid converging on periodic behavior. If maxFactor is 0.0, a -// suggested default value will be chosen. +// Jitter returns a time.Duration between duration and duration + maxFactor * +// duration. +// +// This allows clients to avoid converging on periodic behavior. If maxFactor +// is 0.0, a suggested default value will be chosen. func Jitter(duration time.Duration, maxFactor float64) time.Duration { if maxFactor <= 0.0 { maxFactor = 1.0 @@ -112,26 +126,31 @@ func Jitter(duration time.Duration, maxFactor float64) time.Duration { return wait } -// ErrWaitTimeout is returned when the condition exited without success +// ErrWaitTimeout is returned when the condition exited without success. var ErrWaitTimeout = errors.New("timed out waiting for the condition") // ConditionFunc returns true if the condition is satisfied, or an error // if the loop should be aborted. type ConditionFunc func() (done bool, err error) -// Backoff is parameters applied to a Backoff function. +// Backoff holds parameters applied to a Backoff function. type Backoff struct { - Duration time.Duration - Factor float64 - Jitter float64 - Steps int + Duration time.Duration // the base duration + Factor float64 // Duration is multipled by factor each iteration + Jitter float64 // The amount of jitter applied each iteration + Steps int // Exit with error after this many steps } -// ExponentialBackoff repeats a condition check up to steps times, increasing the wait -// by multipling the previous duration by factor. If jitter is greater than zero, -// a random amount of each duration is added (between duration and duration*(1+jitter)). -// If the condition never returns true, ErrWaitTimeout is returned. All other errors -// terminate immediately. +// ExponentialBackoff repeats a condition check with exponential backoff. +// +// It checks the condition up to Steps times, increasing the wait by multipling +// the previous duration by Factor. +// +// If Jitter is greater than zero, a random amount of each duration is added +// (between duration and duration*(1+jitter)). +// +// If the condition never returns true, ErrWaitTimeout is returned. All other +// errors terminate immediately. func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error { duration := backoff.Duration for i := 0; i < backoff.Steps; i++ { @@ -151,22 +170,33 @@ func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error { } // Poll tries a condition func until it returns true, an error, or the timeout -// is reached. condition will always be invoked at least once but some intervals -// may be missed if the condition takes too long or the time window is too short. +// is reached. +// +// Poll always waits the interval before the run of 'condition'. +// 'condition' will always be invoked at least once. +// +// Some intervals may be missed if the condition takes too long or the time +// window is too short. +// // If you want to Poll something forever, see PollInfinite. -// Poll always waits the interval before the first check of the condition. func Poll(interval, timeout time.Duration, condition ConditionFunc) error { return pollInternal(poller(interval, timeout), condition) } func pollInternal(wait WaitFunc, condition ConditionFunc) error { - done := make(chan struct{}) - defer close(done) - return WaitFor(wait, condition, done) + return WaitFor(wait, condition, NeverStop) } -// PollImmediate is identical to Poll, except that it performs the first check -// immediately, not waiting interval beforehand. +// PollImmediate tries a condition func until it returns true, an error, or the timeout +// is reached. +// +// Poll always checks 'condition' before waiting for the interval. 'condition' +// will always be invoked at least once. +// +// Some intervals may be missed if the condition takes too long or the time +// window is too short. +// +// If you want to Poll something forever, see PollInfinite. func PollImmediate(interval, timeout time.Duration, condition ConditionFunc) error { return pollImmediateInternal(poller(interval, timeout), condition) } @@ -182,14 +212,40 @@ func pollImmediateInternal(wait WaitFunc, condition ConditionFunc) error { return pollInternal(wait, condition) } -// PollInfinite polls forever. +// PollInfinite tries a condition func until it returns true or an error +// +// PollInfinite always waits the interval before the run of 'condition'. +// +// Some intervals may be missed if the condition takes too long or the time +// window is too short. func PollInfinite(interval time.Duration, condition ConditionFunc) error { done := make(chan struct{}) defer close(done) return PollUntil(interval, condition, done) } -// PollUntil is like Poll, but it takes a stop change instead of total duration +// PollImmediateInfinite tries a condition func until it returns true or an error +// +// PollImmediateInfinite runs the 'condition' before waiting for the interval. +// +// Some intervals may be missed if the condition takes too long or the time +// window is too short. +func PollImmediateInfinite(interval time.Duration, condition ConditionFunc) error { + done, err := condition() + if err != nil { + return err + } + if done { + return nil + } + return PollInfinite(interval, condition) +} + +// PollUntil tries a condition func until it returns true, an error or stopCh is +// closed. +// +// PolUntil always waits interval before the first run of 'condition'. +// 'condition' will always be invoked at least once. func PollUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan struct{}) error { return WaitFor(poller(interval, 0), condition, stopCh) } @@ -198,11 +254,16 @@ func PollUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan st // should be executed and is closed when the last test should be invoked. type WaitFunc func(done <-chan struct{}) <-chan struct{} -// WaitFor gets a channel from wait(), and then invokes fn once for every value -// placed on the channel and once more when the channel is closed. If fn -// returns an error the loop ends and that error is returned, and if fn returns -// true the loop ends and nil is returned. ErrWaitTimeout will be returned if -// the channel is closed without fn ever returning true. +// WaitFor continually checks 'fn' as driven by 'wait'. +// +// WaitFor gets a channel from 'wait()'', and then invokes 'fn' once for every value +// placed on the channel and once more when the channel is closed. +// +// If 'fn' returns an error the loop ends and that error is returned, and if +// 'fn' returns true the loop ends and nil is returned. +// +// ErrWaitTimeout will be returned if the channel is closed without fn ever +// returning true. func WaitFor(wait WaitFunc, fn ConditionFunc, done <-chan struct{}) error { c := wait(done) for { @@ -221,11 +282,14 @@ func WaitFor(wait WaitFunc, fn ConditionFunc, done <-chan struct{}) error { return ErrWaitTimeout } -// poller returns a WaitFunc that will send to the channel every -// interval until timeout has elapsed and then close the channel. -// Over very short intervals you may receive no ticks before -// the channel is closed. If timeout is 0, the channel -// will never be closed. +// poller returns a WaitFunc that will send to the channel every interval until +// timeout has elapsed and then closes the channel. +// +// Over very short intervals you may receive no ticks before the channel is +// closed. A timeout of 0 is interpreted as an infinity. +// +// Output ticks are not buffered. If the channel is not ready to receive an +// item, the tick is skipped. func poller(interval, timeout time.Duration) WaitFunc { return WaitFunc(func(done <-chan struct{}) <-chan struct{} { ch := make(chan struct{}) diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/yaml/decoder.go b/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go similarity index 85% rename from vendor/k8s.io/client-go/1.5/pkg/util/yaml/decoder.go rename to vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go index c65c2d6ba..6ebfaea70 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/yaml/decoder.go +++ b/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go @@ -69,11 +69,10 @@ func (d *YAMLToJSONDecoder) Decode(into interface{}) error { } if len(bytes) != 0 { - data, err := yaml.YAMLToJSON(bytes) + err := yaml.Unmarshal(bytes, into) if err != nil { - return err + return YAMLSyntaxError{err} } - return json.Unmarshal(data, into) } return err } @@ -137,7 +136,7 @@ func (d *YAMLDecoder) Close() error { } const yamlSeparator = "\n---" -const separator = "---\n" +const separator = "---" // splitYAMLDocument is a bufio.SplitFunc for splitting YAML streams into individual documents. func splitYAMLDocument(data []byte, atEOF bool) (advance int, token []byte, err error) { @@ -181,6 +180,24 @@ type YAMLOrJSONDecoder struct { bufferSize int decoder decoder + rawData []byte +} + +type JSONSyntaxError struct { + Line int + Err error +} + +func (e JSONSyntaxError) Error() string { + return fmt.Sprintf("json: line %d: %s", e.Line, e.Err.Error()) +} + +type YAMLSyntaxError struct { + err error +} + +func (e YAMLSyntaxError) Error() string { + return e.err.Error() } // NewYAMLOrJSONDecoder returns a decoder that will process YAML documents @@ -198,10 +215,11 @@ func NewYAMLOrJSONDecoder(r io.Reader, bufferSize int) *YAMLOrJSONDecoder { // provide object, or returns an error. func (d *YAMLOrJSONDecoder) Decode(into interface{}) error { if d.decoder == nil { - buffer, isJSON := GuessJSONStream(d.r, d.bufferSize) + buffer, origData, isJSON := GuessJSONStream(d.r, d.bufferSize) if isJSON { glog.V(4).Infof("decoding stream as JSON") d.decoder = json.NewDecoder(buffer) + d.rawData = origData } else { glog.V(4).Infof("decoding stream as YAML") d.decoder = NewYAMLToJSONDecoder(buffer) @@ -215,9 +233,19 @@ func (d *YAMLOrJSONDecoder) Decode(into interface{}) error { glog.V(4).Infof("reading stream failed: %v", readErr) } js := string(data) + + // if contents from io.Reader are not complete, + // use the original raw data to prevent panic + if int64(len(js)) <= syntax.Offset { + js = string(d.rawData) + } + start := strings.LastIndex(js[:syntax.Offset], "\n") + 1 line := strings.Count(js[:start], "\n") - return fmt.Errorf("json: line %d: %s", line, syntax.Error()) + return JSONSyntaxError{ + Line: line, + Err: fmt.Errorf(syntax.Error()), + } } } return err @@ -246,16 +274,28 @@ func (r *YAMLReader) Read() ([]byte, error) { return nil, err } - if string(line) == separator || err == io.EOF { + sep := len([]byte(separator)) + if i := bytes.Index(line, []byte(separator)); i == 0 { + // We have a potential document terminator + i += sep + after := line[i:] + if len(strings.TrimRightFunc(string(after), unicode.IsSpace)) == 0 { + if buffer.Len() != 0 { + return buffer.Bytes(), nil + } + if err == io.EOF { + return nil, err + } + } + } + if err == io.EOF { if buffer.Len() != 0 { + // If we're at EOF, we have a final, non-terminated line. Return it. return buffer.Bytes(), nil } - if err == io.EOF { - return nil, err - } - } else { - buffer.Write(line) + return nil, err } + buffer.Write(line) } } @@ -284,10 +324,10 @@ func (r *LineReader) Read() ([]byte, error) { // GuessJSONStream scans the provided reader up to size, looking // for an open brace indicating this is JSON. It will return the // bufio.Reader it creates for the consumer. -func GuessJSONStream(r io.Reader, size int) (io.Reader, bool) { +func GuessJSONStream(r io.Reader, size int) (io.Reader, []byte, bool) { buffer := bufio.NewReaderSize(r, size) b, _ := buffer.Peek(size) - return buffer, hasJSONPrefix(b) + return buffer, b, hasJSONPrefix(b) } var jsonPrefix = []byte("{") diff --git a/vendor/k8s.io/apimachinery/pkg/version/doc.go b/vendor/k8s.io/apimachinery/pkg/version/doc.go new file mode 100644 index 000000000..5e77af7ea --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/version/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package version supplies the type for version information collected at build time. +// +k8s:openapi-gen=true +package version // import "k8s.io/apimachinery/pkg/version" diff --git a/vendor/k8s.io/client-go/1.5/pkg/version/version.go b/vendor/k8s.io/apimachinery/pkg/version/types.go similarity index 67% rename from vendor/k8s.io/client-go/1.5/pkg/version/version.go rename to vendor/k8s.io/apimachinery/pkg/version/types.go index 0da3aadde..72727b503 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/version/version.go +++ b/vendor/k8s.io/apimachinery/pkg/version/types.go @@ -16,11 +16,6 @@ limitations under the License. package version -import ( - "fmt" - "runtime" -) - // Info contains versioning information. // TODO: Add []string of api versions supported? It's still unclear // how we'll want to distribute that information. @@ -36,24 +31,6 @@ type Info struct { Platform string `json:"platform"` } -// Get returns the overall codebase version. It's for detecting -// what code a binary was built from. -func Get() Info { - // These variables typically come from -ldflags settings and in - // their absence fallback to the settings in pkg/version/base.go - return Info{ - Major: gitMajor, - Minor: gitMinor, - GitVersion: gitVersion, - GitCommit: gitCommit, - GitTreeState: gitTreeState, - BuildDate: buildDate, - GoVersion: runtime.Version(), - Compiler: runtime.Compiler, - Platform: fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH), - } -} - // String returns info as a human-friendly version string. func (info Info) String() string { return info.GitVersion diff --git a/vendor/k8s.io/client-go/1.5/pkg/watch/doc.go b/vendor/k8s.io/apimachinery/pkg/watch/doc.go similarity index 92% rename from vendor/k8s.io/client-go/1.5/pkg/watch/doc.go rename to vendor/k8s.io/apimachinery/pkg/watch/doc.go index 5fde5e742..7e6bf3fb9 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/watch/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/watch/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package watch contains a generic watchable interface, and a fake for // testing code that uses the watch interface. -package watch +package watch // import "k8s.io/apimachinery/pkg/watch" diff --git a/vendor/k8s.io/client-go/1.5/pkg/watch/filter.go b/vendor/k8s.io/apimachinery/pkg/watch/filter.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/watch/filter.go rename to vendor/k8s.io/apimachinery/pkg/watch/filter.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/watch/mux.go b/vendor/k8s.io/apimachinery/pkg/watch/mux.go similarity index 97% rename from vendor/k8s.io/client-go/1.5/pkg/watch/mux.go rename to vendor/k8s.io/apimachinery/pkg/watch/mux.go index 65b6609a1..fafccd78e 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/watch/mux.go +++ b/vendor/k8s.io/apimachinery/pkg/watch/mux.go @@ -19,8 +19,8 @@ package watch import ( "sync" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // FullChannelBehavior controls how the Broadcaster reacts if a watcher's watch @@ -81,8 +81,8 @@ const internalRunFunctionMarker = "internal-do-function" // a function type we can shoehorn into the queue. type functionFakeRuntimeObject func() -func (obj functionFakeRuntimeObject) GetObjectKind() unversioned.ObjectKind { - return unversioned.EmptyObjectKind +func (obj functionFakeRuntimeObject) GetObjectKind() schema.ObjectKind { + return schema.EmptyObjectKind } // Execute f, blocking the incoming queue (and waiting for it to drain first). diff --git a/vendor/k8s.io/client-go/1.5/pkg/watch/streamwatcher.go b/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go similarity index 96% rename from vendor/k8s.io/client-go/1.5/pkg/watch/streamwatcher.go rename to vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go index 92609a06c..93bb1cdf7 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/watch/streamwatcher.go +++ b/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go @@ -21,9 +21,9 @@ import ( "sync" "github.com/golang/glog" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/util/net" - utilruntime "k8s.io/client-go/1.5/pkg/util/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/net" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) // Decoder allows StreamWatcher to watch any stream for which a Decoder can be written. diff --git a/vendor/k8s.io/client-go/1.5/pkg/watch/until.go b/vendor/k8s.io/apimachinery/pkg/watch/until.go similarity index 88% rename from vendor/k8s.io/client-go/1.5/pkg/watch/until.go rename to vendor/k8s.io/apimachinery/pkg/watch/until.go index cd46b099c..6e139de59 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/watch/until.go +++ b/vendor/k8s.io/apimachinery/pkg/watch/until.go @@ -17,9 +17,10 @@ limitations under the License. package watch import ( + "errors" "time" - "k8s.io/client-go/1.5/pkg/util/wait" + "k8s.io/apimachinery/pkg/util/wait" ) // ConditionFunc returns true if the condition has been reached, false if it has not been reached yet, @@ -28,10 +29,14 @@ import ( // from false to true). type ConditionFunc func(event Event) (bool, error) +// errWatchClosed is returned when the watch channel is closed before timeout in Until. +var errWatchClosed = errors.New("watch closed before Until timeout") + // Until reads items from the watch until each provided condition succeeds, and then returns the last watch // encountered. The first condition that returns an error terminates the watch (and the event is also returned). // If no event has been received, the returned event will be nil. // Conditions are satisfied sequentially so as to provide a useful primitive for higher level composition. +// A zero timeout means to wait forever. func Until(timeout time.Duration, watcher Interface, conditions ...ConditionFunc) (*Event, error) { ch := watcher.ResultChan() defer watcher.Stop() @@ -40,7 +45,7 @@ func Until(timeout time.Duration, watcher Interface, conditions ...ConditionFunc after = time.After(timeout) } else { ch := make(chan time.Time) - close(ch) + defer close(ch) after = ch } var lastEvent *Event @@ -52,7 +57,7 @@ func Until(timeout time.Duration, watcher Interface, conditions ...ConditionFunc return lastEvent, err } if done { - break + continue } } ConditionSucceeded: @@ -60,7 +65,7 @@ func Until(timeout time.Duration, watcher Interface, conditions ...ConditionFunc select { case event, ok := <-ch: if !ok { - return lastEvent, wait.ErrWaitTimeout + return lastEvent, errWatchClosed } lastEvent = &event diff --git a/vendor/k8s.io/client-go/1.5/pkg/watch/watch.go b/vendor/k8s.io/apimachinery/pkg/watch/watch.go similarity index 60% rename from vendor/k8s.io/client-go/1.5/pkg/watch/watch.go rename to vendor/k8s.io/apimachinery/pkg/watch/watch.go index 861932af3..dd49c41f9 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/watch/watch.go +++ b/vendor/k8s.io/apimachinery/pkg/watch/watch.go @@ -17,9 +17,10 @@ limitations under the License. package watch import ( + "fmt" "sync" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" "github.com/golang/glog" ) @@ -44,6 +45,8 @@ const ( Modified EventType = "MODIFIED" Deleted EventType = "DELETED" Error EventType = "ERROR" + + DefaultChanSize int32 = 100 ) // Event represents a single event to a watched resource. @@ -91,7 +94,7 @@ func NewFake() *FakeWatcher { } } -func NewFakeWithChanSize(size int) *FakeWatcher { +func NewFakeWithChanSize(size int, blocking bool) *FakeWatcher { return &FakeWatcher{ result: make(chan Event, size), } @@ -150,3 +153,117 @@ func (f *FakeWatcher) Error(errValue runtime.Object) { func (f *FakeWatcher) Action(action EventType, obj runtime.Object) { f.result <- Event{action, obj} } + +// RaceFreeFakeWatcher lets you test anything that consumes a watch.Interface; threadsafe. +type RaceFreeFakeWatcher struct { + result chan Event + Stopped bool + sync.Mutex +} + +func NewRaceFreeFake() *RaceFreeFakeWatcher { + return &RaceFreeFakeWatcher{ + result: make(chan Event, DefaultChanSize), + } +} + +// Stop implements Interface.Stop(). +func (f *RaceFreeFakeWatcher) Stop() { + f.Lock() + defer f.Unlock() + if !f.Stopped { + glog.V(4).Infof("Stopping fake watcher.") + close(f.result) + f.Stopped = true + } +} + +func (f *RaceFreeFakeWatcher) IsStopped() bool { + f.Lock() + defer f.Unlock() + return f.Stopped +} + +// Reset prepares the watcher to be reused. +func (f *RaceFreeFakeWatcher) Reset() { + f.Lock() + defer f.Unlock() + f.Stopped = false + f.result = make(chan Event, DefaultChanSize) +} + +func (f *RaceFreeFakeWatcher) ResultChan() <-chan Event { + f.Lock() + defer f.Unlock() + return f.result +} + +// Add sends an add event. +func (f *RaceFreeFakeWatcher) Add(obj runtime.Object) { + f.Lock() + defer f.Unlock() + if !f.Stopped { + select { + case f.result <- Event{Added, obj}: + return + default: + panic(fmt.Errorf("channel full")) + } + } +} + +// Modify sends a modify event. +func (f *RaceFreeFakeWatcher) Modify(obj runtime.Object) { + f.Lock() + defer f.Unlock() + if !f.Stopped { + select { + case f.result <- Event{Modified, obj}: + return + default: + panic(fmt.Errorf("channel full")) + } + } +} + +// Delete sends a delete event. +func (f *RaceFreeFakeWatcher) Delete(lastValue runtime.Object) { + f.Lock() + defer f.Unlock() + if !f.Stopped { + select { + case f.result <- Event{Deleted, lastValue}: + return + default: + panic(fmt.Errorf("channel full")) + } + } +} + +// Error sends an Error event. +func (f *RaceFreeFakeWatcher) Error(errValue runtime.Object) { + f.Lock() + defer f.Unlock() + if !f.Stopped { + select { + case f.result <- Event{Error, errValue}: + return + default: + panic(fmt.Errorf("channel full")) + } + } +} + +// Action sends an event of the requested type, for table-based testing. +func (f *RaceFreeFakeWatcher) Action(action EventType, obj runtime.Object) { + f.Lock() + defer f.Unlock() + if !f.Stopped { + select { + case f.result <- Event{action, obj}: + return + default: + panic(fmt.Errorf("channel full")) + } + } +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/third_party/forked/golang/reflect/deep_equal.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/third_party/forked/golang/reflect/deep_equal.go rename to vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/third_party/forked/golang/reflect/type.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/type.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/third_party/forked/golang/reflect/type.go rename to vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/type.go diff --git a/vendor/k8s.io/client-go/1.5/discovery/discovery_client.go b/vendor/k8s.io/client-go/1.5/discovery/discovery_client.go deleted file mode 100644 index 11ebae16b..000000000 --- a/vendor/k8s.io/client-go/1.5/discovery/discovery_client.go +++ /dev/null @@ -1,345 +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 discovery - -import ( - "encoding/json" - "fmt" - "net/url" - "sort" - "strings" - - "github.com/emicklei/go-restful/swagger" - - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/errors" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/runtime/serializer" - "k8s.io/client-go/1.5/pkg/version" - "k8s.io/client-go/1.5/rest" -) - -// DiscoveryInterface holds the methods that discover server-supported API groups, -// versions and resources. -type DiscoveryInterface interface { - ServerGroupsInterface - ServerResourcesInterface - ServerVersionInterface - SwaggerSchemaInterface -} - -// ServerGroupsInterface has methods for obtaining supported groups on the API server -type ServerGroupsInterface interface { - // ServerGroups returns the supported groups, with information like supported versions and the - // preferred version. - ServerGroups() (*unversioned.APIGroupList, error) -} - -// ServerResourcesInterface has methods for obtaining supported resources on the API server -type ServerResourcesInterface interface { - // ServerResourcesForGroupVersion returns the supported resources for a group and version. - ServerResourcesForGroupVersion(groupVersion string) (*unversioned.APIResourceList, error) - // ServerResources returns the supported resources for all groups and versions. - ServerResources() (map[string]*unversioned.APIResourceList, error) - // ServerPreferredResources returns the supported resources with the version preferred by the - // server. - ServerPreferredResources() ([]unversioned.GroupVersionResource, error) - // ServerPreferredNamespacedResources returns the supported namespaced resources with the - // version preferred by the server. - ServerPreferredNamespacedResources() ([]unversioned.GroupVersionResource, error) -} - -// ServerVersionInterface has a method for retrieving the server's version. -type ServerVersionInterface interface { - // ServerVersion retrieves and parses the server's version (git version). - ServerVersion() (*version.Info, error) -} - -// SwaggerSchemaInterface has a method to retrieve the swagger schema. -type SwaggerSchemaInterface interface { - // SwaggerSchema retrieves and parses the swagger API schema the server supports. - SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error) -} - -// DiscoveryClient implements the functions that discover server-supported API groups, -// versions and resources. -type DiscoveryClient struct { - *rest.RESTClient - - LegacyPrefix string -} - -// Convert unversioned.APIVersions to unversioned.APIGroup. APIVersions is used by legacy v1, so -// group would be "". -func apiVersionsToAPIGroup(apiVersions *unversioned.APIVersions) (apiGroup unversioned.APIGroup) { - groupVersions := []unversioned.GroupVersionForDiscovery{} - for _, version := range apiVersions.Versions { - groupVersion := unversioned.GroupVersionForDiscovery{ - GroupVersion: version, - Version: version, - } - groupVersions = append(groupVersions, groupVersion) - } - apiGroup.Versions = groupVersions - // There should be only one groupVersion returned at /api - apiGroup.PreferredVersion = groupVersions[0] - return -} - -// ServerGroups returns the supported groups, with information like supported versions and the -// preferred version. -func (d *DiscoveryClient) ServerGroups() (apiGroupList *unversioned.APIGroupList, err error) { - // Get the groupVersions exposed at /api - v := &unversioned.APIVersions{} - err = d.Get().AbsPath(d.LegacyPrefix).Do().Into(v) - apiGroup := unversioned.APIGroup{} - if err == nil { - apiGroup = apiVersionsToAPIGroup(v) - } - if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) { - return nil, err - } - - // Get the groupVersions exposed at /apis - apiGroupList = &unversioned.APIGroupList{} - err = d.Get().AbsPath("/apis").Do().Into(apiGroupList) - if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) { - return nil, err - } - // to be compatible with a v1.0 server, if it's a 403 or 404, ignore and return whatever we got from /api - if err != nil && (errors.IsNotFound(err) || errors.IsForbidden(err)) { - apiGroupList = &unversioned.APIGroupList{} - } - - // append the group retrieved from /api to the list - apiGroupList.Groups = append(apiGroupList.Groups, apiGroup) - return apiGroupList, nil -} - -// ServerResourcesForGroupVersion returns the supported resources for a group and version. -func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (resources *unversioned.APIResourceList, err error) { - url := url.URL{} - if len(groupVersion) == 0 { - return nil, fmt.Errorf("groupVersion shouldn't be empty") - } - if len(d.LegacyPrefix) > 0 && groupVersion == "v1" { - url.Path = d.LegacyPrefix + "/" + groupVersion - } else { - url.Path = "/apis/" + groupVersion - } - resources = &unversioned.APIResourceList{} - err = d.Get().AbsPath(url.String()).Do().Into(resources) - if err != nil { - // ignore 403 or 404 error to be compatible with an v1.0 server. - if groupVersion == "v1" && (errors.IsNotFound(err) || errors.IsForbidden(err)) { - return resources, nil - } - return nil, err - } - return resources, nil -} - -// ServerResources returns the supported resources for all groups and versions. -func (d *DiscoveryClient) ServerResources() (map[string]*unversioned.APIResourceList, error) { - apiGroups, err := d.ServerGroups() - if err != nil { - return nil, err - } - groupVersions := unversioned.ExtractGroupVersions(apiGroups) - result := map[string]*unversioned.APIResourceList{} - for _, groupVersion := range groupVersions { - resources, err := d.ServerResourcesForGroupVersion(groupVersion) - if err != nil { - return nil, err - } - result[groupVersion] = resources - } - return result, nil -} - -// ErrGroupDiscoveryFailed is returned if one or more API groups fail to load. -type ErrGroupDiscoveryFailed struct { - // Groups is a list of the groups that failed to load and the error cause - Groups map[unversioned.GroupVersion]error -} - -// Error implements the error interface -func (e *ErrGroupDiscoveryFailed) Error() string { - var groups []string - for k, v := range e.Groups { - groups = append(groups, fmt.Sprintf("%s: %v", k, v)) - } - sort.Strings(groups) - return fmt.Sprintf("unable to retrieve the complete list of server APIs: %s", strings.Join(groups, ", ")) -} - -// IsGroupDiscoveryFailedError returns true if the provided error indicates the server was unable to discover -// a complete list of APIs for the client to use. -func IsGroupDiscoveryFailedError(err error) bool { - _, ok := err.(*ErrGroupDiscoveryFailed) - return err != nil && ok -} - -// serverPreferredResources returns the supported resources with the version preferred by the -// server. If namespaced is true, only namespaced resources will be returned. -func (d *DiscoveryClient) serverPreferredResources(namespaced bool) ([]unversioned.GroupVersionResource, error) { - results := []unversioned.GroupVersionResource{} - serverGroupList, err := d.ServerGroups() - if err != nil { - return results, err - } - - var failedGroups map[unversioned.GroupVersion]error - for _, apiGroup := range serverGroupList.Groups { - preferredVersion := apiGroup.PreferredVersion - groupVersion := unversioned.GroupVersion{Group: apiGroup.Name, Version: preferredVersion.Version} - apiResourceList, err := d.ServerResourcesForGroupVersion(preferredVersion.GroupVersion) - if err != nil { - if failedGroups == nil { - failedGroups = make(map[unversioned.GroupVersion]error) - } - failedGroups[groupVersion] = err - continue - } - for _, apiResource := range apiResourceList.APIResources { - // ignore the root scoped resources if "namespaced" is true. - if namespaced && !apiResource.Namespaced { - continue - } - if strings.Contains(apiResource.Name, "/") { - continue - } - results = append(results, groupVersion.WithResource(apiResource.Name)) - } - } - if len(failedGroups) > 0 { - return results, &ErrGroupDiscoveryFailed{Groups: failedGroups} - } - return results, nil -} - -// ServerPreferredResources returns the supported resources with the version preferred by the -// server. -func (d *DiscoveryClient) ServerPreferredResources() ([]unversioned.GroupVersionResource, error) { - return d.serverPreferredResources(false) -} - -// ServerPreferredNamespacedResources returns the supported namespaced resources with the -// version preferred by the server. -func (d *DiscoveryClient) ServerPreferredNamespacedResources() ([]unversioned.GroupVersionResource, error) { - return d.serverPreferredResources(true) -} - -// ServerVersion retrieves and parses the server's version (git version). -func (d *DiscoveryClient) ServerVersion() (*version.Info, error) { - body, err := d.Get().AbsPath("/version").Do().Raw() - if err != nil { - return nil, err - } - var info version.Info - err = json.Unmarshal(body, &info) - if err != nil { - return nil, fmt.Errorf("got '%s': %v", string(body), err) - } - return &info, nil -} - -// SwaggerSchema retrieves and parses the swagger API schema the server supports. -func (d *DiscoveryClient) SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error) { - if version.Empty() { - return nil, fmt.Errorf("groupVersion cannot be empty") - } - - groupList, err := d.ServerGroups() - if err != nil { - return nil, err - } - groupVersions := unversioned.ExtractGroupVersions(groupList) - // This check also takes care the case that kubectl is newer than the running endpoint - if stringDoesntExistIn(version.String(), groupVersions) { - return nil, fmt.Errorf("API version: %v is not supported by the server. Use one of: %v", version, groupVersions) - } - var path string - if len(d.LegacyPrefix) > 0 && version == v1.SchemeGroupVersion { - path = "/swaggerapi" + d.LegacyPrefix + "/" + version.Version - } else { - path = "/swaggerapi/apis/" + version.Group + "/" + version.Version - } - - body, err := d.Get().AbsPath(path).Do().Raw() - if err != nil { - return nil, err - } - var schema swagger.ApiDeclaration - err = json.Unmarshal(body, &schema) - if err != nil { - return nil, fmt.Errorf("got '%s': %v", string(body), err) - } - return &schema, nil -} - -func setDiscoveryDefaults(config *rest.Config) error { - config.APIPath = "" - config.GroupVersion = nil - codec := runtime.NoopEncoder{Decoder: api.Codecs.UniversalDecoder()} - config.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper( - runtime.SerializerInfo{Serializer: codec}, - runtime.StreamSerializerInfo{}, - ) - if len(config.UserAgent) == 0 { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - return nil -} - -// NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. This client -// can be used to discover supported resources in the API server. -func NewDiscoveryClientForConfig(c *rest.Config) (*DiscoveryClient, error) { - config := *c - if err := setDiscoveryDefaults(&config); err != nil { - return nil, err - } - client, err := rest.UnversionedRESTClientFor(&config) - return &DiscoveryClient{RESTClient: client, LegacyPrefix: "/api"}, err -} - -// NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. If -// there is an error, it panics. -func NewDiscoveryClientForConfigOrDie(c *rest.Config) *DiscoveryClient { - client, err := NewDiscoveryClientForConfig(c) - if err != nil { - panic(err) - } - return client - -} - -// New creates a new DiscoveryClient for the given RESTClient. -func NewDiscoveryClient(c *rest.RESTClient) *DiscoveryClient { - return &DiscoveryClient{RESTClient: c, LegacyPrefix: "/api"} -} - -func stringDoesntExistIn(str string, slice []string) bool { - for _, s := range slice { - if s == str { - return false - } - } - return true -} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/clientset.go b/vendor/k8s.io/client-go/1.5/kubernetes/clientset.go deleted file mode 100644 index 35df6df63..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/clientset.go +++ /dev/null @@ -1,261 +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 kubernetes - -import ( - "github.com/golang/glog" - discovery "k8s.io/client-go/1.5/discovery" - v1alpha1apps "k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1" - v1beta1authentication "k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1" - v1beta1authorization "k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1" - v1autoscaling "k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1" - v1batch "k8s.io/client-go/1.5/kubernetes/typed/batch/v1" - v1alpha1certificates "k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1" - v1core "k8s.io/client-go/1.5/kubernetes/typed/core/v1" - v1beta1extensions "k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1" - v1alpha1policy "k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1" - v1alpha1rbac "k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1" - v1beta1storage "k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1" - "k8s.io/client-go/1.5/pkg/util/flowcontrol" - _ "k8s.io/client-go/1.5/plugin/pkg/client/auth" - rest "k8s.io/client-go/1.5/rest" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - Core() v1core.CoreInterface - Apps() v1alpha1apps.AppsInterface - Authentication() v1beta1authentication.AuthenticationInterface - Authorization() v1beta1authorization.AuthorizationInterface - Autoscaling() v1autoscaling.AutoscalingInterface - Batch() v1batch.BatchInterface - Certificates() v1alpha1certificates.CertificatesInterface - Extensions() v1beta1extensions.ExtensionsInterface - Policy() v1alpha1policy.PolicyInterface - Rbac() v1alpha1rbac.RbacInterface - Storage() v1beta1storage.StorageInterface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - *v1core.CoreClient - *v1alpha1apps.AppsClient - *v1beta1authentication.AuthenticationClient - *v1beta1authorization.AuthorizationClient - *v1autoscaling.AutoscalingClient - *v1batch.BatchClient - *v1alpha1certificates.CertificatesClient - *v1beta1extensions.ExtensionsClient - *v1alpha1policy.PolicyClient - *v1alpha1rbac.RbacClient - *v1beta1storage.StorageClient -} - -// Core retrieves the CoreClient -func (c *Clientset) Core() v1core.CoreInterface { - if c == nil { - return nil - } - return c.CoreClient -} - -// Apps retrieves the AppsClient -func (c *Clientset) Apps() v1alpha1apps.AppsInterface { - if c == nil { - return nil - } - return c.AppsClient -} - -// Authentication retrieves the AuthenticationClient -func (c *Clientset) Authentication() v1beta1authentication.AuthenticationInterface { - if c == nil { - return nil - } - return c.AuthenticationClient -} - -// Authorization retrieves the AuthorizationClient -func (c *Clientset) Authorization() v1beta1authorization.AuthorizationInterface { - if c == nil { - return nil - } - return c.AuthorizationClient -} - -// Autoscaling retrieves the AutoscalingClient -func (c *Clientset) Autoscaling() v1autoscaling.AutoscalingInterface { - if c == nil { - return nil - } - return c.AutoscalingClient -} - -// Batch retrieves the BatchClient -func (c *Clientset) Batch() v1batch.BatchInterface { - if c == nil { - return nil - } - return c.BatchClient -} - -// Certificates retrieves the CertificatesClient -func (c *Clientset) Certificates() v1alpha1certificates.CertificatesInterface { - if c == nil { - return nil - } - return c.CertificatesClient -} - -// Extensions retrieves the ExtensionsClient -func (c *Clientset) Extensions() v1beta1extensions.ExtensionsInterface { - if c == nil { - return nil - } - return c.ExtensionsClient -} - -// Policy retrieves the PolicyClient -func (c *Clientset) Policy() v1alpha1policy.PolicyInterface { - if c == nil { - return nil - } - return c.PolicyClient -} - -// Rbac retrieves the RbacClient -func (c *Clientset) Rbac() v1alpha1rbac.RbacInterface { - if c == nil { - return nil - } - return c.RbacClient -} - -// Storage retrieves the StorageClient -func (c *Clientset) Storage() v1beta1storage.StorageInterface { - if c == nil { - return nil - } - return c.StorageClient -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var clientset Clientset - var err error - clientset.CoreClient, err = v1core.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - clientset.AppsClient, err = v1alpha1apps.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - clientset.AuthenticationClient, err = v1beta1authentication.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - clientset.AuthorizationClient, err = v1beta1authorization.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - clientset.AutoscalingClient, err = v1autoscaling.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - clientset.BatchClient, err = v1batch.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - clientset.CertificatesClient, err = v1alpha1certificates.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - clientset.ExtensionsClient, err = v1beta1extensions.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - clientset.PolicyClient, err = v1alpha1policy.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - clientset.RbacClient, err = v1alpha1rbac.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - clientset.StorageClient, err = v1beta1storage.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - - clientset.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) - if err != nil { - glog.Errorf("failed to create the DiscoveryClient: %v", err) - return nil, err - } - return &clientset, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var clientset Clientset - clientset.CoreClient = v1core.NewForConfigOrDie(c) - clientset.AppsClient = v1alpha1apps.NewForConfigOrDie(c) - clientset.AuthenticationClient = v1beta1authentication.NewForConfigOrDie(c) - clientset.AuthorizationClient = v1beta1authorization.NewForConfigOrDie(c) - clientset.AutoscalingClient = v1autoscaling.NewForConfigOrDie(c) - clientset.BatchClient = v1batch.NewForConfigOrDie(c) - clientset.CertificatesClient = v1alpha1certificates.NewForConfigOrDie(c) - clientset.ExtensionsClient = v1beta1extensions.NewForConfigOrDie(c) - clientset.PolicyClient = v1alpha1policy.NewForConfigOrDie(c) - clientset.RbacClient = v1alpha1rbac.NewForConfigOrDie(c) - clientset.StorageClient = v1beta1storage.NewForConfigOrDie(c) - - clientset.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &clientset -} - -// New creates a new Clientset for the given RESTClient. -func New(c *rest.RESTClient) *Clientset { - var clientset Clientset - clientset.CoreClient = v1core.New(c) - clientset.AppsClient = v1alpha1apps.New(c) - clientset.AuthenticationClient = v1beta1authentication.New(c) - clientset.AuthorizationClient = v1beta1authorization.New(c) - clientset.AutoscalingClient = v1autoscaling.New(c) - clientset.BatchClient = v1batch.New(c) - clientset.CertificatesClient = v1alpha1certificates.New(c) - clientset.ExtensionsClient = v1beta1extensions.New(c) - clientset.PolicyClient = v1alpha1policy.New(c) - clientset.RbacClient = v1alpha1rbac.New(c) - clientset.StorageClient = v1beta1storage.New(c) - - clientset.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &clientset -} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/doc.go deleted file mode 100644 index bd09a3563..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/doc.go +++ /dev/null @@ -1,20 +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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated clientset. -package kubernetes diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/apps_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/apps_client.go deleted file mode 100644 index 6c792d936..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/apps_client.go +++ /dev/null @@ -1,96 +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 v1alpha1 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - registered "k8s.io/client-go/1.5/pkg/apimachinery/registered" - serializer "k8s.io/client-go/1.5/pkg/runtime/serializer" - rest "k8s.io/client-go/1.5/rest" -) - -type AppsInterface interface { - GetRESTClient() *rest.RESTClient - PetSetsGetter -} - -// AppsClient is used to interact with features provided by the Apps group. -type AppsClient struct { - *rest.RESTClient -} - -func (c *AppsClient) PetSets(namespace string) PetSetInterface { - return newPetSets(c, namespace) -} - -// NewForConfig creates a new AppsClient for the given config. -func NewForConfig(c *rest.Config) (*AppsClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &AppsClient{client}, nil -} - -// NewForConfigOrDie creates a new AppsClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *AppsClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new AppsClient for the given RESTClient. -func New(c *rest.RESTClient) *AppsClient { - return &AppsClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - // if apps group is not registered, return an error - g, err := registered.Group("apps") - if err != nil { - return err - } - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - // TODO: Unconditionally set the config.Version, until we fix the config. - //if config.Version == "" { - copyGroupVersion := g.GroupVersion - config.GroupVersion = ©GroupVersion - //} - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// GetRESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *AppsClient) GetRESTClient() *rest.RESTClient { - if c == nil { - return nil - } - return c.RESTClient -} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/doc.go deleted file mode 100644 index 0c1ca41fa..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/doc.go +++ /dev/null @@ -1,20 +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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/petset.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/petset.go deleted file mode 100644 index 611c68dc6..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/petset.go +++ /dev/null @@ -1,165 +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 v1alpha1 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - v1alpha1 "k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1" - watch "k8s.io/client-go/1.5/pkg/watch" -) - -// PetSetsGetter has a method to return a PetSetInterface. -// A group's client should implement this interface. -type PetSetsGetter interface { - PetSets(namespace string) PetSetInterface -} - -// PetSetInterface has methods to work with PetSet resources. -type PetSetInterface interface { - Create(*v1alpha1.PetSet) (*v1alpha1.PetSet, error) - Update(*v1alpha1.PetSet) (*v1alpha1.PetSet, error) - UpdateStatus(*v1alpha1.PetSet) (*v1alpha1.PetSet, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1alpha1.PetSet, error) - List(opts api.ListOptions) (*v1alpha1.PetSetList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PetSet, err error) - PetSetExpansion -} - -// petSets implements PetSetInterface -type petSets struct { - client *AppsClient - ns string -} - -// newPetSets returns a PetSets -func newPetSets(c *AppsClient, namespace string) *petSets { - return &petSets{ - client: c, - ns: namespace, - } -} - -// Create takes the representation of a petSet and creates it. Returns the server's representation of the petSet, and an error, if there is any. -func (c *petSets) Create(petSet *v1alpha1.PetSet) (result *v1alpha1.PetSet, err error) { - result = &v1alpha1.PetSet{} - err = c.client.Post(). - Namespace(c.ns). - Resource("petsets"). - Body(petSet). - Do(). - Into(result) - return -} - -// Update takes the representation of a petSet and updates it. Returns the server's representation of the petSet, and an error, if there is any. -func (c *petSets) Update(petSet *v1alpha1.PetSet) (result *v1alpha1.PetSet, err error) { - result = &v1alpha1.PetSet{} - err = c.client.Put(). - Namespace(c.ns). - Resource("petsets"). - Name(petSet.Name). - Body(petSet). - Do(). - Into(result) - return -} - -func (c *petSets) UpdateStatus(petSet *v1alpha1.PetSet) (result *v1alpha1.PetSet, err error) { - result = &v1alpha1.PetSet{} - err = c.client.Put(). - Namespace(c.ns). - Resource("petsets"). - Name(petSet.Name). - SubResource("status"). - Body(petSet). - Do(). - Into(result) - return -} - -// Delete takes name of the petSet and deletes it. Returns an error if one occurs. -func (c *petSets) Delete(name string, options *api.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("petsets"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *petSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("petsets"). - VersionedParams(&listOptions, api.ParameterCodec). - Body(options). - Do(). - Error() -} - -// Get takes name of the petSet, and returns the corresponding petSet object, and an error if there is any. -func (c *petSets) Get(name string) (result *v1alpha1.PetSet, err error) { - result = &v1alpha1.PetSet{} - err = c.client.Get(). - Namespace(c.ns). - Resource("petsets"). - Name(name). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of PetSets that match those selectors. -func (c *petSets) List(opts api.ListOptions) (result *v1alpha1.PetSetList, err error) { - result = &v1alpha1.PetSetList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("petsets"). - VersionedParams(&opts, api.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested petSets. -func (c *petSets) Watch(opts api.ListOptions) (watch.Interface, error) { - return c.client.Get(). - Prefix("watch"). - Namespace(c.ns). - Resource("petsets"). - VersionedParams(&opts, api.ParameterCodec). - Watch() -} - -// Patch applies the patch and returns the patched petSet. -func (c *petSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PetSet, err error) { - result = &v1alpha1.PetSet{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("petsets"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/authentication_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/authentication_client.go deleted file mode 100644 index 878e92aa0..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/authentication_client.go +++ /dev/null @@ -1,96 +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 v1beta1 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - registered "k8s.io/client-go/1.5/pkg/apimachinery/registered" - serializer "k8s.io/client-go/1.5/pkg/runtime/serializer" - rest "k8s.io/client-go/1.5/rest" -) - -type AuthenticationInterface interface { - GetRESTClient() *rest.RESTClient - TokenReviewsGetter -} - -// AuthenticationClient is used to interact with features provided by the Authentication group. -type AuthenticationClient struct { - *rest.RESTClient -} - -func (c *AuthenticationClient) TokenReviews() TokenReviewInterface { - return newTokenReviews(c) -} - -// NewForConfig creates a new AuthenticationClient for the given config. -func NewForConfig(c *rest.Config) (*AuthenticationClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &AuthenticationClient{client}, nil -} - -// NewForConfigOrDie creates a new AuthenticationClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *AuthenticationClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new AuthenticationClient for the given RESTClient. -func New(c *rest.RESTClient) *AuthenticationClient { - return &AuthenticationClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - // if authentication group is not registered, return an error - g, err := registered.Group("authentication.k8s.io") - if err != nil { - return err - } - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - // TODO: Unconditionally set the config.Version, until we fix the config. - //if config.Version == "" { - copyGroupVersion := g.GroupVersion - config.GroupVersion = ©GroupVersion - //} - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// GetRESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *AuthenticationClient) GetRESTClient() *rest.RESTClient { - if c == nil { - return nil - } - return c.RESTClient -} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/doc.go deleted file mode 100644 index 5616c95d3..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/doc.go +++ /dev/null @@ -1,20 +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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated typed clients. -package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/authorization_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/authorization_client.go deleted file mode 100644 index 9ec2290cb..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/authorization_client.go +++ /dev/null @@ -1,106 +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 v1beta1 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - registered "k8s.io/client-go/1.5/pkg/apimachinery/registered" - serializer "k8s.io/client-go/1.5/pkg/runtime/serializer" - rest "k8s.io/client-go/1.5/rest" -) - -type AuthorizationInterface interface { - GetRESTClient() *rest.RESTClient - LocalSubjectAccessReviewsGetter - SelfSubjectAccessReviewsGetter - SubjectAccessReviewsGetter -} - -// AuthorizationClient is used to interact with features provided by the Authorization group. -type AuthorizationClient struct { - *rest.RESTClient -} - -func (c *AuthorizationClient) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface { - return newLocalSubjectAccessReviews(c, namespace) -} - -func (c *AuthorizationClient) SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface { - return newSelfSubjectAccessReviews(c) -} - -func (c *AuthorizationClient) SubjectAccessReviews() SubjectAccessReviewInterface { - return newSubjectAccessReviews(c) -} - -// NewForConfig creates a new AuthorizationClient for the given config. -func NewForConfig(c *rest.Config) (*AuthorizationClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &AuthorizationClient{client}, nil -} - -// NewForConfigOrDie creates a new AuthorizationClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *AuthorizationClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new AuthorizationClient for the given RESTClient. -func New(c *rest.RESTClient) *AuthorizationClient { - return &AuthorizationClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - // if authorization group is not registered, return an error - g, err := registered.Group("authorization.k8s.io") - if err != nil { - return err - } - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - // TODO: Unconditionally set the config.Version, until we fix the config. - //if config.Version == "" { - copyGroupVersion := g.GroupVersion - config.GroupVersion = ©GroupVersion - //} - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// GetRESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *AuthorizationClient) GetRESTClient() *rest.RESTClient { - if c == nil { - return nil - } - return c.RESTClient -} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/doc.go deleted file mode 100644 index 5616c95d3..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/doc.go +++ /dev/null @@ -1,20 +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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated typed clients. -package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/autoscaling_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/autoscaling_client.go deleted file mode 100644 index 0dfd5d959..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/autoscaling_client.go +++ /dev/null @@ -1,96 +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 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - registered "k8s.io/client-go/1.5/pkg/apimachinery/registered" - serializer "k8s.io/client-go/1.5/pkg/runtime/serializer" - rest "k8s.io/client-go/1.5/rest" -) - -type AutoscalingInterface interface { - GetRESTClient() *rest.RESTClient - HorizontalPodAutoscalersGetter -} - -// AutoscalingClient is used to interact with features provided by the Autoscaling group. -type AutoscalingClient struct { - *rest.RESTClient -} - -func (c *AutoscalingClient) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { - return newHorizontalPodAutoscalers(c, namespace) -} - -// NewForConfig creates a new AutoscalingClient for the given config. -func NewForConfig(c *rest.Config) (*AutoscalingClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &AutoscalingClient{client}, nil -} - -// NewForConfigOrDie creates a new AutoscalingClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *AutoscalingClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new AutoscalingClient for the given RESTClient. -func New(c *rest.RESTClient) *AutoscalingClient { - return &AutoscalingClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - // if autoscaling group is not registered, return an error - g, err := registered.Group("autoscaling") - if err != nil { - return err - } - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - // TODO: Unconditionally set the config.Version, until we fix the config. - //if config.Version == "" { - copyGroupVersion := g.GroupVersion - config.GroupVersion = ©GroupVersion - //} - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// GetRESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *AutoscalingClient) GetRESTClient() *rest.RESTClient { - if c == nil { - return nil - } - return c.RESTClient -} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/doc.go deleted file mode 100644 index fe27cf5c1..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/doc.go +++ /dev/null @@ -1,20 +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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated typed clients. -package v1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/batch_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/batch_client.go deleted file mode 100644 index 084fa6a29..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/batch_client.go +++ /dev/null @@ -1,96 +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 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - registered "k8s.io/client-go/1.5/pkg/apimachinery/registered" - serializer "k8s.io/client-go/1.5/pkg/runtime/serializer" - rest "k8s.io/client-go/1.5/rest" -) - -type BatchInterface interface { - GetRESTClient() *rest.RESTClient - JobsGetter -} - -// BatchClient is used to interact with features provided by the Batch group. -type BatchClient struct { - *rest.RESTClient -} - -func (c *BatchClient) Jobs(namespace string) JobInterface { - return newJobs(c, namespace) -} - -// NewForConfig creates a new BatchClient for the given config. -func NewForConfig(c *rest.Config) (*BatchClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &BatchClient{client}, nil -} - -// NewForConfigOrDie creates a new BatchClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *BatchClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new BatchClient for the given RESTClient. -func New(c *rest.RESTClient) *BatchClient { - return &BatchClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - // if batch group is not registered, return an error - g, err := registered.Group("batch") - if err != nil { - return err - } - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - // TODO: Unconditionally set the config.Version, until we fix the config. - //if config.Version == "" { - copyGroupVersion := g.GroupVersion - config.GroupVersion = ©GroupVersion - //} - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// GetRESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *BatchClient) GetRESTClient() *rest.RESTClient { - if c == nil { - return nil - } - return c.RESTClient -} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/doc.go deleted file mode 100644 index fe27cf5c1..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/doc.go +++ /dev/null @@ -1,20 +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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated typed clients. -package v1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/certificates_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/certificates_client.go deleted file mode 100644 index 56c3d4a39..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/certificates_client.go +++ /dev/null @@ -1,96 +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 v1alpha1 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - registered "k8s.io/client-go/1.5/pkg/apimachinery/registered" - serializer "k8s.io/client-go/1.5/pkg/runtime/serializer" - rest "k8s.io/client-go/1.5/rest" -) - -type CertificatesInterface interface { - GetRESTClient() *rest.RESTClient - CertificateSigningRequestsGetter -} - -// CertificatesClient is used to interact with features provided by the Certificates group. -type CertificatesClient struct { - *rest.RESTClient -} - -func (c *CertificatesClient) CertificateSigningRequests() CertificateSigningRequestInterface { - return newCertificateSigningRequests(c) -} - -// NewForConfig creates a new CertificatesClient for the given config. -func NewForConfig(c *rest.Config) (*CertificatesClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &CertificatesClient{client}, nil -} - -// NewForConfigOrDie creates a new CertificatesClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CertificatesClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new CertificatesClient for the given RESTClient. -func New(c *rest.RESTClient) *CertificatesClient { - return &CertificatesClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - // if certificates group is not registered, return an error - g, err := registered.Group("certificates.k8s.io") - if err != nil { - return err - } - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - // TODO: Unconditionally set the config.Version, until we fix the config. - //if config.Version == "" { - copyGroupVersion := g.GroupVersion - config.GroupVersion = ©GroupVersion - //} - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// GetRESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *CertificatesClient) GetRESTClient() *rest.RESTClient { - if c == nil { - return nil - } - return c.RESTClient -} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/doc.go deleted file mode 100644 index 0c1ca41fa..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/doc.go +++ /dev/null @@ -1,20 +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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/core_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/core_client.go deleted file mode 100644 index e32979f23..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/core_client.go +++ /dev/null @@ -1,171 +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 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - registered "k8s.io/client-go/1.5/pkg/apimachinery/registered" - serializer "k8s.io/client-go/1.5/pkg/runtime/serializer" - rest "k8s.io/client-go/1.5/rest" -) - -type CoreInterface interface { - GetRESTClient() *rest.RESTClient - ComponentStatusesGetter - ConfigMapsGetter - EndpointsGetter - EventsGetter - LimitRangesGetter - NamespacesGetter - NodesGetter - PersistentVolumesGetter - PersistentVolumeClaimsGetter - PodsGetter - PodTemplatesGetter - ReplicationControllersGetter - ResourceQuotasGetter - SecretsGetter - ServicesGetter - ServiceAccountsGetter -} - -// CoreClient is used to interact with features provided by the Core group. -type CoreClient struct { - *rest.RESTClient -} - -func (c *CoreClient) ComponentStatuses() ComponentStatusInterface { - return newComponentStatuses(c) -} - -func (c *CoreClient) ConfigMaps(namespace string) ConfigMapInterface { - return newConfigMaps(c, namespace) -} - -func (c *CoreClient) Endpoints(namespace string) EndpointsInterface { - return newEndpoints(c, namespace) -} - -func (c *CoreClient) Events(namespace string) EventInterface { - return newEvents(c, namespace) -} - -func (c *CoreClient) LimitRanges(namespace string) LimitRangeInterface { - return newLimitRanges(c, namespace) -} - -func (c *CoreClient) Namespaces() NamespaceInterface { - return newNamespaces(c) -} - -func (c *CoreClient) Nodes() NodeInterface { - return newNodes(c) -} - -func (c *CoreClient) PersistentVolumes() PersistentVolumeInterface { - return newPersistentVolumes(c) -} - -func (c *CoreClient) PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface { - return newPersistentVolumeClaims(c, namespace) -} - -func (c *CoreClient) Pods(namespace string) PodInterface { - return newPods(c, namespace) -} - -func (c *CoreClient) PodTemplates(namespace string) PodTemplateInterface { - return newPodTemplates(c, namespace) -} - -func (c *CoreClient) ReplicationControllers(namespace string) ReplicationControllerInterface { - return newReplicationControllers(c, namespace) -} - -func (c *CoreClient) ResourceQuotas(namespace string) ResourceQuotaInterface { - return newResourceQuotas(c, namespace) -} - -func (c *CoreClient) Secrets(namespace string) SecretInterface { - return newSecrets(c, namespace) -} - -func (c *CoreClient) Services(namespace string) ServiceInterface { - return newServices(c, namespace) -} - -func (c *CoreClient) ServiceAccounts(namespace string) ServiceAccountInterface { - return newServiceAccounts(c, namespace) -} - -// NewForConfig creates a new CoreClient for the given config. -func NewForConfig(c *rest.Config) (*CoreClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &CoreClient{client}, nil -} - -// NewForConfigOrDie creates a new CoreClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CoreClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new CoreClient for the given RESTClient. -func New(c *rest.RESTClient) *CoreClient { - return &CoreClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - // if core group is not registered, return an error - g, err := registered.Group("") - if err != nil { - return err - } - config.APIPath = "/api" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - // TODO: Unconditionally set the config.Version, until we fix the config. - //if config.Version == "" { - copyGroupVersion := g.GroupVersion - config.GroupVersion = ©GroupVersion - //} - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// GetRESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *CoreClient) GetRESTClient() *rest.RESTClient { - if c == nil { - return nil - } - return c.RESTClient -} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/doc.go deleted file mode 100644 index fe27cf5c1..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/doc.go +++ /dev/null @@ -1,20 +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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated typed clients. -package v1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/doc.go deleted file mode 100644 index 5616c95d3..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/doc.go +++ /dev/null @@ -1,20 +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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated typed clients. -package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/extensions_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/extensions_client.go deleted file mode 100644 index 054bb461d..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/extensions_client.go +++ /dev/null @@ -1,131 +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 v1beta1 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - registered "k8s.io/client-go/1.5/pkg/apimachinery/registered" - serializer "k8s.io/client-go/1.5/pkg/runtime/serializer" - rest "k8s.io/client-go/1.5/rest" -) - -type ExtensionsInterface interface { - GetRESTClient() *rest.RESTClient - DaemonSetsGetter - DeploymentsGetter - IngressesGetter - JobsGetter - PodSecurityPoliciesGetter - ReplicaSetsGetter - ScalesGetter - ThirdPartyResourcesGetter -} - -// ExtensionsClient is used to interact with features provided by the Extensions group. -type ExtensionsClient struct { - *rest.RESTClient -} - -func (c *ExtensionsClient) DaemonSets(namespace string) DaemonSetInterface { - return newDaemonSets(c, namespace) -} - -func (c *ExtensionsClient) Deployments(namespace string) DeploymentInterface { - return newDeployments(c, namespace) -} - -func (c *ExtensionsClient) Ingresses(namespace string) IngressInterface { - return newIngresses(c, namespace) -} - -func (c *ExtensionsClient) Jobs(namespace string) JobInterface { - return newJobs(c, namespace) -} - -func (c *ExtensionsClient) PodSecurityPolicies() PodSecurityPolicyInterface { - return newPodSecurityPolicies(c) -} - -func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface { - return newReplicaSets(c, namespace) -} - -func (c *ExtensionsClient) Scales(namespace string) ScaleInterface { - return newScales(c, namespace) -} - -func (c *ExtensionsClient) ThirdPartyResources() ThirdPartyResourceInterface { - return newThirdPartyResources(c) -} - -// NewForConfig creates a new ExtensionsClient for the given config. -func NewForConfig(c *rest.Config) (*ExtensionsClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &ExtensionsClient{client}, nil -} - -// NewForConfigOrDie creates a new ExtensionsClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ExtensionsClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new ExtensionsClient for the given RESTClient. -func New(c *rest.RESTClient) *ExtensionsClient { - return &ExtensionsClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - // if extensions group is not registered, return an error - g, err := registered.Group("extensions") - if err != nil { - return err - } - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - // TODO: Unconditionally set the config.Version, until we fix the config. - //if config.Version == "" { - copyGroupVersion := g.GroupVersion - config.GroupVersion = ©GroupVersion - //} - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// GetRESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *ExtensionsClient) GetRESTClient() *rest.RESTClient { - if c == nil { - return nil - } - return c.RESTClient -} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/job.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/job.go deleted file mode 100644 index 0142d69cc..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/job.go +++ /dev/null @@ -1,165 +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 v1beta1 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - v1beta1 "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1" - watch "k8s.io/client-go/1.5/pkg/watch" -) - -// JobsGetter has a method to return a JobInterface. -// A group's client should implement this interface. -type JobsGetter interface { - Jobs(namespace string) JobInterface -} - -// JobInterface has methods to work with Job resources. -type JobInterface interface { - Create(*v1beta1.Job) (*v1beta1.Job, error) - Update(*v1beta1.Job) (*v1beta1.Job, error) - UpdateStatus(*v1beta1.Job) (*v1beta1.Job, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1beta1.Job, error) - List(opts api.ListOptions) (*v1beta1.JobList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Job, err error) - JobExpansion -} - -// jobs implements JobInterface -type jobs struct { - client *ExtensionsClient - ns string -} - -// newJobs returns a Jobs -func newJobs(c *ExtensionsClient, namespace string) *jobs { - return &jobs{ - client: c, - ns: namespace, - } -} - -// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any. -func (c *jobs) Create(job *v1beta1.Job) (result *v1beta1.Job, err error) { - result = &v1beta1.Job{} - err = c.client.Post(). - Namespace(c.ns). - Resource("jobs"). - Body(job). - Do(). - Into(result) - return -} - -// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any. -func (c *jobs) Update(job *v1beta1.Job) (result *v1beta1.Job, err error) { - result = &v1beta1.Job{} - err = c.client.Put(). - Namespace(c.ns). - Resource("jobs"). - Name(job.Name). - Body(job). - Do(). - Into(result) - return -} - -func (c *jobs) UpdateStatus(job *v1beta1.Job) (result *v1beta1.Job, err error) { - result = &v1beta1.Job{} - err = c.client.Put(). - Namespace(c.ns). - Resource("jobs"). - Name(job.Name). - SubResource("status"). - Body(job). - Do(). - Into(result) - return -} - -// Delete takes name of the job and deletes it. Returns an error if one occurs. -func (c *jobs) Delete(name string, options *api.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("jobs"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *jobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("jobs"). - VersionedParams(&listOptions, api.ParameterCodec). - Body(options). - Do(). - Error() -} - -// Get takes name of the job, and returns the corresponding job object, and an error if there is any. -func (c *jobs) Get(name string) (result *v1beta1.Job, err error) { - result = &v1beta1.Job{} - err = c.client.Get(). - Namespace(c.ns). - Resource("jobs"). - Name(name). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *jobs) List(opts api.ListOptions) (result *v1beta1.JobList, err error) { - result = &v1beta1.JobList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("jobs"). - VersionedParams(&opts, api.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested jobs. -func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) { - return c.client.Get(). - Prefix("watch"). - Namespace(c.ns). - Resource("jobs"). - VersionedParams(&opts, api.ParameterCodec). - Watch() -} - -// Patch applies the patch and returns the patched job. -func (c *jobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Job, err error) { - result = &v1beta1.Job{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("jobs"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/doc.go deleted file mode 100644 index 0c1ca41fa..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/doc.go +++ /dev/null @@ -1,20 +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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/policy_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/policy_client.go deleted file mode 100644 index 0491d3d5c..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/policy_client.go +++ /dev/null @@ -1,96 +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 v1alpha1 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - registered "k8s.io/client-go/1.5/pkg/apimachinery/registered" - serializer "k8s.io/client-go/1.5/pkg/runtime/serializer" - rest "k8s.io/client-go/1.5/rest" -) - -type PolicyInterface interface { - GetRESTClient() *rest.RESTClient - PodDisruptionBudgetsGetter -} - -// PolicyClient is used to interact with features provided by the Policy group. -type PolicyClient struct { - *rest.RESTClient -} - -func (c *PolicyClient) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface { - return newPodDisruptionBudgets(c, namespace) -} - -// NewForConfig creates a new PolicyClient for the given config. -func NewForConfig(c *rest.Config) (*PolicyClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &PolicyClient{client}, nil -} - -// NewForConfigOrDie creates a new PolicyClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *PolicyClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new PolicyClient for the given RESTClient. -func New(c *rest.RESTClient) *PolicyClient { - return &PolicyClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - // if policy group is not registered, return an error - g, err := registered.Group("policy") - if err != nil { - return err - } - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - // TODO: Unconditionally set the config.Version, until we fix the config. - //if config.Version == "" { - copyGroupVersion := g.GroupVersion - config.GroupVersion = ©GroupVersion - //} - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// GetRESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *PolicyClient) GetRESTClient() *rest.RESTClient { - if c == nil { - return nil - } - return c.RESTClient -} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/doc.go deleted file mode 100644 index 0c1ca41fa..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/doc.go +++ /dev/null @@ -1,20 +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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/rbac_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/rbac_client.go deleted file mode 100644 index fde5a6036..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/rbac_client.go +++ /dev/null @@ -1,111 +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 v1alpha1 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - registered "k8s.io/client-go/1.5/pkg/apimachinery/registered" - serializer "k8s.io/client-go/1.5/pkg/runtime/serializer" - rest "k8s.io/client-go/1.5/rest" -) - -type RbacInterface interface { - GetRESTClient() *rest.RESTClient - ClusterRolesGetter - ClusterRoleBindingsGetter - RolesGetter - RoleBindingsGetter -} - -// RbacClient is used to interact with features provided by the Rbac group. -type RbacClient struct { - *rest.RESTClient -} - -func (c *RbacClient) ClusterRoles() ClusterRoleInterface { - return newClusterRoles(c) -} - -func (c *RbacClient) ClusterRoleBindings() ClusterRoleBindingInterface { - return newClusterRoleBindings(c) -} - -func (c *RbacClient) Roles(namespace string) RoleInterface { - return newRoles(c, namespace) -} - -func (c *RbacClient) RoleBindings(namespace string) RoleBindingInterface { - return newRoleBindings(c, namespace) -} - -// NewForConfig creates a new RbacClient for the given config. -func NewForConfig(c *rest.Config) (*RbacClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &RbacClient{client}, nil -} - -// NewForConfigOrDie creates a new RbacClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *RbacClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new RbacClient for the given RESTClient. -func New(c *rest.RESTClient) *RbacClient { - return &RbacClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - // if rbac group is not registered, return an error - g, err := registered.Group("rbac.authorization.k8s.io") - if err != nil { - return err - } - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - // TODO: Unconditionally set the config.Version, until we fix the config. - //if config.Version == "" { - copyGroupVersion := g.GroupVersion - config.GroupVersion = ©GroupVersion - //} - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// GetRESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *RbacClient) GetRESTClient() *rest.RESTClient { - if c == nil { - return nil - } - return c.RESTClient -} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/doc.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/doc.go deleted file mode 100644 index 5616c95d3..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/doc.go +++ /dev/null @@ -1,20 +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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1alpha1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] - -// This package has the automatically generated typed clients. -package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/storage_client.go b/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/storage_client.go deleted file mode 100644 index 813cdbf05..000000000 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/storage_client.go +++ /dev/null @@ -1,96 +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 v1beta1 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - registered "k8s.io/client-go/1.5/pkg/apimachinery/registered" - serializer "k8s.io/client-go/1.5/pkg/runtime/serializer" - rest "k8s.io/client-go/1.5/rest" -) - -type StorageInterface interface { - GetRESTClient() *rest.RESTClient - StorageClassesGetter -} - -// StorageClient is used to interact with features provided by the Storage group. -type StorageClient struct { - *rest.RESTClient -} - -func (c *StorageClient) StorageClasses() StorageClassInterface { - return newStorageClasses(c) -} - -// NewForConfig creates a new StorageClient for the given config. -func NewForConfig(c *rest.Config) (*StorageClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &StorageClient{client}, nil -} - -// NewForConfigOrDie creates a new StorageClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *StorageClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new StorageClient for the given RESTClient. -func New(c *rest.RESTClient) *StorageClient { - return &StorageClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - // if storage group is not registered, return an error - g, err := registered.Group("storage.k8s.io") - if err != nil { - return err - } - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - // TODO: Unconditionally set the config.Version, until we fix the config. - //if config.Version == "" { - copyGroupVersion := g.GroupVersion - config.GroupVersion = ©GroupVersion - //} - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// GetRESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *StorageClient) GetRESTClient() *rest.RESTClient { - if c == nil { - return nil - } - return c.RESTClient -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/OWNERS b/vendor/k8s.io/client-go/1.5/pkg/api/OWNERS deleted file mode 100644 index d28472e0f..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/api/OWNERS +++ /dev/null @@ -1,6 +0,0 @@ -assignees: - - bgrant0607 - - erictune - - lavalamp - - smarterclayton - - thockin diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/context.go b/vendor/k8s.io/client-go/1.5/pkg/api/context.go deleted file mode 100644 index fba7b7338..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/api/context.go +++ /dev/null @@ -1,152 +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/client-go/1.5/pkg/auth/user" - "k8s.io/client-go/1.5/pkg/types" -) - -// 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 - -const ( - // namespaceKey is the context key for the request namespace. - namespaceKey key = iota - - // userKey is the context key for the request user. - userKey - - // uidKey is the context key for the uid to assign to an object on create. - uidKey - - // userAgentKey is the context key for the request user agent. - userAgentKey -) - -// 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 -} - -// WithUID returns a copy of parent in which the uid value is set -func WithUID(parent Context, uid types.UID) Context { - return WithValue(parent, uidKey, uid) -} - -// UIDFrom returns the value of the uid key on the ctx -func UIDFrom(ctx Context) (types.UID, bool) { - uid, ok := ctx.Value(uidKey).(types.UID) - return uid, ok -} - -// WithUserAgent returns a copy of parent in which the user value is set -func WithUserAgent(parent Context, userAgent string) Context { - return WithValue(parent, userAgentKey, userAgent) -} - -// UserAgentFrom returns the value of the userAgent key on the ctx -func UserAgentFrom(ctx Context) (string, bool) { - userAgent, ok := ctx.Value(userAgentKey).(string) - return userAgent, ok -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/install/install.go b/vendor/k8s.io/client-go/1.5/pkg/api/install/install.go deleted file mode 100644 index a4518bc0a..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/api/install/install.go +++ /dev/null @@ -1,153 +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/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/meta" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/apimachinery" - "k8s.io/client-go/1.5/pkg/apimachinery/registered" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/util/sets" -) - -const importPrefix = "k8s.io/client-go/1.5/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 - } - return nil -} - -func newRESTMapper(externalVersions []unversioned.GroupVersion) meta.RESTMapper { - // the list of kinds that are scoped at the root of the api hierarchy - // if a kind is not enumerated here, it is assumed to have a namespace scope - rootScoped := sets.NewString( - "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) - - 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 - if err := api.AddToScheme(api.Scheme); err != nil { - // Programmer error, detect immediately - panic(err) - } - // 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: - if err := v1.AddToScheme(api.Scheme); err != nil { - // Programmer error, detect immediately - panic(err) - } - } - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/meta.go b/vendor/k8s.io/client-go/1.5/pkg/api/meta.go deleted file mode 100644 index 6a90006c2..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/api/meta.go +++ /dev/null @@ -1,140 +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/client-go/1.5/pkg/api/meta" - "k8s.io/client-go/1.5/pkg/api/meta/metatypes" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/conversion" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/types" - "k8s.io/client-go/1.5/pkg/util/uuid" -) - -// FillObjectMetaSystemFields populates fields that are managed by the system on ObjectMeta. -func FillObjectMetaSystemFields(ctx Context, meta *ObjectMeta) { - meta.CreationTimestamp = unversioned.Now() - // allows admission controllers to assign a UID earlier in the request processing - // to support tracking resources pending creation. - uid, found := UIDFrom(ctx) - if !found { - uid = uuid.NewUUID() - } - meta.UID = uid - 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 } - -// 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 -} - -func (meta *ObjectMeta) GetClusterName() string { - return meta.ClusterName -} -func (meta *ObjectMeta) SetClusterName(clusterName string) { - meta.ClusterName = clusterName -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/meta/metatypes/types.go b/vendor/k8s.io/client-go/1.5/pkg/api/meta/metatypes/types.go deleted file mode 100644 index 4f41bb10c..000000000 --- a/vendor/k8s.io/client-go/1.5/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/client-go/1.5/pkg/types" - -type OwnerReference struct { - APIVersion string - Kind string - UID types.UID - Name string - Controller *bool -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/requestcontext.go b/vendor/k8s.io/client-go/1.5/pkg/api/requestcontext.go deleted file mode 100644 index 724fea811..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/api/requestcontext.go +++ /dev/null @@ -1,117 +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" - - "github.com/golang/glog" -) - -// 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) -} - -// WithRequestContext 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 WithRequestContext(handler http.Handler, mapper RequestContextMapper) http.Handler { - rcMap, ok := mapper.(*requestContextMap) - if !ok { - glog.Fatal("Unknown RequestContextMapper implementation.") - } - - return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - if rcMap.init(req, NewContext()) { - // If we were the ones to successfully initialize, pair with a remove - defer rcMap.remove(req) - } - handler.ServeHTTP(w, req) - }) -} - -// 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/vendor/k8s.io/client-go/1.5/pkg/api/resource/generated.pb.go b/vendor/k8s.io/client-go/1.5/pkg/api/resource/generated.pb.go deleted file mode 100644 index 10fe6f07b..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/api/resource/generated.pb.go +++ /dev/null @@ -1,69 +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 - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -const _ = proto.GoGoProtoPackageIsVersion1 - -func (m *Quantity) Reset() { *m = Quantity{} } -func (*Quantity) ProtoMessage() {} -func (*Quantity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } - -func init() { - proto.RegisterType((*Quantity)(nil), "k8s.io.client-go.1.5.pkg.api.resource.Quantity") -} - -var fileDescriptorGenerated = []byte{ - // 222 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x32, 0xca, 0xb6, 0x28, 0xd6, - 0xcb, 0xcc, 0xd7, 0xcf, 0x2e, 0x4d, 0x4a, 0x2d, 0xca, 0x4b, 0x2d, 0x49, 0x2d, 0xd6, 0x2f, 0xc8, - 0x4e, 0xd7, 0x4f, 0x2c, 0xc8, 0xd4, 0x2f, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xd5, 0x4f, - 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, - 0x82, 0xe8, 0xd1, 0x43, 0xe8, 0xd1, 0x03, 0xea, 0xd1, 0x03, 0xea, 0xd1, 0x83, 0xe9, 0x91, 0xd2, - 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, - 0x07, 0x6b, 0x4d, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0xa4, 0x94, 0x21, 0x76, - 0x67, 0x94, 0x96, 0x64, 0xe6, 0xe8, 0x67, 0xe6, 0x95, 0x14, 0x97, 0x14, 0xa1, 0xbb, 0x42, 0xc9, - 0x82, 0x8b, 0x23, 0xb0, 0x34, 0x31, 0xaf, 0x24, 0xb3, 0xa4, 0x52, 0x48, 0x8c, 0x8b, 0x0d, 0xa8, - 0x24, 0x33, 0x2f, 0x5d, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xca, 0xb3, 0x12, 0x99, 0xb1, - 0x40, 0x9e, 0xa1, 0x63, 0xa1, 0x3c, 0xc3, 0x04, 0x20, 0x5e, 0x00, 0xc4, 0x0d, 0x77, 0x14, 0x18, - 0x9c, 0xb4, 0x4e, 0x3c, 0x94, 0x63, 0xb8, 0x00, 0xc4, 0x37, 0x80, 0xb8, 0xe1, 0x91, 0x1c, 0xe3, - 0x09, 0x20, 0xbe, 0x00, 0xc4, 0x0f, 0x80, 0x78, 0xc2, 0x63, 0x39, 0x86, 0x28, 0x0e, 0x98, 0x3f, - 0x00, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0x1c, 0x7f, 0xff, 0x20, 0x01, 0x00, 0x00, -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/meta.go b/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/meta.go deleted file mode 100644 index 48009da16..000000000 --- a/vendor/k8s.io/client-go/1.5/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/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/register.go b/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/register.go deleted file mode 100644 index 907188bc7..000000000 --- a/vendor/k8s.io/client-go/1.5/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 a Group qualified GroupKind -func Kind(kind string) GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/well_known_labels.go b/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/well_known_labels.go deleted file mode 100644 index 318c6eebf..000000000 --- a/vendor/k8s.io/client-go/1.5/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/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/zz_generated.deepcopy.go deleted file mode 100644 index dc98d2a32..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/api/unversioned/zz_generated.deepcopy.go +++ /dev/null @@ -1,390 +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/client-go/1.5/pkg/conversion" - time "time" -) - -func DeepCopy_unversioned_APIGroup(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*APIGroup) - out := out.(*APIGroup) - 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 interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*APIGroupList) - out := out.(*APIGroupList) - 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 interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*APIResource) - out := out.(*APIResource) - out.Name = in.Name - out.Namespaced = in.Namespaced - out.Kind = in.Kind - return nil - } -} - -func DeepCopy_unversioned_APIResourceList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*APIResourceList) - out := out.(*APIResourceList) - 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 interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*APIVersions) - out := out.(*APIVersions) - 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 interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Duration) - out := out.(*Duration) - out.Duration = in.Duration - return nil - } -} - -func DeepCopy_unversioned_ExportOptions(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ExportOptions) - out := out.(*ExportOptions) - out.TypeMeta = in.TypeMeta - out.Export = in.Export - out.Exact = in.Exact - return nil - } -} - -func DeepCopy_unversioned_GroupKind(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*GroupKind) - out := out.(*GroupKind) - out.Group = in.Group - out.Kind = in.Kind - return nil - } -} - -func DeepCopy_unversioned_GroupResource(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*GroupResource) - out := out.(*GroupResource) - out.Group = in.Group - out.Resource = in.Resource - return nil - } -} - -func DeepCopy_unversioned_GroupVersion(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*GroupVersion) - out := out.(*GroupVersion) - out.Group = in.Group - out.Version = in.Version - return nil - } -} - -func DeepCopy_unversioned_GroupVersionForDiscovery(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*GroupVersionForDiscovery) - out := out.(*GroupVersionForDiscovery) - out.GroupVersion = in.GroupVersion - out.Version = in.Version - return nil - } -} - -func DeepCopy_unversioned_GroupVersionKind(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*GroupVersionKind) - out := out.(*GroupVersionKind) - out.Group = in.Group - out.Version = in.Version - out.Kind = in.Kind - return nil - } -} - -func DeepCopy_unversioned_GroupVersionResource(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*GroupVersionResource) - out := out.(*GroupVersionResource) - out.Group = in.Group - out.Version = in.Version - out.Resource = in.Resource - return nil - } -} - -func DeepCopy_unversioned_LabelSelector(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*LabelSelector) - out := out.(*LabelSelector) - 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 interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*LabelSelectorRequirement) - out := out.(*LabelSelectorRequirement) - 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 interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ListMeta) - out := out.(*ListMeta) - out.SelfLink = in.SelfLink - out.ResourceVersion = in.ResourceVersion - return nil - } -} - -func DeepCopy_unversioned_Patch(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Patch) - out := out.(*Patch) - _ = in - _ = out - return nil - } -} - -func DeepCopy_unversioned_RootPaths(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*RootPaths) - out := out.(*RootPaths) - 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 interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ServerAddressByClientCIDR) - out := out.(*ServerAddressByClientCIDR) - out.ClientCIDR = in.ClientCIDR - out.ServerAddress = in.ServerAddress - return nil - } -} - -func DeepCopy_unversioned_Status(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Status) - out := out.(*Status) - 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 interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*StatusCause) - out := out.(*StatusCause) - out.Type = in.Type - out.Message = in.Message - out.Field = in.Field - return nil - } -} - -func DeepCopy_unversioned_StatusDetails(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*StatusDetails) - out := out.(*StatusDetails) - 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 interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Time) - out := out.(*Time) - if newVal, err := c.DeepCopy(&in.Time); err != nil { - return err - } else { - out.Time = *newVal.(*time.Time) - } - return nil - } -} - -func DeepCopy_unversioned_Timestamp(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Timestamp) - out := out.(*Timestamp) - out.Seconds = in.Seconds - out.Nanos = in.Nanos - return nil - } -} - -func DeepCopy_unversioned_TypeMeta(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*TypeMeta) - out := out.(*TypeMeta) - out.Kind = in.Kind - out.APIVersion = in.APIVersion - return nil - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/validation/path/name.go b/vendor/k8s.io/client-go/1.5/pkg/api/validation/path/name.go deleted file mode 100644 index 981d9bb46..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/api/validation/path/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 path - -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/vendor/k8s.io/client-go/1.5/pkg/apis/apps/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/apps/types.generated.go deleted file mode 100644 index 6e910b944..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/types.generated.go +++ /dev/null @@ -1,1628 +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 apps - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - pkg2_api "k8s.io/client-go/1.5/pkg/api" - pkg4_resource "k8s.io/client-go/1.5/pkg/api/resource" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg3_types "k8s.io/client-go/1.5/pkg/types" - pkg5_intstr "k8s.io/client-go/1.5/pkg/util/intstr" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg2_api.ObjectMeta - var v1 pkg4_resource.Quantity - var v2 pkg1_unversioned.TypeMeta - var v3 pkg3_types.UID - var v4 pkg5_intstr.IntOrString - var v5 time.Time - _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 - } -} - -func (x *PetSet) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [5]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = x.Kind != "" - yyq2[1] = x.APIVersion != "" - yyq2[2] = true - yyq2[3] = true - yyq2[4] = true - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(5) - } else { - yynn2 = 0 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[1] { - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy11 := &x.ObjectMeta - yy11.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[3] { - yy13 := &x.Spec - yy13.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy14 := &x.Spec - yy14.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { - yy16 := &x.Status - yy16.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy17 := &x.Status - yy17.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PetSet) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym18 := z.DecBinary() - _ = yym18 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct19 := r.ContainerType() - if yyct19 == codecSelferValueTypeMap1234 { - yyl19 := r.ReadMapStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl19, d) - } - } else if yyct19 == codecSelferValueTypeArray1234 { - yyl19 := r.ReadArrayStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl19, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PetSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys20Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys20Slc - var yyhl20 bool = l >= 0 - for yyj20 := 0; ; yyj20++ { - if yyhl20 { - if yyj20 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys20Slc = r.DecodeBytes(yys20Slc, true, true) - yys20 := string(yys20Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys20 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv23 := &x.ObjectMeta - yyv23.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = PetSetSpec{} - } else { - yyv24 := &x.Spec - yyv24.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = PetSetStatus{} - } else { - yyv25 := &x.Status - yyv25.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys20) - } // end switch yys20 - } // end for yyj20 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PetSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj26 int - var yyb26 bool - var yyhl26 bool = l >= 0 - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv29 := &x.ObjectMeta - yyv29.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = PetSetSpec{} - } else { - yyv30 := &x.Spec - yyv30.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = PetSetStatus{} - } else { - yyv31 := &x.Status - yyv31.CodecDecodeSelf(d) - } - for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj26-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *PetSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym32 := z.EncBinary() - _ = yym32 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep33 := !z.EncBinary() - yy2arr33 := z.EncBasicHandle().StructToArray - var yyq33 [5]bool - _, _, _ = yysep33, yyq33, yy2arr33 - const yyr33 bool = false - yyq33[0] = x.Replicas != 0 - yyq33[1] = x.Selector != nil - yyq33[3] = len(x.VolumeClaimTemplates) != 0 - var yynn33 int - if yyr33 || yy2arr33 { - r.EncodeArrayStart(5) - } else { - yynn33 = 2 - for _, b := range yyq33 { - if b { - yynn33++ - } - } - r.EncodeMapStart(yynn33) - yynn33 = 0 - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[0] { - yym35 := z.EncBinary() - _ = yym35 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq33[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym36 := z.EncBinary() - _ = yym36 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[1] { - if x.Selector == nil { - r.EncodeNil() - } else { - yym38 := z.EncBinary() - _ = yym38 - if false { - } else if z.HasExtensions() && z.EncExt(x.Selector) { - } else { - z.EncFallback(x.Selector) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq33[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Selector == nil { - r.EncodeNil() - } else { - yym39 := z.EncBinary() - _ = yym39 - if false { - } else if z.HasExtensions() && z.EncExt(x.Selector) { - } else { - z.EncFallback(x.Selector) - } - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy41 := &x.Template - yy41.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("template")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy42 := &x.Template - yy42.CodecEncodeSelf(e) - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[3] { - if x.VolumeClaimTemplates == nil { - r.EncodeNil() - } else { - yym44 := z.EncBinary() - _ = yym44 - if false { - } else { - h.encSliceapi_PersistentVolumeClaim(([]pkg2_api.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq33[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("volumeClaimTemplates")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.VolumeClaimTemplates == nil { - r.EncodeNil() - } else { - yym45 := z.EncBinary() - _ = yym45 - if false { - } else { - h.encSliceapi_PersistentVolumeClaim(([]pkg2_api.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) - } - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym47 := z.EncBinary() - _ = yym47 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("serviceName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym48 := z.EncBinary() - _ = yym48 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PetSetSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym49 := z.DecBinary() - _ = yym49 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct50 := r.ContainerType() - if yyct50 == codecSelferValueTypeMap1234 { - yyl50 := r.ReadMapStart() - if yyl50 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl50, d) - } - } else if yyct50 == codecSelferValueTypeArray1234 { - yyl50 := r.ReadArrayStart() - if yyl50 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl50, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PetSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys51Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys51Slc - var yyhl51 bool = l >= 0 - for yyj51 := 0; ; yyj51++ { - if yyhl51 { - if yyj51 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys51Slc = r.DecodeBytes(yys51Slc, true, true) - yys51 := string(yys51Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys51 { - case "replicas": - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int(r.DecodeInt(codecSelferBitsize1234)) - } - case "selector": - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(pkg1_unversioned.LabelSelector) - } - yym54 := z.DecBinary() - _ = yym54 - if false { - } else if z.HasExtensions() && z.DecExt(x.Selector) { - } else { - z.DecFallback(x.Selector, false) - } - } - case "template": - if r.TryDecodeAsNil() { - x.Template = pkg2_api.PodTemplateSpec{} - } else { - yyv55 := &x.Template - yyv55.CodecDecodeSelf(d) - } - case "volumeClaimTemplates": - if r.TryDecodeAsNil() { - x.VolumeClaimTemplates = nil - } else { - yyv56 := &x.VolumeClaimTemplates - yym57 := z.DecBinary() - _ = yym57 - if false { - } else { - h.decSliceapi_PersistentVolumeClaim((*[]pkg2_api.PersistentVolumeClaim)(yyv56), d) - } - } - case "serviceName": - if r.TryDecodeAsNil() { - x.ServiceName = "" - } else { - x.ServiceName = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys51) - } // end switch yys51 - } // end for yyj51 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PetSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj59 int - var yyb59 bool - var yyhl59 bool = l >= 0 - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l - } else { - yyb59 = r.CheckBreak() - } - if yyb59 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int(r.DecodeInt(codecSelferBitsize1234)) - } - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l - } else { - yyb59 = r.CheckBreak() - } - if yyb59 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(pkg1_unversioned.LabelSelector) - } - yym62 := z.DecBinary() - _ = yym62 - if false { - } else if z.HasExtensions() && z.DecExt(x.Selector) { - } else { - z.DecFallback(x.Selector, false) - } - } - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l - } else { - yyb59 = r.CheckBreak() - } - if yyb59 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Template = pkg2_api.PodTemplateSpec{} - } else { - yyv63 := &x.Template - yyv63.CodecDecodeSelf(d) - } - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l - } else { - yyb59 = r.CheckBreak() - } - if yyb59 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.VolumeClaimTemplates = nil - } else { - yyv64 := &x.VolumeClaimTemplates - yym65 := z.DecBinary() - _ = yym65 - if false { - } else { - h.decSliceapi_PersistentVolumeClaim((*[]pkg2_api.PersistentVolumeClaim)(yyv64), d) - } - } - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l - } else { - yyb59 = r.CheckBreak() - } - if yyb59 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ServiceName = "" - } else { - x.ServiceName = string(r.DecodeString()) - } - for { - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l - } else { - yyb59 = r.CheckBreak() - } - if yyb59 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj59-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *PetSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym67 := z.EncBinary() - _ = yym67 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep68 := !z.EncBinary() - yy2arr68 := z.EncBasicHandle().StructToArray - var yyq68 [2]bool - _, _, _ = yysep68, yyq68, yy2arr68 - const yyr68 bool = false - yyq68[0] = x.ObservedGeneration != nil - var yynn68 int - if yyr68 || yy2arr68 { - r.EncodeArrayStart(2) - } else { - yynn68 = 1 - for _, b := range yyq68 { - if b { - yynn68++ - } - } - r.EncodeMapStart(yynn68) - yynn68 = 0 - } - if yyr68 || yy2arr68 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq68[0] { - if x.ObservedGeneration == nil { - r.EncodeNil() - } else { - yy70 := *x.ObservedGeneration - yym71 := z.EncBinary() - _ = yym71 - if false { - } else { - r.EncodeInt(int64(yy70)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq68[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ObservedGeneration == nil { - r.EncodeNil() - } else { - yy72 := *x.ObservedGeneration - yym73 := z.EncBinary() - _ = yym73 - if false { - } else { - r.EncodeInt(int64(yy72)) - } - } - } - } - if yyr68 || yy2arr68 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym75 := z.EncBinary() - _ = yym75 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym76 := z.EncBinary() - _ = yym76 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } - if yyr68 || yy2arr68 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PetSetStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym77 := z.DecBinary() - _ = yym77 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct78 := r.ContainerType() - if yyct78 == codecSelferValueTypeMap1234 { - yyl78 := r.ReadMapStart() - if yyl78 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl78, d) - } - } else if yyct78 == codecSelferValueTypeArray1234 { - yyl78 := r.ReadArrayStart() - if yyl78 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl78, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PetSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys79Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys79Slc - var yyhl79 bool = l >= 0 - for yyj79 := 0; ; yyj79++ { - if yyhl79 { - if yyj79 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys79Slc = r.DecodeBytes(yys79Slc, true, true) - yys79 := string(yys79Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys79 { - case "observedGeneration": - if r.TryDecodeAsNil() { - if x.ObservedGeneration != nil { - x.ObservedGeneration = nil - } - } else { - if x.ObservedGeneration == nil { - x.ObservedGeneration = new(int64) - } - yym81 := z.DecBinary() - _ = yym81 - if false { - } else { - *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) - } - } - case "replicas": - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int(r.DecodeInt(codecSelferBitsize1234)) - } - default: - z.DecStructFieldNotFound(-1, yys79) - } // end switch yys79 - } // end for yyj79 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PetSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj83 int - var yyb83 bool - var yyhl83 bool = l >= 0 - yyj83++ - if yyhl83 { - yyb83 = yyj83 > l - } else { - yyb83 = r.CheckBreak() - } - if yyb83 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.ObservedGeneration != nil { - x.ObservedGeneration = nil - } - } else { - if x.ObservedGeneration == nil { - x.ObservedGeneration = new(int64) - } - yym85 := z.DecBinary() - _ = yym85 - if false { - } else { - *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) - } - } - yyj83++ - if yyhl83 { - yyb83 = yyj83 > l - } else { - yyb83 = r.CheckBreak() - } - if yyb83 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int(r.DecodeInt(codecSelferBitsize1234)) - } - for { - yyj83++ - if yyhl83 { - yyb83 = yyj83 > l - } else { - yyb83 = r.CheckBreak() - } - if yyb83 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj83-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *PetSetList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym87 := z.EncBinary() - _ = yym87 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep88 := !z.EncBinary() - yy2arr88 := z.EncBasicHandle().StructToArray - var yyq88 [4]bool - _, _, _ = yysep88, yyq88, yy2arr88 - const yyr88 bool = false - yyq88[0] = x.Kind != "" - yyq88[1] = x.APIVersion != "" - yyq88[2] = true - var yynn88 int - if yyr88 || yy2arr88 { - r.EncodeArrayStart(4) - } else { - yynn88 = 1 - for _, b := range yyq88 { - if b { - yynn88++ - } - } - r.EncodeMapStart(yynn88) - yynn88 = 0 - } - if yyr88 || yy2arr88 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq88[0] { - yym90 := z.EncBinary() - _ = yym90 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq88[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym91 := z.EncBinary() - _ = yym91 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr88 || yy2arr88 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq88[1] { - yym93 := z.EncBinary() - _ = yym93 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq88[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym94 := z.EncBinary() - _ = yym94 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr88 || yy2arr88 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq88[2] { - yy96 := &x.ListMeta - yym97 := z.EncBinary() - _ = yym97 - if false { - } else if z.HasExtensions() && z.EncExt(yy96) { - } else { - z.EncFallback(yy96) - } - } else { - r.EncodeNil() - } - } else { - if yyq88[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy98 := &x.ListMeta - yym99 := z.EncBinary() - _ = yym99 - if false { - } else if z.HasExtensions() && z.EncExt(yy98) { - } else { - z.EncFallback(yy98) - } - } - } - if yyr88 || yy2arr88 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym101 := z.EncBinary() - _ = yym101 - if false { - } else { - h.encSlicePetSet(([]PetSet)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym102 := z.EncBinary() - _ = yym102 - if false { - } else { - h.encSlicePetSet(([]PetSet)(x.Items), e) - } - } - } - if yyr88 || yy2arr88 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PetSetList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym103 := z.DecBinary() - _ = yym103 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct104 := r.ContainerType() - if yyct104 == codecSelferValueTypeMap1234 { - yyl104 := r.ReadMapStart() - if yyl104 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl104, d) - } - } else if yyct104 == codecSelferValueTypeArray1234 { - yyl104 := r.ReadArrayStart() - if yyl104 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl104, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PetSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys105Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys105Slc - var yyhl105 bool = l >= 0 - for yyj105 := 0; ; yyj105++ { - if yyhl105 { - if yyj105 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys105Slc = r.DecodeBytes(yys105Slc, true, true) - yys105 := string(yys105Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys105 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv108 := &x.ListMeta - yym109 := z.DecBinary() - _ = yym109 - if false { - } else if z.HasExtensions() && z.DecExt(yyv108) { - } else { - z.DecFallback(yyv108, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv110 := &x.Items - yym111 := z.DecBinary() - _ = yym111 - if false { - } else { - h.decSlicePetSet((*[]PetSet)(yyv110), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys105) - } // end switch yys105 - } // end for yyj105 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PetSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj112 int - var yyb112 bool - var yyhl112 bool = l >= 0 - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l - } else { - yyb112 = r.CheckBreak() - } - if yyb112 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l - } else { - yyb112 = r.CheckBreak() - } - if yyb112 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l - } else { - yyb112 = r.CheckBreak() - } - if yyb112 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv115 := &x.ListMeta - yym116 := z.DecBinary() - _ = yym116 - if false { - } else if z.HasExtensions() && z.DecExt(yyv115) { - } else { - z.DecFallback(yyv115, false) - } - } - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l - } else { - yyb112 = r.CheckBreak() - } - if yyb112 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv117 := &x.Items - yym118 := z.DecBinary() - _ = yym118 - if false { - } else { - h.decSlicePetSet((*[]PetSet)(yyv117), d) - } - } - for { - yyj112++ - if yyhl112 { - yyb112 = yyj112 > l - } else { - yyb112 = r.CheckBreak() - } - if yyb112 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj112-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) encSliceapi_PersistentVolumeClaim(v []pkg2_api.PersistentVolumeClaim, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv119 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy120 := &yyv119 - yy120.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceapi_PersistentVolumeClaim(v *[]pkg2_api.PersistentVolumeClaim, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv121 := *v - yyh121, yyl121 := z.DecSliceHelperStart() - var yyc121 bool - if yyl121 == 0 { - if yyv121 == nil { - yyv121 = []pkg2_api.PersistentVolumeClaim{} - yyc121 = true - } else if len(yyv121) != 0 { - yyv121 = yyv121[:0] - yyc121 = true - } - } else if yyl121 > 0 { - var yyrr121, yyrl121 int - var yyrt121 bool - if yyl121 > cap(yyv121) { - - yyrg121 := len(yyv121) > 0 - yyv2121 := yyv121 - yyrl121, yyrt121 = z.DecInferLen(yyl121, z.DecBasicHandle().MaxInitLen, 368) - if yyrt121 { - if yyrl121 <= cap(yyv121) { - yyv121 = yyv121[:yyrl121] - } else { - yyv121 = make([]pkg2_api.PersistentVolumeClaim, yyrl121) - } - } else { - yyv121 = make([]pkg2_api.PersistentVolumeClaim, yyrl121) - } - yyc121 = true - yyrr121 = len(yyv121) - if yyrg121 { - copy(yyv121, yyv2121) - } - } else if yyl121 != len(yyv121) { - yyv121 = yyv121[:yyl121] - yyc121 = true - } - yyj121 := 0 - for ; yyj121 < yyrr121; yyj121++ { - yyh121.ElemContainerState(yyj121) - if r.TryDecodeAsNil() { - yyv121[yyj121] = pkg2_api.PersistentVolumeClaim{} - } else { - yyv122 := &yyv121[yyj121] - yyv122.CodecDecodeSelf(d) - } - - } - if yyrt121 { - for ; yyj121 < yyl121; yyj121++ { - yyv121 = append(yyv121, pkg2_api.PersistentVolumeClaim{}) - yyh121.ElemContainerState(yyj121) - if r.TryDecodeAsNil() { - yyv121[yyj121] = pkg2_api.PersistentVolumeClaim{} - } else { - yyv123 := &yyv121[yyj121] - yyv123.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj121 := 0 - for ; !r.CheckBreak(); yyj121++ { - - if yyj121 >= len(yyv121) { - yyv121 = append(yyv121, pkg2_api.PersistentVolumeClaim{}) // var yyz121 pkg2_api.PersistentVolumeClaim - yyc121 = true - } - yyh121.ElemContainerState(yyj121) - if yyj121 < len(yyv121) { - if r.TryDecodeAsNil() { - yyv121[yyj121] = pkg2_api.PersistentVolumeClaim{} - } else { - yyv124 := &yyv121[yyj121] - yyv124.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj121 < len(yyv121) { - yyv121 = yyv121[:yyj121] - yyc121 = true - } else if yyj121 == 0 && yyv121 == nil { - yyv121 = []pkg2_api.PersistentVolumeClaim{} - yyc121 = true - } - } - yyh121.End() - if yyc121 { - *v = yyv121 - } -} - -func (x codecSelfer1234) encSlicePetSet(v []PetSet, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv125 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy126 := &yyv125 - yy126.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv127 := *v - yyh127, yyl127 := z.DecSliceHelperStart() - var yyc127 bool - if yyl127 == 0 { - if yyv127 == nil { - yyv127 = []PetSet{} - yyc127 = true - } else if len(yyv127) != 0 { - yyv127 = yyv127[:0] - yyc127 = true - } - } else if yyl127 > 0 { - var yyrr127, yyrl127 int - var yyrt127 bool - if yyl127 > cap(yyv127) { - - yyrg127 := len(yyv127) > 0 - yyv2127 := yyv127 - yyrl127, yyrt127 = z.DecInferLen(yyl127, z.DecBasicHandle().MaxInitLen, 776) - if yyrt127 { - if yyrl127 <= cap(yyv127) { - yyv127 = yyv127[:yyrl127] - } else { - yyv127 = make([]PetSet, yyrl127) - } - } else { - yyv127 = make([]PetSet, yyrl127) - } - yyc127 = true - yyrr127 = len(yyv127) - if yyrg127 { - copy(yyv127, yyv2127) - } - } else if yyl127 != len(yyv127) { - yyv127 = yyv127[:yyl127] - yyc127 = true - } - yyj127 := 0 - for ; yyj127 < yyrr127; yyj127++ { - yyh127.ElemContainerState(yyj127) - if r.TryDecodeAsNil() { - yyv127[yyj127] = PetSet{} - } else { - yyv128 := &yyv127[yyj127] - yyv128.CodecDecodeSelf(d) - } - - } - if yyrt127 { - for ; yyj127 < yyl127; yyj127++ { - yyv127 = append(yyv127, PetSet{}) - yyh127.ElemContainerState(yyj127) - if r.TryDecodeAsNil() { - yyv127[yyj127] = PetSet{} - } else { - yyv129 := &yyv127[yyj127] - yyv129.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj127 := 0 - for ; !r.CheckBreak(); yyj127++ { - - if yyj127 >= len(yyv127) { - yyv127 = append(yyv127, PetSet{}) // var yyz127 PetSet - yyc127 = true - } - yyh127.ElemContainerState(yyj127) - if yyj127 < len(yyv127) { - if r.TryDecodeAsNil() { - yyv127[yyj127] = PetSet{} - } else { - yyv130 := &yyv127[yyj127] - yyv130.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj127 < len(yyv127) { - yyv127 = yyv127[:yyj127] - yyc127 = true - } else if yyj127 == 0 && yyv127 == nil { - yyv127 = []PetSet{} - yyc127 = true - } - } - yyh127.End() - if yyc127 { - *v = yyv127 - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/types.go b/vendor/k8s.io/client-go/1.5/pkg/apis/apps/types.go deleted file mode 100644 index 19c114edd..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/types.go +++ /dev/null @@ -1,96 +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 apps - -import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" -) - -// +genclient=true - -// PetSet represents a set of pods with consistent identities. -// Identities are defined as: -// - Network: A single stable DNS and hostname. -// - Storage: As many VolumeClaims as requested. -// The PetSet guarantees that a given network identity will always -// map to the same storage identity. PetSet is currently in alpha and -// and subject to change without notice. -type PetSet struct { - unversioned.TypeMeta `json:",inline"` - api.ObjectMeta `json:"metadata,omitempty"` - - // Spec defines the desired identities of pets in this set. - Spec PetSetSpec `json:"spec,omitempty"` - - // Status is the current status of Pets in this PetSet. This data - // may be out of date by some window of time. - Status PetSetStatus `json:"status,omitempty"` -} - -// A PetSetSpec is the specification of a PetSet. -type PetSetSpec struct { - // Replicas is the desired number of replicas of the given Template. - // These are replicas in the sense that they are instantiations of the - // same Template, but individual replicas also have a consistent identity. - // If unspecified, defaults to 1. - // TODO: Consider a rename of this field. - Replicas int `json:"replicas,omitempty"` - - // Selector is a label query over pods that should match the replica count. - // If empty, defaulted to labels on the pod template. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - Selector *unversioned.LabelSelector `json:"selector,omitempty"` - - // Template is the object that describes the pod that will be created if - // insufficient replicas are detected. Each pod stamped out by the PetSet - // will fulfill this Template, but have a unique identity from the rest - // of the PetSet. - Template api.PodTemplateSpec `json:"template"` - - // VolumeClaimTemplates is a list of claims that pets are allowed to reference. - // The PetSet controller is responsible for mapping network identities to - // claims in a way that maintains the identity of a pet. Every claim in - // this list must have at least one matching (by name) volumeMount in one - // container in the template. A claim in this list takes precedence over - // any volumes in the template, with the same name. - // TODO: Define the behavior if a claim already exists with the same name. - VolumeClaimTemplates []api.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` - - // ServiceName is the name of the service that governs this PetSet. - // This service must exist before the PetSet, and is responsible for - // the network identity of the set. Pets get DNS/hostnames that follow the - // pattern: pet-specific-string.serviceName.default.svc.cluster.local - // where "pet-specific-string" is managed by the PetSet controller. - ServiceName string `json:"serviceName"` -} - -// PetSetStatus represents the current state of a PetSet. -type PetSetStatus struct { - // most recent generation observed by this autoscaler. - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - - // Replicas is the number of actual replicas. - Replicas int `json:"replicas"` -} - -// PetSetList is a collection of PetSets. -type PetSetList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` - Items []PetSet `json:"items"` -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/conversion.go b/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/conversion.go deleted file mode 100644 index 04c6f44b1..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/conversion.go +++ /dev/null @@ -1,114 +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 v1alpha1 - -import ( - "fmt" - - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/apis/apps" - "k8s.io/client-go/1.5/pkg/conversion" - "k8s.io/client-go/1.5/pkg/runtime" -) - -func addConversionFuncs(scheme *runtime.Scheme) error { - // Add non-generated conversion functions to handle the *int32 -> int - // conversion. A pointer is useful in the versioned type so we can default - // it, but a plain int32 is more convenient in the internal type. These - // functions are the same as the autogenerated ones in every other way. - err := scheme.AddConversionFuncs( - Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec, - Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec, - ) - if err != nil { - return err - } - - return api.Scheme.AddFieldLabelConversionFunc("apps/v1alpha1", "PetSet", - func(label, value string) (string, string, error) { - switch label { - case "metadata.name", "metadata.namespace", "status.successful": - return label, value, nil - default: - return "", "", fmt.Errorf("field label not supported: %s", label) - } - }, - ) -} - -func Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(in *PetSetSpec, out *apps.PetSetSpec, s conversion.Scope) error { - if in.Replicas != nil { - out.Replicas = int(*in.Replicas) - } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(unversioned.LabelSelector) - if err := s.Convert(*in, *out, 0); err != nil { - return err - } - } else { - out.Selector = nil - } - if err := s.Convert(&in.Template, &out.Template, 0); err != nil { - return err - } - if in.VolumeClaimTemplates != nil { - in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]api.PersistentVolumeClaim, len(*in)) - for i := range *in { - if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil { - return err - } - } - } else { - out.VolumeClaimTemplates = nil - } - out.ServiceName = in.ServiceName - return nil -} - -func Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec(in *apps.PetSetSpec, out *PetSetSpec, s conversion.Scope) error { - out.Replicas = new(int32) - *out.Replicas = int32(in.Replicas) - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(unversioned.LabelSelector) - if err := s.Convert(*in, *out, 0); err != nil { - return err - } - } else { - out.Selector = nil - } - if err := s.Convert(&in.Template, &out.Template, 0); err != nil { - return err - } - if in.VolumeClaimTemplates != nil { - in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]v1.PersistentVolumeClaim, len(*in)) - for i := range *in { - if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil { - return err - } - } - } else { - out.VolumeClaimTemplates = nil - } - out.ServiceName = in.ServiceName - return nil -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/generated.proto b/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/generated.proto deleted file mode 100644 index 2338042bf..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/generated.proto +++ /dev/null @@ -1,103 +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.apis.apps.v1alpha1; - -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; -import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; -import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "v1alpha1"; - -// PetSet represents a set of pods with consistent identities. -// Identities are defined as: -// - Network: A single stable DNS and hostname. -// - Storage: As many VolumeClaims as requested. -// The PetSet guarantees that a given network identity will always -// map to the same storage identity. PetSet is currently in alpha -// and subject to change without notice. -message PetSet { - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; - - // Spec defines the desired identities of pets in this set. - optional PetSetSpec spec = 2; - - // Status is the current status of Pets in this PetSet. This data - // may be out of date by some window of time. - optional PetSetStatus status = 3; -} - -// PetSetList is a collection of PetSets. -message PetSetList { - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; - - repeated PetSet items = 2; -} - -// A PetSetSpec is the specification of a PetSet. -message PetSetSpec { - // Replicas is the desired number of replicas of the given Template. - // These are replicas in the sense that they are instantiations of the - // same Template, but individual replicas also have a consistent identity. - // If unspecified, defaults to 1. - // TODO: Consider a rename of this field. - optional int32 replicas = 1; - - // Selector is a label query over pods that should match the replica count. - // If empty, defaulted to labels on the pod template. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - optional k8s.io.kubernetes.pkg.api.unversioned.LabelSelector selector = 2; - - // Template is the object that describes the pod that will be created if - // insufficient replicas are detected. Each pod stamped out by the PetSet - // will fulfill this Template, but have a unique identity from the rest - // of the PetSet. - optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3; - - // VolumeClaimTemplates is a list of claims that pets are allowed to reference. - // The PetSet controller is responsible for mapping network identities to - // claims in a way that maintains the identity of a pet. Every claim in - // this list must have at least one matching (by name) volumeMount in one - // container in the template. A claim in this list takes precedence over - // any volumes in the template, with the same name. - // TODO: Define the behavior if a claim already exists with the same name. - repeated k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaim volumeClaimTemplates = 4; - - // ServiceName is the name of the service that governs this PetSet. - // This service must exist before the PetSet, and is responsible for - // the network identity of the set. Pets get DNS/hostnames that follow the - // pattern: pet-specific-string.serviceName.default.svc.cluster.local - // where "pet-specific-string" is managed by the PetSet controller. - optional string serviceName = 5; -} - -// PetSetStatus represents the current state of a PetSet. -message PetSetStatus { - // most recent generation observed by this autoscaler. - optional int64 observedGeneration = 1; - - // Replicas is the number of actual replicas. - optional int32 replicas = 2; -} - diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/types.generated.go deleted file mode 100644 index 2bea91f51..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/types.generated.go +++ /dev/null @@ -1,1658 +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 v1alpha1 - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - pkg4_resource "k8s.io/client-go/1.5/pkg/api/resource" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg2_v1 "k8s.io/client-go/1.5/pkg/api/v1" - pkg3_types "k8s.io/client-go/1.5/pkg/types" - pkg5_intstr "k8s.io/client-go/1.5/pkg/util/intstr" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg4_resource.Quantity - var v1 pkg1_unversioned.TypeMeta - var v2 pkg2_v1.ObjectMeta - var v3 pkg3_types.UID - var v4 pkg5_intstr.IntOrString - var v5 time.Time - _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 - } -} - -func (x *PetSet) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [5]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = x.Kind != "" - yyq2[1] = x.APIVersion != "" - yyq2[2] = true - yyq2[3] = true - yyq2[4] = true - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(5) - } else { - yynn2 = 0 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[1] { - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy11 := &x.ObjectMeta - yy11.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[3] { - yy13 := &x.Spec - yy13.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy14 := &x.Spec - yy14.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { - yy16 := &x.Status - yy16.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy17 := &x.Status - yy17.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PetSet) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym18 := z.DecBinary() - _ = yym18 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct19 := r.ContainerType() - if yyct19 == codecSelferValueTypeMap1234 { - yyl19 := r.ReadMapStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl19, d) - } - } else if yyct19 == codecSelferValueTypeArray1234 { - yyl19 := r.ReadArrayStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl19, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PetSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys20Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys20Slc - var yyhl20 bool = l >= 0 - for yyj20 := 0; ; yyj20++ { - if yyhl20 { - if yyj20 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys20Slc = r.DecodeBytes(yys20Slc, true, true) - yys20 := string(yys20Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys20 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv23 := &x.ObjectMeta - yyv23.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = PetSetSpec{} - } else { - yyv24 := &x.Spec - yyv24.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = PetSetStatus{} - } else { - yyv25 := &x.Status - yyv25.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys20) - } // end switch yys20 - } // end for yyj20 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PetSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj26 int - var yyb26 bool - var yyhl26 bool = l >= 0 - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv29 := &x.ObjectMeta - yyv29.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = PetSetSpec{} - } else { - yyv30 := &x.Spec - yyv30.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = PetSetStatus{} - } else { - yyv31 := &x.Status - yyv31.CodecDecodeSelf(d) - } - for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj26-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *PetSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym32 := z.EncBinary() - _ = yym32 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep33 := !z.EncBinary() - yy2arr33 := z.EncBasicHandle().StructToArray - var yyq33 [5]bool - _, _, _ = yysep33, yyq33, yy2arr33 - const yyr33 bool = false - yyq33[0] = x.Replicas != nil - yyq33[1] = x.Selector != nil - yyq33[3] = len(x.VolumeClaimTemplates) != 0 - var yynn33 int - if yyr33 || yy2arr33 { - r.EncodeArrayStart(5) - } else { - yynn33 = 2 - for _, b := range yyq33 { - if b { - yynn33++ - } - } - r.EncodeMapStart(yynn33) - yynn33 = 0 - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[0] { - if x.Replicas == nil { - r.EncodeNil() - } else { - yy35 := *x.Replicas - yym36 := z.EncBinary() - _ = yym36 - if false { - } else { - r.EncodeInt(int64(yy35)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq33[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Replicas == nil { - r.EncodeNil() - } else { - yy37 := *x.Replicas - yym38 := z.EncBinary() - _ = yym38 - if false { - } else { - r.EncodeInt(int64(yy37)) - } - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[1] { - if x.Selector == nil { - r.EncodeNil() - } else { - yym40 := z.EncBinary() - _ = yym40 - if false { - } else if z.HasExtensions() && z.EncExt(x.Selector) { - } else { - z.EncFallback(x.Selector) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq33[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Selector == nil { - r.EncodeNil() - } else { - yym41 := z.EncBinary() - _ = yym41 - if false { - } else if z.HasExtensions() && z.EncExt(x.Selector) { - } else { - z.EncFallback(x.Selector) - } - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy43 := &x.Template - yy43.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("template")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy44 := &x.Template - yy44.CodecEncodeSelf(e) - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[3] { - if x.VolumeClaimTemplates == nil { - r.EncodeNil() - } else { - yym46 := z.EncBinary() - _ = yym46 - if false { - } else { - h.encSlicev1_PersistentVolumeClaim(([]pkg2_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq33[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("volumeClaimTemplates")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.VolumeClaimTemplates == nil { - r.EncodeNil() - } else { - yym47 := z.EncBinary() - _ = yym47 - if false { - } else { - h.encSlicev1_PersistentVolumeClaim(([]pkg2_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) - } - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym49 := z.EncBinary() - _ = yym49 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("serviceName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym50 := z.EncBinary() - _ = yym50 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PetSetSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym51 := z.DecBinary() - _ = yym51 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct52 := r.ContainerType() - if yyct52 == codecSelferValueTypeMap1234 { - yyl52 := r.ReadMapStart() - if yyl52 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl52, d) - } - } else if yyct52 == codecSelferValueTypeArray1234 { - yyl52 := r.ReadArrayStart() - if yyl52 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl52, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PetSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys53Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys53Slc - var yyhl53 bool = l >= 0 - for yyj53 := 0; ; yyj53++ { - if yyhl53 { - if yyj53 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys53Slc = r.DecodeBytes(yys53Slc, true, true) - yys53 := string(yys53Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys53 { - case "replicas": - if r.TryDecodeAsNil() { - if x.Replicas != nil { - x.Replicas = nil - } - } else { - if x.Replicas == nil { - x.Replicas = new(int32) - } - yym55 := z.DecBinary() - _ = yym55 - if false { - } else { - *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) - } - } - case "selector": - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(pkg1_unversioned.LabelSelector) - } - yym57 := z.DecBinary() - _ = yym57 - if false { - } else if z.HasExtensions() && z.DecExt(x.Selector) { - } else { - z.DecFallback(x.Selector, false) - } - } - case "template": - if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} - } else { - yyv58 := &x.Template - yyv58.CodecDecodeSelf(d) - } - case "volumeClaimTemplates": - if r.TryDecodeAsNil() { - x.VolumeClaimTemplates = nil - } else { - yyv59 := &x.VolumeClaimTemplates - yym60 := z.DecBinary() - _ = yym60 - if false { - } else { - h.decSlicev1_PersistentVolumeClaim((*[]pkg2_v1.PersistentVolumeClaim)(yyv59), d) - } - } - case "serviceName": - if r.TryDecodeAsNil() { - x.ServiceName = "" - } else { - x.ServiceName = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys53) - } // end switch yys53 - } // end for yyj53 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PetSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj62 int - var yyb62 bool - var yyhl62 bool = l >= 0 - yyj62++ - if yyhl62 { - yyb62 = yyj62 > l - } else { - yyb62 = r.CheckBreak() - } - if yyb62 { - 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) - } - yym64 := z.DecBinary() - _ = yym64 - if false { - } else { - *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) - } - } - yyj62++ - if yyhl62 { - yyb62 = yyj62 > l - } else { - yyb62 = r.CheckBreak() - } - if yyb62 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(pkg1_unversioned.LabelSelector) - } - yym66 := z.DecBinary() - _ = yym66 - if false { - } else if z.HasExtensions() && z.DecExt(x.Selector) { - } else { - z.DecFallback(x.Selector, false) - } - } - yyj62++ - if yyhl62 { - yyb62 = yyj62 > l - } else { - yyb62 = r.CheckBreak() - } - if yyb62 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} - } else { - yyv67 := &x.Template - yyv67.CodecDecodeSelf(d) - } - yyj62++ - if yyhl62 { - yyb62 = yyj62 > l - } else { - yyb62 = r.CheckBreak() - } - if yyb62 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.VolumeClaimTemplates = nil - } else { - yyv68 := &x.VolumeClaimTemplates - yym69 := z.DecBinary() - _ = yym69 - if false { - } else { - h.decSlicev1_PersistentVolumeClaim((*[]pkg2_v1.PersistentVolumeClaim)(yyv68), d) - } - } - yyj62++ - if yyhl62 { - yyb62 = yyj62 > l - } else { - yyb62 = r.CheckBreak() - } - if yyb62 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ServiceName = "" - } else { - x.ServiceName = string(r.DecodeString()) - } - for { - yyj62++ - if yyhl62 { - yyb62 = yyj62 > l - } else { - yyb62 = r.CheckBreak() - } - if yyb62 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj62-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *PetSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym71 := z.EncBinary() - _ = yym71 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep72 := !z.EncBinary() - yy2arr72 := z.EncBasicHandle().StructToArray - var yyq72 [2]bool - _, _, _ = yysep72, yyq72, yy2arr72 - const yyr72 bool = false - yyq72[0] = x.ObservedGeneration != nil - var yynn72 int - if yyr72 || yy2arr72 { - r.EncodeArrayStart(2) - } else { - yynn72 = 1 - for _, b := range yyq72 { - if b { - yynn72++ - } - } - r.EncodeMapStart(yynn72) - yynn72 = 0 - } - if yyr72 || yy2arr72 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq72[0] { - if x.ObservedGeneration == nil { - r.EncodeNil() - } else { - yy74 := *x.ObservedGeneration - yym75 := z.EncBinary() - _ = yym75 - if false { - } else { - r.EncodeInt(int64(yy74)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq72[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ObservedGeneration == nil { - r.EncodeNil() - } else { - yy76 := *x.ObservedGeneration - yym77 := z.EncBinary() - _ = yym77 - if false { - } else { - r.EncodeInt(int64(yy76)) - } - } - } - } - if yyr72 || yy2arr72 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym79 := z.EncBinary() - _ = yym79 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym80 := z.EncBinary() - _ = yym80 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } - if yyr72 || yy2arr72 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PetSetStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym81 := z.DecBinary() - _ = yym81 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct82 := r.ContainerType() - if yyct82 == codecSelferValueTypeMap1234 { - yyl82 := r.ReadMapStart() - if yyl82 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl82, d) - } - } else if yyct82 == codecSelferValueTypeArray1234 { - yyl82 := r.ReadArrayStart() - if yyl82 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl82, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PetSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys83Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys83Slc - var yyhl83 bool = l >= 0 - for yyj83 := 0; ; yyj83++ { - if yyhl83 { - if yyj83 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys83Slc = r.DecodeBytes(yys83Slc, true, true) - yys83 := string(yys83Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys83 { - case "observedGeneration": - if r.TryDecodeAsNil() { - if x.ObservedGeneration != nil { - x.ObservedGeneration = nil - } - } else { - if x.ObservedGeneration == nil { - x.ObservedGeneration = new(int64) - } - yym85 := z.DecBinary() - _ = yym85 - if false { - } else { - *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) - } - } - case "replicas": - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - default: - z.DecStructFieldNotFound(-1, yys83) - } // end switch yys83 - } // end for yyj83 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PetSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj87 int - var yyb87 bool - var yyhl87 bool = l >= 0 - yyj87++ - if yyhl87 { - yyb87 = yyj87 > l - } else { - yyb87 = r.CheckBreak() - } - if yyb87 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.ObservedGeneration != nil { - x.ObservedGeneration = nil - } - } else { - if x.ObservedGeneration == nil { - x.ObservedGeneration = new(int64) - } - yym89 := z.DecBinary() - _ = yym89 - if false { - } else { - *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) - } - } - yyj87++ - if yyhl87 { - yyb87 = yyj87 > l - } else { - yyb87 = r.CheckBreak() - } - if yyb87 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - for { - yyj87++ - if yyhl87 { - yyb87 = yyj87 > l - } else { - yyb87 = r.CheckBreak() - } - if yyb87 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj87-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *PetSetList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym91 := z.EncBinary() - _ = yym91 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep92 := !z.EncBinary() - yy2arr92 := z.EncBasicHandle().StructToArray - var yyq92 [4]bool - _, _, _ = yysep92, yyq92, yy2arr92 - const yyr92 bool = false - yyq92[0] = x.Kind != "" - yyq92[1] = x.APIVersion != "" - yyq92[2] = true - var yynn92 int - if yyr92 || yy2arr92 { - r.EncodeArrayStart(4) - } else { - yynn92 = 1 - for _, b := range yyq92 { - if b { - yynn92++ - } - } - r.EncodeMapStart(yynn92) - yynn92 = 0 - } - if yyr92 || yy2arr92 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq92[0] { - yym94 := z.EncBinary() - _ = yym94 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq92[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym95 := z.EncBinary() - _ = yym95 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr92 || yy2arr92 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq92[1] { - yym97 := z.EncBinary() - _ = yym97 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq92[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym98 := z.EncBinary() - _ = yym98 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr92 || yy2arr92 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq92[2] { - yy100 := &x.ListMeta - yym101 := z.EncBinary() - _ = yym101 - if false { - } else if z.HasExtensions() && z.EncExt(yy100) { - } else { - z.EncFallback(yy100) - } - } else { - r.EncodeNil() - } - } else { - if yyq92[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy102 := &x.ListMeta - yym103 := z.EncBinary() - _ = yym103 - if false { - } else if z.HasExtensions() && z.EncExt(yy102) { - } else { - z.EncFallback(yy102) - } - } - } - if yyr92 || yy2arr92 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym105 := z.EncBinary() - _ = yym105 - if false { - } else { - h.encSlicePetSet(([]PetSet)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym106 := z.EncBinary() - _ = yym106 - if false { - } else { - h.encSlicePetSet(([]PetSet)(x.Items), e) - } - } - } - if yyr92 || yy2arr92 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PetSetList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym107 := z.DecBinary() - _ = yym107 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct108 := r.ContainerType() - if yyct108 == codecSelferValueTypeMap1234 { - yyl108 := r.ReadMapStart() - if yyl108 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl108, d) - } - } else if yyct108 == codecSelferValueTypeArray1234 { - yyl108 := r.ReadArrayStart() - if yyl108 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl108, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PetSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys109Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys109Slc - var yyhl109 bool = l >= 0 - for yyj109 := 0; ; yyj109++ { - if yyhl109 { - if yyj109 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys109Slc = r.DecodeBytes(yys109Slc, true, true) - yys109 := string(yys109Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys109 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv112 := &x.ListMeta - yym113 := z.DecBinary() - _ = yym113 - if false { - } else if z.HasExtensions() && z.DecExt(yyv112) { - } else { - z.DecFallback(yyv112, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv114 := &x.Items - yym115 := z.DecBinary() - _ = yym115 - if false { - } else { - h.decSlicePetSet((*[]PetSet)(yyv114), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys109) - } // end switch yys109 - } // end for yyj109 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PetSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj116 int - var yyb116 bool - var yyhl116 bool = l >= 0 - yyj116++ - if yyhl116 { - yyb116 = yyj116 > l - } else { - yyb116 = r.CheckBreak() - } - if yyb116 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj116++ - if yyhl116 { - yyb116 = yyj116 > l - } else { - yyb116 = r.CheckBreak() - } - if yyb116 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj116++ - if yyhl116 { - yyb116 = yyj116 > l - } else { - yyb116 = r.CheckBreak() - } - if yyb116 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv119 := &x.ListMeta - yym120 := z.DecBinary() - _ = yym120 - if false { - } else if z.HasExtensions() && z.DecExt(yyv119) { - } else { - z.DecFallback(yyv119, false) - } - } - yyj116++ - if yyhl116 { - yyb116 = yyj116 > l - } else { - yyb116 = r.CheckBreak() - } - if yyb116 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv121 := &x.Items - yym122 := z.DecBinary() - _ = yym122 - if false { - } else { - h.decSlicePetSet((*[]PetSet)(yyv121), d) - } - } - for { - yyj116++ - if yyhl116 { - yyb116 = yyj116 > l - } else { - yyb116 = r.CheckBreak() - } - if yyb116 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj116-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) encSlicev1_PersistentVolumeClaim(v []pkg2_v1.PersistentVolumeClaim, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv123 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy124 := &yyv123 - yy124.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.PersistentVolumeClaim, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv125 := *v - yyh125, yyl125 := z.DecSliceHelperStart() - var yyc125 bool - if yyl125 == 0 { - if yyv125 == nil { - yyv125 = []pkg2_v1.PersistentVolumeClaim{} - yyc125 = true - } else if len(yyv125) != 0 { - yyv125 = yyv125[:0] - yyc125 = true - } - } else if yyl125 > 0 { - var yyrr125, yyrl125 int - var yyrt125 bool - if yyl125 > cap(yyv125) { - - yyrg125 := len(yyv125) > 0 - yyv2125 := yyv125 - yyrl125, yyrt125 = z.DecInferLen(yyl125, z.DecBasicHandle().MaxInitLen, 368) - if yyrt125 { - if yyrl125 <= cap(yyv125) { - yyv125 = yyv125[:yyrl125] - } else { - yyv125 = make([]pkg2_v1.PersistentVolumeClaim, yyrl125) - } - } else { - yyv125 = make([]pkg2_v1.PersistentVolumeClaim, yyrl125) - } - yyc125 = true - yyrr125 = len(yyv125) - if yyrg125 { - copy(yyv125, yyv2125) - } - } else if yyl125 != len(yyv125) { - yyv125 = yyv125[:yyl125] - yyc125 = true - } - yyj125 := 0 - for ; yyj125 < yyrr125; yyj125++ { - yyh125.ElemContainerState(yyj125) - if r.TryDecodeAsNil() { - yyv125[yyj125] = pkg2_v1.PersistentVolumeClaim{} - } else { - yyv126 := &yyv125[yyj125] - yyv126.CodecDecodeSelf(d) - } - - } - if yyrt125 { - for ; yyj125 < yyl125; yyj125++ { - yyv125 = append(yyv125, pkg2_v1.PersistentVolumeClaim{}) - yyh125.ElemContainerState(yyj125) - if r.TryDecodeAsNil() { - yyv125[yyj125] = pkg2_v1.PersistentVolumeClaim{} - } else { - yyv127 := &yyv125[yyj125] - yyv127.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj125 := 0 - for ; !r.CheckBreak(); yyj125++ { - - if yyj125 >= len(yyv125) { - yyv125 = append(yyv125, pkg2_v1.PersistentVolumeClaim{}) // var yyz125 pkg2_v1.PersistentVolumeClaim - yyc125 = true - } - yyh125.ElemContainerState(yyj125) - if yyj125 < len(yyv125) { - if r.TryDecodeAsNil() { - yyv125[yyj125] = pkg2_v1.PersistentVolumeClaim{} - } else { - yyv128 := &yyv125[yyj125] - yyv128.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj125 < len(yyv125) { - yyv125 = yyv125[:yyj125] - yyc125 = true - } else if yyj125 == 0 && yyv125 == nil { - yyv125 = []pkg2_v1.PersistentVolumeClaim{} - yyc125 = true - } - } - yyh125.End() - if yyc125 { - *v = yyv125 - } -} - -func (x codecSelfer1234) encSlicePetSet(v []PetSet, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv129 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy130 := &yyv129 - yy130.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSlicePetSet(v *[]PetSet, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv131 := *v - yyh131, yyl131 := z.DecSliceHelperStart() - var yyc131 bool - if yyl131 == 0 { - if yyv131 == nil { - yyv131 = []PetSet{} - yyc131 = true - } else if len(yyv131) != 0 { - yyv131 = yyv131[:0] - yyc131 = true - } - } else if yyl131 > 0 { - var yyrr131, yyrl131 int - var yyrt131 bool - if yyl131 > cap(yyv131) { - - yyrg131 := len(yyv131) > 0 - yyv2131 := yyv131 - yyrl131, yyrt131 = z.DecInferLen(yyl131, z.DecBasicHandle().MaxInitLen, 800) - if yyrt131 { - if yyrl131 <= cap(yyv131) { - yyv131 = yyv131[:yyrl131] - } else { - yyv131 = make([]PetSet, yyrl131) - } - } else { - yyv131 = make([]PetSet, yyrl131) - } - yyc131 = true - yyrr131 = len(yyv131) - if yyrg131 { - copy(yyv131, yyv2131) - } - } else if yyl131 != len(yyv131) { - yyv131 = yyv131[:yyl131] - yyc131 = true - } - yyj131 := 0 - for ; yyj131 < yyrr131; yyj131++ { - yyh131.ElemContainerState(yyj131) - if r.TryDecodeAsNil() { - yyv131[yyj131] = PetSet{} - } else { - yyv132 := &yyv131[yyj131] - yyv132.CodecDecodeSelf(d) - } - - } - if yyrt131 { - for ; yyj131 < yyl131; yyj131++ { - yyv131 = append(yyv131, PetSet{}) - yyh131.ElemContainerState(yyj131) - if r.TryDecodeAsNil() { - yyv131[yyj131] = PetSet{} - } else { - yyv133 := &yyv131[yyj131] - yyv133.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj131 := 0 - for ; !r.CheckBreak(); yyj131++ { - - if yyj131 >= len(yyv131) { - yyv131 = append(yyv131, PetSet{}) // var yyz131 PetSet - yyc131 = true - } - yyh131.ElemContainerState(yyj131) - if yyj131 < len(yyv131) { - if r.TryDecodeAsNil() { - yyv131[yyj131] = PetSet{} - } else { - yyv134 := &yyv131[yyj131] - yyv134.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj131 < len(yyv131) { - yyv131 = yyv131[:yyj131] - yyc131 = true - } else if yyj131 == 0 && yyv131 == nil { - yyv131 = []PetSet{} - yyc131 = true - } - } - yyh131.End() - if yyc131 { - *v = yyv131 - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/types.go b/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/types.go deleted file mode 100644 index 7502cc192..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/types.go +++ /dev/null @@ -1,96 +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 v1alpha1 - -import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" -) - -// +genclient=true - -// PetSet represents a set of pods with consistent identities. -// Identities are defined as: -// - Network: A single stable DNS and hostname. -// - Storage: As many VolumeClaims as requested. -// The PetSet guarantees that a given network identity will always -// map to the same storage identity. PetSet is currently in alpha -// and subject to change without notice. -type PetSet struct { - unversioned.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the desired identities of pets in this set. - Spec PetSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Status is the current status of Pets in this PetSet. This data - // may be out of date by some window of time. - Status PetSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// A PetSetSpec is the specification of a PetSet. -type PetSetSpec struct { - // Replicas is the desired number of replicas of the given Template. - // These are replicas in the sense that they are instantiations of the - // same Template, but individual replicas also have a consistent identity. - // If unspecified, defaults to 1. - // TODO: Consider a rename of this field. - Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` - - // Selector is a label query over pods that should match the replica count. - // If empty, defaulted to labels on the pod template. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - Selector *unversioned.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` - - // Template is the object that describes the pod that will be created if - // insufficient replicas are detected. Each pod stamped out by the PetSet - // will fulfill this Template, but have a unique identity from the rest - // of the PetSet. - Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"` - - // VolumeClaimTemplates is a list of claims that pets are allowed to reference. - // The PetSet controller is responsible for mapping network identities to - // claims in a way that maintains the identity of a pet. Every claim in - // this list must have at least one matching (by name) volumeMount in one - // container in the template. A claim in this list takes precedence over - // any volumes in the template, with the same name. - // TODO: Define the behavior if a claim already exists with the same name. - VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"` - - // ServiceName is the name of the service that governs this PetSet. - // This service must exist before the PetSet, and is responsible for - // the network identity of the set. Pets get DNS/hostnames that follow the - // pattern: pet-specific-string.serviceName.default.svc.cluster.local - // where "pet-specific-string" is managed by the PetSet controller. - ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"` -} - -// PetSetStatus represents the current state of a PetSet. -type PetSetStatus struct { - // most recent generation observed by this autoscaler. - ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` - - // Replicas is the number of actual replicas. - Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"` -} - -// PetSetList is a collection of PetSets. -type PetSetList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []PetSet `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go deleted file mode 100644 index 5191f1224..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go +++ /dev/null @@ -1,71 +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 v1alpha1 - -// This file contains a collection of methods that can be used from go-restful to -// generate Swagger API documentation for its models. Please read this PR for more -// information on the implementation: https://github.com/emicklei/go-restful/pull/215 -// -// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if -// they are on one line! For multiple line or blocks that you want to ignore use ---. -// Any context after a --- is ignored. -// -// Those methods can be generated by using hack/update-generated-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_PetSet = map[string]string{ - "": "PetSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe PetSet guarantees that a given network identity will always map to the same storage identity. PetSet is currently in alpha and subject to change without notice.", - "spec": "Spec defines the desired identities of pets in this set.", - "status": "Status is the current status of Pets in this PetSet. This data may be out of date by some window of time.", -} - -func (PetSet) SwaggerDoc() map[string]string { - return map_PetSet -} - -var map_PetSetList = map[string]string{ - "": "PetSetList is a collection of PetSets.", -} - -func (PetSetList) SwaggerDoc() map[string]string { - return map_PetSetList -} - -var map_PetSetSpec = map[string]string{ - "": "A PetSetSpec is the specification of a PetSet.", - "replicas": "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", - "selector": "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors", - "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the PetSet will fulfill this Template, but have a unique identity from the rest of the PetSet.", - "volumeClaimTemplates": "VolumeClaimTemplates is a list of claims that pets are allowed to reference. The PetSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pet. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", - "serviceName": "ServiceName is the name of the service that governs this PetSet. This service must exist before the PetSet, and is responsible for the network identity of the set. Pets get DNS/hostnames that follow the pattern: pet-specific-string.serviceName.default.svc.cluster.local where \"pet-specific-string\" is managed by the PetSet controller.", -} - -func (PetSetSpec) SwaggerDoc() map[string]string { - return map_PetSetSpec -} - -var map_PetSetStatus = map[string]string{ - "": "PetSetStatus represents the current state of a PetSet.", - "observedGeneration": "most recent generation observed by this autoscaler.", - "replicas": "Replicas is the number of actual replicas.", -} - -func (PetSetStatus) SwaggerDoc() map[string]string { - return map_PetSetStatus -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index d93e738b2..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,205 +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 v1alpha1 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - apps "k8s.io/client-go/1.5/pkg/apis/apps" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" -) - -func init() { - SchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1alpha1_PetSet_To_apps_PetSet, - Convert_apps_PetSet_To_v1alpha1_PetSet, - Convert_v1alpha1_PetSetList_To_apps_PetSetList, - Convert_apps_PetSetList_To_v1alpha1_PetSetList, - Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec, - Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec, - Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus, - Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus, - ) -} - -func autoConvert_v1alpha1_PetSet_To_apps_PetSet(in *PetSet, out *apps.PetSet, s conversion.Scope) error { - SetDefaults_PetSet(in) - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_v1alpha1_PetSet_To_apps_PetSet(in *PetSet, out *apps.PetSet, s conversion.Scope) error { - return autoConvert_v1alpha1_PetSet_To_apps_PetSet(in, out, s) -} - -func autoConvert_apps_PetSet_To_v1alpha1_PetSet(in *apps.PetSet, out *PetSet, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_apps_PetSet_To_v1alpha1_PetSet(in *apps.PetSet, out *PetSet, s conversion.Scope) error { - return autoConvert_apps_PetSet_To_v1alpha1_PetSet(in, out, s) -} - -func autoConvert_v1alpha1_PetSetList_To_apps_PetSetList(in *PetSetList, out *apps.PetSetList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]apps.PetSet, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_PetSet_To_apps_PetSet(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_v1alpha1_PetSetList_To_apps_PetSetList(in *PetSetList, out *apps.PetSetList, s conversion.Scope) error { - return autoConvert_v1alpha1_PetSetList_To_apps_PetSetList(in, out, s) -} - -func autoConvert_apps_PetSetList_To_v1alpha1_PetSetList(in *apps.PetSetList, out *PetSetList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PetSet, len(*in)) - for i := range *in { - if err := Convert_apps_PetSet_To_v1alpha1_PetSet(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_apps_PetSetList_To_v1alpha1_PetSetList(in *apps.PetSetList, out *PetSetList, s conversion.Scope) error { - return autoConvert_apps_PetSetList_To_v1alpha1_PetSetList(in, out, s) -} - -func autoConvert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(in *PetSetSpec, out *apps.PetSetSpec, s conversion.Scope) error { - // WARNING: in.Replicas requires manual conversion: inconvertible types (*int32 vs int) - out.Selector = in.Selector - if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - if in.VolumeClaimTemplates != nil { - in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]api.PersistentVolumeClaim, len(*in)) - for i := range *in { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil { - return err - } - } - } else { - out.VolumeClaimTemplates = nil - } - out.ServiceName = in.ServiceName - return nil -} - -func autoConvert_apps_PetSetSpec_To_v1alpha1_PetSetSpec(in *apps.PetSetSpec, out *PetSetSpec, s conversion.Scope) error { - // WARNING: in.Replicas requires manual conversion: inconvertible types (int vs *int32) - out.Selector = in.Selector - if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - if in.VolumeClaimTemplates != nil { - in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]v1.PersistentVolumeClaim, len(*in)) - for i := range *in { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil { - return err - } - } - } else { - out.VolumeClaimTemplates = nil - } - out.ServiceName = in.ServiceName - return nil -} - -func autoConvert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in *PetSetStatus, out *apps.PetSetStatus, s conversion.Scope) error { - out.ObservedGeneration = in.ObservedGeneration - out.Replicas = int(in.Replicas) - return nil -} - -func Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in *PetSetStatus, out *apps.PetSetStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_PetSetStatus_To_apps_PetSetStatus(in, out, s) -} - -func autoConvert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in *apps.PetSetStatus, out *PetSetStatus, s conversion.Scope) error { - out.ObservedGeneration = in.ObservedGeneration - out.Replicas = int32(in.Replicas) - return nil -} - -func Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in *apps.PetSetStatus, out *PetSetStatus, s conversion.Scope) error { - return autoConvert_apps_PetSetStatus_To_v1alpha1_PetSetStatus(in, out, s) -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 5c36b9e40..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,138 +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 v1alpha1 - -import ( - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" - reflect "reflect" -) - -func init() { - SchemeBuilder.Register(RegisterDeepCopies) -} - -// RegisterDeepCopies adds deep-copy functions to the given scheme. Public -// to allow building arbitrary schemes. -func RegisterDeepCopies(scheme *runtime.Scheme) error { - return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSet, InType: reflect.TypeOf(&PetSet{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetList, InType: reflect.TypeOf(&PetSetList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetSpec, InType: reflect.TypeOf(&PetSetSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetStatus, InType: reflect.TypeOf(&PetSetStatus{})}, - ) -} - -func DeepCopy_v1alpha1_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*PetSet) - out := out.(*PetSet) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - if err := DeepCopy_v1alpha1_PetSetSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - if err := DeepCopy_v1alpha1_PetSetStatus(&in.Status, &out.Status, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_v1alpha1_PetSetList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*PetSetList) - out := out.(*PetSetList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PetSet, len(*in)) - for i := range *in { - if err := DeepCopy_v1alpha1_PetSet(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil - } -} - -func DeepCopy_v1alpha1_PetSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*PetSetSpec) - out := out.(*PetSetSpec) - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } else { - out.Replicas = nil - } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(unversioned.LabelSelector) - if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil { - return err - } - } else { - out.Selector = nil - } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { - return err - } - if in.VolumeClaimTemplates != nil { - in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]v1.PersistentVolumeClaim, len(*in)) - for i := range *in { - if err := v1.DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.VolumeClaimTemplates = nil - } - out.ServiceName = in.ServiceName - return nil - } -} - -func DeepCopy_v1alpha1_PetSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*PetSetStatus) - out := out.(*PetSetStatus) - if in.ObservedGeneration != nil { - in, out := &in.ObservedGeneration, &out.ObservedGeneration - *out = new(int64) - **out = **in - } else { - out.ObservedGeneration = nil - } - out.Replicas = in.Replicas - return nil - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/1.5/pkg/apis/apps/zz_generated.deepcopy.go deleted file mode 100644 index adf473b27..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/zz_generated.deepcopy.go +++ /dev/null @@ -1,132 +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 apps - -import ( - api "k8s.io/client-go/1.5/pkg/api" - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" - reflect "reflect" -) - -func init() { - SchemeBuilder.Register(RegisterDeepCopies) -} - -// RegisterDeepCopies adds deep-copy functions to the given scheme. Public -// to allow building arbitrary schemes. -func RegisterDeepCopies(scheme *runtime.Scheme) error { - return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSet, InType: reflect.TypeOf(&PetSet{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetList, InType: reflect.TypeOf(&PetSetList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetSpec, InType: reflect.TypeOf(&PetSetSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetStatus, InType: reflect.TypeOf(&PetSetStatus{})}, - ) -} - -func DeepCopy_apps_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*PetSet) - out := out.(*PetSet) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - if err := DeepCopy_apps_PetSetSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - if err := DeepCopy_apps_PetSetStatus(&in.Status, &out.Status, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_apps_PetSetList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*PetSetList) - out := out.(*PetSetList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PetSet, len(*in)) - for i := range *in { - if err := DeepCopy_apps_PetSet(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil - } -} - -func DeepCopy_apps_PetSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*PetSetSpec) - out := out.(*PetSetSpec) - out.Replicas = in.Replicas - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(unversioned.LabelSelector) - if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil { - return err - } - } else { - out.Selector = nil - } - if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { - return err - } - if in.VolumeClaimTemplates != nil { - in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]api.PersistentVolumeClaim, len(*in)) - for i := range *in { - if err := api.DeepCopy_api_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.VolumeClaimTemplates = nil - } - out.ServiceName = in.ServiceName - return nil - } -} - -func DeepCopy_apps_PetSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*PetSetStatus) - out := out.(*PetSetStatus) - if in.ObservedGeneration != nil { - in, out := &in.ObservedGeneration, &out.ObservedGeneration - *out = new(int64) - **out = **in - } else { - out.ObservedGeneration = nil - } - out.Replicas = in.Replicas - return nil - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/types.generated.go deleted file mode 100644 index 09842eeb1..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/types.generated.go +++ /dev/null @@ -1,2394 +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 authentication - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - pkg2_api "k8s.io/client-go/1.5/pkg/api" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg3_types "k8s.io/client-go/1.5/pkg/types" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg2_api.ObjectMeta - var v1 pkg1_unversioned.TypeMeta - var v2 pkg3_types.UID - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 - } -} - -func (x *TokenReview) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [19]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = x.Kind != "" - yyq2[1] = x.APIVersion != "" - yyq2[2] = x.Name != "" - yyq2[3] = x.GenerateName != "" - yyq2[4] = x.Namespace != "" - yyq2[5] = x.SelfLink != "" - yyq2[6] = x.UID != "" - yyq2[7] = x.ResourceVersion != "" - yyq2[8] = x.Generation != 0 - yyq2[9] = true - yyq2[10] = x.ObjectMeta.DeletionTimestamp != nil && x.DeletionTimestamp != nil - yyq2[11] = x.ObjectMeta.DeletionGracePeriodSeconds != nil && x.DeletionGracePeriodSeconds != nil - yyq2[12] = len(x.Labels) != 0 - yyq2[13] = len(x.Annotations) != 0 - yyq2[14] = len(x.OwnerReferences) != 0 - yyq2[15] = len(x.Finalizers) != 0 - yyq2[16] = x.ClusterName != "" - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(19) - } else { - yynn2 = 2 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[1] { - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - 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 { - r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("generateName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym14 := z.EncBinary() - _ = yym14 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { - yym16 := z.EncBinary() - _ = yym16 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("namespace")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym17 := z.EncBinary() - _ = yym17 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[5] { - yym19 := z.EncBinary() - _ = yym19 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selfLink")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym20 := z.EncBinary() - _ = yym20 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[6] { - yym22 := z.EncBinary() - _ = yym22 - 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[6] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("uid")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym23 := z.EncBinary() - _ = yym23 - 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[7] { - yym25 := z.EncBinary() - _ = yym25 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[7] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("resourceVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym26 := z.EncBinary() - _ = yym26 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[8] { - yym28 := z.EncBinary() - _ = yym28 - if false { - } else { - r.EncodeInt(int64(x.Generation)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[8] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("generation")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym29 := z.EncBinary() - _ = yym29 - if false { - } else { - r.EncodeInt(int64(x.Generation)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[9] { - yy31 := &x.CreationTimestamp - yym32 := z.EncBinary() - _ = yym32 - if false { - } else if z.HasExtensions() && z.EncExt(yy31) { - } else if yym32 { - z.EncBinaryMarshal(yy31) - } else if !yym32 && z.IsJSONHandle() { - z.EncJSONMarshal(yy31) - } else { - z.EncFallback(yy31) - } - } else { - r.EncodeNil() - } - } else { - if yyq2[9] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("creationTimestamp")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy33 := &x.CreationTimestamp - yym34 := z.EncBinary() - _ = yym34 - if false { - } else if z.HasExtensions() && z.EncExt(yy33) { - } else if yym34 { - z.EncBinaryMarshal(yy33) - } else if !yym34 && z.IsJSONHandle() { - z.EncJSONMarshal(yy33) - } else { - z.EncFallback(yy33) - } - } - } - var yyn35 bool - if x.ObjectMeta.DeletionTimestamp == nil { - yyn35 = true - goto LABEL35 - } - LABEL35: - if yyr2 || yy2arr2 { - if yyn35 { - r.EncodeNil() - } else { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[10] { - if x.DeletionTimestamp == nil { - r.EncodeNil() - } else { - yym36 := z.EncBinary() - _ = yym36 - if false { - } else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) { - } else if yym36 { - z.EncBinaryMarshal(x.DeletionTimestamp) - } else if !yym36 && z.IsJSONHandle() { - z.EncJSONMarshal(x.DeletionTimestamp) - } else { - z.EncFallback(x.DeletionTimestamp) - } - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[10] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("deletionTimestamp")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn35 { - r.EncodeNil() - } else { - if x.DeletionTimestamp == nil { - r.EncodeNil() - } else { - yym37 := z.EncBinary() - _ = yym37 - if false { - } else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) { - } else if yym37 { - z.EncBinaryMarshal(x.DeletionTimestamp) - } else if !yym37 && z.IsJSONHandle() { - z.EncJSONMarshal(x.DeletionTimestamp) - } else { - z.EncFallback(x.DeletionTimestamp) - } - } - } - } - } - var yyn38 bool - if x.ObjectMeta.DeletionGracePeriodSeconds == nil { - yyn38 = true - goto LABEL38 - } - LABEL38: - if yyr2 || yy2arr2 { - if yyn38 { - r.EncodeNil() - } else { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[11] { - if x.DeletionGracePeriodSeconds == nil { - r.EncodeNil() - } else { - yy39 := *x.DeletionGracePeriodSeconds - yym40 := z.EncBinary() - _ = yym40 - if false { - } else { - r.EncodeInt(int64(yy39)) - } - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[11] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("deletionGracePeriodSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn38 { - r.EncodeNil() - } else { - if x.DeletionGracePeriodSeconds == nil { - r.EncodeNil() - } else { - yy41 := *x.DeletionGracePeriodSeconds - yym42 := z.EncBinary() - _ = yym42 - if false { - } else { - r.EncodeInt(int64(yy41)) - } - } - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[12] { - if x.Labels == nil { - r.EncodeNil() - } else { - yym44 := z.EncBinary() - _ = yym44 - if false { - } else { - z.F.EncMapStringStringV(x.Labels, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[12] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("labels")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Labels == nil { - r.EncodeNil() - } else { - yym45 := z.EncBinary() - _ = yym45 - if false { - } else { - z.F.EncMapStringStringV(x.Labels, false, e) - } - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[13] { - if x.Annotations == nil { - r.EncodeNil() - } else { - yym47 := z.EncBinary() - _ = yym47 - if false { - } else { - z.F.EncMapStringStringV(x.Annotations, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[13] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("annotations")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Annotations == nil { - r.EncodeNil() - } else { - yym48 := z.EncBinary() - _ = yym48 - if false { - } else { - z.F.EncMapStringStringV(x.Annotations, false, e) - } - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[14] { - if x.OwnerReferences == nil { - r.EncodeNil() - } else { - yym50 := z.EncBinary() - _ = yym50 - if false { - } else { - h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[14] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("ownerReferences")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.OwnerReferences == nil { - r.EncodeNil() - } else { - yym51 := z.EncBinary() - _ = yym51 - if false { - } else { - h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e) - } - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[15] { - if x.Finalizers == nil { - r.EncodeNil() - } else { - yym53 := z.EncBinary() - _ = yym53 - if false { - } else { - z.F.EncSliceStringV(x.Finalizers, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[15] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("finalizers")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Finalizers == nil { - r.EncodeNil() - } else { - yym54 := z.EncBinary() - _ = yym54 - if false { - } else { - z.F.EncSliceStringV(x.Finalizers, false, e) - } - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[16] { - yym56 := z.EncBinary() - _ = yym56 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[16] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("clusterName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym57 := z.EncBinary() - _ = yym57 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy59 := &x.Spec - yy59.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy60 := &x.Spec - yy60.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy62 := &x.Status - yy62.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy63 := &x.Status - yy63.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *TokenReview) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym64 := z.DecBinary() - _ = yym64 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct65 := r.ContainerType() - if yyct65 == codecSelferValueTypeMap1234 { - yyl65 := r.ReadMapStart() - if yyl65 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl65, d) - } - } else if yyct65 == codecSelferValueTypeArray1234 { - yyl65 := r.ReadArrayStart() - if yyl65 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl65, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *TokenReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys66Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys66Slc - var yyhl66 bool = l >= 0 - for yyj66 := 0; ; yyj66++ { - if yyhl66 { - if yyj66 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys66Slc = r.DecodeBytes(yys66Slc, true, true) - yys66 := string(yys66Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys66 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - case "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 = pkg3_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 = pkg1_unversioned.Time{} - } else { - yyv76 := &x.CreationTimestamp - yym77 := z.DecBinary() - _ = yym77 - if false { - } else if z.HasExtensions() && z.DecExt(yyv76) { - } else if yym77 { - z.DecBinaryUnmarshal(yyv76) - } else if !yym77 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv76) - } else { - z.DecFallback(yyv76, false) - } - } - case "deletionTimestamp": - if x.ObjectMeta.DeletionTimestamp == nil { - x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time) - } - if r.TryDecodeAsNil() { - if x.DeletionTimestamp != nil { - x.DeletionTimestamp = nil - } - } else { - if x.DeletionTimestamp == nil { - x.DeletionTimestamp = new(pkg1_unversioned.Time) - } - yym79 := z.DecBinary() - _ = yym79 - if false { - } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) { - } else if yym79 { - z.DecBinaryUnmarshal(x.DeletionTimestamp) - } else if !yym79 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.DeletionTimestamp) - } else { - z.DecFallback(x.DeletionTimestamp, false) - } - } - case "deletionGracePeriodSeconds": - if x.ObjectMeta.DeletionGracePeriodSeconds == nil { - x.ObjectMeta.DeletionGracePeriodSeconds = new(int64) - } - if r.TryDecodeAsNil() { - if x.DeletionGracePeriodSeconds != nil { - x.DeletionGracePeriodSeconds = nil - } - } else { - if x.DeletionGracePeriodSeconds == nil { - x.DeletionGracePeriodSeconds = new(int64) - } - yym81 := z.DecBinary() - _ = yym81 - if false { - } else { - *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64)) - } - } - case "labels": - if r.TryDecodeAsNil() { - x.Labels = nil - } else { - yyv82 := &x.Labels - yym83 := z.DecBinary() - _ = yym83 - if false { - } else { - z.F.DecMapStringStringX(yyv82, false, d) - } - } - case "annotations": - if r.TryDecodeAsNil() { - x.Annotations = nil - } else { - yyv84 := &x.Annotations - yym85 := z.DecBinary() - _ = yym85 - if false { - } else { - z.F.DecMapStringStringX(yyv84, false, d) - } - } - case "ownerReferences": - if r.TryDecodeAsNil() { - x.OwnerReferences = nil - } else { - yyv86 := &x.OwnerReferences - yym87 := z.DecBinary() - _ = yym87 - if false { - } else { - h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv86), d) - } - } - case "finalizers": - if r.TryDecodeAsNil() { - x.Finalizers = nil - } else { - yyv88 := &x.Finalizers - yym89 := z.DecBinary() - _ = yym89 - if false { - } else { - z.F.DecSliceStringX(yyv88, false, d) - } - } - case "clusterName": - if r.TryDecodeAsNil() { - x.ClusterName = "" - } else { - x.ClusterName = string(r.DecodeString()) - } - case "Spec": - if r.TryDecodeAsNil() { - x.Spec = TokenReviewSpec{} - } else { - yyv91 := &x.Spec - yyv91.CodecDecodeSelf(d) - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = TokenReviewStatus{} - } else { - yyv92 := &x.Status - yyv92.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys66) - } // end switch yys66 - } // end for yyj66 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj93 int - var yyb93 bool - var yyhl93 bool = l >= 0 - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.GenerateName = "" - } else { - x.GenerateName = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.SelfLink = "" - } else { - x.SelfLink = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.UID = "" - } else { - x.UID = pkg3_types.UID(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ResourceVersion = "" - } else { - x.ResourceVersion = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Generation = 0 - } else { - x.Generation = int64(r.DecodeInt(64)) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CreationTimestamp = pkg1_unversioned.Time{} - } else { - yyv103 := &x.CreationTimestamp - yym104 := z.DecBinary() - _ = yym104 - if false { - } else if z.HasExtensions() && z.DecExt(yyv103) { - } else if yym104 { - z.DecBinaryUnmarshal(yyv103) - } else if !yym104 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv103) - } else { - z.DecFallback(yyv103, false) - } - } - if x.ObjectMeta.DeletionTimestamp == nil { - x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - 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(pkg1_unversioned.Time) - } - yym106 := z.DecBinary() - _ = yym106 - if false { - } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) { - } else if yym106 { - z.DecBinaryUnmarshal(x.DeletionTimestamp) - } else if !yym106 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.DeletionTimestamp) - } else { - z.DecFallback(x.DeletionTimestamp, false) - } - } - if x.ObjectMeta.DeletionGracePeriodSeconds == nil { - x.ObjectMeta.DeletionGracePeriodSeconds = new(int64) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - 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) - } - yym108 := z.DecBinary() - _ = yym108 - if false { - } else { - *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64)) - } - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Labels = nil - } else { - yyv109 := &x.Labels - yym110 := z.DecBinary() - _ = yym110 - if false { - } else { - z.F.DecMapStringStringX(yyv109, false, d) - } - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Annotations = nil - } else { - yyv111 := &x.Annotations - yym112 := z.DecBinary() - _ = yym112 - if false { - } else { - z.F.DecMapStringStringX(yyv111, false, d) - } - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.OwnerReferences = nil - } else { - yyv113 := &x.OwnerReferences - yym114 := z.DecBinary() - _ = yym114 - if false { - } else { - h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv113), d) - } - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Finalizers = nil - } else { - yyv115 := &x.Finalizers - yym116 := z.DecBinary() - _ = yym116 - if false { - } else { - z.F.DecSliceStringX(yyv115, false, d) - } - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ClusterName = "" - } else { - x.ClusterName = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = TokenReviewSpec{} - } else { - yyv118 := &x.Spec - yyv118.CodecDecodeSelf(d) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = TokenReviewStatus{} - } else { - yyv119 := &x.Status - yyv119.CodecDecodeSelf(d) - } - for { - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj93-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *TokenReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym120 := z.EncBinary() - _ = yym120 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep121 := !z.EncBinary() - yy2arr121 := z.EncBasicHandle().StructToArray - var yyq121 [1]bool - _, _, _ = yysep121, yyq121, yy2arr121 - const yyr121 bool = false - var yynn121 int - if yyr121 || yy2arr121 { - r.EncodeArrayStart(1) - } else { - yynn121 = 1 - for _, b := range yyq121 { - if b { - yynn121++ - } - } - r.EncodeMapStart(yynn121) - yynn121 = 0 - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym123 := z.EncBinary() - _ = yym123 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Token)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Token")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym124 := z.EncBinary() - _ = yym124 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Token)) - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *TokenReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym125 := z.DecBinary() - _ = yym125 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct126 := r.ContainerType() - if yyct126 == codecSelferValueTypeMap1234 { - yyl126 := r.ReadMapStart() - if yyl126 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl126, d) - } - } else if yyct126 == codecSelferValueTypeArray1234 { - yyl126 := r.ReadArrayStart() - if yyl126 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl126, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *TokenReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys127Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys127Slc - var yyhl127 bool = l >= 0 - for yyj127 := 0; ; yyj127++ { - if yyhl127 { - if yyj127 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys127Slc = r.DecodeBytes(yys127Slc, true, true) - yys127 := string(yys127Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys127 { - case "Token": - if r.TryDecodeAsNil() { - x.Token = "" - } else { - x.Token = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys127) - } // end switch yys127 - } // end for yyj127 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *TokenReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj129 int - var yyb129 bool - var yyhl129 bool = l >= 0 - yyj129++ - if yyhl129 { - yyb129 = yyj129 > l - } else { - yyb129 = r.CheckBreak() - } - if yyb129 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Token = "" - } else { - x.Token = string(r.DecodeString()) - } - for { - yyj129++ - if yyhl129 { - yyb129 = yyj129 > l - } else { - yyb129 = r.CheckBreak() - } - if yyb129 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj129-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *TokenReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym131 := z.EncBinary() - _ = yym131 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep132 := !z.EncBinary() - yy2arr132 := z.EncBasicHandle().StructToArray - var yyq132 [3]bool - _, _, _ = yysep132, yyq132, yy2arr132 - const yyr132 bool = false - var yynn132 int - if yyr132 || yy2arr132 { - r.EncodeArrayStart(3) - } else { - yynn132 = 3 - for _, b := range yyq132 { - if b { - yynn132++ - } - } - r.EncodeMapStart(yynn132) - yynn132 = 0 - } - if yyr132 || yy2arr132 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym134 := z.EncBinary() - _ = yym134 - if false { - } else { - r.EncodeBool(bool(x.Authenticated)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Authenticated")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym135 := z.EncBinary() - _ = yym135 - if false { - } else { - r.EncodeBool(bool(x.Authenticated)) - } - } - if yyr132 || yy2arr132 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy137 := &x.User - yy137.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("User")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy138 := &x.User - yy138.CodecEncodeSelf(e) - } - if yyr132 || yy2arr132 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym140 := z.EncBinary() - _ = yym140 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Error)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Error")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym141 := z.EncBinary() - _ = yym141 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Error)) - } - } - if yyr132 || yy2arr132 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *TokenReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym142 := z.DecBinary() - _ = yym142 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct143 := r.ContainerType() - if yyct143 == codecSelferValueTypeMap1234 { - yyl143 := r.ReadMapStart() - if yyl143 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl143, d) - } - } else if yyct143 == codecSelferValueTypeArray1234 { - yyl143 := r.ReadArrayStart() - if yyl143 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl143, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *TokenReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys144Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys144Slc - var yyhl144 bool = l >= 0 - for yyj144 := 0; ; yyj144++ { - if yyhl144 { - if yyj144 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys144Slc = r.DecodeBytes(yys144Slc, true, true) - yys144 := string(yys144Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys144 { - case "Authenticated": - if r.TryDecodeAsNil() { - x.Authenticated = false - } else { - x.Authenticated = bool(r.DecodeBool()) - } - case "User": - if r.TryDecodeAsNil() { - x.User = UserInfo{} - } else { - yyv146 := &x.User - yyv146.CodecDecodeSelf(d) - } - case "Error": - if r.TryDecodeAsNil() { - x.Error = "" - } else { - x.Error = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys144) - } // end switch yys144 - } // end for yyj144 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *TokenReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj148 int - var yyb148 bool - var yyhl148 bool = l >= 0 - yyj148++ - if yyhl148 { - yyb148 = yyj148 > l - } else { - yyb148 = r.CheckBreak() - } - if yyb148 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Authenticated = false - } else { - x.Authenticated = bool(r.DecodeBool()) - } - yyj148++ - if yyhl148 { - yyb148 = yyj148 > l - } else { - yyb148 = r.CheckBreak() - } - if yyb148 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.User = UserInfo{} - } else { - yyv150 := &x.User - yyv150.CodecDecodeSelf(d) - } - yyj148++ - if yyhl148 { - yyb148 = yyj148 > l - } else { - yyb148 = r.CheckBreak() - } - if yyb148 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Error = "" - } else { - x.Error = string(r.DecodeString()) - } - for { - yyj148++ - if yyhl148 { - yyb148 = yyj148 > l - } else { - yyb148 = r.CheckBreak() - } - if yyb148 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj148-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *UserInfo) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym152 := z.EncBinary() - _ = yym152 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep153 := !z.EncBinary() - yy2arr153 := z.EncBasicHandle().StructToArray - var yyq153 [4]bool - _, _, _ = yysep153, yyq153, yy2arr153 - const yyr153 bool = false - var yynn153 int - if yyr153 || yy2arr153 { - r.EncodeArrayStart(4) - } else { - yynn153 = 4 - for _, b := range yyq153 { - if b { - yynn153++ - } - } - r.EncodeMapStart(yynn153) - yynn153 = 0 - } - if yyr153 || yy2arr153 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym155 := z.EncBinary() - _ = yym155 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Username)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Username")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym156 := z.EncBinary() - _ = yym156 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Username)) - } - } - if yyr153 || yy2arr153 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym158 := z.EncBinary() - _ = yym158 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.UID)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("UID")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym159 := z.EncBinary() - _ = yym159 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.UID)) - } - } - if yyr153 || yy2arr153 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Groups == nil { - r.EncodeNil() - } else { - yym161 := z.EncBinary() - _ = yym161 - if false { - } else { - z.F.EncSliceStringV(x.Groups, false, e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Groups")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Groups == nil { - r.EncodeNil() - } else { - yym162 := z.EncBinary() - _ = yym162 - if false { - } else { - z.F.EncSliceStringV(x.Groups, false, e) - } - } - } - if yyr153 || yy2arr153 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Extra == nil { - r.EncodeNil() - } else { - yym164 := z.EncBinary() - _ = yym164 - if false { - } else { - h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Extra")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Extra == nil { - r.EncodeNil() - } else { - yym165 := z.EncBinary() - _ = yym165 - if false { - } else { - h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e) - } - } - } - if yyr153 || yy2arr153 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *UserInfo) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym166 := z.DecBinary() - _ = yym166 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct167 := r.ContainerType() - if yyct167 == codecSelferValueTypeMap1234 { - yyl167 := r.ReadMapStart() - if yyl167 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl167, d) - } - } else if yyct167 == codecSelferValueTypeArray1234 { - yyl167 := r.ReadArrayStart() - if yyl167 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl167, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *UserInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys168Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys168Slc - var yyhl168 bool = l >= 0 - for yyj168 := 0; ; yyj168++ { - if yyhl168 { - if yyj168 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys168Slc = r.DecodeBytes(yys168Slc, true, true) - yys168 := string(yys168Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys168 { - case "Username": - if r.TryDecodeAsNil() { - x.Username = "" - } else { - x.Username = string(r.DecodeString()) - } - case "UID": - if r.TryDecodeAsNil() { - x.UID = "" - } else { - x.UID = string(r.DecodeString()) - } - case "Groups": - if r.TryDecodeAsNil() { - x.Groups = nil - } else { - yyv171 := &x.Groups - yym172 := z.DecBinary() - _ = yym172 - if false { - } else { - z.F.DecSliceStringX(yyv171, false, d) - } - } - case "Extra": - if r.TryDecodeAsNil() { - x.Extra = nil - } else { - yyv173 := &x.Extra - yym174 := z.DecBinary() - _ = yym174 - if false { - } else { - h.decMapstringExtraValue((*map[string]ExtraValue)(yyv173), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys168) - } // end switch yys168 - } // end for yyj168 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *UserInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj175 int - var yyb175 bool - var yyhl175 bool = l >= 0 - yyj175++ - if yyhl175 { - yyb175 = yyj175 > l - } else { - yyb175 = r.CheckBreak() - } - if yyb175 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Username = "" - } else { - x.Username = string(r.DecodeString()) - } - yyj175++ - if yyhl175 { - yyb175 = yyj175 > l - } else { - yyb175 = r.CheckBreak() - } - if yyb175 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.UID = "" - } else { - x.UID = string(r.DecodeString()) - } - yyj175++ - if yyhl175 { - yyb175 = yyj175 > l - } else { - yyb175 = r.CheckBreak() - } - if yyb175 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Groups = nil - } else { - yyv178 := &x.Groups - yym179 := z.DecBinary() - _ = yym179 - if false { - } else { - z.F.DecSliceStringX(yyv178, false, d) - } - } - yyj175++ - if yyhl175 { - yyb175 = yyj175 > l - } else { - yyb175 = r.CheckBreak() - } - if yyb175 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Extra = nil - } else { - yyv180 := &x.Extra - yym181 := z.DecBinary() - _ = yym181 - if false { - } else { - h.decMapstringExtraValue((*map[string]ExtraValue)(yyv180), d) - } - } - for { - yyj175++ - if yyhl175 { - yyb175 = yyj175 > l - } else { - yyb175 = r.CheckBreak() - } - if yyb175 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj175-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym182 := z.EncBinary() - _ = yym182 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - h.encExtraValue((ExtraValue)(x), e) - } - } -} - -func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym183 := z.DecBinary() - _ = yym183 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - h.decExtraValue((*ExtraValue)(x), d) - } -} - -func (x codecSelfer1234) encSliceapi_OwnerReference(v []pkg2_api.OwnerReference, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv184 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy185 := &yyv184 - yy185.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceapi_OwnerReference(v *[]pkg2_api.OwnerReference, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv186 := *v - yyh186, yyl186 := z.DecSliceHelperStart() - var yyc186 bool - if yyl186 == 0 { - if yyv186 == nil { - yyv186 = []pkg2_api.OwnerReference{} - yyc186 = true - } else if len(yyv186) != 0 { - yyv186 = yyv186[:0] - yyc186 = true - } - } else if yyl186 > 0 { - var yyrr186, yyrl186 int - var yyrt186 bool - if yyl186 > cap(yyv186) { - - yyrg186 := len(yyv186) > 0 - yyv2186 := yyv186 - yyrl186, yyrt186 = z.DecInferLen(yyl186, z.DecBasicHandle().MaxInitLen, 72) - if yyrt186 { - if yyrl186 <= cap(yyv186) { - yyv186 = yyv186[:yyrl186] - } else { - yyv186 = make([]pkg2_api.OwnerReference, yyrl186) - } - } else { - yyv186 = make([]pkg2_api.OwnerReference, yyrl186) - } - yyc186 = true - yyrr186 = len(yyv186) - if yyrg186 { - copy(yyv186, yyv2186) - } - } else if yyl186 != len(yyv186) { - yyv186 = yyv186[:yyl186] - yyc186 = true - } - yyj186 := 0 - for ; yyj186 < yyrr186; yyj186++ { - yyh186.ElemContainerState(yyj186) - if r.TryDecodeAsNil() { - yyv186[yyj186] = pkg2_api.OwnerReference{} - } else { - yyv187 := &yyv186[yyj186] - yyv187.CodecDecodeSelf(d) - } - - } - if yyrt186 { - for ; yyj186 < yyl186; yyj186++ { - yyv186 = append(yyv186, pkg2_api.OwnerReference{}) - yyh186.ElemContainerState(yyj186) - if r.TryDecodeAsNil() { - yyv186[yyj186] = pkg2_api.OwnerReference{} - } else { - yyv188 := &yyv186[yyj186] - yyv188.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj186 := 0 - for ; !r.CheckBreak(); yyj186++ { - - if yyj186 >= len(yyv186) { - yyv186 = append(yyv186, pkg2_api.OwnerReference{}) // var yyz186 pkg2_api.OwnerReference - yyc186 = true - } - yyh186.ElemContainerState(yyj186) - if yyj186 < len(yyv186) { - if r.TryDecodeAsNil() { - yyv186[yyj186] = pkg2_api.OwnerReference{} - } else { - yyv189 := &yyv186[yyj186] - yyv189.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj186 < len(yyv186) { - yyv186 = yyv186[:yyj186] - yyc186 = true - } else if yyj186 == 0 && yyv186 == nil { - yyv186 = []pkg2_api.OwnerReference{} - yyc186 = true - } - } - yyh186.End() - if yyc186 { - *v = yyv186 - } -} - -func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeMapStart(len(v)) - for yyk190, yyv190 := range v { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - yym191 := z.EncBinary() - _ = yym191 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(yyk190)) - } - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyv190 == nil { - r.EncodeNil() - } else { - yyv190.CodecEncodeSelf(e) - } - } - z.EncSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv192 := *v - yyl192 := r.ReadMapStart() - yybh192 := z.DecBasicHandle() - if yyv192 == nil { - yyrl192, _ := z.DecInferLen(yyl192, yybh192.MaxInitLen, 40) - yyv192 = make(map[string]ExtraValue, yyrl192) - *v = yyv192 - } - var yymk192 string - var yymv192 ExtraValue - var yymg192 bool - if yybh192.MapValueReset { - yymg192 = true - } - if yyl192 > 0 { - for yyj192 := 0; yyj192 < yyl192; yyj192++ { - z.DecSendContainerState(codecSelfer_containerMapKey1234) - if r.TryDecodeAsNil() { - yymk192 = "" - } else { - yymk192 = string(r.DecodeString()) - } - - if yymg192 { - yymv192 = yyv192[yymk192] - } else { - yymv192 = nil - } - z.DecSendContainerState(codecSelfer_containerMapValue1234) - if r.TryDecodeAsNil() { - yymv192 = nil - } else { - yyv194 := &yymv192 - yyv194.CodecDecodeSelf(d) - } - - if yyv192 != nil { - yyv192[yymk192] = yymv192 - } - } - } else if yyl192 < 0 { - for yyj192 := 0; !r.CheckBreak(); yyj192++ { - z.DecSendContainerState(codecSelfer_containerMapKey1234) - if r.TryDecodeAsNil() { - yymk192 = "" - } else { - yymk192 = string(r.DecodeString()) - } - - if yymg192 { - yymv192 = yyv192[yymk192] - } else { - yymv192 = nil - } - z.DecSendContainerState(codecSelfer_containerMapValue1234) - if r.TryDecodeAsNil() { - yymv192 = nil - } else { - yyv196 := &yymv192 - yyv196.CodecDecodeSelf(d) - } - - if yyv192 != nil { - yyv192[yymk192] = yymv192 - } - } - } // else len==0: TODO: Should we clear map entries? - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv197 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym198 := z.EncBinary() - _ = yym198 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(yyv197)) - } - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv199 := *v - yyh199, yyl199 := z.DecSliceHelperStart() - var yyc199 bool - if yyl199 == 0 { - if yyv199 == nil { - yyv199 = []string{} - yyc199 = true - } else if len(yyv199) != 0 { - yyv199 = yyv199[:0] - yyc199 = true - } - } else if yyl199 > 0 { - var yyrr199, yyrl199 int - var yyrt199 bool - if yyl199 > cap(yyv199) { - - yyrl199, yyrt199 = z.DecInferLen(yyl199, z.DecBasicHandle().MaxInitLen, 16) - if yyrt199 { - if yyrl199 <= cap(yyv199) { - yyv199 = yyv199[:yyrl199] - } else { - yyv199 = make([]string, yyrl199) - } - } else { - yyv199 = make([]string, yyrl199) - } - yyc199 = true - yyrr199 = len(yyv199) - } else if yyl199 != len(yyv199) { - yyv199 = yyv199[:yyl199] - yyc199 = true - } - yyj199 := 0 - for ; yyj199 < yyrr199; yyj199++ { - yyh199.ElemContainerState(yyj199) - if r.TryDecodeAsNil() { - yyv199[yyj199] = "" - } else { - yyv199[yyj199] = string(r.DecodeString()) - } - - } - if yyrt199 { - for ; yyj199 < yyl199; yyj199++ { - yyv199 = append(yyv199, "") - yyh199.ElemContainerState(yyj199) - if r.TryDecodeAsNil() { - yyv199[yyj199] = "" - } else { - yyv199[yyj199] = string(r.DecodeString()) - } - - } - } - - } else { - yyj199 := 0 - for ; !r.CheckBreak(); yyj199++ { - - if yyj199 >= len(yyv199) { - yyv199 = append(yyv199, "") // var yyz199 string - yyc199 = true - } - yyh199.ElemContainerState(yyj199) - if yyj199 < len(yyv199) { - if r.TryDecodeAsNil() { - yyv199[yyj199] = "" - } else { - yyv199[yyj199] = string(r.DecodeString()) - } - - } else { - z.DecSwallow() - } - - } - if yyj199 < len(yyv199) { - yyv199 = yyv199[:yyj199] - yyc199 = true - } else if yyj199 == 0 && yyv199 == nil { - yyv199 = []string{} - yyc199 = true - } - } - yyh199.End() - if yyc199 { - *v = yyv199 - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/doc.go deleted file mode 100644 index e6530b529..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/doc.go +++ /dev/null @@ -1,21 +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,register -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authentication -// +groupName=authentication.k8s.io -// +k8s:openapi-gen=true -package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/types.generated.go deleted file mode 100644 index 8625d4b6c..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/types.generated.go +++ /dev/null @@ -1,5607 +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 authorization - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - pkg2_api "k8s.io/client-go/1.5/pkg/api" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg3_types "k8s.io/client-go/1.5/pkg/types" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg2_api.ObjectMeta - var v1 pkg1_unversioned.TypeMeta - var v2 pkg3_types.UID - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 - } -} - -func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [19]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = x.Kind != "" - yyq2[1] = x.APIVersion != "" - yyq2[2] = x.Name != "" - yyq2[3] = x.GenerateName != "" - yyq2[4] = x.Namespace != "" - yyq2[5] = x.SelfLink != "" - yyq2[6] = x.UID != "" - yyq2[7] = x.ResourceVersion != "" - yyq2[8] = x.Generation != 0 - yyq2[9] = true - yyq2[10] = x.ObjectMeta.DeletionTimestamp != nil && x.DeletionTimestamp != nil - yyq2[11] = x.ObjectMeta.DeletionGracePeriodSeconds != nil && x.DeletionGracePeriodSeconds != nil - yyq2[12] = len(x.Labels) != 0 - yyq2[13] = len(x.Annotations) != 0 - yyq2[14] = len(x.OwnerReferences) != 0 - yyq2[15] = len(x.Finalizers) != 0 - yyq2[16] = x.ClusterName != "" - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(19) - } else { - yynn2 = 2 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[1] { - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - 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 { - r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("generateName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym14 := z.EncBinary() - _ = yym14 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { - yym16 := z.EncBinary() - _ = yym16 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("namespace")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym17 := z.EncBinary() - _ = yym17 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[5] { - yym19 := z.EncBinary() - _ = yym19 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selfLink")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym20 := z.EncBinary() - _ = yym20 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[6] { - yym22 := z.EncBinary() - _ = yym22 - 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[6] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("uid")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym23 := z.EncBinary() - _ = yym23 - 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[7] { - yym25 := z.EncBinary() - _ = yym25 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[7] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("resourceVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym26 := z.EncBinary() - _ = yym26 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[8] { - yym28 := z.EncBinary() - _ = yym28 - if false { - } else { - r.EncodeInt(int64(x.Generation)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[8] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("generation")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym29 := z.EncBinary() - _ = yym29 - if false { - } else { - r.EncodeInt(int64(x.Generation)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[9] { - yy31 := &x.CreationTimestamp - yym32 := z.EncBinary() - _ = yym32 - if false { - } else if z.HasExtensions() && z.EncExt(yy31) { - } else if yym32 { - z.EncBinaryMarshal(yy31) - } else if !yym32 && z.IsJSONHandle() { - z.EncJSONMarshal(yy31) - } else { - z.EncFallback(yy31) - } - } else { - r.EncodeNil() - } - } else { - if yyq2[9] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("creationTimestamp")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy33 := &x.CreationTimestamp - yym34 := z.EncBinary() - _ = yym34 - if false { - } else if z.HasExtensions() && z.EncExt(yy33) { - } else if yym34 { - z.EncBinaryMarshal(yy33) - } else if !yym34 && z.IsJSONHandle() { - z.EncJSONMarshal(yy33) - } else { - z.EncFallback(yy33) - } - } - } - var yyn35 bool - if x.ObjectMeta.DeletionTimestamp == nil { - yyn35 = true - goto LABEL35 - } - LABEL35: - if yyr2 || yy2arr2 { - if yyn35 { - r.EncodeNil() - } else { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[10] { - if x.DeletionTimestamp == nil { - r.EncodeNil() - } else { - yym36 := z.EncBinary() - _ = yym36 - if false { - } else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) { - } else if yym36 { - z.EncBinaryMarshal(x.DeletionTimestamp) - } else if !yym36 && z.IsJSONHandle() { - z.EncJSONMarshal(x.DeletionTimestamp) - } else { - z.EncFallback(x.DeletionTimestamp) - } - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[10] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("deletionTimestamp")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn35 { - r.EncodeNil() - } else { - if x.DeletionTimestamp == nil { - r.EncodeNil() - } else { - yym37 := z.EncBinary() - _ = yym37 - if false { - } else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) { - } else if yym37 { - z.EncBinaryMarshal(x.DeletionTimestamp) - } else if !yym37 && z.IsJSONHandle() { - z.EncJSONMarshal(x.DeletionTimestamp) - } else { - z.EncFallback(x.DeletionTimestamp) - } - } - } - } - } - var yyn38 bool - if x.ObjectMeta.DeletionGracePeriodSeconds == nil { - yyn38 = true - goto LABEL38 - } - LABEL38: - if yyr2 || yy2arr2 { - if yyn38 { - r.EncodeNil() - } else { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[11] { - if x.DeletionGracePeriodSeconds == nil { - r.EncodeNil() - } else { - yy39 := *x.DeletionGracePeriodSeconds - yym40 := z.EncBinary() - _ = yym40 - if false { - } else { - r.EncodeInt(int64(yy39)) - } - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[11] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("deletionGracePeriodSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn38 { - r.EncodeNil() - } else { - if x.DeletionGracePeriodSeconds == nil { - r.EncodeNil() - } else { - yy41 := *x.DeletionGracePeriodSeconds - yym42 := z.EncBinary() - _ = yym42 - if false { - } else { - r.EncodeInt(int64(yy41)) - } - } - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[12] { - if x.Labels == nil { - r.EncodeNil() - } else { - yym44 := z.EncBinary() - _ = yym44 - if false { - } else { - z.F.EncMapStringStringV(x.Labels, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[12] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("labels")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Labels == nil { - r.EncodeNil() - } else { - yym45 := z.EncBinary() - _ = yym45 - if false { - } else { - z.F.EncMapStringStringV(x.Labels, false, e) - } - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[13] { - if x.Annotations == nil { - r.EncodeNil() - } else { - yym47 := z.EncBinary() - _ = yym47 - if false { - } else { - z.F.EncMapStringStringV(x.Annotations, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[13] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("annotations")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Annotations == nil { - r.EncodeNil() - } else { - yym48 := z.EncBinary() - _ = yym48 - if false { - } else { - z.F.EncMapStringStringV(x.Annotations, false, e) - } - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[14] { - if x.OwnerReferences == nil { - r.EncodeNil() - } else { - yym50 := z.EncBinary() - _ = yym50 - if false { - } else { - h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[14] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("ownerReferences")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.OwnerReferences == nil { - r.EncodeNil() - } else { - yym51 := z.EncBinary() - _ = yym51 - if false { - } else { - h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e) - } - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[15] { - if x.Finalizers == nil { - r.EncodeNil() - } else { - yym53 := z.EncBinary() - _ = yym53 - if false { - } else { - z.F.EncSliceStringV(x.Finalizers, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[15] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("finalizers")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Finalizers == nil { - r.EncodeNil() - } else { - yym54 := z.EncBinary() - _ = yym54 - if false { - } else { - z.F.EncSliceStringV(x.Finalizers, false, e) - } - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[16] { - yym56 := z.EncBinary() - _ = yym56 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[16] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("clusterName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym57 := z.EncBinary() - _ = yym57 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy59 := &x.Spec - yy59.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy60 := &x.Spec - yy60.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy62 := &x.Status - yy62.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy63 := &x.Status - yy63.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *SubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym64 := z.DecBinary() - _ = yym64 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct65 := r.ContainerType() - if yyct65 == codecSelferValueTypeMap1234 { - yyl65 := r.ReadMapStart() - if yyl65 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl65, d) - } - } else if yyct65 == codecSelferValueTypeArray1234 { - yyl65 := r.ReadArrayStart() - if yyl65 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl65, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys66Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys66Slc - var yyhl66 bool = l >= 0 - for yyj66 := 0; ; yyj66++ { - if yyhl66 { - if yyj66 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys66Slc = r.DecodeBytes(yys66Slc, true, true) - yys66 := string(yys66Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys66 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - case "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 = pkg3_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 = pkg1_unversioned.Time{} - } else { - yyv76 := &x.CreationTimestamp - yym77 := z.DecBinary() - _ = yym77 - if false { - } else if z.HasExtensions() && z.DecExt(yyv76) { - } else if yym77 { - z.DecBinaryUnmarshal(yyv76) - } else if !yym77 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv76) - } else { - z.DecFallback(yyv76, false) - } - } - case "deletionTimestamp": - if x.ObjectMeta.DeletionTimestamp == nil { - x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time) - } - if r.TryDecodeAsNil() { - if x.DeletionTimestamp != nil { - x.DeletionTimestamp = nil - } - } else { - if x.DeletionTimestamp == nil { - x.DeletionTimestamp = new(pkg1_unversioned.Time) - } - yym79 := z.DecBinary() - _ = yym79 - if false { - } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) { - } else if yym79 { - z.DecBinaryUnmarshal(x.DeletionTimestamp) - } else if !yym79 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.DeletionTimestamp) - } else { - z.DecFallback(x.DeletionTimestamp, false) - } - } - case "deletionGracePeriodSeconds": - if x.ObjectMeta.DeletionGracePeriodSeconds == nil { - x.ObjectMeta.DeletionGracePeriodSeconds = new(int64) - } - if r.TryDecodeAsNil() { - if x.DeletionGracePeriodSeconds != nil { - x.DeletionGracePeriodSeconds = nil - } - } else { - if x.DeletionGracePeriodSeconds == nil { - x.DeletionGracePeriodSeconds = new(int64) - } - yym81 := z.DecBinary() - _ = yym81 - if false { - } else { - *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64)) - } - } - case "labels": - if r.TryDecodeAsNil() { - x.Labels = nil - } else { - yyv82 := &x.Labels - yym83 := z.DecBinary() - _ = yym83 - if false { - } else { - z.F.DecMapStringStringX(yyv82, false, d) - } - } - case "annotations": - if r.TryDecodeAsNil() { - x.Annotations = nil - } else { - yyv84 := &x.Annotations - yym85 := z.DecBinary() - _ = yym85 - if false { - } else { - z.F.DecMapStringStringX(yyv84, false, d) - } - } - case "ownerReferences": - if r.TryDecodeAsNil() { - x.OwnerReferences = nil - } else { - yyv86 := &x.OwnerReferences - yym87 := z.DecBinary() - _ = yym87 - if false { - } else { - h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv86), d) - } - } - case "finalizers": - if r.TryDecodeAsNil() { - x.Finalizers = nil - } else { - yyv88 := &x.Finalizers - yym89 := z.DecBinary() - _ = yym89 - if false { - } else { - z.F.DecSliceStringX(yyv88, false, d) - } - } - case "clusterName": - if r.TryDecodeAsNil() { - x.ClusterName = "" - } else { - x.ClusterName = string(r.DecodeString()) - } - case "Spec": - if r.TryDecodeAsNil() { - x.Spec = SubjectAccessReviewSpec{} - } else { - yyv91 := &x.Spec - yyv91.CodecDecodeSelf(d) - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = SubjectAccessReviewStatus{} - } else { - yyv92 := &x.Status - yyv92.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys66) - } // end switch yys66 - } // end for yyj66 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj93 int - var yyb93 bool - var yyhl93 bool = l >= 0 - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.GenerateName = "" - } else { - x.GenerateName = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.SelfLink = "" - } else { - x.SelfLink = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.UID = "" - } else { - x.UID = pkg3_types.UID(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ResourceVersion = "" - } else { - x.ResourceVersion = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Generation = 0 - } else { - x.Generation = int64(r.DecodeInt(64)) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CreationTimestamp = pkg1_unversioned.Time{} - } else { - yyv103 := &x.CreationTimestamp - yym104 := z.DecBinary() - _ = yym104 - if false { - } else if z.HasExtensions() && z.DecExt(yyv103) { - } else if yym104 { - z.DecBinaryUnmarshal(yyv103) - } else if !yym104 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv103) - } else { - z.DecFallback(yyv103, false) - } - } - if x.ObjectMeta.DeletionTimestamp == nil { - x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - 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(pkg1_unversioned.Time) - } - yym106 := z.DecBinary() - _ = yym106 - if false { - } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) { - } else if yym106 { - z.DecBinaryUnmarshal(x.DeletionTimestamp) - } else if !yym106 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.DeletionTimestamp) - } else { - z.DecFallback(x.DeletionTimestamp, false) - } - } - if x.ObjectMeta.DeletionGracePeriodSeconds == nil { - x.ObjectMeta.DeletionGracePeriodSeconds = new(int64) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - 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) - } - yym108 := z.DecBinary() - _ = yym108 - if false { - } else { - *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64)) - } - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Labels = nil - } else { - yyv109 := &x.Labels - yym110 := z.DecBinary() - _ = yym110 - if false { - } else { - z.F.DecMapStringStringX(yyv109, false, d) - } - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Annotations = nil - } else { - yyv111 := &x.Annotations - yym112 := z.DecBinary() - _ = yym112 - if false { - } else { - z.F.DecMapStringStringX(yyv111, false, d) - } - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.OwnerReferences = nil - } else { - yyv113 := &x.OwnerReferences - yym114 := z.DecBinary() - _ = yym114 - if false { - } else { - h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv113), d) - } - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Finalizers = nil - } else { - yyv115 := &x.Finalizers - yym116 := z.DecBinary() - _ = yym116 - if false { - } else { - z.F.DecSliceStringX(yyv115, false, d) - } - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ClusterName = "" - } else { - x.ClusterName = string(r.DecodeString()) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = SubjectAccessReviewSpec{} - } else { - yyv118 := &x.Spec - yyv118.CodecDecodeSelf(d) - } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = SubjectAccessReviewStatus{} - } else { - yyv119 := &x.Status - yyv119.CodecDecodeSelf(d) - } - for { - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l - } else { - yyb93 = r.CheckBreak() - } - if yyb93 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj93-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym120 := z.EncBinary() - _ = yym120 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep121 := !z.EncBinary() - yy2arr121 := z.EncBasicHandle().StructToArray - var yyq121 [19]bool - _, _, _ = yysep121, yyq121, yy2arr121 - const yyr121 bool = false - yyq121[0] = x.Kind != "" - yyq121[1] = x.APIVersion != "" - yyq121[2] = x.Name != "" - yyq121[3] = x.GenerateName != "" - yyq121[4] = x.Namespace != "" - yyq121[5] = x.SelfLink != "" - yyq121[6] = x.UID != "" - yyq121[7] = x.ResourceVersion != "" - yyq121[8] = x.Generation != 0 - yyq121[9] = true - yyq121[10] = x.ObjectMeta.DeletionTimestamp != nil && x.DeletionTimestamp != nil - yyq121[11] = x.ObjectMeta.DeletionGracePeriodSeconds != nil && x.DeletionGracePeriodSeconds != nil - yyq121[12] = len(x.Labels) != 0 - yyq121[13] = len(x.Annotations) != 0 - yyq121[14] = len(x.OwnerReferences) != 0 - yyq121[15] = len(x.Finalizers) != 0 - yyq121[16] = x.ClusterName != "" - var yynn121 int - if yyr121 || yy2arr121 { - r.EncodeArrayStart(19) - } else { - yynn121 = 2 - for _, b := range yyq121 { - if b { - yynn121++ - } - } - r.EncodeMapStart(yynn121) - yynn121 = 0 - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[0] { - yym123 := z.EncBinary() - _ = yym123 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq121[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym124 := z.EncBinary() - _ = yym124 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[1] { - yym126 := z.EncBinary() - _ = yym126 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq121[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym127 := z.EncBinary() - _ = yym127 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[2] { - yym129 := z.EncBinary() - _ = yym129 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq121[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("name")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym130 := z.EncBinary() - _ = yym130 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[3] { - yym132 := z.EncBinary() - _ = yym132 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq121[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("generateName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym133 := z.EncBinary() - _ = yym133 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName)) - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[4] { - yym135 := z.EncBinary() - _ = yym135 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq121[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("namespace")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym136 := z.EncBinary() - _ = yym136 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[5] { - yym138 := z.EncBinary() - _ = yym138 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq121[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selfLink")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym139 := z.EncBinary() - _ = yym139 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink)) - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[6] { - yym141 := z.EncBinary() - _ = yym141 - 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 yyq121[6] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("uid")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym142 := z.EncBinary() - _ = yym142 - if false { - } else if z.HasExtensions() && z.EncExt(x.UID) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.UID)) - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[7] { - yym144 := z.EncBinary() - _ = yym144 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq121[7] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("resourceVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym145 := z.EncBinary() - _ = yym145 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[8] { - yym147 := z.EncBinary() - _ = yym147 - if false { - } else { - r.EncodeInt(int64(x.Generation)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq121[8] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("generation")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym148 := z.EncBinary() - _ = yym148 - if false { - } else { - r.EncodeInt(int64(x.Generation)) - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[9] { - yy150 := &x.CreationTimestamp - yym151 := z.EncBinary() - _ = yym151 - if false { - } else if z.HasExtensions() && z.EncExt(yy150) { - } else if yym151 { - z.EncBinaryMarshal(yy150) - } else if !yym151 && z.IsJSONHandle() { - z.EncJSONMarshal(yy150) - } else { - z.EncFallback(yy150) - } - } else { - r.EncodeNil() - } - } else { - if yyq121[9] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("creationTimestamp")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy152 := &x.CreationTimestamp - yym153 := z.EncBinary() - _ = yym153 - if false { - } else if z.HasExtensions() && z.EncExt(yy152) { - } else if yym153 { - z.EncBinaryMarshal(yy152) - } else if !yym153 && z.IsJSONHandle() { - z.EncJSONMarshal(yy152) - } else { - z.EncFallback(yy152) - } - } - } - var yyn154 bool - if x.ObjectMeta.DeletionTimestamp == nil { - yyn154 = true - goto LABEL154 - } - LABEL154: - if yyr121 || yy2arr121 { - if yyn154 { - r.EncodeNil() - } else { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[10] { - if x.DeletionTimestamp == nil { - r.EncodeNil() - } else { - yym155 := z.EncBinary() - _ = yym155 - if false { - } else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) { - } else if yym155 { - z.EncBinaryMarshal(x.DeletionTimestamp) - } else if !yym155 && z.IsJSONHandle() { - z.EncJSONMarshal(x.DeletionTimestamp) - } else { - z.EncFallback(x.DeletionTimestamp) - } - } - } else { - r.EncodeNil() - } - } - } else { - if yyq121[10] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("deletionTimestamp")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn154 { - r.EncodeNil() - } else { - if x.DeletionTimestamp == nil { - r.EncodeNil() - } else { - yym156 := z.EncBinary() - _ = yym156 - if false { - } else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) { - } else if yym156 { - z.EncBinaryMarshal(x.DeletionTimestamp) - } else if !yym156 && z.IsJSONHandle() { - z.EncJSONMarshal(x.DeletionTimestamp) - } else { - z.EncFallback(x.DeletionTimestamp) - } - } - } - } - } - var yyn157 bool - if x.ObjectMeta.DeletionGracePeriodSeconds == nil { - yyn157 = true - goto LABEL157 - } - LABEL157: - if yyr121 || yy2arr121 { - if yyn157 { - r.EncodeNil() - } else { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[11] { - if x.DeletionGracePeriodSeconds == nil { - r.EncodeNil() - } else { - yy158 := *x.DeletionGracePeriodSeconds - yym159 := z.EncBinary() - _ = yym159 - if false { - } else { - r.EncodeInt(int64(yy158)) - } - } - } else { - r.EncodeNil() - } - } - } else { - if yyq121[11] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("deletionGracePeriodSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn157 { - r.EncodeNil() - } else { - if x.DeletionGracePeriodSeconds == nil { - r.EncodeNil() - } else { - yy160 := *x.DeletionGracePeriodSeconds - yym161 := z.EncBinary() - _ = yym161 - if false { - } else { - r.EncodeInt(int64(yy160)) - } - } - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[12] { - if x.Labels == nil { - r.EncodeNil() - } else { - yym163 := z.EncBinary() - _ = yym163 - if false { - } else { - z.F.EncMapStringStringV(x.Labels, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq121[12] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("labels")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Labels == nil { - r.EncodeNil() - } else { - yym164 := z.EncBinary() - _ = yym164 - if false { - } else { - z.F.EncMapStringStringV(x.Labels, false, e) - } - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[13] { - if x.Annotations == nil { - r.EncodeNil() - } else { - yym166 := z.EncBinary() - _ = yym166 - if false { - } else { - z.F.EncMapStringStringV(x.Annotations, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq121[13] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("annotations")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Annotations == nil { - r.EncodeNil() - } else { - yym167 := z.EncBinary() - _ = yym167 - if false { - } else { - z.F.EncMapStringStringV(x.Annotations, false, e) - } - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[14] { - if x.OwnerReferences == nil { - r.EncodeNil() - } else { - yym169 := z.EncBinary() - _ = yym169 - if false { - } else { - h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq121[14] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("ownerReferences")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.OwnerReferences == nil { - r.EncodeNil() - } else { - yym170 := z.EncBinary() - _ = yym170 - if false { - } else { - h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e) - } - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[15] { - if x.Finalizers == nil { - r.EncodeNil() - } else { - yym172 := z.EncBinary() - _ = yym172 - if false { - } else { - z.F.EncSliceStringV(x.Finalizers, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq121[15] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("finalizers")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Finalizers == nil { - r.EncodeNil() - } else { - yym173 := z.EncBinary() - _ = yym173 - if false { - } else { - z.F.EncSliceStringV(x.Finalizers, false, e) - } - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq121[16] { - yym175 := z.EncBinary() - _ = yym175 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq121[16] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("clusterName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym176 := z.EncBinary() - _ = yym176 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) - } - } - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy178 := &x.Spec - yy178.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy179 := &x.Spec - yy179.CodecEncodeSelf(e) - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy181 := &x.Status - yy181.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy182 := &x.Status - yy182.CodecEncodeSelf(e) - } - if yyr121 || yy2arr121 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *SelfSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym183 := z.DecBinary() - _ = yym183 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct184 := r.ContainerType() - if yyct184 == codecSelferValueTypeMap1234 { - yyl184 := r.ReadMapStart() - if yyl184 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl184, d) - } - } else if yyct184 == codecSelferValueTypeArray1234 { - yyl184 := r.ReadArrayStart() - if yyl184 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl184, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys185Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys185Slc - var yyhl185 bool = l >= 0 - for yyj185 := 0; ; yyj185++ { - if yyhl185 { - if yyj185 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys185Slc = r.DecodeBytes(yys185Slc, true, true) - yys185 := string(yys185Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys185 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - case "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 = pkg3_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 = pkg1_unversioned.Time{} - } else { - yyv195 := &x.CreationTimestamp - yym196 := z.DecBinary() - _ = yym196 - if false { - } else if z.HasExtensions() && z.DecExt(yyv195) { - } else if yym196 { - z.DecBinaryUnmarshal(yyv195) - } else if !yym196 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv195) - } else { - z.DecFallback(yyv195, false) - } - } - case "deletionTimestamp": - if x.ObjectMeta.DeletionTimestamp == nil { - x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time) - } - if r.TryDecodeAsNil() { - if x.DeletionTimestamp != nil { - x.DeletionTimestamp = nil - } - } else { - if x.DeletionTimestamp == nil { - x.DeletionTimestamp = new(pkg1_unversioned.Time) - } - yym198 := z.DecBinary() - _ = yym198 - if false { - } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) { - } else if yym198 { - z.DecBinaryUnmarshal(x.DeletionTimestamp) - } else if !yym198 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.DeletionTimestamp) - } else { - z.DecFallback(x.DeletionTimestamp, false) - } - } - case "deletionGracePeriodSeconds": - if x.ObjectMeta.DeletionGracePeriodSeconds == nil { - x.ObjectMeta.DeletionGracePeriodSeconds = new(int64) - } - if r.TryDecodeAsNil() { - if x.DeletionGracePeriodSeconds != nil { - x.DeletionGracePeriodSeconds = nil - } - } else { - if x.DeletionGracePeriodSeconds == nil { - x.DeletionGracePeriodSeconds = new(int64) - } - yym200 := z.DecBinary() - _ = yym200 - if false { - } else { - *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64)) - } - } - case "labels": - if r.TryDecodeAsNil() { - x.Labels = nil - } else { - yyv201 := &x.Labels - yym202 := z.DecBinary() - _ = yym202 - if false { - } else { - z.F.DecMapStringStringX(yyv201, false, d) - } - } - case "annotations": - if r.TryDecodeAsNil() { - x.Annotations = nil - } else { - yyv203 := &x.Annotations - yym204 := z.DecBinary() - _ = yym204 - if false { - } else { - z.F.DecMapStringStringX(yyv203, false, d) - } - } - case "ownerReferences": - if r.TryDecodeAsNil() { - x.OwnerReferences = nil - } else { - yyv205 := &x.OwnerReferences - yym206 := z.DecBinary() - _ = yym206 - if false { - } else { - h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv205), d) - } - } - case "finalizers": - if r.TryDecodeAsNil() { - x.Finalizers = nil - } else { - yyv207 := &x.Finalizers - yym208 := z.DecBinary() - _ = yym208 - if false { - } else { - z.F.DecSliceStringX(yyv207, false, d) - } - } - case "clusterName": - if r.TryDecodeAsNil() { - x.ClusterName = "" - } else { - x.ClusterName = string(r.DecodeString()) - } - case "Spec": - if r.TryDecodeAsNil() { - x.Spec = SelfSubjectAccessReviewSpec{} - } else { - yyv210 := &x.Spec - yyv210.CodecDecodeSelf(d) - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = SubjectAccessReviewStatus{} - } else { - yyv211 := &x.Status - yyv211.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys185) - } // end switch yys185 - } // end for yyj185 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj212 int - var yyb212 bool - var yyhl212 bool = l >= 0 - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.GenerateName = "" - } else { - x.GenerateName = string(r.DecodeString()) - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = string(r.DecodeString()) - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.SelfLink = "" - } else { - x.SelfLink = string(r.DecodeString()) - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.UID = "" - } else { - x.UID = pkg3_types.UID(r.DecodeString()) - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ResourceVersion = "" - } else { - x.ResourceVersion = string(r.DecodeString()) - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Generation = 0 - } else { - x.Generation = int64(r.DecodeInt(64)) - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CreationTimestamp = pkg1_unversioned.Time{} - } else { - yyv222 := &x.CreationTimestamp - yym223 := z.DecBinary() - _ = yym223 - if false { - } else if z.HasExtensions() && z.DecExt(yyv222) { - } else if yym223 { - z.DecBinaryUnmarshal(yyv222) - } else if !yym223 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv222) - } else { - z.DecFallback(yyv222, false) - } - } - if x.ObjectMeta.DeletionTimestamp == nil { - x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time) - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - 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(pkg1_unversioned.Time) - } - yym225 := z.DecBinary() - _ = yym225 - if false { - } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) { - } else if yym225 { - z.DecBinaryUnmarshal(x.DeletionTimestamp) - } else if !yym225 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.DeletionTimestamp) - } else { - z.DecFallback(x.DeletionTimestamp, false) - } - } - if x.ObjectMeta.DeletionGracePeriodSeconds == nil { - x.ObjectMeta.DeletionGracePeriodSeconds = new(int64) - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - 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) - } - yym227 := z.DecBinary() - _ = yym227 - if false { - } else { - *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64)) - } - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Labels = nil - } else { - yyv228 := &x.Labels - yym229 := z.DecBinary() - _ = yym229 - if false { - } else { - z.F.DecMapStringStringX(yyv228, false, d) - } - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Annotations = nil - } else { - yyv230 := &x.Annotations - yym231 := z.DecBinary() - _ = yym231 - if false { - } else { - z.F.DecMapStringStringX(yyv230, false, d) - } - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.OwnerReferences = nil - } else { - yyv232 := &x.OwnerReferences - yym233 := z.DecBinary() - _ = yym233 - if false { - } else { - h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv232), d) - } - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Finalizers = nil - } else { - yyv234 := &x.Finalizers - yym235 := z.DecBinary() - _ = yym235 - if false { - } else { - z.F.DecSliceStringX(yyv234, false, d) - } - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ClusterName = "" - } else { - x.ClusterName = string(r.DecodeString()) - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = SelfSubjectAccessReviewSpec{} - } else { - yyv237 := &x.Spec - yyv237.CodecDecodeSelf(d) - } - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = SubjectAccessReviewStatus{} - } else { - yyv238 := &x.Status - yyv238.CodecDecodeSelf(d) - } - for { - yyj212++ - if yyhl212 { - yyb212 = yyj212 > l - } else { - yyb212 = r.CheckBreak() - } - if yyb212 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj212-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym239 := z.EncBinary() - _ = yym239 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep240 := !z.EncBinary() - yy2arr240 := z.EncBasicHandle().StructToArray - var yyq240 [19]bool - _, _, _ = yysep240, yyq240, yy2arr240 - const yyr240 bool = false - yyq240[0] = x.Kind != "" - yyq240[1] = x.APIVersion != "" - yyq240[2] = x.Name != "" - yyq240[3] = x.GenerateName != "" - yyq240[4] = x.Namespace != "" - yyq240[5] = x.SelfLink != "" - yyq240[6] = x.UID != "" - yyq240[7] = x.ResourceVersion != "" - yyq240[8] = x.Generation != 0 - yyq240[9] = true - yyq240[10] = x.ObjectMeta.DeletionTimestamp != nil && x.DeletionTimestamp != nil - yyq240[11] = x.ObjectMeta.DeletionGracePeriodSeconds != nil && x.DeletionGracePeriodSeconds != nil - yyq240[12] = len(x.Labels) != 0 - yyq240[13] = len(x.Annotations) != 0 - yyq240[14] = len(x.OwnerReferences) != 0 - yyq240[15] = len(x.Finalizers) != 0 - yyq240[16] = x.ClusterName != "" - var yynn240 int - if yyr240 || yy2arr240 { - r.EncodeArrayStart(19) - } else { - yynn240 = 2 - for _, b := range yyq240 { - if b { - yynn240++ - } - } - r.EncodeMapStart(yynn240) - yynn240 = 0 - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[0] { - yym242 := z.EncBinary() - _ = yym242 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq240[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym243 := z.EncBinary() - _ = yym243 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[1] { - yym245 := z.EncBinary() - _ = yym245 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq240[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym246 := z.EncBinary() - _ = yym246 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[2] { - yym248 := z.EncBinary() - _ = yym248 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq240[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("name")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym249 := z.EncBinary() - _ = yym249 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[3] { - yym251 := z.EncBinary() - _ = yym251 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq240[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("generateName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym252 := z.EncBinary() - _ = yym252 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName)) - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[4] { - yym254 := z.EncBinary() - _ = yym254 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq240[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("namespace")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym255 := z.EncBinary() - _ = yym255 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[5] { - yym257 := z.EncBinary() - _ = yym257 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq240[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selfLink")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym258 := z.EncBinary() - _ = yym258 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink)) - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[6] { - yym260 := z.EncBinary() - _ = yym260 - 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 yyq240[6] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("uid")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym261 := z.EncBinary() - _ = yym261 - if false { - } else if z.HasExtensions() && z.EncExt(x.UID) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.UID)) - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[7] { - yym263 := z.EncBinary() - _ = yym263 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq240[7] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("resourceVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym264 := z.EncBinary() - _ = yym264 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[8] { - yym266 := z.EncBinary() - _ = yym266 - if false { - } else { - r.EncodeInt(int64(x.Generation)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq240[8] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("generation")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym267 := z.EncBinary() - _ = yym267 - if false { - } else { - r.EncodeInt(int64(x.Generation)) - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[9] { - yy269 := &x.CreationTimestamp - yym270 := z.EncBinary() - _ = yym270 - if false { - } else if z.HasExtensions() && z.EncExt(yy269) { - } else if yym270 { - z.EncBinaryMarshal(yy269) - } else if !yym270 && z.IsJSONHandle() { - z.EncJSONMarshal(yy269) - } else { - z.EncFallback(yy269) - } - } else { - r.EncodeNil() - } - } else { - if yyq240[9] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("creationTimestamp")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy271 := &x.CreationTimestamp - yym272 := z.EncBinary() - _ = yym272 - if false { - } else if z.HasExtensions() && z.EncExt(yy271) { - } else if yym272 { - z.EncBinaryMarshal(yy271) - } else if !yym272 && z.IsJSONHandle() { - z.EncJSONMarshal(yy271) - } else { - z.EncFallback(yy271) - } - } - } - var yyn273 bool - if x.ObjectMeta.DeletionTimestamp == nil { - yyn273 = true - goto LABEL273 - } - LABEL273: - if yyr240 || yy2arr240 { - if yyn273 { - r.EncodeNil() - } else { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[10] { - if x.DeletionTimestamp == nil { - r.EncodeNil() - } else { - yym274 := z.EncBinary() - _ = yym274 - if false { - } else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) { - } else if yym274 { - z.EncBinaryMarshal(x.DeletionTimestamp) - } else if !yym274 && z.IsJSONHandle() { - z.EncJSONMarshal(x.DeletionTimestamp) - } else { - z.EncFallback(x.DeletionTimestamp) - } - } - } else { - r.EncodeNil() - } - } - } else { - if yyq240[10] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("deletionTimestamp")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn273 { - r.EncodeNil() - } else { - if x.DeletionTimestamp == nil { - r.EncodeNil() - } else { - yym275 := z.EncBinary() - _ = yym275 - if false { - } else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) { - } else if yym275 { - z.EncBinaryMarshal(x.DeletionTimestamp) - } else if !yym275 && z.IsJSONHandle() { - z.EncJSONMarshal(x.DeletionTimestamp) - } else { - z.EncFallback(x.DeletionTimestamp) - } - } - } - } - } - var yyn276 bool - if x.ObjectMeta.DeletionGracePeriodSeconds == nil { - yyn276 = true - goto LABEL276 - } - LABEL276: - if yyr240 || yy2arr240 { - if yyn276 { - r.EncodeNil() - } else { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[11] { - if x.DeletionGracePeriodSeconds == nil { - r.EncodeNil() - } else { - yy277 := *x.DeletionGracePeriodSeconds - yym278 := z.EncBinary() - _ = yym278 - if false { - } else { - r.EncodeInt(int64(yy277)) - } - } - } else { - r.EncodeNil() - } - } - } else { - if yyq240[11] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("deletionGracePeriodSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn276 { - r.EncodeNil() - } else { - if x.DeletionGracePeriodSeconds == nil { - r.EncodeNil() - } else { - yy279 := *x.DeletionGracePeriodSeconds - yym280 := z.EncBinary() - _ = yym280 - if false { - } else { - r.EncodeInt(int64(yy279)) - } - } - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[12] { - if x.Labels == nil { - r.EncodeNil() - } else { - yym282 := z.EncBinary() - _ = yym282 - if false { - } else { - z.F.EncMapStringStringV(x.Labels, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq240[12] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("labels")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Labels == nil { - r.EncodeNil() - } else { - yym283 := z.EncBinary() - _ = yym283 - if false { - } else { - z.F.EncMapStringStringV(x.Labels, false, e) - } - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[13] { - if x.Annotations == nil { - r.EncodeNil() - } else { - yym285 := z.EncBinary() - _ = yym285 - if false { - } else { - z.F.EncMapStringStringV(x.Annotations, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq240[13] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("annotations")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Annotations == nil { - r.EncodeNil() - } else { - yym286 := z.EncBinary() - _ = yym286 - if false { - } else { - z.F.EncMapStringStringV(x.Annotations, false, e) - } - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[14] { - if x.OwnerReferences == nil { - r.EncodeNil() - } else { - yym288 := z.EncBinary() - _ = yym288 - if false { - } else { - h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq240[14] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("ownerReferences")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.OwnerReferences == nil { - r.EncodeNil() - } else { - yym289 := z.EncBinary() - _ = yym289 - if false { - } else { - h.encSliceapi_OwnerReference(([]pkg2_api.OwnerReference)(x.OwnerReferences), e) - } - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[15] { - if x.Finalizers == nil { - r.EncodeNil() - } else { - yym291 := z.EncBinary() - _ = yym291 - if false { - } else { - z.F.EncSliceStringV(x.Finalizers, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq240[15] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("finalizers")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Finalizers == nil { - r.EncodeNil() - } else { - yym292 := z.EncBinary() - _ = yym292 - if false { - } else { - z.F.EncSliceStringV(x.Finalizers, false, e) - } - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq240[16] { - yym294 := z.EncBinary() - _ = yym294 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq240[16] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("clusterName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym295 := z.EncBinary() - _ = yym295 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) - } - } - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy297 := &x.Spec - yy297.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy298 := &x.Spec - yy298.CodecEncodeSelf(e) - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy300 := &x.Status - yy300.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy301 := &x.Status - yy301.CodecEncodeSelf(e) - } - if yyr240 || yy2arr240 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *LocalSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym302 := z.DecBinary() - _ = yym302 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct303 := r.ContainerType() - if yyct303 == codecSelferValueTypeMap1234 { - yyl303 := r.ReadMapStart() - if yyl303 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl303, d) - } - } else if yyct303 == codecSelferValueTypeArray1234 { - yyl303 := r.ReadArrayStart() - if yyl303 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl303, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys304Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys304Slc - var yyhl304 bool = l >= 0 - for yyj304 := 0; ; yyj304++ { - if yyhl304 { - if yyj304 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys304Slc = r.DecodeBytes(yys304Slc, true, true) - yys304 := string(yys304Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys304 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - case "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 = pkg3_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 = pkg1_unversioned.Time{} - } else { - yyv314 := &x.CreationTimestamp - yym315 := z.DecBinary() - _ = yym315 - if false { - } else if z.HasExtensions() && z.DecExt(yyv314) { - } else if yym315 { - z.DecBinaryUnmarshal(yyv314) - } else if !yym315 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv314) - } else { - z.DecFallback(yyv314, false) - } - } - case "deletionTimestamp": - if x.ObjectMeta.DeletionTimestamp == nil { - x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time) - } - if r.TryDecodeAsNil() { - if x.DeletionTimestamp != nil { - x.DeletionTimestamp = nil - } - } else { - if x.DeletionTimestamp == nil { - x.DeletionTimestamp = new(pkg1_unversioned.Time) - } - yym317 := z.DecBinary() - _ = yym317 - if false { - } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) { - } else if yym317 { - z.DecBinaryUnmarshal(x.DeletionTimestamp) - } else if !yym317 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.DeletionTimestamp) - } else { - z.DecFallback(x.DeletionTimestamp, false) - } - } - case "deletionGracePeriodSeconds": - if x.ObjectMeta.DeletionGracePeriodSeconds == nil { - x.ObjectMeta.DeletionGracePeriodSeconds = new(int64) - } - if r.TryDecodeAsNil() { - if x.DeletionGracePeriodSeconds != nil { - x.DeletionGracePeriodSeconds = nil - } - } else { - if x.DeletionGracePeriodSeconds == nil { - x.DeletionGracePeriodSeconds = new(int64) - } - yym319 := z.DecBinary() - _ = yym319 - if false { - } else { - *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64)) - } - } - case "labels": - if r.TryDecodeAsNil() { - x.Labels = nil - } else { - yyv320 := &x.Labels - yym321 := z.DecBinary() - _ = yym321 - if false { - } else { - z.F.DecMapStringStringX(yyv320, false, d) - } - } - case "annotations": - if r.TryDecodeAsNil() { - x.Annotations = nil - } else { - yyv322 := &x.Annotations - yym323 := z.DecBinary() - _ = yym323 - if false { - } else { - z.F.DecMapStringStringX(yyv322, false, d) - } - } - case "ownerReferences": - if r.TryDecodeAsNil() { - x.OwnerReferences = nil - } else { - yyv324 := &x.OwnerReferences - yym325 := z.DecBinary() - _ = yym325 - if false { - } else { - h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv324), d) - } - } - case "finalizers": - if r.TryDecodeAsNil() { - x.Finalizers = nil - } else { - yyv326 := &x.Finalizers - yym327 := z.DecBinary() - _ = yym327 - if false { - } else { - z.F.DecSliceStringX(yyv326, false, d) - } - } - case "clusterName": - if r.TryDecodeAsNil() { - x.ClusterName = "" - } else { - x.ClusterName = string(r.DecodeString()) - } - case "Spec": - if r.TryDecodeAsNil() { - x.Spec = SubjectAccessReviewSpec{} - } else { - yyv329 := &x.Spec - yyv329.CodecDecodeSelf(d) - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = SubjectAccessReviewStatus{} - } else { - yyv330 := &x.Status - yyv330.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys304) - } // end switch yys304 - } // end for yyj304 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj331 int - var yyb331 bool - var yyhl331 bool = l >= 0 - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.GenerateName = "" - } else { - x.GenerateName = string(r.DecodeString()) - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = string(r.DecodeString()) - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.SelfLink = "" - } else { - x.SelfLink = string(r.DecodeString()) - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.UID = "" - } else { - x.UID = pkg3_types.UID(r.DecodeString()) - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ResourceVersion = "" - } else { - x.ResourceVersion = string(r.DecodeString()) - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Generation = 0 - } else { - x.Generation = int64(r.DecodeInt(64)) - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CreationTimestamp = pkg1_unversioned.Time{} - } else { - yyv341 := &x.CreationTimestamp - yym342 := z.DecBinary() - _ = yym342 - if false { - } else if z.HasExtensions() && z.DecExt(yyv341) { - } else if yym342 { - z.DecBinaryUnmarshal(yyv341) - } else if !yym342 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv341) - } else { - z.DecFallback(yyv341, false) - } - } - if x.ObjectMeta.DeletionTimestamp == nil { - x.ObjectMeta.DeletionTimestamp = new(pkg1_unversioned.Time) - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - 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(pkg1_unversioned.Time) - } - yym344 := z.DecBinary() - _ = yym344 - if false { - } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) { - } else if yym344 { - z.DecBinaryUnmarshal(x.DeletionTimestamp) - } else if !yym344 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.DeletionTimestamp) - } else { - z.DecFallback(x.DeletionTimestamp, false) - } - } - if x.ObjectMeta.DeletionGracePeriodSeconds == nil { - x.ObjectMeta.DeletionGracePeriodSeconds = new(int64) - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - 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) - } - yym346 := z.DecBinary() - _ = yym346 - if false { - } else { - *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64)) - } - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Labels = nil - } else { - yyv347 := &x.Labels - yym348 := z.DecBinary() - _ = yym348 - if false { - } else { - z.F.DecMapStringStringX(yyv347, false, d) - } - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Annotations = nil - } else { - yyv349 := &x.Annotations - yym350 := z.DecBinary() - _ = yym350 - if false { - } else { - z.F.DecMapStringStringX(yyv349, false, d) - } - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.OwnerReferences = nil - } else { - yyv351 := &x.OwnerReferences - yym352 := z.DecBinary() - _ = yym352 - if false { - } else { - h.decSliceapi_OwnerReference((*[]pkg2_api.OwnerReference)(yyv351), d) - } - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Finalizers = nil - } else { - yyv353 := &x.Finalizers - yym354 := z.DecBinary() - _ = yym354 - if false { - } else { - z.F.DecSliceStringX(yyv353, false, d) - } - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ClusterName = "" - } else { - x.ClusterName = string(r.DecodeString()) - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = SubjectAccessReviewSpec{} - } else { - yyv356 := &x.Spec - yyv356.CodecDecodeSelf(d) - } - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = SubjectAccessReviewStatus{} - } else { - yyv357 := &x.Status - yyv357.CodecDecodeSelf(d) - } - for { - yyj331++ - if yyhl331 { - yyb331 = yyj331 > l - } else { - yyb331 = r.CheckBreak() - } - if yyb331 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj331-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym358 := z.EncBinary() - _ = yym358 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep359 := !z.EncBinary() - yy2arr359 := z.EncBasicHandle().StructToArray - var yyq359 [7]bool - _, _, _ = yysep359, yyq359, yy2arr359 - const yyr359 bool = false - var yynn359 int - if yyr359 || yy2arr359 { - r.EncodeArrayStart(7) - } else { - yynn359 = 7 - for _, b := range yyq359 { - if b { - yynn359++ - } - } - r.EncodeMapStart(yynn359) - yynn359 = 0 - } - if yyr359 || yy2arr359 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym361 := z.EncBinary() - _ = yym361 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Namespace")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym362 := z.EncBinary() - _ = yym362 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) - } - } - if yyr359 || yy2arr359 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym364 := z.EncBinary() - _ = yym364 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Verb)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Verb")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym365 := z.EncBinary() - _ = yym365 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Verb)) - } - } - if yyr359 || yy2arr359 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym367 := z.EncBinary() - _ = yym367 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Group)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Group")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym368 := z.EncBinary() - _ = yym368 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Group)) - } - } - if yyr359 || yy2arr359 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym370 := z.EncBinary() - _ = yym370 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Version)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Version")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym371 := z.EncBinary() - _ = yym371 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Version)) - } - } - if yyr359 || yy2arr359 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym373 := z.EncBinary() - _ = yym373 - 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) - yym374 := z.EncBinary() - _ = yym374 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Resource)) - } - } - if yyr359 || yy2arr359 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym376 := z.EncBinary() - _ = yym376 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Subresource)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Subresource")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym377 := z.EncBinary() - _ = yym377 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Subresource)) - } - } - if yyr359 || yy2arr359 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym379 := z.EncBinary() - _ = yym379 - 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) - yym380 := z.EncBinary() - _ = yym380 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } - if yyr359 || yy2arr359 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym381 := z.DecBinary() - _ = yym381 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct382 := r.ContainerType() - if yyct382 == codecSelferValueTypeMap1234 { - yyl382 := r.ReadMapStart() - if yyl382 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl382, d) - } - } else if yyct382 == codecSelferValueTypeArray1234 { - yyl382 := r.ReadArrayStart() - if yyl382 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl382, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys383Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys383Slc - var yyhl383 bool = l >= 0 - for yyj383 := 0; ; yyj383++ { - if yyhl383 { - if yyj383 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys383Slc = r.DecodeBytes(yys383Slc, true, true) - yys383 := string(yys383Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys383 { - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = string(r.DecodeString()) - } - case "Verb": - if r.TryDecodeAsNil() { - x.Verb = "" - } else { - x.Verb = string(r.DecodeString()) - } - case "Group": - if r.TryDecodeAsNil() { - x.Group = "" - } else { - x.Group = string(r.DecodeString()) - } - case "Version": - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = string(r.DecodeString()) - } - case "Resource": - if r.TryDecodeAsNil() { - x.Resource = "" - } else { - x.Resource = string(r.DecodeString()) - } - case "Subresource": - if r.TryDecodeAsNil() { - x.Subresource = "" - } else { - x.Subresource = string(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys383) - } // end switch yys383 - } // end for yyj383 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj391 int - var yyb391 bool - var yyhl391 bool = l >= 0 - yyj391++ - if yyhl391 { - yyb391 = yyj391 > l - } else { - yyb391 = r.CheckBreak() - } - if yyb391 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = string(r.DecodeString()) - } - yyj391++ - if yyhl391 { - yyb391 = yyj391 > l - } else { - yyb391 = r.CheckBreak() - } - if yyb391 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Verb = "" - } else { - x.Verb = string(r.DecodeString()) - } - yyj391++ - if yyhl391 { - yyb391 = yyj391 > l - } else { - yyb391 = r.CheckBreak() - } - if yyb391 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Group = "" - } else { - x.Group = string(r.DecodeString()) - } - yyj391++ - if yyhl391 { - yyb391 = yyj391 > l - } else { - yyb391 = r.CheckBreak() - } - if yyb391 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = string(r.DecodeString()) - } - yyj391++ - if yyhl391 { - yyb391 = yyj391 > l - } else { - yyb391 = r.CheckBreak() - } - if yyb391 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Resource = "" - } else { - x.Resource = string(r.DecodeString()) - } - yyj391++ - if yyhl391 { - yyb391 = yyj391 > l - } else { - yyb391 = r.CheckBreak() - } - if yyb391 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Subresource = "" - } else { - x.Subresource = string(r.DecodeString()) - } - yyj391++ - if yyhl391 { - yyb391 = yyj391 > l - } else { - yyb391 = r.CheckBreak() - } - if yyb391 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - for { - yyj391++ - if yyhl391 { - yyb391 = yyj391 > l - } else { - yyb391 = r.CheckBreak() - } - if yyb391 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj391-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *NonResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym399 := z.EncBinary() - _ = yym399 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep400 := !z.EncBinary() - yy2arr400 := z.EncBasicHandle().StructToArray - var yyq400 [2]bool - _, _, _ = yysep400, yyq400, yy2arr400 - const yyr400 bool = false - var yynn400 int - if yyr400 || yy2arr400 { - r.EncodeArrayStart(2) - } else { - yynn400 = 2 - for _, b := range yyq400 { - if b { - yynn400++ - } - } - r.EncodeMapStart(yynn400) - yynn400 = 0 - } - if yyr400 || yy2arr400 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym402 := z.EncBinary() - _ = yym402 - 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) - yym403 := z.EncBinary() - _ = yym403 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) - } - } - if yyr400 || yy2arr400 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym405 := z.EncBinary() - _ = yym405 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Verb)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Verb")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym406 := z.EncBinary() - _ = yym406 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Verb)) - } - } - if yyr400 || yy2arr400 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *NonResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym407 := z.DecBinary() - _ = yym407 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct408 := r.ContainerType() - if yyct408 == codecSelferValueTypeMap1234 { - yyl408 := r.ReadMapStart() - if yyl408 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl408, d) - } - } else if yyct408 == codecSelferValueTypeArray1234 { - yyl408 := r.ReadArrayStart() - if yyl408 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl408, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *NonResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys409Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys409Slc - var yyhl409 bool = l >= 0 - for yyj409 := 0; ; yyj409++ { - if yyhl409 { - if yyj409 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys409Slc = r.DecodeBytes(yys409Slc, true, true) - yys409 := string(yys409Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys409 { - case "Path": - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = string(r.DecodeString()) - } - case "Verb": - if r.TryDecodeAsNil() { - x.Verb = "" - } else { - x.Verb = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys409) - } // end switch yys409 - } // end for yyj409 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *NonResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj412 int - var yyb412 bool - var yyhl412 bool = l >= 0 - yyj412++ - if yyhl412 { - yyb412 = yyj412 > l - } else { - yyb412 = r.CheckBreak() - } - if yyb412 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = string(r.DecodeString()) - } - yyj412++ - if yyhl412 { - yyb412 = yyj412 > l - } else { - yyb412 = r.CheckBreak() - } - if yyb412 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Verb = "" - } else { - x.Verb = string(r.DecodeString()) - } - for { - yyj412++ - if yyhl412 { - yyb412 = yyj412 > l - } else { - yyb412 = r.CheckBreak() - } - if yyb412 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj412-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym415 := z.EncBinary() - _ = yym415 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep416 := !z.EncBinary() - yy2arr416 := z.EncBasicHandle().StructToArray - var yyq416 [5]bool - _, _, _ = yysep416, yyq416, yy2arr416 - const yyr416 bool = false - var yynn416 int - if yyr416 || yy2arr416 { - r.EncodeArrayStart(5) - } else { - yynn416 = 5 - for _, b := range yyq416 { - if b { - yynn416++ - } - } - r.EncodeMapStart(yynn416) - yynn416 = 0 - } - if yyr416 || yy2arr416 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.ResourceAttributes == nil { - r.EncodeNil() - } else { - x.ResourceAttributes.CodecEncodeSelf(e) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("ResourceAttributes")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ResourceAttributes == nil { - r.EncodeNil() - } else { - x.ResourceAttributes.CodecEncodeSelf(e) - } - } - if yyr416 || yy2arr416 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.NonResourceAttributes == nil { - r.EncodeNil() - } else { - x.NonResourceAttributes.CodecEncodeSelf(e) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("NonResourceAttributes")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.NonResourceAttributes == nil { - r.EncodeNil() - } else { - x.NonResourceAttributes.CodecEncodeSelf(e) - } - } - if yyr416 || yy2arr416 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym420 := z.EncBinary() - _ = yym420 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.User)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("User")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym421 := z.EncBinary() - _ = yym421 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.User)) - } - } - if yyr416 || yy2arr416 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Groups == nil { - r.EncodeNil() - } else { - yym423 := z.EncBinary() - _ = yym423 - if false { - } else { - z.F.EncSliceStringV(x.Groups, false, e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Groups")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Groups == nil { - r.EncodeNil() - } else { - yym424 := z.EncBinary() - _ = yym424 - if false { - } else { - z.F.EncSliceStringV(x.Groups, false, e) - } - } - } - if yyr416 || yy2arr416 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Extra == nil { - r.EncodeNil() - } else { - yym426 := z.EncBinary() - _ = yym426 - if false { - } else { - h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Extra")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Extra == nil { - r.EncodeNil() - } else { - yym427 := z.EncBinary() - _ = yym427 - if false { - } else { - h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e) - } - } - } - if yyr416 || yy2arr416 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *SubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym428 := z.DecBinary() - _ = yym428 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct429 := r.ContainerType() - if yyct429 == codecSelferValueTypeMap1234 { - yyl429 := r.ReadMapStart() - if yyl429 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl429, d) - } - } else if yyct429 == codecSelferValueTypeArray1234 { - yyl429 := r.ReadArrayStart() - if yyl429 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl429, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *SubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys430Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys430Slc - var yyhl430 bool = l >= 0 - for yyj430 := 0; ; yyj430++ { - if yyhl430 { - if yyj430 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys430Slc = r.DecodeBytes(yys430Slc, true, true) - yys430 := string(yys430Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys430 { - case "ResourceAttributes": - if r.TryDecodeAsNil() { - if x.ResourceAttributes != nil { - x.ResourceAttributes = nil - } - } else { - if x.ResourceAttributes == nil { - x.ResourceAttributes = new(ResourceAttributes) - } - x.ResourceAttributes.CodecDecodeSelf(d) - } - case "NonResourceAttributes": - if r.TryDecodeAsNil() { - if x.NonResourceAttributes != nil { - x.NonResourceAttributes = nil - } - } else { - if x.NonResourceAttributes == nil { - x.NonResourceAttributes = new(NonResourceAttributes) - } - x.NonResourceAttributes.CodecDecodeSelf(d) - } - case "User": - if r.TryDecodeAsNil() { - x.User = "" - } else { - x.User = string(r.DecodeString()) - } - case "Groups": - if r.TryDecodeAsNil() { - x.Groups = nil - } else { - yyv434 := &x.Groups - yym435 := z.DecBinary() - _ = yym435 - if false { - } else { - z.F.DecSliceStringX(yyv434, false, d) - } - } - case "Extra": - if r.TryDecodeAsNil() { - x.Extra = nil - } else { - yyv436 := &x.Extra - yym437 := z.DecBinary() - _ = yym437 - if false { - } else { - h.decMapstringExtraValue((*map[string]ExtraValue)(yyv436), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys430) - } // end switch yys430 - } // end for yyj430 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *SubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj438 int - var yyb438 bool - var yyhl438 bool = l >= 0 - yyj438++ - if yyhl438 { - yyb438 = yyj438 > l - } else { - yyb438 = r.CheckBreak() - } - if yyb438 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.ResourceAttributes != nil { - x.ResourceAttributes = nil - } - } else { - if x.ResourceAttributes == nil { - x.ResourceAttributes = new(ResourceAttributes) - } - x.ResourceAttributes.CodecDecodeSelf(d) - } - yyj438++ - if yyhl438 { - yyb438 = yyj438 > l - } else { - yyb438 = r.CheckBreak() - } - if yyb438 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.NonResourceAttributes != nil { - x.NonResourceAttributes = nil - } - } else { - if x.NonResourceAttributes == nil { - x.NonResourceAttributes = new(NonResourceAttributes) - } - x.NonResourceAttributes.CodecDecodeSelf(d) - } - yyj438++ - if yyhl438 { - yyb438 = yyj438 > l - } else { - yyb438 = r.CheckBreak() - } - if yyb438 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.User = "" - } else { - x.User = string(r.DecodeString()) - } - yyj438++ - if yyhl438 { - yyb438 = yyj438 > l - } else { - yyb438 = r.CheckBreak() - } - if yyb438 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Groups = nil - } else { - yyv442 := &x.Groups - yym443 := z.DecBinary() - _ = yym443 - if false { - } else { - z.F.DecSliceStringX(yyv442, false, d) - } - } - yyj438++ - if yyhl438 { - yyb438 = yyj438 > l - } else { - yyb438 = r.CheckBreak() - } - if yyb438 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Extra = nil - } else { - yyv444 := &x.Extra - yym445 := z.DecBinary() - _ = yym445 - if false { - } else { - h.decMapstringExtraValue((*map[string]ExtraValue)(yyv444), d) - } - } - for { - yyj438++ - if yyhl438 { - yyb438 = yyj438 > l - } else { - yyb438 = r.CheckBreak() - } - if yyb438 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj438-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym446 := z.EncBinary() - _ = yym446 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - h.encExtraValue((ExtraValue)(x), e) - } - } -} - -func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym447 := z.DecBinary() - _ = yym447 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - h.decExtraValue((*ExtraValue)(x), d) - } -} - -func (x *SelfSubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym448 := z.EncBinary() - _ = yym448 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep449 := !z.EncBinary() - yy2arr449 := z.EncBasicHandle().StructToArray - var yyq449 [2]bool - _, _, _ = yysep449, yyq449, yy2arr449 - const yyr449 bool = false - var yynn449 int - if yyr449 || yy2arr449 { - r.EncodeArrayStart(2) - } else { - yynn449 = 2 - for _, b := range yyq449 { - if b { - yynn449++ - } - } - r.EncodeMapStart(yynn449) - yynn449 = 0 - } - if yyr449 || yy2arr449 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.ResourceAttributes == nil { - r.EncodeNil() - } else { - x.ResourceAttributes.CodecEncodeSelf(e) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("ResourceAttributes")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ResourceAttributes == nil { - r.EncodeNil() - } else { - x.ResourceAttributes.CodecEncodeSelf(e) - } - } - if yyr449 || yy2arr449 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.NonResourceAttributes == nil { - r.EncodeNil() - } else { - x.NonResourceAttributes.CodecEncodeSelf(e) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("NonResourceAttributes")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.NonResourceAttributes == nil { - r.EncodeNil() - } else { - x.NonResourceAttributes.CodecEncodeSelf(e) - } - } - if yyr449 || yy2arr449 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *SelfSubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym452 := z.DecBinary() - _ = yym452 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct453 := r.ContainerType() - if yyct453 == codecSelferValueTypeMap1234 { - yyl453 := r.ReadMapStart() - if yyl453 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl453, d) - } - } else if yyct453 == codecSelferValueTypeArray1234 { - yyl453 := r.ReadArrayStart() - if yyl453 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl453, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys454Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys454Slc - var yyhl454 bool = l >= 0 - for yyj454 := 0; ; yyj454++ { - if yyhl454 { - if yyj454 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys454Slc = r.DecodeBytes(yys454Slc, true, true) - yys454 := string(yys454Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys454 { - case "ResourceAttributes": - if r.TryDecodeAsNil() { - if x.ResourceAttributes != nil { - x.ResourceAttributes = nil - } - } else { - if x.ResourceAttributes == nil { - x.ResourceAttributes = new(ResourceAttributes) - } - x.ResourceAttributes.CodecDecodeSelf(d) - } - case "NonResourceAttributes": - if r.TryDecodeAsNil() { - if x.NonResourceAttributes != nil { - x.NonResourceAttributes = nil - } - } else { - if x.NonResourceAttributes == nil { - x.NonResourceAttributes = new(NonResourceAttributes) - } - x.NonResourceAttributes.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys454) - } // end switch yys454 - } // end for yyj454 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj457 int - var yyb457 bool - var yyhl457 bool = l >= 0 - yyj457++ - if yyhl457 { - yyb457 = yyj457 > l - } else { - yyb457 = r.CheckBreak() - } - if yyb457 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.ResourceAttributes != nil { - x.ResourceAttributes = nil - } - } else { - if x.ResourceAttributes == nil { - x.ResourceAttributes = new(ResourceAttributes) - } - x.ResourceAttributes.CodecDecodeSelf(d) - } - yyj457++ - if yyhl457 { - yyb457 = yyj457 > l - } else { - yyb457 = r.CheckBreak() - } - if yyb457 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.NonResourceAttributes != nil { - x.NonResourceAttributes = nil - } - } else { - if x.NonResourceAttributes == nil { - x.NonResourceAttributes = new(NonResourceAttributes) - } - x.NonResourceAttributes.CodecDecodeSelf(d) - } - for { - yyj457++ - if yyhl457 { - yyb457 = yyj457 > l - } else { - yyb457 = r.CheckBreak() - } - if yyb457 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj457-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *SubjectAccessReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym460 := z.EncBinary() - _ = yym460 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep461 := !z.EncBinary() - yy2arr461 := z.EncBasicHandle().StructToArray - var yyq461 [3]bool - _, _, _ = yysep461, yyq461, yy2arr461 - const yyr461 bool = false - var yynn461 int - if yyr461 || yy2arr461 { - r.EncodeArrayStart(3) - } else { - yynn461 = 3 - for _, b := range yyq461 { - if b { - yynn461++ - } - } - r.EncodeMapStart(yynn461) - yynn461 = 0 - } - if yyr461 || yy2arr461 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym463 := z.EncBinary() - _ = yym463 - if false { - } else { - r.EncodeBool(bool(x.Allowed)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Allowed")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym464 := z.EncBinary() - _ = yym464 - if false { - } else { - r.EncodeBool(bool(x.Allowed)) - } - } - if yyr461 || yy2arr461 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym466 := z.EncBinary() - _ = yym466 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Reason")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym467 := z.EncBinary() - _ = yym467 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } - if yyr461 || yy2arr461 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym469 := z.EncBinary() - _ = yym469 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("EvaluationError")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym470 := z.EncBinary() - _ = yym470 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError)) - } - } - if yyr461 || yy2arr461 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *SubjectAccessReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym471 := z.DecBinary() - _ = yym471 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct472 := r.ContainerType() - if yyct472 == codecSelferValueTypeMap1234 { - yyl472 := r.ReadMapStart() - if yyl472 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl472, d) - } - } else if yyct472 == codecSelferValueTypeArray1234 { - yyl472 := r.ReadArrayStart() - if yyl472 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl472, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *SubjectAccessReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys473Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys473Slc - var yyhl473 bool = l >= 0 - for yyj473 := 0; ; yyj473++ { - if yyhl473 { - if yyj473 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys473Slc = r.DecodeBytes(yys473Slc, true, true) - yys473 := string(yys473Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys473 { - case "Allowed": - if r.TryDecodeAsNil() { - x.Allowed = false - } else { - x.Allowed = bool(r.DecodeBool()) - } - case "Reason": - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - case "EvaluationError": - if r.TryDecodeAsNil() { - x.EvaluationError = "" - } else { - x.EvaluationError = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys473) - } // end switch yys473 - } // end for yyj473 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *SubjectAccessReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj477 int - var yyb477 bool - var yyhl477 bool = l >= 0 - yyj477++ - if yyhl477 { - yyb477 = yyj477 > l - } else { - yyb477 = r.CheckBreak() - } - if yyb477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Allowed = false - } else { - x.Allowed = bool(r.DecodeBool()) - } - yyj477++ - if yyhl477 { - yyb477 = yyj477 > l - } else { - yyb477 = r.CheckBreak() - } - if yyb477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - yyj477++ - if yyhl477 { - yyb477 = yyj477 > l - } else { - yyb477 = r.CheckBreak() - } - if yyb477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.EvaluationError = "" - } else { - x.EvaluationError = string(r.DecodeString()) - } - for { - yyj477++ - if yyhl477 { - yyb477 = yyj477 > l - } else { - yyb477 = r.CheckBreak() - } - if yyb477 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj477-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) encSliceapi_OwnerReference(v []pkg2_api.OwnerReference, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv481 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy482 := &yyv481 - yy482.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceapi_OwnerReference(v *[]pkg2_api.OwnerReference, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv483 := *v - yyh483, yyl483 := z.DecSliceHelperStart() - var yyc483 bool - if yyl483 == 0 { - if yyv483 == nil { - yyv483 = []pkg2_api.OwnerReference{} - yyc483 = true - } else if len(yyv483) != 0 { - yyv483 = yyv483[:0] - yyc483 = true - } - } else if yyl483 > 0 { - var yyrr483, yyrl483 int - var yyrt483 bool - if yyl483 > cap(yyv483) { - - yyrg483 := len(yyv483) > 0 - yyv2483 := yyv483 - yyrl483, yyrt483 = z.DecInferLen(yyl483, z.DecBasicHandle().MaxInitLen, 72) - if yyrt483 { - if yyrl483 <= cap(yyv483) { - yyv483 = yyv483[:yyrl483] - } else { - yyv483 = make([]pkg2_api.OwnerReference, yyrl483) - } - } else { - yyv483 = make([]pkg2_api.OwnerReference, yyrl483) - } - yyc483 = true - yyrr483 = len(yyv483) - if yyrg483 { - copy(yyv483, yyv2483) - } - } else if yyl483 != len(yyv483) { - yyv483 = yyv483[:yyl483] - yyc483 = true - } - yyj483 := 0 - for ; yyj483 < yyrr483; yyj483++ { - yyh483.ElemContainerState(yyj483) - if r.TryDecodeAsNil() { - yyv483[yyj483] = pkg2_api.OwnerReference{} - } else { - yyv484 := &yyv483[yyj483] - yyv484.CodecDecodeSelf(d) - } - - } - if yyrt483 { - for ; yyj483 < yyl483; yyj483++ { - yyv483 = append(yyv483, pkg2_api.OwnerReference{}) - yyh483.ElemContainerState(yyj483) - if r.TryDecodeAsNil() { - yyv483[yyj483] = pkg2_api.OwnerReference{} - } else { - yyv485 := &yyv483[yyj483] - yyv485.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj483 := 0 - for ; !r.CheckBreak(); yyj483++ { - - if yyj483 >= len(yyv483) { - yyv483 = append(yyv483, pkg2_api.OwnerReference{}) // var yyz483 pkg2_api.OwnerReference - yyc483 = true - } - yyh483.ElemContainerState(yyj483) - if yyj483 < len(yyv483) { - if r.TryDecodeAsNil() { - yyv483[yyj483] = pkg2_api.OwnerReference{} - } else { - yyv486 := &yyv483[yyj483] - yyv486.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj483 < len(yyv483) { - yyv483 = yyv483[:yyj483] - yyc483 = true - } else if yyj483 == 0 && yyv483 == nil { - yyv483 = []pkg2_api.OwnerReference{} - yyc483 = true - } - } - yyh483.End() - if yyc483 { - *v = yyv483 - } -} - -func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeMapStart(len(v)) - for yyk487, yyv487 := range v { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - yym488 := z.EncBinary() - _ = yym488 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(yyk487)) - } - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyv487 == nil { - r.EncodeNil() - } else { - yyv487.CodecEncodeSelf(e) - } - } - z.EncSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv489 := *v - yyl489 := r.ReadMapStart() - yybh489 := z.DecBasicHandle() - if yyv489 == nil { - yyrl489, _ := z.DecInferLen(yyl489, yybh489.MaxInitLen, 40) - yyv489 = make(map[string]ExtraValue, yyrl489) - *v = yyv489 - } - var yymk489 string - var yymv489 ExtraValue - var yymg489 bool - if yybh489.MapValueReset { - yymg489 = true - } - if yyl489 > 0 { - for yyj489 := 0; yyj489 < yyl489; yyj489++ { - z.DecSendContainerState(codecSelfer_containerMapKey1234) - if r.TryDecodeAsNil() { - yymk489 = "" - } else { - yymk489 = string(r.DecodeString()) - } - - if yymg489 { - yymv489 = yyv489[yymk489] - } else { - yymv489 = nil - } - z.DecSendContainerState(codecSelfer_containerMapValue1234) - if r.TryDecodeAsNil() { - yymv489 = nil - } else { - yyv491 := &yymv489 - yyv491.CodecDecodeSelf(d) - } - - if yyv489 != nil { - yyv489[yymk489] = yymv489 - } - } - } else if yyl489 < 0 { - for yyj489 := 0; !r.CheckBreak(); yyj489++ { - z.DecSendContainerState(codecSelfer_containerMapKey1234) - if r.TryDecodeAsNil() { - yymk489 = "" - } else { - yymk489 = string(r.DecodeString()) - } - - if yymg489 { - yymv489 = yyv489[yymk489] - } else { - yymv489 = nil - } - z.DecSendContainerState(codecSelfer_containerMapValue1234) - if r.TryDecodeAsNil() { - yymv489 = nil - } else { - yyv493 := &yymv489 - yyv493.CodecDecodeSelf(d) - } - - if yyv489 != nil { - yyv489[yymk489] = yymv489 - } - } - } // else len==0: TODO: Should we clear map entries? - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv494 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym495 := z.EncBinary() - _ = yym495 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(yyv494)) - } - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv496 := *v - yyh496, yyl496 := z.DecSliceHelperStart() - var yyc496 bool - if yyl496 == 0 { - if yyv496 == nil { - yyv496 = []string{} - yyc496 = true - } else if len(yyv496) != 0 { - yyv496 = yyv496[:0] - yyc496 = true - } - } else if yyl496 > 0 { - var yyrr496, yyrl496 int - var yyrt496 bool - if yyl496 > cap(yyv496) { - - yyrl496, yyrt496 = z.DecInferLen(yyl496, z.DecBasicHandle().MaxInitLen, 16) - if yyrt496 { - if yyrl496 <= cap(yyv496) { - yyv496 = yyv496[:yyrl496] - } else { - yyv496 = make([]string, yyrl496) - } - } else { - yyv496 = make([]string, yyrl496) - } - yyc496 = true - yyrr496 = len(yyv496) - } else if yyl496 != len(yyv496) { - yyv496 = yyv496[:yyl496] - yyc496 = true - } - yyj496 := 0 - for ; yyj496 < yyrr496; yyj496++ { - yyh496.ElemContainerState(yyj496) - if r.TryDecodeAsNil() { - yyv496[yyj496] = "" - } else { - yyv496[yyj496] = string(r.DecodeString()) - } - - } - if yyrt496 { - for ; yyj496 < yyl496; yyj496++ { - yyv496 = append(yyv496, "") - yyh496.ElemContainerState(yyj496) - if r.TryDecodeAsNil() { - yyv496[yyj496] = "" - } else { - yyv496[yyj496] = string(r.DecodeString()) - } - - } - } - - } else { - yyj496 := 0 - for ; !r.CheckBreak(); yyj496++ { - - if yyj496 >= len(yyv496) { - yyv496 = append(yyv496, "") // var yyz496 string - yyc496 = true - } - yyh496.ElemContainerState(yyj496) - if yyj496 < len(yyv496) { - if r.TryDecodeAsNil() { - yyv496[yyj496] = "" - } else { - yyv496[yyj496] = string(r.DecodeString()) - } - - } else { - z.DecSwallow() - } - - } - if yyj496 < len(yyv496) { - yyv496 = yyv496[:yyj496] - yyc496 = true - } else if yyj496 == 0 && yyv496 == nil { - yyv496 = []string{} - yyc496 = true - } - } - yyh496.End() - if yyc496 { - *v = yyv496 - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/doc.go deleted file mode 100644 index 392ee4999..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/doc.go +++ /dev/null @@ -1,22 +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,register -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authorization -// +k8s:openapi-gen=true - -// +groupName=authorization.k8s.io -package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/doc.go deleted file mode 100644 index 7550f9d2b..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/doc.go +++ /dev/null @@ -1,20 +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,register -// +k8s:openapi-gen=true - -package autoscaling diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/types.generated.go deleted file mode 100644 index d9c9c3fa0..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/types.generated.go +++ /dev/null @@ -1,2656 +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 autoscaling - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - pkg2_api "k8s.io/client-go/1.5/pkg/api" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg3_types "k8s.io/client-go/1.5/pkg/types" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg2_api.ObjectMeta - var v1 pkg1_unversioned.TypeMeta - var v2 pkg3_types.UID - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 - } -} - -func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [5]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = x.Kind != "" - yyq2[1] = x.APIVersion != "" - yyq2[2] = true - yyq2[3] = true - yyq2[4] = true - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(5) - } else { - yynn2 = 0 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[1] { - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy11 := &x.ObjectMeta - yy11.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[3] { - yy13 := &x.Spec - yy13.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy14 := &x.Spec - yy14.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { - yy16 := &x.Status - yy16.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy17 := &x.Status - yy17.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Scale) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym18 := z.DecBinary() - _ = yym18 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct19 := r.ContainerType() - if yyct19 == codecSelferValueTypeMap1234 { - yyl19 := r.ReadMapStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl19, d) - } - } else if yyct19 == codecSelferValueTypeArray1234 { - yyl19 := r.ReadArrayStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl19, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys20Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys20Slc - var yyhl20 bool = l >= 0 - for yyj20 := 0; ; yyj20++ { - if yyhl20 { - if yyj20 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys20Slc = r.DecodeBytes(yys20Slc, true, true) - yys20 := string(yys20Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys20 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv23 := &x.ObjectMeta - yyv23.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = ScaleSpec{} - } else { - yyv24 := &x.Spec - yyv24.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = ScaleStatus{} - } else { - yyv25 := &x.Status - yyv25.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys20) - } // end switch yys20 - } // end for yyj20 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj26 int - var yyb26 bool - var yyhl26 bool = l >= 0 - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv29 := &x.ObjectMeta - yyv29.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = ScaleSpec{} - } else { - yyv30 := &x.Spec - yyv30.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = ScaleStatus{} - } else { - yyv31 := &x.Status - yyv31.CodecDecodeSelf(d) - } - for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj26-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ScaleSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym32 := z.EncBinary() - _ = yym32 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep33 := !z.EncBinary() - yy2arr33 := z.EncBasicHandle().StructToArray - var yyq33 [1]bool - _, _, _ = yysep33, yyq33, yy2arr33 - const yyr33 bool = false - yyq33[0] = x.Replicas != 0 - var yynn33 int - if yyr33 || yy2arr33 { - r.EncodeArrayStart(1) - } else { - yynn33 = 0 - for _, b := range yyq33 { - if b { - yynn33++ - } - } - r.EncodeMapStart(yynn33) - yynn33 = 0 - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[0] { - yym35 := z.EncBinary() - _ = yym35 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq33[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym36 := z.EncBinary() - _ = yym36 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScaleSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym37 := z.DecBinary() - _ = yym37 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct38 := r.ContainerType() - if yyct38 == codecSelferValueTypeMap1234 { - yyl38 := r.ReadMapStart() - if yyl38 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl38, d) - } - } else if yyct38 == codecSelferValueTypeArray1234 { - yyl38 := r.ReadArrayStart() - if yyl38 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl38, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScaleSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys39Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys39Slc - var yyhl39 bool = l >= 0 - for yyj39 := 0; ; yyj39++ { - if yyhl39 { - if yyj39 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys39Slc = r.DecodeBytes(yys39Slc, true, true) - yys39 := string(yys39Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys39 { - case "replicas": - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - default: - z.DecStructFieldNotFound(-1, yys39) - } // end switch yys39 - } // end for yyj39 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScaleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj41 int - var yyb41 bool - var yyhl41 bool = l >= 0 - yyj41++ - if yyhl41 { - yyb41 = yyj41 > l - } else { - yyb41 = r.CheckBreak() - } - if yyb41 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - for { - yyj41++ - if yyhl41 { - yyb41 = yyj41 > l - } else { - yyb41 = r.CheckBreak() - } - if yyb41 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj41-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ScaleStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym43 := z.EncBinary() - _ = yym43 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep44 := !z.EncBinary() - yy2arr44 := z.EncBasicHandle().StructToArray - var yyq44 [2]bool - _, _, _ = yysep44, yyq44, yy2arr44 - const yyr44 bool = false - yyq44[1] = x.Selector != "" - var yynn44 int - if yyr44 || yy2arr44 { - r.EncodeArrayStart(2) - } else { - yynn44 = 1 - for _, b := range yyq44 { - if b { - yynn44++ - } - } - r.EncodeMapStart(yynn44) - yynn44 = 0 - } - if yyr44 || yy2arr44 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym46 := z.EncBinary() - _ = yym46 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym47 := z.EncBinary() - _ = yym47 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } - if yyr44 || yy2arr44 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq44[1] { - yym49 := z.EncBinary() - _ = yym49 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Selector)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq44[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym50 := z.EncBinary() - _ = yym50 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Selector)) - } - } - } - if yyr44 || yy2arr44 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScaleStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym51 := z.DecBinary() - _ = yym51 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct52 := r.ContainerType() - if yyct52 == codecSelferValueTypeMap1234 { - yyl52 := r.ReadMapStart() - if yyl52 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl52, d) - } - } else if yyct52 == codecSelferValueTypeArray1234 { - yyl52 := r.ReadArrayStart() - if yyl52 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl52, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScaleStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys53Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys53Slc - var yyhl53 bool = l >= 0 - for yyj53 := 0; ; yyj53++ { - if yyhl53 { - if yyj53 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys53Slc = r.DecodeBytes(yys53Slc, true, true) - yys53 := string(yys53Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys53 { - case "replicas": - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - case "selector": - if r.TryDecodeAsNil() { - x.Selector = "" - } else { - x.Selector = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys53) - } // end switch yys53 - } // end for yyj53 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScaleStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj56 int - var yyb56 bool - var yyhl56 bool = l >= 0 - yyj56++ - if yyhl56 { - yyb56 = yyj56 > l - } else { - yyb56 = r.CheckBreak() - } - if yyb56 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - yyj56++ - if yyhl56 { - yyb56 = yyj56 > l - } else { - yyb56 = r.CheckBreak() - } - if yyb56 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Selector = "" - } else { - x.Selector = string(r.DecodeString()) - } - for { - yyj56++ - if yyhl56 { - yyb56 = yyj56 > l - } else { - yyb56 = r.CheckBreak() - } - if yyb56 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj56-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *CrossVersionObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym59 := z.EncBinary() - _ = yym59 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep60 := !z.EncBinary() - yy2arr60 := z.EncBasicHandle().StructToArray - var yyq60 [3]bool - _, _, _ = yysep60, yyq60, yy2arr60 - const yyr60 bool = false - yyq60[2] = x.APIVersion != "" - var yynn60 int - if yyr60 || yy2arr60 { - r.EncodeArrayStart(3) - } else { - yynn60 = 2 - for _, b := range yyq60 { - if b { - yynn60++ - } - } - r.EncodeMapStart(yynn60) - yynn60 = 0 - } - if yyr60 || yy2arr60 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym62 := z.EncBinary() - _ = yym62 - 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) - yym63 := z.EncBinary() - _ = yym63 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - if yyr60 || yy2arr60 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym65 := z.EncBinary() - _ = yym65 - 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) - yym66 := z.EncBinary() - _ = yym66 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } - if yyr60 || yy2arr60 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq60[2] { - yym68 := z.EncBinary() - _ = yym68 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq60[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym69 := z.EncBinary() - _ = yym69 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr60 || yy2arr60 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CrossVersionObjectReference) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym70 := z.DecBinary() - _ = yym70 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct71 := r.ContainerType() - if yyct71 == codecSelferValueTypeMap1234 { - yyl71 := r.ReadMapStart() - if yyl71 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl71, d) - } - } else if yyct71 == codecSelferValueTypeArray1234 { - yyl71 := r.ReadArrayStart() - if yyl71 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl71, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CrossVersionObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys72Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys72Slc - var yyhl72 bool = l >= 0 - for yyj72 := 0; ; yyj72++ { - if yyhl72 { - if yyj72 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys72Slc = r.DecodeBytes(yys72Slc, true, true) - yys72 := string(yys72Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys72 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys72) - } // end switch yys72 - } // end for yyj72 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CrossVersionObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj76 int - var yyb76 bool - var yyhl76 bool = l >= 0 - yyj76++ - if yyhl76 { - yyb76 = yyj76 > l - } else { - yyb76 = r.CheckBreak() - } - if yyb76 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj76++ - if yyhl76 { - yyb76 = yyj76 > l - } else { - yyb76 = r.CheckBreak() - } - if yyb76 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - yyj76++ - if yyhl76 { - yyb76 = yyj76 > l - } else { - yyb76 = r.CheckBreak() - } - if yyb76 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - for { - yyj76++ - if yyhl76 { - yyb76 = yyj76 > l - } else { - yyb76 = r.CheckBreak() - } - if yyb76 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj76-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *HorizontalPodAutoscalerSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym80 := z.EncBinary() - _ = yym80 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep81 := !z.EncBinary() - yy2arr81 := z.EncBasicHandle().StructToArray - var yyq81 [4]bool - _, _, _ = yysep81, yyq81, yy2arr81 - const yyr81 bool = false - yyq81[1] = x.MinReplicas != nil - yyq81[3] = x.TargetCPUUtilizationPercentage != nil - var yynn81 int - if yyr81 || yy2arr81 { - r.EncodeArrayStart(4) - } else { - yynn81 = 2 - for _, b := range yyq81 { - if b { - yynn81++ - } - } - r.EncodeMapStart(yynn81) - yynn81 = 0 - } - if yyr81 || yy2arr81 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy83 := &x.ScaleTargetRef - yy83.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("scaleTargetRef")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy84 := &x.ScaleTargetRef - yy84.CodecEncodeSelf(e) - } - if yyr81 || yy2arr81 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq81[1] { - if x.MinReplicas == nil { - r.EncodeNil() - } else { - yy86 := *x.MinReplicas - yym87 := z.EncBinary() - _ = yym87 - if false { - } else { - r.EncodeInt(int64(yy86)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq81[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("minReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.MinReplicas == nil { - r.EncodeNil() - } else { - yy88 := *x.MinReplicas - yym89 := z.EncBinary() - _ = yym89 - if false { - } else { - r.EncodeInt(int64(yy88)) - } - } - } - } - if yyr81 || yy2arr81 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym91 := z.EncBinary() - _ = yym91 - if false { - } else { - r.EncodeInt(int64(x.MaxReplicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("maxReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym92 := z.EncBinary() - _ = yym92 - if false { - } else { - r.EncodeInt(int64(x.MaxReplicas)) - } - } - if yyr81 || yy2arr81 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq81[3] { - if x.TargetCPUUtilizationPercentage == nil { - r.EncodeNil() - } else { - yy94 := *x.TargetCPUUtilizationPercentage - yym95 := z.EncBinary() - _ = yym95 - if false { - } else { - r.EncodeInt(int64(yy94)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq81[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("targetCPUUtilizationPercentage")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.TargetCPUUtilizationPercentage == nil { - r.EncodeNil() - } else { - yy96 := *x.TargetCPUUtilizationPercentage - yym97 := z.EncBinary() - _ = yym97 - if false { - } else { - r.EncodeInt(int64(yy96)) - } - } - } - } - if yyr81 || yy2arr81 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HorizontalPodAutoscalerSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym98 := z.DecBinary() - _ = yym98 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct99 := r.ContainerType() - if yyct99 == codecSelferValueTypeMap1234 { - yyl99 := r.ReadMapStart() - if yyl99 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl99, d) - } - } else if yyct99 == codecSelferValueTypeArray1234 { - yyl99 := r.ReadArrayStart() - if yyl99 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl99, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys100Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys100Slc - var yyhl100 bool = l >= 0 - for yyj100 := 0; ; yyj100++ { - if yyhl100 { - if yyj100 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys100Slc = r.DecodeBytes(yys100Slc, true, true) - yys100 := string(yys100Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys100 { - case "scaleTargetRef": - if r.TryDecodeAsNil() { - x.ScaleTargetRef = CrossVersionObjectReference{} - } else { - yyv101 := &x.ScaleTargetRef - yyv101.CodecDecodeSelf(d) - } - case "minReplicas": - if r.TryDecodeAsNil() { - if x.MinReplicas != nil { - x.MinReplicas = nil - } - } else { - if x.MinReplicas == nil { - x.MinReplicas = new(int32) - } - yym103 := z.DecBinary() - _ = yym103 - if false { - } else { - *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32)) - } - } - case "maxReplicas": - if r.TryDecodeAsNil() { - x.MaxReplicas = 0 - } else { - x.MaxReplicas = int32(r.DecodeInt(32)) - } - case "targetCPUUtilizationPercentage": - if r.TryDecodeAsNil() { - if x.TargetCPUUtilizationPercentage != nil { - x.TargetCPUUtilizationPercentage = nil - } - } else { - if x.TargetCPUUtilizationPercentage == nil { - x.TargetCPUUtilizationPercentage = new(int32) - } - yym106 := z.DecBinary() - _ = yym106 - if false { - } else { - *((*int32)(x.TargetCPUUtilizationPercentage)) = int32(r.DecodeInt(32)) - } - } - default: - z.DecStructFieldNotFound(-1, yys100) - } // end switch yys100 - } // end for yyj100 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj107 int - var yyb107 bool - var yyhl107 bool = l >= 0 - yyj107++ - if yyhl107 { - yyb107 = yyj107 > l - } else { - yyb107 = r.CheckBreak() - } - if yyb107 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ScaleTargetRef = CrossVersionObjectReference{} - } else { - yyv108 := &x.ScaleTargetRef - yyv108.CodecDecodeSelf(d) - } - yyj107++ - if yyhl107 { - yyb107 = yyj107 > l - } else { - yyb107 = r.CheckBreak() - } - if yyb107 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.MinReplicas != nil { - x.MinReplicas = nil - } - } else { - if x.MinReplicas == nil { - x.MinReplicas = new(int32) - } - yym110 := z.DecBinary() - _ = yym110 - if false { - } else { - *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32)) - } - } - yyj107++ - if yyhl107 { - yyb107 = yyj107 > l - } else { - yyb107 = r.CheckBreak() - } - if yyb107 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MaxReplicas = 0 - } else { - x.MaxReplicas = int32(r.DecodeInt(32)) - } - yyj107++ - if yyhl107 { - yyb107 = yyj107 > l - } else { - yyb107 = r.CheckBreak() - } - if yyb107 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.TargetCPUUtilizationPercentage != nil { - x.TargetCPUUtilizationPercentage = nil - } - } else { - if x.TargetCPUUtilizationPercentage == nil { - x.TargetCPUUtilizationPercentage = new(int32) - } - yym113 := z.DecBinary() - _ = yym113 - if false { - } else { - *((*int32)(x.TargetCPUUtilizationPercentage)) = int32(r.DecodeInt(32)) - } - } - for { - yyj107++ - if yyhl107 { - yyb107 = yyj107 > l - } else { - yyb107 = r.CheckBreak() - } - if yyb107 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj107-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *HorizontalPodAutoscalerStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym114 := z.EncBinary() - _ = yym114 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep115 := !z.EncBinary() - yy2arr115 := z.EncBasicHandle().StructToArray - var yyq115 [5]bool - _, _, _ = yysep115, yyq115, yy2arr115 - const yyr115 bool = false - yyq115[0] = x.ObservedGeneration != nil - yyq115[1] = x.LastScaleTime != nil - yyq115[4] = x.CurrentCPUUtilizationPercentage != nil - var yynn115 int - if yyr115 || yy2arr115 { - r.EncodeArrayStart(5) - } else { - yynn115 = 2 - for _, b := range yyq115 { - if b { - yynn115++ - } - } - r.EncodeMapStart(yynn115) - yynn115 = 0 - } - if yyr115 || yy2arr115 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq115[0] { - if x.ObservedGeneration == nil { - r.EncodeNil() - } else { - yy117 := *x.ObservedGeneration - yym118 := z.EncBinary() - _ = yym118 - if false { - } else { - r.EncodeInt(int64(yy117)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq115[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ObservedGeneration == nil { - r.EncodeNil() - } else { - yy119 := *x.ObservedGeneration - yym120 := z.EncBinary() - _ = yym120 - if false { - } else { - r.EncodeInt(int64(yy119)) - } - } - } - } - if yyr115 || yy2arr115 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq115[1] { - if x.LastScaleTime == nil { - r.EncodeNil() - } else { - yym122 := z.EncBinary() - _ = yym122 - if false { - } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) { - } else if yym122 { - z.EncBinaryMarshal(x.LastScaleTime) - } else if !yym122 && z.IsJSONHandle() { - z.EncJSONMarshal(x.LastScaleTime) - } else { - z.EncFallback(x.LastScaleTime) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq115[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastScaleTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.LastScaleTime == nil { - r.EncodeNil() - } else { - yym123 := z.EncBinary() - _ = yym123 - if false { - } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) { - } else if yym123 { - z.EncBinaryMarshal(x.LastScaleTime) - } else if !yym123 && z.IsJSONHandle() { - z.EncJSONMarshal(x.LastScaleTime) - } else { - z.EncFallback(x.LastScaleTime) - } - } - } - } - if yyr115 || yy2arr115 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym125 := z.EncBinary() - _ = yym125 - if false { - } else { - r.EncodeInt(int64(x.CurrentReplicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("currentReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym126 := z.EncBinary() - _ = yym126 - if false { - } else { - r.EncodeInt(int64(x.CurrentReplicas)) - } - } - if yyr115 || yy2arr115 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym128 := z.EncBinary() - _ = yym128 - if false { - } else { - r.EncodeInt(int64(x.DesiredReplicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("desiredReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym129 := z.EncBinary() - _ = yym129 - if false { - } else { - r.EncodeInt(int64(x.DesiredReplicas)) - } - } - if yyr115 || yy2arr115 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq115[4] { - if x.CurrentCPUUtilizationPercentage == nil { - r.EncodeNil() - } else { - yy131 := *x.CurrentCPUUtilizationPercentage - yym132 := z.EncBinary() - _ = yym132 - if false { - } else { - r.EncodeInt(int64(yy131)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq115[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("currentCPUUtilizationPercentage")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.CurrentCPUUtilizationPercentage == nil { - r.EncodeNil() - } else { - yy133 := *x.CurrentCPUUtilizationPercentage - yym134 := z.EncBinary() - _ = yym134 - if false { - } else { - r.EncodeInt(int64(yy133)) - } - } - } - } - if yyr115 || yy2arr115 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HorizontalPodAutoscalerStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym135 := z.DecBinary() - _ = yym135 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct136 := r.ContainerType() - if yyct136 == codecSelferValueTypeMap1234 { - yyl136 := r.ReadMapStart() - if yyl136 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl136, d) - } - } else if yyct136 == codecSelferValueTypeArray1234 { - yyl136 := r.ReadArrayStart() - if yyl136 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl136, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys137Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys137Slc - var yyhl137 bool = l >= 0 - for yyj137 := 0; ; yyj137++ { - if yyhl137 { - if yyj137 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys137Slc = r.DecodeBytes(yys137Slc, true, true) - yys137 := string(yys137Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys137 { - case "observedGeneration": - if r.TryDecodeAsNil() { - if x.ObservedGeneration != nil { - x.ObservedGeneration = nil - } - } else { - if x.ObservedGeneration == nil { - x.ObservedGeneration = new(int64) - } - yym139 := z.DecBinary() - _ = yym139 - if false { - } else { - *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) - } - } - case "lastScaleTime": - if r.TryDecodeAsNil() { - if x.LastScaleTime != nil { - x.LastScaleTime = nil - } - } else { - if x.LastScaleTime == nil { - x.LastScaleTime = new(pkg1_unversioned.Time) - } - yym141 := z.DecBinary() - _ = yym141 - if false { - } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) { - } else if yym141 { - z.DecBinaryUnmarshal(x.LastScaleTime) - } else if !yym141 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.LastScaleTime) - } else { - z.DecFallback(x.LastScaleTime, false) - } - } - case "currentReplicas": - if r.TryDecodeAsNil() { - x.CurrentReplicas = 0 - } else { - x.CurrentReplicas = int32(r.DecodeInt(32)) - } - case "desiredReplicas": - if r.TryDecodeAsNil() { - x.DesiredReplicas = 0 - } else { - x.DesiredReplicas = int32(r.DecodeInt(32)) - } - case "currentCPUUtilizationPercentage": - if r.TryDecodeAsNil() { - if x.CurrentCPUUtilizationPercentage != nil { - x.CurrentCPUUtilizationPercentage = nil - } - } else { - if x.CurrentCPUUtilizationPercentage == nil { - x.CurrentCPUUtilizationPercentage = new(int32) - } - yym145 := z.DecBinary() - _ = yym145 - if false { - } else { - *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32)) - } - } - default: - z.DecStructFieldNotFound(-1, yys137) - } // end switch yys137 - } // end for yyj137 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj146 int - var yyb146 bool - var yyhl146 bool = l >= 0 - yyj146++ - if yyhl146 { - yyb146 = yyj146 > l - } else { - yyb146 = r.CheckBreak() - } - if yyb146 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.ObservedGeneration != nil { - x.ObservedGeneration = nil - } - } else { - if x.ObservedGeneration == nil { - x.ObservedGeneration = new(int64) - } - yym148 := z.DecBinary() - _ = yym148 - if false { - } else { - *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) - } - } - yyj146++ - if yyhl146 { - yyb146 = yyj146 > l - } else { - yyb146 = r.CheckBreak() - } - if yyb146 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.LastScaleTime != nil { - x.LastScaleTime = nil - } - } else { - if x.LastScaleTime == nil { - x.LastScaleTime = new(pkg1_unversioned.Time) - } - yym150 := z.DecBinary() - _ = yym150 - if false { - } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) { - } else if yym150 { - z.DecBinaryUnmarshal(x.LastScaleTime) - } else if !yym150 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.LastScaleTime) - } else { - z.DecFallback(x.LastScaleTime, false) - } - } - yyj146++ - if yyhl146 { - yyb146 = yyj146 > l - } else { - yyb146 = r.CheckBreak() - } - if yyb146 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CurrentReplicas = 0 - } else { - x.CurrentReplicas = int32(r.DecodeInt(32)) - } - yyj146++ - if yyhl146 { - yyb146 = yyj146 > l - } else { - yyb146 = r.CheckBreak() - } - if yyb146 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.DesiredReplicas = 0 - } else { - x.DesiredReplicas = int32(r.DecodeInt(32)) - } - yyj146++ - if yyhl146 { - yyb146 = yyj146 > l - } else { - yyb146 = r.CheckBreak() - } - if yyb146 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.CurrentCPUUtilizationPercentage != nil { - x.CurrentCPUUtilizationPercentage = nil - } - } else { - if x.CurrentCPUUtilizationPercentage == nil { - x.CurrentCPUUtilizationPercentage = new(int32) - } - yym154 := z.DecBinary() - _ = yym154 - if false { - } else { - *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32)) - } - } - for { - yyj146++ - if yyhl146 { - yyb146 = yyj146 > l - } else { - yyb146 = r.CheckBreak() - } - if yyb146 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj146-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym155 := z.EncBinary() - _ = yym155 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep156 := !z.EncBinary() - yy2arr156 := z.EncBasicHandle().StructToArray - var yyq156 [5]bool - _, _, _ = yysep156, yyq156, yy2arr156 - const yyr156 bool = false - yyq156[0] = x.Kind != "" - yyq156[1] = x.APIVersion != "" - yyq156[2] = true - yyq156[3] = true - yyq156[4] = true - var yynn156 int - if yyr156 || yy2arr156 { - r.EncodeArrayStart(5) - } else { - yynn156 = 0 - for _, b := range yyq156 { - if b { - yynn156++ - } - } - r.EncodeMapStart(yynn156) - yynn156 = 0 - } - if yyr156 || yy2arr156 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq156[0] { - yym158 := z.EncBinary() - _ = yym158 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq156[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym159 := z.EncBinary() - _ = yym159 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr156 || yy2arr156 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq156[1] { - yym161 := z.EncBinary() - _ = yym161 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq156[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym162 := z.EncBinary() - _ = yym162 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr156 || yy2arr156 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq156[2] { - yy164 := &x.ObjectMeta - yy164.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq156[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy165 := &x.ObjectMeta - yy165.CodecEncodeSelf(e) - } - } - if yyr156 || yy2arr156 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq156[3] { - yy167 := &x.Spec - yy167.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq156[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy168 := &x.Spec - yy168.CodecEncodeSelf(e) - } - } - if yyr156 || yy2arr156 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq156[4] { - yy170 := &x.Status - yy170.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq156[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy171 := &x.Status - yy171.CodecEncodeSelf(e) - } - } - if yyr156 || yy2arr156 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HorizontalPodAutoscaler) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym172 := z.DecBinary() - _ = yym172 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct173 := r.ContainerType() - if yyct173 == codecSelferValueTypeMap1234 { - yyl173 := r.ReadMapStart() - if yyl173 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl173, d) - } - } else if yyct173 == codecSelferValueTypeArray1234 { - yyl173 := r.ReadArrayStart() - if yyl173 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl173, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys174Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys174Slc - var yyhl174 bool = l >= 0 - for yyj174 := 0; ; yyj174++ { - if yyhl174 { - if yyj174 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys174Slc = r.DecodeBytes(yys174Slc, true, true) - yys174 := string(yys174Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys174 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv177 := &x.ObjectMeta - yyv177.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = HorizontalPodAutoscalerSpec{} - } else { - yyv178 := &x.Spec - yyv178.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = HorizontalPodAutoscalerStatus{} - } else { - yyv179 := &x.Status - yyv179.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys174) - } // end switch yys174 - } // end for yyj174 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj180 int - var yyb180 bool - var yyhl180 bool = l >= 0 - yyj180++ - if yyhl180 { - yyb180 = yyj180 > l - } else { - yyb180 = r.CheckBreak() - } - if yyb180 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj180++ - if yyhl180 { - yyb180 = yyj180 > l - } else { - yyb180 = r.CheckBreak() - } - if yyb180 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj180++ - if yyhl180 { - yyb180 = yyj180 > l - } else { - yyb180 = r.CheckBreak() - } - if yyb180 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv183 := &x.ObjectMeta - yyv183.CodecDecodeSelf(d) - } - yyj180++ - if yyhl180 { - yyb180 = yyj180 > l - } else { - yyb180 = r.CheckBreak() - } - if yyb180 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = HorizontalPodAutoscalerSpec{} - } else { - yyv184 := &x.Spec - yyv184.CodecDecodeSelf(d) - } - yyj180++ - if yyhl180 { - yyb180 = yyj180 > l - } else { - yyb180 = r.CheckBreak() - } - if yyb180 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = HorizontalPodAutoscalerStatus{} - } else { - yyv185 := &x.Status - yyv185.CodecDecodeSelf(d) - } - for { - yyj180++ - if yyhl180 { - yyb180 = yyj180 > l - } else { - yyb180 = r.CheckBreak() - } - if yyb180 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj180-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *HorizontalPodAutoscalerList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym186 := z.EncBinary() - _ = yym186 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep187 := !z.EncBinary() - yy2arr187 := z.EncBasicHandle().StructToArray - var yyq187 [4]bool - _, _, _ = yysep187, yyq187, yy2arr187 - const yyr187 bool = false - yyq187[0] = x.Kind != "" - yyq187[1] = x.APIVersion != "" - yyq187[2] = true - var yynn187 int - if yyr187 || yy2arr187 { - r.EncodeArrayStart(4) - } else { - yynn187 = 1 - for _, b := range yyq187 { - if b { - yynn187++ - } - } - r.EncodeMapStart(yynn187) - yynn187 = 0 - } - if yyr187 || yy2arr187 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq187[0] { - yym189 := z.EncBinary() - _ = yym189 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq187[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym190 := z.EncBinary() - _ = yym190 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr187 || yy2arr187 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq187[1] { - yym192 := z.EncBinary() - _ = yym192 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq187[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym193 := z.EncBinary() - _ = yym193 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr187 || yy2arr187 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq187[2] { - yy195 := &x.ListMeta - yym196 := z.EncBinary() - _ = yym196 - if false { - } else if z.HasExtensions() && z.EncExt(yy195) { - } else { - z.EncFallback(yy195) - } - } else { - r.EncodeNil() - } - } else { - if yyq187[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy197 := &x.ListMeta - yym198 := z.EncBinary() - _ = yym198 - if false { - } else if z.HasExtensions() && z.EncExt(yy197) { - } else { - z.EncFallback(yy197) - } - } - } - if yyr187 || yy2arr187 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym200 := z.EncBinary() - _ = yym200 - if false { - } else { - h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym201 := z.EncBinary() - _ = yym201 - if false { - } else { - h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e) - } - } - } - if yyr187 || yy2arr187 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HorizontalPodAutoscalerList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym202 := z.DecBinary() - _ = yym202 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct203 := r.ContainerType() - if yyct203 == codecSelferValueTypeMap1234 { - yyl203 := r.ReadMapStart() - if yyl203 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl203, d) - } - } else if yyct203 == codecSelferValueTypeArray1234 { - yyl203 := r.ReadArrayStart() - if yyl203 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl203, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys204Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys204Slc - var yyhl204 bool = l >= 0 - for yyj204 := 0; ; yyj204++ { - if yyhl204 { - if yyj204 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys204Slc = r.DecodeBytes(yys204Slc, true, true) - yys204 := string(yys204Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys204 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv207 := &x.ListMeta - yym208 := z.DecBinary() - _ = yym208 - if false { - } else if z.HasExtensions() && z.DecExt(yyv207) { - } else { - z.DecFallback(yyv207, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv209 := &x.Items - yym210 := z.DecBinary() - _ = yym210 - if false { - } else { - h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv209), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys204) - } // end switch yys204 - } // end for yyj204 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj211 int - var yyb211 bool - var yyhl211 bool = l >= 0 - yyj211++ - if yyhl211 { - yyb211 = yyj211 > l - } else { - yyb211 = r.CheckBreak() - } - if yyb211 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj211++ - if yyhl211 { - yyb211 = yyj211 > l - } else { - yyb211 = r.CheckBreak() - } - if yyb211 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj211++ - if yyhl211 { - yyb211 = yyj211 > l - } else { - yyb211 = r.CheckBreak() - } - if yyb211 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv214 := &x.ListMeta - yym215 := z.DecBinary() - _ = yym215 - if false { - } else if z.HasExtensions() && z.DecExt(yyv214) { - } else { - z.DecFallback(yyv214, false) - } - } - yyj211++ - if yyhl211 { - yyb211 = yyj211 > l - } else { - yyb211 = r.CheckBreak() - } - if yyb211 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv216 := &x.Items - yym217 := z.DecBinary() - _ = yym217 - if false { - } else { - h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv216), d) - } - } - for { - yyj211++ - if yyhl211 { - yyb211 = yyj211 > l - } else { - yyb211 = r.CheckBreak() - } - if yyb211 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj211-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) encSliceHorizontalPodAutoscaler(v []HorizontalPodAutoscaler, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv218 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy219 := &yyv218 - yy219.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutoscaler, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv220 := *v - yyh220, yyl220 := z.DecSliceHelperStart() - var yyc220 bool - if yyl220 == 0 { - if yyv220 == nil { - yyv220 = []HorizontalPodAutoscaler{} - yyc220 = true - } else if len(yyv220) != 0 { - yyv220 = yyv220[:0] - yyc220 = true - } - } else if yyl220 > 0 { - var yyrr220, yyrl220 int - var yyrt220 bool - if yyl220 > cap(yyv220) { - - yyrg220 := len(yyv220) > 0 - yyv2220 := yyv220 - yyrl220, yyrt220 = z.DecInferLen(yyl220, z.DecBasicHandle().MaxInitLen, 360) - if yyrt220 { - if yyrl220 <= cap(yyv220) { - yyv220 = yyv220[:yyrl220] - } else { - yyv220 = make([]HorizontalPodAutoscaler, yyrl220) - } - } else { - yyv220 = make([]HorizontalPodAutoscaler, yyrl220) - } - yyc220 = true - yyrr220 = len(yyv220) - if yyrg220 { - copy(yyv220, yyv2220) - } - } else if yyl220 != len(yyv220) { - yyv220 = yyv220[:yyl220] - yyc220 = true - } - yyj220 := 0 - for ; yyj220 < yyrr220; yyj220++ { - yyh220.ElemContainerState(yyj220) - if r.TryDecodeAsNil() { - yyv220[yyj220] = HorizontalPodAutoscaler{} - } else { - yyv221 := &yyv220[yyj220] - yyv221.CodecDecodeSelf(d) - } - - } - if yyrt220 { - for ; yyj220 < yyl220; yyj220++ { - yyv220 = append(yyv220, HorizontalPodAutoscaler{}) - yyh220.ElemContainerState(yyj220) - if r.TryDecodeAsNil() { - yyv220[yyj220] = HorizontalPodAutoscaler{} - } else { - yyv222 := &yyv220[yyj220] - yyv222.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj220 := 0 - for ; !r.CheckBreak(); yyj220++ { - - if yyj220 >= len(yyv220) { - yyv220 = append(yyv220, HorizontalPodAutoscaler{}) // var yyz220 HorizontalPodAutoscaler - yyc220 = true - } - yyh220.ElemContainerState(yyj220) - if yyj220 < len(yyv220) { - if r.TryDecodeAsNil() { - yyv220[yyj220] = HorizontalPodAutoscaler{} - } else { - yyv223 := &yyv220[yyj220] - yyv223.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj220 < len(yyv220) { - yyv220 = yyv220[:yyj220] - yyc220 = true - } else if yyj220 == 0 && yyv220 == nil { - yyv220 = []HorizontalPodAutoscaler{} - yyc220 = true - } - } - yyh220.End() - if yyc220 { - *v = yyv220 - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/types.go b/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/types.go deleted file mode 100644 index 183ca4934..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/types.go +++ /dev/null @@ -1,120 +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 autoscaling - -import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" -) - -// Scale represents a scaling request for a resource. -type Scale struct { - unversioned.TypeMeta `json:",inline"` - // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. - api.ObjectMeta `json:"metadata,omitempty"` - - // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. - Spec ScaleSpec `json:"spec,omitempty"` - - // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only. - Status ScaleStatus `json:"status,omitempty"` -} - -// ScaleSpec describes the attributes of a scale subresource. -type ScaleSpec struct { - // desired number of instances for the scaled object. - Replicas int32 `json:"replicas,omitempty"` -} - -// ScaleStatus represents the current status of a scale subresource. -type ScaleStatus struct { - // actual number of observed instances of the scaled object. - Replicas int32 `json:"replicas"` - - // label query over pods that should match the replicas count. This is same - // as the label selector but in the string format to avoid introspection - // by clients. The string will be in the same format as the query-param syntax. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - Selector string `json:"selector,omitempty"` -} - -// CrossVersionObjectReference contains enough information to let you identify the referred resource. -type CrossVersionObjectReference struct { - // Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` - // Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names - Name string `json:"name" protobuf:"bytes,2,opt,name=name"` - // API version of the referent - APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"` -} - -// specification of a horizontal pod autoscaler. -type HorizontalPodAutoscalerSpec struct { - // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption - // and will set the desired number of pods by using its Scale subresource. - ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef"` - // lower limit for the number of pods that can be set by the autoscaler, default 1. - MinReplicas *int32 `json:"minReplicas,omitempty"` - // upper limit for the number of pods that can be set by the autoscaler. It cannot be smaller than MinReplicas. - MaxReplicas int32 `json:"maxReplicas"` - // target average CPU utilization (represented as a percentage of requested CPU) over all the pods; - // if not specified the default autoscaling policy will be used. - TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty"` -} - -// current status of a horizontal pod autoscaler -type HorizontalPodAutoscalerStatus struct { - // most recent generation observed by this autoscaler. - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - - // last time the HorizontalPodAutoscaler scaled the number of pods; - // used by the autoscaler to control how often the number of pods is changed. - LastScaleTime *unversioned.Time `json:"lastScaleTime,omitempty"` - - // current number of replicas of pods managed by this autoscaler. - CurrentReplicas int32 `json:"currentReplicas"` - - // desired number of replicas of pods managed by this autoscaler. - DesiredReplicas int32 `json:"desiredReplicas"` - - // current average CPU utilization over all pods, represented as a percentage of requested CPU, - // e.g. 70 means that an average pod is using now 70% of its requested CPU. - CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty"` -} - -// +genclient=true - -// configuration of a horizontal pod autoscaler. -type HorizontalPodAutoscaler struct { - unversioned.TypeMeta `json:",inline"` - api.ObjectMeta `json:"metadata,omitempty"` - - // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. - Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty"` - - // current information about the autoscaler. - Status HorizontalPodAutoscalerStatus `json:"status,omitempty"` -} - -// list of horizontal pod autoscaler objects. -type HorizontalPodAutoscalerList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` - - // list of horizontal pod autoscaler objects. - Items []HorizontalPodAutoscaler `json:"items"` -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/generated.proto b/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/generated.proto deleted file mode 100644 index 891aff3b5..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/generated.proto +++ /dev/null @@ -1,132 +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.apis.autoscaling.v1; - -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; -import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; -import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "v1"; - -// CrossVersionObjectReference contains enough information to let you identify the referred resource. -message CrossVersionObjectReference { - // Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - optional string kind = 1; - - // Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names - optional string name = 2; - - // API version of the referent - optional string apiVersion = 3; -} - -// configuration of a horizontal pod autoscaler. -message HorizontalPodAutoscaler { - // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; - - // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. - optional HorizontalPodAutoscalerSpec spec = 2; - - // current information about the autoscaler. - optional HorizontalPodAutoscalerStatus status = 3; -} - -// list of horizontal pod autoscaler objects. -message HorizontalPodAutoscalerList { - // Standard list metadata. - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; - - // list of horizontal pod autoscaler objects. - repeated HorizontalPodAutoscaler items = 2; -} - -// specification of a horizontal pod autoscaler. -message HorizontalPodAutoscalerSpec { - // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption - // and will set the desired number of pods by using its Scale subresource. - optional CrossVersionObjectReference scaleTargetRef = 1; - - // lower limit for the number of pods that can be set by the autoscaler, default 1. - optional int32 minReplicas = 2; - - // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. - optional int32 maxReplicas = 3; - - // target average CPU utilization (represented as a percentage of requested CPU) over all the pods; - // if not specified the default autoscaling policy will be used. - optional int32 targetCPUUtilizationPercentage = 4; -} - -// current status of a horizontal pod autoscaler -message HorizontalPodAutoscalerStatus { - // most recent generation observed by this autoscaler. - optional int64 observedGeneration = 1; - - // last time the HorizontalPodAutoscaler scaled the number of pods; - // used by the autoscaler to control how often the number of pods is changed. - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastScaleTime = 2; - - // current number of replicas of pods managed by this autoscaler. - optional int32 currentReplicas = 3; - - // desired number of replicas of pods managed by this autoscaler. - optional int32 desiredReplicas = 4; - - // current average CPU utilization over all pods, represented as a percentage of requested CPU, - // e.g. 70 means that an average pod is using now 70% of its requested CPU. - optional int32 currentCPUUtilizationPercentage = 5; -} - -// Scale represents a scaling request for a resource. -message Scale { - // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; - - // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. - optional ScaleSpec spec = 2; - - // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only. - optional ScaleStatus status = 3; -} - -// ScaleSpec describes the attributes of a scale subresource. -message ScaleSpec { - // desired number of instances for the scaled object. - optional int32 replicas = 1; -} - -// ScaleStatus represents the current status of a scale subresource. -message ScaleStatus { - // actual number of observed instances of the scaled object. - optional int32 replicas = 1; - - // label query over pods that should match the replicas count. This is same - // as the label selector but in the string format to avoid introspection - // by clients. The string will be in the same format as the query-param syntax. - // More info about label selectors: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - optional string selector = 2; -} - diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/types.generated.go deleted file mode 100644 index ef0d82d5c..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/types.generated.go +++ /dev/null @@ -1,2656 +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" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg2_v1 "k8s.io/client-go/1.5/pkg/api/v1" - pkg3_types "k8s.io/client-go/1.5/pkg/types" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg1_unversioned.Time - var v1 pkg2_v1.ObjectMeta - var v2 pkg3_types.UID - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 - } -} - -func (x *CrossVersionObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [3]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[2] = x.APIVersion != "" - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(3) - } else { - yynn2 = 2 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("name")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - yym10 := z.EncBinary() - _ = yym10 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym11 := z.EncBinary() - _ = yym11 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CrossVersionObjectReference) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym12 := z.DecBinary() - _ = yym12 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct13 := r.ContainerType() - if yyct13 == codecSelferValueTypeMap1234 { - yyl13 := r.ReadMapStart() - if yyl13 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl13, d) - } - } else if yyct13 == codecSelferValueTypeArray1234 { - yyl13 := r.ReadArrayStart() - if yyl13 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl13, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CrossVersionObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys14Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys14Slc - var yyhl14 bool = l >= 0 - for yyj14 := 0; ; yyj14++ { - if yyhl14 { - if yyj14 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys14Slc = r.DecodeBytes(yys14Slc, true, true) - yys14 := string(yys14Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys14 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys14) - } // end switch yys14 - } // end for yyj14 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CrossVersionObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj18 int - var yyb18 bool - var yyhl18 bool = l >= 0 - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - 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.Name = "" - } else { - x.Name = 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 *HorizontalPodAutoscalerSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym22 := z.EncBinary() - _ = yym22 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep23 := !z.EncBinary() - yy2arr23 := z.EncBasicHandle().StructToArray - var yyq23 [4]bool - _, _, _ = yysep23, yyq23, yy2arr23 - const yyr23 bool = false - yyq23[1] = x.MinReplicas != nil - yyq23[3] = x.TargetCPUUtilizationPercentage != nil - var yynn23 int - if yyr23 || yy2arr23 { - r.EncodeArrayStart(4) - } else { - yynn23 = 2 - for _, b := range yyq23 { - if b { - yynn23++ - } - } - r.EncodeMapStart(yynn23) - yynn23 = 0 - } - if yyr23 || yy2arr23 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy25 := &x.ScaleTargetRef - yy25.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("scaleTargetRef")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy26 := &x.ScaleTargetRef - yy26.CodecEncodeSelf(e) - } - if yyr23 || yy2arr23 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq23[1] { - if x.MinReplicas == nil { - r.EncodeNil() - } else { - yy28 := *x.MinReplicas - yym29 := z.EncBinary() - _ = yym29 - if false { - } else { - r.EncodeInt(int64(yy28)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq23[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("minReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.MinReplicas == nil { - r.EncodeNil() - } else { - yy30 := *x.MinReplicas - yym31 := z.EncBinary() - _ = yym31 - if false { - } else { - r.EncodeInt(int64(yy30)) - } - } - } - } - if yyr23 || yy2arr23 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym33 := z.EncBinary() - _ = yym33 - if false { - } else { - r.EncodeInt(int64(x.MaxReplicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("maxReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym34 := z.EncBinary() - _ = yym34 - if false { - } else { - r.EncodeInt(int64(x.MaxReplicas)) - } - } - if yyr23 || yy2arr23 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq23[3] { - if x.TargetCPUUtilizationPercentage == nil { - r.EncodeNil() - } else { - yy36 := *x.TargetCPUUtilizationPercentage - yym37 := z.EncBinary() - _ = yym37 - if false { - } else { - r.EncodeInt(int64(yy36)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq23[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("targetCPUUtilizationPercentage")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.TargetCPUUtilizationPercentage == nil { - r.EncodeNil() - } else { - yy38 := *x.TargetCPUUtilizationPercentage - yym39 := z.EncBinary() - _ = yym39 - if false { - } else { - r.EncodeInt(int64(yy38)) - } - } - } - } - if yyr23 || yy2arr23 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HorizontalPodAutoscalerSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym40 := z.DecBinary() - _ = yym40 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct41 := r.ContainerType() - if yyct41 == codecSelferValueTypeMap1234 { - yyl41 := r.ReadMapStart() - if yyl41 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl41, d) - } - } else if yyct41 == codecSelferValueTypeArray1234 { - yyl41 := r.ReadArrayStart() - if yyl41 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl41, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys42Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys42Slc - var yyhl42 bool = l >= 0 - for yyj42 := 0; ; yyj42++ { - if yyhl42 { - if yyj42 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys42Slc = r.DecodeBytes(yys42Slc, true, true) - yys42 := string(yys42Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys42 { - case "scaleTargetRef": - if r.TryDecodeAsNil() { - x.ScaleTargetRef = CrossVersionObjectReference{} - } else { - yyv43 := &x.ScaleTargetRef - yyv43.CodecDecodeSelf(d) - } - case "minReplicas": - if r.TryDecodeAsNil() { - if x.MinReplicas != nil { - x.MinReplicas = nil - } - } else { - if x.MinReplicas == nil { - x.MinReplicas = new(int32) - } - yym45 := z.DecBinary() - _ = yym45 - if false { - } else { - *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32)) - } - } - case "maxReplicas": - if r.TryDecodeAsNil() { - x.MaxReplicas = 0 - } else { - x.MaxReplicas = int32(r.DecodeInt(32)) - } - case "targetCPUUtilizationPercentage": - if r.TryDecodeAsNil() { - if x.TargetCPUUtilizationPercentage != nil { - x.TargetCPUUtilizationPercentage = nil - } - } else { - if x.TargetCPUUtilizationPercentage == nil { - x.TargetCPUUtilizationPercentage = new(int32) - } - yym48 := z.DecBinary() - _ = yym48 - if false { - } else { - *((*int32)(x.TargetCPUUtilizationPercentage)) = int32(r.DecodeInt(32)) - } - } - default: - z.DecStructFieldNotFound(-1, yys42) - } // end switch yys42 - } // end for yyj42 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj49 int - var yyb49 bool - var yyhl49 bool = l >= 0 - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ScaleTargetRef = CrossVersionObjectReference{} - } else { - yyv50 := &x.ScaleTargetRef - yyv50.CodecDecodeSelf(d) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.MinReplicas != nil { - x.MinReplicas = nil - } - } else { - if x.MinReplicas == nil { - x.MinReplicas = new(int32) - } - yym52 := z.DecBinary() - _ = yym52 - if false { - } else { - *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32)) - } - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MaxReplicas = 0 - } else { - x.MaxReplicas = int32(r.DecodeInt(32)) - } - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.TargetCPUUtilizationPercentage != nil { - x.TargetCPUUtilizationPercentage = nil - } - } else { - if x.TargetCPUUtilizationPercentage == nil { - x.TargetCPUUtilizationPercentage = new(int32) - } - yym55 := z.DecBinary() - _ = yym55 - if false { - } else { - *((*int32)(x.TargetCPUUtilizationPercentage)) = int32(r.DecodeInt(32)) - } - } - for { - yyj49++ - if yyhl49 { - yyb49 = yyj49 > l - } else { - yyb49 = r.CheckBreak() - } - if yyb49 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj49-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *HorizontalPodAutoscalerStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym56 := z.EncBinary() - _ = yym56 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep57 := !z.EncBinary() - yy2arr57 := z.EncBasicHandle().StructToArray - var yyq57 [5]bool - _, _, _ = yysep57, yyq57, yy2arr57 - const yyr57 bool = false - yyq57[0] = x.ObservedGeneration != nil - yyq57[1] = x.LastScaleTime != nil - yyq57[4] = x.CurrentCPUUtilizationPercentage != nil - var yynn57 int - if yyr57 || yy2arr57 { - r.EncodeArrayStart(5) - } else { - yynn57 = 2 - for _, b := range yyq57 { - if b { - yynn57++ - } - } - r.EncodeMapStart(yynn57) - yynn57 = 0 - } - if yyr57 || yy2arr57 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq57[0] { - if x.ObservedGeneration == nil { - r.EncodeNil() - } else { - yy59 := *x.ObservedGeneration - yym60 := z.EncBinary() - _ = yym60 - if false { - } else { - r.EncodeInt(int64(yy59)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq57[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ObservedGeneration == nil { - r.EncodeNil() - } else { - yy61 := *x.ObservedGeneration - yym62 := z.EncBinary() - _ = yym62 - if false { - } else { - r.EncodeInt(int64(yy61)) - } - } - } - } - if yyr57 || yy2arr57 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq57[1] { - if x.LastScaleTime == nil { - r.EncodeNil() - } else { - yym64 := z.EncBinary() - _ = yym64 - if false { - } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) { - } else if yym64 { - z.EncBinaryMarshal(x.LastScaleTime) - } else if !yym64 && z.IsJSONHandle() { - z.EncJSONMarshal(x.LastScaleTime) - } else { - z.EncFallback(x.LastScaleTime) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq57[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastScaleTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.LastScaleTime == nil { - r.EncodeNil() - } else { - yym65 := z.EncBinary() - _ = yym65 - if false { - } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) { - } else if yym65 { - z.EncBinaryMarshal(x.LastScaleTime) - } else if !yym65 && z.IsJSONHandle() { - z.EncJSONMarshal(x.LastScaleTime) - } else { - z.EncFallback(x.LastScaleTime) - } - } - } - } - if yyr57 || yy2arr57 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym67 := z.EncBinary() - _ = yym67 - if false { - } else { - r.EncodeInt(int64(x.CurrentReplicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("currentReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym68 := z.EncBinary() - _ = yym68 - if false { - } else { - r.EncodeInt(int64(x.CurrentReplicas)) - } - } - if yyr57 || yy2arr57 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym70 := z.EncBinary() - _ = yym70 - if false { - } else { - r.EncodeInt(int64(x.DesiredReplicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("desiredReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym71 := z.EncBinary() - _ = yym71 - if false { - } else { - r.EncodeInt(int64(x.DesiredReplicas)) - } - } - if yyr57 || yy2arr57 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq57[4] { - if x.CurrentCPUUtilizationPercentage == nil { - r.EncodeNil() - } else { - yy73 := *x.CurrentCPUUtilizationPercentage - yym74 := z.EncBinary() - _ = yym74 - if false { - } else { - r.EncodeInt(int64(yy73)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq57[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("currentCPUUtilizationPercentage")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.CurrentCPUUtilizationPercentage == nil { - r.EncodeNil() - } else { - yy75 := *x.CurrentCPUUtilizationPercentage - yym76 := z.EncBinary() - _ = yym76 - if false { - } else { - r.EncodeInt(int64(yy75)) - } - } - } - } - if yyr57 || yy2arr57 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HorizontalPodAutoscalerStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym77 := z.DecBinary() - _ = yym77 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct78 := r.ContainerType() - if yyct78 == codecSelferValueTypeMap1234 { - yyl78 := r.ReadMapStart() - if yyl78 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl78, d) - } - } else if yyct78 == codecSelferValueTypeArray1234 { - yyl78 := r.ReadArrayStart() - if yyl78 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl78, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys79Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys79Slc - var yyhl79 bool = l >= 0 - for yyj79 := 0; ; yyj79++ { - if yyhl79 { - if yyj79 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys79Slc = r.DecodeBytes(yys79Slc, true, true) - yys79 := string(yys79Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys79 { - case "observedGeneration": - if r.TryDecodeAsNil() { - if x.ObservedGeneration != nil { - x.ObservedGeneration = nil - } - } else { - if x.ObservedGeneration == nil { - x.ObservedGeneration = new(int64) - } - yym81 := z.DecBinary() - _ = yym81 - if false { - } else { - *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) - } - } - case "lastScaleTime": - if r.TryDecodeAsNil() { - if x.LastScaleTime != nil { - x.LastScaleTime = nil - } - } else { - if x.LastScaleTime == nil { - x.LastScaleTime = new(pkg1_unversioned.Time) - } - yym83 := z.DecBinary() - _ = yym83 - if false { - } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) { - } else if yym83 { - z.DecBinaryUnmarshal(x.LastScaleTime) - } else if !yym83 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.LastScaleTime) - } else { - z.DecFallback(x.LastScaleTime, false) - } - } - case "currentReplicas": - if r.TryDecodeAsNil() { - x.CurrentReplicas = 0 - } else { - x.CurrentReplicas = int32(r.DecodeInt(32)) - } - case "desiredReplicas": - if r.TryDecodeAsNil() { - x.DesiredReplicas = 0 - } else { - x.DesiredReplicas = int32(r.DecodeInt(32)) - } - case "currentCPUUtilizationPercentage": - if r.TryDecodeAsNil() { - if x.CurrentCPUUtilizationPercentage != nil { - x.CurrentCPUUtilizationPercentage = nil - } - } else { - if x.CurrentCPUUtilizationPercentage == nil { - x.CurrentCPUUtilizationPercentage = new(int32) - } - yym87 := z.DecBinary() - _ = yym87 - if false { - } else { - *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32)) - } - } - default: - z.DecStructFieldNotFound(-1, yys79) - } // end switch yys79 - } // end for yyj79 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj88 int - var yyb88 bool - var yyhl88 bool = l >= 0 - yyj88++ - if yyhl88 { - yyb88 = yyj88 > l - } else { - yyb88 = r.CheckBreak() - } - if yyb88 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.ObservedGeneration != nil { - x.ObservedGeneration = nil - } - } else { - if x.ObservedGeneration == nil { - x.ObservedGeneration = new(int64) - } - yym90 := z.DecBinary() - _ = yym90 - if false { - } else { - *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) - } - } - yyj88++ - if yyhl88 { - yyb88 = yyj88 > l - } else { - yyb88 = r.CheckBreak() - } - if yyb88 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.LastScaleTime != nil { - x.LastScaleTime = nil - } - } else { - if x.LastScaleTime == nil { - x.LastScaleTime = new(pkg1_unversioned.Time) - } - yym92 := z.DecBinary() - _ = yym92 - if false { - } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) { - } else if yym92 { - z.DecBinaryUnmarshal(x.LastScaleTime) - } else if !yym92 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.LastScaleTime) - } else { - z.DecFallback(x.LastScaleTime, false) - } - } - yyj88++ - if yyhl88 { - yyb88 = yyj88 > l - } else { - yyb88 = r.CheckBreak() - } - if yyb88 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CurrentReplicas = 0 - } else { - x.CurrentReplicas = int32(r.DecodeInt(32)) - } - yyj88++ - if yyhl88 { - yyb88 = yyj88 > l - } else { - yyb88 = r.CheckBreak() - } - if yyb88 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.DesiredReplicas = 0 - } else { - x.DesiredReplicas = int32(r.DecodeInt(32)) - } - yyj88++ - if yyhl88 { - yyb88 = yyj88 > l - } else { - yyb88 = r.CheckBreak() - } - if yyb88 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.CurrentCPUUtilizationPercentage != nil { - x.CurrentCPUUtilizationPercentage = nil - } - } else { - if x.CurrentCPUUtilizationPercentage == nil { - x.CurrentCPUUtilizationPercentage = new(int32) - } - yym96 := z.DecBinary() - _ = yym96 - if false { - } else { - *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32)) - } - } - for { - yyj88++ - if yyhl88 { - yyb88 = yyj88 > l - } else { - yyb88 = r.CheckBreak() - } - if yyb88 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj88-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym97 := z.EncBinary() - _ = yym97 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep98 := !z.EncBinary() - yy2arr98 := z.EncBasicHandle().StructToArray - var yyq98 [5]bool - _, _, _ = yysep98, yyq98, yy2arr98 - const yyr98 bool = false - yyq98[0] = x.Kind != "" - yyq98[1] = x.APIVersion != "" - yyq98[2] = true - yyq98[3] = true - yyq98[4] = true - var yynn98 int - if yyr98 || yy2arr98 { - r.EncodeArrayStart(5) - } else { - yynn98 = 0 - for _, b := range yyq98 { - if b { - yynn98++ - } - } - r.EncodeMapStart(yynn98) - yynn98 = 0 - } - if yyr98 || yy2arr98 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq98[0] { - yym100 := z.EncBinary() - _ = yym100 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq98[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym101 := z.EncBinary() - _ = yym101 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr98 || yy2arr98 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq98[1] { - yym103 := z.EncBinary() - _ = yym103 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq98[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym104 := z.EncBinary() - _ = yym104 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr98 || yy2arr98 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq98[2] { - yy106 := &x.ObjectMeta - yy106.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq98[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy107 := &x.ObjectMeta - yy107.CodecEncodeSelf(e) - } - } - if yyr98 || yy2arr98 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq98[3] { - yy109 := &x.Spec - yy109.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq98[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy110 := &x.Spec - yy110.CodecEncodeSelf(e) - } - } - if yyr98 || yy2arr98 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq98[4] { - yy112 := &x.Status - yy112.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq98[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy113 := &x.Status - yy113.CodecEncodeSelf(e) - } - } - if yyr98 || yy2arr98 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HorizontalPodAutoscaler) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym114 := z.DecBinary() - _ = yym114 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct115 := r.ContainerType() - if yyct115 == codecSelferValueTypeMap1234 { - yyl115 := r.ReadMapStart() - if yyl115 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl115, d) - } - } else if yyct115 == codecSelferValueTypeArray1234 { - yyl115 := r.ReadArrayStart() - if yyl115 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl115, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys116Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys116Slc - var yyhl116 bool = l >= 0 - for yyj116 := 0; ; yyj116++ { - if yyhl116 { - if yyj116 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys116Slc = r.DecodeBytes(yys116Slc, true, true) - yys116 := string(yys116Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys116 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv119 := &x.ObjectMeta - yyv119.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = HorizontalPodAutoscalerSpec{} - } else { - yyv120 := &x.Spec - yyv120.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = HorizontalPodAutoscalerStatus{} - } else { - yyv121 := &x.Status - yyv121.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys116) - } // end switch yys116 - } // end for yyj116 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj122 int - var yyb122 bool - var yyhl122 bool = l >= 0 - yyj122++ - if yyhl122 { - yyb122 = yyj122 > l - } else { - yyb122 = r.CheckBreak() - } - if yyb122 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj122++ - if yyhl122 { - yyb122 = yyj122 > l - } else { - yyb122 = r.CheckBreak() - } - if yyb122 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj122++ - if yyhl122 { - yyb122 = yyj122 > l - } else { - yyb122 = r.CheckBreak() - } - if yyb122 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv125 := &x.ObjectMeta - yyv125.CodecDecodeSelf(d) - } - yyj122++ - if yyhl122 { - yyb122 = yyj122 > l - } else { - yyb122 = r.CheckBreak() - } - if yyb122 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = HorizontalPodAutoscalerSpec{} - } else { - yyv126 := &x.Spec - yyv126.CodecDecodeSelf(d) - } - yyj122++ - if yyhl122 { - yyb122 = yyj122 > l - } else { - yyb122 = r.CheckBreak() - } - if yyb122 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = HorizontalPodAutoscalerStatus{} - } else { - yyv127 := &x.Status - yyv127.CodecDecodeSelf(d) - } - for { - yyj122++ - if yyhl122 { - yyb122 = yyj122 > l - } else { - yyb122 = r.CheckBreak() - } - if yyb122 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj122-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *HorizontalPodAutoscalerList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym128 := z.EncBinary() - _ = yym128 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep129 := !z.EncBinary() - yy2arr129 := z.EncBasicHandle().StructToArray - var yyq129 [4]bool - _, _, _ = yysep129, yyq129, yy2arr129 - const yyr129 bool = false - yyq129[0] = x.Kind != "" - yyq129[1] = x.APIVersion != "" - yyq129[2] = true - var yynn129 int - if yyr129 || yy2arr129 { - r.EncodeArrayStart(4) - } else { - yynn129 = 1 - for _, b := range yyq129 { - if b { - yynn129++ - } - } - r.EncodeMapStart(yynn129) - yynn129 = 0 - } - if yyr129 || yy2arr129 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq129[0] { - yym131 := z.EncBinary() - _ = yym131 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq129[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym132 := z.EncBinary() - _ = yym132 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr129 || yy2arr129 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq129[1] { - yym134 := z.EncBinary() - _ = yym134 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq129[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym135 := z.EncBinary() - _ = yym135 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr129 || yy2arr129 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq129[2] { - yy137 := &x.ListMeta - yym138 := z.EncBinary() - _ = yym138 - if false { - } else if z.HasExtensions() && z.EncExt(yy137) { - } else { - z.EncFallback(yy137) - } - } else { - r.EncodeNil() - } - } else { - if yyq129[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy139 := &x.ListMeta - yym140 := z.EncBinary() - _ = yym140 - if false { - } else if z.HasExtensions() && z.EncExt(yy139) { - } else { - z.EncFallback(yy139) - } - } - } - if yyr129 || yy2arr129 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym142 := z.EncBinary() - _ = yym142 - if false { - } else { - h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym143 := z.EncBinary() - _ = yym143 - if false { - } else { - h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e) - } - } - } - if yyr129 || yy2arr129 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HorizontalPodAutoscalerList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym144 := z.DecBinary() - _ = yym144 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct145 := r.ContainerType() - if yyct145 == codecSelferValueTypeMap1234 { - yyl145 := r.ReadMapStart() - if yyl145 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl145, d) - } - } else if yyct145 == codecSelferValueTypeArray1234 { - yyl145 := r.ReadArrayStart() - if yyl145 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl145, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys146Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys146Slc - var yyhl146 bool = l >= 0 - for yyj146 := 0; ; yyj146++ { - if yyhl146 { - if yyj146 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys146Slc = r.DecodeBytes(yys146Slc, true, true) - yys146 := string(yys146Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys146 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv149 := &x.ListMeta - yym150 := z.DecBinary() - _ = yym150 - if false { - } else if z.HasExtensions() && z.DecExt(yyv149) { - } else { - z.DecFallback(yyv149, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv151 := &x.Items - yym152 := z.DecBinary() - _ = yym152 - if false { - } else { - h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv151), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys146) - } // end switch yys146 - } // end for yyj146 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj153 int - var yyb153 bool - var yyhl153 bool = l >= 0 - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l - } else { - yyb153 = r.CheckBreak() - } - if yyb153 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l - } else { - yyb153 = r.CheckBreak() - } - if yyb153 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l - } else { - yyb153 = r.CheckBreak() - } - if yyb153 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv156 := &x.ListMeta - yym157 := z.DecBinary() - _ = yym157 - if false { - } else if z.HasExtensions() && z.DecExt(yyv156) { - } else { - z.DecFallback(yyv156, false) - } - } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l - } else { - yyb153 = r.CheckBreak() - } - if yyb153 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv158 := &x.Items - yym159 := z.DecBinary() - _ = yym159 - if false { - } else { - h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv158), d) - } - } - for { - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l - } else { - yyb153 = r.CheckBreak() - } - if yyb153 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj153-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym160 := z.EncBinary() - _ = yym160 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep161 := !z.EncBinary() - yy2arr161 := z.EncBasicHandle().StructToArray - var yyq161 [5]bool - _, _, _ = yysep161, yyq161, yy2arr161 - const yyr161 bool = false - yyq161[0] = x.Kind != "" - yyq161[1] = x.APIVersion != "" - yyq161[2] = true - yyq161[3] = true - yyq161[4] = true - var yynn161 int - if yyr161 || yy2arr161 { - r.EncodeArrayStart(5) - } else { - yynn161 = 0 - for _, b := range yyq161 { - if b { - yynn161++ - } - } - r.EncodeMapStart(yynn161) - yynn161 = 0 - } - if yyr161 || yy2arr161 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq161[0] { - yym163 := z.EncBinary() - _ = yym163 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq161[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym164 := z.EncBinary() - _ = yym164 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr161 || yy2arr161 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq161[1] { - yym166 := z.EncBinary() - _ = yym166 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq161[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym167 := z.EncBinary() - _ = yym167 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr161 || yy2arr161 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq161[2] { - yy169 := &x.ObjectMeta - yy169.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq161[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy170 := &x.ObjectMeta - yy170.CodecEncodeSelf(e) - } - } - if yyr161 || yy2arr161 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq161[3] { - yy172 := &x.Spec - yy172.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq161[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy173 := &x.Spec - yy173.CodecEncodeSelf(e) - } - } - if yyr161 || yy2arr161 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq161[4] { - yy175 := &x.Status - yy175.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq161[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy176 := &x.Status - yy176.CodecEncodeSelf(e) - } - } - if yyr161 || yy2arr161 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Scale) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym177 := z.DecBinary() - _ = yym177 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct178 := r.ContainerType() - if yyct178 == codecSelferValueTypeMap1234 { - yyl178 := r.ReadMapStart() - if yyl178 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl178, d) - } - } else if yyct178 == codecSelferValueTypeArray1234 { - yyl178 := r.ReadArrayStart() - if yyl178 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl178, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys179Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys179Slc - var yyhl179 bool = l >= 0 - for yyj179 := 0; ; yyj179++ { - if yyhl179 { - if yyj179 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys179Slc = r.DecodeBytes(yys179Slc, true, true) - yys179 := string(yys179Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys179 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv182 := &x.ObjectMeta - yyv182.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = ScaleSpec{} - } else { - yyv183 := &x.Spec - yyv183.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = ScaleStatus{} - } else { - yyv184 := &x.Status - yyv184.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys179) - } // end switch yys179 - } // end for yyj179 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj185 int - var yyb185 bool - var yyhl185 bool = l >= 0 - yyj185++ - if yyhl185 { - yyb185 = yyj185 > l - } else { - yyb185 = r.CheckBreak() - } - if yyb185 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj185++ - if yyhl185 { - yyb185 = yyj185 > l - } else { - yyb185 = r.CheckBreak() - } - if yyb185 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj185++ - if yyhl185 { - yyb185 = yyj185 > l - } else { - yyb185 = r.CheckBreak() - } - if yyb185 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv188 := &x.ObjectMeta - yyv188.CodecDecodeSelf(d) - } - yyj185++ - if yyhl185 { - yyb185 = yyj185 > l - } else { - yyb185 = r.CheckBreak() - } - if yyb185 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = ScaleSpec{} - } else { - yyv189 := &x.Spec - yyv189.CodecDecodeSelf(d) - } - yyj185++ - if yyhl185 { - yyb185 = yyj185 > l - } else { - yyb185 = r.CheckBreak() - } - if yyb185 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = ScaleStatus{} - } else { - yyv190 := &x.Status - yyv190.CodecDecodeSelf(d) - } - for { - yyj185++ - if yyhl185 { - yyb185 = yyj185 > l - } else { - yyb185 = r.CheckBreak() - } - if yyb185 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj185-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ScaleSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym191 := z.EncBinary() - _ = yym191 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep192 := !z.EncBinary() - yy2arr192 := z.EncBasicHandle().StructToArray - var yyq192 [1]bool - _, _, _ = yysep192, yyq192, yy2arr192 - const yyr192 bool = false - yyq192[0] = x.Replicas != 0 - var yynn192 int - if yyr192 || yy2arr192 { - r.EncodeArrayStart(1) - } else { - yynn192 = 0 - for _, b := range yyq192 { - if b { - yynn192++ - } - } - r.EncodeMapStart(yynn192) - yynn192 = 0 - } - if yyr192 || yy2arr192 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq192[0] { - yym194 := z.EncBinary() - _ = yym194 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq192[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym195 := z.EncBinary() - _ = yym195 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } - } - if yyr192 || yy2arr192 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScaleSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym196 := z.DecBinary() - _ = yym196 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct197 := r.ContainerType() - if yyct197 == codecSelferValueTypeMap1234 { - yyl197 := r.ReadMapStart() - if yyl197 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl197, d) - } - } else if yyct197 == codecSelferValueTypeArray1234 { - yyl197 := r.ReadArrayStart() - if yyl197 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl197, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScaleSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys198Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys198Slc - var yyhl198 bool = l >= 0 - for yyj198 := 0; ; yyj198++ { - if yyhl198 { - if yyj198 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys198Slc = r.DecodeBytes(yys198Slc, true, true) - yys198 := string(yys198Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys198 { - case "replicas": - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - default: - z.DecStructFieldNotFound(-1, yys198) - } // end switch yys198 - } // end for yyj198 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScaleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj200 int - var yyb200 bool - var yyhl200 bool = l >= 0 - yyj200++ - if yyhl200 { - yyb200 = yyj200 > l - } else { - yyb200 = r.CheckBreak() - } - if yyb200 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - for { - yyj200++ - if yyhl200 { - yyb200 = yyj200 > l - } else { - yyb200 = r.CheckBreak() - } - if yyb200 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj200-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ScaleStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym202 := z.EncBinary() - _ = yym202 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep203 := !z.EncBinary() - yy2arr203 := z.EncBasicHandle().StructToArray - var yyq203 [2]bool - _, _, _ = yysep203, yyq203, yy2arr203 - const yyr203 bool = false - yyq203[1] = x.Selector != "" - var yynn203 int - if yyr203 || yy2arr203 { - r.EncodeArrayStart(2) - } else { - yynn203 = 1 - for _, b := range yyq203 { - if b { - yynn203++ - } - } - r.EncodeMapStart(yynn203) - yynn203 = 0 - } - if yyr203 || yy2arr203 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym205 := z.EncBinary() - _ = yym205 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym206 := z.EncBinary() - _ = yym206 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } - if yyr203 || yy2arr203 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq203[1] { - yym208 := z.EncBinary() - _ = yym208 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Selector)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq203[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym209 := z.EncBinary() - _ = yym209 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Selector)) - } - } - } - if yyr203 || yy2arr203 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScaleStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym210 := z.DecBinary() - _ = yym210 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct211 := r.ContainerType() - if yyct211 == codecSelferValueTypeMap1234 { - yyl211 := r.ReadMapStart() - if yyl211 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl211, d) - } - } else if yyct211 == codecSelferValueTypeArray1234 { - yyl211 := r.ReadArrayStart() - if yyl211 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl211, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScaleStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys212Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys212Slc - var yyhl212 bool = l >= 0 - for yyj212 := 0; ; yyj212++ { - if yyhl212 { - if yyj212 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys212Slc = r.DecodeBytes(yys212Slc, true, true) - yys212 := string(yys212Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys212 { - case "replicas": - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - case "selector": - if r.TryDecodeAsNil() { - x.Selector = "" - } else { - x.Selector = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys212) - } // end switch yys212 - } // end for yyj212 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScaleStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj215 int - var yyb215 bool - var yyhl215 bool = l >= 0 - yyj215++ - if yyhl215 { - yyb215 = yyj215 > l - } else { - yyb215 = r.CheckBreak() - } - if yyb215 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - yyj215++ - if yyhl215 { - yyb215 = yyj215 > l - } else { - yyb215 = r.CheckBreak() - } - if yyb215 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Selector = "" - } else { - x.Selector = string(r.DecodeString()) - } - for { - yyj215++ - if yyhl215 { - yyb215 = yyj215 > l - } else { - yyb215 = r.CheckBreak() - } - if yyb215 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj215-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) encSliceHorizontalPodAutoscaler(v []HorizontalPodAutoscaler, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv218 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy219 := &yyv218 - yy219.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutoscaler, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv220 := *v - yyh220, yyl220 := z.DecSliceHelperStart() - var yyc220 bool - if yyl220 == 0 { - if yyv220 == nil { - yyv220 = []HorizontalPodAutoscaler{} - yyc220 = true - } else if len(yyv220) != 0 { - yyv220 = yyv220[:0] - yyc220 = true - } - } else if yyl220 > 0 { - var yyrr220, yyrl220 int - var yyrt220 bool - if yyl220 > cap(yyv220) { - - yyrg220 := len(yyv220) > 0 - yyv2220 := yyv220 - yyrl220, yyrt220 = z.DecInferLen(yyl220, z.DecBasicHandle().MaxInitLen, 360) - if yyrt220 { - if yyrl220 <= cap(yyv220) { - yyv220 = yyv220[:yyrl220] - } else { - yyv220 = make([]HorizontalPodAutoscaler, yyrl220) - } - } else { - yyv220 = make([]HorizontalPodAutoscaler, yyrl220) - } - yyc220 = true - yyrr220 = len(yyv220) - if yyrg220 { - copy(yyv220, yyv2220) - } - } else if yyl220 != len(yyv220) { - yyv220 = yyv220[:yyl220] - yyc220 = true - } - yyj220 := 0 - for ; yyj220 < yyrr220; yyj220++ { - yyh220.ElemContainerState(yyj220) - if r.TryDecodeAsNil() { - yyv220[yyj220] = HorizontalPodAutoscaler{} - } else { - yyv221 := &yyv220[yyj220] - yyv221.CodecDecodeSelf(d) - } - - } - if yyrt220 { - for ; yyj220 < yyl220; yyj220++ { - yyv220 = append(yyv220, HorizontalPodAutoscaler{}) - yyh220.ElemContainerState(yyj220) - if r.TryDecodeAsNil() { - yyv220[yyj220] = HorizontalPodAutoscaler{} - } else { - yyv222 := &yyv220[yyj220] - yyv222.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj220 := 0 - for ; !r.CheckBreak(); yyj220++ { - - if yyj220 >= len(yyv220) { - yyv220 = append(yyv220, HorizontalPodAutoscaler{}) // var yyz220 HorizontalPodAutoscaler - yyc220 = true - } - yyh220.ElemContainerState(yyj220) - if yyj220 < len(yyv220) { - if r.TryDecodeAsNil() { - yyv220[yyj220] = HorizontalPodAutoscaler{} - } else { - yyv223 := &yyv220[yyj220] - yyv223.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj220 < len(yyv220) { - yyv220 = yyv220[:yyj220] - yyc220 = true - } else if yyj220 == 0 && yyv220 == nil { - yyv220 = []HorizontalPodAutoscaler{} - yyc220 = true - } - } - yyh220.End() - if yyc220 { - *v = yyv220 - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/types.go b/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/types.go deleted file mode 100644 index de8985857..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/types.go +++ /dev/null @@ -1,122 +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 - -import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" -) - -// CrossVersionObjectReference contains enough information to let you identify the referred resource. -type CrossVersionObjectReference struct { - // Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` - // Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names - Name string `json:"name" protobuf:"bytes,2,opt,name=name"` - // API version of the referent - APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"` -} - -// specification of a horizontal pod autoscaler. -type HorizontalPodAutoscalerSpec struct { - // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption - // and will set the desired number of pods by using its Scale subresource. - ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef" protobuf:"bytes,1,opt,name=scaleTargetRef"` - // lower limit for the number of pods that can be set by the autoscaler, default 1. - MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"` - // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. - MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"` - // target average CPU utilization (represented as a percentage of requested CPU) over all the pods; - // if not specified the default autoscaling policy will be used. - TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty" protobuf:"varint,4,opt,name=targetCPUUtilizationPercentage"` -} - -// current status of a horizontal pod autoscaler -type HorizontalPodAutoscalerStatus struct { - // most recent generation observed by this autoscaler. - ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` - - // last time the HorizontalPodAutoscaler scaled the number of pods; - // used by the autoscaler to control how often the number of pods is changed. - LastScaleTime *unversioned.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"` - - // current number of replicas of pods managed by this autoscaler. - CurrentReplicas int32 `json:"currentReplicas" protobuf:"varint,3,opt,name=currentReplicas"` - - // desired number of replicas of pods managed by this autoscaler. - DesiredReplicas int32 `json:"desiredReplicas" protobuf:"varint,4,opt,name=desiredReplicas"` - - // current average CPU utilization over all pods, represented as a percentage of requested CPU, - // e.g. 70 means that an average pod is using now 70% of its requested CPU. - CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty" protobuf:"varint,5,opt,name=currentCPUUtilizationPercentage"` -} - -// +genclient=true - -// configuration of a horizontal pod autoscaler. -type HorizontalPodAutoscaler struct { - unversioned.TypeMeta `json:",inline"` - // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. - Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // current information about the autoscaler. - Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// list of horizontal pod autoscaler objects. -type HorizontalPodAutoscalerList struct { - unversioned.TypeMeta `json:",inline"` - // Standard list metadata. - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // list of horizontal pod autoscaler objects. - Items []HorizontalPodAutoscaler `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// Scale represents a scaling request for a resource. -type Scale struct { - unversioned.TypeMeta `json:",inline"` - // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. - Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only. - Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// ScaleSpec describes the attributes of a scale subresource. -type ScaleSpec struct { - // desired number of instances for the scaled object. - Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` -} - -// ScaleStatus represents the current status of a scale subresource. -type ScaleStatus struct { - // actual number of observed instances of the scaled object. - Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"` - - // label query over pods that should match the replicas count. This is same - // as the label selector but in the string format to avoid introspection - // by clients. The string will be in the same format as the query-param syntax. - // More info about label selectors: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - Selector string `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go deleted file mode 100644 index 6b9bcf47e..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go +++ /dev/null @@ -1,117 +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_CrossVersionObjectReference = map[string]string{ - "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", - "kind": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds\"", - "name": "Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names", - "apiVersion": "API version of the referent", -} - -func (CrossVersionObjectReference) SwaggerDoc() map[string]string { - return map_CrossVersionObjectReference -} - -var map_HorizontalPodAutoscaler = map[string]string{ - "": "configuration of a horizontal pod autoscaler.", - "metadata": "Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "spec": "behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", - "status": "current information about the autoscaler.", -} - -func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string { - return map_HorizontalPodAutoscaler -} - -var map_HorizontalPodAutoscalerList = map[string]string{ - "": "list of horizontal pod autoscaler objects.", - "metadata": "Standard list metadata.", - "items": "list of horizontal pod autoscaler objects.", -} - -func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string { - return map_HorizontalPodAutoscalerList -} - -var map_HorizontalPodAutoscalerSpec = map[string]string{ - "": "specification of a horizontal pod autoscaler.", - "scaleTargetRef": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.", - "minReplicas": "lower limit for the number of pods that can be set by the autoscaler, default 1.", - "maxReplicas": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.", - "targetCPUUtilizationPercentage": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.", -} - -func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string { - return map_HorizontalPodAutoscalerSpec -} - -var map_HorizontalPodAutoscalerStatus = map[string]string{ - "": "current status of a horizontal pod autoscaler", - "observedGeneration": "most recent generation observed by this autoscaler.", - "lastScaleTime": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.", - "currentReplicas": "current number of replicas of pods managed by this autoscaler.", - "desiredReplicas": "desired number of replicas of pods managed by this autoscaler.", - "currentCPUUtilizationPercentage": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.", -} - -func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string { - return map_HorizontalPodAutoscalerStatus -} - -var map_Scale = map[string]string{ - "": "Scale represents a scaling request for a resource.", - "metadata": "Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.", - "spec": "defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", - "status": "current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.", -} - -func (Scale) SwaggerDoc() map[string]string { - return map_Scale -} - -var map_ScaleSpec = map[string]string{ - "": "ScaleSpec describes the attributes of a scale subresource.", - "replicas": "desired number of instances for the scaled object.", -} - -func (ScaleSpec) SwaggerDoc() map[string]string { - return map_ScaleSpec -} - -var map_ScaleStatus = map[string]string{ - "": "ScaleStatus represents the current status of a scale subresource.", - "replicas": "actual number of observed instances of the scaled object.", - "selector": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors", -} - -func (ScaleStatus) SwaggerDoc() map[string]string { - return map_ScaleStatus -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/zz_generated.conversion.go deleted file mode 100644 index cc51da305..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/zz_generated.conversion.go +++ /dev/null @@ -1,304 +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/client-go/1.5/pkg/api" - autoscaling "k8s.io/client-go/1.5/pkg/apis/autoscaling" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" -) - -func init() { - SchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference, - Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference, - Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler, - Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler, - Convert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList, - Convert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList, - Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec, - Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec, - Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus, - Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus, - Convert_v1_Scale_To_autoscaling_Scale, - Convert_autoscaling_Scale_To_v1_Scale, - Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec, - Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec, - Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus, - Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus, - ) -} - -func autoConvert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error { - out.Kind = in.Kind - out.Name = in.Name - out.APIVersion = in.APIVersion - return nil -} - -func Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error { - return autoConvert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in, out, s) -} - -func autoConvert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *CrossVersionObjectReference, s conversion.Scope) error { - out.Kind = in.Kind - out.Name = in.Name - out.APIVersion = in.APIVersion - return nil -} - -func Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *CrossVersionObjectReference, s conversion.Scope) error { - return autoConvert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(in, out, s) -} - -func autoConvert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { - SetDefaults_HorizontalPodAutoscaler(in) - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { - return autoConvert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in, out, s) -} - -func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error { - return autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in, out, s) -} - -func autoConvert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]autoscaling.HorizontalPodAutoscaler, len(*in)) - for i := range *in { - if err := Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error { - return autoConvert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in, out, s) -} - -func autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]HorizontalPodAutoscaler, len(*in)) - for i := range *in { - if err := Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error { - return autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in, out, s) -} - -func autoConvert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error { - if err := Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil { - return err - } - out.MinReplicas = in.MinReplicas - out.MaxReplicas = in.MaxReplicas - out.TargetCPUUtilizationPercentage = in.TargetCPUUtilizationPercentage - return nil -} - -func Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error { - return autoConvert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in, out, s) -} - -func autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error { - if err := Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil { - return err - } - out.MinReplicas = in.MinReplicas - out.MaxReplicas = in.MaxReplicas - out.TargetCPUUtilizationPercentage = in.TargetCPUUtilizationPercentage - return nil -} - -func Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error { - return autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(in, out, s) -} - -func autoConvert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error { - out.ObservedGeneration = in.ObservedGeneration - out.LastScaleTime = in.LastScaleTime - out.CurrentReplicas = in.CurrentReplicas - out.DesiredReplicas = in.DesiredReplicas - out.CurrentCPUUtilizationPercentage = in.CurrentCPUUtilizationPercentage - return nil -} - -func Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error { - return autoConvert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in, out, s) -} - -func autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error { - out.ObservedGeneration = in.ObservedGeneration - out.LastScaleTime = in.LastScaleTime - out.CurrentReplicas = in.CurrentReplicas - out.DesiredReplicas = in.DesiredReplicas - out.CurrentCPUUtilizationPercentage = in.CurrentCPUUtilizationPercentage - return nil -} - -func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error { - return autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in, out, s) -} - -func autoConvert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s conversion.Scope) error { - return autoConvert_v1_Scale_To_autoscaling_Scale(in, out, s) -} - -func autoConvert_autoscaling_Scale_To_v1_Scale(in *autoscaling.Scale, out *Scale, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_autoscaling_Scale_To_v1_Scale(in *autoscaling.Scale, out *Scale, s conversion.Scope) error { - return autoConvert_autoscaling_Scale_To_v1_Scale(in, out, s) -} - -func autoConvert_v1_ScaleSpec_To_autoscaling_ScaleSpec(in *ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error { - out.Replicas = in.Replicas - return nil -} - -func Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec(in *ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error { - return autoConvert_v1_ScaleSpec_To_autoscaling_ScaleSpec(in, out, s) -} - -func autoConvert_autoscaling_ScaleSpec_To_v1_ScaleSpec(in *autoscaling.ScaleSpec, out *ScaleSpec, s conversion.Scope) error { - out.Replicas = in.Replicas - return nil -} - -func Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec(in *autoscaling.ScaleSpec, out *ScaleSpec, s conversion.Scope) error { - return autoConvert_autoscaling_ScaleSpec_To_v1_ScaleSpec(in, out, s) -} - -func autoConvert_v1_ScaleStatus_To_autoscaling_ScaleStatus(in *ScaleStatus, out *autoscaling.ScaleStatus, s conversion.Scope) error { - out.Replicas = in.Replicas - out.Selector = in.Selector - return nil -} - -func Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus(in *ScaleStatus, out *autoscaling.ScaleStatus, s conversion.Scope) error { - return autoConvert_v1_ScaleStatus_To_autoscaling_ScaleStatus(in, out, s) -} - -func autoConvert_autoscaling_ScaleStatus_To_v1_ScaleStatus(in *autoscaling.ScaleStatus, out *ScaleStatus, s conversion.Scope) error { - out.Replicas = in.Replicas - out.Selector = in.Selector - return nil -} - -func Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus(in *autoscaling.ScaleStatus, out *ScaleStatus, s conversion.Scope) error { - return autoConvert_autoscaling_ScaleStatus_To_v1_ScaleStatus(in, out, s) -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go deleted file mode 100644 index 9146f3925..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,186 +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 ( - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - api_v1 "k8s.io/client-go/1.5/pkg/api/v1" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" - reflect "reflect" -) - -func init() { - SchemeBuilder.Register(RegisterDeepCopies) -} - -// RegisterDeepCopies adds deep-copy functions to the given scheme. Public -// to allow building arbitrary schemes. -func RegisterDeepCopies(scheme *runtime.Scheme) error { - return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Scale, InType: reflect.TypeOf(&Scale{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})}, - ) -} - -func DeepCopy_v1_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*CrossVersionObjectReference) - out := out.(*CrossVersionObjectReference) - out.Kind = in.Kind - out.Name = in.Name - out.APIVersion = in.APIVersion - return nil - } -} - -func DeepCopy_v1_HorizontalPodAutoscaler(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*HorizontalPodAutoscaler) - out := out.(*HorizontalPodAutoscaler) - out.TypeMeta = in.TypeMeta - if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - if err := DeepCopy_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - if err := DeepCopy_v1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_v1_HorizontalPodAutoscalerList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*HorizontalPodAutoscalerList) - out := out.(*HorizontalPodAutoscalerList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]HorizontalPodAutoscaler, len(*in)) - for i := range *in { - if err := DeepCopy_v1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil - } -} - -func DeepCopy_v1_HorizontalPodAutoscalerSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*HorizontalPodAutoscalerSpec) - out := out.(*HorizontalPodAutoscalerSpec) - out.ScaleTargetRef = in.ScaleTargetRef - if in.MinReplicas != nil { - in, out := &in.MinReplicas, &out.MinReplicas - *out = new(int32) - **out = **in - } else { - out.MinReplicas = nil - } - out.MaxReplicas = in.MaxReplicas - if in.TargetCPUUtilizationPercentage != nil { - in, out := &in.TargetCPUUtilizationPercentage, &out.TargetCPUUtilizationPercentage - *out = new(int32) - **out = **in - } else { - out.TargetCPUUtilizationPercentage = nil - } - return nil - } -} - -func DeepCopy_v1_HorizontalPodAutoscalerStatus(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*HorizontalPodAutoscalerStatus) - out := out.(*HorizontalPodAutoscalerStatus) - if in.ObservedGeneration != nil { - in, out := &in.ObservedGeneration, &out.ObservedGeneration - *out = new(int64) - **out = **in - } else { - out.ObservedGeneration = nil - } - if in.LastScaleTime != nil { - in, out := &in.LastScaleTime, &out.LastScaleTime - *out = new(unversioned.Time) - **out = (*in).DeepCopy() - } else { - out.LastScaleTime = nil - } - out.CurrentReplicas = in.CurrentReplicas - out.DesiredReplicas = in.DesiredReplicas - if in.CurrentCPUUtilizationPercentage != nil { - in, out := &in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage - *out = new(int32) - **out = **in - } else { - out.CurrentCPUUtilizationPercentage = nil - } - return nil - } -} - -func DeepCopy_v1_Scale(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Scale) - out := out.(*Scale) - out.TypeMeta = in.TypeMeta - if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - out.Spec = in.Spec - out.Status = in.Status - return nil - } -} - -func DeepCopy_v1_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ScaleSpec) - out := out.(*ScaleSpec) - out.Replicas = in.Replicas - return nil - } -} - -func DeepCopy_v1_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ScaleStatus) - out := out.(*ScaleStatus) - out.Replicas = in.Replicas - out.Selector = in.Selector - return nil - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/zz_generated.deepcopy.go deleted file mode 100644 index 1f367bf37..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/zz_generated.deepcopy.go +++ /dev/null @@ -1,186 +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 autoscaling - -import ( - api "k8s.io/client-go/1.5/pkg/api" - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" - reflect "reflect" -) - -func init() { - SchemeBuilder.Register(RegisterDeepCopies) -} - -// RegisterDeepCopies adds deep-copy functions to the given scheme. Public -// to allow building arbitrary schemes. -func RegisterDeepCopies(scheme *runtime.Scheme) error { - return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_Scale, InType: reflect.TypeOf(&Scale{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})}, - ) -} - -func DeepCopy_autoscaling_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*CrossVersionObjectReference) - out := out.(*CrossVersionObjectReference) - out.Kind = in.Kind - out.Name = in.Name - out.APIVersion = in.APIVersion - return nil - } -} - -func DeepCopy_autoscaling_HorizontalPodAutoscaler(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*HorizontalPodAutoscaler) - out := out.(*HorizontalPodAutoscaler) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - if err := DeepCopy_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - if err := DeepCopy_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_autoscaling_HorizontalPodAutoscalerList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*HorizontalPodAutoscalerList) - out := out.(*HorizontalPodAutoscalerList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]HorizontalPodAutoscaler, len(*in)) - for i := range *in { - if err := DeepCopy_autoscaling_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil - } -} - -func DeepCopy_autoscaling_HorizontalPodAutoscalerSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*HorizontalPodAutoscalerSpec) - out := out.(*HorizontalPodAutoscalerSpec) - out.ScaleTargetRef = in.ScaleTargetRef - if in.MinReplicas != nil { - in, out := &in.MinReplicas, &out.MinReplicas - *out = new(int32) - **out = **in - } else { - out.MinReplicas = nil - } - out.MaxReplicas = in.MaxReplicas - if in.TargetCPUUtilizationPercentage != nil { - in, out := &in.TargetCPUUtilizationPercentage, &out.TargetCPUUtilizationPercentage - *out = new(int32) - **out = **in - } else { - out.TargetCPUUtilizationPercentage = nil - } - return nil - } -} - -func DeepCopy_autoscaling_HorizontalPodAutoscalerStatus(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*HorizontalPodAutoscalerStatus) - out := out.(*HorizontalPodAutoscalerStatus) - if in.ObservedGeneration != nil { - in, out := &in.ObservedGeneration, &out.ObservedGeneration - *out = new(int64) - **out = **in - } else { - out.ObservedGeneration = nil - } - if in.LastScaleTime != nil { - in, out := &in.LastScaleTime, &out.LastScaleTime - *out = new(unversioned.Time) - **out = (*in).DeepCopy() - } else { - out.LastScaleTime = nil - } - out.CurrentReplicas = in.CurrentReplicas - out.DesiredReplicas = in.DesiredReplicas - if in.CurrentCPUUtilizationPercentage != nil { - in, out := &in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage - *out = new(int32) - **out = **in - } else { - out.CurrentCPUUtilizationPercentage = nil - } - return nil - } -} - -func DeepCopy_autoscaling_Scale(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Scale) - out := out.(*Scale) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - out.Spec = in.Spec - out.Status = in.Status - return nil - } -} - -func DeepCopy_autoscaling_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ScaleSpec) - out := out.(*ScaleSpec) - out.Replicas = in.Replicas - return nil - } -} - -func DeepCopy_autoscaling_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ScaleStatus) - out := out.(*ScaleStatus) - out.Replicas = in.Replicas - out.Selector = in.Selector - return nil - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/batch/doc.go deleted file mode 100644 index f8774e80a..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/doc.go +++ /dev/null @@ -1,20 +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,register -// +k8s:openapi-gen=true - -package batch diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/batch/types.generated.go deleted file mode 100644 index cd09a3c7f..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/types.generated.go +++ /dev/null @@ -1,4676 +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 batch - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - pkg2_api "k8s.io/client-go/1.5/pkg/api" - pkg4_resource "k8s.io/client-go/1.5/pkg/api/resource" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg3_types "k8s.io/client-go/1.5/pkg/types" - pkg5_intstr "k8s.io/client-go/1.5/pkg/util/intstr" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg2_api.ObjectMeta - var v1 pkg4_resource.Quantity - var v2 pkg1_unversioned.TypeMeta - var v3 pkg3_types.UID - var v4 pkg5_intstr.IntOrString - var v5 time.Time - _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 - } -} - -func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [5]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = x.Kind != "" - yyq2[1] = x.APIVersion != "" - yyq2[2] = true - yyq2[3] = true - yyq2[4] = true - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(5) - } else { - yynn2 = 0 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[1] { - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy11 := &x.ObjectMeta - yy11.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[3] { - yy13 := &x.Spec - yy13.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy14 := &x.Spec - yy14.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { - yy16 := &x.Status - yy16.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy17 := &x.Status - yy17.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Job) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym18 := z.DecBinary() - _ = yym18 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct19 := r.ContainerType() - if yyct19 == codecSelferValueTypeMap1234 { - yyl19 := r.ReadMapStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl19, d) - } - } else if yyct19 == codecSelferValueTypeArray1234 { - yyl19 := r.ReadArrayStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl19, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Job) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys20Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys20Slc - var yyhl20 bool = l >= 0 - for yyj20 := 0; ; yyj20++ { - if yyhl20 { - if yyj20 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys20Slc = r.DecodeBytes(yys20Slc, true, true) - yys20 := string(yys20Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys20 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv23 := &x.ObjectMeta - yyv23.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = JobSpec{} - } else { - yyv24 := &x.Spec - yyv24.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = JobStatus{} - } else { - yyv25 := &x.Status - yyv25.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys20) - } // end switch yys20 - } // end for yyj20 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj26 int - var yyb26 bool - var yyhl26 bool = l >= 0 - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv29 := &x.ObjectMeta - yyv29.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = JobSpec{} - } else { - yyv30 := &x.Spec - yyv30.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = JobStatus{} - } else { - yyv31 := &x.Status - yyv31.CodecDecodeSelf(d) - } - for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj26-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym32 := z.EncBinary() - _ = yym32 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep33 := !z.EncBinary() - yy2arr33 := z.EncBasicHandle().StructToArray - var yyq33 [4]bool - _, _, _ = yysep33, yyq33, yy2arr33 - const yyr33 bool = false - yyq33[0] = x.Kind != "" - yyq33[1] = x.APIVersion != "" - yyq33[2] = true - var yynn33 int - if yyr33 || yy2arr33 { - r.EncodeArrayStart(4) - } else { - yynn33 = 1 - for _, b := range yyq33 { - if b { - yynn33++ - } - } - r.EncodeMapStart(yynn33) - yynn33 = 0 - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[0] { - yym35 := z.EncBinary() - _ = yym35 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq33[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym36 := z.EncBinary() - _ = yym36 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[1] { - yym38 := z.EncBinary() - _ = yym38 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq33[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym39 := z.EncBinary() - _ = yym39 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[2] { - yy41 := &x.ListMeta - yym42 := z.EncBinary() - _ = yym42 - if false { - } else if z.HasExtensions() && z.EncExt(yy41) { - } else { - z.EncFallback(yy41) - } - } else { - r.EncodeNil() - } - } else { - if yyq33[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy43 := &x.ListMeta - yym44 := z.EncBinary() - _ = yym44 - if false { - } else if z.HasExtensions() && z.EncExt(yy43) { - } else { - z.EncFallback(yy43) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym46 := z.EncBinary() - _ = yym46 - if false { - } else { - h.encSliceJob(([]Job)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym47 := z.EncBinary() - _ = yym47 - if false { - } else { - h.encSliceJob(([]Job)(x.Items), e) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym48 := z.DecBinary() - _ = yym48 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct49 := r.ContainerType() - if yyct49 == codecSelferValueTypeMap1234 { - yyl49 := r.ReadMapStart() - if yyl49 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl49, d) - } - } else if yyct49 == codecSelferValueTypeArray1234 { - yyl49 := r.ReadArrayStart() - if yyl49 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl49, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys50Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys50Slc - var yyhl50 bool = l >= 0 - for yyj50 := 0; ; yyj50++ { - if yyhl50 { - if yyj50 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys50Slc = r.DecodeBytes(yys50Slc, true, true) - yys50 := string(yys50Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys50 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv53 := &x.ListMeta - yym54 := z.DecBinary() - _ = yym54 - if false { - } else if z.HasExtensions() && z.DecExt(yyv53) { - } else { - z.DecFallback(yyv53, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv55 := &x.Items - yym56 := z.DecBinary() - _ = yym56 - if false { - } else { - h.decSliceJob((*[]Job)(yyv55), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys50) - } // end switch yys50 - } // end for yyj50 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj57 int - var yyb57 bool - var yyhl57 bool = l >= 0 - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv60 := &x.ListMeta - yym61 := z.DecBinary() - _ = yym61 - if false { - } else if z.HasExtensions() && z.DecExt(yyv60) { - } else { - z.DecFallback(yyv60, false) - } - } - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv62 := &x.Items - yym63 := z.DecBinary() - _ = yym63 - if false { - } else { - h.decSliceJob((*[]Job)(yyv62), d) - } - } - for { - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj57-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobTemplate) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym64 := z.EncBinary() - _ = yym64 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep65 := !z.EncBinary() - yy2arr65 := z.EncBasicHandle().StructToArray - var yyq65 [4]bool - _, _, _ = yysep65, yyq65, yy2arr65 - const yyr65 bool = false - yyq65[0] = x.Kind != "" - yyq65[1] = x.APIVersion != "" - yyq65[2] = true - yyq65[3] = true - var yynn65 int - if yyr65 || yy2arr65 { - r.EncodeArrayStart(4) - } else { - yynn65 = 0 - for _, b := range yyq65 { - if b { - yynn65++ - } - } - r.EncodeMapStart(yynn65) - yynn65 = 0 - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[0] { - yym67 := z.EncBinary() - _ = yym67 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq65[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym68 := z.EncBinary() - _ = yym68 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[1] { - yym70 := z.EncBinary() - _ = yym70 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq65[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym71 := z.EncBinary() - _ = yym71 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[2] { - yy73 := &x.ObjectMeta - yy73.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq65[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy74 := &x.ObjectMeta - yy74.CodecEncodeSelf(e) - } - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[3] { - yy76 := &x.Template - yy76.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq65[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("template")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy77 := &x.Template - yy77.CodecEncodeSelf(e) - } - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobTemplate) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym78 := z.DecBinary() - _ = yym78 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct79 := r.ContainerType() - if yyct79 == codecSelferValueTypeMap1234 { - yyl79 := r.ReadMapStart() - if yyl79 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl79, d) - } - } else if yyct79 == codecSelferValueTypeArray1234 { - yyl79 := r.ReadArrayStart() - if yyl79 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl79, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys80Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys80Slc - var yyhl80 bool = l >= 0 - for yyj80 := 0; ; yyj80++ { - if yyhl80 { - if yyj80 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys80Slc = r.DecodeBytes(yys80Slc, true, true) - yys80 := string(yys80Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys80 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv83 := &x.ObjectMeta - yyv83.CodecDecodeSelf(d) - } - case "template": - if r.TryDecodeAsNil() { - x.Template = JobTemplateSpec{} - } else { - yyv84 := &x.Template - yyv84.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys80) - } // end switch yys80 - } // end for yyj80 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj85 int - var yyb85 bool - var yyhl85 bool = l >= 0 - yyj85++ - if yyhl85 { - yyb85 = yyj85 > l - } else { - yyb85 = r.CheckBreak() - } - if yyb85 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj85++ - if yyhl85 { - yyb85 = yyj85 > l - } else { - yyb85 = r.CheckBreak() - } - if yyb85 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj85++ - if yyhl85 { - yyb85 = yyj85 > l - } else { - yyb85 = r.CheckBreak() - } - if yyb85 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv88 := &x.ObjectMeta - yyv88.CodecDecodeSelf(d) - } - yyj85++ - if yyhl85 { - yyb85 = yyj85 > l - } else { - yyb85 = r.CheckBreak() - } - if yyb85 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Template = JobTemplateSpec{} - } else { - yyv89 := &x.Template - yyv89.CodecDecodeSelf(d) - } - for { - yyj85++ - if yyhl85 { - yyb85 = yyj85 > l - } else { - yyb85 = r.CheckBreak() - } - if yyb85 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj85-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym90 := z.EncBinary() - _ = yym90 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep91 := !z.EncBinary() - yy2arr91 := z.EncBasicHandle().StructToArray - var yyq91 [2]bool - _, _, _ = yysep91, yyq91, yy2arr91 - const yyr91 bool = false - yyq91[0] = true - yyq91[1] = true - var yynn91 int - if yyr91 || yy2arr91 { - r.EncodeArrayStart(2) - } else { - yynn91 = 0 - for _, b := range yyq91 { - if b { - yynn91++ - } - } - r.EncodeMapStart(yynn91) - yynn91 = 0 - } - if yyr91 || yy2arr91 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq91[0] { - yy93 := &x.ObjectMeta - yy93.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq91[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy94 := &x.ObjectMeta - yy94.CodecEncodeSelf(e) - } - } - if yyr91 || yy2arr91 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq91[1] { - yy96 := &x.Spec - yy96.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq91[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy97 := &x.Spec - yy97.CodecEncodeSelf(e) - } - } - if yyr91 || yy2arr91 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobTemplateSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym98 := z.DecBinary() - _ = yym98 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct99 := r.ContainerType() - if yyct99 == codecSelferValueTypeMap1234 { - yyl99 := r.ReadMapStart() - if yyl99 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl99, d) - } - } else if yyct99 == codecSelferValueTypeArray1234 { - yyl99 := r.ReadArrayStart() - if yyl99 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl99, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys100Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys100Slc - var yyhl100 bool = l >= 0 - for yyj100 := 0; ; yyj100++ { - if yyhl100 { - if yyj100 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys100Slc = r.DecodeBytes(yys100Slc, true, true) - yys100 := string(yys100Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys100 { - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv101 := &x.ObjectMeta - yyv101.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = JobSpec{} - } else { - yyv102 := &x.Spec - yyv102.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys100) - } // end switch yys100 - } // end for yyj100 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj103 int - var yyb103 bool - var yyhl103 bool = l >= 0 - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv104 := &x.ObjectMeta - yyv104.CodecDecodeSelf(d) - } - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = JobSpec{} - } else { - yyv105 := &x.Spec - yyv105.CodecDecodeSelf(d) - } - for { - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj103-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym106 := z.EncBinary() - _ = yym106 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep107 := !z.EncBinary() - yy2arr107 := z.EncBasicHandle().StructToArray - var yyq107 [6]bool - _, _, _ = yysep107, yyq107, yy2arr107 - const yyr107 bool = false - yyq107[0] = x.Parallelism != nil - yyq107[1] = x.Completions != nil - yyq107[2] = x.ActiveDeadlineSeconds != nil - yyq107[3] = x.Selector != nil - yyq107[4] = x.ManualSelector != nil - var yynn107 int - if yyr107 || yy2arr107 { - r.EncodeArrayStart(6) - } else { - yynn107 = 1 - for _, b := range yyq107 { - if b { - yynn107++ - } - } - r.EncodeMapStart(yynn107) - yynn107 = 0 - } - if yyr107 || yy2arr107 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq107[0] { - if x.Parallelism == nil { - r.EncodeNil() - } else { - yy109 := *x.Parallelism - yym110 := z.EncBinary() - _ = yym110 - if false { - } else { - r.EncodeInt(int64(yy109)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq107[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("parallelism")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Parallelism == nil { - r.EncodeNil() - } else { - yy111 := *x.Parallelism - yym112 := z.EncBinary() - _ = yym112 - if false { - } else { - r.EncodeInt(int64(yy111)) - } - } - } - } - if yyr107 || yy2arr107 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq107[1] { - if x.Completions == nil { - r.EncodeNil() - } else { - yy114 := *x.Completions - yym115 := z.EncBinary() - _ = yym115 - if false { - } else { - r.EncodeInt(int64(yy114)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq107[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("completions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Completions == nil { - r.EncodeNil() - } else { - yy116 := *x.Completions - yym117 := z.EncBinary() - _ = yym117 - if false { - } else { - r.EncodeInt(int64(yy116)) - } - } - } - } - if yyr107 || yy2arr107 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq107[2] { - if x.ActiveDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy119 := *x.ActiveDeadlineSeconds - yym120 := z.EncBinary() - _ = yym120 - if false { - } else { - r.EncodeInt(int64(yy119)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq107[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("activeDeadlineSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ActiveDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy121 := *x.ActiveDeadlineSeconds - yym122 := z.EncBinary() - _ = yym122 - if false { - } else { - r.EncodeInt(int64(yy121)) - } - } - } - } - if yyr107 || yy2arr107 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq107[3] { - if x.Selector == nil { - r.EncodeNil() - } else { - yym124 := z.EncBinary() - _ = yym124 - if false { - } else if z.HasExtensions() && z.EncExt(x.Selector) { - } else { - z.EncFallback(x.Selector) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq107[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Selector == nil { - r.EncodeNil() - } else { - yym125 := z.EncBinary() - _ = yym125 - if false { - } else if z.HasExtensions() && z.EncExt(x.Selector) { - } else { - z.EncFallback(x.Selector) - } - } - } - } - if yyr107 || yy2arr107 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq107[4] { - if x.ManualSelector == nil { - r.EncodeNil() - } else { - yy127 := *x.ManualSelector - yym128 := z.EncBinary() - _ = yym128 - if false { - } else { - r.EncodeBool(bool(yy127)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq107[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("manualSelector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ManualSelector == nil { - r.EncodeNil() - } else { - yy129 := *x.ManualSelector - yym130 := z.EncBinary() - _ = yym130 - if false { - } else { - r.EncodeBool(bool(yy129)) - } - } - } - } - if yyr107 || yy2arr107 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy132 := &x.Template - yy132.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("template")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy133 := &x.Template - yy133.CodecEncodeSelf(e) - } - if yyr107 || yy2arr107 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym134 := z.DecBinary() - _ = yym134 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct135 := r.ContainerType() - if yyct135 == codecSelferValueTypeMap1234 { - yyl135 := r.ReadMapStart() - if yyl135 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl135, d) - } - } else if yyct135 == codecSelferValueTypeArray1234 { - yyl135 := r.ReadArrayStart() - if yyl135 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl135, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys136Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys136Slc - var yyhl136 bool = l >= 0 - for yyj136 := 0; ; yyj136++ { - if yyhl136 { - if yyj136 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys136Slc = r.DecodeBytes(yys136Slc, true, true) - yys136 := string(yys136Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys136 { - case "parallelism": - if r.TryDecodeAsNil() { - if x.Parallelism != nil { - x.Parallelism = nil - } - } else { - if x.Parallelism == nil { - x.Parallelism = new(int32) - } - yym138 := z.DecBinary() - _ = yym138 - if false { - } else { - *((*int32)(x.Parallelism)) = int32(r.DecodeInt(32)) - } - } - case "completions": - if r.TryDecodeAsNil() { - if x.Completions != nil { - x.Completions = nil - } - } else { - if x.Completions == nil { - x.Completions = new(int32) - } - yym140 := z.DecBinary() - _ = yym140 - if false { - } else { - *((*int32)(x.Completions)) = int32(r.DecodeInt(32)) - } - } - case "activeDeadlineSeconds": - if r.TryDecodeAsNil() { - if x.ActiveDeadlineSeconds != nil { - x.ActiveDeadlineSeconds = nil - } - } else { - if x.ActiveDeadlineSeconds == nil { - x.ActiveDeadlineSeconds = new(int64) - } - yym142 := z.DecBinary() - _ = yym142 - if false { - } else { - *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) - } - } - case "selector": - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(pkg1_unversioned.LabelSelector) - } - yym144 := z.DecBinary() - _ = yym144 - if false { - } else if z.HasExtensions() && z.DecExt(x.Selector) { - } else { - z.DecFallback(x.Selector, false) - } - } - case "manualSelector": - if r.TryDecodeAsNil() { - if x.ManualSelector != nil { - x.ManualSelector = nil - } - } else { - if x.ManualSelector == nil { - x.ManualSelector = new(bool) - } - yym146 := z.DecBinary() - _ = yym146 - if false { - } else { - *((*bool)(x.ManualSelector)) = r.DecodeBool() - } - } - case "template": - if r.TryDecodeAsNil() { - x.Template = pkg2_api.PodTemplateSpec{} - } else { - yyv147 := &x.Template - yyv147.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys136) - } // end switch yys136 - } // end for yyj136 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj148 int - var yyb148 bool - var yyhl148 bool = l >= 0 - yyj148++ - if yyhl148 { - yyb148 = yyj148 > l - } else { - yyb148 = r.CheckBreak() - } - if yyb148 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Parallelism != nil { - x.Parallelism = nil - } - } else { - if x.Parallelism == nil { - x.Parallelism = new(int32) - } - yym150 := z.DecBinary() - _ = yym150 - if false { - } else { - *((*int32)(x.Parallelism)) = int32(r.DecodeInt(32)) - } - } - yyj148++ - if yyhl148 { - yyb148 = yyj148 > l - } else { - yyb148 = r.CheckBreak() - } - if yyb148 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Completions != nil { - x.Completions = nil - } - } else { - if x.Completions == nil { - x.Completions = new(int32) - } - yym152 := z.DecBinary() - _ = yym152 - if false { - } else { - *((*int32)(x.Completions)) = int32(r.DecodeInt(32)) - } - } - yyj148++ - if yyhl148 { - yyb148 = yyj148 > l - } else { - yyb148 = r.CheckBreak() - } - if yyb148 { - 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) - } - yym154 := z.DecBinary() - _ = yym154 - if false { - } else { - *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) - } - } - yyj148++ - if yyhl148 { - yyb148 = yyj148 > l - } else { - yyb148 = r.CheckBreak() - } - if yyb148 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(pkg1_unversioned.LabelSelector) - } - yym156 := z.DecBinary() - _ = yym156 - if false { - } else if z.HasExtensions() && z.DecExt(x.Selector) { - } else { - z.DecFallback(x.Selector, false) - } - } - yyj148++ - if yyhl148 { - yyb148 = yyj148 > l - } else { - yyb148 = r.CheckBreak() - } - if yyb148 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.ManualSelector != nil { - x.ManualSelector = nil - } - } else { - if x.ManualSelector == nil { - x.ManualSelector = new(bool) - } - yym158 := z.DecBinary() - _ = yym158 - if false { - } else { - *((*bool)(x.ManualSelector)) = r.DecodeBool() - } - } - yyj148++ - if yyhl148 { - yyb148 = yyj148 > l - } else { - yyb148 = r.CheckBreak() - } - if yyb148 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Template = pkg2_api.PodTemplateSpec{} - } else { - yyv159 := &x.Template - yyv159.CodecDecodeSelf(d) - } - for { - yyj148++ - if yyhl148 { - yyb148 = yyj148 > l - } else { - yyb148 = r.CheckBreak() - } - if yyb148 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj148-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym160 := z.EncBinary() - _ = yym160 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep161 := !z.EncBinary() - yy2arr161 := z.EncBasicHandle().StructToArray - var yyq161 [6]bool - _, _, _ = yysep161, yyq161, yy2arr161 - const yyr161 bool = false - yyq161[0] = len(x.Conditions) != 0 - yyq161[1] = x.StartTime != nil - yyq161[2] = x.CompletionTime != nil - yyq161[3] = x.Active != 0 - yyq161[4] = x.Succeeded != 0 - yyq161[5] = x.Failed != 0 - var yynn161 int - if yyr161 || yy2arr161 { - r.EncodeArrayStart(6) - } else { - yynn161 = 0 - for _, b := range yyq161 { - if b { - yynn161++ - } - } - r.EncodeMapStart(yynn161) - yynn161 = 0 - } - if yyr161 || yy2arr161 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq161[0] { - if x.Conditions == nil { - r.EncodeNil() - } else { - yym163 := z.EncBinary() - _ = yym163 - if false { - } else { - h.encSliceJobCondition(([]JobCondition)(x.Conditions), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq161[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("conditions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Conditions == nil { - r.EncodeNil() - } else { - yym164 := z.EncBinary() - _ = yym164 - if false { - } else { - h.encSliceJobCondition(([]JobCondition)(x.Conditions), e) - } - } - } - } - if yyr161 || yy2arr161 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq161[1] { - if x.StartTime == nil { - r.EncodeNil() - } else { - yym166 := z.EncBinary() - _ = yym166 - if false { - } else if z.HasExtensions() && z.EncExt(x.StartTime) { - } else if yym166 { - z.EncBinaryMarshal(x.StartTime) - } else if !yym166 && z.IsJSONHandle() { - z.EncJSONMarshal(x.StartTime) - } else { - z.EncFallback(x.StartTime) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq161[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("startTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.StartTime == nil { - r.EncodeNil() - } else { - yym167 := z.EncBinary() - _ = yym167 - if false { - } else if z.HasExtensions() && z.EncExt(x.StartTime) { - } else if yym167 { - z.EncBinaryMarshal(x.StartTime) - } else if !yym167 && z.IsJSONHandle() { - z.EncJSONMarshal(x.StartTime) - } else { - z.EncFallback(x.StartTime) - } - } - } - } - if yyr161 || yy2arr161 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq161[2] { - if x.CompletionTime == nil { - r.EncodeNil() - } else { - yym169 := z.EncBinary() - _ = yym169 - if false { - } else if z.HasExtensions() && z.EncExt(x.CompletionTime) { - } else if yym169 { - z.EncBinaryMarshal(x.CompletionTime) - } else if !yym169 && z.IsJSONHandle() { - z.EncJSONMarshal(x.CompletionTime) - } else { - z.EncFallback(x.CompletionTime) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq161[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("completionTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.CompletionTime == nil { - r.EncodeNil() - } else { - yym170 := z.EncBinary() - _ = yym170 - if false { - } else if z.HasExtensions() && z.EncExt(x.CompletionTime) { - } else if yym170 { - z.EncBinaryMarshal(x.CompletionTime) - } else if !yym170 && z.IsJSONHandle() { - z.EncJSONMarshal(x.CompletionTime) - } else { - z.EncFallback(x.CompletionTime) - } - } - } - } - if yyr161 || yy2arr161 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq161[3] { - yym172 := z.EncBinary() - _ = yym172 - if false { - } else { - r.EncodeInt(int64(x.Active)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq161[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("active")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym173 := z.EncBinary() - _ = yym173 - if false { - } else { - r.EncodeInt(int64(x.Active)) - } - } - } - if yyr161 || yy2arr161 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq161[4] { - yym175 := z.EncBinary() - _ = yym175 - if false { - } else { - r.EncodeInt(int64(x.Succeeded)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq161[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("succeeded")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym176 := z.EncBinary() - _ = yym176 - if false { - } else { - r.EncodeInt(int64(x.Succeeded)) - } - } - } - if yyr161 || yy2arr161 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq161[5] { - yym178 := z.EncBinary() - _ = yym178 - if false { - } else { - r.EncodeInt(int64(x.Failed)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq161[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("failed")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym179 := z.EncBinary() - _ = yym179 - if false { - } else { - r.EncodeInt(int64(x.Failed)) - } - } - } - if yyr161 || yy2arr161 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym180 := z.DecBinary() - _ = yym180 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct181 := r.ContainerType() - if yyct181 == codecSelferValueTypeMap1234 { - yyl181 := r.ReadMapStart() - if yyl181 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl181, d) - } - } else if yyct181 == codecSelferValueTypeArray1234 { - yyl181 := r.ReadArrayStart() - if yyl181 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl181, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys182Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys182Slc - var yyhl182 bool = l >= 0 - for yyj182 := 0; ; yyj182++ { - if yyhl182 { - if yyj182 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys182Slc = r.DecodeBytes(yys182Slc, true, true) - yys182 := string(yys182Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys182 { - case "conditions": - if r.TryDecodeAsNil() { - x.Conditions = nil - } else { - yyv183 := &x.Conditions - yym184 := z.DecBinary() - _ = yym184 - if false { - } else { - h.decSliceJobCondition((*[]JobCondition)(yyv183), d) - } - } - case "startTime": - if r.TryDecodeAsNil() { - if x.StartTime != nil { - x.StartTime = nil - } - } else { - if x.StartTime == nil { - x.StartTime = new(pkg1_unversioned.Time) - } - yym186 := z.DecBinary() - _ = yym186 - if false { - } else if z.HasExtensions() && z.DecExt(x.StartTime) { - } else if yym186 { - z.DecBinaryUnmarshal(x.StartTime) - } else if !yym186 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.StartTime) - } else { - z.DecFallback(x.StartTime, false) - } - } - case "completionTime": - if r.TryDecodeAsNil() { - if x.CompletionTime != nil { - x.CompletionTime = nil - } - } else { - if x.CompletionTime == nil { - x.CompletionTime = new(pkg1_unversioned.Time) - } - yym188 := z.DecBinary() - _ = yym188 - if false { - } else if z.HasExtensions() && z.DecExt(x.CompletionTime) { - } else if yym188 { - z.DecBinaryUnmarshal(x.CompletionTime) - } else if !yym188 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.CompletionTime) - } else { - z.DecFallback(x.CompletionTime, false) - } - } - case "active": - if r.TryDecodeAsNil() { - x.Active = 0 - } else { - x.Active = int32(r.DecodeInt(32)) - } - case "succeeded": - if r.TryDecodeAsNil() { - x.Succeeded = 0 - } else { - x.Succeeded = int32(r.DecodeInt(32)) - } - case "failed": - if r.TryDecodeAsNil() { - x.Failed = 0 - } else { - x.Failed = int32(r.DecodeInt(32)) - } - default: - z.DecStructFieldNotFound(-1, yys182) - } // end switch yys182 - } // end for yyj182 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj192 int - var yyb192 bool - var yyhl192 bool = l >= 0 - yyj192++ - if yyhl192 { - yyb192 = yyj192 > l - } else { - yyb192 = r.CheckBreak() - } - if yyb192 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Conditions = nil - } else { - yyv193 := &x.Conditions - yym194 := z.DecBinary() - _ = yym194 - if false { - } else { - h.decSliceJobCondition((*[]JobCondition)(yyv193), d) - } - } - yyj192++ - if yyhl192 { - yyb192 = yyj192 > l - } else { - yyb192 = r.CheckBreak() - } - if yyb192 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.StartTime != nil { - x.StartTime = nil - } - } else { - if x.StartTime == nil { - x.StartTime = new(pkg1_unversioned.Time) - } - yym196 := z.DecBinary() - _ = yym196 - if false { - } else if z.HasExtensions() && z.DecExt(x.StartTime) { - } else if yym196 { - z.DecBinaryUnmarshal(x.StartTime) - } else if !yym196 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.StartTime) - } else { - z.DecFallback(x.StartTime, false) - } - } - yyj192++ - if yyhl192 { - yyb192 = yyj192 > l - } else { - yyb192 = r.CheckBreak() - } - if yyb192 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.CompletionTime != nil { - x.CompletionTime = nil - } - } else { - if x.CompletionTime == nil { - x.CompletionTime = new(pkg1_unversioned.Time) - } - yym198 := z.DecBinary() - _ = yym198 - if false { - } else if z.HasExtensions() && z.DecExt(x.CompletionTime) { - } else if yym198 { - z.DecBinaryUnmarshal(x.CompletionTime) - } else if !yym198 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.CompletionTime) - } else { - z.DecFallback(x.CompletionTime, false) - } - } - yyj192++ - if yyhl192 { - yyb192 = yyj192 > l - } else { - yyb192 = r.CheckBreak() - } - if yyb192 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Active = 0 - } else { - x.Active = int32(r.DecodeInt(32)) - } - yyj192++ - if yyhl192 { - yyb192 = yyj192 > l - } else { - yyb192 = r.CheckBreak() - } - if yyb192 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Succeeded = 0 - } else { - x.Succeeded = int32(r.DecodeInt(32)) - } - yyj192++ - if yyhl192 { - yyb192 = yyj192 > l - } else { - yyb192 = r.CheckBreak() - } - if yyb192 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Failed = 0 - } else { - x.Failed = int32(r.DecodeInt(32)) - } - for { - yyj192++ - if yyhl192 { - yyb192 = yyj192 > l - } else { - yyb192 = r.CheckBreak() - } - if yyb192 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj192-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x JobConditionType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym202 := z.EncBinary() - _ = yym202 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *JobConditionType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym203 := z.DecBinary() - _ = yym203 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *JobCondition) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym204 := z.EncBinary() - _ = yym204 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep205 := !z.EncBinary() - yy2arr205 := z.EncBasicHandle().StructToArray - var yyq205 [6]bool - _, _, _ = yysep205, yyq205, yy2arr205 - const yyr205 bool = false - yyq205[2] = true - yyq205[3] = true - yyq205[4] = x.Reason != "" - yyq205[5] = x.Message != "" - var yynn205 int - if yyr205 || yy2arr205 { - r.EncodeArrayStart(6) - } else { - yynn205 = 2 - for _, b := range yyq205 { - if b { - yynn205++ - } - } - r.EncodeMapStart(yynn205) - yynn205 = 0 - } - if yyr205 || yy2arr205 { - 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 yyr205 || yy2arr205 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym208 := z.EncBinary() - _ = yym208 - if false { - } else if z.HasExtensions() && z.EncExt(x.Status) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Status)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym209 := z.EncBinary() - _ = yym209 - if false { - } else if z.HasExtensions() && z.EncExt(x.Status) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Status)) - } - } - if yyr205 || yy2arr205 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq205[2] { - yy211 := &x.LastProbeTime - yym212 := z.EncBinary() - _ = yym212 - if false { - } else if z.HasExtensions() && z.EncExt(yy211) { - } else if yym212 { - z.EncBinaryMarshal(yy211) - } else if !yym212 && z.IsJSONHandle() { - z.EncJSONMarshal(yy211) - } else { - z.EncFallback(yy211) - } - } else { - r.EncodeNil() - } - } else { - if yyq205[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastProbeTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy213 := &x.LastProbeTime - yym214 := z.EncBinary() - _ = yym214 - if false { - } else if z.HasExtensions() && z.EncExt(yy213) { - } else if yym214 { - z.EncBinaryMarshal(yy213) - } else if !yym214 && z.IsJSONHandle() { - z.EncJSONMarshal(yy213) - } else { - z.EncFallback(yy213) - } - } - } - if yyr205 || yy2arr205 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq205[3] { - yy216 := &x.LastTransitionTime - yym217 := z.EncBinary() - _ = yym217 - if false { - } else if z.HasExtensions() && z.EncExt(yy216) { - } else if yym217 { - z.EncBinaryMarshal(yy216) - } else if !yym217 && z.IsJSONHandle() { - z.EncJSONMarshal(yy216) - } else { - z.EncFallback(yy216) - } - } else { - r.EncodeNil() - } - } else { - if yyq205[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy218 := &x.LastTransitionTime - yym219 := z.EncBinary() - _ = yym219 - if false { - } else if z.HasExtensions() && z.EncExt(yy218) { - } else if yym219 { - z.EncBinaryMarshal(yy218) - } else if !yym219 && z.IsJSONHandle() { - z.EncJSONMarshal(yy218) - } else { - z.EncFallback(yy218) - } - } - } - if yyr205 || yy2arr205 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq205[4] { - yym221 := z.EncBinary() - _ = yym221 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq205[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("reason")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym222 := z.EncBinary() - _ = yym222 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } - } - if yyr205 || yy2arr205 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq205[5] { - yym224 := z.EncBinary() - _ = yym224 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq205[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("message")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym225 := z.EncBinary() - _ = yym225 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } - } - if yyr205 || yy2arr205 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobCondition) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym226 := z.DecBinary() - _ = yym226 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct227 := r.ContainerType() - if yyct227 == codecSelferValueTypeMap1234 { - yyl227 := r.ReadMapStart() - if yyl227 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl227, d) - } - } else if yyct227 == codecSelferValueTypeArray1234 { - yyl227 := r.ReadArrayStart() - if yyl227 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl227, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys228Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys228Slc - var yyhl228 bool = l >= 0 - for yyj228 := 0; ; yyj228++ { - if yyhl228 { - if yyj228 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys228Slc = r.DecodeBytes(yys228Slc, true, true) - yys228 := string(yys228Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys228 { - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = JobConditionType(r.DecodeString()) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = pkg2_api.ConditionStatus(r.DecodeString()) - } - case "lastProbeTime": - if r.TryDecodeAsNil() { - x.LastProbeTime = pkg1_unversioned.Time{} - } else { - yyv231 := &x.LastProbeTime - yym232 := z.DecBinary() - _ = yym232 - if false { - } else if z.HasExtensions() && z.DecExt(yyv231) { - } else if yym232 { - z.DecBinaryUnmarshal(yyv231) - } else if !yym232 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv231) - } else { - z.DecFallback(yyv231, false) - } - } - case "lastTransitionTime": - if r.TryDecodeAsNil() { - x.LastTransitionTime = pkg1_unversioned.Time{} - } else { - yyv233 := &x.LastTransitionTime - yym234 := z.DecBinary() - _ = yym234 - if false { - } else if z.HasExtensions() && z.DecExt(yyv233) { - } else if yym234 { - z.DecBinaryUnmarshal(yyv233) - } else if !yym234 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv233) - } else { - z.DecFallback(yyv233, 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, yys228) - } // end switch yys228 - } // end for yyj228 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj237 int - var yyb237 bool - var yyhl237 bool = l >= 0 - yyj237++ - if yyhl237 { - yyb237 = yyj237 > l - } else { - yyb237 = r.CheckBreak() - } - if yyb237 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = JobConditionType(r.DecodeString()) - } - yyj237++ - if yyhl237 { - yyb237 = yyj237 > l - } else { - yyb237 = r.CheckBreak() - } - if yyb237 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = pkg2_api.ConditionStatus(r.DecodeString()) - } - yyj237++ - if yyhl237 { - yyb237 = yyj237 > l - } else { - yyb237 = r.CheckBreak() - } - if yyb237 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastProbeTime = pkg1_unversioned.Time{} - } else { - yyv240 := &x.LastProbeTime - yym241 := z.DecBinary() - _ = yym241 - if false { - } else if z.HasExtensions() && z.DecExt(yyv240) { - } else if yym241 { - z.DecBinaryUnmarshal(yyv240) - } else if !yym241 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv240) - } else { - z.DecFallback(yyv240, false) - } - } - yyj237++ - if yyhl237 { - yyb237 = yyj237 > l - } else { - yyb237 = r.CheckBreak() - } - if yyb237 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastTransitionTime = pkg1_unversioned.Time{} - } else { - yyv242 := &x.LastTransitionTime - yym243 := z.DecBinary() - _ = yym243 - if false { - } else if z.HasExtensions() && z.DecExt(yyv242) { - } else if yym243 { - z.DecBinaryUnmarshal(yyv242) - } else if !yym243 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv242) - } else { - z.DecFallback(yyv242, false) - } - } - yyj237++ - if yyhl237 { - yyb237 = yyj237 > l - } else { - yyb237 = r.CheckBreak() - } - if yyb237 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - yyj237++ - if yyhl237 { - yyb237 = yyj237 > l - } else { - yyb237 = r.CheckBreak() - } - if yyb237 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - for { - yyj237++ - if yyhl237 { - yyb237 = yyj237 > l - } else { - yyb237 = r.CheckBreak() - } - if yyb237 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj237-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ScheduledJob) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym246 := z.EncBinary() - _ = yym246 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep247 := !z.EncBinary() - yy2arr247 := z.EncBasicHandle().StructToArray - var yyq247 [5]bool - _, _, _ = yysep247, yyq247, yy2arr247 - const yyr247 bool = false - yyq247[0] = x.Kind != "" - yyq247[1] = x.APIVersion != "" - yyq247[2] = true - yyq247[3] = true - yyq247[4] = true - var yynn247 int - if yyr247 || yy2arr247 { - r.EncodeArrayStart(5) - } else { - yynn247 = 0 - for _, b := range yyq247 { - if b { - yynn247++ - } - } - r.EncodeMapStart(yynn247) - yynn247 = 0 - } - if yyr247 || yy2arr247 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq247[0] { - yym249 := z.EncBinary() - _ = yym249 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq247[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym250 := z.EncBinary() - _ = yym250 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr247 || yy2arr247 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq247[1] { - yym252 := z.EncBinary() - _ = yym252 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq247[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym253 := z.EncBinary() - _ = yym253 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr247 || yy2arr247 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq247[2] { - yy255 := &x.ObjectMeta - yy255.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq247[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy256 := &x.ObjectMeta - yy256.CodecEncodeSelf(e) - } - } - if yyr247 || yy2arr247 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq247[3] { - yy258 := &x.Spec - yy258.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq247[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy259 := &x.Spec - yy259.CodecEncodeSelf(e) - } - } - if yyr247 || yy2arr247 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq247[4] { - yy261 := &x.Status - yy261.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq247[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy262 := &x.Status - yy262.CodecEncodeSelf(e) - } - } - if yyr247 || yy2arr247 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScheduledJob) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym263 := z.DecBinary() - _ = yym263 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct264 := r.ContainerType() - if yyct264 == codecSelferValueTypeMap1234 { - yyl264 := r.ReadMapStart() - if yyl264 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl264, d) - } - } else if yyct264 == codecSelferValueTypeArray1234 { - yyl264 := r.ReadArrayStart() - if yyl264 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl264, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScheduledJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys265Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys265Slc - var yyhl265 bool = l >= 0 - for yyj265 := 0; ; yyj265++ { - if yyhl265 { - if yyj265 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys265Slc = r.DecodeBytes(yys265Slc, true, true) - yys265 := string(yys265Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys265 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv268 := &x.ObjectMeta - yyv268.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = ScheduledJobSpec{} - } else { - yyv269 := &x.Spec - yyv269.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = ScheduledJobStatus{} - } else { - yyv270 := &x.Status - yyv270.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys265) - } // end switch yys265 - } // end for yyj265 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScheduledJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj271 int - var yyb271 bool - var yyhl271 bool = l >= 0 - yyj271++ - if yyhl271 { - yyb271 = yyj271 > l - } else { - yyb271 = r.CheckBreak() - } - if yyb271 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj271++ - if yyhl271 { - yyb271 = yyj271 > l - } else { - yyb271 = r.CheckBreak() - } - if yyb271 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj271++ - if yyhl271 { - yyb271 = yyj271 > l - } else { - yyb271 = r.CheckBreak() - } - if yyb271 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv274 := &x.ObjectMeta - yyv274.CodecDecodeSelf(d) - } - yyj271++ - if yyhl271 { - yyb271 = yyj271 > l - } else { - yyb271 = r.CheckBreak() - } - if yyb271 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = ScheduledJobSpec{} - } else { - yyv275 := &x.Spec - yyv275.CodecDecodeSelf(d) - } - yyj271++ - if yyhl271 { - yyb271 = yyj271 > l - } else { - yyb271 = r.CheckBreak() - } - if yyb271 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = ScheduledJobStatus{} - } else { - yyv276 := &x.Status - yyv276.CodecDecodeSelf(d) - } - for { - yyj271++ - if yyhl271 { - yyb271 = yyj271 > l - } else { - yyb271 = r.CheckBreak() - } - if yyb271 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj271-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ScheduledJobList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym277 := z.EncBinary() - _ = yym277 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep278 := !z.EncBinary() - yy2arr278 := z.EncBasicHandle().StructToArray - var yyq278 [4]bool - _, _, _ = yysep278, yyq278, yy2arr278 - const yyr278 bool = false - yyq278[0] = x.Kind != "" - yyq278[1] = x.APIVersion != "" - yyq278[2] = true - var yynn278 int - if yyr278 || yy2arr278 { - r.EncodeArrayStart(4) - } else { - yynn278 = 1 - for _, b := range yyq278 { - if b { - yynn278++ - } - } - r.EncodeMapStart(yynn278) - yynn278 = 0 - } - if yyr278 || yy2arr278 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq278[0] { - yym280 := z.EncBinary() - _ = yym280 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq278[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym281 := z.EncBinary() - _ = yym281 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr278 || yy2arr278 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq278[1] { - yym283 := z.EncBinary() - _ = yym283 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq278[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym284 := z.EncBinary() - _ = yym284 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr278 || yy2arr278 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq278[2] { - yy286 := &x.ListMeta - yym287 := z.EncBinary() - _ = yym287 - if false { - } else if z.HasExtensions() && z.EncExt(yy286) { - } else { - z.EncFallback(yy286) - } - } else { - r.EncodeNil() - } - } else { - if yyq278[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy288 := &x.ListMeta - yym289 := z.EncBinary() - _ = yym289 - if false { - } else if z.HasExtensions() && z.EncExt(yy288) { - } else { - z.EncFallback(yy288) - } - } - } - if yyr278 || yy2arr278 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym291 := z.EncBinary() - _ = yym291 - if false { - } else { - h.encSliceScheduledJob(([]ScheduledJob)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym292 := z.EncBinary() - _ = yym292 - if false { - } else { - h.encSliceScheduledJob(([]ScheduledJob)(x.Items), e) - } - } - } - if yyr278 || yy2arr278 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScheduledJobList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym293 := z.DecBinary() - _ = yym293 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct294 := r.ContainerType() - if yyct294 == codecSelferValueTypeMap1234 { - yyl294 := r.ReadMapStart() - if yyl294 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl294, d) - } - } else if yyct294 == codecSelferValueTypeArray1234 { - yyl294 := r.ReadArrayStart() - if yyl294 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl294, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScheduledJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys295Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys295Slc - var yyhl295 bool = l >= 0 - for yyj295 := 0; ; yyj295++ { - if yyhl295 { - if yyj295 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys295Slc = r.DecodeBytes(yys295Slc, true, true) - yys295 := string(yys295Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys295 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv298 := &x.ListMeta - yym299 := z.DecBinary() - _ = yym299 - if false { - } else if z.HasExtensions() && z.DecExt(yyv298) { - } else { - z.DecFallback(yyv298, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv300 := &x.Items - yym301 := z.DecBinary() - _ = yym301 - if false { - } else { - h.decSliceScheduledJob((*[]ScheduledJob)(yyv300), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys295) - } // end switch yys295 - } // end for yyj295 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScheduledJobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj302 int - var yyb302 bool - var yyhl302 bool = l >= 0 - yyj302++ - if yyhl302 { - yyb302 = yyj302 > l - } else { - yyb302 = r.CheckBreak() - } - if yyb302 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj302++ - if yyhl302 { - yyb302 = yyj302 > l - } else { - yyb302 = r.CheckBreak() - } - if yyb302 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj302++ - if yyhl302 { - yyb302 = yyj302 > l - } else { - yyb302 = r.CheckBreak() - } - if yyb302 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv305 := &x.ListMeta - yym306 := z.DecBinary() - _ = yym306 - if false { - } else if z.HasExtensions() && z.DecExt(yyv305) { - } else { - z.DecFallback(yyv305, false) - } - } - yyj302++ - if yyhl302 { - yyb302 = yyj302 > l - } else { - yyb302 = r.CheckBreak() - } - if yyb302 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv307 := &x.Items - yym308 := z.DecBinary() - _ = yym308 - if false { - } else { - h.decSliceScheduledJob((*[]ScheduledJob)(yyv307), d) - } - } - for { - yyj302++ - if yyhl302 { - yyb302 = yyj302 > l - } else { - yyb302 = r.CheckBreak() - } - if yyb302 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj302-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ScheduledJobSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym309 := z.EncBinary() - _ = yym309 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep310 := !z.EncBinary() - yy2arr310 := z.EncBasicHandle().StructToArray - var yyq310 [5]bool - _, _, _ = yysep310, yyq310, yy2arr310 - const yyr310 bool = false - yyq310[1] = x.StartingDeadlineSeconds != nil - yyq310[2] = x.ConcurrencyPolicy != "" - yyq310[3] = x.Suspend != nil - var yynn310 int - if yyr310 || yy2arr310 { - r.EncodeArrayStart(5) - } else { - yynn310 = 2 - for _, b := range yyq310 { - if b { - yynn310++ - } - } - r.EncodeMapStart(yynn310) - yynn310 = 0 - } - if yyr310 || yy2arr310 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym312 := z.EncBinary() - _ = yym312 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Schedule)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("schedule")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym313 := z.EncBinary() - _ = yym313 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Schedule)) - } - } - if yyr310 || yy2arr310 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq310[1] { - if x.StartingDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy315 := *x.StartingDeadlineSeconds - yym316 := z.EncBinary() - _ = yym316 - if false { - } else { - r.EncodeInt(int64(yy315)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq310[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("startingDeadlineSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.StartingDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy317 := *x.StartingDeadlineSeconds - yym318 := z.EncBinary() - _ = yym318 - if false { - } else { - r.EncodeInt(int64(yy317)) - } - } - } - } - if yyr310 || yy2arr310 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq310[2] { - x.ConcurrencyPolicy.CodecEncodeSelf(e) - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq310[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("concurrencyPolicy")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.ConcurrencyPolicy.CodecEncodeSelf(e) - } - } - if yyr310 || yy2arr310 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq310[3] { - if x.Suspend == nil { - r.EncodeNil() - } else { - yy321 := *x.Suspend - yym322 := z.EncBinary() - _ = yym322 - if false { - } else { - r.EncodeBool(bool(yy321)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq310[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("suspend")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Suspend == nil { - r.EncodeNil() - } else { - yy323 := *x.Suspend - yym324 := z.EncBinary() - _ = yym324 - if false { - } else { - r.EncodeBool(bool(yy323)) - } - } - } - } - if yyr310 || yy2arr310 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy326 := &x.JobTemplate - yy326.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("jobTemplate")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy327 := &x.JobTemplate - yy327.CodecEncodeSelf(e) - } - if yyr310 || yy2arr310 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScheduledJobSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym328 := z.DecBinary() - _ = yym328 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct329 := r.ContainerType() - if yyct329 == codecSelferValueTypeMap1234 { - yyl329 := r.ReadMapStart() - if yyl329 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl329, d) - } - } else if yyct329 == codecSelferValueTypeArray1234 { - yyl329 := r.ReadArrayStart() - if yyl329 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl329, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScheduledJobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys330Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys330Slc - var yyhl330 bool = l >= 0 - for yyj330 := 0; ; yyj330++ { - if yyhl330 { - if yyj330 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys330Slc = r.DecodeBytes(yys330Slc, true, true) - yys330 := string(yys330Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys330 { - case "schedule": - if r.TryDecodeAsNil() { - x.Schedule = "" - } else { - x.Schedule = string(r.DecodeString()) - } - case "startingDeadlineSeconds": - if r.TryDecodeAsNil() { - if x.StartingDeadlineSeconds != nil { - x.StartingDeadlineSeconds = nil - } - } else { - if x.StartingDeadlineSeconds == nil { - x.StartingDeadlineSeconds = new(int64) - } - yym333 := z.DecBinary() - _ = yym333 - if false { - } else { - *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64)) - } - } - case "concurrencyPolicy": - if r.TryDecodeAsNil() { - x.ConcurrencyPolicy = "" - } else { - x.ConcurrencyPolicy = ConcurrencyPolicy(r.DecodeString()) - } - case "suspend": - if r.TryDecodeAsNil() { - if x.Suspend != nil { - x.Suspend = nil - } - } else { - if x.Suspend == nil { - x.Suspend = new(bool) - } - yym336 := z.DecBinary() - _ = yym336 - if false { - } else { - *((*bool)(x.Suspend)) = r.DecodeBool() - } - } - case "jobTemplate": - if r.TryDecodeAsNil() { - x.JobTemplate = JobTemplateSpec{} - } else { - yyv337 := &x.JobTemplate - yyv337.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys330) - } // end switch yys330 - } // end for yyj330 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScheduledJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj338 int - var yyb338 bool - var yyhl338 bool = l >= 0 - yyj338++ - if yyhl338 { - yyb338 = yyj338 > l - } else { - yyb338 = r.CheckBreak() - } - if yyb338 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Schedule = "" - } else { - x.Schedule = string(r.DecodeString()) - } - yyj338++ - if yyhl338 { - yyb338 = yyj338 > l - } else { - yyb338 = r.CheckBreak() - } - if yyb338 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.StartingDeadlineSeconds != nil { - x.StartingDeadlineSeconds = nil - } - } else { - if x.StartingDeadlineSeconds == nil { - x.StartingDeadlineSeconds = new(int64) - } - yym341 := z.DecBinary() - _ = yym341 - if false { - } else { - *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64)) - } - } - yyj338++ - if yyhl338 { - yyb338 = yyj338 > l - } else { - yyb338 = r.CheckBreak() - } - if yyb338 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ConcurrencyPolicy = "" - } else { - x.ConcurrencyPolicy = ConcurrencyPolicy(r.DecodeString()) - } - yyj338++ - if yyhl338 { - yyb338 = yyj338 > l - } else { - yyb338 = r.CheckBreak() - } - if yyb338 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Suspend != nil { - x.Suspend = nil - } - } else { - if x.Suspend == nil { - x.Suspend = new(bool) - } - yym344 := z.DecBinary() - _ = yym344 - if false { - } else { - *((*bool)(x.Suspend)) = r.DecodeBool() - } - } - yyj338++ - if yyhl338 { - yyb338 = yyj338 > l - } else { - yyb338 = r.CheckBreak() - } - if yyb338 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.JobTemplate = JobTemplateSpec{} - } else { - yyv345 := &x.JobTemplate - yyv345.CodecDecodeSelf(d) - } - for { - yyj338++ - if yyhl338 { - yyb338 = yyj338 > l - } else { - yyb338 = r.CheckBreak() - } - if yyb338 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj338-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x ConcurrencyPolicy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym346 := z.EncBinary() - _ = yym346 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *ConcurrencyPolicy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym347 := z.DecBinary() - _ = yym347 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *ScheduledJobStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym348 := z.EncBinary() - _ = yym348 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep349 := !z.EncBinary() - yy2arr349 := z.EncBasicHandle().StructToArray - var yyq349 [2]bool - _, _, _ = yysep349, yyq349, yy2arr349 - const yyr349 bool = false - yyq349[0] = len(x.Active) != 0 - yyq349[1] = x.LastScheduleTime != nil - var yynn349 int - if yyr349 || yy2arr349 { - r.EncodeArrayStart(2) - } else { - yynn349 = 0 - for _, b := range yyq349 { - if b { - yynn349++ - } - } - r.EncodeMapStart(yynn349) - yynn349 = 0 - } - if yyr349 || yy2arr349 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq349[0] { - if x.Active == nil { - r.EncodeNil() - } else { - yym351 := z.EncBinary() - _ = yym351 - if false { - } else { - h.encSliceapi_ObjectReference(([]pkg2_api.ObjectReference)(x.Active), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq349[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("active")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Active == nil { - r.EncodeNil() - } else { - yym352 := z.EncBinary() - _ = yym352 - if false { - } else { - h.encSliceapi_ObjectReference(([]pkg2_api.ObjectReference)(x.Active), e) - } - } - } - } - if yyr349 || yy2arr349 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq349[1] { - if x.LastScheduleTime == nil { - r.EncodeNil() - } else { - yym354 := z.EncBinary() - _ = yym354 - if false { - } else if z.HasExtensions() && z.EncExt(x.LastScheduleTime) { - } else if yym354 { - z.EncBinaryMarshal(x.LastScheduleTime) - } else if !yym354 && z.IsJSONHandle() { - z.EncJSONMarshal(x.LastScheduleTime) - } else { - z.EncFallback(x.LastScheduleTime) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq349[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastScheduleTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.LastScheduleTime == nil { - r.EncodeNil() - } else { - yym355 := z.EncBinary() - _ = yym355 - if false { - } else if z.HasExtensions() && z.EncExt(x.LastScheduleTime) { - } else if yym355 { - z.EncBinaryMarshal(x.LastScheduleTime) - } else if !yym355 && z.IsJSONHandle() { - z.EncJSONMarshal(x.LastScheduleTime) - } else { - z.EncFallback(x.LastScheduleTime) - } - } - } - } - if yyr349 || yy2arr349 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScheduledJobStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym356 := z.DecBinary() - _ = yym356 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct357 := r.ContainerType() - if yyct357 == codecSelferValueTypeMap1234 { - yyl357 := r.ReadMapStart() - if yyl357 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl357, d) - } - } else if yyct357 == codecSelferValueTypeArray1234 { - yyl357 := r.ReadArrayStart() - if yyl357 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl357, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScheduledJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys358Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys358Slc - var yyhl358 bool = l >= 0 - for yyj358 := 0; ; yyj358++ { - if yyhl358 { - if yyj358 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys358Slc = r.DecodeBytes(yys358Slc, true, true) - yys358 := string(yys358Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys358 { - case "active": - if r.TryDecodeAsNil() { - x.Active = nil - } else { - yyv359 := &x.Active - yym360 := z.DecBinary() - _ = yym360 - if false { - } else { - h.decSliceapi_ObjectReference((*[]pkg2_api.ObjectReference)(yyv359), d) - } - } - case "lastScheduleTime": - if r.TryDecodeAsNil() { - if x.LastScheduleTime != nil { - x.LastScheduleTime = nil - } - } else { - if x.LastScheduleTime == nil { - x.LastScheduleTime = new(pkg1_unversioned.Time) - } - yym362 := z.DecBinary() - _ = yym362 - if false { - } else if z.HasExtensions() && z.DecExt(x.LastScheduleTime) { - } else if yym362 { - z.DecBinaryUnmarshal(x.LastScheduleTime) - } else if !yym362 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.LastScheduleTime) - } else { - z.DecFallback(x.LastScheduleTime, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys358) - } // end switch yys358 - } // end for yyj358 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScheduledJobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj363 int - var yyb363 bool - var yyhl363 bool = l >= 0 - yyj363++ - if yyhl363 { - yyb363 = yyj363 > l - } else { - yyb363 = r.CheckBreak() - } - if yyb363 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Active = nil - } else { - yyv364 := &x.Active - yym365 := z.DecBinary() - _ = yym365 - if false { - } else { - h.decSliceapi_ObjectReference((*[]pkg2_api.ObjectReference)(yyv364), d) - } - } - yyj363++ - if yyhl363 { - yyb363 = yyj363 > l - } else { - yyb363 = r.CheckBreak() - } - if yyb363 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.LastScheduleTime != nil { - x.LastScheduleTime = nil - } - } else { - if x.LastScheduleTime == nil { - x.LastScheduleTime = new(pkg1_unversioned.Time) - } - yym367 := z.DecBinary() - _ = yym367 - if false { - } else if z.HasExtensions() && z.DecExt(x.LastScheduleTime) { - } else if yym367 { - z.DecBinaryUnmarshal(x.LastScheduleTime) - } else if !yym367 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.LastScheduleTime) - } else { - z.DecFallback(x.LastScheduleTime, false) - } - } - for { - yyj363++ - if yyhl363 { - yyb363 = yyj363 > l - } else { - yyb363 = r.CheckBreak() - } - if yyb363 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj363-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) encSliceJob(v []Job, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv368 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy369 := &yyv368 - yy369.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv370 := *v - yyh370, yyl370 := z.DecSliceHelperStart() - var yyc370 bool - if yyl370 == 0 { - if yyv370 == nil { - yyv370 = []Job{} - yyc370 = true - } else if len(yyv370) != 0 { - yyv370 = yyv370[:0] - yyc370 = true - } - } else if yyl370 > 0 { - var yyrr370, yyrl370 int - var yyrt370 bool - if yyl370 > cap(yyv370) { - - yyrg370 := len(yyv370) > 0 - yyv2370 := yyv370 - yyrl370, yyrt370 = z.DecInferLen(yyl370, z.DecBasicHandle().MaxInitLen, 800) - if yyrt370 { - if yyrl370 <= cap(yyv370) { - yyv370 = yyv370[:yyrl370] - } else { - yyv370 = make([]Job, yyrl370) - } - } else { - yyv370 = make([]Job, yyrl370) - } - yyc370 = true - yyrr370 = len(yyv370) - if yyrg370 { - copy(yyv370, yyv2370) - } - } else if yyl370 != len(yyv370) { - yyv370 = yyv370[:yyl370] - yyc370 = true - } - yyj370 := 0 - for ; yyj370 < yyrr370; yyj370++ { - yyh370.ElemContainerState(yyj370) - if r.TryDecodeAsNil() { - yyv370[yyj370] = Job{} - } else { - yyv371 := &yyv370[yyj370] - yyv371.CodecDecodeSelf(d) - } - - } - if yyrt370 { - for ; yyj370 < yyl370; yyj370++ { - yyv370 = append(yyv370, Job{}) - yyh370.ElemContainerState(yyj370) - if r.TryDecodeAsNil() { - yyv370[yyj370] = Job{} - } else { - yyv372 := &yyv370[yyj370] - yyv372.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj370 := 0 - for ; !r.CheckBreak(); yyj370++ { - - if yyj370 >= len(yyv370) { - yyv370 = append(yyv370, Job{}) // var yyz370 Job - yyc370 = true - } - yyh370.ElemContainerState(yyj370) - if yyj370 < len(yyv370) { - if r.TryDecodeAsNil() { - yyv370[yyj370] = Job{} - } else { - yyv373 := &yyv370[yyj370] - yyv373.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj370 < len(yyv370) { - yyv370 = yyv370[:yyj370] - yyc370 = true - } else if yyj370 == 0 && yyv370 == nil { - yyv370 = []Job{} - yyc370 = true - } - } - yyh370.End() - if yyc370 { - *v = yyv370 - } -} - -func (x codecSelfer1234) encSliceJobCondition(v []JobCondition, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv374 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy375 := &yyv374 - yy375.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv376 := *v - yyh376, yyl376 := z.DecSliceHelperStart() - var yyc376 bool - if yyl376 == 0 { - if yyv376 == nil { - yyv376 = []JobCondition{} - yyc376 = true - } else if len(yyv376) != 0 { - yyv376 = yyv376[:0] - yyc376 = true - } - } else if yyl376 > 0 { - var yyrr376, yyrl376 int - var yyrt376 bool - if yyl376 > cap(yyv376) { - - yyrg376 := len(yyv376) > 0 - yyv2376 := yyv376 - yyrl376, yyrt376 = z.DecInferLen(yyl376, z.DecBasicHandle().MaxInitLen, 112) - if yyrt376 { - if yyrl376 <= cap(yyv376) { - yyv376 = yyv376[:yyrl376] - } else { - yyv376 = make([]JobCondition, yyrl376) - } - } else { - yyv376 = make([]JobCondition, yyrl376) - } - yyc376 = true - yyrr376 = len(yyv376) - if yyrg376 { - copy(yyv376, yyv2376) - } - } else if yyl376 != len(yyv376) { - yyv376 = yyv376[:yyl376] - yyc376 = true - } - yyj376 := 0 - for ; yyj376 < yyrr376; yyj376++ { - yyh376.ElemContainerState(yyj376) - if r.TryDecodeAsNil() { - yyv376[yyj376] = JobCondition{} - } else { - yyv377 := &yyv376[yyj376] - yyv377.CodecDecodeSelf(d) - } - - } - if yyrt376 { - for ; yyj376 < yyl376; yyj376++ { - yyv376 = append(yyv376, JobCondition{}) - yyh376.ElemContainerState(yyj376) - if r.TryDecodeAsNil() { - yyv376[yyj376] = JobCondition{} - } else { - yyv378 := &yyv376[yyj376] - yyv378.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj376 := 0 - for ; !r.CheckBreak(); yyj376++ { - - if yyj376 >= len(yyv376) { - yyv376 = append(yyv376, JobCondition{}) // var yyz376 JobCondition - yyc376 = true - } - yyh376.ElemContainerState(yyj376) - if yyj376 < len(yyv376) { - if r.TryDecodeAsNil() { - yyv376[yyj376] = JobCondition{} - } else { - yyv379 := &yyv376[yyj376] - yyv379.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj376 < len(yyv376) { - yyv376 = yyv376[:yyj376] - yyc376 = true - } else if yyj376 == 0 && yyv376 == nil { - yyv376 = []JobCondition{} - yyc376 = true - } - } - yyh376.End() - if yyc376 { - *v = yyv376 - } -} - -func (x codecSelfer1234) encSliceScheduledJob(v []ScheduledJob, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv380 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy381 := &yyv380 - yy381.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv382 := *v - yyh382, yyl382 := z.DecSliceHelperStart() - var yyc382 bool - if yyl382 == 0 { - if yyv382 == nil { - yyv382 = []ScheduledJob{} - yyc382 = true - } else if len(yyv382) != 0 { - yyv382 = yyv382[:0] - yyc382 = true - } - } else if yyl382 > 0 { - var yyrr382, yyrl382 int - var yyrt382 bool - if yyl382 > cap(yyv382) { - - yyrg382 := len(yyv382) > 0 - yyv2382 := yyv382 - yyrl382, yyrt382 = z.DecInferLen(yyl382, z.DecBasicHandle().MaxInitLen, 1048) - if yyrt382 { - if yyrl382 <= cap(yyv382) { - yyv382 = yyv382[:yyrl382] - } else { - yyv382 = make([]ScheduledJob, yyrl382) - } - } else { - yyv382 = make([]ScheduledJob, yyrl382) - } - yyc382 = true - yyrr382 = len(yyv382) - if yyrg382 { - copy(yyv382, yyv2382) - } - } else if yyl382 != len(yyv382) { - yyv382 = yyv382[:yyl382] - yyc382 = true - } - yyj382 := 0 - for ; yyj382 < yyrr382; yyj382++ { - yyh382.ElemContainerState(yyj382) - if r.TryDecodeAsNil() { - yyv382[yyj382] = ScheduledJob{} - } else { - yyv383 := &yyv382[yyj382] - yyv383.CodecDecodeSelf(d) - } - - } - if yyrt382 { - for ; yyj382 < yyl382; yyj382++ { - yyv382 = append(yyv382, ScheduledJob{}) - yyh382.ElemContainerState(yyj382) - if r.TryDecodeAsNil() { - yyv382[yyj382] = ScheduledJob{} - } else { - yyv384 := &yyv382[yyj382] - yyv384.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj382 := 0 - for ; !r.CheckBreak(); yyj382++ { - - if yyj382 >= len(yyv382) { - yyv382 = append(yyv382, ScheduledJob{}) // var yyz382 ScheduledJob - yyc382 = true - } - yyh382.ElemContainerState(yyj382) - if yyj382 < len(yyv382) { - if r.TryDecodeAsNil() { - yyv382[yyj382] = ScheduledJob{} - } else { - yyv385 := &yyv382[yyj382] - yyv385.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj382 < len(yyv382) { - yyv382 = yyv382[:yyj382] - yyc382 = true - } else if yyj382 == 0 && yyv382 == nil { - yyv382 = []ScheduledJob{} - yyc382 = true - } - } - yyh382.End() - if yyc382 { - *v = yyv382 - } -} - -func (x codecSelfer1234) encSliceapi_ObjectReference(v []pkg2_api.ObjectReference, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv386 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy387 := &yyv386 - yy387.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceapi_ObjectReference(v *[]pkg2_api.ObjectReference, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv388 := *v - yyh388, yyl388 := z.DecSliceHelperStart() - var yyc388 bool - if yyl388 == 0 { - if yyv388 == nil { - yyv388 = []pkg2_api.ObjectReference{} - yyc388 = true - } else if len(yyv388) != 0 { - yyv388 = yyv388[:0] - yyc388 = true - } - } else if yyl388 > 0 { - var yyrr388, yyrl388 int - var yyrt388 bool - if yyl388 > cap(yyv388) { - - yyrg388 := len(yyv388) > 0 - yyv2388 := yyv388 - yyrl388, yyrt388 = z.DecInferLen(yyl388, z.DecBasicHandle().MaxInitLen, 112) - if yyrt388 { - if yyrl388 <= cap(yyv388) { - yyv388 = yyv388[:yyrl388] - } else { - yyv388 = make([]pkg2_api.ObjectReference, yyrl388) - } - } else { - yyv388 = make([]pkg2_api.ObjectReference, yyrl388) - } - yyc388 = true - yyrr388 = len(yyv388) - if yyrg388 { - copy(yyv388, yyv2388) - } - } else if yyl388 != len(yyv388) { - yyv388 = yyv388[:yyl388] - yyc388 = true - } - yyj388 := 0 - for ; yyj388 < yyrr388; yyj388++ { - yyh388.ElemContainerState(yyj388) - if r.TryDecodeAsNil() { - yyv388[yyj388] = pkg2_api.ObjectReference{} - } else { - yyv389 := &yyv388[yyj388] - yyv389.CodecDecodeSelf(d) - } - - } - if yyrt388 { - for ; yyj388 < yyl388; yyj388++ { - yyv388 = append(yyv388, pkg2_api.ObjectReference{}) - yyh388.ElemContainerState(yyj388) - if r.TryDecodeAsNil() { - yyv388[yyj388] = pkg2_api.ObjectReference{} - } else { - yyv390 := &yyv388[yyj388] - yyv390.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj388 := 0 - for ; !r.CheckBreak(); yyj388++ { - - if yyj388 >= len(yyv388) { - yyv388 = append(yyv388, pkg2_api.ObjectReference{}) // var yyz388 pkg2_api.ObjectReference - yyc388 = true - } - yyh388.ElemContainerState(yyj388) - if yyj388 < len(yyv388) { - if r.TryDecodeAsNil() { - yyv388[yyj388] = pkg2_api.ObjectReference{} - } else { - yyv391 := &yyv388[yyj388] - yyv391.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj388 < len(yyv388) { - yyv388 = yyv388[:yyj388] - yyc388 = true - } else if yyj388 == 0 && yyv388 == nil { - yyv388 = []pkg2_api.ObjectReference{} - yyc388 = true - } - } - yyh388.End() - if yyc388 { - *v = yyv388 - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/types.generated.go deleted file mode 100644 index 14607fc4b..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/types.generated.go +++ /dev/null @@ -1,3185 +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" - pkg4_resource "k8s.io/client-go/1.5/pkg/api/resource" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg2_v1 "k8s.io/client-go/1.5/pkg/api/v1" - pkg3_types "k8s.io/client-go/1.5/pkg/types" - pkg5_intstr "k8s.io/client-go/1.5/pkg/util/intstr" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg4_resource.Quantity - var v1 pkg1_unversioned.TypeMeta - var v2 pkg2_v1.ObjectMeta - var v3 pkg3_types.UID - var v4 pkg5_intstr.IntOrString - var v5 time.Time - _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 - } -} - -func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [5]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = x.Kind != "" - yyq2[1] = x.APIVersion != "" - yyq2[2] = true - yyq2[3] = true - yyq2[4] = true - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(5) - } else { - yynn2 = 0 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[1] { - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy11 := &x.ObjectMeta - yy11.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[3] { - yy13 := &x.Spec - yy13.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy14 := &x.Spec - yy14.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { - yy16 := &x.Status - yy16.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy17 := &x.Status - yy17.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Job) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym18 := z.DecBinary() - _ = yym18 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct19 := r.ContainerType() - if yyct19 == codecSelferValueTypeMap1234 { - yyl19 := r.ReadMapStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl19, d) - } - } else if yyct19 == codecSelferValueTypeArray1234 { - yyl19 := r.ReadArrayStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl19, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Job) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys20Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys20Slc - var yyhl20 bool = l >= 0 - for yyj20 := 0; ; yyj20++ { - if yyhl20 { - if yyj20 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys20Slc = r.DecodeBytes(yys20Slc, true, true) - yys20 := string(yys20Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys20 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv23 := &x.ObjectMeta - yyv23.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = JobSpec{} - } else { - yyv24 := &x.Spec - yyv24.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = JobStatus{} - } else { - yyv25 := &x.Status - yyv25.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys20) - } // end switch yys20 - } // end for yyj20 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj26 int - var yyb26 bool - var yyhl26 bool = l >= 0 - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv29 := &x.ObjectMeta - yyv29.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = JobSpec{} - } else { - yyv30 := &x.Spec - yyv30.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = JobStatus{} - } else { - yyv31 := &x.Status - yyv31.CodecDecodeSelf(d) - } - for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj26-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym32 := z.EncBinary() - _ = yym32 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep33 := !z.EncBinary() - yy2arr33 := z.EncBasicHandle().StructToArray - var yyq33 [4]bool - _, _, _ = yysep33, yyq33, yy2arr33 - const yyr33 bool = false - yyq33[0] = x.Kind != "" - yyq33[1] = x.APIVersion != "" - yyq33[2] = true - var yynn33 int - if yyr33 || yy2arr33 { - r.EncodeArrayStart(4) - } else { - yynn33 = 1 - for _, b := range yyq33 { - if b { - yynn33++ - } - } - r.EncodeMapStart(yynn33) - yynn33 = 0 - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[0] { - yym35 := z.EncBinary() - _ = yym35 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq33[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym36 := z.EncBinary() - _ = yym36 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[1] { - yym38 := z.EncBinary() - _ = yym38 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq33[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym39 := z.EncBinary() - _ = yym39 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[2] { - yy41 := &x.ListMeta - yym42 := z.EncBinary() - _ = yym42 - if false { - } else if z.HasExtensions() && z.EncExt(yy41) { - } else { - z.EncFallback(yy41) - } - } else { - r.EncodeNil() - } - } else { - if yyq33[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy43 := &x.ListMeta - yym44 := z.EncBinary() - _ = yym44 - if false { - } else if z.HasExtensions() && z.EncExt(yy43) { - } else { - z.EncFallback(yy43) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym46 := z.EncBinary() - _ = yym46 - if false { - } else { - h.encSliceJob(([]Job)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym47 := z.EncBinary() - _ = yym47 - if false { - } else { - h.encSliceJob(([]Job)(x.Items), e) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym48 := z.DecBinary() - _ = yym48 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct49 := r.ContainerType() - if yyct49 == codecSelferValueTypeMap1234 { - yyl49 := r.ReadMapStart() - if yyl49 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl49, d) - } - } else if yyct49 == codecSelferValueTypeArray1234 { - yyl49 := r.ReadArrayStart() - if yyl49 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl49, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys50Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys50Slc - var yyhl50 bool = l >= 0 - for yyj50 := 0; ; yyj50++ { - if yyhl50 { - if yyj50 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys50Slc = r.DecodeBytes(yys50Slc, true, true) - yys50 := string(yys50Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys50 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv53 := &x.ListMeta - yym54 := z.DecBinary() - _ = yym54 - if false { - } else if z.HasExtensions() && z.DecExt(yyv53) { - } else { - z.DecFallback(yyv53, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv55 := &x.Items - yym56 := z.DecBinary() - _ = yym56 - if false { - } else { - h.decSliceJob((*[]Job)(yyv55), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys50) - } // end switch yys50 - } // end for yyj50 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj57 int - var yyb57 bool - var yyhl57 bool = l >= 0 - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv60 := &x.ListMeta - yym61 := z.DecBinary() - _ = yym61 - if false { - } else if z.HasExtensions() && z.DecExt(yyv60) { - } else { - z.DecFallback(yyv60, false) - } - } - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv62 := &x.Items - yym63 := z.DecBinary() - _ = yym63 - if false { - } else { - h.decSliceJob((*[]Job)(yyv62), d) - } - } - for { - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj57-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym64 := z.EncBinary() - _ = yym64 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep65 := !z.EncBinary() - yy2arr65 := z.EncBasicHandle().StructToArray - var yyq65 [6]bool - _, _, _ = yysep65, yyq65, yy2arr65 - const yyr65 bool = false - yyq65[0] = x.Parallelism != nil - yyq65[1] = x.Completions != nil - yyq65[2] = x.ActiveDeadlineSeconds != nil - yyq65[3] = x.Selector != nil - yyq65[4] = x.ManualSelector != nil - var yynn65 int - if yyr65 || yy2arr65 { - r.EncodeArrayStart(6) - } else { - yynn65 = 1 - for _, b := range yyq65 { - if b { - yynn65++ - } - } - r.EncodeMapStart(yynn65) - yynn65 = 0 - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[0] { - if x.Parallelism == nil { - r.EncodeNil() - } else { - yy67 := *x.Parallelism - yym68 := z.EncBinary() - _ = yym68 - if false { - } else { - r.EncodeInt(int64(yy67)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq65[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("parallelism")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Parallelism == nil { - r.EncodeNil() - } else { - yy69 := *x.Parallelism - yym70 := z.EncBinary() - _ = yym70 - if false { - } else { - r.EncodeInt(int64(yy69)) - } - } - } - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[1] { - if x.Completions == nil { - r.EncodeNil() - } else { - yy72 := *x.Completions - yym73 := z.EncBinary() - _ = yym73 - if false { - } else { - r.EncodeInt(int64(yy72)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq65[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("completions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Completions == nil { - r.EncodeNil() - } else { - yy74 := *x.Completions - yym75 := z.EncBinary() - _ = yym75 - if false { - } else { - r.EncodeInt(int64(yy74)) - } - } - } - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[2] { - if x.ActiveDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy77 := *x.ActiveDeadlineSeconds - yym78 := z.EncBinary() - _ = yym78 - if false { - } else { - r.EncodeInt(int64(yy77)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq65[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("activeDeadlineSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ActiveDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy79 := *x.ActiveDeadlineSeconds - yym80 := z.EncBinary() - _ = yym80 - if false { - } else { - r.EncodeInt(int64(yy79)) - } - } - } - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[3] { - if x.Selector == nil { - r.EncodeNil() - } else { - x.Selector.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq65[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Selector == nil { - r.EncodeNil() - } else { - x.Selector.CodecEncodeSelf(e) - } - } - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[4] { - if x.ManualSelector == nil { - r.EncodeNil() - } else { - yy83 := *x.ManualSelector - yym84 := z.EncBinary() - _ = yym84 - if false { - } else { - r.EncodeBool(bool(yy83)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq65[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("manualSelector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ManualSelector == nil { - r.EncodeNil() - } else { - yy85 := *x.ManualSelector - yym86 := z.EncBinary() - _ = yym86 - if false { - } else { - r.EncodeBool(bool(yy85)) - } - } - } - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy88 := &x.Template - yy88.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("template")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy89 := &x.Template - yy89.CodecEncodeSelf(e) - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym90 := z.DecBinary() - _ = yym90 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct91 := r.ContainerType() - if yyct91 == codecSelferValueTypeMap1234 { - yyl91 := r.ReadMapStart() - if yyl91 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl91, d) - } - } else if yyct91 == codecSelferValueTypeArray1234 { - yyl91 := r.ReadArrayStart() - if yyl91 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl91, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys92Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys92Slc - var yyhl92 bool = l >= 0 - for yyj92 := 0; ; yyj92++ { - if yyhl92 { - if yyj92 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys92Slc = r.DecodeBytes(yys92Slc, true, true) - yys92 := string(yys92Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys92 { - case "parallelism": - if r.TryDecodeAsNil() { - if x.Parallelism != nil { - x.Parallelism = nil - } - } else { - if x.Parallelism == nil { - x.Parallelism = new(int32) - } - yym94 := z.DecBinary() - _ = yym94 - if false { - } else { - *((*int32)(x.Parallelism)) = int32(r.DecodeInt(32)) - } - } - case "completions": - if r.TryDecodeAsNil() { - if x.Completions != nil { - x.Completions = nil - } - } else { - if x.Completions == nil { - x.Completions = new(int32) - } - yym96 := z.DecBinary() - _ = yym96 - if false { - } else { - *((*int32)(x.Completions)) = int32(r.DecodeInt(32)) - } - } - case "activeDeadlineSeconds": - if r.TryDecodeAsNil() { - if x.ActiveDeadlineSeconds != nil { - x.ActiveDeadlineSeconds = nil - } - } else { - if x.ActiveDeadlineSeconds == nil { - x.ActiveDeadlineSeconds = new(int64) - } - yym98 := z.DecBinary() - _ = yym98 - if false { - } else { - *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) - } - } - case "selector": - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(LabelSelector) - } - x.Selector.CodecDecodeSelf(d) - } - case "manualSelector": - if r.TryDecodeAsNil() { - if x.ManualSelector != nil { - x.ManualSelector = nil - } - } else { - if x.ManualSelector == nil { - x.ManualSelector = new(bool) - } - yym101 := z.DecBinary() - _ = yym101 - if false { - } else { - *((*bool)(x.ManualSelector)) = r.DecodeBool() - } - } - case "template": - if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} - } else { - yyv102 := &x.Template - yyv102.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys92) - } // end switch yys92 - } // end for yyj92 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj103 int - var yyb103 bool - var yyhl103 bool = l >= 0 - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Parallelism != nil { - x.Parallelism = nil - } - } else { - if x.Parallelism == nil { - x.Parallelism = new(int32) - } - yym105 := z.DecBinary() - _ = yym105 - if false { - } else { - *((*int32)(x.Parallelism)) = int32(r.DecodeInt(32)) - } - } - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Completions != nil { - x.Completions = nil - } - } else { - if x.Completions == nil { - x.Completions = new(int32) - } - yym107 := z.DecBinary() - _ = yym107 - if false { - } else { - *((*int32)(x.Completions)) = int32(r.DecodeInt(32)) - } - } - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - 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) - } - yym109 := z.DecBinary() - _ = yym109 - if false { - } else { - *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) - } - } - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(LabelSelector) - } - x.Selector.CodecDecodeSelf(d) - } - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.ManualSelector != nil { - x.ManualSelector = nil - } - } else { - if x.ManualSelector == nil { - x.ManualSelector = new(bool) - } - yym112 := z.DecBinary() - _ = yym112 - if false { - } else { - *((*bool)(x.ManualSelector)) = r.DecodeBool() - } - } - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} - } else { - yyv113 := &x.Template - yyv113.CodecDecodeSelf(d) - } - for { - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj103-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym114 := z.EncBinary() - _ = yym114 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep115 := !z.EncBinary() - yy2arr115 := z.EncBasicHandle().StructToArray - var yyq115 [6]bool - _, _, _ = yysep115, yyq115, yy2arr115 - const yyr115 bool = false - yyq115[0] = len(x.Conditions) != 0 - yyq115[1] = x.StartTime != nil - yyq115[2] = x.CompletionTime != nil - yyq115[3] = x.Active != 0 - yyq115[4] = x.Succeeded != 0 - yyq115[5] = x.Failed != 0 - var yynn115 int - if yyr115 || yy2arr115 { - r.EncodeArrayStart(6) - } else { - yynn115 = 0 - for _, b := range yyq115 { - if b { - yynn115++ - } - } - r.EncodeMapStart(yynn115) - yynn115 = 0 - } - if yyr115 || yy2arr115 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq115[0] { - if x.Conditions == nil { - r.EncodeNil() - } else { - yym117 := z.EncBinary() - _ = yym117 - if false { - } else { - h.encSliceJobCondition(([]JobCondition)(x.Conditions), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq115[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("conditions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Conditions == nil { - r.EncodeNil() - } else { - yym118 := z.EncBinary() - _ = yym118 - if false { - } else { - h.encSliceJobCondition(([]JobCondition)(x.Conditions), e) - } - } - } - } - if yyr115 || yy2arr115 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq115[1] { - if x.StartTime == nil { - r.EncodeNil() - } else { - yym120 := z.EncBinary() - _ = yym120 - if false { - } else if z.HasExtensions() && z.EncExt(x.StartTime) { - } else if yym120 { - z.EncBinaryMarshal(x.StartTime) - } else if !yym120 && z.IsJSONHandle() { - z.EncJSONMarshal(x.StartTime) - } else { - z.EncFallback(x.StartTime) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq115[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("startTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.StartTime == nil { - r.EncodeNil() - } else { - yym121 := z.EncBinary() - _ = yym121 - if false { - } else if z.HasExtensions() && z.EncExt(x.StartTime) { - } else if yym121 { - z.EncBinaryMarshal(x.StartTime) - } else if !yym121 && z.IsJSONHandle() { - z.EncJSONMarshal(x.StartTime) - } else { - z.EncFallback(x.StartTime) - } - } - } - } - if yyr115 || yy2arr115 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq115[2] { - if x.CompletionTime == nil { - r.EncodeNil() - } else { - yym123 := z.EncBinary() - _ = yym123 - if false { - } else if z.HasExtensions() && z.EncExt(x.CompletionTime) { - } else if yym123 { - z.EncBinaryMarshal(x.CompletionTime) - } else if !yym123 && z.IsJSONHandle() { - z.EncJSONMarshal(x.CompletionTime) - } else { - z.EncFallback(x.CompletionTime) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq115[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("completionTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.CompletionTime == nil { - r.EncodeNil() - } else { - yym124 := z.EncBinary() - _ = yym124 - if false { - } else if z.HasExtensions() && z.EncExt(x.CompletionTime) { - } else if yym124 { - z.EncBinaryMarshal(x.CompletionTime) - } else if !yym124 && z.IsJSONHandle() { - z.EncJSONMarshal(x.CompletionTime) - } else { - z.EncFallback(x.CompletionTime) - } - } - } - } - if yyr115 || yy2arr115 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq115[3] { - yym126 := z.EncBinary() - _ = yym126 - if false { - } else { - r.EncodeInt(int64(x.Active)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq115[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("active")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym127 := z.EncBinary() - _ = yym127 - if false { - } else { - r.EncodeInt(int64(x.Active)) - } - } - } - if yyr115 || yy2arr115 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq115[4] { - yym129 := z.EncBinary() - _ = yym129 - if false { - } else { - r.EncodeInt(int64(x.Succeeded)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq115[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("succeeded")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym130 := z.EncBinary() - _ = yym130 - if false { - } else { - r.EncodeInt(int64(x.Succeeded)) - } - } - } - if yyr115 || yy2arr115 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq115[5] { - yym132 := z.EncBinary() - _ = yym132 - if false { - } else { - r.EncodeInt(int64(x.Failed)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq115[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("failed")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym133 := z.EncBinary() - _ = yym133 - if false { - } else { - r.EncodeInt(int64(x.Failed)) - } - } - } - if yyr115 || yy2arr115 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym134 := z.DecBinary() - _ = yym134 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct135 := r.ContainerType() - if yyct135 == codecSelferValueTypeMap1234 { - yyl135 := r.ReadMapStart() - if yyl135 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl135, d) - } - } else if yyct135 == codecSelferValueTypeArray1234 { - yyl135 := r.ReadArrayStart() - if yyl135 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl135, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys136Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys136Slc - var yyhl136 bool = l >= 0 - for yyj136 := 0; ; yyj136++ { - if yyhl136 { - if yyj136 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys136Slc = r.DecodeBytes(yys136Slc, true, true) - yys136 := string(yys136Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys136 { - case "conditions": - if r.TryDecodeAsNil() { - x.Conditions = nil - } else { - yyv137 := &x.Conditions - yym138 := z.DecBinary() - _ = yym138 - if false { - } else { - h.decSliceJobCondition((*[]JobCondition)(yyv137), d) - } - } - case "startTime": - if r.TryDecodeAsNil() { - if x.StartTime != nil { - x.StartTime = nil - } - } else { - if x.StartTime == nil { - x.StartTime = new(pkg1_unversioned.Time) - } - yym140 := z.DecBinary() - _ = yym140 - if false { - } else if z.HasExtensions() && z.DecExt(x.StartTime) { - } else if yym140 { - z.DecBinaryUnmarshal(x.StartTime) - } else if !yym140 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.StartTime) - } else { - z.DecFallback(x.StartTime, false) - } - } - case "completionTime": - if r.TryDecodeAsNil() { - if x.CompletionTime != nil { - x.CompletionTime = nil - } - } else { - if x.CompletionTime == nil { - x.CompletionTime = new(pkg1_unversioned.Time) - } - yym142 := z.DecBinary() - _ = yym142 - if false { - } else if z.HasExtensions() && z.DecExt(x.CompletionTime) { - } else if yym142 { - z.DecBinaryUnmarshal(x.CompletionTime) - } else if !yym142 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.CompletionTime) - } else { - z.DecFallback(x.CompletionTime, false) - } - } - case "active": - if r.TryDecodeAsNil() { - x.Active = 0 - } else { - x.Active = int32(r.DecodeInt(32)) - } - case "succeeded": - if r.TryDecodeAsNil() { - x.Succeeded = 0 - } else { - x.Succeeded = int32(r.DecodeInt(32)) - } - case "failed": - if r.TryDecodeAsNil() { - x.Failed = 0 - } else { - x.Failed = int32(r.DecodeInt(32)) - } - default: - z.DecStructFieldNotFound(-1, yys136) - } // end switch yys136 - } // end for yyj136 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj146 int - var yyb146 bool - var yyhl146 bool = l >= 0 - yyj146++ - if yyhl146 { - yyb146 = yyj146 > l - } else { - yyb146 = r.CheckBreak() - } - if yyb146 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Conditions = nil - } else { - yyv147 := &x.Conditions - yym148 := z.DecBinary() - _ = yym148 - if false { - } else { - h.decSliceJobCondition((*[]JobCondition)(yyv147), d) - } - } - yyj146++ - if yyhl146 { - yyb146 = yyj146 > l - } else { - yyb146 = r.CheckBreak() - } - if yyb146 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.StartTime != nil { - x.StartTime = nil - } - } else { - if x.StartTime == nil { - x.StartTime = new(pkg1_unversioned.Time) - } - yym150 := z.DecBinary() - _ = yym150 - if false { - } else if z.HasExtensions() && z.DecExt(x.StartTime) { - } else if yym150 { - z.DecBinaryUnmarshal(x.StartTime) - } else if !yym150 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.StartTime) - } else { - z.DecFallback(x.StartTime, false) - } - } - yyj146++ - if yyhl146 { - yyb146 = yyj146 > l - } else { - yyb146 = r.CheckBreak() - } - if yyb146 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.CompletionTime != nil { - x.CompletionTime = nil - } - } else { - if x.CompletionTime == nil { - x.CompletionTime = new(pkg1_unversioned.Time) - } - yym152 := z.DecBinary() - _ = yym152 - if false { - } else if z.HasExtensions() && z.DecExt(x.CompletionTime) { - } else if yym152 { - z.DecBinaryUnmarshal(x.CompletionTime) - } else if !yym152 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.CompletionTime) - } else { - z.DecFallback(x.CompletionTime, false) - } - } - yyj146++ - if yyhl146 { - yyb146 = yyj146 > l - } else { - yyb146 = r.CheckBreak() - } - if yyb146 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Active = 0 - } else { - x.Active = int32(r.DecodeInt(32)) - } - yyj146++ - if yyhl146 { - yyb146 = yyj146 > l - } else { - yyb146 = r.CheckBreak() - } - if yyb146 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Succeeded = 0 - } else { - x.Succeeded = int32(r.DecodeInt(32)) - } - yyj146++ - if yyhl146 { - yyb146 = yyj146 > l - } else { - yyb146 = r.CheckBreak() - } - if yyb146 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Failed = 0 - } else { - x.Failed = int32(r.DecodeInt(32)) - } - for { - yyj146++ - if yyhl146 { - yyb146 = yyj146 > l - } else { - yyb146 = r.CheckBreak() - } - if yyb146 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj146-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x JobConditionType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym156 := z.EncBinary() - _ = yym156 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *JobConditionType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym157 := z.DecBinary() - _ = yym157 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *JobCondition) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym158 := z.EncBinary() - _ = yym158 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep159 := !z.EncBinary() - yy2arr159 := z.EncBasicHandle().StructToArray - var yyq159 [6]bool - _, _, _ = yysep159, yyq159, yy2arr159 - const yyr159 bool = false - yyq159[2] = true - yyq159[3] = true - yyq159[4] = x.Reason != "" - yyq159[5] = x.Message != "" - var yynn159 int - if yyr159 || yy2arr159 { - r.EncodeArrayStart(6) - } else { - yynn159 = 2 - for _, b := range yyq159 { - if b { - yynn159++ - } - } - r.EncodeMapStart(yynn159) - yynn159 = 0 - } - if yyr159 || yy2arr159 { - 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 yyr159 || yy2arr159 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym162 := z.EncBinary() - _ = yym162 - if false { - } else if z.HasExtensions() && z.EncExt(x.Status) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Status)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym163 := z.EncBinary() - _ = yym163 - if false { - } else if z.HasExtensions() && z.EncExt(x.Status) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Status)) - } - } - if yyr159 || yy2arr159 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq159[2] { - yy165 := &x.LastProbeTime - yym166 := z.EncBinary() - _ = yym166 - if false { - } else if z.HasExtensions() && z.EncExt(yy165) { - } else if yym166 { - z.EncBinaryMarshal(yy165) - } else if !yym166 && z.IsJSONHandle() { - z.EncJSONMarshal(yy165) - } else { - z.EncFallback(yy165) - } - } else { - r.EncodeNil() - } - } else { - if yyq159[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastProbeTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy167 := &x.LastProbeTime - yym168 := z.EncBinary() - _ = yym168 - if false { - } else if z.HasExtensions() && z.EncExt(yy167) { - } else if yym168 { - z.EncBinaryMarshal(yy167) - } else if !yym168 && z.IsJSONHandle() { - z.EncJSONMarshal(yy167) - } else { - z.EncFallback(yy167) - } - } - } - if yyr159 || yy2arr159 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq159[3] { - yy170 := &x.LastTransitionTime - yym171 := z.EncBinary() - _ = yym171 - if false { - } else if z.HasExtensions() && z.EncExt(yy170) { - } else if yym171 { - z.EncBinaryMarshal(yy170) - } else if !yym171 && z.IsJSONHandle() { - z.EncJSONMarshal(yy170) - } else { - z.EncFallback(yy170) - } - } else { - r.EncodeNil() - } - } else { - if yyq159[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy172 := &x.LastTransitionTime - yym173 := z.EncBinary() - _ = yym173 - if false { - } else if z.HasExtensions() && z.EncExt(yy172) { - } else if yym173 { - z.EncBinaryMarshal(yy172) - } else if !yym173 && z.IsJSONHandle() { - z.EncJSONMarshal(yy172) - } else { - z.EncFallback(yy172) - } - } - } - if yyr159 || yy2arr159 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq159[4] { - yym175 := z.EncBinary() - _ = yym175 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq159[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("reason")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym176 := z.EncBinary() - _ = yym176 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } - } - if yyr159 || yy2arr159 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq159[5] { - yym178 := z.EncBinary() - _ = yym178 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq159[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("message")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym179 := z.EncBinary() - _ = yym179 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } - } - if yyr159 || yy2arr159 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobCondition) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym180 := z.DecBinary() - _ = yym180 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct181 := r.ContainerType() - if yyct181 == codecSelferValueTypeMap1234 { - yyl181 := r.ReadMapStart() - if yyl181 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl181, d) - } - } else if yyct181 == codecSelferValueTypeArray1234 { - yyl181 := r.ReadArrayStart() - if yyl181 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl181, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys182Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys182Slc - var yyhl182 bool = l >= 0 - for yyj182 := 0; ; yyj182++ { - if yyhl182 { - if yyj182 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys182Slc = r.DecodeBytes(yys182Slc, true, true) - yys182 := string(yys182Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys182 { - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = JobConditionType(r.DecodeString()) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = pkg2_v1.ConditionStatus(r.DecodeString()) - } - case "lastProbeTime": - if r.TryDecodeAsNil() { - x.LastProbeTime = pkg1_unversioned.Time{} - } else { - yyv185 := &x.LastProbeTime - yym186 := z.DecBinary() - _ = yym186 - if false { - } else if z.HasExtensions() && z.DecExt(yyv185) { - } else if yym186 { - z.DecBinaryUnmarshal(yyv185) - } else if !yym186 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv185) - } else { - z.DecFallback(yyv185, false) - } - } - case "lastTransitionTime": - if r.TryDecodeAsNil() { - x.LastTransitionTime = pkg1_unversioned.Time{} - } else { - yyv187 := &x.LastTransitionTime - yym188 := z.DecBinary() - _ = yym188 - if false { - } else if z.HasExtensions() && z.DecExt(yyv187) { - } else if yym188 { - z.DecBinaryUnmarshal(yyv187) - } else if !yym188 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv187) - } else { - z.DecFallback(yyv187, 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, yys182) - } // end switch yys182 - } // end for yyj182 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj191 int - var yyb191 bool - var yyhl191 bool = l >= 0 - yyj191++ - if yyhl191 { - yyb191 = yyj191 > l - } else { - yyb191 = r.CheckBreak() - } - if yyb191 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = JobConditionType(r.DecodeString()) - } - yyj191++ - if yyhl191 { - yyb191 = yyj191 > l - } else { - yyb191 = r.CheckBreak() - } - if yyb191 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = pkg2_v1.ConditionStatus(r.DecodeString()) - } - yyj191++ - if yyhl191 { - yyb191 = yyj191 > l - } else { - yyb191 = r.CheckBreak() - } - if yyb191 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastProbeTime = pkg1_unversioned.Time{} - } else { - yyv194 := &x.LastProbeTime - yym195 := z.DecBinary() - _ = yym195 - if false { - } else if z.HasExtensions() && z.DecExt(yyv194) { - } else if yym195 { - z.DecBinaryUnmarshal(yyv194) - } else if !yym195 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv194) - } else { - z.DecFallback(yyv194, false) - } - } - yyj191++ - if yyhl191 { - yyb191 = yyj191 > l - } else { - yyb191 = r.CheckBreak() - } - if yyb191 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastTransitionTime = pkg1_unversioned.Time{} - } else { - yyv196 := &x.LastTransitionTime - yym197 := z.DecBinary() - _ = yym197 - if false { - } else if z.HasExtensions() && z.DecExt(yyv196) { - } else if yym197 { - z.DecBinaryUnmarshal(yyv196) - } else if !yym197 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv196) - } else { - z.DecFallback(yyv196, false) - } - } - yyj191++ - if yyhl191 { - yyb191 = yyj191 > l - } else { - yyb191 = r.CheckBreak() - } - if yyb191 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - yyj191++ - if yyhl191 { - yyb191 = yyj191 > l - } else { - yyb191 = r.CheckBreak() - } - if yyb191 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - for { - yyj191++ - if yyhl191 { - yyb191 = yyj191 > l - } else { - yyb191 = r.CheckBreak() - } - if yyb191 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj191-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *LabelSelector) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym200 := z.EncBinary() - _ = yym200 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep201 := !z.EncBinary() - yy2arr201 := z.EncBasicHandle().StructToArray - var yyq201 [2]bool - _, _, _ = yysep201, yyq201, yy2arr201 - const yyr201 bool = false - yyq201[0] = len(x.MatchLabels) != 0 - yyq201[1] = len(x.MatchExpressions) != 0 - var yynn201 int - if yyr201 || yy2arr201 { - r.EncodeArrayStart(2) - } else { - yynn201 = 0 - for _, b := range yyq201 { - if b { - yynn201++ - } - } - r.EncodeMapStart(yynn201) - yynn201 = 0 - } - if yyr201 || yy2arr201 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq201[0] { - if x.MatchLabels == nil { - r.EncodeNil() - } else { - yym203 := z.EncBinary() - _ = yym203 - if false { - } else { - z.F.EncMapStringStringV(x.MatchLabels, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq201[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("matchLabels")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.MatchLabels == nil { - r.EncodeNil() - } else { - yym204 := z.EncBinary() - _ = yym204 - if false { - } else { - z.F.EncMapStringStringV(x.MatchLabels, false, e) - } - } - } - } - if yyr201 || yy2arr201 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq201[1] { - if x.MatchExpressions == nil { - r.EncodeNil() - } else { - yym206 := z.EncBinary() - _ = yym206 - if false { - } else { - h.encSliceLabelSelectorRequirement(([]LabelSelectorRequirement)(x.MatchExpressions), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq201[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("matchExpressions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.MatchExpressions == nil { - r.EncodeNil() - } else { - yym207 := z.EncBinary() - _ = yym207 - if false { - } else { - h.encSliceLabelSelectorRequirement(([]LabelSelectorRequirement)(x.MatchExpressions), e) - } - } - } - } - if yyr201 || yy2arr201 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *LabelSelector) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym208 := z.DecBinary() - _ = yym208 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct209 := r.ContainerType() - if yyct209 == codecSelferValueTypeMap1234 { - yyl209 := r.ReadMapStart() - if yyl209 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl209, d) - } - } else if yyct209 == codecSelferValueTypeArray1234 { - yyl209 := r.ReadArrayStart() - if yyl209 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl209, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *LabelSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys210Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys210Slc - var yyhl210 bool = l >= 0 - for yyj210 := 0; ; yyj210++ { - if yyhl210 { - if yyj210 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys210Slc = r.DecodeBytes(yys210Slc, true, true) - yys210 := string(yys210Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys210 { - case "matchLabels": - if r.TryDecodeAsNil() { - x.MatchLabels = nil - } else { - yyv211 := &x.MatchLabels - yym212 := z.DecBinary() - _ = yym212 - if false { - } else { - z.F.DecMapStringStringX(yyv211, false, d) - } - } - case "matchExpressions": - if r.TryDecodeAsNil() { - x.MatchExpressions = nil - } else { - yyv213 := &x.MatchExpressions - yym214 := z.DecBinary() - _ = yym214 - if false { - } else { - h.decSliceLabelSelectorRequirement((*[]LabelSelectorRequirement)(yyv213), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys210) - } // end switch yys210 - } // end for yyj210 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *LabelSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj215 int - var yyb215 bool - var yyhl215 bool = l >= 0 - yyj215++ - if yyhl215 { - yyb215 = yyj215 > l - } else { - yyb215 = r.CheckBreak() - } - if yyb215 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MatchLabels = nil - } else { - yyv216 := &x.MatchLabels - yym217 := z.DecBinary() - _ = yym217 - if false { - } else { - z.F.DecMapStringStringX(yyv216, false, d) - } - } - yyj215++ - if yyhl215 { - yyb215 = yyj215 > l - } else { - yyb215 = r.CheckBreak() - } - if yyb215 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MatchExpressions = nil - } else { - yyv218 := &x.MatchExpressions - yym219 := z.DecBinary() - _ = yym219 - if false { - } else { - h.decSliceLabelSelectorRequirement((*[]LabelSelectorRequirement)(yyv218), d) - } - } - for { - yyj215++ - if yyhl215 { - yyb215 = yyj215 > l - } else { - yyb215 = r.CheckBreak() - } - if yyb215 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj215-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *LabelSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym220 := z.EncBinary() - _ = yym220 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep221 := !z.EncBinary() - yy2arr221 := z.EncBasicHandle().StructToArray - var yyq221 [3]bool - _, _, _ = yysep221, yyq221, yy2arr221 - const yyr221 bool = false - yyq221[2] = len(x.Values) != 0 - var yynn221 int - if yyr221 || yy2arr221 { - r.EncodeArrayStart(3) - } else { - yynn221 = 2 - for _, b := range yyq221 { - if b { - yynn221++ - } - } - r.EncodeMapStart(yynn221) - yynn221 = 0 - } - if yyr221 || yy2arr221 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym223 := z.EncBinary() - _ = yym223 - 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) - yym224 := z.EncBinary() - _ = yym224 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Key)) - } - } - if yyr221 || yy2arr221 { - 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 yyr221 || yy2arr221 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq221[2] { - if x.Values == nil { - r.EncodeNil() - } else { - yym227 := z.EncBinary() - _ = yym227 - if false { - } else { - z.F.EncSliceStringV(x.Values, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq221[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("values")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Values == nil { - r.EncodeNil() - } else { - yym228 := z.EncBinary() - _ = yym228 - if false { - } else { - z.F.EncSliceStringV(x.Values, false, e) - } - } - } - } - if yyr221 || yy2arr221 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *LabelSelectorRequirement) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym229 := z.DecBinary() - _ = yym229 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct230 := r.ContainerType() - if yyct230 == codecSelferValueTypeMap1234 { - yyl230 := r.ReadMapStart() - if yyl230 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl230, d) - } - } else if yyct230 == codecSelferValueTypeArray1234 { - yyl230 := r.ReadArrayStart() - if yyl230 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl230, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *LabelSelectorRequirement) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys231Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys231Slc - var yyhl231 bool = l >= 0 - for yyj231 := 0; ; yyj231++ { - if yyhl231 { - if yyj231 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys231Slc = r.DecodeBytes(yys231Slc, true, true) - yys231 := string(yys231Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys231 { - case "key": - if r.TryDecodeAsNil() { - x.Key = "" - } else { - x.Key = string(r.DecodeString()) - } - case "operator": - if r.TryDecodeAsNil() { - x.Operator = "" - } else { - x.Operator = LabelSelectorOperator(r.DecodeString()) - } - case "values": - if r.TryDecodeAsNil() { - x.Values = nil - } else { - yyv234 := &x.Values - yym235 := z.DecBinary() - _ = yym235 - if false { - } else { - z.F.DecSliceStringX(yyv234, false, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys231) - } // end switch yys231 - } // end for yyj231 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *LabelSelectorRequirement) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj236 int - var yyb236 bool - var yyhl236 bool = l >= 0 - yyj236++ - if yyhl236 { - yyb236 = yyj236 > l - } else { - yyb236 = r.CheckBreak() - } - if yyb236 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Key = "" - } else { - x.Key = string(r.DecodeString()) - } - yyj236++ - if yyhl236 { - yyb236 = yyj236 > l - } else { - yyb236 = r.CheckBreak() - } - if yyb236 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Operator = "" - } else { - x.Operator = LabelSelectorOperator(r.DecodeString()) - } - yyj236++ - if yyhl236 { - yyb236 = yyj236 > l - } else { - yyb236 = r.CheckBreak() - } - if yyb236 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Values = nil - } else { - yyv239 := &x.Values - yym240 := z.DecBinary() - _ = yym240 - if false { - } else { - z.F.DecSliceStringX(yyv239, false, d) - } - } - for { - yyj236++ - if yyhl236 { - yyb236 = yyj236 > l - } else { - yyb236 = r.CheckBreak() - } - if yyb236 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj236-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x LabelSelectorOperator) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym241 := z.EncBinary() - _ = yym241 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *LabelSelectorOperator) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym242 := z.DecBinary() - _ = yym242 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x codecSelfer1234) encSliceJob(v []Job, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv243 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy244 := &yyv243 - yy244.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv245 := *v - yyh245, yyl245 := z.DecSliceHelperStart() - var yyc245 bool - if yyl245 == 0 { - if yyv245 == nil { - yyv245 = []Job{} - yyc245 = true - } else if len(yyv245) != 0 { - yyv245 = yyv245[:0] - yyc245 = true - } - } else if yyl245 > 0 { - var yyrr245, yyrl245 int - var yyrt245 bool - if yyl245 > cap(yyv245) { - - yyrg245 := len(yyv245) > 0 - yyv2245 := yyv245 - yyrl245, yyrt245 = z.DecInferLen(yyl245, z.DecBasicHandle().MaxInitLen, 824) - if yyrt245 { - if yyrl245 <= cap(yyv245) { - yyv245 = yyv245[:yyrl245] - } else { - yyv245 = make([]Job, yyrl245) - } - } else { - yyv245 = make([]Job, yyrl245) - } - yyc245 = true - yyrr245 = len(yyv245) - if yyrg245 { - copy(yyv245, yyv2245) - } - } else if yyl245 != len(yyv245) { - yyv245 = yyv245[:yyl245] - yyc245 = true - } - yyj245 := 0 - for ; yyj245 < yyrr245; yyj245++ { - yyh245.ElemContainerState(yyj245) - if r.TryDecodeAsNil() { - yyv245[yyj245] = Job{} - } else { - yyv246 := &yyv245[yyj245] - yyv246.CodecDecodeSelf(d) - } - - } - if yyrt245 { - for ; yyj245 < yyl245; yyj245++ { - yyv245 = append(yyv245, Job{}) - yyh245.ElemContainerState(yyj245) - if r.TryDecodeAsNil() { - yyv245[yyj245] = Job{} - } else { - yyv247 := &yyv245[yyj245] - yyv247.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj245 := 0 - for ; !r.CheckBreak(); yyj245++ { - - if yyj245 >= len(yyv245) { - yyv245 = append(yyv245, Job{}) // var yyz245 Job - yyc245 = true - } - yyh245.ElemContainerState(yyj245) - if yyj245 < len(yyv245) { - if r.TryDecodeAsNil() { - yyv245[yyj245] = Job{} - } else { - yyv248 := &yyv245[yyj245] - yyv248.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj245 < len(yyv245) { - yyv245 = yyv245[:yyj245] - yyc245 = true - } else if yyj245 == 0 && yyv245 == nil { - yyv245 = []Job{} - yyc245 = true - } - } - yyh245.End() - if yyc245 { - *v = yyv245 - } -} - -func (x codecSelfer1234) encSliceJobCondition(v []JobCondition, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv249 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy250 := &yyv249 - yy250.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv251 := *v - yyh251, yyl251 := z.DecSliceHelperStart() - var yyc251 bool - if yyl251 == 0 { - if yyv251 == nil { - yyv251 = []JobCondition{} - yyc251 = true - } else if len(yyv251) != 0 { - yyv251 = yyv251[:0] - yyc251 = true - } - } else if yyl251 > 0 { - var yyrr251, yyrl251 int - var yyrt251 bool - if yyl251 > cap(yyv251) { - - yyrg251 := len(yyv251) > 0 - yyv2251 := yyv251 - yyrl251, yyrt251 = z.DecInferLen(yyl251, z.DecBasicHandle().MaxInitLen, 112) - if yyrt251 { - if yyrl251 <= cap(yyv251) { - yyv251 = yyv251[:yyrl251] - } else { - yyv251 = make([]JobCondition, yyrl251) - } - } else { - yyv251 = make([]JobCondition, yyrl251) - } - yyc251 = true - yyrr251 = len(yyv251) - if yyrg251 { - copy(yyv251, yyv2251) - } - } else if yyl251 != len(yyv251) { - yyv251 = yyv251[:yyl251] - yyc251 = true - } - yyj251 := 0 - for ; yyj251 < yyrr251; yyj251++ { - yyh251.ElemContainerState(yyj251) - if r.TryDecodeAsNil() { - yyv251[yyj251] = JobCondition{} - } else { - yyv252 := &yyv251[yyj251] - yyv252.CodecDecodeSelf(d) - } - - } - if yyrt251 { - for ; yyj251 < yyl251; yyj251++ { - yyv251 = append(yyv251, JobCondition{}) - yyh251.ElemContainerState(yyj251) - if r.TryDecodeAsNil() { - yyv251[yyj251] = JobCondition{} - } else { - yyv253 := &yyv251[yyj251] - yyv253.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj251 := 0 - for ; !r.CheckBreak(); yyj251++ { - - if yyj251 >= len(yyv251) { - yyv251 = append(yyv251, JobCondition{}) // var yyz251 JobCondition - yyc251 = true - } - yyh251.ElemContainerState(yyj251) - if yyj251 < len(yyv251) { - if r.TryDecodeAsNil() { - yyv251[yyj251] = JobCondition{} - } else { - yyv254 := &yyv251[yyj251] - yyv254.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj251 < len(yyv251) { - yyv251 = yyv251[:yyj251] - yyc251 = true - } else if yyj251 == 0 && yyv251 == nil { - yyv251 = []JobCondition{} - yyc251 = true - } - } - yyh251.End() - if yyc251 { - *v = yyv251 - } -} - -func (x codecSelfer1234) encSliceLabelSelectorRequirement(v []LabelSelectorRequirement, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv255 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy256 := &yyv255 - yy256.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceLabelSelectorRequirement(v *[]LabelSelectorRequirement, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv257 := *v - yyh257, yyl257 := z.DecSliceHelperStart() - var yyc257 bool - if yyl257 == 0 { - if yyv257 == nil { - yyv257 = []LabelSelectorRequirement{} - yyc257 = true - } else if len(yyv257) != 0 { - yyv257 = yyv257[:0] - yyc257 = true - } - } else if yyl257 > 0 { - var yyrr257, yyrl257 int - var yyrt257 bool - if yyl257 > cap(yyv257) { - - yyrg257 := len(yyv257) > 0 - yyv2257 := yyv257 - yyrl257, yyrt257 = z.DecInferLen(yyl257, z.DecBasicHandle().MaxInitLen, 56) - if yyrt257 { - if yyrl257 <= cap(yyv257) { - yyv257 = yyv257[:yyrl257] - } else { - yyv257 = make([]LabelSelectorRequirement, yyrl257) - } - } else { - yyv257 = make([]LabelSelectorRequirement, yyrl257) - } - yyc257 = true - yyrr257 = len(yyv257) - if yyrg257 { - copy(yyv257, yyv2257) - } - } else if yyl257 != len(yyv257) { - yyv257 = yyv257[:yyl257] - yyc257 = true - } - yyj257 := 0 - for ; yyj257 < yyrr257; yyj257++ { - yyh257.ElemContainerState(yyj257) - if r.TryDecodeAsNil() { - yyv257[yyj257] = LabelSelectorRequirement{} - } else { - yyv258 := &yyv257[yyj257] - yyv258.CodecDecodeSelf(d) - } - - } - if yyrt257 { - for ; yyj257 < yyl257; yyj257++ { - yyv257 = append(yyv257, LabelSelectorRequirement{}) - yyh257.ElemContainerState(yyj257) - if r.TryDecodeAsNil() { - yyv257[yyj257] = LabelSelectorRequirement{} - } else { - yyv259 := &yyv257[yyj257] - yyv259.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj257 := 0 - for ; !r.CheckBreak(); yyj257++ { - - if yyj257 >= len(yyv257) { - yyv257 = append(yyv257, LabelSelectorRequirement{}) // var yyz257 LabelSelectorRequirement - yyc257 = true - } - yyh257.ElemContainerState(yyj257) - if yyj257 < len(yyv257) { - if r.TryDecodeAsNil() { - yyv257[yyj257] = LabelSelectorRequirement{} - } else { - yyv260 := &yyv257[yyj257] - yyv260.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj257 < len(yyv257) { - yyv257 = yyv257[:yyj257] - yyc257 = true - } else if yyj257 == 0 && yyv257 == nil { - yyv257 = []LabelSelectorRequirement{} - yyc257 = true - } - } - yyh257.End() - if yyc257 { - *v = yyv257 - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/zz_generated.conversion.go deleted file mode 100644 index b4c218138..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/zz_generated.conversion.go +++ /dev/null @@ -1,334 +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/client-go/1.5/pkg/api" - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - api_v1 "k8s.io/client-go/1.5/pkg/api/v1" - batch "k8s.io/client-go/1.5/pkg/apis/batch" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" -) - -func init() { - SchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1_Job_To_batch_Job, - Convert_batch_Job_To_v1_Job, - Convert_v1_JobCondition_To_batch_JobCondition, - Convert_batch_JobCondition_To_v1_JobCondition, - Convert_v1_JobList_To_batch_JobList, - Convert_batch_JobList_To_v1_JobList, - Convert_v1_JobSpec_To_batch_JobSpec, - Convert_batch_JobSpec_To_v1_JobSpec, - Convert_v1_JobStatus_To_batch_JobStatus, - Convert_batch_JobStatus_To_v1_JobStatus, - Convert_v1_LabelSelector_To_unversioned_LabelSelector, - Convert_unversioned_LabelSelector_To_v1_LabelSelector, - Convert_v1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement, - Convert_unversioned_LabelSelectorRequirement_To_v1_LabelSelectorRequirement, - ) -} - -func autoConvert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { - SetDefaults_Job(in) - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1_JobStatus_To_batch_JobStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { - return autoConvert_v1_Job_To_batch_Job(in, out, s) -} - -func autoConvert_batch_Job_To_v1_Job(in *batch.Job, out *Job, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_batch_JobSpec_To_v1_JobSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_batch_JobStatus_To_v1_JobStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_batch_Job_To_v1_Job(in *batch.Job, out *Job, s conversion.Scope) error { - return autoConvert_batch_Job_To_v1_Job(in, out, s) -} - -func autoConvert_v1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error { - out.Type = batch.JobConditionType(in.Type) - out.Status = api.ConditionStatus(in.Status) - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil { - return err - } - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil { - return err - } - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -func Convert_v1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error { - return autoConvert_v1_JobCondition_To_batch_JobCondition(in, out, s) -} - -func autoConvert_batch_JobCondition_To_v1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error { - out.Type = JobConditionType(in.Type) - out.Status = api_v1.ConditionStatus(in.Status) - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil { - return err - } - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil { - return err - } - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -func Convert_batch_JobCondition_To_v1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error { - return autoConvert_batch_JobCondition_To_v1_JobCondition(in, out, s) -} - -func autoConvert_v1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]batch.Job, len(*in)) - for i := range *in { - if err := Convert_v1_Job_To_batch_Job(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_v1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error { - return autoConvert_v1_JobList_To_batch_JobList(in, out, s) -} - -func autoConvert_batch_JobList_To_v1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Job, len(*in)) - for i := range *in { - if err := Convert_batch_Job_To_v1_Job(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_batch_JobList_To_v1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error { - return autoConvert_batch_JobList_To_v1_JobList(in, out, s) -} - -func autoConvert_v1_JobSpec_To_batch_JobSpec(in *JobSpec, out *batch.JobSpec, s conversion.Scope) error { - out.Parallelism = in.Parallelism - out.Completions = in.Completions - out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(unversioned.LabelSelector) - if err := Convert_v1_LabelSelector_To_unversioned_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.Selector = nil - } - out.ManualSelector = in.ManualSelector - if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -func autoConvert_batch_JobSpec_To_v1_JobSpec(in *batch.JobSpec, out *JobSpec, s conversion.Scope) error { - out.Parallelism = in.Parallelism - out.Completions = in.Completions - out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(LabelSelector) - if err := Convert_unversioned_LabelSelector_To_v1_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.Selector = nil - } - out.ManualSelector = in.ManualSelector - if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]batch.JobCondition, len(*in)) - for i := range *in { - if err := Convert_v1_JobCondition_To_batch_JobCondition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - out.StartTime = in.StartTime - out.CompletionTime = in.CompletionTime - out.Active = in.Active - out.Succeeded = in.Succeeded - out.Failed = in.Failed - return nil -} - -func Convert_v1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error { - return autoConvert_v1_JobStatus_To_batch_JobStatus(in, out, s) -} - -func autoConvert_batch_JobStatus_To_v1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]JobCondition, len(*in)) - for i := range *in { - if err := Convert_batch_JobCondition_To_v1_JobCondition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - out.StartTime = in.StartTime - out.CompletionTime = in.CompletionTime - out.Active = in.Active - out.Succeeded = in.Succeeded - out.Failed = in.Failed - return nil -} - -func Convert_batch_JobStatus_To_v1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error { - return autoConvert_batch_JobStatus_To_v1_JobStatus(in, out, s) -} - -func autoConvert_v1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error { - out.MatchLabels = in.MatchLabels - if in.MatchExpressions != nil { - in, out := &in.MatchExpressions, &out.MatchExpressions - *out = make([]unversioned.LabelSelectorRequirement, len(*in)) - for i := range *in { - if err := Convert_v1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.MatchExpressions = nil - } - return nil -} - -func Convert_v1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error { - return autoConvert_v1_LabelSelector_To_unversioned_LabelSelector(in, out, s) -} - -func autoConvert_unversioned_LabelSelector_To_v1_LabelSelector(in *unversioned.LabelSelector, out *LabelSelector, s conversion.Scope) error { - out.MatchLabels = in.MatchLabels - if in.MatchExpressions != nil { - in, out := &in.MatchExpressions, &out.MatchExpressions - *out = make([]LabelSelectorRequirement, len(*in)) - for i := range *in { - if err := Convert_unversioned_LabelSelectorRequirement_To_v1_LabelSelectorRequirement(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.MatchExpressions = nil - } - return nil -} - -func Convert_unversioned_LabelSelector_To_v1_LabelSelector(in *unversioned.LabelSelector, out *LabelSelector, s conversion.Scope) error { - return autoConvert_unversioned_LabelSelector_To_v1_LabelSelector(in, out, s) -} - -func autoConvert_v1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in *LabelSelectorRequirement, out *unversioned.LabelSelectorRequirement, s conversion.Scope) error { - out.Key = in.Key - out.Operator = unversioned.LabelSelectorOperator(in.Operator) - out.Values = in.Values - return nil -} - -func Convert_v1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in *LabelSelectorRequirement, out *unversioned.LabelSelectorRequirement, s conversion.Scope) error { - return autoConvert_v1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in, out, s) -} - -func autoConvert_unversioned_LabelSelectorRequirement_To_v1_LabelSelectorRequirement(in *unversioned.LabelSelectorRequirement, out *LabelSelectorRequirement, s conversion.Scope) error { - out.Key = in.Key - out.Operator = LabelSelectorOperator(in.Operator) - out.Values = in.Values - return nil -} - -func Convert_unversioned_LabelSelectorRequirement_To_v1_LabelSelectorRequirement(in *unversioned.LabelSelectorRequirement, out *LabelSelectorRequirement, s conversion.Scope) error { - return autoConvert_unversioned_LabelSelectorRequirement_To_v1_LabelSelectorRequirement(in, out, s) -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/conversion.go b/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/conversion.go deleted file mode 100644 index 5e78d1f62..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/conversion.go +++ /dev/null @@ -1,115 +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 v2alpha1 - -import ( - "fmt" - "reflect" - - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/apis/batch" - "k8s.io/client-go/1.5/pkg/conversion" - "k8s.io/client-go/1.5/pkg/runtime" -) - -func addConversionFuncs(scheme *runtime.Scheme) error { - // Add non-generated conversion functions - err := scheme.AddConversionFuncs( - Convert_batch_JobSpec_To_v2alpha1_JobSpec, - Convert_v2alpha1_JobSpec_To_batch_JobSpec, - ) - if err != nil { - return err - } - - // Add field label conversions for kinds having selectable nothing but ObjectMeta fields. - for _, kind := range []string{"Job", "JobTemplate", "ScheduledJob"} { - err = api.Scheme.AddFieldLabelConversionFunc("batch/v2alpha1", kind, - func(label, value string) (string, string, error) { - switch label { - case "metadata.name", "metadata.namespace", "status.successful": - return label, value, nil - default: - return "", "", fmt.Errorf("field label not supported: %s", label) - } - }) - if err != nil { - return err - } - } - return nil -} - -func Convert_batch_JobSpec_To_v2alpha1_JobSpec(in *batch.JobSpec, out *JobSpec, s conversion.Scope) error { - if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { - defaulting.(func(*batch.JobSpec))(in) - } - out.Parallelism = in.Parallelism - out.Completions = in.Completions - out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds - // unable to generate simple pointer conversion for unversioned.LabelSelector -> v1.LabelSelector - if in.Selector != nil { - out.Selector = new(LabelSelector) - if err := Convert_unversioned_LabelSelector_To_v2alpha1_LabelSelector(in.Selector, out.Selector, s); err != nil { - return err - } - } else { - out.Selector = nil - } - if in.ManualSelector != nil { - out.ManualSelector = new(bool) - *out.ManualSelector = *in.ManualSelector - } else { - out.ManualSelector = nil - } - - if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -func Convert_v2alpha1_JobSpec_To_batch_JobSpec(in *JobSpec, out *batch.JobSpec, s conversion.Scope) error { - if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { - defaulting.(func(*JobSpec))(in) - } - out.Parallelism = in.Parallelism - out.Completions = in.Completions - out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds - // unable to generate simple pointer conversion for unversioned.LabelSelector -> v1.LabelSelector - if in.Selector != nil { - out.Selector = new(unversioned.LabelSelector) - if err := Convert_v2alpha1_LabelSelector_To_unversioned_LabelSelector(in.Selector, out.Selector, s); err != nil { - return err - } - } else { - out.Selector = nil - } - if in.ManualSelector != nil { - out.ManualSelector = new(bool) - *out.ManualSelector = *in.ManualSelector - } else { - out.ManualSelector = nil - } - - if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/defaults.go b/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/defaults.go deleted file mode 100644 index 0350f8815..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/defaults.go +++ /dev/null @@ -1,56 +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 v2alpha1 - -import ( - "k8s.io/client-go/1.5/pkg/runtime" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return scheme.AddDefaultingFuncs( - SetDefaults_Job, - SetDefaults_ScheduledJob, - ) -} - -func SetDefaults_Job(obj *Job) { - // For a non-parallel job, you can leave both `.spec.completions` and - // `.spec.parallelism` unset. When both are unset, both are defaulted to 1. - if obj.Spec.Completions == nil && obj.Spec.Parallelism == nil { - obj.Spec.Completions = new(int32) - *obj.Spec.Completions = 1 - obj.Spec.Parallelism = new(int32) - *obj.Spec.Parallelism = 1 - } - if obj.Spec.Parallelism == nil { - obj.Spec.Parallelism = new(int32) - *obj.Spec.Parallelism = 1 - } - labels := obj.Spec.Template.Labels - if labels != nil && len(obj.Labels) == 0 { - obj.Labels = labels - } -} - -func SetDefaults_ScheduledJob(obj *ScheduledJob) { - if obj.Spec.ConcurrencyPolicy == "" { - obj.Spec.ConcurrencyPolicy = AllowConcurrent - } - if obj.Spec.Suspend == nil { - obj.Spec.Suspend = new(bool) - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/generated.proto b/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/generated.proto deleted file mode 100644 index 95e371e2f..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/generated.proto +++ /dev/null @@ -1,255 +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.apis.batch.v2alpha1; - -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; -import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; -import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "v2alpha1"; - -// Job represents the configuration of a single job. -message Job { - // Standard object's metadata. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; - - // Spec is a structure defining the expected behavior of a job. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - optional JobSpec spec = 2; - - // Status is a structure describing current status of a job. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - optional JobStatus status = 3; -} - -// JobCondition describes current state of a job. -message JobCondition { - // Type of job condition, Complete or Failed. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // Last time the condition was checked. - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastProbeTime = 3; - - // Last time the condition transit from one status to another. - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4; - - // (brief) reason for the condition's last transition. - optional string reason = 5; - - // Human readable message indicating details about last transition. - optional string message = 6; -} - -// JobList is a collection of jobs. -message JobList { - // Standard list metadata - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; - - // Items is the list of Job. - repeated Job items = 2; -} - -// JobSpec describes how the job execution will look like. -message JobSpec { - // Parallelism specifies the maximum desired number of pods the job should - // run at any given time. The actual number of pods running in steady state will - // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), - // i.e. when the work left to do is less than max parallelism. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - optional int32 parallelism = 1; - - // Completions specifies the desired number of successfully finished pods the - // job should be run with. Setting to nil means that the success of any - // pod signals the success of all pods, and allows parallelism to have any positive - // value. Setting to 1 means that parallelism is limited to 1 and the success of that - // pod signals the success of the job. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - optional int32 completions = 2; - - // Optional duration in seconds relative to the startTime that the job may be active - // before the system tries to terminate it; value must be positive integer - optional int64 activeDeadlineSeconds = 3; - - // Selector is a label query over pods that should match the pod count. - // Normally, the system sets this field for you. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - optional LabelSelector selector = 4; - - // ManualSelector controls generation of pod labels and pod selectors. - // Leave `manualSelector` unset unless you are certain what you are doing. - // When false or unset, the system pick labels unique to this job - // and appends those labels to the pod template. When true, - // the user is responsible for picking unique labels and specifying - // the selector. Failure to pick a unique label may cause this - // and other jobs to not function correctly. However, You may see - // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` - // API. - // More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md - optional bool manualSelector = 5; - - // Template is the object that describes the pod that will be created when - // executing a job. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 6; -} - -// JobStatus represents the current state of a Job. -message JobStatus { - // Conditions represent the latest available observations of an object's current state. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - repeated JobCondition conditions = 1; - - // StartTime represents time when the job was acknowledged by the Job Manager. - // It is not guaranteed to be set in happens-before order across separate operations. - // It is represented in RFC3339 form and is in UTC. - optional k8s.io.kubernetes.pkg.api.unversioned.Time startTime = 2; - - // CompletionTime represents time when the job was completed. It is not guaranteed to - // be set in happens-before order across separate operations. - // It is represented in RFC3339 form and is in UTC. - optional k8s.io.kubernetes.pkg.api.unversioned.Time completionTime = 3; - - // Active is the number of actively running pods. - optional int32 active = 4; - - // Succeeded is the number of pods which reached Phase Succeeded. - optional int32 succeeded = 5; - - // Failed is the number of pods which reached Phase Failed. - optional int32 failed = 6; -} - -// JobTemplate describes a template for creating copies of a predefined pod. -message JobTemplate { - // Standard object's metadata. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; - - // Template defines jobs that will be created from this template - // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - optional JobTemplateSpec template = 2; -} - -// JobTemplateSpec describes the data a Job should have when created from a template -message JobTemplateSpec { - // Standard object's metadata of the jobs created from this template. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; - - // Specification of the desired behavior of the job. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - optional JobSpec spec = 2; -} - -// A label selector is a label query over a set of resources. The result of matchLabels and -// matchExpressions are ANDed. An empty label selector matches all objects. A null -// label selector matches no objects. -message LabelSelector { - // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - // map is equivalent to an element of matchExpressions, whose key field is "key", the - // operator is "In", and the values array contains only "value". The requirements are ANDed. - map matchLabels = 1; - - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - repeated LabelSelectorRequirement matchExpressions = 2; -} - -// A label selector requirement is a selector that contains values, a key, and an operator that -// relates the key and values. -message LabelSelectorRequirement { - // key is the label key that the selector applies to. - optional string key = 1; - - // operator represents a key's relationship to a set of values. - // Valid operators ard In, NotIn, Exists and DoesNotExist. - optional string operator = 2; - - // values is an array of string values. If the operator is In or NotIn, - // the values array must be non-empty. If the operator is Exists or DoesNotExist, - // the values array must be empty. This array is replaced during a strategic - // merge patch. - repeated string values = 3; -} - -// ScheduledJob represents the configuration of a single scheduled job. -message ScheduledJob { - // Standard object's metadata. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; - - // Spec is a structure defining the expected behavior of a job, including the schedule. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - optional ScheduledJobSpec spec = 2; - - // Status is a structure describing current status of a job. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - optional ScheduledJobStatus status = 3; -} - -// ScheduledJobList is a collection of scheduled jobs. -message ScheduledJobList { - // Standard list metadata - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; - - // Items is the list of ScheduledJob. - repeated ScheduledJob items = 2; -} - -// ScheduledJobSpec describes how the job execution will look like and when it will actually run. -message ScheduledJobSpec { - // Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. - optional string schedule = 1; - - // Optional deadline in seconds for starting the job if it misses scheduled - // time for any reason. Missed jobs executions will be counted as failed ones. - optional int64 startingDeadlineSeconds = 2; - - // ConcurrencyPolicy specifies how to treat concurrent executions of a Job. - optional string concurrencyPolicy = 3; - - // Suspend flag tells the controller to suspend subsequent executions, it does - // not apply to already started executions. Defaults to false. - optional bool suspend = 4; - - // JobTemplate is the object that describes the job that will be created when - // executing a ScheduledJob. - optional JobTemplateSpec jobTemplate = 5; -} - -// ScheduledJobStatus represents the current state of a Job. -message ScheduledJobStatus { - // Active holds pointers to currently running jobs. - repeated k8s.io.kubernetes.pkg.api.v1.ObjectReference active = 1; - - // LastScheduleTime keeps information of when was the last time the job was successfully scheduled. - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastScheduleTime = 4; -} - diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/types.generated.go deleted file mode 100644 index e0e4ad058..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/types.generated.go +++ /dev/null @@ -1,5312 +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 v2alpha1 - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - pkg4_resource "k8s.io/client-go/1.5/pkg/api/resource" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg2_v1 "k8s.io/client-go/1.5/pkg/api/v1" - pkg3_types "k8s.io/client-go/1.5/pkg/types" - pkg5_intstr "k8s.io/client-go/1.5/pkg/util/intstr" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg4_resource.Quantity - var v1 pkg1_unversioned.TypeMeta - var v2 pkg2_v1.ObjectMeta - var v3 pkg3_types.UID - var v4 pkg5_intstr.IntOrString - var v5 time.Time - _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 - } -} - -func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [5]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = x.Kind != "" - yyq2[1] = x.APIVersion != "" - yyq2[2] = true - yyq2[3] = true - yyq2[4] = true - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(5) - } else { - yynn2 = 0 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[1] { - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy11 := &x.ObjectMeta - yy11.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[3] { - yy13 := &x.Spec - yy13.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy14 := &x.Spec - yy14.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { - yy16 := &x.Status - yy16.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy17 := &x.Status - yy17.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Job) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym18 := z.DecBinary() - _ = yym18 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct19 := r.ContainerType() - if yyct19 == codecSelferValueTypeMap1234 { - yyl19 := r.ReadMapStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl19, d) - } - } else if yyct19 == codecSelferValueTypeArray1234 { - yyl19 := r.ReadArrayStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl19, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Job) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys20Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys20Slc - var yyhl20 bool = l >= 0 - for yyj20 := 0; ; yyj20++ { - if yyhl20 { - if yyj20 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys20Slc = r.DecodeBytes(yys20Slc, true, true) - yys20 := string(yys20Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys20 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv23 := &x.ObjectMeta - yyv23.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = JobSpec{} - } else { - yyv24 := &x.Spec - yyv24.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = JobStatus{} - } else { - yyv25 := &x.Status - yyv25.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys20) - } // end switch yys20 - } // end for yyj20 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj26 int - var yyb26 bool - var yyhl26 bool = l >= 0 - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv29 := &x.ObjectMeta - yyv29.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = JobSpec{} - } else { - yyv30 := &x.Spec - yyv30.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = JobStatus{} - } else { - yyv31 := &x.Status - yyv31.CodecDecodeSelf(d) - } - for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj26-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym32 := z.EncBinary() - _ = yym32 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep33 := !z.EncBinary() - yy2arr33 := z.EncBasicHandle().StructToArray - var yyq33 [4]bool - _, _, _ = yysep33, yyq33, yy2arr33 - const yyr33 bool = false - yyq33[0] = x.Kind != "" - yyq33[1] = x.APIVersion != "" - yyq33[2] = true - var yynn33 int - if yyr33 || yy2arr33 { - r.EncodeArrayStart(4) - } else { - yynn33 = 1 - for _, b := range yyq33 { - if b { - yynn33++ - } - } - r.EncodeMapStart(yynn33) - yynn33 = 0 - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[0] { - yym35 := z.EncBinary() - _ = yym35 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq33[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym36 := z.EncBinary() - _ = yym36 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[1] { - yym38 := z.EncBinary() - _ = yym38 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq33[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym39 := z.EncBinary() - _ = yym39 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[2] { - yy41 := &x.ListMeta - yym42 := z.EncBinary() - _ = yym42 - if false { - } else if z.HasExtensions() && z.EncExt(yy41) { - } else { - z.EncFallback(yy41) - } - } else { - r.EncodeNil() - } - } else { - if yyq33[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy43 := &x.ListMeta - yym44 := z.EncBinary() - _ = yym44 - if false { - } else if z.HasExtensions() && z.EncExt(yy43) { - } else { - z.EncFallback(yy43) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym46 := z.EncBinary() - _ = yym46 - if false { - } else { - h.encSliceJob(([]Job)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym47 := z.EncBinary() - _ = yym47 - if false { - } else { - h.encSliceJob(([]Job)(x.Items), e) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym48 := z.DecBinary() - _ = yym48 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct49 := r.ContainerType() - if yyct49 == codecSelferValueTypeMap1234 { - yyl49 := r.ReadMapStart() - if yyl49 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl49, d) - } - } else if yyct49 == codecSelferValueTypeArray1234 { - yyl49 := r.ReadArrayStart() - if yyl49 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl49, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys50Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys50Slc - var yyhl50 bool = l >= 0 - for yyj50 := 0; ; yyj50++ { - if yyhl50 { - if yyj50 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys50Slc = r.DecodeBytes(yys50Slc, true, true) - yys50 := string(yys50Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys50 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv53 := &x.ListMeta - yym54 := z.DecBinary() - _ = yym54 - if false { - } else if z.HasExtensions() && z.DecExt(yyv53) { - } else { - z.DecFallback(yyv53, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv55 := &x.Items - yym56 := z.DecBinary() - _ = yym56 - if false { - } else { - h.decSliceJob((*[]Job)(yyv55), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys50) - } // end switch yys50 - } // end for yyj50 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj57 int - var yyb57 bool - var yyhl57 bool = l >= 0 - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv60 := &x.ListMeta - yym61 := z.DecBinary() - _ = yym61 - if false { - } else if z.HasExtensions() && z.DecExt(yyv60) { - } else { - z.DecFallback(yyv60, false) - } - } - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv62 := &x.Items - yym63 := z.DecBinary() - _ = yym63 - if false { - } else { - h.decSliceJob((*[]Job)(yyv62), d) - } - } - for { - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l - } else { - yyb57 = r.CheckBreak() - } - if yyb57 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj57-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobTemplate) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym64 := z.EncBinary() - _ = yym64 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep65 := !z.EncBinary() - yy2arr65 := z.EncBasicHandle().StructToArray - var yyq65 [4]bool - _, _, _ = yysep65, yyq65, yy2arr65 - const yyr65 bool = false - yyq65[0] = x.Kind != "" - yyq65[1] = x.APIVersion != "" - yyq65[2] = true - yyq65[3] = true - var yynn65 int - if yyr65 || yy2arr65 { - r.EncodeArrayStart(4) - } else { - yynn65 = 0 - for _, b := range yyq65 { - if b { - yynn65++ - } - } - r.EncodeMapStart(yynn65) - yynn65 = 0 - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[0] { - yym67 := z.EncBinary() - _ = yym67 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq65[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym68 := z.EncBinary() - _ = yym68 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[1] { - yym70 := z.EncBinary() - _ = yym70 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq65[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym71 := z.EncBinary() - _ = yym71 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[2] { - yy73 := &x.ObjectMeta - yy73.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq65[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy74 := &x.ObjectMeta - yy74.CodecEncodeSelf(e) - } - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[3] { - yy76 := &x.Template - yy76.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq65[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("template")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy77 := &x.Template - yy77.CodecEncodeSelf(e) - } - } - if yyr65 || yy2arr65 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobTemplate) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym78 := z.DecBinary() - _ = yym78 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct79 := r.ContainerType() - if yyct79 == codecSelferValueTypeMap1234 { - yyl79 := r.ReadMapStart() - if yyl79 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl79, d) - } - } else if yyct79 == codecSelferValueTypeArray1234 { - yyl79 := r.ReadArrayStart() - if yyl79 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl79, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys80Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys80Slc - var yyhl80 bool = l >= 0 - for yyj80 := 0; ; yyj80++ { - if yyhl80 { - if yyj80 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys80Slc = r.DecodeBytes(yys80Slc, true, true) - yys80 := string(yys80Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys80 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv83 := &x.ObjectMeta - yyv83.CodecDecodeSelf(d) - } - case "template": - if r.TryDecodeAsNil() { - x.Template = JobTemplateSpec{} - } else { - yyv84 := &x.Template - yyv84.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys80) - } // end switch yys80 - } // end for yyj80 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj85 int - var yyb85 bool - var yyhl85 bool = l >= 0 - yyj85++ - if yyhl85 { - yyb85 = yyj85 > l - } else { - yyb85 = r.CheckBreak() - } - if yyb85 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj85++ - if yyhl85 { - yyb85 = yyj85 > l - } else { - yyb85 = r.CheckBreak() - } - if yyb85 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj85++ - if yyhl85 { - yyb85 = yyj85 > l - } else { - yyb85 = r.CheckBreak() - } - if yyb85 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv88 := &x.ObjectMeta - yyv88.CodecDecodeSelf(d) - } - yyj85++ - if yyhl85 { - yyb85 = yyj85 > l - } else { - yyb85 = r.CheckBreak() - } - if yyb85 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Template = JobTemplateSpec{} - } else { - yyv89 := &x.Template - yyv89.CodecDecodeSelf(d) - } - for { - yyj85++ - if yyhl85 { - yyb85 = yyj85 > l - } else { - yyb85 = r.CheckBreak() - } - if yyb85 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj85-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym90 := z.EncBinary() - _ = yym90 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep91 := !z.EncBinary() - yy2arr91 := z.EncBasicHandle().StructToArray - var yyq91 [2]bool - _, _, _ = yysep91, yyq91, yy2arr91 - const yyr91 bool = false - yyq91[0] = true - yyq91[1] = true - var yynn91 int - if yyr91 || yy2arr91 { - r.EncodeArrayStart(2) - } else { - yynn91 = 0 - for _, b := range yyq91 { - if b { - yynn91++ - } - } - r.EncodeMapStart(yynn91) - yynn91 = 0 - } - if yyr91 || yy2arr91 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq91[0] { - yy93 := &x.ObjectMeta - yy93.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq91[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy94 := &x.ObjectMeta - yy94.CodecEncodeSelf(e) - } - } - if yyr91 || yy2arr91 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq91[1] { - yy96 := &x.Spec - yy96.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq91[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy97 := &x.Spec - yy97.CodecEncodeSelf(e) - } - } - if yyr91 || yy2arr91 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobTemplateSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym98 := z.DecBinary() - _ = yym98 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct99 := r.ContainerType() - if yyct99 == codecSelferValueTypeMap1234 { - yyl99 := r.ReadMapStart() - if yyl99 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl99, d) - } - } else if yyct99 == codecSelferValueTypeArray1234 { - yyl99 := r.ReadArrayStart() - if yyl99 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl99, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys100Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys100Slc - var yyhl100 bool = l >= 0 - for yyj100 := 0; ; yyj100++ { - if yyhl100 { - if yyj100 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys100Slc = r.DecodeBytes(yys100Slc, true, true) - yys100 := string(yys100Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys100 { - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv101 := &x.ObjectMeta - yyv101.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = JobSpec{} - } else { - yyv102 := &x.Spec - yyv102.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys100) - } // end switch yys100 - } // end for yyj100 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj103 int - var yyb103 bool - var yyhl103 bool = l >= 0 - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv104 := &x.ObjectMeta - yyv104.CodecDecodeSelf(d) - } - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = JobSpec{} - } else { - yyv105 := &x.Spec - yyv105.CodecDecodeSelf(d) - } - for { - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj103-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym106 := z.EncBinary() - _ = yym106 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep107 := !z.EncBinary() - yy2arr107 := z.EncBasicHandle().StructToArray - var yyq107 [6]bool - _, _, _ = yysep107, yyq107, yy2arr107 - const yyr107 bool = false - yyq107[0] = x.Parallelism != nil - yyq107[1] = x.Completions != nil - yyq107[2] = x.ActiveDeadlineSeconds != nil - yyq107[3] = x.Selector != nil - yyq107[4] = x.ManualSelector != nil - var yynn107 int - if yyr107 || yy2arr107 { - r.EncodeArrayStart(6) - } else { - yynn107 = 1 - for _, b := range yyq107 { - if b { - yynn107++ - } - } - r.EncodeMapStart(yynn107) - yynn107 = 0 - } - if yyr107 || yy2arr107 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq107[0] { - if x.Parallelism == nil { - r.EncodeNil() - } else { - yy109 := *x.Parallelism - yym110 := z.EncBinary() - _ = yym110 - if false { - } else { - r.EncodeInt(int64(yy109)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq107[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("parallelism")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Parallelism == nil { - r.EncodeNil() - } else { - yy111 := *x.Parallelism - yym112 := z.EncBinary() - _ = yym112 - if false { - } else { - r.EncodeInt(int64(yy111)) - } - } - } - } - if yyr107 || yy2arr107 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq107[1] { - if x.Completions == nil { - r.EncodeNil() - } else { - yy114 := *x.Completions - yym115 := z.EncBinary() - _ = yym115 - if false { - } else { - r.EncodeInt(int64(yy114)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq107[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("completions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Completions == nil { - r.EncodeNil() - } else { - yy116 := *x.Completions - yym117 := z.EncBinary() - _ = yym117 - if false { - } else { - r.EncodeInt(int64(yy116)) - } - } - } - } - if yyr107 || yy2arr107 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq107[2] { - if x.ActiveDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy119 := *x.ActiveDeadlineSeconds - yym120 := z.EncBinary() - _ = yym120 - if false { - } else { - r.EncodeInt(int64(yy119)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq107[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("activeDeadlineSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ActiveDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy121 := *x.ActiveDeadlineSeconds - yym122 := z.EncBinary() - _ = yym122 - if false { - } else { - r.EncodeInt(int64(yy121)) - } - } - } - } - if yyr107 || yy2arr107 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq107[3] { - if x.Selector == nil { - r.EncodeNil() - } else { - x.Selector.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq107[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Selector == nil { - r.EncodeNil() - } else { - x.Selector.CodecEncodeSelf(e) - } - } - } - if yyr107 || yy2arr107 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq107[4] { - if x.ManualSelector == nil { - r.EncodeNil() - } else { - yy125 := *x.ManualSelector - yym126 := z.EncBinary() - _ = yym126 - if false { - } else { - r.EncodeBool(bool(yy125)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq107[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("manualSelector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ManualSelector == nil { - r.EncodeNil() - } else { - yy127 := *x.ManualSelector - yym128 := z.EncBinary() - _ = yym128 - if false { - } else { - r.EncodeBool(bool(yy127)) - } - } - } - } - if yyr107 || yy2arr107 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy130 := &x.Template - yy130.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("template")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy131 := &x.Template - yy131.CodecEncodeSelf(e) - } - if yyr107 || yy2arr107 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym132 := z.DecBinary() - _ = yym132 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct133 := r.ContainerType() - if yyct133 == codecSelferValueTypeMap1234 { - yyl133 := r.ReadMapStart() - if yyl133 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl133, d) - } - } else if yyct133 == codecSelferValueTypeArray1234 { - yyl133 := r.ReadArrayStart() - if yyl133 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl133, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys134Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys134Slc - var yyhl134 bool = l >= 0 - for yyj134 := 0; ; yyj134++ { - if yyhl134 { - if yyj134 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys134Slc = r.DecodeBytes(yys134Slc, true, true) - yys134 := string(yys134Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys134 { - case "parallelism": - if r.TryDecodeAsNil() { - if x.Parallelism != nil { - x.Parallelism = nil - } - } else { - if x.Parallelism == nil { - x.Parallelism = new(int32) - } - yym136 := z.DecBinary() - _ = yym136 - if false { - } else { - *((*int32)(x.Parallelism)) = int32(r.DecodeInt(32)) - } - } - case "completions": - if r.TryDecodeAsNil() { - if x.Completions != nil { - x.Completions = nil - } - } else { - if x.Completions == nil { - x.Completions = new(int32) - } - yym138 := z.DecBinary() - _ = yym138 - if false { - } else { - *((*int32)(x.Completions)) = int32(r.DecodeInt(32)) - } - } - case "activeDeadlineSeconds": - if r.TryDecodeAsNil() { - if x.ActiveDeadlineSeconds != nil { - x.ActiveDeadlineSeconds = nil - } - } else { - if x.ActiveDeadlineSeconds == nil { - x.ActiveDeadlineSeconds = new(int64) - } - yym140 := z.DecBinary() - _ = yym140 - if false { - } else { - *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) - } - } - case "selector": - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(LabelSelector) - } - x.Selector.CodecDecodeSelf(d) - } - case "manualSelector": - if r.TryDecodeAsNil() { - if x.ManualSelector != nil { - x.ManualSelector = nil - } - } else { - if x.ManualSelector == nil { - x.ManualSelector = new(bool) - } - yym143 := z.DecBinary() - _ = yym143 - if false { - } else { - *((*bool)(x.ManualSelector)) = r.DecodeBool() - } - } - case "template": - if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} - } else { - yyv144 := &x.Template - yyv144.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys134) - } // end switch yys134 - } // end for yyj134 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj145 int - var yyb145 bool - var yyhl145 bool = l >= 0 - yyj145++ - if yyhl145 { - yyb145 = yyj145 > l - } else { - yyb145 = r.CheckBreak() - } - if yyb145 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Parallelism != nil { - x.Parallelism = nil - } - } else { - if x.Parallelism == nil { - x.Parallelism = new(int32) - } - yym147 := z.DecBinary() - _ = yym147 - if false { - } else { - *((*int32)(x.Parallelism)) = int32(r.DecodeInt(32)) - } - } - yyj145++ - if yyhl145 { - yyb145 = yyj145 > l - } else { - yyb145 = r.CheckBreak() - } - if yyb145 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Completions != nil { - x.Completions = nil - } - } else { - if x.Completions == nil { - x.Completions = new(int32) - } - yym149 := z.DecBinary() - _ = yym149 - if false { - } else { - *((*int32)(x.Completions)) = int32(r.DecodeInt(32)) - } - } - yyj145++ - if yyhl145 { - yyb145 = yyj145 > l - } else { - yyb145 = r.CheckBreak() - } - if yyb145 { - 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) - } - yym151 := z.DecBinary() - _ = yym151 - if false { - } else { - *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) - } - } - yyj145++ - if yyhl145 { - yyb145 = yyj145 > l - } else { - yyb145 = r.CheckBreak() - } - if yyb145 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(LabelSelector) - } - x.Selector.CodecDecodeSelf(d) - } - yyj145++ - if yyhl145 { - yyb145 = yyj145 > l - } else { - yyb145 = r.CheckBreak() - } - if yyb145 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.ManualSelector != nil { - x.ManualSelector = nil - } - } else { - if x.ManualSelector == nil { - x.ManualSelector = new(bool) - } - yym154 := z.DecBinary() - _ = yym154 - if false { - } else { - *((*bool)(x.ManualSelector)) = r.DecodeBool() - } - } - yyj145++ - if yyhl145 { - yyb145 = yyj145 > l - } else { - yyb145 = r.CheckBreak() - } - if yyb145 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} - } else { - yyv155 := &x.Template - yyv155.CodecDecodeSelf(d) - } - for { - yyj145++ - if yyhl145 { - yyb145 = yyj145 > l - } else { - yyb145 = r.CheckBreak() - } - if yyb145 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj145-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym156 := z.EncBinary() - _ = yym156 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep157 := !z.EncBinary() - yy2arr157 := z.EncBasicHandle().StructToArray - var yyq157 [6]bool - _, _, _ = yysep157, yyq157, yy2arr157 - const yyr157 bool = false - yyq157[0] = len(x.Conditions) != 0 - yyq157[1] = x.StartTime != nil - yyq157[2] = x.CompletionTime != nil - yyq157[3] = x.Active != 0 - yyq157[4] = x.Succeeded != 0 - yyq157[5] = x.Failed != 0 - var yynn157 int - if yyr157 || yy2arr157 { - r.EncodeArrayStart(6) - } else { - yynn157 = 0 - for _, b := range yyq157 { - if b { - yynn157++ - } - } - r.EncodeMapStart(yynn157) - yynn157 = 0 - } - if yyr157 || yy2arr157 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq157[0] { - if x.Conditions == nil { - r.EncodeNil() - } else { - yym159 := z.EncBinary() - _ = yym159 - if false { - } else { - h.encSliceJobCondition(([]JobCondition)(x.Conditions), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq157[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("conditions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Conditions == nil { - r.EncodeNil() - } else { - yym160 := z.EncBinary() - _ = yym160 - if false { - } else { - h.encSliceJobCondition(([]JobCondition)(x.Conditions), e) - } - } - } - } - if yyr157 || yy2arr157 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq157[1] { - if x.StartTime == nil { - r.EncodeNil() - } else { - yym162 := z.EncBinary() - _ = yym162 - if false { - } else if z.HasExtensions() && z.EncExt(x.StartTime) { - } else if yym162 { - z.EncBinaryMarshal(x.StartTime) - } else if !yym162 && z.IsJSONHandle() { - z.EncJSONMarshal(x.StartTime) - } else { - z.EncFallback(x.StartTime) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq157[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("startTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.StartTime == nil { - r.EncodeNil() - } else { - yym163 := z.EncBinary() - _ = yym163 - if false { - } else if z.HasExtensions() && z.EncExt(x.StartTime) { - } else if yym163 { - z.EncBinaryMarshal(x.StartTime) - } else if !yym163 && z.IsJSONHandle() { - z.EncJSONMarshal(x.StartTime) - } else { - z.EncFallback(x.StartTime) - } - } - } - } - if yyr157 || yy2arr157 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq157[2] { - if x.CompletionTime == nil { - r.EncodeNil() - } else { - yym165 := z.EncBinary() - _ = yym165 - if false { - } else if z.HasExtensions() && z.EncExt(x.CompletionTime) { - } else if yym165 { - z.EncBinaryMarshal(x.CompletionTime) - } else if !yym165 && z.IsJSONHandle() { - z.EncJSONMarshal(x.CompletionTime) - } else { - z.EncFallback(x.CompletionTime) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq157[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("completionTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.CompletionTime == nil { - r.EncodeNil() - } else { - yym166 := z.EncBinary() - _ = yym166 - if false { - } else if z.HasExtensions() && z.EncExt(x.CompletionTime) { - } else if yym166 { - z.EncBinaryMarshal(x.CompletionTime) - } else if !yym166 && z.IsJSONHandle() { - z.EncJSONMarshal(x.CompletionTime) - } else { - z.EncFallback(x.CompletionTime) - } - } - } - } - if yyr157 || yy2arr157 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq157[3] { - yym168 := z.EncBinary() - _ = yym168 - if false { - } else { - r.EncodeInt(int64(x.Active)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq157[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("active")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym169 := z.EncBinary() - _ = yym169 - if false { - } else { - r.EncodeInt(int64(x.Active)) - } - } - } - if yyr157 || yy2arr157 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq157[4] { - yym171 := z.EncBinary() - _ = yym171 - if false { - } else { - r.EncodeInt(int64(x.Succeeded)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq157[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("succeeded")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym172 := z.EncBinary() - _ = yym172 - if false { - } else { - r.EncodeInt(int64(x.Succeeded)) - } - } - } - if yyr157 || yy2arr157 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq157[5] { - yym174 := z.EncBinary() - _ = yym174 - if false { - } else { - r.EncodeInt(int64(x.Failed)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq157[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("failed")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym175 := z.EncBinary() - _ = yym175 - if false { - } else { - r.EncodeInt(int64(x.Failed)) - } - } - } - if yyr157 || yy2arr157 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym176 := z.DecBinary() - _ = yym176 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct177 := r.ContainerType() - if yyct177 == codecSelferValueTypeMap1234 { - yyl177 := r.ReadMapStart() - if yyl177 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl177, d) - } - } else if yyct177 == codecSelferValueTypeArray1234 { - yyl177 := r.ReadArrayStart() - if yyl177 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl177, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys178Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys178Slc - var yyhl178 bool = l >= 0 - for yyj178 := 0; ; yyj178++ { - if yyhl178 { - if yyj178 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys178Slc = r.DecodeBytes(yys178Slc, true, true) - yys178 := string(yys178Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys178 { - case "conditions": - if r.TryDecodeAsNil() { - x.Conditions = nil - } else { - yyv179 := &x.Conditions - yym180 := z.DecBinary() - _ = yym180 - if false { - } else { - h.decSliceJobCondition((*[]JobCondition)(yyv179), d) - } - } - case "startTime": - if r.TryDecodeAsNil() { - if x.StartTime != nil { - x.StartTime = nil - } - } else { - if x.StartTime == nil { - x.StartTime = new(pkg1_unversioned.Time) - } - yym182 := z.DecBinary() - _ = yym182 - if false { - } else if z.HasExtensions() && z.DecExt(x.StartTime) { - } else if yym182 { - z.DecBinaryUnmarshal(x.StartTime) - } else if !yym182 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.StartTime) - } else { - z.DecFallback(x.StartTime, false) - } - } - case "completionTime": - if r.TryDecodeAsNil() { - if x.CompletionTime != nil { - x.CompletionTime = nil - } - } else { - if x.CompletionTime == nil { - x.CompletionTime = new(pkg1_unversioned.Time) - } - yym184 := z.DecBinary() - _ = yym184 - if false { - } else if z.HasExtensions() && z.DecExt(x.CompletionTime) { - } else if yym184 { - z.DecBinaryUnmarshal(x.CompletionTime) - } else if !yym184 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.CompletionTime) - } else { - z.DecFallback(x.CompletionTime, false) - } - } - case "active": - if r.TryDecodeAsNil() { - x.Active = 0 - } else { - x.Active = int32(r.DecodeInt(32)) - } - case "succeeded": - if r.TryDecodeAsNil() { - x.Succeeded = 0 - } else { - x.Succeeded = int32(r.DecodeInt(32)) - } - case "failed": - if r.TryDecodeAsNil() { - x.Failed = 0 - } else { - x.Failed = int32(r.DecodeInt(32)) - } - default: - z.DecStructFieldNotFound(-1, yys178) - } // end switch yys178 - } // end for yyj178 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj188 int - var yyb188 bool - var yyhl188 bool = l >= 0 - yyj188++ - if yyhl188 { - yyb188 = yyj188 > l - } else { - yyb188 = r.CheckBreak() - } - if yyb188 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Conditions = nil - } else { - yyv189 := &x.Conditions - yym190 := z.DecBinary() - _ = yym190 - if false { - } else { - h.decSliceJobCondition((*[]JobCondition)(yyv189), d) - } - } - yyj188++ - if yyhl188 { - yyb188 = yyj188 > l - } else { - yyb188 = r.CheckBreak() - } - if yyb188 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.StartTime != nil { - x.StartTime = nil - } - } else { - if x.StartTime == nil { - x.StartTime = new(pkg1_unversioned.Time) - } - yym192 := z.DecBinary() - _ = yym192 - if false { - } else if z.HasExtensions() && z.DecExt(x.StartTime) { - } else if yym192 { - z.DecBinaryUnmarshal(x.StartTime) - } else if !yym192 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.StartTime) - } else { - z.DecFallback(x.StartTime, false) - } - } - yyj188++ - if yyhl188 { - yyb188 = yyj188 > l - } else { - yyb188 = r.CheckBreak() - } - if yyb188 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.CompletionTime != nil { - x.CompletionTime = nil - } - } else { - if x.CompletionTime == nil { - x.CompletionTime = new(pkg1_unversioned.Time) - } - yym194 := z.DecBinary() - _ = yym194 - if false { - } else if z.HasExtensions() && z.DecExt(x.CompletionTime) { - } else if yym194 { - z.DecBinaryUnmarshal(x.CompletionTime) - } else if !yym194 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.CompletionTime) - } else { - z.DecFallback(x.CompletionTime, false) - } - } - yyj188++ - if yyhl188 { - yyb188 = yyj188 > l - } else { - yyb188 = r.CheckBreak() - } - if yyb188 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Active = 0 - } else { - x.Active = int32(r.DecodeInt(32)) - } - yyj188++ - if yyhl188 { - yyb188 = yyj188 > l - } else { - yyb188 = r.CheckBreak() - } - if yyb188 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Succeeded = 0 - } else { - x.Succeeded = int32(r.DecodeInt(32)) - } - yyj188++ - if yyhl188 { - yyb188 = yyj188 > l - } else { - yyb188 = r.CheckBreak() - } - if yyb188 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Failed = 0 - } else { - x.Failed = int32(r.DecodeInt(32)) - } - for { - yyj188++ - if yyhl188 { - yyb188 = yyj188 > l - } else { - yyb188 = r.CheckBreak() - } - if yyb188 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj188-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x JobConditionType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym198 := z.EncBinary() - _ = yym198 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *JobConditionType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym199 := z.DecBinary() - _ = yym199 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *JobCondition) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym200 := z.EncBinary() - _ = yym200 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep201 := !z.EncBinary() - yy2arr201 := z.EncBasicHandle().StructToArray - var yyq201 [6]bool - _, _, _ = yysep201, yyq201, yy2arr201 - const yyr201 bool = false - yyq201[2] = true - yyq201[3] = true - yyq201[4] = x.Reason != "" - yyq201[5] = x.Message != "" - var yynn201 int - if yyr201 || yy2arr201 { - r.EncodeArrayStart(6) - } else { - yynn201 = 2 - for _, b := range yyq201 { - if b { - yynn201++ - } - } - r.EncodeMapStart(yynn201) - yynn201 = 0 - } - if yyr201 || yy2arr201 { - 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 yyr201 || yy2arr201 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym204 := z.EncBinary() - _ = yym204 - if false { - } else if z.HasExtensions() && z.EncExt(x.Status) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Status)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym205 := z.EncBinary() - _ = yym205 - if false { - } else if z.HasExtensions() && z.EncExt(x.Status) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Status)) - } - } - if yyr201 || yy2arr201 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq201[2] { - yy207 := &x.LastProbeTime - yym208 := z.EncBinary() - _ = yym208 - if false { - } else if z.HasExtensions() && z.EncExt(yy207) { - } else if yym208 { - z.EncBinaryMarshal(yy207) - } else if !yym208 && z.IsJSONHandle() { - z.EncJSONMarshal(yy207) - } else { - z.EncFallback(yy207) - } - } else { - r.EncodeNil() - } - } else { - if yyq201[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastProbeTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy209 := &x.LastProbeTime - yym210 := z.EncBinary() - _ = yym210 - if false { - } else if z.HasExtensions() && z.EncExt(yy209) { - } else if yym210 { - z.EncBinaryMarshal(yy209) - } else if !yym210 && z.IsJSONHandle() { - z.EncJSONMarshal(yy209) - } else { - z.EncFallback(yy209) - } - } - } - if yyr201 || yy2arr201 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq201[3] { - yy212 := &x.LastTransitionTime - yym213 := z.EncBinary() - _ = yym213 - if false { - } else if z.HasExtensions() && z.EncExt(yy212) { - } else if yym213 { - z.EncBinaryMarshal(yy212) - } else if !yym213 && z.IsJSONHandle() { - z.EncJSONMarshal(yy212) - } else { - z.EncFallback(yy212) - } - } else { - r.EncodeNil() - } - } else { - if yyq201[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy214 := &x.LastTransitionTime - yym215 := z.EncBinary() - _ = yym215 - if false { - } else if z.HasExtensions() && z.EncExt(yy214) { - } else if yym215 { - z.EncBinaryMarshal(yy214) - } else if !yym215 && z.IsJSONHandle() { - z.EncJSONMarshal(yy214) - } else { - z.EncFallback(yy214) - } - } - } - if yyr201 || yy2arr201 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq201[4] { - yym217 := z.EncBinary() - _ = yym217 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq201[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("reason")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym218 := z.EncBinary() - _ = yym218 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } - } - if yyr201 || yy2arr201 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq201[5] { - yym220 := z.EncBinary() - _ = yym220 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq201[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("message")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym221 := z.EncBinary() - _ = yym221 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } - } - if yyr201 || yy2arr201 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobCondition) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym222 := z.DecBinary() - _ = yym222 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct223 := r.ContainerType() - if yyct223 == codecSelferValueTypeMap1234 { - yyl223 := r.ReadMapStart() - if yyl223 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl223, d) - } - } else if yyct223 == codecSelferValueTypeArray1234 { - yyl223 := r.ReadArrayStart() - if yyl223 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl223, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys224Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys224Slc - var yyhl224 bool = l >= 0 - for yyj224 := 0; ; yyj224++ { - if yyhl224 { - if yyj224 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys224Slc = r.DecodeBytes(yys224Slc, true, true) - yys224 := string(yys224Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys224 { - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = JobConditionType(r.DecodeString()) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = pkg2_v1.ConditionStatus(r.DecodeString()) - } - case "lastProbeTime": - if r.TryDecodeAsNil() { - x.LastProbeTime = pkg1_unversioned.Time{} - } else { - yyv227 := &x.LastProbeTime - yym228 := z.DecBinary() - _ = yym228 - if false { - } else if z.HasExtensions() && z.DecExt(yyv227) { - } else if yym228 { - z.DecBinaryUnmarshal(yyv227) - } else if !yym228 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv227) - } else { - z.DecFallback(yyv227, false) - } - } - case "lastTransitionTime": - if r.TryDecodeAsNil() { - x.LastTransitionTime = pkg1_unversioned.Time{} - } else { - yyv229 := &x.LastTransitionTime - yym230 := z.DecBinary() - _ = yym230 - if false { - } else if z.HasExtensions() && z.DecExt(yyv229) { - } else if yym230 { - z.DecBinaryUnmarshal(yyv229) - } else if !yym230 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv229) - } else { - z.DecFallback(yyv229, 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, yys224) - } // end switch yys224 - } // end for yyj224 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj233 int - var yyb233 bool - var yyhl233 bool = l >= 0 - yyj233++ - if yyhl233 { - yyb233 = yyj233 > l - } else { - yyb233 = r.CheckBreak() - } - if yyb233 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = JobConditionType(r.DecodeString()) - } - yyj233++ - if yyhl233 { - yyb233 = yyj233 > l - } else { - yyb233 = r.CheckBreak() - } - if yyb233 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = pkg2_v1.ConditionStatus(r.DecodeString()) - } - yyj233++ - if yyhl233 { - yyb233 = yyj233 > l - } else { - yyb233 = r.CheckBreak() - } - if yyb233 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastProbeTime = pkg1_unversioned.Time{} - } else { - yyv236 := &x.LastProbeTime - yym237 := z.DecBinary() - _ = yym237 - if false { - } else if z.HasExtensions() && z.DecExt(yyv236) { - } else if yym237 { - z.DecBinaryUnmarshal(yyv236) - } else if !yym237 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv236) - } else { - z.DecFallback(yyv236, false) - } - } - yyj233++ - if yyhl233 { - yyb233 = yyj233 > l - } else { - yyb233 = r.CheckBreak() - } - if yyb233 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastTransitionTime = pkg1_unversioned.Time{} - } else { - yyv238 := &x.LastTransitionTime - yym239 := z.DecBinary() - _ = yym239 - if false { - } else if z.HasExtensions() && z.DecExt(yyv238) { - } else if yym239 { - z.DecBinaryUnmarshal(yyv238) - } else if !yym239 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv238) - } else { - z.DecFallback(yyv238, false) - } - } - yyj233++ - if yyhl233 { - yyb233 = yyj233 > l - } else { - yyb233 = r.CheckBreak() - } - if yyb233 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - yyj233++ - if yyhl233 { - yyb233 = yyj233 > l - } else { - yyb233 = r.CheckBreak() - } - if yyb233 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - for { - yyj233++ - if yyhl233 { - yyb233 = yyj233 > l - } else { - yyb233 = r.CheckBreak() - } - if yyb233 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj233-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ScheduledJob) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym242 := z.EncBinary() - _ = yym242 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep243 := !z.EncBinary() - yy2arr243 := z.EncBasicHandle().StructToArray - var yyq243 [5]bool - _, _, _ = yysep243, yyq243, yy2arr243 - const yyr243 bool = false - yyq243[0] = x.Kind != "" - yyq243[1] = x.APIVersion != "" - yyq243[2] = true - yyq243[3] = true - yyq243[4] = true - var yynn243 int - if yyr243 || yy2arr243 { - r.EncodeArrayStart(5) - } else { - yynn243 = 0 - for _, b := range yyq243 { - if b { - yynn243++ - } - } - r.EncodeMapStart(yynn243) - yynn243 = 0 - } - if yyr243 || yy2arr243 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq243[0] { - yym245 := z.EncBinary() - _ = yym245 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq243[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym246 := z.EncBinary() - _ = yym246 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr243 || yy2arr243 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq243[1] { - yym248 := z.EncBinary() - _ = yym248 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq243[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym249 := z.EncBinary() - _ = yym249 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr243 || yy2arr243 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq243[2] { - yy251 := &x.ObjectMeta - yy251.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq243[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy252 := &x.ObjectMeta - yy252.CodecEncodeSelf(e) - } - } - if yyr243 || yy2arr243 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq243[3] { - yy254 := &x.Spec - yy254.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq243[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy255 := &x.Spec - yy255.CodecEncodeSelf(e) - } - } - if yyr243 || yy2arr243 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq243[4] { - yy257 := &x.Status - yy257.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq243[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy258 := &x.Status - yy258.CodecEncodeSelf(e) - } - } - if yyr243 || yy2arr243 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScheduledJob) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym259 := z.DecBinary() - _ = yym259 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct260 := r.ContainerType() - if yyct260 == codecSelferValueTypeMap1234 { - yyl260 := r.ReadMapStart() - if yyl260 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl260, d) - } - } else if yyct260 == codecSelferValueTypeArray1234 { - yyl260 := r.ReadArrayStart() - if yyl260 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl260, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScheduledJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys261Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys261Slc - var yyhl261 bool = l >= 0 - for yyj261 := 0; ; yyj261++ { - if yyhl261 { - if yyj261 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys261Slc = r.DecodeBytes(yys261Slc, true, true) - yys261 := string(yys261Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys261 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv264 := &x.ObjectMeta - yyv264.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = ScheduledJobSpec{} - } else { - yyv265 := &x.Spec - yyv265.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = ScheduledJobStatus{} - } else { - yyv266 := &x.Status - yyv266.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys261) - } // end switch yys261 - } // end for yyj261 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScheduledJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj267 int - var yyb267 bool - var yyhl267 bool = l >= 0 - yyj267++ - if yyhl267 { - yyb267 = yyj267 > l - } else { - yyb267 = r.CheckBreak() - } - if yyb267 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj267++ - if yyhl267 { - yyb267 = yyj267 > l - } else { - yyb267 = r.CheckBreak() - } - if yyb267 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj267++ - if yyhl267 { - yyb267 = yyj267 > l - } else { - yyb267 = r.CheckBreak() - } - if yyb267 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv270 := &x.ObjectMeta - yyv270.CodecDecodeSelf(d) - } - yyj267++ - if yyhl267 { - yyb267 = yyj267 > l - } else { - yyb267 = r.CheckBreak() - } - if yyb267 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = ScheduledJobSpec{} - } else { - yyv271 := &x.Spec - yyv271.CodecDecodeSelf(d) - } - yyj267++ - if yyhl267 { - yyb267 = yyj267 > l - } else { - yyb267 = r.CheckBreak() - } - if yyb267 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = ScheduledJobStatus{} - } else { - yyv272 := &x.Status - yyv272.CodecDecodeSelf(d) - } - for { - yyj267++ - if yyhl267 { - yyb267 = yyj267 > l - } else { - yyb267 = r.CheckBreak() - } - if yyb267 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj267-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ScheduledJobList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym273 := z.EncBinary() - _ = yym273 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep274 := !z.EncBinary() - yy2arr274 := z.EncBasicHandle().StructToArray - var yyq274 [4]bool - _, _, _ = yysep274, yyq274, yy2arr274 - const yyr274 bool = false - yyq274[0] = x.Kind != "" - yyq274[1] = x.APIVersion != "" - yyq274[2] = true - var yynn274 int - if yyr274 || yy2arr274 { - r.EncodeArrayStart(4) - } else { - yynn274 = 1 - for _, b := range yyq274 { - if b { - yynn274++ - } - } - r.EncodeMapStart(yynn274) - yynn274 = 0 - } - if yyr274 || yy2arr274 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq274[0] { - yym276 := z.EncBinary() - _ = yym276 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq274[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym277 := z.EncBinary() - _ = yym277 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr274 || yy2arr274 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq274[1] { - yym279 := z.EncBinary() - _ = yym279 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq274[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym280 := z.EncBinary() - _ = yym280 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr274 || yy2arr274 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq274[2] { - yy282 := &x.ListMeta - yym283 := z.EncBinary() - _ = yym283 - if false { - } else if z.HasExtensions() && z.EncExt(yy282) { - } else { - z.EncFallback(yy282) - } - } else { - r.EncodeNil() - } - } else { - if yyq274[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy284 := &x.ListMeta - yym285 := z.EncBinary() - _ = yym285 - if false { - } else if z.HasExtensions() && z.EncExt(yy284) { - } else { - z.EncFallback(yy284) - } - } - } - if yyr274 || yy2arr274 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym287 := z.EncBinary() - _ = yym287 - if false { - } else { - h.encSliceScheduledJob(([]ScheduledJob)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym288 := z.EncBinary() - _ = yym288 - if false { - } else { - h.encSliceScheduledJob(([]ScheduledJob)(x.Items), e) - } - } - } - if yyr274 || yy2arr274 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScheduledJobList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym289 := z.DecBinary() - _ = yym289 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct290 := r.ContainerType() - if yyct290 == codecSelferValueTypeMap1234 { - yyl290 := r.ReadMapStart() - if yyl290 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl290, d) - } - } else if yyct290 == codecSelferValueTypeArray1234 { - yyl290 := r.ReadArrayStart() - if yyl290 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl290, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScheduledJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys291Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys291Slc - var yyhl291 bool = l >= 0 - for yyj291 := 0; ; yyj291++ { - if yyhl291 { - if yyj291 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys291Slc = r.DecodeBytes(yys291Slc, true, true) - yys291 := string(yys291Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys291 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv294 := &x.ListMeta - yym295 := z.DecBinary() - _ = yym295 - if false { - } else if z.HasExtensions() && z.DecExt(yyv294) { - } else { - z.DecFallback(yyv294, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv296 := &x.Items - yym297 := z.DecBinary() - _ = yym297 - if false { - } else { - h.decSliceScheduledJob((*[]ScheduledJob)(yyv296), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys291) - } // end switch yys291 - } // end for yyj291 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScheduledJobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj298 int - var yyb298 bool - var yyhl298 bool = l >= 0 - yyj298++ - if yyhl298 { - yyb298 = yyj298 > l - } else { - yyb298 = r.CheckBreak() - } - if yyb298 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj298++ - if yyhl298 { - yyb298 = yyj298 > l - } else { - yyb298 = r.CheckBreak() - } - if yyb298 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj298++ - if yyhl298 { - yyb298 = yyj298 > l - } else { - yyb298 = r.CheckBreak() - } - if yyb298 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv301 := &x.ListMeta - yym302 := z.DecBinary() - _ = yym302 - if false { - } else if z.HasExtensions() && z.DecExt(yyv301) { - } else { - z.DecFallback(yyv301, false) - } - } - yyj298++ - if yyhl298 { - yyb298 = yyj298 > l - } else { - yyb298 = r.CheckBreak() - } - if yyb298 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv303 := &x.Items - yym304 := z.DecBinary() - _ = yym304 - if false { - } else { - h.decSliceScheduledJob((*[]ScheduledJob)(yyv303), d) - } - } - for { - yyj298++ - if yyhl298 { - yyb298 = yyj298 > l - } else { - yyb298 = r.CheckBreak() - } - if yyb298 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj298-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ScheduledJobSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym305 := z.EncBinary() - _ = yym305 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep306 := !z.EncBinary() - yy2arr306 := z.EncBasicHandle().StructToArray - var yyq306 [5]bool - _, _, _ = yysep306, yyq306, yy2arr306 - const yyr306 bool = false - yyq306[1] = x.StartingDeadlineSeconds != nil - yyq306[2] = x.ConcurrencyPolicy != "" - yyq306[3] = x.Suspend != nil - var yynn306 int - if yyr306 || yy2arr306 { - r.EncodeArrayStart(5) - } else { - yynn306 = 2 - for _, b := range yyq306 { - if b { - yynn306++ - } - } - r.EncodeMapStart(yynn306) - yynn306 = 0 - } - if yyr306 || yy2arr306 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym308 := z.EncBinary() - _ = yym308 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Schedule)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("schedule")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym309 := z.EncBinary() - _ = yym309 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Schedule)) - } - } - if yyr306 || yy2arr306 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq306[1] { - if x.StartingDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy311 := *x.StartingDeadlineSeconds - yym312 := z.EncBinary() - _ = yym312 - if false { - } else { - r.EncodeInt(int64(yy311)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq306[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("startingDeadlineSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.StartingDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy313 := *x.StartingDeadlineSeconds - yym314 := z.EncBinary() - _ = yym314 - if false { - } else { - r.EncodeInt(int64(yy313)) - } - } - } - } - if yyr306 || yy2arr306 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq306[2] { - x.ConcurrencyPolicy.CodecEncodeSelf(e) - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq306[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("concurrencyPolicy")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.ConcurrencyPolicy.CodecEncodeSelf(e) - } - } - if yyr306 || yy2arr306 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq306[3] { - if x.Suspend == nil { - r.EncodeNil() - } else { - yy317 := *x.Suspend - yym318 := z.EncBinary() - _ = yym318 - if false { - } else { - r.EncodeBool(bool(yy317)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq306[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("suspend")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Suspend == nil { - r.EncodeNil() - } else { - yy319 := *x.Suspend - yym320 := z.EncBinary() - _ = yym320 - if false { - } else { - r.EncodeBool(bool(yy319)) - } - } - } - } - if yyr306 || yy2arr306 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy322 := &x.JobTemplate - yy322.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("jobTemplate")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy323 := &x.JobTemplate - yy323.CodecEncodeSelf(e) - } - if yyr306 || yy2arr306 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScheduledJobSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym324 := z.DecBinary() - _ = yym324 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct325 := r.ContainerType() - if yyct325 == codecSelferValueTypeMap1234 { - yyl325 := r.ReadMapStart() - if yyl325 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl325, d) - } - } else if yyct325 == codecSelferValueTypeArray1234 { - yyl325 := r.ReadArrayStart() - if yyl325 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl325, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScheduledJobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys326Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys326Slc - var yyhl326 bool = l >= 0 - for yyj326 := 0; ; yyj326++ { - if yyhl326 { - if yyj326 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys326Slc = r.DecodeBytes(yys326Slc, true, true) - yys326 := string(yys326Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys326 { - case "schedule": - if r.TryDecodeAsNil() { - x.Schedule = "" - } else { - x.Schedule = string(r.DecodeString()) - } - case "startingDeadlineSeconds": - if r.TryDecodeAsNil() { - if x.StartingDeadlineSeconds != nil { - x.StartingDeadlineSeconds = nil - } - } else { - if x.StartingDeadlineSeconds == nil { - x.StartingDeadlineSeconds = new(int64) - } - yym329 := z.DecBinary() - _ = yym329 - if false { - } else { - *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64)) - } - } - case "concurrencyPolicy": - if r.TryDecodeAsNil() { - x.ConcurrencyPolicy = "" - } else { - x.ConcurrencyPolicy = ConcurrencyPolicy(r.DecodeString()) - } - case "suspend": - if r.TryDecodeAsNil() { - if x.Suspend != nil { - x.Suspend = nil - } - } else { - if x.Suspend == nil { - x.Suspend = new(bool) - } - yym332 := z.DecBinary() - _ = yym332 - if false { - } else { - *((*bool)(x.Suspend)) = r.DecodeBool() - } - } - case "jobTemplate": - if r.TryDecodeAsNil() { - x.JobTemplate = JobTemplateSpec{} - } else { - yyv333 := &x.JobTemplate - yyv333.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys326) - } // end switch yys326 - } // end for yyj326 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScheduledJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj334 int - var yyb334 bool - var yyhl334 bool = l >= 0 - yyj334++ - if yyhl334 { - yyb334 = yyj334 > l - } else { - yyb334 = r.CheckBreak() - } - if yyb334 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Schedule = "" - } else { - x.Schedule = string(r.DecodeString()) - } - yyj334++ - if yyhl334 { - yyb334 = yyj334 > l - } else { - yyb334 = r.CheckBreak() - } - if yyb334 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.StartingDeadlineSeconds != nil { - x.StartingDeadlineSeconds = nil - } - } else { - if x.StartingDeadlineSeconds == nil { - x.StartingDeadlineSeconds = new(int64) - } - yym337 := z.DecBinary() - _ = yym337 - if false { - } else { - *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64)) - } - } - yyj334++ - if yyhl334 { - yyb334 = yyj334 > l - } else { - yyb334 = r.CheckBreak() - } - if yyb334 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ConcurrencyPolicy = "" - } else { - x.ConcurrencyPolicy = ConcurrencyPolicy(r.DecodeString()) - } - yyj334++ - if yyhl334 { - yyb334 = yyj334 > l - } else { - yyb334 = r.CheckBreak() - } - if yyb334 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Suspend != nil { - x.Suspend = nil - } - } else { - if x.Suspend == nil { - x.Suspend = new(bool) - } - yym340 := z.DecBinary() - _ = yym340 - if false { - } else { - *((*bool)(x.Suspend)) = r.DecodeBool() - } - } - yyj334++ - if yyhl334 { - yyb334 = yyj334 > l - } else { - yyb334 = r.CheckBreak() - } - if yyb334 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.JobTemplate = JobTemplateSpec{} - } else { - yyv341 := &x.JobTemplate - yyv341.CodecDecodeSelf(d) - } - for { - yyj334++ - if yyhl334 { - yyb334 = yyj334 > l - } else { - yyb334 = r.CheckBreak() - } - if yyb334 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj334-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x ConcurrencyPolicy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym342 := z.EncBinary() - _ = yym342 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *ConcurrencyPolicy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym343 := z.DecBinary() - _ = yym343 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *ScheduledJobStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym344 := z.EncBinary() - _ = yym344 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep345 := !z.EncBinary() - yy2arr345 := z.EncBasicHandle().StructToArray - var yyq345 [2]bool - _, _, _ = yysep345, yyq345, yy2arr345 - const yyr345 bool = false - yyq345[0] = len(x.Active) != 0 - yyq345[1] = x.LastScheduleTime != nil - var yynn345 int - if yyr345 || yy2arr345 { - r.EncodeArrayStart(2) - } else { - yynn345 = 0 - for _, b := range yyq345 { - if b { - yynn345++ - } - } - r.EncodeMapStart(yynn345) - yynn345 = 0 - } - if yyr345 || yy2arr345 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq345[0] { - if x.Active == nil { - r.EncodeNil() - } else { - yym347 := z.EncBinary() - _ = yym347 - if false { - } else { - h.encSlicev1_ObjectReference(([]pkg2_v1.ObjectReference)(x.Active), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq345[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("active")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Active == nil { - r.EncodeNil() - } else { - yym348 := z.EncBinary() - _ = yym348 - if false { - } else { - h.encSlicev1_ObjectReference(([]pkg2_v1.ObjectReference)(x.Active), e) - } - } - } - } - if yyr345 || yy2arr345 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq345[1] { - if x.LastScheduleTime == nil { - r.EncodeNil() - } else { - yym350 := z.EncBinary() - _ = yym350 - if false { - } else if z.HasExtensions() && z.EncExt(x.LastScheduleTime) { - } else if yym350 { - z.EncBinaryMarshal(x.LastScheduleTime) - } else if !yym350 && z.IsJSONHandle() { - z.EncJSONMarshal(x.LastScheduleTime) - } else { - z.EncFallback(x.LastScheduleTime) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq345[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastScheduleTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.LastScheduleTime == nil { - r.EncodeNil() - } else { - yym351 := z.EncBinary() - _ = yym351 - if false { - } else if z.HasExtensions() && z.EncExt(x.LastScheduleTime) { - } else if yym351 { - z.EncBinaryMarshal(x.LastScheduleTime) - } else if !yym351 && z.IsJSONHandle() { - z.EncJSONMarshal(x.LastScheduleTime) - } else { - z.EncFallback(x.LastScheduleTime) - } - } - } - } - if yyr345 || yy2arr345 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScheduledJobStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym352 := z.DecBinary() - _ = yym352 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct353 := r.ContainerType() - if yyct353 == codecSelferValueTypeMap1234 { - yyl353 := r.ReadMapStart() - if yyl353 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl353, d) - } - } else if yyct353 == codecSelferValueTypeArray1234 { - yyl353 := r.ReadArrayStart() - if yyl353 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl353, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScheduledJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys354Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys354Slc - var yyhl354 bool = l >= 0 - for yyj354 := 0; ; yyj354++ { - if yyhl354 { - if yyj354 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys354Slc = r.DecodeBytes(yys354Slc, true, true) - yys354 := string(yys354Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys354 { - case "active": - if r.TryDecodeAsNil() { - x.Active = nil - } else { - yyv355 := &x.Active - yym356 := z.DecBinary() - _ = yym356 - if false { - } else { - h.decSlicev1_ObjectReference((*[]pkg2_v1.ObjectReference)(yyv355), d) - } - } - case "lastScheduleTime": - if r.TryDecodeAsNil() { - if x.LastScheduleTime != nil { - x.LastScheduleTime = nil - } - } else { - if x.LastScheduleTime == nil { - x.LastScheduleTime = new(pkg1_unversioned.Time) - } - yym358 := z.DecBinary() - _ = yym358 - if false { - } else if z.HasExtensions() && z.DecExt(x.LastScheduleTime) { - } else if yym358 { - z.DecBinaryUnmarshal(x.LastScheduleTime) - } else if !yym358 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.LastScheduleTime) - } else { - z.DecFallback(x.LastScheduleTime, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys354) - } // end switch yys354 - } // end for yyj354 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScheduledJobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj359 int - var yyb359 bool - var yyhl359 bool = l >= 0 - yyj359++ - if yyhl359 { - yyb359 = yyj359 > l - } else { - yyb359 = r.CheckBreak() - } - if yyb359 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Active = nil - } else { - yyv360 := &x.Active - yym361 := z.DecBinary() - _ = yym361 - if false { - } else { - h.decSlicev1_ObjectReference((*[]pkg2_v1.ObjectReference)(yyv360), d) - } - } - yyj359++ - if yyhl359 { - yyb359 = yyj359 > l - } else { - yyb359 = r.CheckBreak() - } - if yyb359 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.LastScheduleTime != nil { - x.LastScheduleTime = nil - } - } else { - if x.LastScheduleTime == nil { - x.LastScheduleTime = new(pkg1_unversioned.Time) - } - yym363 := z.DecBinary() - _ = yym363 - if false { - } else if z.HasExtensions() && z.DecExt(x.LastScheduleTime) { - } else if yym363 { - z.DecBinaryUnmarshal(x.LastScheduleTime) - } else if !yym363 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.LastScheduleTime) - } else { - z.DecFallback(x.LastScheduleTime, false) - } - } - for { - yyj359++ - if yyhl359 { - yyb359 = yyj359 > l - } else { - yyb359 = r.CheckBreak() - } - if yyb359 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj359-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *LabelSelector) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym364 := z.EncBinary() - _ = yym364 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep365 := !z.EncBinary() - yy2arr365 := z.EncBasicHandle().StructToArray - var yyq365 [2]bool - _, _, _ = yysep365, yyq365, yy2arr365 - const yyr365 bool = false - yyq365[0] = len(x.MatchLabels) != 0 - yyq365[1] = len(x.MatchExpressions) != 0 - var yynn365 int - if yyr365 || yy2arr365 { - r.EncodeArrayStart(2) - } else { - yynn365 = 0 - for _, b := range yyq365 { - if b { - yynn365++ - } - } - r.EncodeMapStart(yynn365) - yynn365 = 0 - } - if yyr365 || yy2arr365 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq365[0] { - if x.MatchLabels == nil { - r.EncodeNil() - } else { - yym367 := z.EncBinary() - _ = yym367 - if false { - } else { - z.F.EncMapStringStringV(x.MatchLabels, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq365[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("matchLabels")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.MatchLabels == nil { - r.EncodeNil() - } else { - yym368 := z.EncBinary() - _ = yym368 - if false { - } else { - z.F.EncMapStringStringV(x.MatchLabels, false, e) - } - } - } - } - if yyr365 || yy2arr365 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq365[1] { - if x.MatchExpressions == nil { - r.EncodeNil() - } else { - yym370 := z.EncBinary() - _ = yym370 - if false { - } else { - h.encSliceLabelSelectorRequirement(([]LabelSelectorRequirement)(x.MatchExpressions), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq365[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("matchExpressions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.MatchExpressions == nil { - r.EncodeNil() - } else { - yym371 := z.EncBinary() - _ = yym371 - if false { - } else { - h.encSliceLabelSelectorRequirement(([]LabelSelectorRequirement)(x.MatchExpressions), e) - } - } - } - } - if yyr365 || yy2arr365 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *LabelSelector) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym372 := z.DecBinary() - _ = yym372 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct373 := r.ContainerType() - if yyct373 == codecSelferValueTypeMap1234 { - yyl373 := r.ReadMapStart() - if yyl373 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl373, d) - } - } else if yyct373 == codecSelferValueTypeArray1234 { - yyl373 := r.ReadArrayStart() - if yyl373 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl373, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *LabelSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys374Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys374Slc - var yyhl374 bool = l >= 0 - for yyj374 := 0; ; yyj374++ { - if yyhl374 { - if yyj374 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys374Slc = r.DecodeBytes(yys374Slc, true, true) - yys374 := string(yys374Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys374 { - case "matchLabels": - if r.TryDecodeAsNil() { - x.MatchLabels = nil - } else { - yyv375 := &x.MatchLabels - yym376 := z.DecBinary() - _ = yym376 - if false { - } else { - z.F.DecMapStringStringX(yyv375, false, d) - } - } - case "matchExpressions": - if r.TryDecodeAsNil() { - x.MatchExpressions = nil - } else { - yyv377 := &x.MatchExpressions - yym378 := z.DecBinary() - _ = yym378 - if false { - } else { - h.decSliceLabelSelectorRequirement((*[]LabelSelectorRequirement)(yyv377), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys374) - } // end switch yys374 - } // end for yyj374 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *LabelSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj379 int - var yyb379 bool - var yyhl379 bool = l >= 0 - yyj379++ - if yyhl379 { - yyb379 = yyj379 > l - } else { - yyb379 = r.CheckBreak() - } - if yyb379 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MatchLabels = nil - } else { - yyv380 := &x.MatchLabels - yym381 := z.DecBinary() - _ = yym381 - if false { - } else { - z.F.DecMapStringStringX(yyv380, false, d) - } - } - yyj379++ - if yyhl379 { - yyb379 = yyj379 > l - } else { - yyb379 = r.CheckBreak() - } - if yyb379 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MatchExpressions = nil - } else { - yyv382 := &x.MatchExpressions - yym383 := z.DecBinary() - _ = yym383 - if false { - } else { - h.decSliceLabelSelectorRequirement((*[]LabelSelectorRequirement)(yyv382), d) - } - } - for { - yyj379++ - if yyhl379 { - yyb379 = yyj379 > l - } else { - yyb379 = r.CheckBreak() - } - if yyb379 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj379-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *LabelSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym384 := z.EncBinary() - _ = yym384 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep385 := !z.EncBinary() - yy2arr385 := z.EncBasicHandle().StructToArray - var yyq385 [3]bool - _, _, _ = yysep385, yyq385, yy2arr385 - const yyr385 bool = false - yyq385[2] = len(x.Values) != 0 - var yynn385 int - if yyr385 || yy2arr385 { - r.EncodeArrayStart(3) - } else { - yynn385 = 2 - for _, b := range yyq385 { - if b { - yynn385++ - } - } - r.EncodeMapStart(yynn385) - yynn385 = 0 - } - if yyr385 || yy2arr385 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym387 := z.EncBinary() - _ = yym387 - 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) - yym388 := z.EncBinary() - _ = yym388 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Key)) - } - } - if yyr385 || yy2arr385 { - 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 yyr385 || yy2arr385 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq385[2] { - if x.Values == nil { - r.EncodeNil() - } else { - yym391 := z.EncBinary() - _ = yym391 - if false { - } else { - z.F.EncSliceStringV(x.Values, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq385[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("values")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Values == nil { - r.EncodeNil() - } else { - yym392 := z.EncBinary() - _ = yym392 - if false { - } else { - z.F.EncSliceStringV(x.Values, false, e) - } - } - } - } - if yyr385 || yy2arr385 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *LabelSelectorRequirement) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym393 := z.DecBinary() - _ = yym393 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct394 := r.ContainerType() - if yyct394 == codecSelferValueTypeMap1234 { - yyl394 := r.ReadMapStart() - if yyl394 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl394, d) - } - } else if yyct394 == codecSelferValueTypeArray1234 { - yyl394 := r.ReadArrayStart() - if yyl394 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl394, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *LabelSelectorRequirement) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys395Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys395Slc - var yyhl395 bool = l >= 0 - for yyj395 := 0; ; yyj395++ { - if yyhl395 { - if yyj395 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys395Slc = r.DecodeBytes(yys395Slc, true, true) - yys395 := string(yys395Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys395 { - case "key": - if r.TryDecodeAsNil() { - x.Key = "" - } else { - x.Key = string(r.DecodeString()) - } - case "operator": - if r.TryDecodeAsNil() { - x.Operator = "" - } else { - x.Operator = LabelSelectorOperator(r.DecodeString()) - } - case "values": - if r.TryDecodeAsNil() { - x.Values = nil - } else { - yyv398 := &x.Values - yym399 := z.DecBinary() - _ = yym399 - if false { - } else { - z.F.DecSliceStringX(yyv398, false, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys395) - } // end switch yys395 - } // end for yyj395 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *LabelSelectorRequirement) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj400 int - var yyb400 bool - var yyhl400 bool = l >= 0 - yyj400++ - if yyhl400 { - yyb400 = yyj400 > l - } else { - yyb400 = r.CheckBreak() - } - if yyb400 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Key = "" - } else { - x.Key = string(r.DecodeString()) - } - yyj400++ - if yyhl400 { - yyb400 = yyj400 > l - } else { - yyb400 = r.CheckBreak() - } - if yyb400 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Operator = "" - } else { - x.Operator = LabelSelectorOperator(r.DecodeString()) - } - yyj400++ - if yyhl400 { - yyb400 = yyj400 > l - } else { - yyb400 = r.CheckBreak() - } - if yyb400 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Values = nil - } else { - yyv403 := &x.Values - yym404 := z.DecBinary() - _ = yym404 - if false { - } else { - z.F.DecSliceStringX(yyv403, false, d) - } - } - for { - yyj400++ - if yyhl400 { - yyb400 = yyj400 > l - } else { - yyb400 = r.CheckBreak() - } - if yyb400 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj400-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x LabelSelectorOperator) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym405 := z.EncBinary() - _ = yym405 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *LabelSelectorOperator) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym406 := z.DecBinary() - _ = yym406 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x codecSelfer1234) encSliceJob(v []Job, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv407 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy408 := &yyv407 - yy408.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv409 := *v - yyh409, yyl409 := z.DecSliceHelperStart() - var yyc409 bool - if yyl409 == 0 { - if yyv409 == nil { - yyv409 = []Job{} - yyc409 = true - } else if len(yyv409) != 0 { - yyv409 = yyv409[:0] - yyc409 = true - } - } else if yyl409 > 0 { - var yyrr409, yyrl409 int - var yyrt409 bool - if yyl409 > cap(yyv409) { - - yyrg409 := len(yyv409) > 0 - yyv2409 := yyv409 - yyrl409, yyrt409 = z.DecInferLen(yyl409, z.DecBasicHandle().MaxInitLen, 824) - if yyrt409 { - if yyrl409 <= cap(yyv409) { - yyv409 = yyv409[:yyrl409] - } else { - yyv409 = make([]Job, yyrl409) - } - } else { - yyv409 = make([]Job, yyrl409) - } - yyc409 = true - yyrr409 = len(yyv409) - if yyrg409 { - copy(yyv409, yyv2409) - } - } else if yyl409 != len(yyv409) { - yyv409 = yyv409[:yyl409] - yyc409 = true - } - yyj409 := 0 - for ; yyj409 < yyrr409; yyj409++ { - yyh409.ElemContainerState(yyj409) - if r.TryDecodeAsNil() { - yyv409[yyj409] = Job{} - } else { - yyv410 := &yyv409[yyj409] - yyv410.CodecDecodeSelf(d) - } - - } - if yyrt409 { - for ; yyj409 < yyl409; yyj409++ { - yyv409 = append(yyv409, Job{}) - yyh409.ElemContainerState(yyj409) - if r.TryDecodeAsNil() { - yyv409[yyj409] = Job{} - } else { - yyv411 := &yyv409[yyj409] - yyv411.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj409 := 0 - for ; !r.CheckBreak(); yyj409++ { - - if yyj409 >= len(yyv409) { - yyv409 = append(yyv409, Job{}) // var yyz409 Job - yyc409 = true - } - yyh409.ElemContainerState(yyj409) - if yyj409 < len(yyv409) { - if r.TryDecodeAsNil() { - yyv409[yyj409] = Job{} - } else { - yyv412 := &yyv409[yyj409] - yyv412.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj409 < len(yyv409) { - yyv409 = yyv409[:yyj409] - yyc409 = true - } else if yyj409 == 0 && yyv409 == nil { - yyv409 = []Job{} - yyc409 = true - } - } - yyh409.End() - if yyc409 { - *v = yyv409 - } -} - -func (x codecSelfer1234) encSliceJobCondition(v []JobCondition, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv413 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy414 := &yyv413 - yy414.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv415 := *v - yyh415, yyl415 := z.DecSliceHelperStart() - var yyc415 bool - if yyl415 == 0 { - if yyv415 == nil { - yyv415 = []JobCondition{} - yyc415 = true - } else if len(yyv415) != 0 { - yyv415 = yyv415[:0] - yyc415 = true - } - } else if yyl415 > 0 { - var yyrr415, yyrl415 int - var yyrt415 bool - if yyl415 > cap(yyv415) { - - yyrg415 := len(yyv415) > 0 - yyv2415 := yyv415 - yyrl415, yyrt415 = z.DecInferLen(yyl415, z.DecBasicHandle().MaxInitLen, 112) - if yyrt415 { - if yyrl415 <= cap(yyv415) { - yyv415 = yyv415[:yyrl415] - } else { - yyv415 = make([]JobCondition, yyrl415) - } - } else { - yyv415 = make([]JobCondition, yyrl415) - } - yyc415 = true - yyrr415 = len(yyv415) - if yyrg415 { - copy(yyv415, yyv2415) - } - } else if yyl415 != len(yyv415) { - yyv415 = yyv415[:yyl415] - yyc415 = true - } - yyj415 := 0 - for ; yyj415 < yyrr415; yyj415++ { - yyh415.ElemContainerState(yyj415) - if r.TryDecodeAsNil() { - yyv415[yyj415] = JobCondition{} - } else { - yyv416 := &yyv415[yyj415] - yyv416.CodecDecodeSelf(d) - } - - } - if yyrt415 { - for ; yyj415 < yyl415; yyj415++ { - yyv415 = append(yyv415, JobCondition{}) - yyh415.ElemContainerState(yyj415) - if r.TryDecodeAsNil() { - yyv415[yyj415] = JobCondition{} - } else { - yyv417 := &yyv415[yyj415] - yyv417.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj415 := 0 - for ; !r.CheckBreak(); yyj415++ { - - if yyj415 >= len(yyv415) { - yyv415 = append(yyv415, JobCondition{}) // var yyz415 JobCondition - yyc415 = true - } - yyh415.ElemContainerState(yyj415) - if yyj415 < len(yyv415) { - if r.TryDecodeAsNil() { - yyv415[yyj415] = JobCondition{} - } else { - yyv418 := &yyv415[yyj415] - yyv418.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj415 < len(yyv415) { - yyv415 = yyv415[:yyj415] - yyc415 = true - } else if yyj415 == 0 && yyv415 == nil { - yyv415 = []JobCondition{} - yyc415 = true - } - } - yyh415.End() - if yyc415 { - *v = yyv415 - } -} - -func (x codecSelfer1234) encSliceScheduledJob(v []ScheduledJob, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv419 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy420 := &yyv419 - yy420.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceScheduledJob(v *[]ScheduledJob, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv421 := *v - yyh421, yyl421 := z.DecSliceHelperStart() - var yyc421 bool - if yyl421 == 0 { - if yyv421 == nil { - yyv421 = []ScheduledJob{} - yyc421 = true - } else if len(yyv421) != 0 { - yyv421 = yyv421[:0] - yyc421 = true - } - } else if yyl421 > 0 { - var yyrr421, yyrl421 int - var yyrt421 bool - if yyl421 > cap(yyv421) { - - yyrg421 := len(yyv421) > 0 - yyv2421 := yyv421 - yyrl421, yyrt421 = z.DecInferLen(yyl421, z.DecBasicHandle().MaxInitLen, 1072) - if yyrt421 { - if yyrl421 <= cap(yyv421) { - yyv421 = yyv421[:yyrl421] - } else { - yyv421 = make([]ScheduledJob, yyrl421) - } - } else { - yyv421 = make([]ScheduledJob, yyrl421) - } - yyc421 = true - yyrr421 = len(yyv421) - if yyrg421 { - copy(yyv421, yyv2421) - } - } else if yyl421 != len(yyv421) { - yyv421 = yyv421[:yyl421] - yyc421 = true - } - yyj421 := 0 - for ; yyj421 < yyrr421; yyj421++ { - yyh421.ElemContainerState(yyj421) - if r.TryDecodeAsNil() { - yyv421[yyj421] = ScheduledJob{} - } else { - yyv422 := &yyv421[yyj421] - yyv422.CodecDecodeSelf(d) - } - - } - if yyrt421 { - for ; yyj421 < yyl421; yyj421++ { - yyv421 = append(yyv421, ScheduledJob{}) - yyh421.ElemContainerState(yyj421) - if r.TryDecodeAsNil() { - yyv421[yyj421] = ScheduledJob{} - } else { - yyv423 := &yyv421[yyj421] - yyv423.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj421 := 0 - for ; !r.CheckBreak(); yyj421++ { - - if yyj421 >= len(yyv421) { - yyv421 = append(yyv421, ScheduledJob{}) // var yyz421 ScheduledJob - yyc421 = true - } - yyh421.ElemContainerState(yyj421) - if yyj421 < len(yyv421) { - if r.TryDecodeAsNil() { - yyv421[yyj421] = ScheduledJob{} - } else { - yyv424 := &yyv421[yyj421] - yyv424.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj421 < len(yyv421) { - yyv421 = yyv421[:yyj421] - yyc421 = true - } else if yyj421 == 0 && yyv421 == nil { - yyv421 = []ScheduledJob{} - yyc421 = true - } - } - yyh421.End() - if yyc421 { - *v = yyv421 - } -} - -func (x codecSelfer1234) encSlicev1_ObjectReference(v []pkg2_v1.ObjectReference, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv425 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy426 := &yyv425 - yy426.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv427 := *v - yyh427, yyl427 := z.DecSliceHelperStart() - var yyc427 bool - if yyl427 == 0 { - if yyv427 == nil { - yyv427 = []pkg2_v1.ObjectReference{} - yyc427 = true - } else if len(yyv427) != 0 { - yyv427 = yyv427[:0] - yyc427 = true - } - } else if yyl427 > 0 { - var yyrr427, yyrl427 int - var yyrt427 bool - if yyl427 > cap(yyv427) { - - yyrg427 := len(yyv427) > 0 - yyv2427 := yyv427 - yyrl427, yyrt427 = z.DecInferLen(yyl427, z.DecBasicHandle().MaxInitLen, 112) - if yyrt427 { - if yyrl427 <= cap(yyv427) { - yyv427 = yyv427[:yyrl427] - } else { - yyv427 = make([]pkg2_v1.ObjectReference, yyrl427) - } - } else { - yyv427 = make([]pkg2_v1.ObjectReference, yyrl427) - } - yyc427 = true - yyrr427 = len(yyv427) - if yyrg427 { - copy(yyv427, yyv2427) - } - } else if yyl427 != len(yyv427) { - yyv427 = yyv427[:yyl427] - yyc427 = true - } - yyj427 := 0 - for ; yyj427 < yyrr427; yyj427++ { - yyh427.ElemContainerState(yyj427) - if r.TryDecodeAsNil() { - yyv427[yyj427] = pkg2_v1.ObjectReference{} - } else { - yyv428 := &yyv427[yyj427] - yyv428.CodecDecodeSelf(d) - } - - } - if yyrt427 { - for ; yyj427 < yyl427; yyj427++ { - yyv427 = append(yyv427, pkg2_v1.ObjectReference{}) - yyh427.ElemContainerState(yyj427) - if r.TryDecodeAsNil() { - yyv427[yyj427] = pkg2_v1.ObjectReference{} - } else { - yyv429 := &yyv427[yyj427] - yyv429.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj427 := 0 - for ; !r.CheckBreak(); yyj427++ { - - if yyj427 >= len(yyv427) { - yyv427 = append(yyv427, pkg2_v1.ObjectReference{}) // var yyz427 pkg2_v1.ObjectReference - yyc427 = true - } - yyh427.ElemContainerState(yyj427) - if yyj427 < len(yyv427) { - if r.TryDecodeAsNil() { - yyv427[yyj427] = pkg2_v1.ObjectReference{} - } else { - yyv430 := &yyv427[yyj427] - yyv430.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj427 < len(yyv427) { - yyv427 = yyv427[:yyj427] - yyc427 = true - } else if yyj427 == 0 && yyv427 == nil { - yyv427 = []pkg2_v1.ObjectReference{} - yyc427 = true - } - } - yyh427.End() - if yyc427 { - *v = yyv427 - } -} - -func (x codecSelfer1234) encSliceLabelSelectorRequirement(v []LabelSelectorRequirement, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv431 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy432 := &yyv431 - yy432.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceLabelSelectorRequirement(v *[]LabelSelectorRequirement, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv433 := *v - yyh433, yyl433 := z.DecSliceHelperStart() - var yyc433 bool - if yyl433 == 0 { - if yyv433 == nil { - yyv433 = []LabelSelectorRequirement{} - yyc433 = true - } else if len(yyv433) != 0 { - yyv433 = yyv433[:0] - yyc433 = true - } - } else if yyl433 > 0 { - var yyrr433, yyrl433 int - var yyrt433 bool - if yyl433 > cap(yyv433) { - - yyrg433 := len(yyv433) > 0 - yyv2433 := yyv433 - yyrl433, yyrt433 = z.DecInferLen(yyl433, z.DecBasicHandle().MaxInitLen, 56) - if yyrt433 { - if yyrl433 <= cap(yyv433) { - yyv433 = yyv433[:yyrl433] - } else { - yyv433 = make([]LabelSelectorRequirement, yyrl433) - } - } else { - yyv433 = make([]LabelSelectorRequirement, yyrl433) - } - yyc433 = true - yyrr433 = len(yyv433) - if yyrg433 { - copy(yyv433, yyv2433) - } - } else if yyl433 != len(yyv433) { - yyv433 = yyv433[:yyl433] - yyc433 = true - } - yyj433 := 0 - for ; yyj433 < yyrr433; yyj433++ { - yyh433.ElemContainerState(yyj433) - if r.TryDecodeAsNil() { - yyv433[yyj433] = LabelSelectorRequirement{} - } else { - yyv434 := &yyv433[yyj433] - yyv434.CodecDecodeSelf(d) - } - - } - if yyrt433 { - for ; yyj433 < yyl433; yyj433++ { - yyv433 = append(yyv433, LabelSelectorRequirement{}) - yyh433.ElemContainerState(yyj433) - if r.TryDecodeAsNil() { - yyv433[yyj433] = LabelSelectorRequirement{} - } else { - yyv435 := &yyv433[yyj433] - yyv435.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj433 := 0 - for ; !r.CheckBreak(); yyj433++ { - - if yyj433 >= len(yyv433) { - yyv433 = append(yyv433, LabelSelectorRequirement{}) // var yyz433 LabelSelectorRequirement - yyc433 = true - } - yyh433.ElemContainerState(yyj433) - if yyj433 < len(yyv433) { - if r.TryDecodeAsNil() { - yyv433[yyj433] = LabelSelectorRequirement{} - } else { - yyv436 := &yyv433[yyj433] - yyv436.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj433 < len(yyv433) { - yyv433 = yyv433[:yyj433] - yyc433 = true - } else if yyj433 == 0 && yyv433 == nil { - yyv433 = []LabelSelectorRequirement{} - yyc433 = true - } - } - yyh433.End() - if yyc433 { - *v = yyv433 - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/types.go b/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/types.go deleted file mode 100644 index c8c6025c3..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/types.go +++ /dev/null @@ -1,283 +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 v2alpha1 - -import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" -) - -// Job represents the configuration of a single job. -type Job struct { - unversioned.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec is a structure defining the expected behavior of a job. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Status is a structure describing current status of a job. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// JobList is a collection of jobs. -type JobList struct { - unversioned.TypeMeta `json:",inline"` - // Standard list metadata - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is the list of Job. - Items []Job `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// JobTemplate describes a template for creating copies of a predefined pod. -type JobTemplate struct { - unversioned.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Template defines jobs that will be created from this template - // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Template JobTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"` -} - -// JobTemplateSpec describes the data a Job should have when created from a template -type JobTemplateSpec struct { - // Standard object's metadata of the jobs created from this template. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Specification of the desired behavior of the job. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` -} - -// JobSpec describes how the job execution will look like. -type JobSpec struct { - - // Parallelism specifies the maximum desired number of pods the job should - // run at any given time. The actual number of pods running in steady state will - // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), - // i.e. when the work left to do is less than max parallelism. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"` - - // Completions specifies the desired number of successfully finished pods the - // job should be run with. Setting to nil means that the success of any - // pod signals the success of all pods, and allows parallelism to have any positive - // value. Setting to 1 means that parallelism is limited to 1 and the success of that - // pod signals the success of the job. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - Completions *int32 `json:"completions,omitempty" protobuf:"varint,2,opt,name=completions"` - - // Optional duration in seconds relative to the startTime that the job may be active - // before the system tries to terminate it; value must be positive integer - ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"` - - // Selector is a label query over pods that should match the pod count. - // Normally, the system sets this field for you. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"` - - // ManualSelector controls generation of pod labels and pod selectors. - // Leave `manualSelector` unset unless you are certain what you are doing. - // When false or unset, the system pick labels unique to this job - // and appends those labels to the pod template. When true, - // the user is responsible for picking unique labels and specifying - // the selector. Failure to pick a unique label may cause this - // and other jobs to not function correctly. However, You may see - // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` - // API. - // More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md - ManualSelector *bool `json:"manualSelector,omitempty" protobuf:"varint,5,opt,name=manualSelector"` - - // Template is the object that describes the pod that will be created when - // executing a job. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,6,opt,name=template"` -} - -// JobStatus represents the current state of a Job. -type JobStatus struct { - - // Conditions represent the latest available observations of an object's current state. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` - - // StartTime represents time when the job was acknowledged by the Job Manager. - // It is not guaranteed to be set in happens-before order across separate operations. - // It is represented in RFC3339 form and is in UTC. - StartTime *unversioned.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"` - - // CompletionTime represents time when the job was completed. It is not guaranteed to - // be set in happens-before order across separate operations. - // It is represented in RFC3339 form and is in UTC. - CompletionTime *unversioned.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"` - - // Active is the number of actively running pods. - Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"` - - // Succeeded is the number of pods which reached Phase Succeeded. - Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"` - - // Failed is the number of pods which reached Phase Failed. - Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"` -} - -type JobConditionType string - -// These are valid conditions of a job. -const ( - // JobComplete means the job has completed its execution. - JobComplete JobConditionType = "Complete" - // JobFailed means the job has failed its execution. - JobFailed JobConditionType = "Failed" -) - -// JobCondition describes current state of a job. -type JobCondition struct { - // Type of job condition, Complete or Failed. - Type JobConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=JobConditionType"` - // Status of the condition, one of True, False, Unknown. - Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"` - // Last time the condition was checked. - LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` - // Last time the condition transit from one status to another. - LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` - // (brief) reason for the condition's last transition. - Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` - // Human readable message indicating details about last transition. - Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` -} - -// ScheduledJob represents the configuration of a single scheduled job. -type ScheduledJob struct { - unversioned.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec is a structure defining the expected behavior of a job, including the schedule. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Spec ScheduledJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Status is a structure describing current status of a job. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Status ScheduledJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// ScheduledJobList is a collection of scheduled jobs. -type ScheduledJobList struct { - unversioned.TypeMeta `json:",inline"` - // Standard list metadata - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is the list of ScheduledJob. - Items []ScheduledJob `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// ScheduledJobSpec describes how the job execution will look like and when it will actually run. -type ScheduledJobSpec struct { - - // Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. - Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"` - - // Optional deadline in seconds for starting the job if it misses scheduled - // time for any reason. Missed jobs executions will be counted as failed ones. - StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"` - - // ConcurrencyPolicy specifies how to treat concurrent executions of a Job. - ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy,casttype=ConcurrencyPolicy"` - - // Suspend flag tells the controller to suspend subsequent executions, it does - // not apply to already started executions. Defaults to false. - Suspend *bool `json:"suspend,omitempty" protobuf:"varint,4,opt,name=suspend"` - - // JobTemplate is the object that describes the job that will be created when - // executing a ScheduledJob. - JobTemplate JobTemplateSpec `json:"jobTemplate" protobuf:"bytes,5,opt,name=jobTemplate"` -} - -// ConcurrencyPolicy describes how the job will be handled. -// Only one of the following concurrent policies may be specified. -// If none of the following policies is specified, the default one -// is AllowConcurrent. -type ConcurrencyPolicy string - -const ( - // AllowConcurrent allows ScheduledJobs to run concurrently. - AllowConcurrent ConcurrencyPolicy = "Allow" - - // ForbidConcurrent forbids concurrent runs, skipping next run if previous - // hasn't finished yet. - ForbidConcurrent ConcurrencyPolicy = "Forbid" - - // ReplaceConcurrent cancels currently running job and replaces it with a new one. - ReplaceConcurrent ConcurrencyPolicy = "Replace" -) - -// ScheduledJobStatus represents the current state of a Job. -type ScheduledJobStatus struct { - // Active holds pointers to currently running jobs. - Active []v1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"` - - // LastScheduleTime keeps information of when was the last time the job was successfully scheduled. - LastScheduleTime *unversioned.Time `json:"lastScheduleTime,omitempty" protobuf:"bytes,4,opt,name=lastScheduleTime"` -} - -// A label selector is a label query over a set of resources. The result of matchLabels and -// matchExpressions are ANDed. An empty label selector matches all objects. A null -// label selector matches no objects. -type LabelSelector struct { - // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - // map is equivalent to an element of matchExpressions, whose key field is "key", the - // operator is "In", and the values array contains only "value". The requirements are ANDed. - MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"` - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"` -} - -// A label selector requirement is a selector that contains values, a key, and an operator that -// relates the key and values. -type LabelSelectorRequirement struct { - // key is the label key that the selector applies to. - Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"` - // operator represents a key's relationship to a set of values. - // Valid operators ard In, NotIn, Exists and DoesNotExist. - Operator LabelSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=LabelSelectorOperator"` - // values is an array of string values. If the operator is In or NotIn, - // the values array must be non-empty. If the operator is Exists or DoesNotExist, - // the values array must be empty. This array is replaced during a strategic - // merge patch. - Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` -} - -// A label selector operator is the set of operators that can be used in a selector requirement. -type LabelSelectorOperator string - -const ( - LabelSelectorOpIn LabelSelectorOperator = "In" - LabelSelectorOpNotIn LabelSelectorOperator = "NotIn" - LabelSelectorOpExists LabelSelectorOperator = "Exists" - LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist" -) diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go deleted file mode 100644 index 17d43318d..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go +++ /dev/null @@ -1,178 +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 v2alpha1 - -// This file contains a collection of methods that can be used from go-restful to -// generate Swagger API documentation for its models. Please read this PR for more -// information on the implementation: https://github.com/emicklei/go-restful/pull/215 -// -// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if -// they are on one line! For multiple line or blocks that you want to ignore use ---. -// Any context after a --- is ignored. -// -// Those methods can be generated by using hack/update-generated-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_Job = map[string]string{ - "": "Job represents the configuration of a single job.", - "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "spec": "Spec is a structure defining the expected behavior of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", - "status": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", -} - -func (Job) SwaggerDoc() map[string]string { - return map_Job -} - -var map_JobCondition = map[string]string{ - "": "JobCondition describes current state of a job.", - "type": "Type of job condition, Complete or Failed.", - "status": "Status of the condition, one of True, False, Unknown.", - "lastProbeTime": "Last time the condition was checked.", - "lastTransitionTime": "Last time the condition transit from one status to another.", - "reason": "(brief) reason for the condition's last transition.", - "message": "Human readable message indicating details about last transition.", -} - -func (JobCondition) SwaggerDoc() map[string]string { - return map_JobCondition -} - -var map_JobList = map[string]string{ - "": "JobList is a collection of jobs.", - "metadata": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "items": "Items is the list of Job.", -} - -func (JobList) SwaggerDoc() map[string]string { - return map_JobList -} - -var map_JobSpec = map[string]string{ - "": "JobSpec describes how the job execution will look like.", - "parallelism": "Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", - "completions": "Completions specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", - "activeDeadlineSeconds": "Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer", - "selector": "Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors", - "manualSelector": "ManualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md", - "template": "Template is the object that describes the pod that will be created when executing a job. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", -} - -func (JobSpec) SwaggerDoc() map[string]string { - return map_JobSpec -} - -var map_JobStatus = map[string]string{ - "": "JobStatus represents the current state of a Job.", - "conditions": "Conditions represent the latest available observations of an object's current state. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", - "startTime": "StartTime represents time when the job was acknowledged by the Job Manager. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - "completionTime": "CompletionTime represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - "active": "Active is the number of actively running pods.", - "succeeded": "Succeeded is the number of pods which reached Phase Succeeded.", - "failed": "Failed is the number of pods which reached Phase Failed.", -} - -func (JobStatus) SwaggerDoc() map[string]string { - return map_JobStatus -} - -var map_JobTemplate = map[string]string{ - "": "JobTemplate describes a template for creating copies of a predefined pod.", - "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "template": "Template defines jobs that will be created from this template http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", -} - -func (JobTemplate) SwaggerDoc() map[string]string { - return map_JobTemplate -} - -var map_JobTemplateSpec = map[string]string{ - "": "JobTemplateSpec describes the data a Job should have when created from a template", - "metadata": "Standard object's metadata of the jobs created from this template. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "spec": "Specification of the desired behavior of the job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", -} - -func (JobTemplateSpec) SwaggerDoc() map[string]string { - return map_JobTemplateSpec -} - -var map_LabelSelector = map[string]string{ - "": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", - "matchLabels": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", - "matchExpressions": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", -} - -func (LabelSelector) SwaggerDoc() map[string]string { - return map_LabelSelector -} - -var map_LabelSelectorRequirement = map[string]string{ - "": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", - "key": "key is the label key that the selector applies to.", - "operator": "operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist.", - "values": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", -} - -func (LabelSelectorRequirement) SwaggerDoc() map[string]string { - return map_LabelSelectorRequirement -} - -var map_ScheduledJob = map[string]string{ - "": "ScheduledJob represents the configuration of a single scheduled job.", - "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "spec": "Spec is a structure defining the expected behavior of a job, including the schedule. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", - "status": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", -} - -func (ScheduledJob) SwaggerDoc() map[string]string { - return map_ScheduledJob -} - -var map_ScheduledJobList = map[string]string{ - "": "ScheduledJobList is a collection of scheduled jobs.", - "metadata": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "items": "Items is the list of ScheduledJob.", -} - -func (ScheduledJobList) SwaggerDoc() map[string]string { - return map_ScheduledJobList -} - -var map_ScheduledJobSpec = map[string]string{ - "": "ScheduledJobSpec describes how the job execution will look like and when it will actually run.", - "schedule": "Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", - "startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", - "concurrencyPolicy": "ConcurrencyPolicy specifies how to treat concurrent executions of a Job.", - "suspend": "Suspend flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", - "jobTemplate": "JobTemplate is the object that describes the job that will be created when executing a ScheduledJob.", -} - -func (ScheduledJobSpec) SwaggerDoc() map[string]string { - return map_ScheduledJobSpec -} - -var map_ScheduledJobStatus = map[string]string{ - "": "ScheduledJobStatus represents the current state of a Job.", - "active": "Active holds pointers to currently running jobs.", - "lastScheduleTime": "LastScheduleTime keeps information of when was the last time the job was successfully scheduled.", -} - -func (ScheduledJobStatus) SwaggerDoc() map[string]string { - return map_ScheduledJobStatus -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/zz_generated.conversion.go deleted file mode 100644 index ea087e8e7..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,577 +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 v2alpha1 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - batch "k8s.io/client-go/1.5/pkg/apis/batch" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" -) - -func init() { - SchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v2alpha1_Job_To_batch_Job, - Convert_batch_Job_To_v2alpha1_Job, - Convert_v2alpha1_JobCondition_To_batch_JobCondition, - Convert_batch_JobCondition_To_v2alpha1_JobCondition, - Convert_v2alpha1_JobList_To_batch_JobList, - Convert_batch_JobList_To_v2alpha1_JobList, - Convert_v2alpha1_JobSpec_To_batch_JobSpec, - Convert_batch_JobSpec_To_v2alpha1_JobSpec, - Convert_v2alpha1_JobStatus_To_batch_JobStatus, - Convert_batch_JobStatus_To_v2alpha1_JobStatus, - Convert_v2alpha1_JobTemplate_To_batch_JobTemplate, - Convert_batch_JobTemplate_To_v2alpha1_JobTemplate, - Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec, - Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec, - Convert_v2alpha1_LabelSelector_To_unversioned_LabelSelector, - Convert_unversioned_LabelSelector_To_v2alpha1_LabelSelector, - Convert_v2alpha1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement, - Convert_unversioned_LabelSelectorRequirement_To_v2alpha1_LabelSelectorRequirement, - Convert_v2alpha1_ScheduledJob_To_batch_ScheduledJob, - Convert_batch_ScheduledJob_To_v2alpha1_ScheduledJob, - Convert_v2alpha1_ScheduledJobList_To_batch_ScheduledJobList, - Convert_batch_ScheduledJobList_To_v2alpha1_ScheduledJobList, - Convert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec, - Convert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec, - Convert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus, - Convert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus, - ) -} - -func autoConvert_v2alpha1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { - SetDefaults_Job(in) - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v2alpha1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v2alpha1_JobStatus_To_batch_JobStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_v2alpha1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { - return autoConvert_v2alpha1_Job_To_batch_Job(in, out, s) -} - -func autoConvert_batch_Job_To_v2alpha1_Job(in *batch.Job, out *Job, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_batch_JobSpec_To_v2alpha1_JobSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_batch_JobStatus_To_v2alpha1_JobStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_batch_Job_To_v2alpha1_Job(in *batch.Job, out *Job, s conversion.Scope) error { - return autoConvert_batch_Job_To_v2alpha1_Job(in, out, s) -} - -func autoConvert_v2alpha1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error { - out.Type = batch.JobConditionType(in.Type) - out.Status = api.ConditionStatus(in.Status) - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil { - return err - } - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil { - return err - } - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -func Convert_v2alpha1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error { - return autoConvert_v2alpha1_JobCondition_To_batch_JobCondition(in, out, s) -} - -func autoConvert_batch_JobCondition_To_v2alpha1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error { - out.Type = JobConditionType(in.Type) - out.Status = v1.ConditionStatus(in.Status) - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil { - return err - } - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil { - return err - } - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -func Convert_batch_JobCondition_To_v2alpha1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error { - return autoConvert_batch_JobCondition_To_v2alpha1_JobCondition(in, out, s) -} - -func autoConvert_v2alpha1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]batch.Job, len(*in)) - for i := range *in { - if err := Convert_v2alpha1_Job_To_batch_Job(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_v2alpha1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error { - return autoConvert_v2alpha1_JobList_To_batch_JobList(in, out, s) -} - -func autoConvert_batch_JobList_To_v2alpha1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Job, len(*in)) - for i := range *in { - if err := Convert_batch_Job_To_v2alpha1_Job(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_batch_JobList_To_v2alpha1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error { - return autoConvert_batch_JobList_To_v2alpha1_JobList(in, out, s) -} - -func autoConvert_v2alpha1_JobSpec_To_batch_JobSpec(in *JobSpec, out *batch.JobSpec, s conversion.Scope) error { - out.Parallelism = in.Parallelism - out.Completions = in.Completions - out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(unversioned.LabelSelector) - if err := Convert_v2alpha1_LabelSelector_To_unversioned_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.Selector = nil - } - out.ManualSelector = in.ManualSelector - if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -func autoConvert_batch_JobSpec_To_v2alpha1_JobSpec(in *batch.JobSpec, out *JobSpec, s conversion.Scope) error { - out.Parallelism = in.Parallelism - out.Completions = in.Completions - out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(LabelSelector) - if err := Convert_unversioned_LabelSelector_To_v2alpha1_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.Selector = nil - } - out.ManualSelector = in.ManualSelector - if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -func autoConvert_v2alpha1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]batch.JobCondition, len(*in)) - for i := range *in { - if err := Convert_v2alpha1_JobCondition_To_batch_JobCondition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - out.StartTime = in.StartTime - out.CompletionTime = in.CompletionTime - out.Active = in.Active - out.Succeeded = in.Succeeded - out.Failed = in.Failed - return nil -} - -func Convert_v2alpha1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error { - return autoConvert_v2alpha1_JobStatus_To_batch_JobStatus(in, out, s) -} - -func autoConvert_batch_JobStatus_To_v2alpha1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]JobCondition, len(*in)) - for i := range *in { - if err := Convert_batch_JobCondition_To_v2alpha1_JobCondition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - out.StartTime = in.StartTime - out.CompletionTime = in.CompletionTime - out.Active = in.Active - out.Succeeded = in.Succeeded - out.Failed = in.Failed - return nil -} - -func Convert_batch_JobStatus_To_v2alpha1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error { - return autoConvert_batch_JobStatus_To_v2alpha1_JobStatus(in, out, s) -} - -func autoConvert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *batch.JobTemplate, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -func Convert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *batch.JobTemplate, s conversion.Scope) error { - return autoConvert_v2alpha1_JobTemplate_To_batch_JobTemplate(in, out, s) -} - -func autoConvert_batch_JobTemplate_To_v2alpha1_JobTemplate(in *batch.JobTemplate, out *JobTemplate, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -func Convert_batch_JobTemplate_To_v2alpha1_JobTemplate(in *batch.JobTemplate, out *JobTemplate, s conversion.Scope) error { - return autoConvert_batch_JobTemplate_To_v2alpha1_JobTemplate(in, out, s) -} - -func autoConvert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in *JobTemplateSpec, out *batch.JobTemplateSpec, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v2alpha1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -func Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in *JobTemplateSpec, out *batch.JobTemplateSpec, s conversion.Scope) error { - return autoConvert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in, out, s) -} - -func autoConvert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in *batch.JobTemplateSpec, out *JobTemplateSpec, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_batch_JobSpec_To_v2alpha1_JobSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -func Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in *batch.JobTemplateSpec, out *JobTemplateSpec, s conversion.Scope) error { - return autoConvert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in, out, s) -} - -func autoConvert_v2alpha1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error { - out.MatchLabels = in.MatchLabels - if in.MatchExpressions != nil { - in, out := &in.MatchExpressions, &out.MatchExpressions - *out = make([]unversioned.LabelSelectorRequirement, len(*in)) - for i := range *in { - if err := Convert_v2alpha1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.MatchExpressions = nil - } - return nil -} - -func Convert_v2alpha1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error { - return autoConvert_v2alpha1_LabelSelector_To_unversioned_LabelSelector(in, out, s) -} - -func autoConvert_unversioned_LabelSelector_To_v2alpha1_LabelSelector(in *unversioned.LabelSelector, out *LabelSelector, s conversion.Scope) error { - out.MatchLabels = in.MatchLabels - if in.MatchExpressions != nil { - in, out := &in.MatchExpressions, &out.MatchExpressions - *out = make([]LabelSelectorRequirement, len(*in)) - for i := range *in { - if err := Convert_unversioned_LabelSelectorRequirement_To_v2alpha1_LabelSelectorRequirement(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.MatchExpressions = nil - } - return nil -} - -func Convert_unversioned_LabelSelector_To_v2alpha1_LabelSelector(in *unversioned.LabelSelector, out *LabelSelector, s conversion.Scope) error { - return autoConvert_unversioned_LabelSelector_To_v2alpha1_LabelSelector(in, out, s) -} - -func autoConvert_v2alpha1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in *LabelSelectorRequirement, out *unversioned.LabelSelectorRequirement, s conversion.Scope) error { - out.Key = in.Key - out.Operator = unversioned.LabelSelectorOperator(in.Operator) - out.Values = in.Values - return nil -} - -func Convert_v2alpha1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in *LabelSelectorRequirement, out *unversioned.LabelSelectorRequirement, s conversion.Scope) error { - return autoConvert_v2alpha1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in, out, s) -} - -func autoConvert_unversioned_LabelSelectorRequirement_To_v2alpha1_LabelSelectorRequirement(in *unversioned.LabelSelectorRequirement, out *LabelSelectorRequirement, s conversion.Scope) error { - out.Key = in.Key - out.Operator = LabelSelectorOperator(in.Operator) - out.Values = in.Values - return nil -} - -func Convert_unversioned_LabelSelectorRequirement_To_v2alpha1_LabelSelectorRequirement(in *unversioned.LabelSelectorRequirement, out *LabelSelectorRequirement, s conversion.Scope) error { - return autoConvert_unversioned_LabelSelectorRequirement_To_v2alpha1_LabelSelectorRequirement(in, out, s) -} - -func autoConvert_v2alpha1_ScheduledJob_To_batch_ScheduledJob(in *ScheduledJob, out *batch.ScheduledJob, s conversion.Scope) error { - SetDefaults_ScheduledJob(in) - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_v2alpha1_ScheduledJob_To_batch_ScheduledJob(in *ScheduledJob, out *batch.ScheduledJob, s conversion.Scope) error { - return autoConvert_v2alpha1_ScheduledJob_To_batch_ScheduledJob(in, out, s) -} - -func autoConvert_batch_ScheduledJob_To_v2alpha1_ScheduledJob(in *batch.ScheduledJob, out *ScheduledJob, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_batch_ScheduledJob_To_v2alpha1_ScheduledJob(in *batch.ScheduledJob, out *ScheduledJob, s conversion.Scope) error { - return autoConvert_batch_ScheduledJob_To_v2alpha1_ScheduledJob(in, out, s) -} - -func autoConvert_v2alpha1_ScheduledJobList_To_batch_ScheduledJobList(in *ScheduledJobList, out *batch.ScheduledJobList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]batch.ScheduledJob, len(*in)) - for i := range *in { - if err := Convert_v2alpha1_ScheduledJob_To_batch_ScheduledJob(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_v2alpha1_ScheduledJobList_To_batch_ScheduledJobList(in *ScheduledJobList, out *batch.ScheduledJobList, s conversion.Scope) error { - return autoConvert_v2alpha1_ScheduledJobList_To_batch_ScheduledJobList(in, out, s) -} - -func autoConvert_batch_ScheduledJobList_To_v2alpha1_ScheduledJobList(in *batch.ScheduledJobList, out *ScheduledJobList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ScheduledJob, len(*in)) - for i := range *in { - if err := Convert_batch_ScheduledJob_To_v2alpha1_ScheduledJob(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_batch_ScheduledJobList_To_v2alpha1_ScheduledJobList(in *batch.ScheduledJobList, out *ScheduledJobList, s conversion.Scope) error { - return autoConvert_batch_ScheduledJobList_To_v2alpha1_ScheduledJobList(in, out, s) -} - -func autoConvert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec(in *ScheduledJobSpec, out *batch.ScheduledJobSpec, s conversion.Scope) error { - out.Schedule = in.Schedule - out.StartingDeadlineSeconds = in.StartingDeadlineSeconds - out.ConcurrencyPolicy = batch.ConcurrencyPolicy(in.ConcurrencyPolicy) - out.Suspend = in.Suspend - if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil { - return err - } - return nil -} - -func Convert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec(in *ScheduledJobSpec, out *batch.ScheduledJobSpec, s conversion.Scope) error { - return autoConvert_v2alpha1_ScheduledJobSpec_To_batch_ScheduledJobSpec(in, out, s) -} - -func autoConvert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec(in *batch.ScheduledJobSpec, out *ScheduledJobSpec, s conversion.Scope) error { - out.Schedule = in.Schedule - out.StartingDeadlineSeconds = in.StartingDeadlineSeconds - out.ConcurrencyPolicy = ConcurrencyPolicy(in.ConcurrencyPolicy) - out.Suspend = in.Suspend - if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil { - return err - } - return nil -} - -func Convert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec(in *batch.ScheduledJobSpec, out *ScheduledJobSpec, s conversion.Scope) error { - return autoConvert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec(in, out, s) -} - -func autoConvert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus(in *ScheduledJobStatus, out *batch.ScheduledJobStatus, s conversion.Scope) error { - if in.Active != nil { - in, out := &in.Active, &out.Active - *out = make([]api.ObjectReference, len(*in)) - for i := range *in { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil { - return err - } - } - } else { - out.Active = nil - } - out.LastScheduleTime = in.LastScheduleTime - return nil -} - -func Convert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus(in *ScheduledJobStatus, out *batch.ScheduledJobStatus, s conversion.Scope) error { - return autoConvert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus(in, out, s) -} - -func autoConvert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus(in *batch.ScheduledJobStatus, out *ScheduledJobStatus, s conversion.Scope) error { - if in.Active != nil { - in, out := &in.Active, &out.Active - *out = make([]v1.ObjectReference, len(*in)) - for i := range *in { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil { - return err - } - } - } else { - out.Active = nil - } - out.LastScheduleTime = in.LastScheduleTime - return nil -} - -func Convert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus(in *batch.ScheduledJobStatus, out *ScheduledJobStatus, s conversion.Scope) error { - return autoConvert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus(in, out, s) -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 6d9dd9b2b..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,354 +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 v2alpha1 - -import ( - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" - reflect "reflect" -) - -func init() { - SchemeBuilder.Register(RegisterDeepCopies) -} - -// RegisterDeepCopies adds deep-copy functions to the given scheme. Public -// to allow building arbitrary schemes. -func RegisterDeepCopies(scheme *runtime.Scheme) error { - return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_Job, InType: reflect.TypeOf(&Job{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobCondition, InType: reflect.TypeOf(&JobCondition{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobList, InType: reflect.TypeOf(&JobList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobSpec, InType: reflect.TypeOf(&JobSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobStatus, InType: reflect.TypeOf(&JobStatus{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobTemplate, InType: reflect.TypeOf(&JobTemplate{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobTemplateSpec, InType: reflect.TypeOf(&JobTemplateSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_LabelSelector, InType: reflect.TypeOf(&LabelSelector{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_LabelSelectorRequirement, InType: reflect.TypeOf(&LabelSelectorRequirement{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ScheduledJob, InType: reflect.TypeOf(&ScheduledJob{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ScheduledJobList, InType: reflect.TypeOf(&ScheduledJobList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ScheduledJobSpec, InType: reflect.TypeOf(&ScheduledJobSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ScheduledJobStatus, InType: reflect.TypeOf(&ScheduledJobStatus{})}, - ) -} - -func DeepCopy_v2alpha1_Job(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Job) - out := out.(*Job) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - if err := DeepCopy_v2alpha1_JobSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - if err := DeepCopy_v2alpha1_JobStatus(&in.Status, &out.Status, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_v2alpha1_JobCondition(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*JobCondition) - out := out.(*JobCondition) - out.Type = in.Type - out.Status = in.Status - out.LastProbeTime = in.LastProbeTime.DeepCopy() - out.LastTransitionTime = in.LastTransitionTime.DeepCopy() - out.Reason = in.Reason - out.Message = in.Message - return nil - } -} - -func DeepCopy_v2alpha1_JobList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*JobList) - out := out.(*JobList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Job, len(*in)) - for i := range *in { - if err := DeepCopy_v2alpha1_Job(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil - } -} - -func DeepCopy_v2alpha1_JobSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*JobSpec) - out := out.(*JobSpec) - if in.Parallelism != nil { - in, out := &in.Parallelism, &out.Parallelism - *out = new(int32) - **out = **in - } else { - out.Parallelism = nil - } - if in.Completions != nil { - in, out := &in.Completions, &out.Completions - *out = new(int32) - **out = **in - } else { - out.Completions = nil - } - if in.ActiveDeadlineSeconds != nil { - in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds - *out = new(int64) - **out = **in - } else { - out.ActiveDeadlineSeconds = nil - } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(LabelSelector) - if err := DeepCopy_v2alpha1_LabelSelector(*in, *out, c); err != nil { - return err - } - } else { - out.Selector = nil - } - if in.ManualSelector != nil { - in, out := &in.ManualSelector, &out.ManualSelector - *out = new(bool) - **out = **in - } else { - out.ManualSelector = nil - } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_v2alpha1_JobStatus(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*JobStatus) - out := out.(*JobStatus) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]JobCondition, len(*in)) - for i := range *in { - if err := DeepCopy_v2alpha1_JobCondition(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - if in.StartTime != nil { - in, out := &in.StartTime, &out.StartTime - *out = new(unversioned.Time) - **out = (*in).DeepCopy() - } else { - out.StartTime = nil - } - if in.CompletionTime != nil { - in, out := &in.CompletionTime, &out.CompletionTime - *out = new(unversioned.Time) - **out = (*in).DeepCopy() - } else { - out.CompletionTime = nil - } - out.Active = in.Active - out.Succeeded = in.Succeeded - out.Failed = in.Failed - return nil - } -} - -func DeepCopy_v2alpha1_JobTemplate(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*JobTemplate) - out := out.(*JobTemplate) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - if err := DeepCopy_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_v2alpha1_JobTemplateSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*JobTemplateSpec) - out := out.(*JobTemplateSpec) - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - if err := DeepCopy_v2alpha1_JobSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_v2alpha1_LabelSelector(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*LabelSelector) - out := out.(*LabelSelector) - if in.MatchLabels != nil { - in, out := &in.MatchLabels, &out.MatchLabels - *out = make(map[string]string) - for key, val := range *in { - (*out)[key] = val - } - } else { - out.MatchLabels = nil - } - if in.MatchExpressions != nil { - in, out := &in.MatchExpressions, &out.MatchExpressions - *out = make([]LabelSelectorRequirement, len(*in)) - for i := range *in { - if err := DeepCopy_v2alpha1_LabelSelectorRequirement(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.MatchExpressions = nil - } - return nil - } -} - -func DeepCopy_v2alpha1_LabelSelectorRequirement(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*LabelSelectorRequirement) - out := out.(*LabelSelectorRequirement) - out.Key = in.Key - out.Operator = in.Operator - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = make([]string, len(*in)) - copy(*out, *in) - } else { - out.Values = nil - } - return nil - } -} - -func DeepCopy_v2alpha1_ScheduledJob(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ScheduledJob) - out := out.(*ScheduledJob) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - if err := DeepCopy_v2alpha1_ScheduledJobSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - if err := DeepCopy_v2alpha1_ScheduledJobStatus(&in.Status, &out.Status, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_v2alpha1_ScheduledJobList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ScheduledJobList) - out := out.(*ScheduledJobList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ScheduledJob, len(*in)) - for i := range *in { - if err := DeepCopy_v2alpha1_ScheduledJob(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil - } -} - -func DeepCopy_v2alpha1_ScheduledJobSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ScheduledJobSpec) - out := out.(*ScheduledJobSpec) - out.Schedule = in.Schedule - if in.StartingDeadlineSeconds != nil { - in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds - *out = new(int64) - **out = **in - } else { - out.StartingDeadlineSeconds = nil - } - out.ConcurrencyPolicy = in.ConcurrencyPolicy - if in.Suspend != nil { - in, out := &in.Suspend, &out.Suspend - *out = new(bool) - **out = **in - } else { - out.Suspend = nil - } - if err := DeepCopy_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_v2alpha1_ScheduledJobStatus(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ScheduledJobStatus) - out := out.(*ScheduledJobStatus) - if in.Active != nil { - in, out := &in.Active, &out.Active - *out = make([]v1.ObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Active = nil - } - if in.LastScheduleTime != nil { - in, out := &in.LastScheduleTime, &out.LastScheduleTime - *out = new(unversioned.Time) - **out = (*in).DeepCopy() - } else { - out.LastScheduleTime = nil - } - return nil - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/types.generated.go deleted file mode 100644 index b377c9ac8..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/types.generated.go +++ /dev/null @@ -1,1957 +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 certificates - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - pkg2_api "k8s.io/client-go/1.5/pkg/api" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg3_types "k8s.io/client-go/1.5/pkg/types" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg2_api.ObjectMeta - var v1 pkg1_unversioned.TypeMeta - var v2 pkg3_types.UID - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 - } -} - -func (x *CertificateSigningRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [5]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = x.Kind != "" - yyq2[1] = x.APIVersion != "" - yyq2[2] = true - yyq2[3] = true - yyq2[4] = true - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(5) - } else { - yynn2 = 0 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[1] { - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy11 := &x.ObjectMeta - yy11.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[3] { - yy13 := &x.Spec - yy13.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy14 := &x.Spec - yy14.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { - yy16 := &x.Status - yy16.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy17 := &x.Status - yy17.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CertificateSigningRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym18 := z.DecBinary() - _ = yym18 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct19 := r.ContainerType() - if yyct19 == codecSelferValueTypeMap1234 { - yyl19 := r.ReadMapStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl19, d) - } - } else if yyct19 == codecSelferValueTypeArray1234 { - yyl19 := r.ReadArrayStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl19, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CertificateSigningRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys20Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys20Slc - var yyhl20 bool = l >= 0 - for yyj20 := 0; ; yyj20++ { - if yyhl20 { - if yyj20 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys20Slc = r.DecodeBytes(yys20Slc, true, true) - yys20 := string(yys20Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys20 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv23 := &x.ObjectMeta - yyv23.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = CertificateSigningRequestSpec{} - } else { - yyv24 := &x.Spec - yyv24.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = CertificateSigningRequestStatus{} - } else { - yyv25 := &x.Status - yyv25.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys20) - } // end switch yys20 - } // end for yyj20 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj26 int - var yyb26 bool - var yyhl26 bool = l >= 0 - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv29 := &x.ObjectMeta - yyv29.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = CertificateSigningRequestSpec{} - } else { - yyv30 := &x.Spec - yyv30.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = CertificateSigningRequestStatus{} - } else { - yyv31 := &x.Status - yyv31.CodecDecodeSelf(d) - } - for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj26-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *CertificateSigningRequestSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym32 := z.EncBinary() - _ = yym32 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep33 := !z.EncBinary() - yy2arr33 := z.EncBasicHandle().StructToArray - var yyq33 [4]bool - _, _, _ = yysep33, yyq33, yy2arr33 - const yyr33 bool = false - yyq33[1] = x.Username != "" - yyq33[2] = x.UID != "" - yyq33[3] = len(x.Groups) != 0 - var yynn33 int - if yyr33 || yy2arr33 { - r.EncodeArrayStart(4) - } else { - yynn33 = 1 - for _, b := range yyq33 { - if b { - yynn33++ - } - } - r.EncodeMapStart(yynn33) - yynn33 = 0 - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Request == nil { - r.EncodeNil() - } else { - yym35 := z.EncBinary() - _ = yym35 - if false { - } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Request)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("request")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Request == nil { - r.EncodeNil() - } else { - yym36 := z.EncBinary() - _ = yym36 - if false { - } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Request)) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[1] { - yym38 := z.EncBinary() - _ = yym38 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Username)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq33[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("username")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym39 := z.EncBinary() - _ = yym39 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Username)) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[2] { - yym41 := z.EncBinary() - _ = yym41 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.UID)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq33[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("uid")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym42 := z.EncBinary() - _ = yym42 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.UID)) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[3] { - if x.Groups == nil { - r.EncodeNil() - } else { - yym44 := z.EncBinary() - _ = yym44 - if false { - } else { - z.F.EncSliceStringV(x.Groups, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq33[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("groups")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Groups == nil { - r.EncodeNil() - } else { - yym45 := z.EncBinary() - _ = yym45 - if false { - } else { - z.F.EncSliceStringV(x.Groups, false, e) - } - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CertificateSigningRequestSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym46 := z.DecBinary() - _ = yym46 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct47 := r.ContainerType() - if yyct47 == codecSelferValueTypeMap1234 { - yyl47 := r.ReadMapStart() - if yyl47 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl47, d) - } - } else if yyct47 == codecSelferValueTypeArray1234 { - yyl47 := r.ReadArrayStart() - if yyl47 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl47, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CertificateSigningRequestSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys48Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys48Slc - var yyhl48 bool = l >= 0 - for yyj48 := 0; ; yyj48++ { - if yyhl48 { - if yyj48 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys48Slc = r.DecodeBytes(yys48Slc, true, true) - yys48 := string(yys48Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys48 { - case "request": - if r.TryDecodeAsNil() { - x.Request = nil - } else { - yyv49 := &x.Request - yym50 := z.DecBinary() - _ = yym50 - if false { - } else { - *yyv49 = r.DecodeBytes(*(*[]byte)(yyv49), false, false) - } - } - case "username": - if r.TryDecodeAsNil() { - x.Username = "" - } else { - x.Username = string(r.DecodeString()) - } - case "uid": - if r.TryDecodeAsNil() { - x.UID = "" - } else { - x.UID = string(r.DecodeString()) - } - case "groups": - if r.TryDecodeAsNil() { - x.Groups = nil - } else { - yyv53 := &x.Groups - yym54 := z.DecBinary() - _ = yym54 - if false { - } else { - z.F.DecSliceStringX(yyv53, false, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys48) - } // end switch yys48 - } // end for yyj48 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CertificateSigningRequestSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj55 int - var yyb55 bool - var yyhl55 bool = l >= 0 - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l - } else { - yyb55 = r.CheckBreak() - } - if yyb55 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Request = nil - } else { - yyv56 := &x.Request - yym57 := z.DecBinary() - _ = yym57 - if false { - } else { - *yyv56 = r.DecodeBytes(*(*[]byte)(yyv56), false, false) - } - } - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l - } else { - yyb55 = r.CheckBreak() - } - if yyb55 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Username = "" - } else { - x.Username = string(r.DecodeString()) - } - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l - } else { - yyb55 = r.CheckBreak() - } - if yyb55 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.UID = "" - } else { - x.UID = string(r.DecodeString()) - } - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l - } else { - yyb55 = r.CheckBreak() - } - if yyb55 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Groups = nil - } else { - yyv60 := &x.Groups - yym61 := z.DecBinary() - _ = yym61 - if false { - } else { - z.F.DecSliceStringX(yyv60, false, d) - } - } - for { - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l - } else { - yyb55 = r.CheckBreak() - } - if yyb55 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj55-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *CertificateSigningRequestStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym62 := z.EncBinary() - _ = yym62 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep63 := !z.EncBinary() - yy2arr63 := z.EncBasicHandle().StructToArray - var yyq63 [2]bool - _, _, _ = yysep63, yyq63, yy2arr63 - const yyr63 bool = false - yyq63[0] = len(x.Conditions) != 0 - yyq63[1] = len(x.Certificate) != 0 - var yynn63 int - if yyr63 || yy2arr63 { - r.EncodeArrayStart(2) - } else { - yynn63 = 0 - for _, b := range yyq63 { - if b { - yynn63++ - } - } - r.EncodeMapStart(yynn63) - yynn63 = 0 - } - if yyr63 || yy2arr63 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq63[0] { - if x.Conditions == nil { - r.EncodeNil() - } else { - yym65 := z.EncBinary() - _ = yym65 - if false { - } else { - h.encSliceCertificateSigningRequestCondition(([]CertificateSigningRequestCondition)(x.Conditions), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq63[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("conditions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Conditions == nil { - r.EncodeNil() - } else { - yym66 := z.EncBinary() - _ = yym66 - if false { - } else { - h.encSliceCertificateSigningRequestCondition(([]CertificateSigningRequestCondition)(x.Conditions), e) - } - } - } - } - if yyr63 || yy2arr63 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq63[1] { - if x.Certificate == nil { - r.EncodeNil() - } else { - yym68 := z.EncBinary() - _ = yym68 - if false { - } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Certificate)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq63[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("certificate")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Certificate == nil { - r.EncodeNil() - } else { - yym69 := z.EncBinary() - _ = yym69 - if false { - } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Certificate)) - } - } - } - } - if yyr63 || yy2arr63 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CertificateSigningRequestStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym70 := z.DecBinary() - _ = yym70 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct71 := r.ContainerType() - if yyct71 == codecSelferValueTypeMap1234 { - yyl71 := r.ReadMapStart() - if yyl71 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl71, d) - } - } else if yyct71 == codecSelferValueTypeArray1234 { - yyl71 := r.ReadArrayStart() - if yyl71 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl71, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CertificateSigningRequestStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys72Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys72Slc - var yyhl72 bool = l >= 0 - for yyj72 := 0; ; yyj72++ { - if yyhl72 { - if yyj72 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys72Slc = r.DecodeBytes(yys72Slc, true, true) - yys72 := string(yys72Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys72 { - case "conditions": - if r.TryDecodeAsNil() { - x.Conditions = nil - } else { - yyv73 := &x.Conditions - yym74 := z.DecBinary() - _ = yym74 - if false { - } else { - h.decSliceCertificateSigningRequestCondition((*[]CertificateSigningRequestCondition)(yyv73), d) - } - } - case "certificate": - if r.TryDecodeAsNil() { - x.Certificate = nil - } else { - yyv75 := &x.Certificate - yym76 := z.DecBinary() - _ = yym76 - if false { - } else { - *yyv75 = r.DecodeBytes(*(*[]byte)(yyv75), false, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys72) - } // end switch yys72 - } // end for yyj72 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CertificateSigningRequestStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj77 int - var yyb77 bool - var yyhl77 bool = l >= 0 - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l - } else { - yyb77 = r.CheckBreak() - } - if yyb77 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Conditions = nil - } else { - yyv78 := &x.Conditions - yym79 := z.DecBinary() - _ = yym79 - if false { - } else { - h.decSliceCertificateSigningRequestCondition((*[]CertificateSigningRequestCondition)(yyv78), d) - } - } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l - } else { - yyb77 = r.CheckBreak() - } - if yyb77 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Certificate = nil - } else { - yyv80 := &x.Certificate - yym81 := z.DecBinary() - _ = yym81 - if false { - } else { - *yyv80 = r.DecodeBytes(*(*[]byte)(yyv80), false, false) - } - } - for { - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l - } else { - yyb77 = r.CheckBreak() - } - if yyb77 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj77-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x RequestConditionType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym82 := z.EncBinary() - _ = yym82 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *RequestConditionType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym83 := z.DecBinary() - _ = yym83 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *CertificateSigningRequestCondition) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym84 := z.EncBinary() - _ = yym84 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep85 := !z.EncBinary() - yy2arr85 := z.EncBasicHandle().StructToArray - var yyq85 [4]bool - _, _, _ = yysep85, yyq85, yy2arr85 - const yyr85 bool = false - yyq85[1] = x.Reason != "" - yyq85[2] = x.Message != "" - yyq85[3] = true - var yynn85 int - if yyr85 || yy2arr85 { - r.EncodeArrayStart(4) - } else { - yynn85 = 1 - for _, b := range yyq85 { - if b { - yynn85++ - } - } - r.EncodeMapStart(yynn85) - yynn85 = 0 - } - if yyr85 || yy2arr85 { - 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 yyr85 || yy2arr85 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq85[1] { - yym88 := z.EncBinary() - _ = yym88 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq85[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("reason")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym89 := z.EncBinary() - _ = yym89 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } - } - if yyr85 || yy2arr85 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq85[2] { - yym91 := z.EncBinary() - _ = yym91 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq85[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("message")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym92 := z.EncBinary() - _ = yym92 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } - } - if yyr85 || yy2arr85 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq85[3] { - yy94 := &x.LastUpdateTime - yym95 := z.EncBinary() - _ = yym95 - if false { - } else if z.HasExtensions() && z.EncExt(yy94) { - } else if yym95 { - z.EncBinaryMarshal(yy94) - } else if !yym95 && z.IsJSONHandle() { - z.EncJSONMarshal(yy94) - } else { - z.EncFallback(yy94) - } - } else { - r.EncodeNil() - } - } else { - if yyq85[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastUpdateTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy96 := &x.LastUpdateTime - yym97 := z.EncBinary() - _ = yym97 - if false { - } else if z.HasExtensions() && z.EncExt(yy96) { - } else if yym97 { - z.EncBinaryMarshal(yy96) - } else if !yym97 && z.IsJSONHandle() { - z.EncJSONMarshal(yy96) - } else { - z.EncFallback(yy96) - } - } - } - if yyr85 || yy2arr85 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CertificateSigningRequestCondition) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym98 := z.DecBinary() - _ = yym98 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct99 := r.ContainerType() - if yyct99 == codecSelferValueTypeMap1234 { - yyl99 := r.ReadMapStart() - if yyl99 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl99, d) - } - } else if yyct99 == codecSelferValueTypeArray1234 { - yyl99 := r.ReadArrayStart() - if yyl99 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl99, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CertificateSigningRequestCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys100Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys100Slc - var yyhl100 bool = l >= 0 - for yyj100 := 0; ; yyj100++ { - if yyhl100 { - if yyj100 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys100Slc = r.DecodeBytes(yys100Slc, true, true) - yys100 := string(yys100Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys100 { - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = RequestConditionType(r.DecodeString()) - } - case "reason": - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - case "message": - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - case "lastUpdateTime": - if r.TryDecodeAsNil() { - x.LastUpdateTime = pkg1_unversioned.Time{} - } else { - yyv104 := &x.LastUpdateTime - yym105 := z.DecBinary() - _ = yym105 - if false { - } else if z.HasExtensions() && z.DecExt(yyv104) { - } else if yym105 { - z.DecBinaryUnmarshal(yyv104) - } else if !yym105 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv104) - } else { - z.DecFallback(yyv104, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys100) - } // end switch yys100 - } // end for yyj100 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CertificateSigningRequestCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj106 int - var yyb106 bool - var yyhl106 bool = l >= 0 - yyj106++ - if yyhl106 { - yyb106 = yyj106 > l - } else { - yyb106 = r.CheckBreak() - } - if yyb106 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = RequestConditionType(r.DecodeString()) - } - yyj106++ - if yyhl106 { - yyb106 = yyj106 > l - } else { - yyb106 = r.CheckBreak() - } - if yyb106 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - yyj106++ - if yyhl106 { - yyb106 = yyj106 > l - } else { - yyb106 = r.CheckBreak() - } - if yyb106 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - yyj106++ - if yyhl106 { - yyb106 = yyj106 > l - } else { - yyb106 = r.CheckBreak() - } - if yyb106 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastUpdateTime = pkg1_unversioned.Time{} - } else { - yyv110 := &x.LastUpdateTime - yym111 := z.DecBinary() - _ = yym111 - if false { - } else if z.HasExtensions() && z.DecExt(yyv110) { - } else if yym111 { - z.DecBinaryUnmarshal(yyv110) - } else if !yym111 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv110) - } else { - z.DecFallback(yyv110, false) - } - } - for { - yyj106++ - if yyhl106 { - yyb106 = yyj106 > l - } else { - yyb106 = r.CheckBreak() - } - if yyb106 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj106-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *CertificateSigningRequestList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym112 := z.EncBinary() - _ = yym112 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep113 := !z.EncBinary() - yy2arr113 := z.EncBasicHandle().StructToArray - var yyq113 [4]bool - _, _, _ = yysep113, yyq113, yy2arr113 - const yyr113 bool = false - yyq113[0] = x.Kind != "" - yyq113[1] = x.APIVersion != "" - yyq113[2] = true - yyq113[3] = len(x.Items) != 0 - var yynn113 int - if yyr113 || yy2arr113 { - r.EncodeArrayStart(4) - } else { - yynn113 = 0 - for _, b := range yyq113 { - if b { - yynn113++ - } - } - r.EncodeMapStart(yynn113) - yynn113 = 0 - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[0] { - yym115 := z.EncBinary() - _ = yym115 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq113[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym116 := z.EncBinary() - _ = yym116 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[1] { - yym118 := z.EncBinary() - _ = yym118 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq113[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym119 := z.EncBinary() - _ = yym119 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[2] { - yy121 := &x.ListMeta - yym122 := z.EncBinary() - _ = yym122 - if false { - } else if z.HasExtensions() && z.EncExt(yy121) { - } else { - z.EncFallback(yy121) - } - } else { - r.EncodeNil() - } - } else { - if yyq113[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy123 := &x.ListMeta - yym124 := z.EncBinary() - _ = yym124 - if false { - } else if z.HasExtensions() && z.EncExt(yy123) { - } else { - z.EncFallback(yy123) - } - } - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[3] { - if x.Items == nil { - r.EncodeNil() - } else { - yym126 := z.EncBinary() - _ = yym126 - if false { - } else { - h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq113[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym127 := z.EncBinary() - _ = yym127 - if false { - } else { - h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e) - } - } - } - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CertificateSigningRequestList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym128 := z.DecBinary() - _ = yym128 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct129 := r.ContainerType() - if yyct129 == codecSelferValueTypeMap1234 { - yyl129 := r.ReadMapStart() - if yyl129 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl129, d) - } - } else if yyct129 == codecSelferValueTypeArray1234 { - yyl129 := r.ReadArrayStart() - if yyl129 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl129, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CertificateSigningRequestList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys130Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys130Slc - var yyhl130 bool = l >= 0 - for yyj130 := 0; ; yyj130++ { - if yyhl130 { - if yyj130 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys130Slc = r.DecodeBytes(yys130Slc, true, true) - yys130 := string(yys130Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys130 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv133 := &x.ListMeta - yym134 := z.DecBinary() - _ = yym134 - if false { - } else if z.HasExtensions() && z.DecExt(yyv133) { - } else { - z.DecFallback(yyv133, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv135 := &x.Items - yym136 := z.DecBinary() - _ = yym136 - if false { - } else { - h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv135), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys130) - } // end switch yys130 - } // end for yyj130 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CertificateSigningRequestList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj137 int - var yyb137 bool - var yyhl137 bool = l >= 0 - yyj137++ - if yyhl137 { - yyb137 = yyj137 > l - } else { - yyb137 = r.CheckBreak() - } - if yyb137 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj137++ - if yyhl137 { - yyb137 = yyj137 > l - } else { - yyb137 = r.CheckBreak() - } - if yyb137 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj137++ - if yyhl137 { - yyb137 = yyj137 > l - } else { - yyb137 = r.CheckBreak() - } - if yyb137 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv140 := &x.ListMeta - yym141 := z.DecBinary() - _ = yym141 - if false { - } else if z.HasExtensions() && z.DecExt(yyv140) { - } else { - z.DecFallback(yyv140, false) - } - } - yyj137++ - if yyhl137 { - yyb137 = yyj137 > l - } else { - yyb137 = r.CheckBreak() - } - if yyb137 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv142 := &x.Items - yym143 := z.DecBinary() - _ = yym143 - if false { - } else { - h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv142), d) - } - } - for { - yyj137++ - if yyhl137 { - yyb137 = yyj137 > l - } else { - yyb137 = r.CheckBreak() - } - if yyb137 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj137-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) encSliceCertificateSigningRequestCondition(v []CertificateSigningRequestCondition, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv144 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy145 := &yyv144 - yy145.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceCertificateSigningRequestCondition(v *[]CertificateSigningRequestCondition, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv146 := *v - yyh146, yyl146 := z.DecSliceHelperStart() - var yyc146 bool - if yyl146 == 0 { - if yyv146 == nil { - yyv146 = []CertificateSigningRequestCondition{} - yyc146 = true - } else if len(yyv146) != 0 { - yyv146 = yyv146[:0] - yyc146 = true - } - } else if yyl146 > 0 { - var yyrr146, yyrl146 int - var yyrt146 bool - if yyl146 > cap(yyv146) { - - yyrg146 := len(yyv146) > 0 - yyv2146 := yyv146 - yyrl146, yyrt146 = z.DecInferLen(yyl146, z.DecBasicHandle().MaxInitLen, 72) - if yyrt146 { - if yyrl146 <= cap(yyv146) { - yyv146 = yyv146[:yyrl146] - } else { - yyv146 = make([]CertificateSigningRequestCondition, yyrl146) - } - } else { - yyv146 = make([]CertificateSigningRequestCondition, yyrl146) - } - yyc146 = true - yyrr146 = len(yyv146) - if yyrg146 { - copy(yyv146, yyv2146) - } - } else if yyl146 != len(yyv146) { - yyv146 = yyv146[:yyl146] - yyc146 = true - } - yyj146 := 0 - for ; yyj146 < yyrr146; yyj146++ { - yyh146.ElemContainerState(yyj146) - if r.TryDecodeAsNil() { - yyv146[yyj146] = CertificateSigningRequestCondition{} - } else { - yyv147 := &yyv146[yyj146] - yyv147.CodecDecodeSelf(d) - } - - } - if yyrt146 { - for ; yyj146 < yyl146; yyj146++ { - yyv146 = append(yyv146, CertificateSigningRequestCondition{}) - yyh146.ElemContainerState(yyj146) - if r.TryDecodeAsNil() { - yyv146[yyj146] = CertificateSigningRequestCondition{} - } else { - yyv148 := &yyv146[yyj146] - yyv148.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj146 := 0 - for ; !r.CheckBreak(); yyj146++ { - - if yyj146 >= len(yyv146) { - yyv146 = append(yyv146, CertificateSigningRequestCondition{}) // var yyz146 CertificateSigningRequestCondition - yyc146 = true - } - yyh146.ElemContainerState(yyj146) - if yyj146 < len(yyv146) { - if r.TryDecodeAsNil() { - yyv146[yyj146] = CertificateSigningRequestCondition{} - } else { - yyv149 := &yyv146[yyj146] - yyv149.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj146 < len(yyv146) { - yyv146 = yyv146[:yyj146] - yyc146 = true - } else if yyj146 == 0 && yyv146 == nil { - yyv146 = []CertificateSigningRequestCondition{} - yyc146 = true - } - } - yyh146.End() - if yyc146 { - *v = yyv146 - } -} - -func (x codecSelfer1234) encSliceCertificateSigningRequest(v []CertificateSigningRequest, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv150 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy151 := &yyv150 - yy151.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceCertificateSigningRequest(v *[]CertificateSigningRequest, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv152 := *v - yyh152, yyl152 := z.DecSliceHelperStart() - var yyc152 bool - if yyl152 == 0 { - if yyv152 == nil { - yyv152 = []CertificateSigningRequest{} - yyc152 = true - } else if len(yyv152) != 0 { - yyv152 = yyv152[:0] - yyc152 = true - } - } else if yyl152 > 0 { - var yyrr152, yyrl152 int - var yyrt152 bool - if yyl152 > cap(yyv152) { - - yyrg152 := len(yyv152) > 0 - yyv2152 := yyv152 - yyrl152, yyrt152 = z.DecInferLen(yyl152, z.DecBasicHandle().MaxInitLen, 384) - if yyrt152 { - if yyrl152 <= cap(yyv152) { - yyv152 = yyv152[:yyrl152] - } else { - yyv152 = make([]CertificateSigningRequest, yyrl152) - } - } else { - yyv152 = make([]CertificateSigningRequest, yyrl152) - } - yyc152 = true - yyrr152 = len(yyv152) - if yyrg152 { - copy(yyv152, yyv2152) - } - } else if yyl152 != len(yyv152) { - yyv152 = yyv152[:yyl152] - yyc152 = true - } - yyj152 := 0 - for ; yyj152 < yyrr152; yyj152++ { - yyh152.ElemContainerState(yyj152) - if r.TryDecodeAsNil() { - yyv152[yyj152] = CertificateSigningRequest{} - } else { - yyv153 := &yyv152[yyj152] - yyv153.CodecDecodeSelf(d) - } - - } - if yyrt152 { - for ; yyj152 < yyl152; yyj152++ { - yyv152 = append(yyv152, CertificateSigningRequest{}) - yyh152.ElemContainerState(yyj152) - if r.TryDecodeAsNil() { - yyv152[yyj152] = CertificateSigningRequest{} - } else { - yyv154 := &yyv152[yyj152] - yyv154.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj152 := 0 - for ; !r.CheckBreak(); yyj152++ { - - if yyj152 >= len(yyv152) { - yyv152 = append(yyv152, CertificateSigningRequest{}) // var yyz152 CertificateSigningRequest - yyc152 = true - } - yyh152.ElemContainerState(yyj152) - if yyj152 < len(yyv152) { - if r.TryDecodeAsNil() { - yyv152[yyj152] = CertificateSigningRequest{} - } else { - yyv155 := &yyv152[yyj152] - yyv155.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj152 < len(yyv152) { - yyv152 = yyv152[:yyj152] - yyc152 = true - } else if yyj152 == 0 && yyv152 == nil { - yyv152 = []CertificateSigningRequest{} - yyc152 = true - } - } - yyh152.End() - if yyc152 { - *v = yyv152 - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/types.go b/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/types.go deleted file mode 100644 index 43105fbc6..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/types.go +++ /dev/null @@ -1,85 +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 certificates - -import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" -) - -// +genclient=true -// +nonNamespaced=true - -// Describes a certificate signing request -type CertificateSigningRequest struct { - unversioned.TypeMeta `json:",inline"` - api.ObjectMeta `json:"metadata,omitempty"` - - // The certificate request itself and any additional information. - Spec CertificateSigningRequestSpec `json:"spec,omitempty"` - - // Derived information about the request. - Status CertificateSigningRequestStatus `json:"status,omitempty"` -} - -// This information is immutable after the request is created. Only the Request -// and ExtraInfo fields can be set on creation, other fields are derived by -// Kubernetes and cannot be modified by users. -type CertificateSigningRequestSpec struct { - // Base64-encoded PKCS#10 CSR data - Request []byte `json:"request"` - - // Information about the requesting user (if relevant) - // See user.Info interface for details - Username string `json:"username,omitempty"` - UID string `json:"uid,omitempty"` - Groups []string `json:"groups,omitempty"` -} - -type CertificateSigningRequestStatus struct { - // Conditions applied to the request, such as approval or denial. - Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty"` - - // If request was approved, the controller will place the issued certificate here. - Certificate []byte `json:"certificate,omitempty"` -} - -type RequestConditionType string - -// These are the possible conditions for a certificate request. -const ( - CertificateApproved RequestConditionType = "Approved" - CertificateDenied RequestConditionType = "Denied" -) - -type CertificateSigningRequestCondition struct { - // request approval state, currently Approved or Denied. - Type RequestConditionType `json:"type"` - // brief reason for the request state - Reason string `json:"reason,omitempty"` - // human readable message with details about the request state - Message string `json:"message,omitempty"` - // timestamp for the last update to this condition - LastUpdateTime unversioned.Time `json:"lastUpdateTime,omitempty"` -} - -type CertificateSigningRequestList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` - - Items []CertificateSigningRequest `json:"items,omitempty"` -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/doc.go deleted file mode 100644 index 08eb64597..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/doc.go +++ /dev/null @@ -1,22 +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,register -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/certificates -// +k8s:openapi-gen=true - -// +groupName=certificates.k8s.io -package v1alpha1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/types.generated.go deleted file mode 100644 index 96527c188..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/types.generated.go +++ /dev/null @@ -1,1950 +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 v1alpha1 - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg2_v1 "k8s.io/client-go/1.5/pkg/api/v1" - pkg3_types "k8s.io/client-go/1.5/pkg/types" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg1_unversioned.TypeMeta - var v1 pkg2_v1.ObjectMeta - var v2 pkg3_types.UID - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 - } -} - -func (x *CertificateSigningRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [5]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = x.Kind != "" - yyq2[1] = x.APIVersion != "" - yyq2[2] = true - yyq2[3] = true - yyq2[4] = true - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(5) - } else { - yynn2 = 0 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[1] { - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy11 := &x.ObjectMeta - yy11.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[3] { - yy13 := &x.Spec - yy13.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy14 := &x.Spec - yy14.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { - yy16 := &x.Status - yy16.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy17 := &x.Status - yy17.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CertificateSigningRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym18 := z.DecBinary() - _ = yym18 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct19 := r.ContainerType() - if yyct19 == codecSelferValueTypeMap1234 { - yyl19 := r.ReadMapStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl19, d) - } - } else if yyct19 == codecSelferValueTypeArray1234 { - yyl19 := r.ReadArrayStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl19, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CertificateSigningRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys20Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys20Slc - var yyhl20 bool = l >= 0 - for yyj20 := 0; ; yyj20++ { - if yyhl20 { - if yyj20 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys20Slc = r.DecodeBytes(yys20Slc, true, true) - yys20 := string(yys20Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys20 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv23 := &x.ObjectMeta - yyv23.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = CertificateSigningRequestSpec{} - } else { - yyv24 := &x.Spec - yyv24.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = CertificateSigningRequestStatus{} - } else { - yyv25 := &x.Status - yyv25.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys20) - } // end switch yys20 - } // end for yyj20 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj26 int - var yyb26 bool - var yyhl26 bool = l >= 0 - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv29 := &x.ObjectMeta - yyv29.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = CertificateSigningRequestSpec{} - } else { - yyv30 := &x.Spec - yyv30.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = CertificateSigningRequestStatus{} - } else { - yyv31 := &x.Status - yyv31.CodecDecodeSelf(d) - } - for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj26-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *CertificateSigningRequestSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym32 := z.EncBinary() - _ = yym32 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep33 := !z.EncBinary() - yy2arr33 := z.EncBasicHandle().StructToArray - var yyq33 [4]bool - _, _, _ = yysep33, yyq33, yy2arr33 - const yyr33 bool = false - yyq33[1] = x.Username != "" - yyq33[2] = x.UID != "" - yyq33[3] = len(x.Groups) != 0 - var yynn33 int - if yyr33 || yy2arr33 { - r.EncodeArrayStart(4) - } else { - yynn33 = 1 - for _, b := range yyq33 { - if b { - yynn33++ - } - } - r.EncodeMapStart(yynn33) - yynn33 = 0 - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Request == nil { - r.EncodeNil() - } else { - yym35 := z.EncBinary() - _ = yym35 - if false { - } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Request)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("request")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Request == nil { - r.EncodeNil() - } else { - yym36 := z.EncBinary() - _ = yym36 - if false { - } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Request)) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[1] { - yym38 := z.EncBinary() - _ = yym38 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Username)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq33[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("username")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym39 := z.EncBinary() - _ = yym39 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Username)) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[2] { - yym41 := z.EncBinary() - _ = yym41 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.UID)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq33[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("uid")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym42 := z.EncBinary() - _ = yym42 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.UID)) - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[3] { - if x.Groups == nil { - r.EncodeNil() - } else { - yym44 := z.EncBinary() - _ = yym44 - if false { - } else { - z.F.EncSliceStringV(x.Groups, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq33[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("groups")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Groups == nil { - r.EncodeNil() - } else { - yym45 := z.EncBinary() - _ = yym45 - if false { - } else { - z.F.EncSliceStringV(x.Groups, false, e) - } - } - } - } - if yyr33 || yy2arr33 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CertificateSigningRequestSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym46 := z.DecBinary() - _ = yym46 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct47 := r.ContainerType() - if yyct47 == codecSelferValueTypeMap1234 { - yyl47 := r.ReadMapStart() - if yyl47 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl47, d) - } - } else if yyct47 == codecSelferValueTypeArray1234 { - yyl47 := r.ReadArrayStart() - if yyl47 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl47, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CertificateSigningRequestSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys48Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys48Slc - var yyhl48 bool = l >= 0 - for yyj48 := 0; ; yyj48++ { - if yyhl48 { - if yyj48 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys48Slc = r.DecodeBytes(yys48Slc, true, true) - yys48 := string(yys48Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys48 { - case "request": - if r.TryDecodeAsNil() { - x.Request = nil - } else { - yyv49 := &x.Request - yym50 := z.DecBinary() - _ = yym50 - if false { - } else { - *yyv49 = r.DecodeBytes(*(*[]byte)(yyv49), false, false) - } - } - case "username": - if r.TryDecodeAsNil() { - x.Username = "" - } else { - x.Username = string(r.DecodeString()) - } - case "uid": - if r.TryDecodeAsNil() { - x.UID = "" - } else { - x.UID = string(r.DecodeString()) - } - case "groups": - if r.TryDecodeAsNil() { - x.Groups = nil - } else { - yyv53 := &x.Groups - yym54 := z.DecBinary() - _ = yym54 - if false { - } else { - z.F.DecSliceStringX(yyv53, false, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys48) - } // end switch yys48 - } // end for yyj48 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CertificateSigningRequestSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj55 int - var yyb55 bool - var yyhl55 bool = l >= 0 - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l - } else { - yyb55 = r.CheckBreak() - } - if yyb55 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Request = nil - } else { - yyv56 := &x.Request - yym57 := z.DecBinary() - _ = yym57 - if false { - } else { - *yyv56 = r.DecodeBytes(*(*[]byte)(yyv56), false, false) - } - } - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l - } else { - yyb55 = r.CheckBreak() - } - if yyb55 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Username = "" - } else { - x.Username = string(r.DecodeString()) - } - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l - } else { - yyb55 = r.CheckBreak() - } - if yyb55 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.UID = "" - } else { - x.UID = string(r.DecodeString()) - } - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l - } else { - yyb55 = r.CheckBreak() - } - if yyb55 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Groups = nil - } else { - yyv60 := &x.Groups - yym61 := z.DecBinary() - _ = yym61 - if false { - } else { - z.F.DecSliceStringX(yyv60, false, d) - } - } - for { - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l - } else { - yyb55 = r.CheckBreak() - } - if yyb55 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj55-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *CertificateSigningRequestStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym62 := z.EncBinary() - _ = yym62 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep63 := !z.EncBinary() - yy2arr63 := z.EncBasicHandle().StructToArray - var yyq63 [2]bool - _, _, _ = yysep63, yyq63, yy2arr63 - const yyr63 bool = false - yyq63[0] = len(x.Conditions) != 0 - yyq63[1] = len(x.Certificate) != 0 - var yynn63 int - if yyr63 || yy2arr63 { - r.EncodeArrayStart(2) - } else { - yynn63 = 0 - for _, b := range yyq63 { - if b { - yynn63++ - } - } - r.EncodeMapStart(yynn63) - yynn63 = 0 - } - if yyr63 || yy2arr63 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq63[0] { - if x.Conditions == nil { - r.EncodeNil() - } else { - yym65 := z.EncBinary() - _ = yym65 - if false { - } else { - h.encSliceCertificateSigningRequestCondition(([]CertificateSigningRequestCondition)(x.Conditions), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq63[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("conditions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Conditions == nil { - r.EncodeNil() - } else { - yym66 := z.EncBinary() - _ = yym66 - if false { - } else { - h.encSliceCertificateSigningRequestCondition(([]CertificateSigningRequestCondition)(x.Conditions), e) - } - } - } - } - if yyr63 || yy2arr63 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq63[1] { - if x.Certificate == nil { - r.EncodeNil() - } else { - yym68 := z.EncBinary() - _ = yym68 - if false { - } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Certificate)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq63[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("certificate")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Certificate == nil { - r.EncodeNil() - } else { - yym69 := z.EncBinary() - _ = yym69 - if false { - } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Certificate)) - } - } - } - } - if yyr63 || yy2arr63 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CertificateSigningRequestStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym70 := z.DecBinary() - _ = yym70 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct71 := r.ContainerType() - if yyct71 == codecSelferValueTypeMap1234 { - yyl71 := r.ReadMapStart() - if yyl71 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl71, d) - } - } else if yyct71 == codecSelferValueTypeArray1234 { - yyl71 := r.ReadArrayStart() - if yyl71 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl71, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CertificateSigningRequestStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys72Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys72Slc - var yyhl72 bool = l >= 0 - for yyj72 := 0; ; yyj72++ { - if yyhl72 { - if yyj72 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys72Slc = r.DecodeBytes(yys72Slc, true, true) - yys72 := string(yys72Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys72 { - case "conditions": - if r.TryDecodeAsNil() { - x.Conditions = nil - } else { - yyv73 := &x.Conditions - yym74 := z.DecBinary() - _ = yym74 - if false { - } else { - h.decSliceCertificateSigningRequestCondition((*[]CertificateSigningRequestCondition)(yyv73), d) - } - } - case "certificate": - if r.TryDecodeAsNil() { - x.Certificate = nil - } else { - yyv75 := &x.Certificate - yym76 := z.DecBinary() - _ = yym76 - if false { - } else { - *yyv75 = r.DecodeBytes(*(*[]byte)(yyv75), false, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys72) - } // end switch yys72 - } // end for yyj72 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CertificateSigningRequestStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj77 int - var yyb77 bool - var yyhl77 bool = l >= 0 - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l - } else { - yyb77 = r.CheckBreak() - } - if yyb77 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Conditions = nil - } else { - yyv78 := &x.Conditions - yym79 := z.DecBinary() - _ = yym79 - if false { - } else { - h.decSliceCertificateSigningRequestCondition((*[]CertificateSigningRequestCondition)(yyv78), d) - } - } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l - } else { - yyb77 = r.CheckBreak() - } - if yyb77 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Certificate = nil - } else { - yyv80 := &x.Certificate - yym81 := z.DecBinary() - _ = yym81 - if false { - } else { - *yyv80 = r.DecodeBytes(*(*[]byte)(yyv80), false, false) - } - } - for { - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l - } else { - yyb77 = r.CheckBreak() - } - if yyb77 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj77-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x RequestConditionType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym82 := z.EncBinary() - _ = yym82 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *RequestConditionType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym83 := z.DecBinary() - _ = yym83 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *CertificateSigningRequestCondition) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym84 := z.EncBinary() - _ = yym84 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep85 := !z.EncBinary() - yy2arr85 := z.EncBasicHandle().StructToArray - var yyq85 [4]bool - _, _, _ = yysep85, yyq85, yy2arr85 - const yyr85 bool = false - yyq85[1] = x.Reason != "" - yyq85[2] = x.Message != "" - yyq85[3] = true - var yynn85 int - if yyr85 || yy2arr85 { - r.EncodeArrayStart(4) - } else { - yynn85 = 1 - for _, b := range yyq85 { - if b { - yynn85++ - } - } - r.EncodeMapStart(yynn85) - yynn85 = 0 - } - if yyr85 || yy2arr85 { - 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 yyr85 || yy2arr85 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq85[1] { - yym88 := z.EncBinary() - _ = yym88 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq85[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("reason")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym89 := z.EncBinary() - _ = yym89 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } - } - if yyr85 || yy2arr85 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq85[2] { - yym91 := z.EncBinary() - _ = yym91 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq85[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("message")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym92 := z.EncBinary() - _ = yym92 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } - } - if yyr85 || yy2arr85 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq85[3] { - yy94 := &x.LastUpdateTime - yym95 := z.EncBinary() - _ = yym95 - if false { - } else if z.HasExtensions() && z.EncExt(yy94) { - } else if yym95 { - z.EncBinaryMarshal(yy94) - } else if !yym95 && z.IsJSONHandle() { - z.EncJSONMarshal(yy94) - } else { - z.EncFallback(yy94) - } - } else { - r.EncodeNil() - } - } else { - if yyq85[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastUpdateTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy96 := &x.LastUpdateTime - yym97 := z.EncBinary() - _ = yym97 - if false { - } else if z.HasExtensions() && z.EncExt(yy96) { - } else if yym97 { - z.EncBinaryMarshal(yy96) - } else if !yym97 && z.IsJSONHandle() { - z.EncJSONMarshal(yy96) - } else { - z.EncFallback(yy96) - } - } - } - if yyr85 || yy2arr85 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CertificateSigningRequestCondition) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym98 := z.DecBinary() - _ = yym98 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct99 := r.ContainerType() - if yyct99 == codecSelferValueTypeMap1234 { - yyl99 := r.ReadMapStart() - if yyl99 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl99, d) - } - } else if yyct99 == codecSelferValueTypeArray1234 { - yyl99 := r.ReadArrayStart() - if yyl99 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl99, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CertificateSigningRequestCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys100Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys100Slc - var yyhl100 bool = l >= 0 - for yyj100 := 0; ; yyj100++ { - if yyhl100 { - if yyj100 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys100Slc = r.DecodeBytes(yys100Slc, true, true) - yys100 := string(yys100Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys100 { - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = RequestConditionType(r.DecodeString()) - } - case "reason": - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - case "message": - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - case "lastUpdateTime": - if r.TryDecodeAsNil() { - x.LastUpdateTime = pkg1_unversioned.Time{} - } else { - yyv104 := &x.LastUpdateTime - yym105 := z.DecBinary() - _ = yym105 - if false { - } else if z.HasExtensions() && z.DecExt(yyv104) { - } else if yym105 { - z.DecBinaryUnmarshal(yyv104) - } else if !yym105 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv104) - } else { - z.DecFallback(yyv104, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys100) - } // end switch yys100 - } // end for yyj100 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CertificateSigningRequestCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj106 int - var yyb106 bool - var yyhl106 bool = l >= 0 - yyj106++ - if yyhl106 { - yyb106 = yyj106 > l - } else { - yyb106 = r.CheckBreak() - } - if yyb106 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = RequestConditionType(r.DecodeString()) - } - yyj106++ - if yyhl106 { - yyb106 = yyj106 > l - } else { - yyb106 = r.CheckBreak() - } - if yyb106 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - yyj106++ - if yyhl106 { - yyb106 = yyj106 > l - } else { - yyb106 = r.CheckBreak() - } - if yyb106 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - yyj106++ - if yyhl106 { - yyb106 = yyj106 > l - } else { - yyb106 = r.CheckBreak() - } - if yyb106 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastUpdateTime = pkg1_unversioned.Time{} - } else { - yyv110 := &x.LastUpdateTime - yym111 := z.DecBinary() - _ = yym111 - if false { - } else if z.HasExtensions() && z.DecExt(yyv110) { - } else if yym111 { - z.DecBinaryUnmarshal(yyv110) - } else if !yym111 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv110) - } else { - z.DecFallback(yyv110, false) - } - } - for { - yyj106++ - if yyhl106 { - yyb106 = yyj106 > l - } else { - yyb106 = r.CheckBreak() - } - if yyb106 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj106-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *CertificateSigningRequestList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym112 := z.EncBinary() - _ = yym112 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep113 := !z.EncBinary() - yy2arr113 := z.EncBasicHandle().StructToArray - var yyq113 [4]bool - _, _, _ = yysep113, yyq113, yy2arr113 - const yyr113 bool = false - yyq113[0] = x.Kind != "" - yyq113[1] = x.APIVersion != "" - yyq113[2] = true - var yynn113 int - if yyr113 || yy2arr113 { - r.EncodeArrayStart(4) - } else { - yynn113 = 1 - for _, b := range yyq113 { - if b { - yynn113++ - } - } - r.EncodeMapStart(yynn113) - yynn113 = 0 - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[0] { - yym115 := z.EncBinary() - _ = yym115 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq113[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym116 := z.EncBinary() - _ = yym116 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[1] { - yym118 := z.EncBinary() - _ = yym118 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq113[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym119 := z.EncBinary() - _ = yym119 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[2] { - yy121 := &x.ListMeta - yym122 := z.EncBinary() - _ = yym122 - if false { - } else if z.HasExtensions() && z.EncExt(yy121) { - } else { - z.EncFallback(yy121) - } - } else { - r.EncodeNil() - } - } else { - if yyq113[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy123 := &x.ListMeta - yym124 := z.EncBinary() - _ = yym124 - if false { - } else if z.HasExtensions() && z.EncExt(yy123) { - } else { - z.EncFallback(yy123) - } - } - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym126 := z.EncBinary() - _ = yym126 - if false { - } else { - h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym127 := z.EncBinary() - _ = yym127 - if false { - } else { - h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e) - } - } - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CertificateSigningRequestList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym128 := z.DecBinary() - _ = yym128 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct129 := r.ContainerType() - if yyct129 == codecSelferValueTypeMap1234 { - yyl129 := r.ReadMapStart() - if yyl129 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl129, d) - } - } else if yyct129 == codecSelferValueTypeArray1234 { - yyl129 := r.ReadArrayStart() - if yyl129 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl129, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CertificateSigningRequestList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys130Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys130Slc - var yyhl130 bool = l >= 0 - for yyj130 := 0; ; yyj130++ { - if yyhl130 { - if yyj130 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys130Slc = r.DecodeBytes(yys130Slc, true, true) - yys130 := string(yys130Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys130 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv133 := &x.ListMeta - yym134 := z.DecBinary() - _ = yym134 - if false { - } else if z.HasExtensions() && z.DecExt(yyv133) { - } else { - z.DecFallback(yyv133, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv135 := &x.Items - yym136 := z.DecBinary() - _ = yym136 - if false { - } else { - h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv135), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys130) - } // end switch yys130 - } // end for yyj130 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CertificateSigningRequestList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj137 int - var yyb137 bool - var yyhl137 bool = l >= 0 - yyj137++ - if yyhl137 { - yyb137 = yyj137 > l - } else { - yyb137 = r.CheckBreak() - } - if yyb137 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj137++ - if yyhl137 { - yyb137 = yyj137 > l - } else { - yyb137 = r.CheckBreak() - } - if yyb137 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj137++ - if yyhl137 { - yyb137 = yyj137 > l - } else { - yyb137 = r.CheckBreak() - } - if yyb137 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv140 := &x.ListMeta - yym141 := z.DecBinary() - _ = yym141 - if false { - } else if z.HasExtensions() && z.DecExt(yyv140) { - } else { - z.DecFallback(yyv140, false) - } - } - yyj137++ - if yyhl137 { - yyb137 = yyj137 > l - } else { - yyb137 = r.CheckBreak() - } - if yyb137 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv142 := &x.Items - yym143 := z.DecBinary() - _ = yym143 - if false { - } else { - h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv142), d) - } - } - for { - yyj137++ - if yyhl137 { - yyb137 = yyj137 > l - } else { - yyb137 = r.CheckBreak() - } - if yyb137 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj137-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) encSliceCertificateSigningRequestCondition(v []CertificateSigningRequestCondition, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv144 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy145 := &yyv144 - yy145.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceCertificateSigningRequestCondition(v *[]CertificateSigningRequestCondition, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv146 := *v - yyh146, yyl146 := z.DecSliceHelperStart() - var yyc146 bool - if yyl146 == 0 { - if yyv146 == nil { - yyv146 = []CertificateSigningRequestCondition{} - yyc146 = true - } else if len(yyv146) != 0 { - yyv146 = yyv146[:0] - yyc146 = true - } - } else if yyl146 > 0 { - var yyrr146, yyrl146 int - var yyrt146 bool - if yyl146 > cap(yyv146) { - - yyrg146 := len(yyv146) > 0 - yyv2146 := yyv146 - yyrl146, yyrt146 = z.DecInferLen(yyl146, z.DecBasicHandle().MaxInitLen, 72) - if yyrt146 { - if yyrl146 <= cap(yyv146) { - yyv146 = yyv146[:yyrl146] - } else { - yyv146 = make([]CertificateSigningRequestCondition, yyrl146) - } - } else { - yyv146 = make([]CertificateSigningRequestCondition, yyrl146) - } - yyc146 = true - yyrr146 = len(yyv146) - if yyrg146 { - copy(yyv146, yyv2146) - } - } else if yyl146 != len(yyv146) { - yyv146 = yyv146[:yyl146] - yyc146 = true - } - yyj146 := 0 - for ; yyj146 < yyrr146; yyj146++ { - yyh146.ElemContainerState(yyj146) - if r.TryDecodeAsNil() { - yyv146[yyj146] = CertificateSigningRequestCondition{} - } else { - yyv147 := &yyv146[yyj146] - yyv147.CodecDecodeSelf(d) - } - - } - if yyrt146 { - for ; yyj146 < yyl146; yyj146++ { - yyv146 = append(yyv146, CertificateSigningRequestCondition{}) - yyh146.ElemContainerState(yyj146) - if r.TryDecodeAsNil() { - yyv146[yyj146] = CertificateSigningRequestCondition{} - } else { - yyv148 := &yyv146[yyj146] - yyv148.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj146 := 0 - for ; !r.CheckBreak(); yyj146++ { - - if yyj146 >= len(yyv146) { - yyv146 = append(yyv146, CertificateSigningRequestCondition{}) // var yyz146 CertificateSigningRequestCondition - yyc146 = true - } - yyh146.ElemContainerState(yyj146) - if yyj146 < len(yyv146) { - if r.TryDecodeAsNil() { - yyv146[yyj146] = CertificateSigningRequestCondition{} - } else { - yyv149 := &yyv146[yyj146] - yyv149.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj146 < len(yyv146) { - yyv146 = yyv146[:yyj146] - yyc146 = true - } else if yyj146 == 0 && yyv146 == nil { - yyv146 = []CertificateSigningRequestCondition{} - yyc146 = true - } - } - yyh146.End() - if yyc146 { - *v = yyv146 - } -} - -func (x codecSelfer1234) encSliceCertificateSigningRequest(v []CertificateSigningRequest, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv150 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy151 := &yyv150 - yy151.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceCertificateSigningRequest(v *[]CertificateSigningRequest, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv152 := *v - yyh152, yyl152 := z.DecSliceHelperStart() - var yyc152 bool - if yyl152 == 0 { - if yyv152 == nil { - yyv152 = []CertificateSigningRequest{} - yyc152 = true - } else if len(yyv152) != 0 { - yyv152 = yyv152[:0] - yyc152 = true - } - } else if yyl152 > 0 { - var yyrr152, yyrl152 int - var yyrt152 bool - if yyl152 > cap(yyv152) { - - yyrg152 := len(yyv152) > 0 - yyv2152 := yyv152 - yyrl152, yyrt152 = z.DecInferLen(yyl152, z.DecBasicHandle().MaxInitLen, 384) - if yyrt152 { - if yyrl152 <= cap(yyv152) { - yyv152 = yyv152[:yyrl152] - } else { - yyv152 = make([]CertificateSigningRequest, yyrl152) - } - } else { - yyv152 = make([]CertificateSigningRequest, yyrl152) - } - yyc152 = true - yyrr152 = len(yyv152) - if yyrg152 { - copy(yyv152, yyv2152) - } - } else if yyl152 != len(yyv152) { - yyv152 = yyv152[:yyl152] - yyc152 = true - } - yyj152 := 0 - for ; yyj152 < yyrr152; yyj152++ { - yyh152.ElemContainerState(yyj152) - if r.TryDecodeAsNil() { - yyv152[yyj152] = CertificateSigningRequest{} - } else { - yyv153 := &yyv152[yyj152] - yyv153.CodecDecodeSelf(d) - } - - } - if yyrt152 { - for ; yyj152 < yyl152; yyj152++ { - yyv152 = append(yyv152, CertificateSigningRequest{}) - yyh152.ElemContainerState(yyj152) - if r.TryDecodeAsNil() { - yyv152[yyj152] = CertificateSigningRequest{} - } else { - yyv154 := &yyv152[yyj152] - yyv154.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj152 := 0 - for ; !r.CheckBreak(); yyj152++ { - - if yyj152 >= len(yyv152) { - yyv152 = append(yyv152, CertificateSigningRequest{}) // var yyz152 CertificateSigningRequest - yyc152 = true - } - yyh152.ElemContainerState(yyj152) - if yyj152 < len(yyv152) { - if r.TryDecodeAsNil() { - yyv152[yyj152] = CertificateSigningRequest{} - } else { - yyv155 := &yyv152[yyj152] - yyv155.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj152 < len(yyv152) { - yyv152 = yyv152[:yyj152] - yyc152 = true - } else if yyj152 == 0 && yyv152 == nil { - yyv152 = []CertificateSigningRequest{} - yyc152 = true - } - } - yyh152.End() - if yyc152 { - *v = yyv152 - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/types.go b/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/types.go deleted file mode 100644 index b1d2b1844..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/types.go +++ /dev/null @@ -1,85 +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 v1alpha1 - -import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" -) - -// +genclient=true -// +nonNamespaced=true - -// Describes a certificate signing request -type CertificateSigningRequest struct { - unversioned.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // The certificate request itself and any additional information. - Spec CertificateSigningRequestSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Derived information about the request. - Status CertificateSigningRequestStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// This information is immutable after the request is created. Only the Request -// and ExtraInfo fields can be set on creation, other fields are derived by -// Kubernetes and cannot be modified by users. -type CertificateSigningRequestSpec struct { - // Base64-encoded PKCS#10 CSR data - Request []byte `json:"request" protobuf:"bytes,1,opt,name=request"` - - // Information about the requesting user (if relevant) - // See user.Info interface for details - Username string `json:"username,omitempty" protobuf:"bytes,2,opt,name=username"` - UID string `json:"uid,omitempty" protobuf:"bytes,3,opt,name=uid"` - Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"` -} - -type CertificateSigningRequestStatus struct { - // Conditions applied to the request, such as approval or denial. - Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"` - - // If request was approved, the controller will place the issued certificate here. - Certificate []byte `json:"certificate,omitempty" protobuf:"bytes,2,opt,name=certificate"` -} - -type RequestConditionType string - -// These are the possible conditions for a certificate request. -const ( - CertificateApproved RequestConditionType = "Approved" - CertificateDenied RequestConditionType = "Denied" -) - -type CertificateSigningRequestCondition struct { - // request approval state, currently Approved or Denied. - Type RequestConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RequestConditionType"` - // brief reason for the request state - Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"` - // human readable message with details about the request state - Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` - // timestamp for the last update to this condition - LastUpdateTime unversioned.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,4,opt,name=lastUpdateTime"` -} - -type CertificateSigningRequestList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - Items []CertificateSigningRequest `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index 75b3e55cd..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,241 +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 v1alpha1 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - certificates "k8s.io/client-go/1.5/pkg/apis/certificates" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" -) - -func init() { - SchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest, - Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest, - Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition, - Convert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition, - Convert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList, - Convert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList, - Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec, - Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec, - Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus, - Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus, - ) -} - -func autoConvert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in, out, s) -} - -func autoConvert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { - out.Type = certificates.RequestConditionType(in.Type) - out.Reason = in.Reason - out.Message = in.Message - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastUpdateTime, &out.LastUpdateTime, s); err != nil { - return err - } - return nil -} - -func Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error { - out.Type = RequestConditionType(in.Type) - out.Reason = in.Reason - out.Message = in.Message - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastUpdateTime, &out.LastUpdateTime, s); err != nil { - return err - } - return nil -} - -func Convert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in, out, s) -} - -func autoConvert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]certificates.CertificateSigningRequest, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CertificateSigningRequest, len(*in)) - for i := range *in { - if err := Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in, out, s) -} - -func autoConvert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { - if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Request, &out.Request, s); err != nil { - return err - } - out.Username = in.Username - out.UID = in.UID - out.Groups = in.Groups - return nil -} - -func Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error { - if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Request, &out.Request, s); err != nil { - return err - } - out.Username = in.Username - out.UID = in.UID - out.Groups = in.Groups - return nil -} - -func Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]certificates.CertificateSigningRequestCondition, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Certificate, &out.Certificate, s); err != nil { - return err - } - return nil -} - -func Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]CertificateSigningRequestCondition, len(*in)) - for i := range *in { - if err := Convert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Certificate, &out.Certificate, s); err != nil { - return err - } - return nil -} - -func Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in, out, s) -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 3f6b90991..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,145 +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 v1alpha1 - -import ( - v1 "k8s.io/client-go/1.5/pkg/api/v1" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" - reflect "reflect" -) - -func init() { - SchemeBuilder.Register(RegisterDeepCopies) -} - -// RegisterDeepCopies adds deep-copy functions to the given scheme. Public -// to allow building arbitrary schemes. -func RegisterDeepCopies(scheme *runtime.Scheme) error { - return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequest, InType: reflect.TypeOf(&CertificateSigningRequest{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestCondition, InType: reflect.TypeOf(&CertificateSigningRequestCondition{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestList, InType: reflect.TypeOf(&CertificateSigningRequestList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestSpec, InType: reflect.TypeOf(&CertificateSigningRequestSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestStatus, InType: reflect.TypeOf(&CertificateSigningRequestStatus{})}, - ) -} - -func DeepCopy_v1alpha1_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*CertificateSigningRequest) - out := out.(*CertificateSigningRequest) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - if err := DeepCopy_v1alpha1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - if err := DeepCopy_v1alpha1_CertificateSigningRequestStatus(&in.Status, &out.Status, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_v1alpha1_CertificateSigningRequestCondition(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*CertificateSigningRequestCondition) - out := out.(*CertificateSigningRequestCondition) - out.Type = in.Type - out.Reason = in.Reason - out.Message = in.Message - out.LastUpdateTime = in.LastUpdateTime.DeepCopy() - return nil - } -} - -func DeepCopy_v1alpha1_CertificateSigningRequestList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*CertificateSigningRequestList) - out := out.(*CertificateSigningRequestList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CertificateSigningRequest, len(*in)) - for i := range *in { - if err := DeepCopy_v1alpha1_CertificateSigningRequest(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil - } -} - -func DeepCopy_v1alpha1_CertificateSigningRequestSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*CertificateSigningRequestSpec) - out := out.(*CertificateSigningRequestSpec) - if in.Request != nil { - in, out := &in.Request, &out.Request - *out = make([]byte, len(*in)) - copy(*out, *in) - } else { - out.Request = nil - } - out.Username = in.Username - out.UID = in.UID - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]string, len(*in)) - copy(*out, *in) - } else { - out.Groups = nil - } - return nil - } -} - -func DeepCopy_v1alpha1_CertificateSigningRequestStatus(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*CertificateSigningRequestStatus) - out := out.(*CertificateSigningRequestStatus) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]CertificateSigningRequestCondition, len(*in)) - for i := range *in { - if err := DeepCopy_v1alpha1_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - if in.Certificate != nil { - in, out := &in.Certificate, &out.Certificate - *out = make([]byte, len(*in)) - copy(*out, *in) - } else { - out.Certificate = nil - } - return nil - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/doc.go deleted file mode 100644 index 6b51a43e8..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/doc.go +++ /dev/null @@ -1,20 +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,register -// +k8s:openapi-gen=true - -package extensions diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/doc.go deleted file mode 100644 index a9520c2c2..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/doc.go +++ /dev/null @@ -1,23 +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,register -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/extensions -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch -// +k8s:openapi-gen=true - -package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/types.generated.go deleted file mode 100644 index 05642626e..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/types.generated.go +++ /dev/null @@ -1,23937 +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 v1beta1 - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - pkg4_resource "k8s.io/client-go/1.5/pkg/api/resource" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg2_v1 "k8s.io/client-go/1.5/pkg/api/v1" - pkg3_types "k8s.io/client-go/1.5/pkg/types" - pkg5_intstr "k8s.io/client-go/1.5/pkg/util/intstr" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg4_resource.Quantity - var v1 pkg1_unversioned.TypeMeta - var v2 pkg2_v1.ObjectMeta - var v3 pkg3_types.UID - var v4 pkg5_intstr.IntOrString - var v5 time.Time - _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 - } -} - -func (x *ScaleSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [1]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = x.Replicas != 0 - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(1) - } else { - yynn2 = 0 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScaleSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym6 := z.DecBinary() - _ = yym6 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct7 := r.ContainerType() - if yyct7 == codecSelferValueTypeMap1234 { - yyl7 := r.ReadMapStart() - if yyl7 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl7, d) - } - } else if yyct7 == codecSelferValueTypeArray1234 { - yyl7 := r.ReadArrayStart() - if yyl7 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl7, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScaleSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys8Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys8Slc - var yyhl8 bool = l >= 0 - for yyj8 := 0; ; yyj8++ { - if yyhl8 { - if yyj8 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys8Slc = r.DecodeBytes(yys8Slc, true, true) - yys8 := string(yys8Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys8 { - case "replicas": - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - default: - z.DecStructFieldNotFound(-1, yys8) - } // end switch yys8 - } // end for yyj8 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScaleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = 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 *ScaleStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym12 := z.EncBinary() - _ = yym12 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep13 := !z.EncBinary() - yy2arr13 := z.EncBasicHandle().StructToArray - var yyq13 [3]bool - _, _, _ = yysep13, yyq13, yy2arr13 - const yyr13 bool = false - yyq13[1] = len(x.Selector) != 0 - yyq13[2] = x.TargetSelector != "" - var yynn13 int - if yyr13 || yy2arr13 { - r.EncodeArrayStart(3) - } else { - yynn13 = 1 - for _, b := range yyq13 { - if b { - yynn13++ - } - } - r.EncodeMapStart(yynn13) - yynn13 = 0 - } - if yyr13 || yy2arr13 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym15 := z.EncBinary() - _ = yym15 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym16 := z.EncBinary() - _ = yym16 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } - if yyr13 || yy2arr13 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq13[1] { - if x.Selector == nil { - r.EncodeNil() - } else { - yym18 := z.EncBinary() - _ = yym18 - if false { - } else { - z.F.EncMapStringStringV(x.Selector, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq13[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Selector == nil { - r.EncodeNil() - } else { - yym19 := z.EncBinary() - _ = yym19 - if false { - } else { - z.F.EncMapStringStringV(x.Selector, false, e) - } - } - } - } - if yyr13 || yy2arr13 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq13[2] { - yym21 := z.EncBinary() - _ = yym21 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.TargetSelector)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq13[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("targetSelector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym22 := z.EncBinary() - _ = yym22 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.TargetSelector)) - } - } - } - if yyr13 || yy2arr13 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScaleStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym23 := z.DecBinary() - _ = yym23 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct24 := r.ContainerType() - if yyct24 == codecSelferValueTypeMap1234 { - yyl24 := r.ReadMapStart() - if yyl24 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl24, d) - } - } else if yyct24 == codecSelferValueTypeArray1234 { - yyl24 := r.ReadArrayStart() - if yyl24 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl24, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScaleStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys25Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys25Slc - var yyhl25 bool = l >= 0 - for yyj25 := 0; ; yyj25++ { - if yyhl25 { - if yyj25 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys25Slc = r.DecodeBytes(yys25Slc, true, true) - yys25 := string(yys25Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys25 { - case "replicas": - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - case "selector": - if r.TryDecodeAsNil() { - x.Selector = nil - } else { - yyv27 := &x.Selector - yym28 := z.DecBinary() - _ = yym28 - if false { - } else { - z.F.DecMapStringStringX(yyv27, false, d) - } - } - case "targetSelector": - if r.TryDecodeAsNil() { - x.TargetSelector = "" - } else { - x.TargetSelector = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys25) - } // end switch yys25 - } // end for yyj25 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScaleStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj30 int - var yyb30 bool - var yyhl30 bool = l >= 0 - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Selector = nil - } else { - yyv32 := &x.Selector - yym33 := z.DecBinary() - _ = yym33 - if false { - } else { - z.F.DecMapStringStringX(yyv32, false, d) - } - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.TargetSelector = "" - } else { - x.TargetSelector = string(r.DecodeString()) - } - for { - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj30-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym35 := z.EncBinary() - _ = yym35 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep36 := !z.EncBinary() - yy2arr36 := z.EncBasicHandle().StructToArray - var yyq36 [5]bool - _, _, _ = yysep36, yyq36, yy2arr36 - const yyr36 bool = false - yyq36[0] = x.Kind != "" - yyq36[1] = x.APIVersion != "" - yyq36[2] = true - yyq36[3] = true - yyq36[4] = true - var yynn36 int - if yyr36 || yy2arr36 { - r.EncodeArrayStart(5) - } else { - yynn36 = 0 - for _, b := range yyq36 { - if b { - yynn36++ - } - } - r.EncodeMapStart(yynn36) - yynn36 = 0 - } - if yyr36 || yy2arr36 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq36[0] { - yym38 := z.EncBinary() - _ = yym38 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq36[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym39 := z.EncBinary() - _ = yym39 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr36 || yy2arr36 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq36[1] { - yym41 := z.EncBinary() - _ = yym41 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq36[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym42 := z.EncBinary() - _ = yym42 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr36 || yy2arr36 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq36[2] { - yy44 := &x.ObjectMeta - yy44.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq36[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy45 := &x.ObjectMeta - yy45.CodecEncodeSelf(e) - } - } - if yyr36 || yy2arr36 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq36[3] { - yy47 := &x.Spec - yy47.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq36[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy48 := &x.Spec - yy48.CodecEncodeSelf(e) - } - } - if yyr36 || yy2arr36 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq36[4] { - yy50 := &x.Status - yy50.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq36[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy51 := &x.Status - yy51.CodecEncodeSelf(e) - } - } - if yyr36 || yy2arr36 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Scale) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym52 := z.DecBinary() - _ = yym52 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct53 := r.ContainerType() - if yyct53 == codecSelferValueTypeMap1234 { - yyl53 := r.ReadMapStart() - if yyl53 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl53, d) - } - } else if yyct53 == codecSelferValueTypeArray1234 { - yyl53 := r.ReadArrayStart() - if yyl53 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl53, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys54Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys54Slc - var yyhl54 bool = l >= 0 - for yyj54 := 0; ; yyj54++ { - if yyhl54 { - if yyj54 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys54Slc = r.DecodeBytes(yys54Slc, true, true) - yys54 := string(yys54Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys54 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv57 := &x.ObjectMeta - yyv57.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = ScaleSpec{} - } else { - yyv58 := &x.Spec - yyv58.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = ScaleStatus{} - } else { - yyv59 := &x.Status - yyv59.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys54) - } // end switch yys54 - } // end for yyj54 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj60 int - var yyb60 bool - var yyhl60 bool = l >= 0 - yyj60++ - if yyhl60 { - yyb60 = yyj60 > l - } else { - yyb60 = r.CheckBreak() - } - if yyb60 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj60++ - if yyhl60 { - yyb60 = yyj60 > l - } else { - yyb60 = r.CheckBreak() - } - if yyb60 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj60++ - if yyhl60 { - yyb60 = yyj60 > l - } else { - yyb60 = r.CheckBreak() - } - if yyb60 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv63 := &x.ObjectMeta - yyv63.CodecDecodeSelf(d) - } - yyj60++ - if yyhl60 { - yyb60 = yyj60 > l - } else { - yyb60 = r.CheckBreak() - } - if yyb60 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = ScaleSpec{} - } else { - yyv64 := &x.Spec - yyv64.CodecDecodeSelf(d) - } - yyj60++ - if yyhl60 { - yyb60 = yyj60 > l - } else { - yyb60 = r.CheckBreak() - } - if yyb60 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = ScaleStatus{} - } else { - yyv65 := &x.Status - yyv65.CodecDecodeSelf(d) - } - for { - yyj60++ - if yyhl60 { - yyb60 = yyj60 > l - } else { - yyb60 = r.CheckBreak() - } - if yyb60 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj60-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ReplicationControllerDummy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym66 := z.EncBinary() - _ = yym66 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep67 := !z.EncBinary() - yy2arr67 := z.EncBasicHandle().StructToArray - var yyq67 [2]bool - _, _, _ = yysep67, yyq67, yy2arr67 - const yyr67 bool = false - yyq67[0] = x.Kind != "" - yyq67[1] = x.APIVersion != "" - var yynn67 int - if yyr67 || yy2arr67 { - r.EncodeArrayStart(2) - } else { - yynn67 = 0 - for _, b := range yyq67 { - if b { - yynn67++ - } - } - r.EncodeMapStart(yynn67) - yynn67 = 0 - } - if yyr67 || yy2arr67 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq67[0] { - yym69 := z.EncBinary() - _ = yym69 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq67[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym70 := z.EncBinary() - _ = yym70 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr67 || yy2arr67 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq67[1] { - yym72 := z.EncBinary() - _ = yym72 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq67[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym73 := z.EncBinary() - _ = yym73 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr67 || yy2arr67 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ReplicationControllerDummy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym74 := z.DecBinary() - _ = yym74 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct75 := r.ContainerType() - if yyct75 == codecSelferValueTypeMap1234 { - yyl75 := r.ReadMapStart() - if yyl75 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl75, d) - } - } else if yyct75 == codecSelferValueTypeArray1234 { - yyl75 := r.ReadArrayStart() - if yyl75 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl75, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ReplicationControllerDummy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys76Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys76Slc - var yyhl76 bool = l >= 0 - for yyj76 := 0; ; yyj76++ { - if yyhl76 { - if yyj76 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys76Slc = r.DecodeBytes(yys76Slc, true, true) - yys76 := string(yys76Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys76 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys76) - } // end switch yys76 - } // end for yyj76 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ReplicationControllerDummy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj79 int - var yyb79 bool - var yyhl79 bool = l >= 0 - yyj79++ - if yyhl79 { - yyb79 = yyj79 > l - } else { - yyb79 = r.CheckBreak() - } - if yyb79 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj79++ - if yyhl79 { - yyb79 = yyj79 > l - } else { - yyb79 = r.CheckBreak() - } - if yyb79 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - for { - yyj79++ - if yyhl79 { - yyb79 = yyj79 > l - } else { - yyb79 = r.CheckBreak() - } - if yyb79 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj79-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *SubresourceReference) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym82 := z.EncBinary() - _ = yym82 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep83 := !z.EncBinary() - yy2arr83 := z.EncBasicHandle().StructToArray - var yyq83 [4]bool - _, _, _ = yysep83, yyq83, yy2arr83 - const yyr83 bool = false - yyq83[0] = x.Kind != "" - yyq83[1] = x.Name != "" - yyq83[2] = x.APIVersion != "" - yyq83[3] = x.Subresource != "" - var yynn83 int - if yyr83 || yy2arr83 { - r.EncodeArrayStart(4) - } else { - yynn83 = 0 - for _, b := range yyq83 { - if b { - yynn83++ - } - } - r.EncodeMapStart(yynn83) - yynn83 = 0 - } - if yyr83 || yy2arr83 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq83[0] { - yym85 := z.EncBinary() - _ = yym85 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq83[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym86 := z.EncBinary() - _ = yym86 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr83 || yy2arr83 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq83[1] { - yym88 := z.EncBinary() - _ = yym88 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq83[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("name")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym89 := z.EncBinary() - _ = yym89 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } - } - if yyr83 || yy2arr83 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq83[2] { - yym91 := z.EncBinary() - _ = yym91 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq83[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym92 := z.EncBinary() - _ = yym92 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr83 || yy2arr83 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq83[3] { - yym94 := z.EncBinary() - _ = yym94 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Subresource)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq83[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("subresource")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym95 := z.EncBinary() - _ = yym95 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Subresource)) - } - } - } - if yyr83 || yy2arr83 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *SubresourceReference) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym96 := z.DecBinary() - _ = yym96 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct97 := r.ContainerType() - if yyct97 == codecSelferValueTypeMap1234 { - yyl97 := r.ReadMapStart() - if yyl97 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl97, d) - } - } else if yyct97 == codecSelferValueTypeArray1234 { - yyl97 := r.ReadArrayStart() - if yyl97 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl97, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *SubresourceReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys98Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys98Slc - var yyhl98 bool = l >= 0 - for yyj98 := 0; ; yyj98++ { - if yyhl98 { - if yyj98 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys98Slc = r.DecodeBytes(yys98Slc, true, true) - yys98 := string(yys98Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys98 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "subresource": - if r.TryDecodeAsNil() { - x.Subresource = "" - } else { - x.Subresource = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys98) - } // end switch yys98 - } // end for yyj98 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *SubresourceReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj103 int - var yyb103 bool - var yyhl103 bool = l >= 0 - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Subresource = "" - } else { - x.Subresource = string(r.DecodeString()) - } - for { - yyj103++ - if yyhl103 { - yyb103 = yyj103 > l - } else { - yyb103 = r.CheckBreak() - } - if yyb103 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj103-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *CPUTargetUtilization) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym108 := z.EncBinary() - _ = yym108 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep109 := !z.EncBinary() - yy2arr109 := z.EncBasicHandle().StructToArray - var yyq109 [1]bool - _, _, _ = yysep109, yyq109, yy2arr109 - const yyr109 bool = false - var yynn109 int - if yyr109 || yy2arr109 { - r.EncodeArrayStart(1) - } else { - yynn109 = 1 - for _, b := range yyq109 { - if b { - yynn109++ - } - } - r.EncodeMapStart(yynn109) - yynn109 = 0 - } - if yyr109 || yy2arr109 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym111 := z.EncBinary() - _ = yym111 - if false { - } else { - r.EncodeInt(int64(x.TargetPercentage)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("targetPercentage")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym112 := z.EncBinary() - _ = yym112 - if false { - } else { - r.EncodeInt(int64(x.TargetPercentage)) - } - } - if yyr109 || yy2arr109 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CPUTargetUtilization) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym113 := z.DecBinary() - _ = yym113 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct114 := r.ContainerType() - if yyct114 == codecSelferValueTypeMap1234 { - yyl114 := r.ReadMapStart() - if yyl114 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl114, d) - } - } else if yyct114 == codecSelferValueTypeArray1234 { - yyl114 := r.ReadArrayStart() - if yyl114 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl114, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CPUTargetUtilization) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys115Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys115Slc - var yyhl115 bool = l >= 0 - for yyj115 := 0; ; yyj115++ { - if yyhl115 { - if yyj115 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys115Slc = r.DecodeBytes(yys115Slc, true, true) - yys115 := string(yys115Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys115 { - case "targetPercentage": - if r.TryDecodeAsNil() { - x.TargetPercentage = 0 - } else { - x.TargetPercentage = int32(r.DecodeInt(32)) - } - default: - z.DecStructFieldNotFound(-1, yys115) - } // end switch yys115 - } // end for yyj115 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CPUTargetUtilization) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj117 int - var yyb117 bool - var yyhl117 bool = l >= 0 - yyj117++ - if yyhl117 { - yyb117 = yyj117 > l - } else { - yyb117 = r.CheckBreak() - } - if yyb117 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.TargetPercentage = 0 - } else { - x.TargetPercentage = int32(r.DecodeInt(32)) - } - for { - yyj117++ - if yyhl117 { - yyb117 = yyj117 > l - } else { - yyb117 = r.CheckBreak() - } - if yyb117 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj117-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *CustomMetricTarget) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym119 := z.EncBinary() - _ = yym119 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep120 := !z.EncBinary() - yy2arr120 := z.EncBasicHandle().StructToArray - var yyq120 [2]bool - _, _, _ = yysep120, yyq120, yy2arr120 - const yyr120 bool = false - var yynn120 int - if yyr120 || yy2arr120 { - r.EncodeArrayStart(2) - } else { - yynn120 = 2 - for _, b := range yyq120 { - if b { - yynn120++ - } - } - r.EncodeMapStart(yynn120) - yynn120 = 0 - } - if yyr120 || yy2arr120 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym122 := z.EncBinary() - _ = yym122 - 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) - yym123 := z.EncBinary() - _ = yym123 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } - if yyr120 || yy2arr120 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy125 := &x.TargetValue - yym126 := z.EncBinary() - _ = yym126 - if false { - } else if z.HasExtensions() && z.EncExt(yy125) { - } else if !yym126 && z.IsJSONHandle() { - z.EncJSONMarshal(yy125) - } else { - z.EncFallback(yy125) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("value")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy127 := &x.TargetValue - yym128 := z.EncBinary() - _ = yym128 - if false { - } else if z.HasExtensions() && z.EncExt(yy127) { - } else if !yym128 && z.IsJSONHandle() { - z.EncJSONMarshal(yy127) - } else { - z.EncFallback(yy127) - } - } - if yyr120 || yy2arr120 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CustomMetricTarget) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym129 := z.DecBinary() - _ = yym129 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct130 := r.ContainerType() - if yyct130 == codecSelferValueTypeMap1234 { - yyl130 := r.ReadMapStart() - if yyl130 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl130, d) - } - } else if yyct130 == codecSelferValueTypeArray1234 { - yyl130 := r.ReadArrayStart() - if yyl130 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl130, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CustomMetricTarget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys131Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys131Slc - var yyhl131 bool = l >= 0 - for yyj131 := 0; ; yyj131++ { - if yyhl131 { - if yyj131 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys131Slc = r.DecodeBytes(yys131Slc, true, true) - yys131 := string(yys131Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys131 { - case "name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - case "value": - if r.TryDecodeAsNil() { - x.TargetValue = pkg4_resource.Quantity{} - } else { - yyv133 := &x.TargetValue - yym134 := z.DecBinary() - _ = yym134 - if false { - } else if z.HasExtensions() && z.DecExt(yyv133) { - } else if !yym134 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv133) - } else { - z.DecFallback(yyv133, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys131) - } // end switch yys131 - } // end for yyj131 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CustomMetricTarget) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj135 int - var yyb135 bool - var yyhl135 bool = l >= 0 - yyj135++ - if yyhl135 { - yyb135 = yyj135 > l - } else { - yyb135 = r.CheckBreak() - } - if yyb135 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - yyj135++ - if yyhl135 { - yyb135 = yyj135 > l - } else { - yyb135 = r.CheckBreak() - } - if yyb135 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.TargetValue = pkg4_resource.Quantity{} - } else { - yyv137 := &x.TargetValue - yym138 := z.DecBinary() - _ = yym138 - if false { - } else if z.HasExtensions() && z.DecExt(yyv137) { - } else if !yym138 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv137) - } else { - z.DecFallback(yyv137, false) - } - } - for { - yyj135++ - if yyhl135 { - yyb135 = yyj135 > l - } else { - yyb135 = r.CheckBreak() - } - if yyb135 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj135-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *CustomMetricTargetList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym139 := z.EncBinary() - _ = yym139 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep140 := !z.EncBinary() - yy2arr140 := z.EncBasicHandle().StructToArray - var yyq140 [1]bool - _, _, _ = yysep140, yyq140, yy2arr140 - const yyr140 bool = false - var yynn140 int - if yyr140 || yy2arr140 { - r.EncodeArrayStart(1) - } else { - yynn140 = 1 - for _, b := range yyq140 { - if b { - yynn140++ - } - } - r.EncodeMapStart(yynn140) - yynn140 = 0 - } - if yyr140 || yy2arr140 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym142 := z.EncBinary() - _ = yym142 - if false { - } else { - h.encSliceCustomMetricTarget(([]CustomMetricTarget)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym143 := z.EncBinary() - _ = yym143 - if false { - } else { - h.encSliceCustomMetricTarget(([]CustomMetricTarget)(x.Items), e) - } - } - } - if yyr140 || yy2arr140 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CustomMetricTargetList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym144 := z.DecBinary() - _ = yym144 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct145 := r.ContainerType() - if yyct145 == codecSelferValueTypeMap1234 { - yyl145 := r.ReadMapStart() - if yyl145 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl145, d) - } - } else if yyct145 == codecSelferValueTypeArray1234 { - yyl145 := r.ReadArrayStart() - if yyl145 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl145, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CustomMetricTargetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys146Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys146Slc - var yyhl146 bool = l >= 0 - for yyj146 := 0; ; yyj146++ { - if yyhl146 { - if yyj146 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys146Slc = r.DecodeBytes(yys146Slc, true, true) - yys146 := string(yys146Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys146 { - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv147 := &x.Items - yym148 := z.DecBinary() - _ = yym148 - if false { - } else { - h.decSliceCustomMetricTarget((*[]CustomMetricTarget)(yyv147), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys146) - } // end switch yys146 - } // end for yyj146 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CustomMetricTargetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj149 int - var yyb149 bool - var yyhl149 bool = l >= 0 - yyj149++ - if yyhl149 { - yyb149 = yyj149 > l - } else { - yyb149 = r.CheckBreak() - } - if yyb149 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv150 := &x.Items - yym151 := z.DecBinary() - _ = yym151 - if false { - } else { - h.decSliceCustomMetricTarget((*[]CustomMetricTarget)(yyv150), d) - } - } - for { - yyj149++ - if yyhl149 { - yyb149 = yyj149 > l - } else { - yyb149 = r.CheckBreak() - } - if yyb149 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj149-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *CustomMetricCurrentStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym152 := z.EncBinary() - _ = yym152 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep153 := !z.EncBinary() - yy2arr153 := z.EncBasicHandle().StructToArray - var yyq153 [2]bool - _, _, _ = yysep153, yyq153, yy2arr153 - const yyr153 bool = false - var yynn153 int - if yyr153 || yy2arr153 { - r.EncodeArrayStart(2) - } else { - yynn153 = 2 - for _, b := range yyq153 { - if b { - yynn153++ - } - } - r.EncodeMapStart(yynn153) - yynn153 = 0 - } - if yyr153 || yy2arr153 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym155 := z.EncBinary() - _ = yym155 - 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) - yym156 := z.EncBinary() - _ = yym156 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } - if yyr153 || yy2arr153 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy158 := &x.CurrentValue - yym159 := z.EncBinary() - _ = yym159 - if false { - } else if z.HasExtensions() && z.EncExt(yy158) { - } else if !yym159 && z.IsJSONHandle() { - z.EncJSONMarshal(yy158) - } else { - z.EncFallback(yy158) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("value")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy160 := &x.CurrentValue - yym161 := z.EncBinary() - _ = yym161 - if false { - } else if z.HasExtensions() && z.EncExt(yy160) { - } else if !yym161 && z.IsJSONHandle() { - z.EncJSONMarshal(yy160) - } else { - z.EncFallback(yy160) - } - } - if yyr153 || yy2arr153 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CustomMetricCurrentStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym162 := z.DecBinary() - _ = yym162 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct163 := r.ContainerType() - if yyct163 == codecSelferValueTypeMap1234 { - yyl163 := r.ReadMapStart() - if yyl163 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl163, d) - } - } else if yyct163 == codecSelferValueTypeArray1234 { - yyl163 := r.ReadArrayStart() - if yyl163 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl163, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CustomMetricCurrentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys164Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys164Slc - var yyhl164 bool = l >= 0 - for yyj164 := 0; ; yyj164++ { - if yyhl164 { - if yyj164 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys164Slc = r.DecodeBytes(yys164Slc, true, true) - yys164 := string(yys164Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys164 { - case "name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - case "value": - if r.TryDecodeAsNil() { - x.CurrentValue = pkg4_resource.Quantity{} - } else { - yyv166 := &x.CurrentValue - yym167 := z.DecBinary() - _ = yym167 - if false { - } else if z.HasExtensions() && z.DecExt(yyv166) { - } else if !yym167 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv166) - } else { - z.DecFallback(yyv166, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys164) - } // end switch yys164 - } // end for yyj164 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CustomMetricCurrentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj168 int - var yyb168 bool - var yyhl168 bool = l >= 0 - yyj168++ - if yyhl168 { - yyb168 = yyj168 > l - } else { - yyb168 = r.CheckBreak() - } - if yyb168 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - yyj168++ - if yyhl168 { - yyb168 = yyj168 > l - } else { - yyb168 = r.CheckBreak() - } - if yyb168 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CurrentValue = pkg4_resource.Quantity{} - } else { - yyv170 := &x.CurrentValue - yym171 := z.DecBinary() - _ = yym171 - if false { - } else if z.HasExtensions() && z.DecExt(yyv170) { - } else if !yym171 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv170) - } else { - z.DecFallback(yyv170, false) - } - } - for { - yyj168++ - if yyhl168 { - yyb168 = yyj168 > l - } else { - yyb168 = r.CheckBreak() - } - if yyb168 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj168-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *CustomMetricCurrentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym172 := z.EncBinary() - _ = yym172 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep173 := !z.EncBinary() - yy2arr173 := z.EncBasicHandle().StructToArray - var yyq173 [1]bool - _, _, _ = yysep173, yyq173, yy2arr173 - const yyr173 bool = false - var yynn173 int - if yyr173 || yy2arr173 { - r.EncodeArrayStart(1) - } else { - yynn173 = 1 - for _, b := range yyq173 { - if b { - yynn173++ - } - } - r.EncodeMapStart(yynn173) - yynn173 = 0 - } - if yyr173 || yy2arr173 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym175 := z.EncBinary() - _ = yym175 - if false { - } else { - h.encSliceCustomMetricCurrentStatus(([]CustomMetricCurrentStatus)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym176 := z.EncBinary() - _ = yym176 - if false { - } else { - h.encSliceCustomMetricCurrentStatus(([]CustomMetricCurrentStatus)(x.Items), e) - } - } - } - if yyr173 || yy2arr173 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *CustomMetricCurrentStatusList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym177 := z.DecBinary() - _ = yym177 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct178 := r.ContainerType() - if yyct178 == codecSelferValueTypeMap1234 { - yyl178 := r.ReadMapStart() - if yyl178 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl178, d) - } - } else if yyct178 == codecSelferValueTypeArray1234 { - yyl178 := r.ReadArrayStart() - if yyl178 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl178, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *CustomMetricCurrentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys179Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys179Slc - var yyhl179 bool = l >= 0 - for yyj179 := 0; ; yyj179++ { - if yyhl179 { - if yyj179 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys179Slc = r.DecodeBytes(yys179Slc, true, true) - yys179 := string(yys179Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys179 { - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv180 := &x.Items - yym181 := z.DecBinary() - _ = yym181 - if false { - } else { - h.decSliceCustomMetricCurrentStatus((*[]CustomMetricCurrentStatus)(yyv180), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys179) - } // end switch yys179 - } // end for yyj179 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *CustomMetricCurrentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj182 int - var yyb182 bool - var yyhl182 bool = l >= 0 - yyj182++ - if yyhl182 { - yyb182 = yyj182 > l - } else { - yyb182 = r.CheckBreak() - } - if yyb182 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv183 := &x.Items - yym184 := z.DecBinary() - _ = yym184 - if false { - } else { - h.decSliceCustomMetricCurrentStatus((*[]CustomMetricCurrentStatus)(yyv183), d) - } - } - for { - yyj182++ - if yyhl182 { - yyb182 = yyj182 > l - } else { - yyb182 = r.CheckBreak() - } - if yyb182 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj182-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *HorizontalPodAutoscalerSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym185 := z.EncBinary() - _ = yym185 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep186 := !z.EncBinary() - yy2arr186 := z.EncBasicHandle().StructToArray - var yyq186 [4]bool - _, _, _ = yysep186, yyq186, yy2arr186 - const yyr186 bool = false - yyq186[1] = x.MinReplicas != nil - yyq186[3] = x.CPUUtilization != nil - var yynn186 int - if yyr186 || yy2arr186 { - r.EncodeArrayStart(4) - } else { - yynn186 = 2 - for _, b := range yyq186 { - if b { - yynn186++ - } - } - r.EncodeMapStart(yynn186) - yynn186 = 0 - } - if yyr186 || yy2arr186 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy188 := &x.ScaleRef - yy188.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("scaleRef")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy189 := &x.ScaleRef - yy189.CodecEncodeSelf(e) - } - if yyr186 || yy2arr186 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq186[1] { - if x.MinReplicas == nil { - r.EncodeNil() - } else { - yy191 := *x.MinReplicas - yym192 := z.EncBinary() - _ = yym192 - if false { - } else { - r.EncodeInt(int64(yy191)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq186[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("minReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.MinReplicas == nil { - r.EncodeNil() - } else { - yy193 := *x.MinReplicas - yym194 := z.EncBinary() - _ = yym194 - if false { - } else { - r.EncodeInt(int64(yy193)) - } - } - } - } - if yyr186 || yy2arr186 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym196 := z.EncBinary() - _ = yym196 - if false { - } else { - r.EncodeInt(int64(x.MaxReplicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("maxReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym197 := z.EncBinary() - _ = yym197 - if false { - } else { - r.EncodeInt(int64(x.MaxReplicas)) - } - } - if yyr186 || yy2arr186 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq186[3] { - if x.CPUUtilization == nil { - r.EncodeNil() - } else { - x.CPUUtilization.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq186[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("cpuUtilization")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.CPUUtilization == nil { - r.EncodeNil() - } else { - x.CPUUtilization.CodecEncodeSelf(e) - } - } - } - if yyr186 || yy2arr186 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HorizontalPodAutoscalerSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym199 := z.DecBinary() - _ = yym199 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct200 := r.ContainerType() - if yyct200 == codecSelferValueTypeMap1234 { - yyl200 := r.ReadMapStart() - if yyl200 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl200, d) - } - } else if yyct200 == codecSelferValueTypeArray1234 { - yyl200 := r.ReadArrayStart() - if yyl200 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl200, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys201Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys201Slc - var yyhl201 bool = l >= 0 - for yyj201 := 0; ; yyj201++ { - if yyhl201 { - if yyj201 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys201Slc = r.DecodeBytes(yys201Slc, true, true) - yys201 := string(yys201Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys201 { - case "scaleRef": - if r.TryDecodeAsNil() { - x.ScaleRef = SubresourceReference{} - } else { - yyv202 := &x.ScaleRef - yyv202.CodecDecodeSelf(d) - } - case "minReplicas": - if r.TryDecodeAsNil() { - if x.MinReplicas != nil { - x.MinReplicas = nil - } - } else { - if x.MinReplicas == nil { - x.MinReplicas = new(int32) - } - yym204 := z.DecBinary() - _ = yym204 - if false { - } else { - *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32)) - } - } - case "maxReplicas": - if r.TryDecodeAsNil() { - x.MaxReplicas = 0 - } else { - x.MaxReplicas = int32(r.DecodeInt(32)) - } - case "cpuUtilization": - if r.TryDecodeAsNil() { - if x.CPUUtilization != nil { - x.CPUUtilization = nil - } - } else { - if x.CPUUtilization == nil { - x.CPUUtilization = new(CPUTargetUtilization) - } - x.CPUUtilization.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys201) - } // end switch yys201 - } // end for yyj201 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj207 int - var yyb207 bool - var yyhl207 bool = l >= 0 - yyj207++ - if yyhl207 { - yyb207 = yyj207 > l - } else { - yyb207 = r.CheckBreak() - } - if yyb207 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ScaleRef = SubresourceReference{} - } else { - yyv208 := &x.ScaleRef - yyv208.CodecDecodeSelf(d) - } - yyj207++ - if yyhl207 { - yyb207 = yyj207 > l - } else { - yyb207 = r.CheckBreak() - } - if yyb207 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.MinReplicas != nil { - x.MinReplicas = nil - } - } else { - if x.MinReplicas == nil { - x.MinReplicas = new(int32) - } - yym210 := z.DecBinary() - _ = yym210 - if false { - } else { - *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32)) - } - } - yyj207++ - if yyhl207 { - yyb207 = yyj207 > l - } else { - yyb207 = r.CheckBreak() - } - if yyb207 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MaxReplicas = 0 - } else { - x.MaxReplicas = int32(r.DecodeInt(32)) - } - yyj207++ - if yyhl207 { - yyb207 = yyj207 > l - } else { - yyb207 = r.CheckBreak() - } - if yyb207 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.CPUUtilization != nil { - x.CPUUtilization = nil - } - } else { - if x.CPUUtilization == nil { - x.CPUUtilization = new(CPUTargetUtilization) - } - x.CPUUtilization.CodecDecodeSelf(d) - } - for { - yyj207++ - if yyhl207 { - yyb207 = yyj207 > l - } else { - yyb207 = r.CheckBreak() - } - if yyb207 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj207-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *HorizontalPodAutoscalerStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym213 := z.EncBinary() - _ = yym213 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep214 := !z.EncBinary() - yy2arr214 := z.EncBasicHandle().StructToArray - var yyq214 [5]bool - _, _, _ = yysep214, yyq214, yy2arr214 - const yyr214 bool = false - yyq214[0] = x.ObservedGeneration != nil - yyq214[1] = x.LastScaleTime != nil - yyq214[4] = x.CurrentCPUUtilizationPercentage != nil - var yynn214 int - if yyr214 || yy2arr214 { - r.EncodeArrayStart(5) - } else { - yynn214 = 2 - for _, b := range yyq214 { - if b { - yynn214++ - } - } - r.EncodeMapStart(yynn214) - yynn214 = 0 - } - if yyr214 || yy2arr214 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq214[0] { - if x.ObservedGeneration == nil { - r.EncodeNil() - } else { - yy216 := *x.ObservedGeneration - yym217 := z.EncBinary() - _ = yym217 - if false { - } else { - r.EncodeInt(int64(yy216)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq214[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ObservedGeneration == nil { - r.EncodeNil() - } else { - yy218 := *x.ObservedGeneration - yym219 := z.EncBinary() - _ = yym219 - if false { - } else { - r.EncodeInt(int64(yy218)) - } - } - } - } - if yyr214 || yy2arr214 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq214[1] { - if x.LastScaleTime == nil { - r.EncodeNil() - } else { - yym221 := z.EncBinary() - _ = yym221 - if false { - } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) { - } else if yym221 { - z.EncBinaryMarshal(x.LastScaleTime) - } else if !yym221 && z.IsJSONHandle() { - z.EncJSONMarshal(x.LastScaleTime) - } else { - z.EncFallback(x.LastScaleTime) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq214[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastScaleTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.LastScaleTime == nil { - r.EncodeNil() - } else { - yym222 := z.EncBinary() - _ = yym222 - if false { - } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) { - } else if yym222 { - z.EncBinaryMarshal(x.LastScaleTime) - } else if !yym222 && z.IsJSONHandle() { - z.EncJSONMarshal(x.LastScaleTime) - } else { - z.EncFallback(x.LastScaleTime) - } - } - } - } - if yyr214 || yy2arr214 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym224 := z.EncBinary() - _ = yym224 - if false { - } else { - r.EncodeInt(int64(x.CurrentReplicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("currentReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym225 := z.EncBinary() - _ = yym225 - if false { - } else { - r.EncodeInt(int64(x.CurrentReplicas)) - } - } - if yyr214 || yy2arr214 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym227 := z.EncBinary() - _ = yym227 - if false { - } else { - r.EncodeInt(int64(x.DesiredReplicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("desiredReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym228 := z.EncBinary() - _ = yym228 - if false { - } else { - r.EncodeInt(int64(x.DesiredReplicas)) - } - } - if yyr214 || yy2arr214 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq214[4] { - if x.CurrentCPUUtilizationPercentage == nil { - r.EncodeNil() - } else { - yy230 := *x.CurrentCPUUtilizationPercentage - yym231 := z.EncBinary() - _ = yym231 - if false { - } else { - r.EncodeInt(int64(yy230)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq214[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("currentCPUUtilizationPercentage")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.CurrentCPUUtilizationPercentage == nil { - r.EncodeNil() - } else { - yy232 := *x.CurrentCPUUtilizationPercentage - yym233 := z.EncBinary() - _ = yym233 - if false { - } else { - r.EncodeInt(int64(yy232)) - } - } - } - } - if yyr214 || yy2arr214 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HorizontalPodAutoscalerStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym234 := z.DecBinary() - _ = yym234 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct235 := r.ContainerType() - if yyct235 == codecSelferValueTypeMap1234 { - yyl235 := r.ReadMapStart() - if yyl235 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl235, d) - } - } else if yyct235 == codecSelferValueTypeArray1234 { - yyl235 := r.ReadArrayStart() - if yyl235 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl235, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys236Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys236Slc - var yyhl236 bool = l >= 0 - for yyj236 := 0; ; yyj236++ { - if yyhl236 { - if yyj236 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys236Slc = r.DecodeBytes(yys236Slc, true, true) - yys236 := string(yys236Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys236 { - case "observedGeneration": - if r.TryDecodeAsNil() { - if x.ObservedGeneration != nil { - x.ObservedGeneration = nil - } - } else { - if x.ObservedGeneration == nil { - x.ObservedGeneration = new(int64) - } - yym238 := z.DecBinary() - _ = yym238 - if false { - } else { - *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) - } - } - case "lastScaleTime": - if r.TryDecodeAsNil() { - if x.LastScaleTime != nil { - x.LastScaleTime = nil - } - } else { - if x.LastScaleTime == nil { - x.LastScaleTime = new(pkg1_unversioned.Time) - } - yym240 := z.DecBinary() - _ = yym240 - if false { - } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) { - } else if yym240 { - z.DecBinaryUnmarshal(x.LastScaleTime) - } else if !yym240 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.LastScaleTime) - } else { - z.DecFallback(x.LastScaleTime, false) - } - } - case "currentReplicas": - if r.TryDecodeAsNil() { - x.CurrentReplicas = 0 - } else { - x.CurrentReplicas = int32(r.DecodeInt(32)) - } - case "desiredReplicas": - if r.TryDecodeAsNil() { - x.DesiredReplicas = 0 - } else { - x.DesiredReplicas = int32(r.DecodeInt(32)) - } - case "currentCPUUtilizationPercentage": - if r.TryDecodeAsNil() { - if x.CurrentCPUUtilizationPercentage != nil { - x.CurrentCPUUtilizationPercentage = nil - } - } else { - if x.CurrentCPUUtilizationPercentage == nil { - x.CurrentCPUUtilizationPercentage = new(int32) - } - yym244 := z.DecBinary() - _ = yym244 - if false { - } else { - *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32)) - } - } - default: - z.DecStructFieldNotFound(-1, yys236) - } // end switch yys236 - } // end for yyj236 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj245 int - var yyb245 bool - var yyhl245 bool = l >= 0 - yyj245++ - if yyhl245 { - yyb245 = yyj245 > l - } else { - yyb245 = r.CheckBreak() - } - if yyb245 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.ObservedGeneration != nil { - x.ObservedGeneration = nil - } - } else { - if x.ObservedGeneration == nil { - x.ObservedGeneration = new(int64) - } - yym247 := z.DecBinary() - _ = yym247 - if false { - } else { - *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) - } - } - yyj245++ - if yyhl245 { - yyb245 = yyj245 > l - } else { - yyb245 = r.CheckBreak() - } - if yyb245 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.LastScaleTime != nil { - x.LastScaleTime = nil - } - } else { - if x.LastScaleTime == nil { - x.LastScaleTime = new(pkg1_unversioned.Time) - } - yym249 := z.DecBinary() - _ = yym249 - if false { - } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) { - } else if yym249 { - z.DecBinaryUnmarshal(x.LastScaleTime) - } else if !yym249 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.LastScaleTime) - } else { - z.DecFallback(x.LastScaleTime, false) - } - } - yyj245++ - if yyhl245 { - yyb245 = yyj245 > l - } else { - yyb245 = r.CheckBreak() - } - if yyb245 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CurrentReplicas = 0 - } else { - x.CurrentReplicas = int32(r.DecodeInt(32)) - } - yyj245++ - if yyhl245 { - yyb245 = yyj245 > l - } else { - yyb245 = r.CheckBreak() - } - if yyb245 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.DesiredReplicas = 0 - } else { - x.DesiredReplicas = int32(r.DecodeInt(32)) - } - yyj245++ - if yyhl245 { - yyb245 = yyj245 > l - } else { - yyb245 = r.CheckBreak() - } - if yyb245 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.CurrentCPUUtilizationPercentage != nil { - x.CurrentCPUUtilizationPercentage = nil - } - } else { - if x.CurrentCPUUtilizationPercentage == nil { - x.CurrentCPUUtilizationPercentage = new(int32) - } - yym253 := z.DecBinary() - _ = yym253 - if false { - } else { - *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32)) - } - } - for { - yyj245++ - if yyhl245 { - yyb245 = yyj245 > l - } else { - yyb245 = r.CheckBreak() - } - if yyb245 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj245-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym254 := z.EncBinary() - _ = yym254 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep255 := !z.EncBinary() - yy2arr255 := z.EncBasicHandle().StructToArray - var yyq255 [5]bool - _, _, _ = yysep255, yyq255, yy2arr255 - const yyr255 bool = false - yyq255[0] = x.Kind != "" - yyq255[1] = x.APIVersion != "" - yyq255[2] = true - yyq255[3] = true - yyq255[4] = true - var yynn255 int - if yyr255 || yy2arr255 { - r.EncodeArrayStart(5) - } else { - yynn255 = 0 - for _, b := range yyq255 { - if b { - yynn255++ - } - } - r.EncodeMapStart(yynn255) - yynn255 = 0 - } - if yyr255 || yy2arr255 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq255[0] { - yym257 := z.EncBinary() - _ = yym257 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq255[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym258 := z.EncBinary() - _ = yym258 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr255 || yy2arr255 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq255[1] { - yym260 := z.EncBinary() - _ = yym260 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq255[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym261 := z.EncBinary() - _ = yym261 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr255 || yy2arr255 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq255[2] { - yy263 := &x.ObjectMeta - yy263.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq255[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy264 := &x.ObjectMeta - yy264.CodecEncodeSelf(e) - } - } - if yyr255 || yy2arr255 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq255[3] { - yy266 := &x.Spec - yy266.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq255[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy267 := &x.Spec - yy267.CodecEncodeSelf(e) - } - } - if yyr255 || yy2arr255 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq255[4] { - yy269 := &x.Status - yy269.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq255[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy270 := &x.Status - yy270.CodecEncodeSelf(e) - } - } - if yyr255 || yy2arr255 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HorizontalPodAutoscaler) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym271 := z.DecBinary() - _ = yym271 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct272 := r.ContainerType() - if yyct272 == codecSelferValueTypeMap1234 { - yyl272 := r.ReadMapStart() - if yyl272 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl272, d) - } - } else if yyct272 == codecSelferValueTypeArray1234 { - yyl272 := r.ReadArrayStart() - if yyl272 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl272, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys273Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys273Slc - var yyhl273 bool = l >= 0 - for yyj273 := 0; ; yyj273++ { - if yyhl273 { - if yyj273 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys273Slc = r.DecodeBytes(yys273Slc, true, true) - yys273 := string(yys273Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys273 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv276 := &x.ObjectMeta - yyv276.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = HorizontalPodAutoscalerSpec{} - } else { - yyv277 := &x.Spec - yyv277.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = HorizontalPodAutoscalerStatus{} - } else { - yyv278 := &x.Status - yyv278.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys273) - } // end switch yys273 - } // end for yyj273 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj279 int - var yyb279 bool - var yyhl279 bool = l >= 0 - yyj279++ - if yyhl279 { - yyb279 = yyj279 > l - } else { - yyb279 = r.CheckBreak() - } - if yyb279 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj279++ - if yyhl279 { - yyb279 = yyj279 > l - } else { - yyb279 = r.CheckBreak() - } - if yyb279 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj279++ - if yyhl279 { - yyb279 = yyj279 > l - } else { - yyb279 = r.CheckBreak() - } - if yyb279 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv282 := &x.ObjectMeta - yyv282.CodecDecodeSelf(d) - } - yyj279++ - if yyhl279 { - yyb279 = yyj279 > l - } else { - yyb279 = r.CheckBreak() - } - if yyb279 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = HorizontalPodAutoscalerSpec{} - } else { - yyv283 := &x.Spec - yyv283.CodecDecodeSelf(d) - } - yyj279++ - if yyhl279 { - yyb279 = yyj279 > l - } else { - yyb279 = r.CheckBreak() - } - if yyb279 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = HorizontalPodAutoscalerStatus{} - } else { - yyv284 := &x.Status - yyv284.CodecDecodeSelf(d) - } - for { - yyj279++ - if yyhl279 { - yyb279 = yyj279 > l - } else { - yyb279 = r.CheckBreak() - } - if yyb279 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj279-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *HorizontalPodAutoscalerList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym285 := z.EncBinary() - _ = yym285 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep286 := !z.EncBinary() - yy2arr286 := z.EncBasicHandle().StructToArray - var yyq286 [4]bool - _, _, _ = yysep286, yyq286, yy2arr286 - const yyr286 bool = false - yyq286[0] = x.Kind != "" - yyq286[1] = x.APIVersion != "" - yyq286[2] = true - var yynn286 int - if yyr286 || yy2arr286 { - r.EncodeArrayStart(4) - } else { - yynn286 = 1 - for _, b := range yyq286 { - if b { - yynn286++ - } - } - r.EncodeMapStart(yynn286) - yynn286 = 0 - } - if yyr286 || yy2arr286 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq286[0] { - yym288 := z.EncBinary() - _ = yym288 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq286[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym289 := z.EncBinary() - _ = yym289 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr286 || yy2arr286 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq286[1] { - yym291 := z.EncBinary() - _ = yym291 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq286[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym292 := z.EncBinary() - _ = yym292 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr286 || yy2arr286 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq286[2] { - yy294 := &x.ListMeta - yym295 := z.EncBinary() - _ = yym295 - if false { - } else if z.HasExtensions() && z.EncExt(yy294) { - } else { - z.EncFallback(yy294) - } - } else { - r.EncodeNil() - } - } else { - if yyq286[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy296 := &x.ListMeta - yym297 := z.EncBinary() - _ = yym297 - if false { - } else if z.HasExtensions() && z.EncExt(yy296) { - } else { - z.EncFallback(yy296) - } - } - } - if yyr286 || yy2arr286 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym299 := z.EncBinary() - _ = yym299 - if false { - } else { - h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym300 := z.EncBinary() - _ = yym300 - if false { - } else { - h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e) - } - } - } - if yyr286 || yy2arr286 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HorizontalPodAutoscalerList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym301 := z.DecBinary() - _ = yym301 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct302 := r.ContainerType() - if yyct302 == codecSelferValueTypeMap1234 { - yyl302 := r.ReadMapStart() - if yyl302 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl302, d) - } - } else if yyct302 == codecSelferValueTypeArray1234 { - yyl302 := r.ReadArrayStart() - if yyl302 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl302, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys303Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys303Slc - var yyhl303 bool = l >= 0 - for yyj303 := 0; ; yyj303++ { - if yyhl303 { - if yyj303 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys303Slc = r.DecodeBytes(yys303Slc, true, true) - yys303 := string(yys303Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys303 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv306 := &x.ListMeta - yym307 := z.DecBinary() - _ = yym307 - if false { - } else if z.HasExtensions() && z.DecExt(yyv306) { - } else { - z.DecFallback(yyv306, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv308 := &x.Items - yym309 := z.DecBinary() - _ = yym309 - if false { - } else { - h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv308), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys303) - } // end switch yys303 - } // end for yyj303 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj310 int - var yyb310 bool - var yyhl310 bool = l >= 0 - yyj310++ - if yyhl310 { - yyb310 = yyj310 > l - } else { - yyb310 = r.CheckBreak() - } - if yyb310 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj310++ - if yyhl310 { - yyb310 = yyj310 > l - } else { - yyb310 = r.CheckBreak() - } - if yyb310 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj310++ - if yyhl310 { - yyb310 = yyj310 > l - } else { - yyb310 = r.CheckBreak() - } - if yyb310 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv313 := &x.ListMeta - yym314 := z.DecBinary() - _ = yym314 - if false { - } else if z.HasExtensions() && z.DecExt(yyv313) { - } else { - z.DecFallback(yyv313, false) - } - } - yyj310++ - if yyhl310 { - yyb310 = yyj310 > l - } else { - yyb310 = r.CheckBreak() - } - if yyb310 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv315 := &x.Items - yym316 := z.DecBinary() - _ = yym316 - if false { - } else { - h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv315), d) - } - } - for { - yyj310++ - if yyhl310 { - yyb310 = yyj310 > l - } else { - yyb310 = r.CheckBreak() - } - if yyb310 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj310-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym317 := z.EncBinary() - _ = yym317 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep318 := !z.EncBinary() - yy2arr318 := z.EncBasicHandle().StructToArray - var yyq318 [5]bool - _, _, _ = yysep318, yyq318, yy2arr318 - const yyr318 bool = false - yyq318[0] = x.Kind != "" - yyq318[1] = x.APIVersion != "" - yyq318[2] = true - yyq318[3] = x.Description != "" - yyq318[4] = len(x.Versions) != 0 - var yynn318 int - if yyr318 || yy2arr318 { - r.EncodeArrayStart(5) - } else { - yynn318 = 0 - for _, b := range yyq318 { - if b { - yynn318++ - } - } - r.EncodeMapStart(yynn318) - yynn318 = 0 - } - if yyr318 || yy2arr318 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq318[0] { - yym320 := z.EncBinary() - _ = yym320 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq318[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym321 := z.EncBinary() - _ = yym321 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr318 || yy2arr318 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq318[1] { - yym323 := z.EncBinary() - _ = yym323 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq318[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym324 := z.EncBinary() - _ = yym324 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr318 || yy2arr318 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq318[2] { - yy326 := &x.ObjectMeta - yy326.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq318[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy327 := &x.ObjectMeta - yy327.CodecEncodeSelf(e) - } - } - if yyr318 || yy2arr318 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq318[3] { - yym329 := z.EncBinary() - _ = yym329 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Description)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq318[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("description")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym330 := z.EncBinary() - _ = yym330 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Description)) - } - } - } - if yyr318 || yy2arr318 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq318[4] { - if x.Versions == nil { - r.EncodeNil() - } else { - yym332 := z.EncBinary() - _ = yym332 - if false { - } else { - h.encSliceAPIVersion(([]APIVersion)(x.Versions), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq318[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("versions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Versions == nil { - r.EncodeNil() - } else { - yym333 := z.EncBinary() - _ = yym333 - if false { - } else { - h.encSliceAPIVersion(([]APIVersion)(x.Versions), e) - } - } - } - } - if yyr318 || yy2arr318 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ThirdPartyResource) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym334 := z.DecBinary() - _ = yym334 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct335 := r.ContainerType() - if yyct335 == codecSelferValueTypeMap1234 { - yyl335 := r.ReadMapStart() - if yyl335 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl335, d) - } - } else if yyct335 == codecSelferValueTypeArray1234 { - yyl335 := r.ReadArrayStart() - if yyl335 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl335, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ThirdPartyResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys336Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys336Slc - var yyhl336 bool = l >= 0 - for yyj336 := 0; ; yyj336++ { - if yyhl336 { - if yyj336 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys336Slc = r.DecodeBytes(yys336Slc, true, true) - yys336 := string(yys336Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys336 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv339 := &x.ObjectMeta - yyv339.CodecDecodeSelf(d) - } - case "description": - if r.TryDecodeAsNil() { - x.Description = "" - } else { - x.Description = string(r.DecodeString()) - } - case "versions": - if r.TryDecodeAsNil() { - x.Versions = nil - } else { - yyv341 := &x.Versions - yym342 := z.DecBinary() - _ = yym342 - if false { - } else { - h.decSliceAPIVersion((*[]APIVersion)(yyv341), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys336) - } // end switch yys336 - } // end for yyj336 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj343 int - var yyb343 bool - var yyhl343 bool = l >= 0 - yyj343++ - if yyhl343 { - yyb343 = yyj343 > l - } else { - yyb343 = r.CheckBreak() - } - if yyb343 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj343++ - if yyhl343 { - yyb343 = yyj343 > l - } else { - yyb343 = r.CheckBreak() - } - if yyb343 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj343++ - if yyhl343 { - yyb343 = yyj343 > l - } else { - yyb343 = r.CheckBreak() - } - if yyb343 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv346 := &x.ObjectMeta - yyv346.CodecDecodeSelf(d) - } - yyj343++ - if yyhl343 { - yyb343 = yyj343 > l - } else { - yyb343 = r.CheckBreak() - } - if yyb343 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Description = "" - } else { - x.Description = string(r.DecodeString()) - } - yyj343++ - if yyhl343 { - yyb343 = yyj343 > l - } else { - yyb343 = r.CheckBreak() - } - if yyb343 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Versions = nil - } else { - yyv348 := &x.Versions - yym349 := z.DecBinary() - _ = yym349 - if false { - } else { - h.decSliceAPIVersion((*[]APIVersion)(yyv348), d) - } - } - for { - yyj343++ - if yyhl343 { - yyb343 = yyj343 > l - } else { - yyb343 = r.CheckBreak() - } - if yyb343 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj343-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ThirdPartyResourceList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym350 := z.EncBinary() - _ = yym350 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep351 := !z.EncBinary() - yy2arr351 := z.EncBasicHandle().StructToArray - var yyq351 [4]bool - _, _, _ = yysep351, yyq351, yy2arr351 - const yyr351 bool = false - yyq351[0] = x.Kind != "" - yyq351[1] = x.APIVersion != "" - yyq351[2] = true - var yynn351 int - if yyr351 || yy2arr351 { - r.EncodeArrayStart(4) - } else { - yynn351 = 1 - for _, b := range yyq351 { - if b { - yynn351++ - } - } - r.EncodeMapStart(yynn351) - yynn351 = 0 - } - if yyr351 || yy2arr351 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[0] { - yym353 := z.EncBinary() - _ = yym353 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq351[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym354 := z.EncBinary() - _ = yym354 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr351 || yy2arr351 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[1] { - yym356 := z.EncBinary() - _ = yym356 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq351[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym357 := z.EncBinary() - _ = yym357 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr351 || yy2arr351 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[2] { - yy359 := &x.ListMeta - yym360 := z.EncBinary() - _ = yym360 - if false { - } else if z.HasExtensions() && z.EncExt(yy359) { - } else { - z.EncFallback(yy359) - } - } else { - r.EncodeNil() - } - } else { - if yyq351[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy361 := &x.ListMeta - yym362 := z.EncBinary() - _ = yym362 - if false { - } else if z.HasExtensions() && z.EncExt(yy361) { - } else { - z.EncFallback(yy361) - } - } - } - if yyr351 || yy2arr351 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym364 := z.EncBinary() - _ = yym364 - if false { - } else { - h.encSliceThirdPartyResource(([]ThirdPartyResource)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym365 := z.EncBinary() - _ = yym365 - if false { - } else { - h.encSliceThirdPartyResource(([]ThirdPartyResource)(x.Items), e) - } - } - } - if yyr351 || yy2arr351 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ThirdPartyResourceList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym366 := z.DecBinary() - _ = yym366 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct367 := r.ContainerType() - if yyct367 == codecSelferValueTypeMap1234 { - yyl367 := r.ReadMapStart() - if yyl367 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl367, d) - } - } else if yyct367 == codecSelferValueTypeArray1234 { - yyl367 := r.ReadArrayStart() - if yyl367 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl367, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ThirdPartyResourceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys368Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys368Slc - var yyhl368 bool = l >= 0 - for yyj368 := 0; ; yyj368++ { - if yyhl368 { - if yyj368 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys368Slc = r.DecodeBytes(yys368Slc, true, true) - yys368 := string(yys368Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys368 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv371 := &x.ListMeta - yym372 := z.DecBinary() - _ = yym372 - if false { - } else if z.HasExtensions() && z.DecExt(yyv371) { - } else { - z.DecFallback(yyv371, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv373 := &x.Items - yym374 := z.DecBinary() - _ = yym374 - if false { - } else { - h.decSliceThirdPartyResource((*[]ThirdPartyResource)(yyv373), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys368) - } // end switch yys368 - } // end for yyj368 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ThirdPartyResourceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj375 int - var yyb375 bool - var yyhl375 bool = l >= 0 - yyj375++ - if yyhl375 { - yyb375 = yyj375 > l - } else { - yyb375 = r.CheckBreak() - } - if yyb375 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj375++ - if yyhl375 { - yyb375 = yyj375 > l - } else { - yyb375 = r.CheckBreak() - } - if yyb375 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj375++ - if yyhl375 { - yyb375 = yyj375 > l - } else { - yyb375 = r.CheckBreak() - } - if yyb375 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv378 := &x.ListMeta - yym379 := z.DecBinary() - _ = yym379 - if false { - } else if z.HasExtensions() && z.DecExt(yyv378) { - } else { - z.DecFallback(yyv378, false) - } - } - yyj375++ - if yyhl375 { - yyb375 = yyj375 > l - } else { - yyb375 = r.CheckBreak() - } - if yyb375 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv380 := &x.Items - yym381 := z.DecBinary() - _ = yym381 - if false { - } else { - h.decSliceThirdPartyResource((*[]ThirdPartyResource)(yyv380), d) - } - } - for { - yyj375++ - if yyhl375 { - yyb375 = yyj375 > l - } else { - yyb375 = r.CheckBreak() - } - if yyb375 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj375-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *APIVersion) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym382 := z.EncBinary() - _ = yym382 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep383 := !z.EncBinary() - yy2arr383 := z.EncBasicHandle().StructToArray - var yyq383 [1]bool - _, _, _ = yysep383, yyq383, yy2arr383 - const yyr383 bool = false - yyq383[0] = x.Name != "" - var yynn383 int - if yyr383 || yy2arr383 { - r.EncodeArrayStart(1) - } else { - yynn383 = 0 - for _, b := range yyq383 { - if b { - yynn383++ - } - } - r.EncodeMapStart(yynn383) - yynn383 = 0 - } - if yyr383 || yy2arr383 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq383[0] { - yym385 := z.EncBinary() - _ = yym385 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq383[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("name")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym386 := z.EncBinary() - _ = yym386 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } - } - if yyr383 || yy2arr383 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *APIVersion) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym387 := z.DecBinary() - _ = yym387 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct388 := r.ContainerType() - if yyct388 == codecSelferValueTypeMap1234 { - yyl388 := r.ReadMapStart() - if yyl388 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl388, d) - } - } else if yyct388 == codecSelferValueTypeArray1234 { - yyl388 := r.ReadArrayStart() - if yyl388 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl388, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *APIVersion) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys389Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys389Slc - var yyhl389 bool = l >= 0 - for yyj389 := 0; ; yyj389++ { - if yyhl389 { - if yyj389 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys389Slc = r.DecodeBytes(yys389Slc, true, true) - yys389 := string(yys389Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys389 { - case "name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys389) - } // end switch yys389 - } // end for yyj389 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *APIVersion) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj391 int - var yyb391 bool - var yyhl391 bool = l >= 0 - yyj391++ - if yyhl391 { - yyb391 = yyj391 > l - } else { - yyb391 = r.CheckBreak() - } - if yyb391 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - for { - yyj391++ - if yyhl391 { - yyb391 = yyj391 > l - } else { - yyb391 = r.CheckBreak() - } - if yyb391 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj391-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ThirdPartyResourceData) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym393 := z.EncBinary() - _ = yym393 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep394 := !z.EncBinary() - yy2arr394 := z.EncBasicHandle().StructToArray - var yyq394 [4]bool - _, _, _ = yysep394, yyq394, yy2arr394 - const yyr394 bool = false - yyq394[0] = x.Kind != "" - yyq394[1] = x.APIVersion != "" - yyq394[2] = true - yyq394[3] = len(x.Data) != 0 - var yynn394 int - if yyr394 || yy2arr394 { - r.EncodeArrayStart(4) - } else { - yynn394 = 0 - for _, b := range yyq394 { - if b { - yynn394++ - } - } - r.EncodeMapStart(yynn394) - yynn394 = 0 - } - if yyr394 || yy2arr394 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq394[0] { - yym396 := z.EncBinary() - _ = yym396 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq394[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym397 := z.EncBinary() - _ = yym397 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr394 || yy2arr394 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq394[1] { - yym399 := z.EncBinary() - _ = yym399 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq394[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym400 := z.EncBinary() - _ = yym400 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr394 || yy2arr394 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq394[2] { - yy402 := &x.ObjectMeta - yy402.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq394[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy403 := &x.ObjectMeta - yy403.CodecEncodeSelf(e) - } - } - if yyr394 || yy2arr394 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq394[3] { - if x.Data == nil { - r.EncodeNil() - } else { - yym405 := z.EncBinary() - _ = yym405 - if false { - } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq394[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("data")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Data == nil { - r.EncodeNil() - } else { - yym406 := z.EncBinary() - _ = yym406 - if false { - } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data)) - } - } - } - } - if yyr394 || yy2arr394 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ThirdPartyResourceData) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym407 := z.DecBinary() - _ = yym407 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct408 := r.ContainerType() - if yyct408 == codecSelferValueTypeMap1234 { - yyl408 := r.ReadMapStart() - if yyl408 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl408, d) - } - } else if yyct408 == codecSelferValueTypeArray1234 { - yyl408 := r.ReadArrayStart() - if yyl408 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl408, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ThirdPartyResourceData) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys409Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys409Slc - var yyhl409 bool = l >= 0 - for yyj409 := 0; ; yyj409++ { - if yyhl409 { - if yyj409 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys409Slc = r.DecodeBytes(yys409Slc, true, true) - yys409 := string(yys409Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys409 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv412 := &x.ObjectMeta - yyv412.CodecDecodeSelf(d) - } - case "data": - if r.TryDecodeAsNil() { - x.Data = nil - } else { - yyv413 := &x.Data - yym414 := z.DecBinary() - _ = yym414 - if false { - } else { - *yyv413 = r.DecodeBytes(*(*[]byte)(yyv413), false, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys409) - } // end switch yys409 - } // end for yyj409 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj415 int - var yyb415 bool - var yyhl415 bool = l >= 0 - yyj415++ - if yyhl415 { - yyb415 = yyj415 > l - } else { - yyb415 = r.CheckBreak() - } - if yyb415 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj415++ - if yyhl415 { - yyb415 = yyj415 > l - } else { - yyb415 = r.CheckBreak() - } - if yyb415 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj415++ - if yyhl415 { - yyb415 = yyj415 > l - } else { - yyb415 = r.CheckBreak() - } - if yyb415 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv418 := &x.ObjectMeta - yyv418.CodecDecodeSelf(d) - } - yyj415++ - if yyhl415 { - yyb415 = yyj415 > l - } else { - yyb415 = r.CheckBreak() - } - if yyb415 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Data = nil - } else { - yyv419 := &x.Data - yym420 := z.DecBinary() - _ = yym420 - if false { - } else { - *yyv419 = r.DecodeBytes(*(*[]byte)(yyv419), false, false) - } - } - for { - yyj415++ - if yyhl415 { - yyb415 = yyj415 > l - } else { - yyb415 = r.CheckBreak() - } - if yyb415 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj415-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym421 := z.EncBinary() - _ = yym421 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep422 := !z.EncBinary() - yy2arr422 := z.EncBasicHandle().StructToArray - var yyq422 [5]bool - _, _, _ = yysep422, yyq422, yy2arr422 - const yyr422 bool = false - yyq422[0] = x.Kind != "" - yyq422[1] = x.APIVersion != "" - yyq422[2] = true - yyq422[3] = true - yyq422[4] = true - var yynn422 int - if yyr422 || yy2arr422 { - r.EncodeArrayStart(5) - } else { - yynn422 = 0 - for _, b := range yyq422 { - if b { - yynn422++ - } - } - r.EncodeMapStart(yynn422) - yynn422 = 0 - } - if yyr422 || yy2arr422 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq422[0] { - yym424 := z.EncBinary() - _ = yym424 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq422[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym425 := z.EncBinary() - _ = yym425 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr422 || yy2arr422 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq422[1] { - yym427 := z.EncBinary() - _ = yym427 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq422[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym428 := z.EncBinary() - _ = yym428 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr422 || yy2arr422 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq422[2] { - yy430 := &x.ObjectMeta - yy430.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq422[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy431 := &x.ObjectMeta - yy431.CodecEncodeSelf(e) - } - } - if yyr422 || yy2arr422 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq422[3] { - yy433 := &x.Spec - yy433.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq422[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy434 := &x.Spec - yy434.CodecEncodeSelf(e) - } - } - if yyr422 || yy2arr422 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq422[4] { - yy436 := &x.Status - yy436.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq422[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy437 := &x.Status - yy437.CodecEncodeSelf(e) - } - } - if yyr422 || yy2arr422 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Deployment) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym438 := z.DecBinary() - _ = yym438 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct439 := r.ContainerType() - if yyct439 == codecSelferValueTypeMap1234 { - yyl439 := r.ReadMapStart() - if yyl439 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl439, d) - } - } else if yyct439 == codecSelferValueTypeArray1234 { - yyl439 := r.ReadArrayStart() - if yyl439 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl439, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Deployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys440Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys440Slc - var yyhl440 bool = l >= 0 - for yyj440 := 0; ; yyj440++ { - if yyhl440 { - if yyj440 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys440Slc = r.DecodeBytes(yys440Slc, true, true) - yys440 := string(yys440Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys440 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv443 := &x.ObjectMeta - yyv443.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = DeploymentSpec{} - } else { - yyv444 := &x.Spec - yyv444.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = DeploymentStatus{} - } else { - yyv445 := &x.Status - yyv445.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys440) - } // end switch yys440 - } // end for yyj440 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj446 int - var yyb446 bool - var yyhl446 bool = l >= 0 - yyj446++ - if yyhl446 { - yyb446 = yyj446 > l - } else { - yyb446 = r.CheckBreak() - } - if yyb446 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj446++ - if yyhl446 { - yyb446 = yyj446 > l - } else { - yyb446 = r.CheckBreak() - } - if yyb446 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj446++ - if yyhl446 { - yyb446 = yyj446 > l - } else { - yyb446 = r.CheckBreak() - } - if yyb446 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv449 := &x.ObjectMeta - yyv449.CodecDecodeSelf(d) - } - yyj446++ - if yyhl446 { - yyb446 = yyj446 > l - } else { - yyb446 = r.CheckBreak() - } - if yyb446 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = DeploymentSpec{} - } else { - yyv450 := &x.Spec - yyv450.CodecDecodeSelf(d) - } - yyj446++ - if yyhl446 { - yyb446 = yyj446 > l - } else { - yyb446 = r.CheckBreak() - } - if yyb446 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = DeploymentStatus{} - } else { - yyv451 := &x.Status - yyv451.CodecDecodeSelf(d) - } - for { - yyj446++ - if yyhl446 { - yyb446 = yyj446 > l - } else { - yyb446 = r.CheckBreak() - } - if yyb446 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj446-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym452 := z.EncBinary() - _ = yym452 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep453 := !z.EncBinary() - yy2arr453 := z.EncBasicHandle().StructToArray - var yyq453 [8]bool - _, _, _ = yysep453, yyq453, yy2arr453 - const yyr453 bool = false - yyq453[0] = x.Replicas != nil - yyq453[1] = x.Selector != nil - yyq453[3] = true - yyq453[4] = x.MinReadySeconds != 0 - yyq453[5] = x.RevisionHistoryLimit != nil - yyq453[6] = x.Paused != false - yyq453[7] = x.RollbackTo != nil - var yynn453 int - if yyr453 || yy2arr453 { - r.EncodeArrayStart(8) - } else { - yynn453 = 1 - for _, b := range yyq453 { - if b { - yynn453++ - } - } - r.EncodeMapStart(yynn453) - yynn453 = 0 - } - if yyr453 || yy2arr453 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq453[0] { - if x.Replicas == nil { - r.EncodeNil() - } else { - yy455 := *x.Replicas - yym456 := z.EncBinary() - _ = yym456 - if false { - } else { - r.EncodeInt(int64(yy455)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq453[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Replicas == nil { - r.EncodeNil() - } else { - yy457 := *x.Replicas - yym458 := z.EncBinary() - _ = yym458 - if false { - } else { - r.EncodeInt(int64(yy457)) - } - } - } - } - if yyr453 || yy2arr453 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq453[1] { - if x.Selector == nil { - r.EncodeNil() - } else { - x.Selector.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq453[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Selector == nil { - r.EncodeNil() - } else { - x.Selector.CodecEncodeSelf(e) - } - } - } - if yyr453 || yy2arr453 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy461 := &x.Template - yy461.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("template")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy462 := &x.Template - yy462.CodecEncodeSelf(e) - } - if yyr453 || yy2arr453 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq453[3] { - yy464 := &x.Strategy - yy464.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq453[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("strategy")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy465 := &x.Strategy - yy465.CodecEncodeSelf(e) - } - } - if yyr453 || yy2arr453 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq453[4] { - yym467 := z.EncBinary() - _ = yym467 - if false { - } else { - r.EncodeInt(int64(x.MinReadySeconds)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq453[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym468 := z.EncBinary() - _ = yym468 - if false { - } else { - r.EncodeInt(int64(x.MinReadySeconds)) - } - } - } - if yyr453 || yy2arr453 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq453[5] { - if x.RevisionHistoryLimit == nil { - r.EncodeNil() - } else { - yy470 := *x.RevisionHistoryLimit - yym471 := z.EncBinary() - _ = yym471 - if false { - } else { - r.EncodeInt(int64(yy470)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq453[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.RevisionHistoryLimit == nil { - r.EncodeNil() - } else { - yy472 := *x.RevisionHistoryLimit - yym473 := z.EncBinary() - _ = yym473 - if false { - } else { - r.EncodeInt(int64(yy472)) - } - } - } - } - if yyr453 || yy2arr453 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq453[6] { - yym475 := z.EncBinary() - _ = yym475 - if false { - } else { - r.EncodeBool(bool(x.Paused)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq453[6] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("paused")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym476 := z.EncBinary() - _ = yym476 - if false { - } else { - r.EncodeBool(bool(x.Paused)) - } - } - } - if yyr453 || yy2arr453 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq453[7] { - if x.RollbackTo == nil { - r.EncodeNil() - } else { - x.RollbackTo.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq453[7] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("rollbackTo")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.RollbackTo == nil { - r.EncodeNil() - } else { - x.RollbackTo.CodecEncodeSelf(e) - } - } - } - if yyr453 || yy2arr453 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *DeploymentSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym478 := z.DecBinary() - _ = yym478 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct479 := r.ContainerType() - if yyct479 == codecSelferValueTypeMap1234 { - yyl479 := r.ReadMapStart() - if yyl479 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl479, d) - } - } else if yyct479 == codecSelferValueTypeArray1234 { - yyl479 := r.ReadArrayStart() - if yyl479 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl479, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys480Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys480Slc - var yyhl480 bool = l >= 0 - for yyj480 := 0; ; yyj480++ { - if yyhl480 { - if yyj480 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys480Slc = r.DecodeBytes(yys480Slc, true, true) - yys480 := string(yys480Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys480 { - case "replicas": - if r.TryDecodeAsNil() { - if x.Replicas != nil { - x.Replicas = nil - } - } else { - if x.Replicas == nil { - x.Replicas = new(int32) - } - yym482 := z.DecBinary() - _ = yym482 - if false { - } else { - *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) - } - } - case "selector": - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(LabelSelector) - } - x.Selector.CodecDecodeSelf(d) - } - case "template": - if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} - } else { - yyv484 := &x.Template - yyv484.CodecDecodeSelf(d) - } - case "strategy": - if r.TryDecodeAsNil() { - x.Strategy = DeploymentStrategy{} - } else { - yyv485 := &x.Strategy - yyv485.CodecDecodeSelf(d) - } - case "minReadySeconds": - if r.TryDecodeAsNil() { - x.MinReadySeconds = 0 - } else { - x.MinReadySeconds = int32(r.DecodeInt(32)) - } - case "revisionHistoryLimit": - if r.TryDecodeAsNil() { - if x.RevisionHistoryLimit != nil { - x.RevisionHistoryLimit = nil - } - } else { - if x.RevisionHistoryLimit == nil { - x.RevisionHistoryLimit = new(int32) - } - yym488 := z.DecBinary() - _ = yym488 - if false { - } else { - *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32)) - } - } - case "paused": - if r.TryDecodeAsNil() { - x.Paused = false - } else { - x.Paused = bool(r.DecodeBool()) - } - case "rollbackTo": - if r.TryDecodeAsNil() { - if x.RollbackTo != nil { - x.RollbackTo = nil - } - } else { - if x.RollbackTo == nil { - x.RollbackTo = new(RollbackConfig) - } - x.RollbackTo.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys480) - } // end switch yys480 - } // end for yyj480 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj491 int - var yyb491 bool - var yyhl491 bool = l >= 0 - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l - } else { - yyb491 = r.CheckBreak() - } - if yyb491 { - 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) - } - yym493 := z.DecBinary() - _ = yym493 - if false { - } else { - *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) - } - } - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l - } else { - yyb491 = r.CheckBreak() - } - if yyb491 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(LabelSelector) - } - x.Selector.CodecDecodeSelf(d) - } - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l - } else { - yyb491 = r.CheckBreak() - } - if yyb491 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} - } else { - yyv495 := &x.Template - yyv495.CodecDecodeSelf(d) - } - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l - } else { - yyb491 = r.CheckBreak() - } - if yyb491 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Strategy = DeploymentStrategy{} - } else { - yyv496 := &x.Strategy - yyv496.CodecDecodeSelf(d) - } - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l - } else { - yyb491 = r.CheckBreak() - } - if yyb491 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MinReadySeconds = 0 - } else { - x.MinReadySeconds = int32(r.DecodeInt(32)) - } - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l - } else { - yyb491 = r.CheckBreak() - } - if yyb491 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.RevisionHistoryLimit != nil { - x.RevisionHistoryLimit = nil - } - } else { - if x.RevisionHistoryLimit == nil { - x.RevisionHistoryLimit = new(int32) - } - yym499 := z.DecBinary() - _ = yym499 - if false { - } else { - *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32)) - } - } - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l - } else { - yyb491 = r.CheckBreak() - } - if yyb491 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Paused = false - } else { - x.Paused = bool(r.DecodeBool()) - } - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l - } else { - yyb491 = r.CheckBreak() - } - if yyb491 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.RollbackTo != nil { - x.RollbackTo = nil - } - } else { - if x.RollbackTo == nil { - x.RollbackTo = new(RollbackConfig) - } - x.RollbackTo.CodecDecodeSelf(d) - } - for { - yyj491++ - if yyhl491 { - yyb491 = yyj491 > l - } else { - yyb491 = r.CheckBreak() - } - if yyb491 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj491-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym502 := z.EncBinary() - _ = yym502 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep503 := !z.EncBinary() - yy2arr503 := z.EncBasicHandle().StructToArray - var yyq503 [5]bool - _, _, _ = yysep503, yyq503, yy2arr503 - const yyr503 bool = false - yyq503[0] = x.Kind != "" - yyq503[1] = x.APIVersion != "" - yyq503[3] = len(x.UpdatedAnnotations) != 0 - var yynn503 int - if yyr503 || yy2arr503 { - r.EncodeArrayStart(5) - } else { - yynn503 = 2 - for _, b := range yyq503 { - if b { - yynn503++ - } - } - r.EncodeMapStart(yynn503) - yynn503 = 0 - } - if yyr503 || yy2arr503 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq503[0] { - yym505 := z.EncBinary() - _ = yym505 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq503[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym506 := z.EncBinary() - _ = yym506 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr503 || yy2arr503 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq503[1] { - yym508 := z.EncBinary() - _ = yym508 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq503[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym509 := z.EncBinary() - _ = yym509 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr503 || yy2arr503 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym511 := z.EncBinary() - _ = yym511 - 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) - yym512 := z.EncBinary() - _ = yym512 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } - if yyr503 || yy2arr503 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq503[3] { - if x.UpdatedAnnotations == nil { - r.EncodeNil() - } else { - yym514 := z.EncBinary() - _ = yym514 - if false { - } else { - z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq503[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("updatedAnnotations")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.UpdatedAnnotations == nil { - r.EncodeNil() - } else { - yym515 := z.EncBinary() - _ = yym515 - if false { - } else { - z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e) - } - } - } - } - if yyr503 || yy2arr503 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy517 := &x.RollbackTo - yy517.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("rollbackTo")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy518 := &x.RollbackTo - yy518.CodecEncodeSelf(e) - } - if yyr503 || yy2arr503 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *DeploymentRollback) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym519 := z.DecBinary() - _ = yym519 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct520 := r.ContainerType() - if yyct520 == codecSelferValueTypeMap1234 { - yyl520 := r.ReadMapStart() - if yyl520 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl520, d) - } - } else if yyct520 == codecSelferValueTypeArray1234 { - yyl520 := r.ReadArrayStart() - if yyl520 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl520, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *DeploymentRollback) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys521Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys521Slc - var yyhl521 bool = l >= 0 - for yyj521 := 0; ; yyj521++ { - if yyhl521 { - if yyj521 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys521Slc = r.DecodeBytes(yys521Slc, true, true) - yys521 := string(yys521Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys521 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - case "updatedAnnotations": - if r.TryDecodeAsNil() { - x.UpdatedAnnotations = nil - } else { - yyv525 := &x.UpdatedAnnotations - yym526 := z.DecBinary() - _ = yym526 - if false { - } else { - z.F.DecMapStringStringX(yyv525, false, d) - } - } - case "rollbackTo": - if r.TryDecodeAsNil() { - x.RollbackTo = RollbackConfig{} - } else { - yyv527 := &x.RollbackTo - yyv527.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys521) - } // end switch yys521 - } // end for yyj521 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj528 int - var yyb528 bool - var yyhl528 bool = l >= 0 - yyj528++ - if yyhl528 { - yyb528 = yyj528 > l - } else { - yyb528 = r.CheckBreak() - } - if yyb528 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj528++ - if yyhl528 { - yyb528 = yyj528 > l - } else { - yyb528 = r.CheckBreak() - } - if yyb528 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj528++ - if yyhl528 { - yyb528 = yyj528 > l - } else { - yyb528 = r.CheckBreak() - } - if yyb528 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - yyj528++ - if yyhl528 { - yyb528 = yyj528 > l - } else { - yyb528 = r.CheckBreak() - } - if yyb528 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.UpdatedAnnotations = nil - } else { - yyv532 := &x.UpdatedAnnotations - yym533 := z.DecBinary() - _ = yym533 - if false { - } else { - z.F.DecMapStringStringX(yyv532, false, d) - } - } - yyj528++ - if yyhl528 { - yyb528 = yyj528 > l - } else { - yyb528 = r.CheckBreak() - } - if yyb528 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RollbackTo = RollbackConfig{} - } else { - yyv534 := &x.RollbackTo - yyv534.CodecDecodeSelf(d) - } - for { - yyj528++ - if yyhl528 { - yyb528 = yyj528 > l - } else { - yyb528 = r.CheckBreak() - } - if yyb528 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj528-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *RollbackConfig) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym535 := z.EncBinary() - _ = yym535 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep536 := !z.EncBinary() - yy2arr536 := z.EncBasicHandle().StructToArray - var yyq536 [1]bool - _, _, _ = yysep536, yyq536, yy2arr536 - const yyr536 bool = false - yyq536[0] = x.Revision != 0 - var yynn536 int - if yyr536 || yy2arr536 { - r.EncodeArrayStart(1) - } else { - yynn536 = 0 - for _, b := range yyq536 { - if b { - yynn536++ - } - } - r.EncodeMapStart(yynn536) - yynn536 = 0 - } - if yyr536 || yy2arr536 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq536[0] { - yym538 := z.EncBinary() - _ = yym538 - if false { - } else { - r.EncodeInt(int64(x.Revision)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq536[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("revision")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym539 := z.EncBinary() - _ = yym539 - if false { - } else { - r.EncodeInt(int64(x.Revision)) - } - } - } - if yyr536 || yy2arr536 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *RollbackConfig) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym540 := z.DecBinary() - _ = yym540 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct541 := r.ContainerType() - if yyct541 == codecSelferValueTypeMap1234 { - yyl541 := r.ReadMapStart() - if yyl541 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl541, d) - } - } else if yyct541 == codecSelferValueTypeArray1234 { - yyl541 := r.ReadArrayStart() - if yyl541 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl541, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *RollbackConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys542Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys542Slc - var yyhl542 bool = l >= 0 - for yyj542 := 0; ; yyj542++ { - if yyhl542 { - if yyj542 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys542Slc = r.DecodeBytes(yys542Slc, true, true) - yys542 := string(yys542Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys542 { - case "revision": - if r.TryDecodeAsNil() { - x.Revision = 0 - } else { - x.Revision = int64(r.DecodeInt(64)) - } - default: - z.DecStructFieldNotFound(-1, yys542) - } // end switch yys542 - } // end for yyj542 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *RollbackConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj544 int - var yyb544 bool - var yyhl544 bool = l >= 0 - yyj544++ - if yyhl544 { - yyb544 = yyj544 > l - } else { - yyb544 = r.CheckBreak() - } - if yyb544 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Revision = 0 - } else { - x.Revision = int64(r.DecodeInt(64)) - } - for { - yyj544++ - if yyhl544 { - yyb544 = yyj544 > l - } else { - yyb544 = r.CheckBreak() - } - if yyb544 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj544-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym546 := z.EncBinary() - _ = yym546 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep547 := !z.EncBinary() - yy2arr547 := z.EncBasicHandle().StructToArray - var yyq547 [2]bool - _, _, _ = yysep547, yyq547, yy2arr547 - const yyr547 bool = false - yyq547[0] = x.Type != "" - yyq547[1] = x.RollingUpdate != nil - var yynn547 int - if yyr547 || yy2arr547 { - r.EncodeArrayStart(2) - } else { - yynn547 = 0 - for _, b := range yyq547 { - if b { - yynn547++ - } - } - r.EncodeMapStart(yynn547) - yynn547 = 0 - } - if yyr547 || yy2arr547 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq547[0] { - x.Type.CodecEncodeSelf(e) - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq547[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("type")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Type.CodecEncodeSelf(e) - } - } - if yyr547 || yy2arr547 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq547[1] { - if x.RollingUpdate == nil { - r.EncodeNil() - } else { - x.RollingUpdate.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq547[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("rollingUpdate")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.RollingUpdate == nil { - r.EncodeNil() - } else { - x.RollingUpdate.CodecEncodeSelf(e) - } - } - } - if yyr547 || yy2arr547 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *DeploymentStrategy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym550 := z.DecBinary() - _ = yym550 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct551 := r.ContainerType() - if yyct551 == codecSelferValueTypeMap1234 { - yyl551 := r.ReadMapStart() - if yyl551 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl551, d) - } - } else if yyct551 == codecSelferValueTypeArray1234 { - yyl551 := r.ReadArrayStart() - if yyl551 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl551, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys552Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys552Slc - var yyhl552 bool = l >= 0 - for yyj552 := 0; ; yyj552++ { - if yyhl552 { - if yyj552 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys552Slc = r.DecodeBytes(yys552Slc, true, true) - yys552 := string(yys552Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys552 { - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = DeploymentStrategyType(r.DecodeString()) - } - case "rollingUpdate": - if r.TryDecodeAsNil() { - if x.RollingUpdate != nil { - x.RollingUpdate = nil - } - } else { - if x.RollingUpdate == nil { - x.RollingUpdate = new(RollingUpdateDeployment) - } - x.RollingUpdate.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys552) - } // end switch yys552 - } // end for yyj552 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj555 int - var yyb555 bool - var yyhl555 bool = l >= 0 - yyj555++ - if yyhl555 { - yyb555 = yyj555 > l - } else { - yyb555 = r.CheckBreak() - } - if yyb555 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = DeploymentStrategyType(r.DecodeString()) - } - yyj555++ - if yyhl555 { - yyb555 = yyj555 > l - } else { - yyb555 = r.CheckBreak() - } - if yyb555 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.RollingUpdate != nil { - x.RollingUpdate = nil - } - } else { - if x.RollingUpdate == nil { - x.RollingUpdate = new(RollingUpdateDeployment) - } - x.RollingUpdate.CodecDecodeSelf(d) - } - for { - yyj555++ - if yyhl555 { - yyb555 = yyj555 > l - } else { - yyb555 = r.CheckBreak() - } - if yyb555 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj555-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x DeploymentStrategyType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym558 := z.EncBinary() - _ = yym558 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *DeploymentStrategyType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym559 := z.DecBinary() - _ = yym559 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym560 := z.EncBinary() - _ = yym560 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep561 := !z.EncBinary() - yy2arr561 := z.EncBasicHandle().StructToArray - var yyq561 [2]bool - _, _, _ = yysep561, yyq561, yy2arr561 - const yyr561 bool = false - yyq561[0] = x.MaxUnavailable != nil - yyq561[1] = x.MaxSurge != nil - var yynn561 int - if yyr561 || yy2arr561 { - r.EncodeArrayStart(2) - } else { - yynn561 = 0 - for _, b := range yyq561 { - if b { - yynn561++ - } - } - r.EncodeMapStart(yynn561) - yynn561 = 0 - } - if yyr561 || yy2arr561 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq561[0] { - if x.MaxUnavailable == nil { - r.EncodeNil() - } else { - yym563 := z.EncBinary() - _ = yym563 - if false { - } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) { - } else if !yym563 && z.IsJSONHandle() { - z.EncJSONMarshal(x.MaxUnavailable) - } else { - z.EncFallback(x.MaxUnavailable) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq561[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.MaxUnavailable == nil { - r.EncodeNil() - } else { - yym564 := z.EncBinary() - _ = yym564 - if false { - } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) { - } else if !yym564 && z.IsJSONHandle() { - z.EncJSONMarshal(x.MaxUnavailable) - } else { - z.EncFallback(x.MaxUnavailable) - } - } - } - } - if yyr561 || yy2arr561 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq561[1] { - if x.MaxSurge == nil { - r.EncodeNil() - } else { - yym566 := z.EncBinary() - _ = yym566 - if false { - } else if z.HasExtensions() && z.EncExt(x.MaxSurge) { - } else if !yym566 && z.IsJSONHandle() { - z.EncJSONMarshal(x.MaxSurge) - } else { - z.EncFallback(x.MaxSurge) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq561[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("maxSurge")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.MaxSurge == nil { - r.EncodeNil() - } else { - yym567 := z.EncBinary() - _ = yym567 - if false { - } else if z.HasExtensions() && z.EncExt(x.MaxSurge) { - } else if !yym567 && z.IsJSONHandle() { - z.EncJSONMarshal(x.MaxSurge) - } else { - z.EncFallback(x.MaxSurge) - } - } - } - } - if yyr561 || yy2arr561 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *RollingUpdateDeployment) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym568 := z.DecBinary() - _ = yym568 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct569 := r.ContainerType() - if yyct569 == codecSelferValueTypeMap1234 { - yyl569 := r.ReadMapStart() - if yyl569 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl569, d) - } - } else if yyct569 == codecSelferValueTypeArray1234 { - yyl569 := r.ReadArrayStart() - if yyl569 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl569, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys570Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys570Slc - var yyhl570 bool = l >= 0 - for yyj570 := 0; ; yyj570++ { - if yyhl570 { - if yyj570 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys570Slc = r.DecodeBytes(yys570Slc, true, true) - yys570 := string(yys570Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys570 { - case "maxUnavailable": - if r.TryDecodeAsNil() { - if x.MaxUnavailable != nil { - x.MaxUnavailable = nil - } - } else { - if x.MaxUnavailable == nil { - x.MaxUnavailable = new(pkg5_intstr.IntOrString) - } - yym572 := z.DecBinary() - _ = yym572 - if false { - } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) { - } else if !yym572 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.MaxUnavailable) - } else { - z.DecFallback(x.MaxUnavailable, false) - } - } - case "maxSurge": - if r.TryDecodeAsNil() { - if x.MaxSurge != nil { - x.MaxSurge = nil - } - } else { - if x.MaxSurge == nil { - x.MaxSurge = new(pkg5_intstr.IntOrString) - } - yym574 := z.DecBinary() - _ = yym574 - if false { - } else if z.HasExtensions() && z.DecExt(x.MaxSurge) { - } else if !yym574 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.MaxSurge) - } else { - z.DecFallback(x.MaxSurge, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys570) - } // end switch yys570 - } // end for yyj570 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *RollingUpdateDeployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj575 int - var yyb575 bool - var yyhl575 bool = l >= 0 - yyj575++ - if yyhl575 { - yyb575 = yyj575 > l - } else { - yyb575 = r.CheckBreak() - } - if yyb575 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.MaxUnavailable != nil { - x.MaxUnavailable = nil - } - } else { - if x.MaxUnavailable == nil { - x.MaxUnavailable = new(pkg5_intstr.IntOrString) - } - yym577 := z.DecBinary() - _ = yym577 - if false { - } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) { - } else if !yym577 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.MaxUnavailable) - } else { - z.DecFallback(x.MaxUnavailable, false) - } - } - yyj575++ - if yyhl575 { - yyb575 = yyj575 > l - } else { - yyb575 = r.CheckBreak() - } - if yyb575 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.MaxSurge != nil { - x.MaxSurge = nil - } - } else { - if x.MaxSurge == nil { - x.MaxSurge = new(pkg5_intstr.IntOrString) - } - yym579 := z.DecBinary() - _ = yym579 - if false { - } else if z.HasExtensions() && z.DecExt(x.MaxSurge) { - } else if !yym579 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.MaxSurge) - } else { - z.DecFallback(x.MaxSurge, false) - } - } - for { - yyj575++ - if yyhl575 { - yyb575 = yyj575 > l - } else { - yyb575 = r.CheckBreak() - } - if yyb575 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj575-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *DeploymentStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym580 := z.EncBinary() - _ = yym580 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep581 := !z.EncBinary() - yy2arr581 := z.EncBasicHandle().StructToArray - var yyq581 [5]bool - _, _, _ = yysep581, yyq581, yy2arr581 - const yyr581 bool = false - yyq581[0] = x.ObservedGeneration != 0 - yyq581[1] = x.Replicas != 0 - yyq581[2] = x.UpdatedReplicas != 0 - yyq581[3] = x.AvailableReplicas != 0 - yyq581[4] = x.UnavailableReplicas != 0 - var yynn581 int - if yyr581 || yy2arr581 { - r.EncodeArrayStart(5) - } else { - yynn581 = 0 - for _, b := range yyq581 { - if b { - yynn581++ - } - } - r.EncodeMapStart(yynn581) - yynn581 = 0 - } - if yyr581 || yy2arr581 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq581[0] { - yym583 := z.EncBinary() - _ = yym583 - if false { - } else { - r.EncodeInt(int64(x.ObservedGeneration)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq581[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym584 := z.EncBinary() - _ = yym584 - if false { - } else { - r.EncodeInt(int64(x.ObservedGeneration)) - } - } - } - if yyr581 || yy2arr581 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq581[1] { - yym586 := z.EncBinary() - _ = yym586 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq581[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym587 := z.EncBinary() - _ = yym587 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } - } - if yyr581 || yy2arr581 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq581[2] { - yym589 := z.EncBinary() - _ = yym589 - if false { - } else { - r.EncodeInt(int64(x.UpdatedReplicas)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq581[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("updatedReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym590 := z.EncBinary() - _ = yym590 - if false { - } else { - r.EncodeInt(int64(x.UpdatedReplicas)) - } - } - } - if yyr581 || yy2arr581 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq581[3] { - yym592 := z.EncBinary() - _ = yym592 - if false { - } else { - r.EncodeInt(int64(x.AvailableReplicas)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq581[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("availableReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym593 := z.EncBinary() - _ = yym593 - if false { - } else { - r.EncodeInt(int64(x.AvailableReplicas)) - } - } - } - if yyr581 || yy2arr581 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq581[4] { - yym595 := z.EncBinary() - _ = yym595 - if false { - } else { - r.EncodeInt(int64(x.UnavailableReplicas)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq581[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("unavailableReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym596 := z.EncBinary() - _ = yym596 - if false { - } else { - r.EncodeInt(int64(x.UnavailableReplicas)) - } - } - } - if yyr581 || yy2arr581 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *DeploymentStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym597 := z.DecBinary() - _ = yym597 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct598 := r.ContainerType() - if yyct598 == codecSelferValueTypeMap1234 { - yyl598 := r.ReadMapStart() - if yyl598 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl598, d) - } - } else if yyct598 == codecSelferValueTypeArray1234 { - yyl598 := r.ReadArrayStart() - if yyl598 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl598, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *DeploymentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys599Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys599Slc - var yyhl599 bool = l >= 0 - for yyj599 := 0; ; yyj599++ { - if yyhl599 { - if yyj599 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys599Slc = r.DecodeBytes(yys599Slc, true, true) - yys599 := string(yys599Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys599 { - case "observedGeneration": - if r.TryDecodeAsNil() { - x.ObservedGeneration = 0 - } else { - x.ObservedGeneration = int64(r.DecodeInt(64)) - } - case "replicas": - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - case "updatedReplicas": - if r.TryDecodeAsNil() { - x.UpdatedReplicas = 0 - } else { - x.UpdatedReplicas = int32(r.DecodeInt(32)) - } - case "availableReplicas": - if r.TryDecodeAsNil() { - x.AvailableReplicas = 0 - } else { - x.AvailableReplicas = int32(r.DecodeInt(32)) - } - case "unavailableReplicas": - if r.TryDecodeAsNil() { - x.UnavailableReplicas = 0 - } else { - x.UnavailableReplicas = int32(r.DecodeInt(32)) - } - default: - z.DecStructFieldNotFound(-1, yys599) - } // end switch yys599 - } // end for yyj599 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *DeploymentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj605 int - var yyb605 bool - var yyhl605 bool = l >= 0 - yyj605++ - if yyhl605 { - yyb605 = yyj605 > l - } else { - yyb605 = r.CheckBreak() - } - if yyb605 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObservedGeneration = 0 - } else { - x.ObservedGeneration = int64(r.DecodeInt(64)) - } - yyj605++ - if yyhl605 { - yyb605 = yyj605 > l - } else { - yyb605 = r.CheckBreak() - } - if yyb605 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - yyj605++ - if yyhl605 { - yyb605 = yyj605 > l - } else { - yyb605 = r.CheckBreak() - } - if yyb605 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.UpdatedReplicas = 0 - } else { - x.UpdatedReplicas = int32(r.DecodeInt(32)) - } - yyj605++ - if yyhl605 { - yyb605 = yyj605 > l - } else { - yyb605 = r.CheckBreak() - } - if yyb605 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.AvailableReplicas = 0 - } else { - x.AvailableReplicas = int32(r.DecodeInt(32)) - } - yyj605++ - if yyhl605 { - yyb605 = yyj605 > l - } else { - yyb605 = r.CheckBreak() - } - if yyb605 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.UnavailableReplicas = 0 - } else { - x.UnavailableReplicas = int32(r.DecodeInt(32)) - } - for { - yyj605++ - if yyhl605 { - yyb605 = yyj605 > l - } else { - yyb605 = r.CheckBreak() - } - if yyb605 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj605-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *DeploymentList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym611 := z.EncBinary() - _ = yym611 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep612 := !z.EncBinary() - yy2arr612 := z.EncBasicHandle().StructToArray - var yyq612 [4]bool - _, _, _ = yysep612, yyq612, yy2arr612 - const yyr612 bool = false - yyq612[0] = x.Kind != "" - yyq612[1] = x.APIVersion != "" - yyq612[2] = true - var yynn612 int - if yyr612 || yy2arr612 { - r.EncodeArrayStart(4) - } else { - yynn612 = 1 - for _, b := range yyq612 { - if b { - yynn612++ - } - } - r.EncodeMapStart(yynn612) - yynn612 = 0 - } - if yyr612 || yy2arr612 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq612[0] { - yym614 := z.EncBinary() - _ = yym614 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq612[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym615 := z.EncBinary() - _ = yym615 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr612 || yy2arr612 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq612[1] { - yym617 := z.EncBinary() - _ = yym617 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq612[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym618 := z.EncBinary() - _ = yym618 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr612 || yy2arr612 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq612[2] { - yy620 := &x.ListMeta - yym621 := z.EncBinary() - _ = yym621 - if false { - } else if z.HasExtensions() && z.EncExt(yy620) { - } else { - z.EncFallback(yy620) - } - } else { - r.EncodeNil() - } - } else { - if yyq612[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy622 := &x.ListMeta - yym623 := z.EncBinary() - _ = yym623 - if false { - } else if z.HasExtensions() && z.EncExt(yy622) { - } else { - z.EncFallback(yy622) - } - } - } - if yyr612 || yy2arr612 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym625 := z.EncBinary() - _ = yym625 - if false { - } else { - h.encSliceDeployment(([]Deployment)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym626 := z.EncBinary() - _ = yym626 - if false { - } else { - h.encSliceDeployment(([]Deployment)(x.Items), e) - } - } - } - if yyr612 || yy2arr612 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *DeploymentList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym627 := z.DecBinary() - _ = yym627 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct628 := r.ContainerType() - if yyct628 == codecSelferValueTypeMap1234 { - yyl628 := r.ReadMapStart() - if yyl628 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl628, d) - } - } else if yyct628 == codecSelferValueTypeArray1234 { - yyl628 := r.ReadArrayStart() - if yyl628 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl628, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *DeploymentList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys629Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys629Slc - var yyhl629 bool = l >= 0 - for yyj629 := 0; ; yyj629++ { - if yyhl629 { - if yyj629 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys629Slc = r.DecodeBytes(yys629Slc, true, true) - yys629 := string(yys629Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys629 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv632 := &x.ListMeta - yym633 := z.DecBinary() - _ = yym633 - if false { - } else if z.HasExtensions() && z.DecExt(yyv632) { - } else { - z.DecFallback(yyv632, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv634 := &x.Items - yym635 := z.DecBinary() - _ = yym635 - if false { - } else { - h.decSliceDeployment((*[]Deployment)(yyv634), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys629) - } // end switch yys629 - } // end for yyj629 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *DeploymentList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj636 int - var yyb636 bool - var yyhl636 bool = l >= 0 - yyj636++ - if yyhl636 { - yyb636 = yyj636 > l - } else { - yyb636 = r.CheckBreak() - } - if yyb636 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj636++ - if yyhl636 { - yyb636 = yyj636 > l - } else { - yyb636 = r.CheckBreak() - } - if yyb636 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj636++ - if yyhl636 { - yyb636 = yyj636 > l - } else { - yyb636 = r.CheckBreak() - } - if yyb636 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv639 := &x.ListMeta - yym640 := z.DecBinary() - _ = yym640 - if false { - } else if z.HasExtensions() && z.DecExt(yyv639) { - } else { - z.DecFallback(yyv639, false) - } - } - yyj636++ - if yyhl636 { - yyb636 = yyj636 > l - } else { - yyb636 = r.CheckBreak() - } - if yyb636 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv641 := &x.Items - yym642 := z.DecBinary() - _ = yym642 - if false { - } else { - h.decSliceDeployment((*[]Deployment)(yyv641), d) - } - } - for { - yyj636++ - if yyhl636 { - yyb636 = yyj636 > l - } else { - yyb636 = r.CheckBreak() - } - if yyb636 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj636-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *DaemonSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym643 := z.EncBinary() - _ = yym643 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep644 := !z.EncBinary() - yy2arr644 := z.EncBasicHandle().StructToArray - var yyq644 [2]bool - _, _, _ = yysep644, yyq644, yy2arr644 - const yyr644 bool = false - yyq644[0] = x.Selector != nil - var yynn644 int - if yyr644 || yy2arr644 { - r.EncodeArrayStart(2) - } else { - yynn644 = 1 - for _, b := range yyq644 { - if b { - yynn644++ - } - } - r.EncodeMapStart(yynn644) - yynn644 = 0 - } - if yyr644 || yy2arr644 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq644[0] { - if x.Selector == nil { - r.EncodeNil() - } else { - x.Selector.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq644[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Selector == nil { - r.EncodeNil() - } else { - x.Selector.CodecEncodeSelf(e) - } - } - } - if yyr644 || yy2arr644 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy647 := &x.Template - yy647.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("template")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy648 := &x.Template - yy648.CodecEncodeSelf(e) - } - if yyr644 || yy2arr644 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *DaemonSetSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym649 := z.DecBinary() - _ = yym649 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct650 := r.ContainerType() - if yyct650 == codecSelferValueTypeMap1234 { - yyl650 := r.ReadMapStart() - if yyl650 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl650, d) - } - } else if yyct650 == codecSelferValueTypeArray1234 { - yyl650 := r.ReadArrayStart() - if yyl650 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl650, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *DaemonSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys651Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys651Slc - var yyhl651 bool = l >= 0 - for yyj651 := 0; ; yyj651++ { - if yyhl651 { - if yyj651 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys651Slc = r.DecodeBytes(yys651Slc, true, true) - yys651 := string(yys651Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys651 { - case "selector": - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(LabelSelector) - } - x.Selector.CodecDecodeSelf(d) - } - case "template": - if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} - } else { - yyv653 := &x.Template - yyv653.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys651) - } // end switch yys651 - } // end for yyj651 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *DaemonSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj654 int - var yyb654 bool - var yyhl654 bool = l >= 0 - yyj654++ - if yyhl654 { - yyb654 = yyj654 > l - } else { - yyb654 = r.CheckBreak() - } - if yyb654 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(LabelSelector) - } - x.Selector.CodecDecodeSelf(d) - } - yyj654++ - if yyhl654 { - yyb654 = yyj654 > l - } else { - yyb654 = r.CheckBreak() - } - if yyb654 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} - } else { - yyv656 := &x.Template - yyv656.CodecDecodeSelf(d) - } - for { - yyj654++ - if yyhl654 { - yyb654 = yyj654 > l - } else { - yyb654 = r.CheckBreak() - } - if yyb654 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj654-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *DaemonSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym657 := z.EncBinary() - _ = yym657 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep658 := !z.EncBinary() - yy2arr658 := z.EncBasicHandle().StructToArray - var yyq658 [3]bool - _, _, _ = yysep658, yyq658, yy2arr658 - const yyr658 bool = false - var yynn658 int - if yyr658 || yy2arr658 { - r.EncodeArrayStart(3) - } else { - yynn658 = 3 - for _, b := range yyq658 { - if b { - yynn658++ - } - } - r.EncodeMapStart(yynn658) - yynn658 = 0 - } - if yyr658 || yy2arr658 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym660 := z.EncBinary() - _ = yym660 - if false { - } else { - r.EncodeInt(int64(x.CurrentNumberScheduled)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("currentNumberScheduled")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym661 := z.EncBinary() - _ = yym661 - if false { - } else { - r.EncodeInt(int64(x.CurrentNumberScheduled)) - } - } - if yyr658 || yy2arr658 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym663 := z.EncBinary() - _ = yym663 - if false { - } else { - r.EncodeInt(int64(x.NumberMisscheduled)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("numberMisscheduled")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym664 := z.EncBinary() - _ = yym664 - if false { - } else { - r.EncodeInt(int64(x.NumberMisscheduled)) - } - } - if yyr658 || yy2arr658 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym666 := z.EncBinary() - _ = yym666 - if false { - } else { - r.EncodeInt(int64(x.DesiredNumberScheduled)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("desiredNumberScheduled")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym667 := z.EncBinary() - _ = yym667 - if false { - } else { - r.EncodeInt(int64(x.DesiredNumberScheduled)) - } - } - if yyr658 || yy2arr658 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *DaemonSetStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym668 := z.DecBinary() - _ = yym668 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct669 := r.ContainerType() - if yyct669 == codecSelferValueTypeMap1234 { - yyl669 := r.ReadMapStart() - if yyl669 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl669, d) - } - } else if yyct669 == codecSelferValueTypeArray1234 { - yyl669 := r.ReadArrayStart() - if yyl669 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl669, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *DaemonSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys670Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys670Slc - var yyhl670 bool = l >= 0 - for yyj670 := 0; ; yyj670++ { - if yyhl670 { - if yyj670 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys670Slc = r.DecodeBytes(yys670Slc, true, true) - yys670 := string(yys670Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys670 { - case "currentNumberScheduled": - if r.TryDecodeAsNil() { - x.CurrentNumberScheduled = 0 - } else { - x.CurrentNumberScheduled = int32(r.DecodeInt(32)) - } - case "numberMisscheduled": - if r.TryDecodeAsNil() { - x.NumberMisscheduled = 0 - } else { - x.NumberMisscheduled = int32(r.DecodeInt(32)) - } - case "desiredNumberScheduled": - if r.TryDecodeAsNil() { - x.DesiredNumberScheduled = 0 - } else { - x.DesiredNumberScheduled = int32(r.DecodeInt(32)) - } - default: - z.DecStructFieldNotFound(-1, yys670) - } // end switch yys670 - } // end for yyj670 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *DaemonSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj674 int - var yyb674 bool - var yyhl674 bool = l >= 0 - yyj674++ - if yyhl674 { - yyb674 = yyj674 > l - } else { - yyb674 = r.CheckBreak() - } - if yyb674 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CurrentNumberScheduled = 0 - } else { - x.CurrentNumberScheduled = int32(r.DecodeInt(32)) - } - yyj674++ - if yyhl674 { - yyb674 = yyj674 > l - } else { - yyb674 = r.CheckBreak() - } - if yyb674 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.NumberMisscheduled = 0 - } else { - x.NumberMisscheduled = int32(r.DecodeInt(32)) - } - yyj674++ - if yyhl674 { - yyb674 = yyj674 > l - } else { - yyb674 = r.CheckBreak() - } - if yyb674 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.DesiredNumberScheduled = 0 - } else { - x.DesiredNumberScheduled = int32(r.DecodeInt(32)) - } - for { - yyj674++ - if yyhl674 { - yyb674 = yyj674 > l - } else { - yyb674 = r.CheckBreak() - } - if yyb674 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj674-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *DaemonSet) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym678 := z.EncBinary() - _ = yym678 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep679 := !z.EncBinary() - yy2arr679 := z.EncBasicHandle().StructToArray - var yyq679 [5]bool - _, _, _ = yysep679, yyq679, yy2arr679 - const yyr679 bool = false - yyq679[0] = x.Kind != "" - yyq679[1] = x.APIVersion != "" - yyq679[2] = true - yyq679[3] = true - yyq679[4] = true - var yynn679 int - if yyr679 || yy2arr679 { - r.EncodeArrayStart(5) - } else { - yynn679 = 0 - for _, b := range yyq679 { - if b { - yynn679++ - } - } - r.EncodeMapStart(yynn679) - yynn679 = 0 - } - if yyr679 || yy2arr679 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq679[0] { - yym681 := z.EncBinary() - _ = yym681 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq679[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym682 := z.EncBinary() - _ = yym682 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr679 || yy2arr679 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq679[1] { - yym684 := z.EncBinary() - _ = yym684 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq679[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym685 := z.EncBinary() - _ = yym685 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr679 || yy2arr679 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq679[2] { - yy687 := &x.ObjectMeta - yy687.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq679[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy688 := &x.ObjectMeta - yy688.CodecEncodeSelf(e) - } - } - if yyr679 || yy2arr679 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq679[3] { - yy690 := &x.Spec - yy690.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq679[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy691 := &x.Spec - yy691.CodecEncodeSelf(e) - } - } - if yyr679 || yy2arr679 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq679[4] { - yy693 := &x.Status - yy693.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq679[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy694 := &x.Status - yy694.CodecEncodeSelf(e) - } - } - if yyr679 || yy2arr679 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *DaemonSet) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym695 := z.DecBinary() - _ = yym695 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct696 := r.ContainerType() - if yyct696 == codecSelferValueTypeMap1234 { - yyl696 := r.ReadMapStart() - if yyl696 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl696, d) - } - } else if yyct696 == codecSelferValueTypeArray1234 { - yyl696 := r.ReadArrayStart() - if yyl696 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl696, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *DaemonSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys697Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys697Slc - var yyhl697 bool = l >= 0 - for yyj697 := 0; ; yyj697++ { - if yyhl697 { - if yyj697 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys697Slc = r.DecodeBytes(yys697Slc, true, true) - yys697 := string(yys697Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys697 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv700 := &x.ObjectMeta - yyv700.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = DaemonSetSpec{} - } else { - yyv701 := &x.Spec - yyv701.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = DaemonSetStatus{} - } else { - yyv702 := &x.Status - yyv702.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys697) - } // end switch yys697 - } // end for yyj697 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj703 int - var yyb703 bool - var yyhl703 bool = l >= 0 - yyj703++ - if yyhl703 { - yyb703 = yyj703 > l - } else { - yyb703 = r.CheckBreak() - } - if yyb703 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj703++ - if yyhl703 { - yyb703 = yyj703 > l - } else { - yyb703 = r.CheckBreak() - } - if yyb703 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj703++ - if yyhl703 { - yyb703 = yyj703 > l - } else { - yyb703 = r.CheckBreak() - } - if yyb703 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv706 := &x.ObjectMeta - yyv706.CodecDecodeSelf(d) - } - yyj703++ - if yyhl703 { - yyb703 = yyj703 > l - } else { - yyb703 = r.CheckBreak() - } - if yyb703 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = DaemonSetSpec{} - } else { - yyv707 := &x.Spec - yyv707.CodecDecodeSelf(d) - } - yyj703++ - if yyhl703 { - yyb703 = yyj703 > l - } else { - yyb703 = r.CheckBreak() - } - if yyb703 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = DaemonSetStatus{} - } else { - yyv708 := &x.Status - yyv708.CodecDecodeSelf(d) - } - for { - yyj703++ - if yyhl703 { - yyb703 = yyj703 > l - } else { - yyb703 = r.CheckBreak() - } - if yyb703 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj703-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *DaemonSetList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym709 := z.EncBinary() - _ = yym709 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep710 := !z.EncBinary() - yy2arr710 := z.EncBasicHandle().StructToArray - var yyq710 [4]bool - _, _, _ = yysep710, yyq710, yy2arr710 - const yyr710 bool = false - yyq710[0] = x.Kind != "" - yyq710[1] = x.APIVersion != "" - yyq710[2] = true - var yynn710 int - if yyr710 || yy2arr710 { - r.EncodeArrayStart(4) - } else { - yynn710 = 1 - for _, b := range yyq710 { - if b { - yynn710++ - } - } - r.EncodeMapStart(yynn710) - yynn710 = 0 - } - if yyr710 || yy2arr710 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq710[0] { - yym712 := z.EncBinary() - _ = yym712 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq710[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym713 := z.EncBinary() - _ = yym713 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr710 || yy2arr710 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq710[1] { - yym715 := z.EncBinary() - _ = yym715 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq710[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym716 := z.EncBinary() - _ = yym716 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr710 || yy2arr710 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq710[2] { - yy718 := &x.ListMeta - yym719 := z.EncBinary() - _ = yym719 - if false { - } else if z.HasExtensions() && z.EncExt(yy718) { - } else { - z.EncFallback(yy718) - } - } else { - r.EncodeNil() - } - } else { - if yyq710[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy720 := &x.ListMeta - yym721 := z.EncBinary() - _ = yym721 - if false { - } else if z.HasExtensions() && z.EncExt(yy720) { - } else { - z.EncFallback(yy720) - } - } - } - if yyr710 || yy2arr710 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym723 := z.EncBinary() - _ = yym723 - if false { - } else { - h.encSliceDaemonSet(([]DaemonSet)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym724 := z.EncBinary() - _ = yym724 - if false { - } else { - h.encSliceDaemonSet(([]DaemonSet)(x.Items), e) - } - } - } - if yyr710 || yy2arr710 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *DaemonSetList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym725 := z.DecBinary() - _ = yym725 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct726 := r.ContainerType() - if yyct726 == codecSelferValueTypeMap1234 { - yyl726 := r.ReadMapStart() - if yyl726 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl726, d) - } - } else if yyct726 == codecSelferValueTypeArray1234 { - yyl726 := r.ReadArrayStart() - if yyl726 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl726, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *DaemonSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys727Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys727Slc - var yyhl727 bool = l >= 0 - for yyj727 := 0; ; yyj727++ { - if yyhl727 { - if yyj727 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys727Slc = r.DecodeBytes(yys727Slc, true, true) - yys727 := string(yys727Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys727 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv730 := &x.ListMeta - yym731 := z.DecBinary() - _ = yym731 - if false { - } else if z.HasExtensions() && z.DecExt(yyv730) { - } else { - z.DecFallback(yyv730, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv732 := &x.Items - yym733 := z.DecBinary() - _ = yym733 - if false { - } else { - h.decSliceDaemonSet((*[]DaemonSet)(yyv732), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys727) - } // end switch yys727 - } // end for yyj727 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *DaemonSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj734 int - var yyb734 bool - var yyhl734 bool = l >= 0 - yyj734++ - if yyhl734 { - yyb734 = yyj734 > l - } else { - yyb734 = r.CheckBreak() - } - if yyb734 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj734++ - if yyhl734 { - yyb734 = yyj734 > l - } else { - yyb734 = r.CheckBreak() - } - if yyb734 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj734++ - if yyhl734 { - yyb734 = yyj734 > l - } else { - yyb734 = r.CheckBreak() - } - if yyb734 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv737 := &x.ListMeta - yym738 := z.DecBinary() - _ = yym738 - if false { - } else if z.HasExtensions() && z.DecExt(yyv737) { - } else { - z.DecFallback(yyv737, false) - } - } - yyj734++ - if yyhl734 { - yyb734 = yyj734 > l - } else { - yyb734 = r.CheckBreak() - } - if yyb734 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv739 := &x.Items - yym740 := z.DecBinary() - _ = yym740 - if false { - } else { - h.decSliceDaemonSet((*[]DaemonSet)(yyv739), d) - } - } - for { - yyj734++ - if yyhl734 { - yyb734 = yyj734 > l - } else { - yyb734 = r.CheckBreak() - } - if yyb734 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj734-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ThirdPartyResourceDataList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym741 := z.EncBinary() - _ = yym741 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep742 := !z.EncBinary() - yy2arr742 := z.EncBasicHandle().StructToArray - var yyq742 [4]bool - _, _, _ = yysep742, yyq742, yy2arr742 - const yyr742 bool = false - yyq742[0] = x.Kind != "" - yyq742[1] = x.APIVersion != "" - yyq742[2] = true - var yynn742 int - if yyr742 || yy2arr742 { - r.EncodeArrayStart(4) - } else { - yynn742 = 1 - for _, b := range yyq742 { - if b { - yynn742++ - } - } - r.EncodeMapStart(yynn742) - yynn742 = 0 - } - if yyr742 || yy2arr742 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq742[0] { - yym744 := z.EncBinary() - _ = yym744 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq742[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym745 := z.EncBinary() - _ = yym745 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr742 || yy2arr742 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq742[1] { - yym747 := z.EncBinary() - _ = yym747 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq742[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym748 := z.EncBinary() - _ = yym748 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr742 || yy2arr742 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq742[2] { - yy750 := &x.ListMeta - yym751 := z.EncBinary() - _ = yym751 - if false { - } else if z.HasExtensions() && z.EncExt(yy750) { - } else { - z.EncFallback(yy750) - } - } else { - r.EncodeNil() - } - } else { - if yyq742[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy752 := &x.ListMeta - yym753 := z.EncBinary() - _ = yym753 - if false { - } else if z.HasExtensions() && z.EncExt(yy752) { - } else { - z.EncFallback(yy752) - } - } - } - if yyr742 || yy2arr742 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym755 := z.EncBinary() - _ = yym755 - if false { - } else { - h.encSliceThirdPartyResourceData(([]ThirdPartyResourceData)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym756 := z.EncBinary() - _ = yym756 - if false { - } else { - h.encSliceThirdPartyResourceData(([]ThirdPartyResourceData)(x.Items), e) - } - } - } - if yyr742 || yy2arr742 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ThirdPartyResourceDataList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym757 := z.DecBinary() - _ = yym757 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct758 := r.ContainerType() - if yyct758 == codecSelferValueTypeMap1234 { - yyl758 := r.ReadMapStart() - if yyl758 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl758, d) - } - } else if yyct758 == codecSelferValueTypeArray1234 { - yyl758 := r.ReadArrayStart() - if yyl758 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl758, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ThirdPartyResourceDataList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys759Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys759Slc - var yyhl759 bool = l >= 0 - for yyj759 := 0; ; yyj759++ { - if yyhl759 { - if yyj759 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys759Slc = r.DecodeBytes(yys759Slc, true, true) - yys759 := string(yys759Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys759 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv762 := &x.ListMeta - yym763 := z.DecBinary() - _ = yym763 - if false { - } else if z.HasExtensions() && z.DecExt(yyv762) { - } else { - z.DecFallback(yyv762, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv764 := &x.Items - yym765 := z.DecBinary() - _ = yym765 - if false { - } else { - h.decSliceThirdPartyResourceData((*[]ThirdPartyResourceData)(yyv764), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys759) - } // end switch yys759 - } // end for yyj759 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ThirdPartyResourceDataList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj766 int - var yyb766 bool - var yyhl766 bool = l >= 0 - yyj766++ - if yyhl766 { - yyb766 = yyj766 > l - } else { - yyb766 = r.CheckBreak() - } - if yyb766 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj766++ - if yyhl766 { - yyb766 = yyj766 > l - } else { - yyb766 = r.CheckBreak() - } - if yyb766 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj766++ - if yyhl766 { - yyb766 = yyj766 > l - } else { - yyb766 = r.CheckBreak() - } - if yyb766 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv769 := &x.ListMeta - yym770 := z.DecBinary() - _ = yym770 - if false { - } else if z.HasExtensions() && z.DecExt(yyv769) { - } else { - z.DecFallback(yyv769, false) - } - } - yyj766++ - if yyhl766 { - yyb766 = yyj766 > l - } else { - yyb766 = r.CheckBreak() - } - if yyb766 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv771 := &x.Items - yym772 := z.DecBinary() - _ = yym772 - if false { - } else { - h.decSliceThirdPartyResourceData((*[]ThirdPartyResourceData)(yyv771), d) - } - } - for { - yyj766++ - if yyhl766 { - yyb766 = yyj766 > l - } else { - yyb766 = r.CheckBreak() - } - if yyb766 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj766-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym773 := z.EncBinary() - _ = yym773 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep774 := !z.EncBinary() - yy2arr774 := z.EncBasicHandle().StructToArray - var yyq774 [5]bool - _, _, _ = yysep774, yyq774, yy2arr774 - const yyr774 bool = false - yyq774[0] = x.Kind != "" - yyq774[1] = x.APIVersion != "" - yyq774[2] = true - yyq774[3] = true - yyq774[4] = true - var yynn774 int - if yyr774 || yy2arr774 { - r.EncodeArrayStart(5) - } else { - yynn774 = 0 - for _, b := range yyq774 { - if b { - yynn774++ - } - } - r.EncodeMapStart(yynn774) - yynn774 = 0 - } - if yyr774 || yy2arr774 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq774[0] { - yym776 := z.EncBinary() - _ = yym776 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq774[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym777 := z.EncBinary() - _ = yym777 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr774 || yy2arr774 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq774[1] { - yym779 := z.EncBinary() - _ = yym779 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq774[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym780 := z.EncBinary() - _ = yym780 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr774 || yy2arr774 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq774[2] { - yy782 := &x.ObjectMeta - yy782.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq774[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy783 := &x.ObjectMeta - yy783.CodecEncodeSelf(e) - } - } - if yyr774 || yy2arr774 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq774[3] { - yy785 := &x.Spec - yy785.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq774[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy786 := &x.Spec - yy786.CodecEncodeSelf(e) - } - } - if yyr774 || yy2arr774 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq774[4] { - yy788 := &x.Status - yy788.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq774[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy789 := &x.Status - yy789.CodecEncodeSelf(e) - } - } - if yyr774 || yy2arr774 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Job) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym790 := z.DecBinary() - _ = yym790 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct791 := r.ContainerType() - if yyct791 == codecSelferValueTypeMap1234 { - yyl791 := r.ReadMapStart() - if yyl791 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl791, d) - } - } else if yyct791 == codecSelferValueTypeArray1234 { - yyl791 := r.ReadArrayStart() - if yyl791 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl791, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Job) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys792Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys792Slc - var yyhl792 bool = l >= 0 - for yyj792 := 0; ; yyj792++ { - if yyhl792 { - if yyj792 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys792Slc = r.DecodeBytes(yys792Slc, true, true) - yys792 := string(yys792Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys792 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv795 := &x.ObjectMeta - yyv795.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = JobSpec{} - } else { - yyv796 := &x.Spec - yyv796.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = JobStatus{} - } else { - yyv797 := &x.Status - yyv797.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys792) - } // end switch yys792 - } // end for yyj792 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj798 int - var yyb798 bool - var yyhl798 bool = l >= 0 - yyj798++ - if yyhl798 { - yyb798 = yyj798 > l - } else { - yyb798 = r.CheckBreak() - } - if yyb798 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj798++ - if yyhl798 { - yyb798 = yyj798 > l - } else { - yyb798 = r.CheckBreak() - } - if yyb798 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj798++ - if yyhl798 { - yyb798 = yyj798 > l - } else { - yyb798 = r.CheckBreak() - } - if yyb798 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv801 := &x.ObjectMeta - yyv801.CodecDecodeSelf(d) - } - yyj798++ - if yyhl798 { - yyb798 = yyj798 > l - } else { - yyb798 = r.CheckBreak() - } - if yyb798 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = JobSpec{} - } else { - yyv802 := &x.Spec - yyv802.CodecDecodeSelf(d) - } - yyj798++ - if yyhl798 { - yyb798 = yyj798 > l - } else { - yyb798 = r.CheckBreak() - } - if yyb798 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = JobStatus{} - } else { - yyv803 := &x.Status - yyv803.CodecDecodeSelf(d) - } - for { - yyj798++ - if yyhl798 { - yyb798 = yyj798 > l - } else { - yyb798 = r.CheckBreak() - } - if yyb798 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj798-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym804 := z.EncBinary() - _ = yym804 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep805 := !z.EncBinary() - yy2arr805 := z.EncBasicHandle().StructToArray - var yyq805 [4]bool - _, _, _ = yysep805, yyq805, yy2arr805 - const yyr805 bool = false - yyq805[0] = x.Kind != "" - yyq805[1] = x.APIVersion != "" - yyq805[2] = true - var yynn805 int - if yyr805 || yy2arr805 { - r.EncodeArrayStart(4) - } else { - yynn805 = 1 - for _, b := range yyq805 { - if b { - yynn805++ - } - } - r.EncodeMapStart(yynn805) - yynn805 = 0 - } - if yyr805 || yy2arr805 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq805[0] { - yym807 := z.EncBinary() - _ = yym807 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq805[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym808 := z.EncBinary() - _ = yym808 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr805 || yy2arr805 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq805[1] { - yym810 := z.EncBinary() - _ = yym810 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq805[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym811 := z.EncBinary() - _ = yym811 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr805 || yy2arr805 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq805[2] { - yy813 := &x.ListMeta - yym814 := z.EncBinary() - _ = yym814 - if false { - } else if z.HasExtensions() && z.EncExt(yy813) { - } else { - z.EncFallback(yy813) - } - } else { - r.EncodeNil() - } - } else { - if yyq805[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy815 := &x.ListMeta - yym816 := z.EncBinary() - _ = yym816 - if false { - } else if z.HasExtensions() && z.EncExt(yy815) { - } else { - z.EncFallback(yy815) - } - } - } - if yyr805 || yy2arr805 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym818 := z.EncBinary() - _ = yym818 - if false { - } else { - h.encSliceJob(([]Job)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym819 := z.EncBinary() - _ = yym819 - if false { - } else { - h.encSliceJob(([]Job)(x.Items), e) - } - } - } - if yyr805 || yy2arr805 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym820 := z.DecBinary() - _ = yym820 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct821 := r.ContainerType() - if yyct821 == codecSelferValueTypeMap1234 { - yyl821 := r.ReadMapStart() - if yyl821 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl821, d) - } - } else if yyct821 == codecSelferValueTypeArray1234 { - yyl821 := r.ReadArrayStart() - if yyl821 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl821, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys822Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys822Slc - var yyhl822 bool = l >= 0 - for yyj822 := 0; ; yyj822++ { - if yyhl822 { - if yyj822 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys822Slc = r.DecodeBytes(yys822Slc, true, true) - yys822 := string(yys822Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys822 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv825 := &x.ListMeta - yym826 := z.DecBinary() - _ = yym826 - if false { - } else if z.HasExtensions() && z.DecExt(yyv825) { - } else { - z.DecFallback(yyv825, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv827 := &x.Items - yym828 := z.DecBinary() - _ = yym828 - if false { - } else { - h.decSliceJob((*[]Job)(yyv827), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys822) - } // end switch yys822 - } // end for yyj822 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj829 int - var yyb829 bool - var yyhl829 bool = l >= 0 - yyj829++ - if yyhl829 { - yyb829 = yyj829 > l - } else { - yyb829 = r.CheckBreak() - } - if yyb829 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj829++ - if yyhl829 { - yyb829 = yyj829 > l - } else { - yyb829 = r.CheckBreak() - } - if yyb829 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj829++ - if yyhl829 { - yyb829 = yyj829 > l - } else { - yyb829 = r.CheckBreak() - } - if yyb829 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv832 := &x.ListMeta - yym833 := z.DecBinary() - _ = yym833 - if false { - } else if z.HasExtensions() && z.DecExt(yyv832) { - } else { - z.DecFallback(yyv832, false) - } - } - yyj829++ - if yyhl829 { - yyb829 = yyj829 > l - } else { - yyb829 = r.CheckBreak() - } - if yyb829 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv834 := &x.Items - yym835 := z.DecBinary() - _ = yym835 - if false { - } else { - h.decSliceJob((*[]Job)(yyv834), d) - } - } - for { - yyj829++ - if yyhl829 { - yyb829 = yyj829 > l - } else { - yyb829 = r.CheckBreak() - } - if yyb829 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj829-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym836 := z.EncBinary() - _ = yym836 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep837 := !z.EncBinary() - yy2arr837 := z.EncBasicHandle().StructToArray - var yyq837 [6]bool - _, _, _ = yysep837, yyq837, yy2arr837 - const yyr837 bool = false - yyq837[0] = x.Parallelism != nil - yyq837[1] = x.Completions != nil - yyq837[2] = x.ActiveDeadlineSeconds != nil - yyq837[3] = x.Selector != nil - yyq837[4] = x.AutoSelector != nil - var yynn837 int - if yyr837 || yy2arr837 { - r.EncodeArrayStart(6) - } else { - yynn837 = 1 - for _, b := range yyq837 { - if b { - yynn837++ - } - } - r.EncodeMapStart(yynn837) - yynn837 = 0 - } - if yyr837 || yy2arr837 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq837[0] { - if x.Parallelism == nil { - r.EncodeNil() - } else { - yy839 := *x.Parallelism - yym840 := z.EncBinary() - _ = yym840 - if false { - } else { - r.EncodeInt(int64(yy839)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq837[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("parallelism")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Parallelism == nil { - r.EncodeNil() - } else { - yy841 := *x.Parallelism - yym842 := z.EncBinary() - _ = yym842 - if false { - } else { - r.EncodeInt(int64(yy841)) - } - } - } - } - if yyr837 || yy2arr837 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq837[1] { - if x.Completions == nil { - r.EncodeNil() - } else { - yy844 := *x.Completions - yym845 := z.EncBinary() - _ = yym845 - if false { - } else { - r.EncodeInt(int64(yy844)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq837[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("completions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Completions == nil { - r.EncodeNil() - } else { - yy846 := *x.Completions - yym847 := z.EncBinary() - _ = yym847 - if false { - } else { - r.EncodeInt(int64(yy846)) - } - } - } - } - if yyr837 || yy2arr837 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq837[2] { - if x.ActiveDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy849 := *x.ActiveDeadlineSeconds - yym850 := z.EncBinary() - _ = yym850 - if false { - } else { - r.EncodeInt(int64(yy849)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq837[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("activeDeadlineSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.ActiveDeadlineSeconds == nil { - r.EncodeNil() - } else { - yy851 := *x.ActiveDeadlineSeconds - yym852 := z.EncBinary() - _ = yym852 - if false { - } else { - r.EncodeInt(int64(yy851)) - } - } - } - } - if yyr837 || yy2arr837 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq837[3] { - if x.Selector == nil { - r.EncodeNil() - } else { - x.Selector.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq837[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Selector == nil { - r.EncodeNil() - } else { - x.Selector.CodecEncodeSelf(e) - } - } - } - if yyr837 || yy2arr837 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq837[4] { - if x.AutoSelector == nil { - r.EncodeNil() - } else { - yy855 := *x.AutoSelector - yym856 := z.EncBinary() - _ = yym856 - if false { - } else { - r.EncodeBool(bool(yy855)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq837[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("autoSelector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.AutoSelector == nil { - r.EncodeNil() - } else { - yy857 := *x.AutoSelector - yym858 := z.EncBinary() - _ = yym858 - if false { - } else { - r.EncodeBool(bool(yy857)) - } - } - } - } - if yyr837 || yy2arr837 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy860 := &x.Template - yy860.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("template")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy861 := &x.Template - yy861.CodecEncodeSelf(e) - } - if yyr837 || yy2arr837 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym862 := z.DecBinary() - _ = yym862 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct863 := r.ContainerType() - if yyct863 == codecSelferValueTypeMap1234 { - yyl863 := r.ReadMapStart() - if yyl863 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl863, d) - } - } else if yyct863 == codecSelferValueTypeArray1234 { - yyl863 := r.ReadArrayStart() - if yyl863 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl863, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys864Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys864Slc - var yyhl864 bool = l >= 0 - for yyj864 := 0; ; yyj864++ { - if yyhl864 { - if yyj864 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys864Slc = r.DecodeBytes(yys864Slc, true, true) - yys864 := string(yys864Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys864 { - case "parallelism": - if r.TryDecodeAsNil() { - if x.Parallelism != nil { - x.Parallelism = nil - } - } else { - if x.Parallelism == nil { - x.Parallelism = new(int32) - } - yym866 := z.DecBinary() - _ = yym866 - if false { - } else { - *((*int32)(x.Parallelism)) = int32(r.DecodeInt(32)) - } - } - case "completions": - if r.TryDecodeAsNil() { - if x.Completions != nil { - x.Completions = nil - } - } else { - if x.Completions == nil { - x.Completions = new(int32) - } - yym868 := z.DecBinary() - _ = yym868 - if false { - } else { - *((*int32)(x.Completions)) = int32(r.DecodeInt(32)) - } - } - case "activeDeadlineSeconds": - if r.TryDecodeAsNil() { - if x.ActiveDeadlineSeconds != nil { - x.ActiveDeadlineSeconds = nil - } - } else { - if x.ActiveDeadlineSeconds == nil { - x.ActiveDeadlineSeconds = new(int64) - } - yym870 := z.DecBinary() - _ = yym870 - if false { - } else { - *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) - } - } - case "selector": - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(LabelSelector) - } - x.Selector.CodecDecodeSelf(d) - } - case "autoSelector": - if r.TryDecodeAsNil() { - if x.AutoSelector != nil { - x.AutoSelector = nil - } - } else { - if x.AutoSelector == nil { - x.AutoSelector = new(bool) - } - yym873 := z.DecBinary() - _ = yym873 - if false { - } else { - *((*bool)(x.AutoSelector)) = r.DecodeBool() - } - } - case "template": - if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} - } else { - yyv874 := &x.Template - yyv874.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys864) - } // end switch yys864 - } // end for yyj864 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj875 int - var yyb875 bool - var yyhl875 bool = l >= 0 - yyj875++ - if yyhl875 { - yyb875 = yyj875 > l - } else { - yyb875 = r.CheckBreak() - } - if yyb875 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Parallelism != nil { - x.Parallelism = nil - } - } else { - if x.Parallelism == nil { - x.Parallelism = new(int32) - } - yym877 := z.DecBinary() - _ = yym877 - if false { - } else { - *((*int32)(x.Parallelism)) = int32(r.DecodeInt(32)) - } - } - yyj875++ - if yyhl875 { - yyb875 = yyj875 > l - } else { - yyb875 = r.CheckBreak() - } - if yyb875 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Completions != nil { - x.Completions = nil - } - } else { - if x.Completions == nil { - x.Completions = new(int32) - } - yym879 := z.DecBinary() - _ = yym879 - if false { - } else { - *((*int32)(x.Completions)) = int32(r.DecodeInt(32)) - } - } - yyj875++ - if yyhl875 { - yyb875 = yyj875 > l - } else { - yyb875 = r.CheckBreak() - } - if yyb875 { - 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) - } - yym881 := z.DecBinary() - _ = yym881 - if false { - } else { - *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) - } - } - yyj875++ - if yyhl875 { - yyb875 = yyj875 > l - } else { - yyb875 = r.CheckBreak() - } - if yyb875 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(LabelSelector) - } - x.Selector.CodecDecodeSelf(d) - } - yyj875++ - if yyhl875 { - yyb875 = yyj875 > l - } else { - yyb875 = r.CheckBreak() - } - if yyb875 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.AutoSelector != nil { - x.AutoSelector = nil - } - } else { - if x.AutoSelector == nil { - x.AutoSelector = new(bool) - } - yym884 := z.DecBinary() - _ = yym884 - if false { - } else { - *((*bool)(x.AutoSelector)) = r.DecodeBool() - } - } - yyj875++ - if yyhl875 { - yyb875 = yyj875 > l - } else { - yyb875 = r.CheckBreak() - } - if yyb875 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} - } else { - yyv885 := &x.Template - yyv885.CodecDecodeSelf(d) - } - for { - yyj875++ - if yyhl875 { - yyb875 = yyj875 > l - } else { - yyb875 = r.CheckBreak() - } - if yyb875 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj875-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *JobStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym886 := z.EncBinary() - _ = yym886 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep887 := !z.EncBinary() - yy2arr887 := z.EncBasicHandle().StructToArray - var yyq887 [6]bool - _, _, _ = yysep887, yyq887, yy2arr887 - const yyr887 bool = false - yyq887[0] = len(x.Conditions) != 0 - yyq887[1] = x.StartTime != nil - yyq887[2] = x.CompletionTime != nil - yyq887[3] = x.Active != 0 - yyq887[4] = x.Succeeded != 0 - yyq887[5] = x.Failed != 0 - var yynn887 int - if yyr887 || yy2arr887 { - r.EncodeArrayStart(6) - } else { - yynn887 = 0 - for _, b := range yyq887 { - if b { - yynn887++ - } - } - r.EncodeMapStart(yynn887) - yynn887 = 0 - } - if yyr887 || yy2arr887 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq887[0] { - if x.Conditions == nil { - r.EncodeNil() - } else { - yym889 := z.EncBinary() - _ = yym889 - if false { - } else { - h.encSliceJobCondition(([]JobCondition)(x.Conditions), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq887[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("conditions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Conditions == nil { - r.EncodeNil() - } else { - yym890 := z.EncBinary() - _ = yym890 - if false { - } else { - h.encSliceJobCondition(([]JobCondition)(x.Conditions), e) - } - } - } - } - if yyr887 || yy2arr887 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq887[1] { - if x.StartTime == nil { - r.EncodeNil() - } else { - yym892 := z.EncBinary() - _ = yym892 - if false { - } else if z.HasExtensions() && z.EncExt(x.StartTime) { - } else if yym892 { - z.EncBinaryMarshal(x.StartTime) - } else if !yym892 && z.IsJSONHandle() { - z.EncJSONMarshal(x.StartTime) - } else { - z.EncFallback(x.StartTime) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq887[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("startTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.StartTime == nil { - r.EncodeNil() - } else { - yym893 := z.EncBinary() - _ = yym893 - if false { - } else if z.HasExtensions() && z.EncExt(x.StartTime) { - } else if yym893 { - z.EncBinaryMarshal(x.StartTime) - } else if !yym893 && z.IsJSONHandle() { - z.EncJSONMarshal(x.StartTime) - } else { - z.EncFallback(x.StartTime) - } - } - } - } - if yyr887 || yy2arr887 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq887[2] { - if x.CompletionTime == nil { - r.EncodeNil() - } else { - yym895 := z.EncBinary() - _ = yym895 - if false { - } else if z.HasExtensions() && z.EncExt(x.CompletionTime) { - } else if yym895 { - z.EncBinaryMarshal(x.CompletionTime) - } else if !yym895 && z.IsJSONHandle() { - z.EncJSONMarshal(x.CompletionTime) - } else { - z.EncFallback(x.CompletionTime) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq887[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("completionTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.CompletionTime == nil { - r.EncodeNil() - } else { - yym896 := z.EncBinary() - _ = yym896 - if false { - } else if z.HasExtensions() && z.EncExt(x.CompletionTime) { - } else if yym896 { - z.EncBinaryMarshal(x.CompletionTime) - } else if !yym896 && z.IsJSONHandle() { - z.EncJSONMarshal(x.CompletionTime) - } else { - z.EncFallback(x.CompletionTime) - } - } - } - } - if yyr887 || yy2arr887 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq887[3] { - yym898 := z.EncBinary() - _ = yym898 - if false { - } else { - r.EncodeInt(int64(x.Active)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq887[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("active")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym899 := z.EncBinary() - _ = yym899 - if false { - } else { - r.EncodeInt(int64(x.Active)) - } - } - } - if yyr887 || yy2arr887 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq887[4] { - yym901 := z.EncBinary() - _ = yym901 - if false { - } else { - r.EncodeInt(int64(x.Succeeded)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq887[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("succeeded")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym902 := z.EncBinary() - _ = yym902 - if false { - } else { - r.EncodeInt(int64(x.Succeeded)) - } - } - } - if yyr887 || yy2arr887 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq887[5] { - yym904 := z.EncBinary() - _ = yym904 - if false { - } else { - r.EncodeInt(int64(x.Failed)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq887[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("failed")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym905 := z.EncBinary() - _ = yym905 - if false { - } else { - r.EncodeInt(int64(x.Failed)) - } - } - } - if yyr887 || yy2arr887 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym906 := z.DecBinary() - _ = yym906 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct907 := r.ContainerType() - if yyct907 == codecSelferValueTypeMap1234 { - yyl907 := r.ReadMapStart() - if yyl907 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl907, d) - } - } else if yyct907 == codecSelferValueTypeArray1234 { - yyl907 := r.ReadArrayStart() - if yyl907 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl907, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys908Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys908Slc - var yyhl908 bool = l >= 0 - for yyj908 := 0; ; yyj908++ { - if yyhl908 { - if yyj908 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys908Slc = r.DecodeBytes(yys908Slc, true, true) - yys908 := string(yys908Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys908 { - case "conditions": - if r.TryDecodeAsNil() { - x.Conditions = nil - } else { - yyv909 := &x.Conditions - yym910 := z.DecBinary() - _ = yym910 - if false { - } else { - h.decSliceJobCondition((*[]JobCondition)(yyv909), d) - } - } - case "startTime": - if r.TryDecodeAsNil() { - if x.StartTime != nil { - x.StartTime = nil - } - } else { - if x.StartTime == nil { - x.StartTime = new(pkg1_unversioned.Time) - } - yym912 := z.DecBinary() - _ = yym912 - if false { - } else if z.HasExtensions() && z.DecExt(x.StartTime) { - } else if yym912 { - z.DecBinaryUnmarshal(x.StartTime) - } else if !yym912 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.StartTime) - } else { - z.DecFallback(x.StartTime, false) - } - } - case "completionTime": - if r.TryDecodeAsNil() { - if x.CompletionTime != nil { - x.CompletionTime = nil - } - } else { - if x.CompletionTime == nil { - x.CompletionTime = new(pkg1_unversioned.Time) - } - yym914 := z.DecBinary() - _ = yym914 - if false { - } else if z.HasExtensions() && z.DecExt(x.CompletionTime) { - } else if yym914 { - z.DecBinaryUnmarshal(x.CompletionTime) - } else if !yym914 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.CompletionTime) - } else { - z.DecFallback(x.CompletionTime, false) - } - } - case "active": - if r.TryDecodeAsNil() { - x.Active = 0 - } else { - x.Active = int32(r.DecodeInt(32)) - } - case "succeeded": - if r.TryDecodeAsNil() { - x.Succeeded = 0 - } else { - x.Succeeded = int32(r.DecodeInt(32)) - } - case "failed": - if r.TryDecodeAsNil() { - x.Failed = 0 - } else { - x.Failed = int32(r.DecodeInt(32)) - } - default: - z.DecStructFieldNotFound(-1, yys908) - } // end switch yys908 - } // end for yyj908 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj918 int - var yyb918 bool - var yyhl918 bool = l >= 0 - yyj918++ - if yyhl918 { - yyb918 = yyj918 > l - } else { - yyb918 = r.CheckBreak() - } - if yyb918 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Conditions = nil - } else { - yyv919 := &x.Conditions - yym920 := z.DecBinary() - _ = yym920 - if false { - } else { - h.decSliceJobCondition((*[]JobCondition)(yyv919), d) - } - } - yyj918++ - if yyhl918 { - yyb918 = yyj918 > l - } else { - yyb918 = r.CheckBreak() - } - if yyb918 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.StartTime != nil { - x.StartTime = nil - } - } else { - if x.StartTime == nil { - x.StartTime = new(pkg1_unversioned.Time) - } - yym922 := z.DecBinary() - _ = yym922 - if false { - } else if z.HasExtensions() && z.DecExt(x.StartTime) { - } else if yym922 { - z.DecBinaryUnmarshal(x.StartTime) - } else if !yym922 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.StartTime) - } else { - z.DecFallback(x.StartTime, false) - } - } - yyj918++ - if yyhl918 { - yyb918 = yyj918 > l - } else { - yyb918 = r.CheckBreak() - } - if yyb918 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.CompletionTime != nil { - x.CompletionTime = nil - } - } else { - if x.CompletionTime == nil { - x.CompletionTime = new(pkg1_unversioned.Time) - } - yym924 := z.DecBinary() - _ = yym924 - if false { - } else if z.HasExtensions() && z.DecExt(x.CompletionTime) { - } else if yym924 { - z.DecBinaryUnmarshal(x.CompletionTime) - } else if !yym924 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.CompletionTime) - } else { - z.DecFallback(x.CompletionTime, false) - } - } - yyj918++ - if yyhl918 { - yyb918 = yyj918 > l - } else { - yyb918 = r.CheckBreak() - } - if yyb918 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Active = 0 - } else { - x.Active = int32(r.DecodeInt(32)) - } - yyj918++ - if yyhl918 { - yyb918 = yyj918 > l - } else { - yyb918 = r.CheckBreak() - } - if yyb918 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Succeeded = 0 - } else { - x.Succeeded = int32(r.DecodeInt(32)) - } - yyj918++ - if yyhl918 { - yyb918 = yyj918 > l - } else { - yyb918 = r.CheckBreak() - } - if yyb918 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Failed = 0 - } else { - x.Failed = int32(r.DecodeInt(32)) - } - for { - yyj918++ - if yyhl918 { - yyb918 = yyj918 > l - } else { - yyb918 = r.CheckBreak() - } - if yyb918 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj918-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x JobConditionType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym928 := z.EncBinary() - _ = yym928 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *JobConditionType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym929 := z.DecBinary() - _ = yym929 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *JobCondition) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym930 := z.EncBinary() - _ = yym930 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep931 := !z.EncBinary() - yy2arr931 := z.EncBasicHandle().StructToArray - var yyq931 [6]bool - _, _, _ = yysep931, yyq931, yy2arr931 - const yyr931 bool = false - yyq931[2] = true - yyq931[3] = true - yyq931[4] = x.Reason != "" - yyq931[5] = x.Message != "" - var yynn931 int - if yyr931 || yy2arr931 { - r.EncodeArrayStart(6) - } else { - yynn931 = 2 - for _, b := range yyq931 { - if b { - yynn931++ - } - } - r.EncodeMapStart(yynn931) - yynn931 = 0 - } - if yyr931 || yy2arr931 { - 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 yyr931 || yy2arr931 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym934 := z.EncBinary() - _ = yym934 - if false { - } else if z.HasExtensions() && z.EncExt(x.Status) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Status)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym935 := z.EncBinary() - _ = yym935 - if false { - } else if z.HasExtensions() && z.EncExt(x.Status) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Status)) - } - } - if yyr931 || yy2arr931 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq931[2] { - yy937 := &x.LastProbeTime - yym938 := z.EncBinary() - _ = yym938 - if false { - } else if z.HasExtensions() && z.EncExt(yy937) { - } else if yym938 { - z.EncBinaryMarshal(yy937) - } else if !yym938 && z.IsJSONHandle() { - z.EncJSONMarshal(yy937) - } else { - z.EncFallback(yy937) - } - } else { - r.EncodeNil() - } - } else { - if yyq931[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastProbeTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy939 := &x.LastProbeTime - yym940 := z.EncBinary() - _ = yym940 - if false { - } else if z.HasExtensions() && z.EncExt(yy939) { - } else if yym940 { - z.EncBinaryMarshal(yy939) - } else if !yym940 && z.IsJSONHandle() { - z.EncJSONMarshal(yy939) - } else { - z.EncFallback(yy939) - } - } - } - if yyr931 || yy2arr931 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq931[3] { - yy942 := &x.LastTransitionTime - yym943 := z.EncBinary() - _ = yym943 - if false { - } else if z.HasExtensions() && z.EncExt(yy942) { - } else if yym943 { - z.EncBinaryMarshal(yy942) - } else if !yym943 && z.IsJSONHandle() { - z.EncJSONMarshal(yy942) - } else { - z.EncFallback(yy942) - } - } else { - r.EncodeNil() - } - } else { - if yyq931[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy944 := &x.LastTransitionTime - yym945 := z.EncBinary() - _ = yym945 - if false { - } else if z.HasExtensions() && z.EncExt(yy944) { - } else if yym945 { - z.EncBinaryMarshal(yy944) - } else if !yym945 && z.IsJSONHandle() { - z.EncJSONMarshal(yy944) - } else { - z.EncFallback(yy944) - } - } - } - if yyr931 || yy2arr931 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq931[4] { - yym947 := z.EncBinary() - _ = yym947 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq931[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("reason")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym948 := z.EncBinary() - _ = yym948 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) - } - } - } - if yyr931 || yy2arr931 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq931[5] { - yym950 := z.EncBinary() - _ = yym950 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq931[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("message")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym951 := z.EncBinary() - _ = yym951 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Message)) - } - } - } - if yyr931 || yy2arr931 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *JobCondition) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym952 := z.DecBinary() - _ = yym952 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct953 := r.ContainerType() - if yyct953 == codecSelferValueTypeMap1234 { - yyl953 := r.ReadMapStart() - if yyl953 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl953, d) - } - } else if yyct953 == codecSelferValueTypeArray1234 { - yyl953 := r.ReadArrayStart() - if yyl953 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl953, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *JobCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys954Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys954Slc - var yyhl954 bool = l >= 0 - for yyj954 := 0; ; yyj954++ { - if yyhl954 { - if yyj954 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys954Slc = r.DecodeBytes(yys954Slc, true, true) - yys954 := string(yys954Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys954 { - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = JobConditionType(r.DecodeString()) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = pkg2_v1.ConditionStatus(r.DecodeString()) - } - case "lastProbeTime": - if r.TryDecodeAsNil() { - x.LastProbeTime = pkg1_unversioned.Time{} - } else { - yyv957 := &x.LastProbeTime - yym958 := z.DecBinary() - _ = yym958 - if false { - } else if z.HasExtensions() && z.DecExt(yyv957) { - } else if yym958 { - z.DecBinaryUnmarshal(yyv957) - } else if !yym958 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv957) - } else { - z.DecFallback(yyv957, false) - } - } - case "lastTransitionTime": - if r.TryDecodeAsNil() { - x.LastTransitionTime = pkg1_unversioned.Time{} - } else { - yyv959 := &x.LastTransitionTime - yym960 := z.DecBinary() - _ = yym960 - if false { - } else if z.HasExtensions() && z.DecExt(yyv959) { - } else if yym960 { - z.DecBinaryUnmarshal(yyv959) - } else if !yym960 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv959) - } else { - z.DecFallback(yyv959, 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, yys954) - } // end switch yys954 - } // end for yyj954 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *JobCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj963 int - var yyb963 bool - var yyhl963 bool = l >= 0 - yyj963++ - if yyhl963 { - yyb963 = yyj963 > l - } else { - yyb963 = r.CheckBreak() - } - if yyb963 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = JobConditionType(r.DecodeString()) - } - yyj963++ - if yyhl963 { - yyb963 = yyj963 > l - } else { - yyb963 = r.CheckBreak() - } - if yyb963 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = pkg2_v1.ConditionStatus(r.DecodeString()) - } - yyj963++ - if yyhl963 { - yyb963 = yyj963 > l - } else { - yyb963 = r.CheckBreak() - } - if yyb963 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastProbeTime = pkg1_unversioned.Time{} - } else { - yyv966 := &x.LastProbeTime - yym967 := z.DecBinary() - _ = yym967 - if false { - } else if z.HasExtensions() && z.DecExt(yyv966) { - } else if yym967 { - z.DecBinaryUnmarshal(yyv966) - } else if !yym967 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv966) - } else { - z.DecFallback(yyv966, false) - } - } - yyj963++ - if yyhl963 { - yyb963 = yyj963 > l - } else { - yyb963 = r.CheckBreak() - } - if yyb963 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastTransitionTime = pkg1_unversioned.Time{} - } else { - yyv968 := &x.LastTransitionTime - yym969 := z.DecBinary() - _ = yym969 - if false { - } else if z.HasExtensions() && z.DecExt(yyv968) { - } else if yym969 { - z.DecBinaryUnmarshal(yyv968) - } else if !yym969 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv968) - } else { - z.DecFallback(yyv968, false) - } - } - yyj963++ - if yyhl963 { - yyb963 = yyj963 > l - } else { - yyb963 = r.CheckBreak() - } - if yyb963 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Reason = "" - } else { - x.Reason = string(r.DecodeString()) - } - yyj963++ - if yyhl963 { - yyb963 = yyj963 > l - } else { - yyb963 = r.CheckBreak() - } - if yyb963 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = string(r.DecodeString()) - } - for { - yyj963++ - if yyhl963 { - yyb963 = yyj963 > l - } else { - yyb963 = r.CheckBreak() - } - if yyb963 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj963-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *Ingress) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym972 := z.EncBinary() - _ = yym972 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep973 := !z.EncBinary() - yy2arr973 := z.EncBasicHandle().StructToArray - var yyq973 [5]bool - _, _, _ = yysep973, yyq973, yy2arr973 - const yyr973 bool = false - yyq973[0] = x.Kind != "" - yyq973[1] = x.APIVersion != "" - yyq973[2] = true - yyq973[3] = true - yyq973[4] = true - var yynn973 int - if yyr973 || yy2arr973 { - r.EncodeArrayStart(5) - } else { - yynn973 = 0 - for _, b := range yyq973 { - if b { - yynn973++ - } - } - r.EncodeMapStart(yynn973) - yynn973 = 0 - } - if yyr973 || yy2arr973 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq973[0] { - yym975 := z.EncBinary() - _ = yym975 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq973[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym976 := z.EncBinary() - _ = yym976 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr973 || yy2arr973 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq973[1] { - yym978 := z.EncBinary() - _ = yym978 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq973[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym979 := z.EncBinary() - _ = yym979 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr973 || yy2arr973 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq973[2] { - yy981 := &x.ObjectMeta - yy981.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq973[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy982 := &x.ObjectMeta - yy982.CodecEncodeSelf(e) - } - } - if yyr973 || yy2arr973 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq973[3] { - yy984 := &x.Spec - yy984.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq973[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy985 := &x.Spec - yy985.CodecEncodeSelf(e) - } - } - if yyr973 || yy2arr973 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq973[4] { - yy987 := &x.Status - yy987.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq973[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy988 := &x.Status - yy988.CodecEncodeSelf(e) - } - } - if yyr973 || yy2arr973 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Ingress) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym989 := z.DecBinary() - _ = yym989 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct990 := r.ContainerType() - if yyct990 == codecSelferValueTypeMap1234 { - yyl990 := r.ReadMapStart() - if yyl990 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl990, d) - } - } else if yyct990 == codecSelferValueTypeArray1234 { - yyl990 := r.ReadArrayStart() - if yyl990 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl990, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Ingress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys991Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys991Slc - var yyhl991 bool = l >= 0 - for yyj991 := 0; ; yyj991++ { - if yyhl991 { - if yyj991 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys991Slc = r.DecodeBytes(yys991Slc, true, true) - yys991 := string(yys991Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys991 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv994 := &x.ObjectMeta - yyv994.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = IngressSpec{} - } else { - yyv995 := &x.Spec - yyv995.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = IngressStatus{} - } else { - yyv996 := &x.Status - yyv996.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys991) - } // end switch yys991 - } // end for yyj991 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj997 int - var yyb997 bool - var yyhl997 bool = l >= 0 - yyj997++ - if yyhl997 { - yyb997 = yyj997 > l - } else { - yyb997 = r.CheckBreak() - } - if yyb997 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj997++ - if yyhl997 { - yyb997 = yyj997 > l - } else { - yyb997 = r.CheckBreak() - } - if yyb997 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj997++ - if yyhl997 { - yyb997 = yyj997 > l - } else { - yyb997 = r.CheckBreak() - } - if yyb997 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv1000 := &x.ObjectMeta - yyv1000.CodecDecodeSelf(d) - } - yyj997++ - if yyhl997 { - yyb997 = yyj997 > l - } else { - yyb997 = r.CheckBreak() - } - if yyb997 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = IngressSpec{} - } else { - yyv1001 := &x.Spec - yyv1001.CodecDecodeSelf(d) - } - yyj997++ - if yyhl997 { - yyb997 = yyj997 > l - } else { - yyb997 = r.CheckBreak() - } - if yyb997 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = IngressStatus{} - } else { - yyv1002 := &x.Status - yyv1002.CodecDecodeSelf(d) - } - for { - yyj997++ - if yyhl997 { - yyb997 = yyj997 > l - } else { - yyb997 = r.CheckBreak() - } - if yyb997 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj997-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *IngressList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1003 := z.EncBinary() - _ = yym1003 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1004 := !z.EncBinary() - yy2arr1004 := z.EncBasicHandle().StructToArray - var yyq1004 [4]bool - _, _, _ = yysep1004, yyq1004, yy2arr1004 - const yyr1004 bool = false - yyq1004[0] = x.Kind != "" - yyq1004[1] = x.APIVersion != "" - yyq1004[2] = true - var yynn1004 int - if yyr1004 || yy2arr1004 { - r.EncodeArrayStart(4) - } else { - yynn1004 = 1 - for _, b := range yyq1004 { - if b { - yynn1004++ - } - } - r.EncodeMapStart(yynn1004) - yynn1004 = 0 - } - if yyr1004 || yy2arr1004 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1004[0] { - yym1006 := z.EncBinary() - _ = yym1006 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1004[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1007 := z.EncBinary() - _ = yym1007 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr1004 || yy2arr1004 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1004[1] { - yym1009 := z.EncBinary() - _ = yym1009 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1004[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1010 := z.EncBinary() - _ = yym1010 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr1004 || yy2arr1004 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1004[2] { - yy1012 := &x.ListMeta - yym1013 := z.EncBinary() - _ = yym1013 - if false { - } else if z.HasExtensions() && z.EncExt(yy1012) { - } else { - z.EncFallback(yy1012) - } - } else { - r.EncodeNil() - } - } else { - if yyq1004[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1014 := &x.ListMeta - yym1015 := z.EncBinary() - _ = yym1015 - if false { - } else if z.HasExtensions() && z.EncExt(yy1014) { - } else { - z.EncFallback(yy1014) - } - } - } - if yyr1004 || yy2arr1004 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym1017 := z.EncBinary() - _ = yym1017 - if false { - } else { - h.encSliceIngress(([]Ingress)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym1018 := z.EncBinary() - _ = yym1018 - if false { - } else { - h.encSliceIngress(([]Ingress)(x.Items), e) - } - } - } - if yyr1004 || yy2arr1004 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *IngressList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1019 := z.DecBinary() - _ = yym1019 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1020 := r.ContainerType() - if yyct1020 == codecSelferValueTypeMap1234 { - yyl1020 := r.ReadMapStart() - if yyl1020 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1020, d) - } - } else if yyct1020 == codecSelferValueTypeArray1234 { - yyl1020 := r.ReadArrayStart() - if yyl1020 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1020, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *IngressList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1021Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1021Slc - var yyhl1021 bool = l >= 0 - for yyj1021 := 0; ; yyj1021++ { - if yyhl1021 { - if yyj1021 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1021Slc = r.DecodeBytes(yys1021Slc, true, true) - yys1021 := string(yys1021Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1021 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv1024 := &x.ListMeta - yym1025 := z.DecBinary() - _ = yym1025 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1024) { - } else { - z.DecFallback(yyv1024, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv1026 := &x.Items - yym1027 := z.DecBinary() - _ = yym1027 - if false { - } else { - h.decSliceIngress((*[]Ingress)(yyv1026), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys1021) - } // end switch yys1021 - } // end for yyj1021 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *IngressList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1028 int - var yyb1028 bool - var yyhl1028 bool = l >= 0 - yyj1028++ - if yyhl1028 { - yyb1028 = yyj1028 > l - } else { - yyb1028 = r.CheckBreak() - } - if yyb1028 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj1028++ - if yyhl1028 { - yyb1028 = yyj1028 > l - } else { - yyb1028 = r.CheckBreak() - } - if yyb1028 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj1028++ - if yyhl1028 { - yyb1028 = yyj1028 > l - } else { - yyb1028 = r.CheckBreak() - } - if yyb1028 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv1031 := &x.ListMeta - yym1032 := z.DecBinary() - _ = yym1032 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1031) { - } else { - z.DecFallback(yyv1031, false) - } - } - yyj1028++ - if yyhl1028 { - yyb1028 = yyj1028 > l - } else { - yyb1028 = r.CheckBreak() - } - if yyb1028 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv1033 := &x.Items - yym1034 := z.DecBinary() - _ = yym1034 - if false { - } else { - h.decSliceIngress((*[]Ingress)(yyv1033), d) - } - } - for { - yyj1028++ - if yyhl1028 { - yyb1028 = yyj1028 > l - } else { - yyb1028 = r.CheckBreak() - } - if yyb1028 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1028-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *IngressSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1035 := z.EncBinary() - _ = yym1035 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1036 := !z.EncBinary() - yy2arr1036 := z.EncBasicHandle().StructToArray - var yyq1036 [3]bool - _, _, _ = yysep1036, yyq1036, yy2arr1036 - const yyr1036 bool = false - yyq1036[0] = x.Backend != nil - yyq1036[1] = len(x.TLS) != 0 - yyq1036[2] = len(x.Rules) != 0 - var yynn1036 int - if yyr1036 || yy2arr1036 { - r.EncodeArrayStart(3) - } else { - yynn1036 = 0 - for _, b := range yyq1036 { - if b { - yynn1036++ - } - } - r.EncodeMapStart(yynn1036) - yynn1036 = 0 - } - if yyr1036 || yy2arr1036 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1036[0] { - if x.Backend == nil { - r.EncodeNil() - } else { - x.Backend.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq1036[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("backend")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Backend == nil { - r.EncodeNil() - } else { - x.Backend.CodecEncodeSelf(e) - } - } - } - if yyr1036 || yy2arr1036 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1036[1] { - if x.TLS == nil { - r.EncodeNil() - } else { - yym1039 := z.EncBinary() - _ = yym1039 - if false { - } else { - h.encSliceIngressTLS(([]IngressTLS)(x.TLS), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1036[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("tls")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.TLS == nil { - r.EncodeNil() - } else { - yym1040 := z.EncBinary() - _ = yym1040 - if false { - } else { - h.encSliceIngressTLS(([]IngressTLS)(x.TLS), e) - } - } - } - } - if yyr1036 || yy2arr1036 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1036[2] { - if x.Rules == nil { - r.EncodeNil() - } else { - yym1042 := z.EncBinary() - _ = yym1042 - if false { - } else { - h.encSliceIngressRule(([]IngressRule)(x.Rules), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1036[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("rules")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Rules == nil { - r.EncodeNil() - } else { - yym1043 := z.EncBinary() - _ = yym1043 - if false { - } else { - h.encSliceIngressRule(([]IngressRule)(x.Rules), e) - } - } - } - } - if yyr1036 || yy2arr1036 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *IngressSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1044 := z.DecBinary() - _ = yym1044 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1045 := r.ContainerType() - if yyct1045 == codecSelferValueTypeMap1234 { - yyl1045 := r.ReadMapStart() - if yyl1045 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1045, d) - } - } else if yyct1045 == codecSelferValueTypeArray1234 { - yyl1045 := r.ReadArrayStart() - if yyl1045 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1045, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *IngressSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1046Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1046Slc - var yyhl1046 bool = l >= 0 - for yyj1046 := 0; ; yyj1046++ { - if yyhl1046 { - if yyj1046 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1046Slc = r.DecodeBytes(yys1046Slc, true, true) - yys1046 := string(yys1046Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1046 { - case "backend": - if r.TryDecodeAsNil() { - if x.Backend != nil { - x.Backend = nil - } - } else { - if x.Backend == nil { - x.Backend = new(IngressBackend) - } - x.Backend.CodecDecodeSelf(d) - } - case "tls": - if r.TryDecodeAsNil() { - x.TLS = nil - } else { - yyv1048 := &x.TLS - yym1049 := z.DecBinary() - _ = yym1049 - if false { - } else { - h.decSliceIngressTLS((*[]IngressTLS)(yyv1048), d) - } - } - case "rules": - if r.TryDecodeAsNil() { - x.Rules = nil - } else { - yyv1050 := &x.Rules - yym1051 := z.DecBinary() - _ = yym1051 - if false { - } else { - h.decSliceIngressRule((*[]IngressRule)(yyv1050), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys1046) - } // end switch yys1046 - } // end for yyj1046 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *IngressSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1052 int - var yyb1052 bool - var yyhl1052 bool = l >= 0 - yyj1052++ - if yyhl1052 { - yyb1052 = yyj1052 > l - } else { - yyb1052 = r.CheckBreak() - } - if yyb1052 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Backend != nil { - x.Backend = nil - } - } else { - if x.Backend == nil { - x.Backend = new(IngressBackend) - } - x.Backend.CodecDecodeSelf(d) - } - yyj1052++ - if yyhl1052 { - yyb1052 = yyj1052 > l - } else { - yyb1052 = r.CheckBreak() - } - if yyb1052 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.TLS = nil - } else { - yyv1054 := &x.TLS - yym1055 := z.DecBinary() - _ = yym1055 - if false { - } else { - h.decSliceIngressTLS((*[]IngressTLS)(yyv1054), d) - } - } - yyj1052++ - if yyhl1052 { - yyb1052 = yyj1052 > l - } else { - yyb1052 = r.CheckBreak() - } - if yyb1052 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Rules = nil - } else { - yyv1056 := &x.Rules - yym1057 := z.DecBinary() - _ = yym1057 - if false { - } else { - h.decSliceIngressRule((*[]IngressRule)(yyv1056), d) - } - } - for { - yyj1052++ - if yyhl1052 { - yyb1052 = yyj1052 > l - } else { - yyb1052 = r.CheckBreak() - } - if yyb1052 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1052-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *IngressTLS) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1058 := z.EncBinary() - _ = yym1058 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1059 := !z.EncBinary() - yy2arr1059 := z.EncBasicHandle().StructToArray - var yyq1059 [2]bool - _, _, _ = yysep1059, yyq1059, yy2arr1059 - const yyr1059 bool = false - yyq1059[0] = len(x.Hosts) != 0 - yyq1059[1] = x.SecretName != "" - var yynn1059 int - if yyr1059 || yy2arr1059 { - r.EncodeArrayStart(2) - } else { - yynn1059 = 0 - for _, b := range yyq1059 { - if b { - yynn1059++ - } - } - r.EncodeMapStart(yynn1059) - yynn1059 = 0 - } - if yyr1059 || yy2arr1059 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1059[0] { - if x.Hosts == nil { - r.EncodeNil() - } else { - yym1061 := z.EncBinary() - _ = yym1061 - if false { - } else { - z.F.EncSliceStringV(x.Hosts, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1059[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hosts")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Hosts == nil { - r.EncodeNil() - } else { - yym1062 := z.EncBinary() - _ = yym1062 - if false { - } else { - z.F.EncSliceStringV(x.Hosts, false, e) - } - } - } - } - if yyr1059 || yy2arr1059 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1059[1] { - yym1064 := z.EncBinary() - _ = yym1064 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SecretName)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1059[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("secretName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1065 := z.EncBinary() - _ = yym1065 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SecretName)) - } - } - } - if yyr1059 || yy2arr1059 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *IngressTLS) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1066 := z.DecBinary() - _ = yym1066 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1067 := r.ContainerType() - if yyct1067 == codecSelferValueTypeMap1234 { - yyl1067 := r.ReadMapStart() - if yyl1067 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1067, d) - } - } else if yyct1067 == codecSelferValueTypeArray1234 { - yyl1067 := r.ReadArrayStart() - if yyl1067 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1067, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *IngressTLS) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1068Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1068Slc - var yyhl1068 bool = l >= 0 - for yyj1068 := 0; ; yyj1068++ { - if yyhl1068 { - if yyj1068 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1068Slc = r.DecodeBytes(yys1068Slc, true, true) - yys1068 := string(yys1068Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1068 { - case "hosts": - if r.TryDecodeAsNil() { - x.Hosts = nil - } else { - yyv1069 := &x.Hosts - yym1070 := z.DecBinary() - _ = yym1070 - if false { - } else { - z.F.DecSliceStringX(yyv1069, false, d) - } - } - case "secretName": - if r.TryDecodeAsNil() { - x.SecretName = "" - } else { - x.SecretName = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys1068) - } // end switch yys1068 - } // end for yyj1068 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *IngressTLS) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1072 int - var yyb1072 bool - var yyhl1072 bool = l >= 0 - yyj1072++ - if yyhl1072 { - yyb1072 = yyj1072 > l - } else { - yyb1072 = r.CheckBreak() - } - if yyb1072 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Hosts = nil - } else { - yyv1073 := &x.Hosts - yym1074 := z.DecBinary() - _ = yym1074 - if false { - } else { - z.F.DecSliceStringX(yyv1073, false, d) - } - } - yyj1072++ - if yyhl1072 { - yyb1072 = yyj1072 > l - } else { - yyb1072 = r.CheckBreak() - } - if yyb1072 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.SecretName = "" - } else { - x.SecretName = string(r.DecodeString()) - } - for { - yyj1072++ - if yyhl1072 { - yyb1072 = yyj1072 > l - } else { - yyb1072 = r.CheckBreak() - } - if yyb1072 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1072-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *IngressStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1076 := z.EncBinary() - _ = yym1076 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1077 := !z.EncBinary() - yy2arr1077 := z.EncBasicHandle().StructToArray - var yyq1077 [1]bool - _, _, _ = yysep1077, yyq1077, yy2arr1077 - const yyr1077 bool = false - yyq1077[0] = true - var yynn1077 int - if yyr1077 || yy2arr1077 { - r.EncodeArrayStart(1) - } else { - yynn1077 = 0 - for _, b := range yyq1077 { - if b { - yynn1077++ - } - } - r.EncodeMapStart(yynn1077) - yynn1077 = 0 - } - if yyr1077 || yy2arr1077 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1077[0] { - yy1079 := &x.LoadBalancer - yy1079.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq1077[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("loadBalancer")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1080 := &x.LoadBalancer - yy1080.CodecEncodeSelf(e) - } - } - if yyr1077 || yy2arr1077 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *IngressStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1081 := z.DecBinary() - _ = yym1081 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1082 := r.ContainerType() - if yyct1082 == codecSelferValueTypeMap1234 { - yyl1082 := r.ReadMapStart() - if yyl1082 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1082, d) - } - } else if yyct1082 == codecSelferValueTypeArray1234 { - yyl1082 := r.ReadArrayStart() - if yyl1082 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1082, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *IngressStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1083Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1083Slc - var yyhl1083 bool = l >= 0 - for yyj1083 := 0; ; yyj1083++ { - if yyhl1083 { - if yyj1083 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1083Slc = r.DecodeBytes(yys1083Slc, true, true) - yys1083 := string(yys1083Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1083 { - case "loadBalancer": - if r.TryDecodeAsNil() { - x.LoadBalancer = pkg2_v1.LoadBalancerStatus{} - } else { - yyv1084 := &x.LoadBalancer - yyv1084.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys1083) - } // end switch yys1083 - } // end for yyj1083 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *IngressStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1085 int - var yyb1085 bool - var yyhl1085 bool = l >= 0 - yyj1085++ - if yyhl1085 { - yyb1085 = yyj1085 > l - } else { - yyb1085 = r.CheckBreak() - } - if yyb1085 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LoadBalancer = pkg2_v1.LoadBalancerStatus{} - } else { - yyv1086 := &x.LoadBalancer - yyv1086.CodecDecodeSelf(d) - } - for { - yyj1085++ - if yyhl1085 { - yyb1085 = yyj1085 > l - } else { - yyb1085 = r.CheckBreak() - } - if yyb1085 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1085-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *IngressRule) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1087 := z.EncBinary() - _ = yym1087 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1088 := !z.EncBinary() - yy2arr1088 := z.EncBasicHandle().StructToArray - var yyq1088 [2]bool - _, _, _ = yysep1088, yyq1088, yy2arr1088 - const yyr1088 bool = false - yyq1088[0] = x.Host != "" - yyq1088[1] = x.IngressRuleValue.HTTP != nil && x.HTTP != nil - var yynn1088 int - if yyr1088 || yy2arr1088 { - r.EncodeArrayStart(2) - } else { - yynn1088 = 0 - for _, b := range yyq1088 { - if b { - yynn1088++ - } - } - r.EncodeMapStart(yynn1088) - yynn1088 = 0 - } - if yyr1088 || yy2arr1088 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1088[0] { - yym1090 := z.EncBinary() - _ = yym1090 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Host)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1088[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("host")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1091 := z.EncBinary() - _ = yym1091 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Host)) - } - } - } - var yyn1092 bool - if x.IngressRuleValue.HTTP == nil { - yyn1092 = true - goto LABEL1092 - } - LABEL1092: - if yyr1088 || yy2arr1088 { - if yyn1092 { - r.EncodeNil() - } else { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1088[1] { - if x.HTTP == nil { - r.EncodeNil() - } else { - x.HTTP.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq1088[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("http")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn1092 { - r.EncodeNil() - } else { - if x.HTTP == nil { - r.EncodeNil() - } else { - x.HTTP.CodecEncodeSelf(e) - } - } - } - } - if yyr1088 || yy2arr1088 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *IngressRule) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1093 := z.DecBinary() - _ = yym1093 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1094 := r.ContainerType() - if yyct1094 == codecSelferValueTypeMap1234 { - yyl1094 := r.ReadMapStart() - if yyl1094 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1094, d) - } - } else if yyct1094 == codecSelferValueTypeArray1234 { - yyl1094 := r.ReadArrayStart() - if yyl1094 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1094, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *IngressRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1095Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1095Slc - var yyhl1095 bool = l >= 0 - for yyj1095 := 0; ; yyj1095++ { - if yyhl1095 { - if yyj1095 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1095Slc = r.DecodeBytes(yys1095Slc, true, true) - yys1095 := string(yys1095Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1095 { - case "host": - if r.TryDecodeAsNil() { - x.Host = "" - } else { - x.Host = string(r.DecodeString()) - } - case "http": - if x.IngressRuleValue.HTTP == nil { - x.IngressRuleValue.HTTP = new(HTTPIngressRuleValue) - } - if r.TryDecodeAsNil() { - if x.HTTP != nil { - x.HTTP = nil - } - } else { - if x.HTTP == nil { - x.HTTP = new(HTTPIngressRuleValue) - } - x.HTTP.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys1095) - } // end switch yys1095 - } // end for yyj1095 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *IngressRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1098 int - var yyb1098 bool - var yyhl1098 bool = l >= 0 - yyj1098++ - if yyhl1098 { - yyb1098 = yyj1098 > l - } else { - yyb1098 = r.CheckBreak() - } - if yyb1098 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Host = "" - } else { - x.Host = string(r.DecodeString()) - } - if x.IngressRuleValue.HTTP == nil { - x.IngressRuleValue.HTTP = new(HTTPIngressRuleValue) - } - yyj1098++ - if yyhl1098 { - yyb1098 = yyj1098 > l - } else { - yyb1098 = r.CheckBreak() - } - if yyb1098 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.HTTP != nil { - x.HTTP = nil - } - } else { - if x.HTTP == nil { - x.HTTP = new(HTTPIngressRuleValue) - } - x.HTTP.CodecDecodeSelf(d) - } - for { - yyj1098++ - if yyhl1098 { - yyb1098 = yyj1098 > l - } else { - yyb1098 = r.CheckBreak() - } - if yyb1098 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1098-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *IngressRuleValue) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1101 := z.EncBinary() - _ = yym1101 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1102 := !z.EncBinary() - yy2arr1102 := z.EncBasicHandle().StructToArray - var yyq1102 [1]bool - _, _, _ = yysep1102, yyq1102, yy2arr1102 - const yyr1102 bool = false - yyq1102[0] = x.HTTP != nil - var yynn1102 int - if yyr1102 || yy2arr1102 { - r.EncodeArrayStart(1) - } else { - yynn1102 = 0 - for _, b := range yyq1102 { - if b { - yynn1102++ - } - } - r.EncodeMapStart(yynn1102) - yynn1102 = 0 - } - if yyr1102 || yy2arr1102 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1102[0] { - if x.HTTP == nil { - r.EncodeNil() - } else { - x.HTTP.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq1102[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("http")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.HTTP == nil { - r.EncodeNil() - } else { - x.HTTP.CodecEncodeSelf(e) - } - } - } - if yyr1102 || yy2arr1102 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *IngressRuleValue) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1104 := z.DecBinary() - _ = yym1104 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1105 := r.ContainerType() - if yyct1105 == codecSelferValueTypeMap1234 { - yyl1105 := r.ReadMapStart() - if yyl1105 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1105, d) - } - } else if yyct1105 == codecSelferValueTypeArray1234 { - yyl1105 := r.ReadArrayStart() - if yyl1105 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1105, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *IngressRuleValue) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1106Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1106Slc - var yyhl1106 bool = l >= 0 - for yyj1106 := 0; ; yyj1106++ { - if yyhl1106 { - if yyj1106 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1106Slc = r.DecodeBytes(yys1106Slc, true, true) - yys1106 := string(yys1106Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1106 { - case "http": - if r.TryDecodeAsNil() { - if x.HTTP != nil { - x.HTTP = nil - } - } else { - if x.HTTP == nil { - x.HTTP = new(HTTPIngressRuleValue) - } - x.HTTP.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys1106) - } // end switch yys1106 - } // end for yyj1106 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *IngressRuleValue) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1108 int - var yyb1108 bool - var yyhl1108 bool = l >= 0 - yyj1108++ - if yyhl1108 { - yyb1108 = yyj1108 > l - } else { - yyb1108 = r.CheckBreak() - } - if yyb1108 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.HTTP != nil { - x.HTTP = nil - } - } else { - if x.HTTP == nil { - x.HTTP = new(HTTPIngressRuleValue) - } - x.HTTP.CodecDecodeSelf(d) - } - for { - yyj1108++ - if yyhl1108 { - yyb1108 = yyj1108 > l - } else { - yyb1108 = r.CheckBreak() - } - if yyb1108 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1108-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *HTTPIngressRuleValue) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1110 := z.EncBinary() - _ = yym1110 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1111 := !z.EncBinary() - yy2arr1111 := z.EncBasicHandle().StructToArray - var yyq1111 [1]bool - _, _, _ = yysep1111, yyq1111, yy2arr1111 - const yyr1111 bool = false - var yynn1111 int - if yyr1111 || yy2arr1111 { - r.EncodeArrayStart(1) - } else { - yynn1111 = 1 - for _, b := range yyq1111 { - if b { - yynn1111++ - } - } - r.EncodeMapStart(yynn1111) - yynn1111 = 0 - } - if yyr1111 || yy2arr1111 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Paths == nil { - r.EncodeNil() - } else { - yym1113 := z.EncBinary() - _ = yym1113 - if false { - } else { - h.encSliceHTTPIngressPath(([]HTTPIngressPath)(x.Paths), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("paths")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Paths == nil { - r.EncodeNil() - } else { - yym1114 := z.EncBinary() - _ = yym1114 - if false { - } else { - h.encSliceHTTPIngressPath(([]HTTPIngressPath)(x.Paths), e) - } - } - } - if yyr1111 || yy2arr1111 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HTTPIngressRuleValue) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1115 := z.DecBinary() - _ = yym1115 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1116 := r.ContainerType() - if yyct1116 == codecSelferValueTypeMap1234 { - yyl1116 := r.ReadMapStart() - if yyl1116 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1116, d) - } - } else if yyct1116 == codecSelferValueTypeArray1234 { - yyl1116 := r.ReadArrayStart() - if yyl1116 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1116, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HTTPIngressRuleValue) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1117Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1117Slc - var yyhl1117 bool = l >= 0 - for yyj1117 := 0; ; yyj1117++ { - if yyhl1117 { - if yyj1117 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1117Slc = r.DecodeBytes(yys1117Slc, true, true) - yys1117 := string(yys1117Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1117 { - case "paths": - if r.TryDecodeAsNil() { - x.Paths = nil - } else { - yyv1118 := &x.Paths - yym1119 := z.DecBinary() - _ = yym1119 - if false { - } else { - h.decSliceHTTPIngressPath((*[]HTTPIngressPath)(yyv1118), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys1117) - } // end switch yys1117 - } // end for yyj1117 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HTTPIngressRuleValue) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1120 int - var yyb1120 bool - var yyhl1120 bool = l >= 0 - yyj1120++ - if yyhl1120 { - yyb1120 = yyj1120 > l - } else { - yyb1120 = r.CheckBreak() - } - if yyb1120 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Paths = nil - } else { - yyv1121 := &x.Paths - yym1122 := z.DecBinary() - _ = yym1122 - if false { - } else { - h.decSliceHTTPIngressPath((*[]HTTPIngressPath)(yyv1121), d) - } - } - for { - yyj1120++ - if yyhl1120 { - yyb1120 = yyj1120 > l - } else { - yyb1120 = r.CheckBreak() - } - if yyb1120 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1120-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *HTTPIngressPath) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1123 := z.EncBinary() - _ = yym1123 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1124 := !z.EncBinary() - yy2arr1124 := z.EncBasicHandle().StructToArray - var yyq1124 [2]bool - _, _, _ = yysep1124, yyq1124, yy2arr1124 - const yyr1124 bool = false - yyq1124[0] = x.Path != "" - var yynn1124 int - if yyr1124 || yy2arr1124 { - r.EncodeArrayStart(2) - } else { - yynn1124 = 1 - for _, b := range yyq1124 { - if b { - yynn1124++ - } - } - r.EncodeMapStart(yynn1124) - yynn1124 = 0 - } - if yyr1124 || yy2arr1124 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1124[0] { - yym1126 := z.EncBinary() - _ = yym1126 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1124[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("path")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1127 := z.EncBinary() - _ = yym1127 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) - } - } - } - if yyr1124 || yy2arr1124 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1129 := &x.Backend - yy1129.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("backend")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1130 := &x.Backend - yy1130.CodecEncodeSelf(e) - } - if yyr1124 || yy2arr1124 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HTTPIngressPath) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1131 := z.DecBinary() - _ = yym1131 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1132 := r.ContainerType() - if yyct1132 == codecSelferValueTypeMap1234 { - yyl1132 := r.ReadMapStart() - if yyl1132 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1132, d) - } - } else if yyct1132 == codecSelferValueTypeArray1234 { - yyl1132 := r.ReadArrayStart() - if yyl1132 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1132, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HTTPIngressPath) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1133Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1133Slc - var yyhl1133 bool = l >= 0 - for yyj1133 := 0; ; yyj1133++ { - if yyhl1133 { - if yyj1133 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1133Slc = r.DecodeBytes(yys1133Slc, true, true) - yys1133 := string(yys1133Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1133 { - case "path": - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = string(r.DecodeString()) - } - case "backend": - if r.TryDecodeAsNil() { - x.Backend = IngressBackend{} - } else { - yyv1135 := &x.Backend - yyv1135.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys1133) - } // end switch yys1133 - } // end for yyj1133 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HTTPIngressPath) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1136 int - var yyb1136 bool - var yyhl1136 bool = l >= 0 - yyj1136++ - if yyhl1136 { - yyb1136 = yyj1136 > l - } else { - yyb1136 = r.CheckBreak() - } - if yyb1136 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = string(r.DecodeString()) - } - yyj1136++ - if yyhl1136 { - yyb1136 = yyj1136 > l - } else { - yyb1136 = r.CheckBreak() - } - if yyb1136 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Backend = IngressBackend{} - } else { - yyv1138 := &x.Backend - yyv1138.CodecDecodeSelf(d) - } - for { - yyj1136++ - if yyhl1136 { - yyb1136 = yyj1136 > l - } else { - yyb1136 = r.CheckBreak() - } - if yyb1136 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1136-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *IngressBackend) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1139 := z.EncBinary() - _ = yym1139 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1140 := !z.EncBinary() - yy2arr1140 := z.EncBasicHandle().StructToArray - var yyq1140 [2]bool - _, _, _ = yysep1140, yyq1140, yy2arr1140 - const yyr1140 bool = false - var yynn1140 int - if yyr1140 || yy2arr1140 { - r.EncodeArrayStart(2) - } else { - yynn1140 = 2 - for _, b := range yyq1140 { - if b { - yynn1140++ - } - } - r.EncodeMapStart(yynn1140) - yynn1140 = 0 - } - if yyr1140 || yy2arr1140 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1142 := z.EncBinary() - _ = yym1142 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("serviceName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1143 := z.EncBinary() - _ = yym1143 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) - } - } - if yyr1140 || yy2arr1140 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1145 := &x.ServicePort - yym1146 := z.EncBinary() - _ = yym1146 - if false { - } else if z.HasExtensions() && z.EncExt(yy1145) { - } else if !yym1146 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1145) - } else { - z.EncFallback(yy1145) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("servicePort")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1147 := &x.ServicePort - yym1148 := z.EncBinary() - _ = yym1148 - if false { - } else if z.HasExtensions() && z.EncExt(yy1147) { - } else if !yym1148 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1147) - } else { - z.EncFallback(yy1147) - } - } - if yyr1140 || yy2arr1140 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *IngressBackend) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1149 := z.DecBinary() - _ = yym1149 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1150 := r.ContainerType() - if yyct1150 == codecSelferValueTypeMap1234 { - yyl1150 := r.ReadMapStart() - if yyl1150 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1150, d) - } - } else if yyct1150 == codecSelferValueTypeArray1234 { - yyl1150 := r.ReadArrayStart() - if yyl1150 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1150, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *IngressBackend) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1151Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1151Slc - var yyhl1151 bool = l >= 0 - for yyj1151 := 0; ; yyj1151++ { - if yyhl1151 { - if yyj1151 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1151Slc = r.DecodeBytes(yys1151Slc, true, true) - yys1151 := string(yys1151Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1151 { - case "serviceName": - if r.TryDecodeAsNil() { - x.ServiceName = "" - } else { - x.ServiceName = string(r.DecodeString()) - } - case "servicePort": - if r.TryDecodeAsNil() { - x.ServicePort = pkg5_intstr.IntOrString{} - } else { - yyv1153 := &x.ServicePort - yym1154 := z.DecBinary() - _ = yym1154 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1153) { - } else if !yym1154 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1153) - } else { - z.DecFallback(yyv1153, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys1151) - } // end switch yys1151 - } // end for yyj1151 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *IngressBackend) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1155 int - var yyb1155 bool - var yyhl1155 bool = l >= 0 - yyj1155++ - if yyhl1155 { - yyb1155 = yyj1155 > l - } else { - yyb1155 = r.CheckBreak() - } - if yyb1155 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ServiceName = "" - } else { - x.ServiceName = string(r.DecodeString()) - } - yyj1155++ - if yyhl1155 { - yyb1155 = yyj1155 > l - } else { - yyb1155 = r.CheckBreak() - } - if yyb1155 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ServicePort = pkg5_intstr.IntOrString{} - } else { - yyv1157 := &x.ServicePort - yym1158 := z.DecBinary() - _ = yym1158 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1157) { - } else if !yym1158 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1157) - } else { - z.DecFallback(yyv1157, false) - } - } - for { - yyj1155++ - if yyhl1155 { - yyb1155 = yyj1155 > l - } else { - yyb1155 = r.CheckBreak() - } - if yyb1155 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1155-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 { - yym1159 := z.EncBinary() - _ = yym1159 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1160 := !z.EncBinary() - yy2arr1160 := z.EncBasicHandle().StructToArray - var yyq1160 [4]bool - _, _, _ = yysep1160, yyq1160, yy2arr1160 - const yyr1160 bool = false - yyq1160[0] = x.Kind != "" - yyq1160[1] = x.APIVersion != "" - var yynn1160 int - if yyr1160 || yy2arr1160 { - r.EncodeArrayStart(4) - } else { - yynn1160 = 2 - for _, b := range yyq1160 { - if b { - yynn1160++ - } - } - r.EncodeMapStart(yynn1160) - yynn1160 = 0 - } - if yyr1160 || yy2arr1160 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1160[0] { - yym1162 := z.EncBinary() - _ = yym1162 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1160[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1163 := z.EncBinary() - _ = yym1163 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr1160 || yy2arr1160 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1160[1] { - yym1165 := z.EncBinary() - _ = yym1165 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1160[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1166 := z.EncBinary() - _ = yym1166 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr1160 || yy2arr1160 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1168 := z.EncBinary() - _ = yym1168 - if false { - } else { - r.EncodeBool(bool(x.Export)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("export")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1169 := z.EncBinary() - _ = yym1169 - if false { - } else { - r.EncodeBool(bool(x.Export)) - } - } - if yyr1160 || yy2arr1160 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1171 := z.EncBinary() - _ = yym1171 - if false { - } else { - r.EncodeBool(bool(x.Exact)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("exact")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1172 := z.EncBinary() - _ = yym1172 - if false { - } else { - r.EncodeBool(bool(x.Exact)) - } - } - if yyr1160 || yy2arr1160 { - 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 - yym1173 := z.DecBinary() - _ = yym1173 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1174 := r.ContainerType() - if yyct1174 == codecSelferValueTypeMap1234 { - yyl1174 := r.ReadMapStart() - if yyl1174 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1174, d) - } - } else if yyct1174 == codecSelferValueTypeArray1234 { - yyl1174 := r.ReadArrayStart() - if yyl1174 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1174, 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 yys1175Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1175Slc - var yyhl1175 bool = l >= 0 - for yyj1175 := 0; ; yyj1175++ { - if yyhl1175 { - if yyj1175 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1175Slc = r.DecodeBytes(yys1175Slc, true, true) - yys1175 := string(yys1175Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1175 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "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()) - } - default: - z.DecStructFieldNotFound(-1, yys1175) - } // end switch yys1175 - } // end for yyj1175 - 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 yyj1180 int - var yyb1180 bool - var yyhl1180 bool = l >= 0 - yyj1180++ - if yyhl1180 { - yyb1180 = yyj1180 > l - } else { - yyb1180 = r.CheckBreak() - } - if yyb1180 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj1180++ - if yyhl1180 { - yyb1180 = yyj1180 > l - } else { - yyb1180 = r.CheckBreak() - } - if yyb1180 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj1180++ - if yyhl1180 { - yyb1180 = yyj1180 > l - } else { - yyb1180 = r.CheckBreak() - } - if yyb1180 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Export = false - } else { - x.Export = bool(r.DecodeBool()) - } - yyj1180++ - if yyhl1180 { - yyb1180 = yyj1180 > l - } else { - yyb1180 = r.CheckBreak() - } - if yyb1180 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Exact = false - } else { - x.Exact = bool(r.DecodeBool()) - } - for { - yyj1180++ - if yyhl1180 { - yyb1180 = yyj1180 > l - } else { - yyb1180 = r.CheckBreak() - } - if yyb1180 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1180-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 { - yym1185 := z.EncBinary() - _ = yym1185 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1186 := !z.EncBinary() - yy2arr1186 := z.EncBasicHandle().StructToArray - var yyq1186 [7]bool - _, _, _ = yysep1186, yyq1186, yy2arr1186 - const yyr1186 bool = false - yyq1186[0] = x.Kind != "" - yyq1186[1] = x.APIVersion != "" - yyq1186[2] = x.LabelSelector != "" - yyq1186[3] = x.FieldSelector != "" - yyq1186[4] = x.Watch != false - yyq1186[5] = x.ResourceVersion != "" - yyq1186[6] = x.TimeoutSeconds != nil - var yynn1186 int - if yyr1186 || yy2arr1186 { - r.EncodeArrayStart(7) - } else { - yynn1186 = 0 - for _, b := range yyq1186 { - if b { - yynn1186++ - } - } - r.EncodeMapStart(yynn1186) - yynn1186 = 0 - } - if yyr1186 || yy2arr1186 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1186[0] { - yym1188 := z.EncBinary() - _ = yym1188 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1186[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1189 := z.EncBinary() - _ = yym1189 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr1186 || yy2arr1186 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1186[1] { - yym1191 := z.EncBinary() - _ = yym1191 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1186[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1192 := z.EncBinary() - _ = yym1192 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr1186 || yy2arr1186 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1186[2] { - yym1194 := z.EncBinary() - _ = yym1194 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.LabelSelector)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1186[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("labelSelector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1195 := z.EncBinary() - _ = yym1195 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.LabelSelector)) - } - } - } - if yyr1186 || yy2arr1186 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1186[3] { - yym1197 := z.EncBinary() - _ = yym1197 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1186[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("fieldSelector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1198 := z.EncBinary() - _ = yym1198 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector)) - } - } - } - if yyr1186 || yy2arr1186 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1186[4] { - yym1200 := z.EncBinary() - _ = yym1200 - if false { - } else { - r.EncodeBool(bool(x.Watch)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq1186[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("watch")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1201 := z.EncBinary() - _ = yym1201 - if false { - } else { - r.EncodeBool(bool(x.Watch)) - } - } - } - if yyr1186 || yy2arr1186 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1186[5] { - yym1203 := z.EncBinary() - _ = yym1203 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1186[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("resourceVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1204 := z.EncBinary() - _ = yym1204 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) - } - } - } - if yyr1186 || yy2arr1186 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1186[6] { - if x.TimeoutSeconds == nil { - r.EncodeNil() - } else { - yy1206 := *x.TimeoutSeconds - yym1207 := z.EncBinary() - _ = yym1207 - if false { - } else { - r.EncodeInt(int64(yy1206)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1186[6] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("timeoutSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.TimeoutSeconds == nil { - r.EncodeNil() - } else { - yy1208 := *x.TimeoutSeconds - yym1209 := z.EncBinary() - _ = yym1209 - if false { - } else { - r.EncodeInt(int64(yy1208)) - } - } - } - } - if yyr1186 || yy2arr1186 { - 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 - yym1210 := z.DecBinary() - _ = yym1210 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1211 := r.ContainerType() - if yyct1211 == codecSelferValueTypeMap1234 { - yyl1211 := r.ReadMapStart() - if yyl1211 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1211, d) - } - } else if yyct1211 == codecSelferValueTypeArray1234 { - yyl1211 := r.ReadArrayStart() - if yyl1211 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1211, 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 yys1212Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1212Slc - var yyhl1212 bool = l >= 0 - for yyj1212 := 0; ; yyj1212++ { - if yyhl1212 { - if yyj1212 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1212Slc = r.DecodeBytes(yys1212Slc, true, true) - yys1212 := string(yys1212Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1212 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "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) - } - yym1220 := z.DecBinary() - _ = yym1220 - if false { - } else { - *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64)) - } - } - default: - z.DecStructFieldNotFound(-1, yys1212) - } // end switch yys1212 - } // end for yyj1212 - 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 yyj1221 int - var yyb1221 bool - var yyhl1221 bool = l >= 0 - yyj1221++ - if yyhl1221 { - yyb1221 = yyj1221 > l - } else { - yyb1221 = r.CheckBreak() - } - if yyb1221 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj1221++ - if yyhl1221 { - yyb1221 = yyj1221 > l - } else { - yyb1221 = r.CheckBreak() - } - if yyb1221 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj1221++ - if yyhl1221 { - yyb1221 = yyj1221 > l - } else { - yyb1221 = r.CheckBreak() - } - if yyb1221 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LabelSelector = "" - } else { - x.LabelSelector = string(r.DecodeString()) - } - yyj1221++ - if yyhl1221 { - yyb1221 = yyj1221 > l - } else { - yyb1221 = r.CheckBreak() - } - if yyb1221 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.FieldSelector = "" - } else { - x.FieldSelector = string(r.DecodeString()) - } - yyj1221++ - if yyhl1221 { - yyb1221 = yyj1221 > l - } else { - yyb1221 = r.CheckBreak() - } - if yyb1221 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Watch = false - } else { - x.Watch = bool(r.DecodeBool()) - } - yyj1221++ - if yyhl1221 { - yyb1221 = yyj1221 > l - } else { - yyb1221 = r.CheckBreak() - } - if yyb1221 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ResourceVersion = "" - } else { - x.ResourceVersion = string(r.DecodeString()) - } - yyj1221++ - if yyhl1221 { - yyb1221 = yyj1221 > l - } else { - yyb1221 = r.CheckBreak() - } - if yyb1221 { - 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) - } - yym1229 := z.DecBinary() - _ = yym1229 - if false { - } else { - *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64)) - } - } - for { - yyj1221++ - if yyhl1221 { - yyb1221 = yyj1221 > l - } else { - yyb1221 = r.CheckBreak() - } - if yyb1221 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1221-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *LabelSelector) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1230 := z.EncBinary() - _ = yym1230 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1231 := !z.EncBinary() - yy2arr1231 := z.EncBasicHandle().StructToArray - var yyq1231 [2]bool - _, _, _ = yysep1231, yyq1231, yy2arr1231 - const yyr1231 bool = false - yyq1231[0] = len(x.MatchLabels) != 0 - yyq1231[1] = len(x.MatchExpressions) != 0 - var yynn1231 int - if yyr1231 || yy2arr1231 { - r.EncodeArrayStart(2) - } else { - yynn1231 = 0 - for _, b := range yyq1231 { - if b { - yynn1231++ - } - } - r.EncodeMapStart(yynn1231) - yynn1231 = 0 - } - if yyr1231 || yy2arr1231 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1231[0] { - if x.MatchLabels == nil { - r.EncodeNil() - } else { - yym1233 := z.EncBinary() - _ = yym1233 - if false { - } else { - z.F.EncMapStringStringV(x.MatchLabels, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1231[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("matchLabels")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.MatchLabels == nil { - r.EncodeNil() - } else { - yym1234 := z.EncBinary() - _ = yym1234 - if false { - } else { - z.F.EncMapStringStringV(x.MatchLabels, false, e) - } - } - } - } - if yyr1231 || yy2arr1231 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1231[1] { - if x.MatchExpressions == nil { - r.EncodeNil() - } else { - yym1236 := z.EncBinary() - _ = yym1236 - if false { - } else { - h.encSliceLabelSelectorRequirement(([]LabelSelectorRequirement)(x.MatchExpressions), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1231[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("matchExpressions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.MatchExpressions == nil { - r.EncodeNil() - } else { - yym1237 := z.EncBinary() - _ = yym1237 - if false { - } else { - h.encSliceLabelSelectorRequirement(([]LabelSelectorRequirement)(x.MatchExpressions), e) - } - } - } - } - if yyr1231 || yy2arr1231 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *LabelSelector) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1238 := z.DecBinary() - _ = yym1238 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1239 := r.ContainerType() - if yyct1239 == codecSelferValueTypeMap1234 { - yyl1239 := r.ReadMapStart() - if yyl1239 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1239, d) - } - } else if yyct1239 == codecSelferValueTypeArray1234 { - yyl1239 := r.ReadArrayStart() - if yyl1239 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1239, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *LabelSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1240Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1240Slc - var yyhl1240 bool = l >= 0 - for yyj1240 := 0; ; yyj1240++ { - if yyhl1240 { - if yyj1240 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1240Slc = r.DecodeBytes(yys1240Slc, true, true) - yys1240 := string(yys1240Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1240 { - case "matchLabels": - if r.TryDecodeAsNil() { - x.MatchLabels = nil - } else { - yyv1241 := &x.MatchLabels - yym1242 := z.DecBinary() - _ = yym1242 - if false { - } else { - z.F.DecMapStringStringX(yyv1241, false, d) - } - } - case "matchExpressions": - if r.TryDecodeAsNil() { - x.MatchExpressions = nil - } else { - yyv1243 := &x.MatchExpressions - yym1244 := z.DecBinary() - _ = yym1244 - if false { - } else { - h.decSliceLabelSelectorRequirement((*[]LabelSelectorRequirement)(yyv1243), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys1240) - } // end switch yys1240 - } // end for yyj1240 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *LabelSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1245 int - var yyb1245 bool - var yyhl1245 bool = l >= 0 - yyj1245++ - if yyhl1245 { - yyb1245 = yyj1245 > l - } else { - yyb1245 = r.CheckBreak() - } - if yyb1245 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MatchLabels = nil - } else { - yyv1246 := &x.MatchLabels - yym1247 := z.DecBinary() - _ = yym1247 - if false { - } else { - z.F.DecMapStringStringX(yyv1246, false, d) - } - } - yyj1245++ - if yyhl1245 { - yyb1245 = yyj1245 > l - } else { - yyb1245 = r.CheckBreak() - } - if yyb1245 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.MatchExpressions = nil - } else { - yyv1248 := &x.MatchExpressions - yym1249 := z.DecBinary() - _ = yym1249 - if false { - } else { - h.decSliceLabelSelectorRequirement((*[]LabelSelectorRequirement)(yyv1248), d) - } - } - for { - yyj1245++ - if yyhl1245 { - yyb1245 = yyj1245 > l - } else { - yyb1245 = r.CheckBreak() - } - if yyb1245 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1245-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *LabelSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1250 := z.EncBinary() - _ = yym1250 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1251 := !z.EncBinary() - yy2arr1251 := z.EncBasicHandle().StructToArray - var yyq1251 [3]bool - _, _, _ = yysep1251, yyq1251, yy2arr1251 - const yyr1251 bool = false - yyq1251[2] = len(x.Values) != 0 - var yynn1251 int - if yyr1251 || yy2arr1251 { - r.EncodeArrayStart(3) - } else { - yynn1251 = 2 - for _, b := range yyq1251 { - if b { - yynn1251++ - } - } - r.EncodeMapStart(yynn1251) - yynn1251 = 0 - } - if yyr1251 || yy2arr1251 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1253 := z.EncBinary() - _ = yym1253 - 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) - yym1254 := z.EncBinary() - _ = yym1254 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Key)) - } - } - if yyr1251 || yy2arr1251 { - 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 yyr1251 || yy2arr1251 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1251[2] { - if x.Values == nil { - r.EncodeNil() - } else { - yym1257 := z.EncBinary() - _ = yym1257 - if false { - } else { - z.F.EncSliceStringV(x.Values, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1251[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("values")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Values == nil { - r.EncodeNil() - } else { - yym1258 := z.EncBinary() - _ = yym1258 - if false { - } else { - z.F.EncSliceStringV(x.Values, false, e) - } - } - } - } - if yyr1251 || yy2arr1251 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *LabelSelectorRequirement) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1259 := z.DecBinary() - _ = yym1259 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1260 := r.ContainerType() - if yyct1260 == codecSelferValueTypeMap1234 { - yyl1260 := r.ReadMapStart() - if yyl1260 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1260, d) - } - } else if yyct1260 == codecSelferValueTypeArray1234 { - yyl1260 := r.ReadArrayStart() - if yyl1260 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1260, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *LabelSelectorRequirement) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1261Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1261Slc - var yyhl1261 bool = l >= 0 - for yyj1261 := 0; ; yyj1261++ { - if yyhl1261 { - if yyj1261 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1261Slc = r.DecodeBytes(yys1261Slc, true, true) - yys1261 := string(yys1261Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1261 { - case "key": - if r.TryDecodeAsNil() { - x.Key = "" - } else { - x.Key = string(r.DecodeString()) - } - case "operator": - if r.TryDecodeAsNil() { - x.Operator = "" - } else { - x.Operator = LabelSelectorOperator(r.DecodeString()) - } - case "values": - if r.TryDecodeAsNil() { - x.Values = nil - } else { - yyv1264 := &x.Values - yym1265 := z.DecBinary() - _ = yym1265 - if false { - } else { - z.F.DecSliceStringX(yyv1264, false, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys1261) - } // end switch yys1261 - } // end for yyj1261 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *LabelSelectorRequirement) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1266 int - var yyb1266 bool - var yyhl1266 bool = l >= 0 - yyj1266++ - if yyhl1266 { - yyb1266 = yyj1266 > l - } else { - yyb1266 = r.CheckBreak() - } - if yyb1266 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Key = "" - } else { - x.Key = string(r.DecodeString()) - } - yyj1266++ - if yyhl1266 { - yyb1266 = yyj1266 > l - } else { - yyb1266 = r.CheckBreak() - } - if yyb1266 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Operator = "" - } else { - x.Operator = LabelSelectorOperator(r.DecodeString()) - } - yyj1266++ - if yyhl1266 { - yyb1266 = yyj1266 > l - } else { - yyb1266 = r.CheckBreak() - } - if yyb1266 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Values = nil - } else { - yyv1269 := &x.Values - yym1270 := z.DecBinary() - _ = yym1270 - if false { - } else { - z.F.DecSliceStringX(yyv1269, false, d) - } - } - for { - yyj1266++ - if yyhl1266 { - yyb1266 = yyj1266 > l - } else { - yyb1266 = r.CheckBreak() - } - if yyb1266 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1266-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x LabelSelectorOperator) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym1271 := z.EncBinary() - _ = yym1271 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *LabelSelectorOperator) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1272 := z.DecBinary() - _ = yym1272 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *ReplicaSet) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1273 := z.EncBinary() - _ = yym1273 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1274 := !z.EncBinary() - yy2arr1274 := z.EncBasicHandle().StructToArray - var yyq1274 [5]bool - _, _, _ = yysep1274, yyq1274, yy2arr1274 - const yyr1274 bool = false - yyq1274[0] = x.Kind != "" - yyq1274[1] = x.APIVersion != "" - yyq1274[2] = true - yyq1274[3] = true - yyq1274[4] = true - var yynn1274 int - if yyr1274 || yy2arr1274 { - r.EncodeArrayStart(5) - } else { - yynn1274 = 0 - for _, b := range yyq1274 { - if b { - yynn1274++ - } - } - r.EncodeMapStart(yynn1274) - yynn1274 = 0 - } - if yyr1274 || yy2arr1274 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1274[0] { - yym1276 := z.EncBinary() - _ = yym1276 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1274[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1277 := z.EncBinary() - _ = yym1277 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr1274 || yy2arr1274 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1274[1] { - yym1279 := z.EncBinary() - _ = yym1279 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1274[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1280 := z.EncBinary() - _ = yym1280 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr1274 || yy2arr1274 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1274[2] { - yy1282 := &x.ObjectMeta - yy1282.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq1274[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1283 := &x.ObjectMeta - yy1283.CodecEncodeSelf(e) - } - } - if yyr1274 || yy2arr1274 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1274[3] { - yy1285 := &x.Spec - yy1285.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq1274[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1286 := &x.Spec - yy1286.CodecEncodeSelf(e) - } - } - if yyr1274 || yy2arr1274 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1274[4] { - yy1288 := &x.Status - yy1288.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq1274[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1289 := &x.Status - yy1289.CodecEncodeSelf(e) - } - } - if yyr1274 || yy2arr1274 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ReplicaSet) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1290 := z.DecBinary() - _ = yym1290 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1291 := r.ContainerType() - if yyct1291 == codecSelferValueTypeMap1234 { - yyl1291 := r.ReadMapStart() - if yyl1291 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1291, d) - } - } else if yyct1291 == codecSelferValueTypeArray1234 { - yyl1291 := r.ReadArrayStart() - if yyl1291 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1291, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ReplicaSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1292Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1292Slc - var yyhl1292 bool = l >= 0 - for yyj1292 := 0; ; yyj1292++ { - if yyhl1292 { - if yyj1292 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1292Slc = r.DecodeBytes(yys1292Slc, true, true) - yys1292 := string(yys1292Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1292 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv1295 := &x.ObjectMeta - yyv1295.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = ReplicaSetSpec{} - } else { - yyv1296 := &x.Spec - yyv1296.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = ReplicaSetStatus{} - } else { - yyv1297 := &x.Status - yyv1297.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys1292) - } // end switch yys1292 - } // end for yyj1292 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1298 int - var yyb1298 bool - var yyhl1298 bool = l >= 0 - yyj1298++ - if yyhl1298 { - yyb1298 = yyj1298 > l - } else { - yyb1298 = r.CheckBreak() - } - if yyb1298 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj1298++ - if yyhl1298 { - yyb1298 = yyj1298 > l - } else { - yyb1298 = r.CheckBreak() - } - if yyb1298 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj1298++ - if yyhl1298 { - yyb1298 = yyj1298 > l - } else { - yyb1298 = r.CheckBreak() - } - if yyb1298 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv1301 := &x.ObjectMeta - yyv1301.CodecDecodeSelf(d) - } - yyj1298++ - if yyhl1298 { - yyb1298 = yyj1298 > l - } else { - yyb1298 = r.CheckBreak() - } - if yyb1298 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = ReplicaSetSpec{} - } else { - yyv1302 := &x.Spec - yyv1302.CodecDecodeSelf(d) - } - yyj1298++ - if yyhl1298 { - yyb1298 = yyj1298 > l - } else { - yyb1298 = r.CheckBreak() - } - if yyb1298 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = ReplicaSetStatus{} - } else { - yyv1303 := &x.Status - yyv1303.CodecDecodeSelf(d) - } - for { - yyj1298++ - if yyhl1298 { - yyb1298 = yyj1298 > l - } else { - yyb1298 = r.CheckBreak() - } - if yyb1298 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1298-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ReplicaSetList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1304 := z.EncBinary() - _ = yym1304 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1305 := !z.EncBinary() - yy2arr1305 := z.EncBasicHandle().StructToArray - var yyq1305 [4]bool - _, _, _ = yysep1305, yyq1305, yy2arr1305 - const yyr1305 bool = false - yyq1305[0] = x.Kind != "" - yyq1305[1] = x.APIVersion != "" - yyq1305[2] = true - var yynn1305 int - if yyr1305 || yy2arr1305 { - r.EncodeArrayStart(4) - } else { - yynn1305 = 1 - for _, b := range yyq1305 { - if b { - yynn1305++ - } - } - r.EncodeMapStart(yynn1305) - yynn1305 = 0 - } - if yyr1305 || yy2arr1305 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1305[0] { - yym1307 := z.EncBinary() - _ = yym1307 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1305[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1308 := z.EncBinary() - _ = yym1308 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr1305 || yy2arr1305 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1305[1] { - yym1310 := z.EncBinary() - _ = yym1310 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1305[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1311 := z.EncBinary() - _ = yym1311 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr1305 || yy2arr1305 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1305[2] { - yy1313 := &x.ListMeta - yym1314 := z.EncBinary() - _ = yym1314 - if false { - } else if z.HasExtensions() && z.EncExt(yy1313) { - } else { - z.EncFallback(yy1313) - } - } else { - r.EncodeNil() - } - } else { - if yyq1305[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1315 := &x.ListMeta - yym1316 := z.EncBinary() - _ = yym1316 - if false { - } else if z.HasExtensions() && z.EncExt(yy1315) { - } else { - z.EncFallback(yy1315) - } - } - } - if yyr1305 || yy2arr1305 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym1318 := z.EncBinary() - _ = yym1318 - if false { - } else { - h.encSliceReplicaSet(([]ReplicaSet)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym1319 := z.EncBinary() - _ = yym1319 - if false { - } else { - h.encSliceReplicaSet(([]ReplicaSet)(x.Items), e) - } - } - } - if yyr1305 || yy2arr1305 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ReplicaSetList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1320 := z.DecBinary() - _ = yym1320 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1321 := r.ContainerType() - if yyct1321 == codecSelferValueTypeMap1234 { - yyl1321 := r.ReadMapStart() - if yyl1321 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1321, d) - } - } else if yyct1321 == codecSelferValueTypeArray1234 { - yyl1321 := r.ReadArrayStart() - if yyl1321 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1321, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ReplicaSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1322Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1322Slc - var yyhl1322 bool = l >= 0 - for yyj1322 := 0; ; yyj1322++ { - if yyhl1322 { - if yyj1322 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1322Slc = r.DecodeBytes(yys1322Slc, true, true) - yys1322 := string(yys1322Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1322 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv1325 := &x.ListMeta - yym1326 := z.DecBinary() - _ = yym1326 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1325) { - } else { - z.DecFallback(yyv1325, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv1327 := &x.Items - yym1328 := z.DecBinary() - _ = yym1328 - if false { - } else { - h.decSliceReplicaSet((*[]ReplicaSet)(yyv1327), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys1322) - } // end switch yys1322 - } // end for yyj1322 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ReplicaSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1329 int - var yyb1329 bool - var yyhl1329 bool = l >= 0 - yyj1329++ - if yyhl1329 { - yyb1329 = yyj1329 > l - } else { - yyb1329 = r.CheckBreak() - } - if yyb1329 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj1329++ - if yyhl1329 { - yyb1329 = yyj1329 > l - } else { - yyb1329 = r.CheckBreak() - } - if yyb1329 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj1329++ - if yyhl1329 { - yyb1329 = yyj1329 > l - } else { - yyb1329 = r.CheckBreak() - } - if yyb1329 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv1332 := &x.ListMeta - yym1333 := z.DecBinary() - _ = yym1333 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1332) { - } else { - z.DecFallback(yyv1332, false) - } - } - yyj1329++ - if yyhl1329 { - yyb1329 = yyj1329 > l - } else { - yyb1329 = r.CheckBreak() - } - if yyb1329 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv1334 := &x.Items - yym1335 := z.DecBinary() - _ = yym1335 - if false { - } else { - h.decSliceReplicaSet((*[]ReplicaSet)(yyv1334), d) - } - } - for { - yyj1329++ - if yyhl1329 { - yyb1329 = yyj1329 > l - } else { - yyb1329 = r.CheckBreak() - } - if yyb1329 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1329-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ReplicaSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1336 := z.EncBinary() - _ = yym1336 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1337 := !z.EncBinary() - yy2arr1337 := z.EncBasicHandle().StructToArray - var yyq1337 [3]bool - _, _, _ = yysep1337, yyq1337, yy2arr1337 - const yyr1337 bool = false - yyq1337[0] = x.Replicas != nil - yyq1337[1] = x.Selector != nil - yyq1337[2] = true - var yynn1337 int - if yyr1337 || yy2arr1337 { - r.EncodeArrayStart(3) - } else { - yynn1337 = 0 - for _, b := range yyq1337 { - if b { - yynn1337++ - } - } - r.EncodeMapStart(yynn1337) - yynn1337 = 0 - } - if yyr1337 || yy2arr1337 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1337[0] { - if x.Replicas == nil { - r.EncodeNil() - } else { - yy1339 := *x.Replicas - yym1340 := z.EncBinary() - _ = yym1340 - if false { - } else { - r.EncodeInt(int64(yy1339)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1337[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Replicas == nil { - r.EncodeNil() - } else { - yy1341 := *x.Replicas - yym1342 := z.EncBinary() - _ = yym1342 - if false { - } else { - r.EncodeInt(int64(yy1341)) - } - } - } - } - if yyr1337 || yy2arr1337 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1337[1] { - if x.Selector == nil { - r.EncodeNil() - } else { - x.Selector.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq1337[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Selector == nil { - r.EncodeNil() - } else { - x.Selector.CodecEncodeSelf(e) - } - } - } - if yyr1337 || yy2arr1337 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1337[2] { - yy1345 := &x.Template - yy1345.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq1337[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("template")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1346 := &x.Template - yy1346.CodecEncodeSelf(e) - } - } - if yyr1337 || yy2arr1337 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ReplicaSetSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1347 := z.DecBinary() - _ = yym1347 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1348 := r.ContainerType() - if yyct1348 == codecSelferValueTypeMap1234 { - yyl1348 := r.ReadMapStart() - if yyl1348 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1348, d) - } - } else if yyct1348 == codecSelferValueTypeArray1234 { - yyl1348 := r.ReadArrayStart() - if yyl1348 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1348, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ReplicaSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1349Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1349Slc - var yyhl1349 bool = l >= 0 - for yyj1349 := 0; ; yyj1349++ { - if yyhl1349 { - if yyj1349 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1349Slc = r.DecodeBytes(yys1349Slc, true, true) - yys1349 := string(yys1349Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1349 { - case "replicas": - if r.TryDecodeAsNil() { - if x.Replicas != nil { - x.Replicas = nil - } - } else { - if x.Replicas == nil { - x.Replicas = new(int32) - } - yym1351 := z.DecBinary() - _ = yym1351 - if false { - } else { - *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) - } - } - case "selector": - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(LabelSelector) - } - x.Selector.CodecDecodeSelf(d) - } - case "template": - if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} - } else { - yyv1353 := &x.Template - yyv1353.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys1349) - } // end switch yys1349 - } // end for yyj1349 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ReplicaSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1354 int - var yyb1354 bool - var yyhl1354 bool = l >= 0 - yyj1354++ - if yyhl1354 { - yyb1354 = yyj1354 > l - } else { - yyb1354 = r.CheckBreak() - } - if yyb1354 { - 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) - } - yym1356 := z.DecBinary() - _ = yym1356 - if false { - } else { - *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) - } - } - yyj1354++ - if yyhl1354 { - yyb1354 = yyj1354 > l - } else { - yyb1354 = r.CheckBreak() - } - if yyb1354 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(LabelSelector) - } - x.Selector.CodecDecodeSelf(d) - } - yyj1354++ - if yyhl1354 { - yyb1354 = yyj1354 > l - } else { - yyb1354 = r.CheckBreak() - } - if yyb1354 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} - } else { - yyv1358 := &x.Template - yyv1358.CodecDecodeSelf(d) - } - for { - yyj1354++ - if yyhl1354 { - yyb1354 = yyj1354 > l - } else { - yyb1354 = r.CheckBreak() - } - if yyb1354 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1354-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *ReplicaSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1359 := z.EncBinary() - _ = yym1359 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1360 := !z.EncBinary() - yy2arr1360 := z.EncBasicHandle().StructToArray - var yyq1360 [4]bool - _, _, _ = yysep1360, yyq1360, yy2arr1360 - const yyr1360 bool = false - yyq1360[1] = x.FullyLabeledReplicas != 0 - yyq1360[2] = x.ReadyReplicas != 0 - yyq1360[3] = x.ObservedGeneration != 0 - var yynn1360 int - if yyr1360 || yy2arr1360 { - r.EncodeArrayStart(4) - } else { - yynn1360 = 1 - for _, b := range yyq1360 { - if b { - yynn1360++ - } - } - r.EncodeMapStart(yynn1360) - yynn1360 = 0 - } - if yyr1360 || yy2arr1360 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1362 := z.EncBinary() - _ = yym1362 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1363 := z.EncBinary() - _ = yym1363 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } - if yyr1360 || yy2arr1360 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1360[1] { - yym1365 := z.EncBinary() - _ = yym1365 - if false { - } else { - r.EncodeInt(int64(x.FullyLabeledReplicas)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq1360[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("fullyLabeledReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1366 := z.EncBinary() - _ = yym1366 - if false { - } else { - r.EncodeInt(int64(x.FullyLabeledReplicas)) - } - } - } - if yyr1360 || yy2arr1360 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1360[2] { - yym1368 := z.EncBinary() - _ = yym1368 - if false { - } else { - r.EncodeInt(int64(x.ReadyReplicas)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq1360[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("readyReplicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1369 := z.EncBinary() - _ = yym1369 - if false { - } else { - r.EncodeInt(int64(x.ReadyReplicas)) - } - } - } - if yyr1360 || yy2arr1360 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1360[3] { - yym1371 := z.EncBinary() - _ = yym1371 - if false { - } else { - r.EncodeInt(int64(x.ObservedGeneration)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq1360[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1372 := z.EncBinary() - _ = yym1372 - if false { - } else { - r.EncodeInt(int64(x.ObservedGeneration)) - } - } - } - if yyr1360 || yy2arr1360 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ReplicaSetStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1373 := z.DecBinary() - _ = yym1373 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1374 := r.ContainerType() - if yyct1374 == codecSelferValueTypeMap1234 { - yyl1374 := r.ReadMapStart() - if yyl1374 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1374, d) - } - } else if yyct1374 == codecSelferValueTypeArray1234 { - yyl1374 := r.ReadArrayStart() - if yyl1374 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1374, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ReplicaSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1375Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1375Slc - var yyhl1375 bool = l >= 0 - for yyj1375 := 0; ; yyj1375++ { - if yyhl1375 { - if yyj1375 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1375Slc = r.DecodeBytes(yys1375Slc, true, true) - yys1375 := string(yys1375Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1375 { - 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 "readyReplicas": - if r.TryDecodeAsNil() { - x.ReadyReplicas = 0 - } else { - x.ReadyReplicas = int32(r.DecodeInt(32)) - } - case "observedGeneration": - if r.TryDecodeAsNil() { - x.ObservedGeneration = 0 - } else { - x.ObservedGeneration = int64(r.DecodeInt(64)) - } - default: - z.DecStructFieldNotFound(-1, yys1375) - } // end switch yys1375 - } // end for yyj1375 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ReplicaSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1380 int - var yyb1380 bool - var yyhl1380 bool = l >= 0 - yyj1380++ - if yyhl1380 { - yyb1380 = yyj1380 > l - } else { - yyb1380 = r.CheckBreak() - } - if yyb1380 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - yyj1380++ - if yyhl1380 { - yyb1380 = yyj1380 > l - } else { - yyb1380 = r.CheckBreak() - } - if yyb1380 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.FullyLabeledReplicas = 0 - } else { - x.FullyLabeledReplicas = int32(r.DecodeInt(32)) - } - yyj1380++ - if yyhl1380 { - yyb1380 = yyj1380 > l - } else { - yyb1380 = r.CheckBreak() - } - if yyb1380 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ReadyReplicas = 0 - } else { - x.ReadyReplicas = int32(r.DecodeInt(32)) - } - yyj1380++ - if yyhl1380 { - yyb1380 = yyj1380 > l - } else { - yyb1380 = r.CheckBreak() - } - if yyb1380 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObservedGeneration = 0 - } else { - x.ObservedGeneration = int64(r.DecodeInt(64)) - } - for { - yyj1380++ - if yyhl1380 { - yyb1380 = yyj1380 > l - } else { - yyb1380 = r.CheckBreak() - } - if yyb1380 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1380-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *PodSecurityPolicy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1385 := z.EncBinary() - _ = yym1385 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1386 := !z.EncBinary() - yy2arr1386 := z.EncBasicHandle().StructToArray - var yyq1386 [4]bool - _, _, _ = yysep1386, yyq1386, yy2arr1386 - const yyr1386 bool = false - yyq1386[0] = x.Kind != "" - yyq1386[1] = x.APIVersion != "" - yyq1386[2] = true - yyq1386[3] = true - var yynn1386 int - if yyr1386 || yy2arr1386 { - r.EncodeArrayStart(4) - } else { - yynn1386 = 0 - for _, b := range yyq1386 { - if b { - yynn1386++ - } - } - r.EncodeMapStart(yynn1386) - yynn1386 = 0 - } - if yyr1386 || yy2arr1386 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1386[0] { - yym1388 := z.EncBinary() - _ = yym1388 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1386[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1389 := z.EncBinary() - _ = yym1389 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr1386 || yy2arr1386 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1386[1] { - yym1391 := z.EncBinary() - _ = yym1391 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1386[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1392 := z.EncBinary() - _ = yym1392 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr1386 || yy2arr1386 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1386[2] { - yy1394 := &x.ObjectMeta - yy1394.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq1386[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1395 := &x.ObjectMeta - yy1395.CodecEncodeSelf(e) - } - } - if yyr1386 || yy2arr1386 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1386[3] { - yy1397 := &x.Spec - yy1397.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq1386[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1398 := &x.Spec - yy1398.CodecEncodeSelf(e) - } - } - if yyr1386 || yy2arr1386 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PodSecurityPolicy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1399 := z.DecBinary() - _ = yym1399 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1400 := r.ContainerType() - if yyct1400 == codecSelferValueTypeMap1234 { - yyl1400 := r.ReadMapStart() - if yyl1400 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1400, d) - } - } else if yyct1400 == codecSelferValueTypeArray1234 { - yyl1400 := r.ReadArrayStart() - if yyl1400 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1400, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PodSecurityPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1401Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1401Slc - var yyhl1401 bool = l >= 0 - for yyj1401 := 0; ; yyj1401++ { - if yyhl1401 { - if yyj1401 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1401Slc = r.DecodeBytes(yys1401Slc, true, true) - yys1401 := string(yys1401Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1401 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv1404 := &x.ObjectMeta - yyv1404.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = PodSecurityPolicySpec{} - } else { - yyv1405 := &x.Spec - yyv1405.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys1401) - } // end switch yys1401 - } // end for yyj1401 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1406 int - var yyb1406 bool - var yyhl1406 bool = l >= 0 - yyj1406++ - if yyhl1406 { - yyb1406 = yyj1406 > l - } else { - yyb1406 = r.CheckBreak() - } - if yyb1406 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj1406++ - if yyhl1406 { - yyb1406 = yyj1406 > l - } else { - yyb1406 = r.CheckBreak() - } - if yyb1406 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj1406++ - if yyhl1406 { - yyb1406 = yyj1406 > l - } else { - yyb1406 = r.CheckBreak() - } - if yyb1406 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv1409 := &x.ObjectMeta - yyv1409.CodecDecodeSelf(d) - } - yyj1406++ - if yyhl1406 { - yyb1406 = yyj1406 > l - } else { - yyb1406 = r.CheckBreak() - } - if yyb1406 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = PodSecurityPolicySpec{} - } else { - yyv1410 := &x.Spec - yyv1410.CodecDecodeSelf(d) - } - for { - yyj1406++ - if yyhl1406 { - yyb1406 = yyj1406 > l - } else { - yyb1406 = r.CheckBreak() - } - if yyb1406 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1406-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1411 := z.EncBinary() - _ = yym1411 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1412 := !z.EncBinary() - yy2arr1412 := z.EncBasicHandle().StructToArray - var yyq1412 [14]bool - _, _, _ = yysep1412, yyq1412, yy2arr1412 - const yyr1412 bool = false - yyq1412[0] = x.Privileged != false - yyq1412[1] = len(x.DefaultAddCapabilities) != 0 - yyq1412[2] = len(x.RequiredDropCapabilities) != 0 - yyq1412[3] = len(x.AllowedCapabilities) != 0 - yyq1412[4] = len(x.Volumes) != 0 - yyq1412[5] = x.HostNetwork != false - yyq1412[6] = len(x.HostPorts) != 0 - yyq1412[7] = x.HostPID != false - yyq1412[8] = x.HostIPC != false - yyq1412[13] = x.ReadOnlyRootFilesystem != false - var yynn1412 int - if yyr1412 || yy2arr1412 { - r.EncodeArrayStart(14) - } else { - yynn1412 = 4 - for _, b := range yyq1412 { - if b { - yynn1412++ - } - } - r.EncodeMapStart(yynn1412) - yynn1412 = 0 - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1412[0] { - yym1414 := z.EncBinary() - _ = yym1414 - if false { - } else { - r.EncodeBool(bool(x.Privileged)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq1412[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("privileged")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1415 := z.EncBinary() - _ = yym1415 - if false { - } else { - r.EncodeBool(bool(x.Privileged)) - } - } - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1412[1] { - if x.DefaultAddCapabilities == nil { - r.EncodeNil() - } else { - yym1417 := z.EncBinary() - _ = yym1417 - if false { - } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.DefaultAddCapabilities), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1412[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("defaultAddCapabilities")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.DefaultAddCapabilities == nil { - r.EncodeNil() - } else { - yym1418 := z.EncBinary() - _ = yym1418 - if false { - } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.DefaultAddCapabilities), e) - } - } - } - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1412[2] { - if x.RequiredDropCapabilities == nil { - r.EncodeNil() - } else { - yym1420 := z.EncBinary() - _ = yym1420 - if false { - } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.RequiredDropCapabilities), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1412[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("requiredDropCapabilities")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.RequiredDropCapabilities == nil { - r.EncodeNil() - } else { - yym1421 := z.EncBinary() - _ = yym1421 - if false { - } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.RequiredDropCapabilities), e) - } - } - } - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1412[3] { - if x.AllowedCapabilities == nil { - r.EncodeNil() - } else { - yym1423 := z.EncBinary() - _ = yym1423 - if false { - } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.AllowedCapabilities), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1412[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("allowedCapabilities")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.AllowedCapabilities == nil { - r.EncodeNil() - } else { - yym1424 := z.EncBinary() - _ = yym1424 - if false { - } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.AllowedCapabilities), e) - } - } - } - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1412[4] { - if x.Volumes == nil { - r.EncodeNil() - } else { - yym1426 := z.EncBinary() - _ = yym1426 - if false { - } else { - h.encSliceFSType(([]FSType)(x.Volumes), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1412[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("volumes")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Volumes == nil { - r.EncodeNil() - } else { - yym1427 := z.EncBinary() - _ = yym1427 - if false { - } else { - h.encSliceFSType(([]FSType)(x.Volumes), e) - } - } - } - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1412[5] { - yym1429 := z.EncBinary() - _ = yym1429 - if false { - } else { - r.EncodeBool(bool(x.HostNetwork)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq1412[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostNetwork")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1430 := z.EncBinary() - _ = yym1430 - if false { - } else { - r.EncodeBool(bool(x.HostNetwork)) - } - } - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1412[6] { - if x.HostPorts == nil { - r.EncodeNil() - } else { - yym1432 := z.EncBinary() - _ = yym1432 - if false { - } else { - h.encSliceHostPortRange(([]HostPortRange)(x.HostPorts), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1412[6] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostPorts")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.HostPorts == nil { - r.EncodeNil() - } else { - yym1433 := z.EncBinary() - _ = yym1433 - if false { - } else { - h.encSliceHostPortRange(([]HostPortRange)(x.HostPorts), e) - } - } - } - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1412[7] { - yym1435 := z.EncBinary() - _ = yym1435 - if false { - } else { - r.EncodeBool(bool(x.HostPID)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq1412[7] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostPID")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1436 := z.EncBinary() - _ = yym1436 - if false { - } else { - r.EncodeBool(bool(x.HostPID)) - } - } - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1412[8] { - yym1438 := z.EncBinary() - _ = yym1438 - if false { - } else { - r.EncodeBool(bool(x.HostIPC)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq1412[8] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostIPC")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1439 := z.EncBinary() - _ = yym1439 - if false { - } else { - r.EncodeBool(bool(x.HostIPC)) - } - } - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1441 := &x.SELinux - yy1441.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("seLinux")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1442 := &x.SELinux - yy1442.CodecEncodeSelf(e) - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1444 := &x.RunAsUser - yy1444.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("runAsUser")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1445 := &x.RunAsUser - yy1445.CodecEncodeSelf(e) - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1447 := &x.SupplementalGroups - yy1447.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("supplementalGroups")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1448 := &x.SupplementalGroups - yy1448.CodecEncodeSelf(e) - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1450 := &x.FSGroup - yy1450.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("fsGroup")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1451 := &x.FSGroup - yy1451.CodecEncodeSelf(e) - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1412[13] { - yym1453 := z.EncBinary() - _ = yym1453 - if false { - } else { - r.EncodeBool(bool(x.ReadOnlyRootFilesystem)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq1412[13] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("readOnlyRootFilesystem")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1454 := z.EncBinary() - _ = yym1454 - if false { - } else { - r.EncodeBool(bool(x.ReadOnlyRootFilesystem)) - } - } - } - if yyr1412 || yy2arr1412 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PodSecurityPolicySpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1455 := z.DecBinary() - _ = yym1455 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1456 := r.ContainerType() - if yyct1456 == codecSelferValueTypeMap1234 { - yyl1456 := r.ReadMapStart() - if yyl1456 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1456, d) - } - } else if yyct1456 == codecSelferValueTypeArray1234 { - yyl1456 := r.ReadArrayStart() - if yyl1456 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1456, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1457Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1457Slc - var yyhl1457 bool = l >= 0 - for yyj1457 := 0; ; yyj1457++ { - if yyhl1457 { - if yyj1457 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1457Slc = r.DecodeBytes(yys1457Slc, true, true) - yys1457 := string(yys1457Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1457 { - case "privileged": - if r.TryDecodeAsNil() { - x.Privileged = false - } else { - x.Privileged = bool(r.DecodeBool()) - } - case "defaultAddCapabilities": - if r.TryDecodeAsNil() { - x.DefaultAddCapabilities = nil - } else { - yyv1459 := &x.DefaultAddCapabilities - yym1460 := z.DecBinary() - _ = yym1460 - if false { - } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv1459), d) - } - } - case "requiredDropCapabilities": - if r.TryDecodeAsNil() { - x.RequiredDropCapabilities = nil - } else { - yyv1461 := &x.RequiredDropCapabilities - yym1462 := z.DecBinary() - _ = yym1462 - if false { - } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv1461), d) - } - } - case "allowedCapabilities": - if r.TryDecodeAsNil() { - x.AllowedCapabilities = nil - } else { - yyv1463 := &x.AllowedCapabilities - yym1464 := z.DecBinary() - _ = yym1464 - if false { - } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv1463), d) - } - } - case "volumes": - if r.TryDecodeAsNil() { - x.Volumes = nil - } else { - yyv1465 := &x.Volumes - yym1466 := z.DecBinary() - _ = yym1466 - if false { - } else { - h.decSliceFSType((*[]FSType)(yyv1465), d) - } - } - case "hostNetwork": - if r.TryDecodeAsNil() { - x.HostNetwork = false - } else { - x.HostNetwork = bool(r.DecodeBool()) - } - case "hostPorts": - if r.TryDecodeAsNil() { - x.HostPorts = nil - } else { - yyv1468 := &x.HostPorts - yym1469 := z.DecBinary() - _ = yym1469 - if false { - } else { - h.decSliceHostPortRange((*[]HostPortRange)(yyv1468), d) - } - } - case "hostPID": - if r.TryDecodeAsNil() { - x.HostPID = false - } else { - x.HostPID = bool(r.DecodeBool()) - } - case "hostIPC": - if r.TryDecodeAsNil() { - x.HostIPC = false - } else { - x.HostIPC = bool(r.DecodeBool()) - } - case "seLinux": - if r.TryDecodeAsNil() { - x.SELinux = SELinuxStrategyOptions{} - } else { - yyv1472 := &x.SELinux - yyv1472.CodecDecodeSelf(d) - } - case "runAsUser": - if r.TryDecodeAsNil() { - x.RunAsUser = RunAsUserStrategyOptions{} - } else { - yyv1473 := &x.RunAsUser - yyv1473.CodecDecodeSelf(d) - } - case "supplementalGroups": - if r.TryDecodeAsNil() { - x.SupplementalGroups = SupplementalGroupsStrategyOptions{} - } else { - yyv1474 := &x.SupplementalGroups - yyv1474.CodecDecodeSelf(d) - } - case "fsGroup": - if r.TryDecodeAsNil() { - x.FSGroup = FSGroupStrategyOptions{} - } else { - yyv1475 := &x.FSGroup - yyv1475.CodecDecodeSelf(d) - } - case "readOnlyRootFilesystem": - if r.TryDecodeAsNil() { - x.ReadOnlyRootFilesystem = false - } else { - x.ReadOnlyRootFilesystem = bool(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys1457) - } // end switch yys1457 - } // end for yyj1457 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1477 int - var yyb1477 bool - var yyhl1477 bool = l >= 0 - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Privileged = false - } else { - x.Privileged = bool(r.DecodeBool()) - } - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.DefaultAddCapabilities = nil - } else { - yyv1479 := &x.DefaultAddCapabilities - yym1480 := z.DecBinary() - _ = yym1480 - if false { - } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv1479), d) - } - } - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RequiredDropCapabilities = nil - } else { - yyv1481 := &x.RequiredDropCapabilities - yym1482 := z.DecBinary() - _ = yym1482 - if false { - } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv1481), d) - } - } - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.AllowedCapabilities = nil - } else { - yyv1483 := &x.AllowedCapabilities - yym1484 := z.DecBinary() - _ = yym1484 - if false { - } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv1483), d) - } - } - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Volumes = nil - } else { - yyv1485 := &x.Volumes - yym1486 := z.DecBinary() - _ = yym1486 - if false { - } else { - h.decSliceFSType((*[]FSType)(yyv1485), d) - } - } - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostNetwork = false - } else { - x.HostNetwork = bool(r.DecodeBool()) - } - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostPorts = nil - } else { - yyv1488 := &x.HostPorts - yym1489 := z.DecBinary() - _ = yym1489 - if false { - } else { - h.decSliceHostPortRange((*[]HostPortRange)(yyv1488), d) - } - } - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostPID = false - } else { - x.HostPID = bool(r.DecodeBool()) - } - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostIPC = false - } else { - x.HostIPC = bool(r.DecodeBool()) - } - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.SELinux = SELinuxStrategyOptions{} - } else { - yyv1492 := &x.SELinux - yyv1492.CodecDecodeSelf(d) - } - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RunAsUser = RunAsUserStrategyOptions{} - } else { - yyv1493 := &x.RunAsUser - yyv1493.CodecDecodeSelf(d) - } - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.SupplementalGroups = SupplementalGroupsStrategyOptions{} - } else { - yyv1494 := &x.SupplementalGroups - yyv1494.CodecDecodeSelf(d) - } - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.FSGroup = FSGroupStrategyOptions{} - } else { - yyv1495 := &x.FSGroup - yyv1495.CodecDecodeSelf(d) - } - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ReadOnlyRootFilesystem = false - } else { - x.ReadOnlyRootFilesystem = bool(r.DecodeBool()) - } - for { - yyj1477++ - if yyhl1477 { - yyb1477 = yyj1477 > l - } else { - yyb1477 = r.CheckBreak() - } - if yyb1477 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1477-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x FSType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym1497 := z.EncBinary() - _ = yym1497 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *FSType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1498 := z.DecBinary() - _ = yym1498 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *HostPortRange) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1499 := z.EncBinary() - _ = yym1499 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1500 := !z.EncBinary() - yy2arr1500 := z.EncBasicHandle().StructToArray - var yyq1500 [2]bool - _, _, _ = yysep1500, yyq1500, yy2arr1500 - const yyr1500 bool = false - var yynn1500 int - if yyr1500 || yy2arr1500 { - r.EncodeArrayStart(2) - } else { - yynn1500 = 2 - for _, b := range yyq1500 { - if b { - yynn1500++ - } - } - r.EncodeMapStart(yynn1500) - yynn1500 = 0 - } - if yyr1500 || yy2arr1500 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1502 := z.EncBinary() - _ = yym1502 - if false { - } else { - r.EncodeInt(int64(x.Min)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("min")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1503 := z.EncBinary() - _ = yym1503 - if false { - } else { - r.EncodeInt(int64(x.Min)) - } - } - if yyr1500 || yy2arr1500 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1505 := z.EncBinary() - _ = yym1505 - if false { - } else { - r.EncodeInt(int64(x.Max)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("max")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1506 := z.EncBinary() - _ = yym1506 - if false { - } else { - r.EncodeInt(int64(x.Max)) - } - } - if yyr1500 || yy2arr1500 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *HostPortRange) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1507 := z.DecBinary() - _ = yym1507 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1508 := r.ContainerType() - if yyct1508 == codecSelferValueTypeMap1234 { - yyl1508 := r.ReadMapStart() - if yyl1508 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1508, d) - } - } else if yyct1508 == codecSelferValueTypeArray1234 { - yyl1508 := r.ReadArrayStart() - if yyl1508 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1508, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *HostPortRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1509Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1509Slc - var yyhl1509 bool = l >= 0 - for yyj1509 := 0; ; yyj1509++ { - if yyhl1509 { - if yyj1509 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1509Slc = r.DecodeBytes(yys1509Slc, true, true) - yys1509 := string(yys1509Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1509 { - case "min": - if r.TryDecodeAsNil() { - x.Min = 0 - } else { - x.Min = int32(r.DecodeInt(32)) - } - case "max": - if r.TryDecodeAsNil() { - x.Max = 0 - } else { - x.Max = int32(r.DecodeInt(32)) - } - default: - z.DecStructFieldNotFound(-1, yys1509) - } // end switch yys1509 - } // end for yyj1509 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *HostPortRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1512 int - var yyb1512 bool - var yyhl1512 bool = l >= 0 - yyj1512++ - if yyhl1512 { - yyb1512 = yyj1512 > l - } else { - yyb1512 = r.CheckBreak() - } - if yyb1512 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Min = 0 - } else { - x.Min = int32(r.DecodeInt(32)) - } - yyj1512++ - if yyhl1512 { - yyb1512 = yyj1512 > l - } else { - yyb1512 = r.CheckBreak() - } - if yyb1512 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Max = 0 - } else { - x.Max = int32(r.DecodeInt(32)) - } - for { - yyj1512++ - if yyhl1512 { - yyb1512 = yyj1512 > l - } else { - yyb1512 = r.CheckBreak() - } - if yyb1512 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1512-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *SELinuxStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1515 := z.EncBinary() - _ = yym1515 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1516 := !z.EncBinary() - yy2arr1516 := z.EncBasicHandle().StructToArray - var yyq1516 [2]bool - _, _, _ = yysep1516, yyq1516, yy2arr1516 - const yyr1516 bool = false - yyq1516[1] = x.SELinuxOptions != nil - var yynn1516 int - if yyr1516 || yy2arr1516 { - r.EncodeArrayStart(2) - } else { - yynn1516 = 1 - for _, b := range yyq1516 { - if b { - yynn1516++ - } - } - r.EncodeMapStart(yynn1516) - yynn1516 = 0 - } - if yyr1516 || yy2arr1516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - x.Rule.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("rule")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Rule.CodecEncodeSelf(e) - } - if yyr1516 || yy2arr1516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1516[1] { - if x.SELinuxOptions == nil { - r.EncodeNil() - } else { - x.SELinuxOptions.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq1516[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.SELinuxOptions == nil { - r.EncodeNil() - } else { - x.SELinuxOptions.CodecEncodeSelf(e) - } - } - } - if yyr1516 || yy2arr1516 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *SELinuxStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1519 := z.DecBinary() - _ = yym1519 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1520 := r.ContainerType() - if yyct1520 == codecSelferValueTypeMap1234 { - yyl1520 := r.ReadMapStart() - if yyl1520 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1520, d) - } - } else if yyct1520 == codecSelferValueTypeArray1234 { - yyl1520 := r.ReadArrayStart() - if yyl1520 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1520, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *SELinuxStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1521Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1521Slc - var yyhl1521 bool = l >= 0 - for yyj1521 := 0; ; yyj1521++ { - if yyhl1521 { - if yyj1521 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1521Slc = r.DecodeBytes(yys1521Slc, true, true) - yys1521 := string(yys1521Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1521 { - case "rule": - if r.TryDecodeAsNil() { - x.Rule = "" - } else { - x.Rule = SELinuxStrategy(r.DecodeString()) - } - case "seLinuxOptions": - if r.TryDecodeAsNil() { - if x.SELinuxOptions != nil { - x.SELinuxOptions = nil - } - } else { - if x.SELinuxOptions == nil { - x.SELinuxOptions = new(pkg2_v1.SELinuxOptions) - } - x.SELinuxOptions.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys1521) - } // end switch yys1521 - } // end for yyj1521 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *SELinuxStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1524 int - var yyb1524 bool - var yyhl1524 bool = l >= 0 - yyj1524++ - if yyhl1524 { - yyb1524 = yyj1524 > l - } else { - yyb1524 = r.CheckBreak() - } - if yyb1524 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Rule = "" - } else { - x.Rule = SELinuxStrategy(r.DecodeString()) - } - yyj1524++ - if yyhl1524 { - yyb1524 = yyj1524 > l - } else { - yyb1524 = r.CheckBreak() - } - if yyb1524 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.SELinuxOptions != nil { - x.SELinuxOptions = nil - } - } else { - if x.SELinuxOptions == nil { - x.SELinuxOptions = new(pkg2_v1.SELinuxOptions) - } - x.SELinuxOptions.CodecDecodeSelf(d) - } - for { - yyj1524++ - if yyhl1524 { - yyb1524 = yyj1524 > l - } else { - yyb1524 = r.CheckBreak() - } - if yyb1524 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1524-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x SELinuxStrategy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym1527 := z.EncBinary() - _ = yym1527 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *SELinuxStrategy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1528 := z.DecBinary() - _ = yym1528 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *RunAsUserStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1529 := z.EncBinary() - _ = yym1529 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1530 := !z.EncBinary() - yy2arr1530 := z.EncBasicHandle().StructToArray - var yyq1530 [2]bool - _, _, _ = yysep1530, yyq1530, yy2arr1530 - const yyr1530 bool = false - yyq1530[1] = len(x.Ranges) != 0 - var yynn1530 int - if yyr1530 || yy2arr1530 { - r.EncodeArrayStart(2) - } else { - yynn1530 = 1 - for _, b := range yyq1530 { - if b { - yynn1530++ - } - } - r.EncodeMapStart(yynn1530) - yynn1530 = 0 - } - if yyr1530 || yy2arr1530 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - x.Rule.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("rule")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Rule.CodecEncodeSelf(e) - } - if yyr1530 || yy2arr1530 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1530[1] { - if x.Ranges == nil { - r.EncodeNil() - } else { - yym1533 := z.EncBinary() - _ = yym1533 - if false { - } else { - h.encSliceIDRange(([]IDRange)(x.Ranges), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1530[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("ranges")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Ranges == nil { - r.EncodeNil() - } else { - yym1534 := z.EncBinary() - _ = yym1534 - if false { - } else { - h.encSliceIDRange(([]IDRange)(x.Ranges), e) - } - } - } - } - if yyr1530 || yy2arr1530 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *RunAsUserStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1535 := z.DecBinary() - _ = yym1535 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1536 := r.ContainerType() - if yyct1536 == codecSelferValueTypeMap1234 { - yyl1536 := r.ReadMapStart() - if yyl1536 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1536, d) - } - } else if yyct1536 == codecSelferValueTypeArray1234 { - yyl1536 := r.ReadArrayStart() - if yyl1536 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1536, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *RunAsUserStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1537Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1537Slc - var yyhl1537 bool = l >= 0 - for yyj1537 := 0; ; yyj1537++ { - if yyhl1537 { - if yyj1537 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1537Slc = r.DecodeBytes(yys1537Slc, true, true) - yys1537 := string(yys1537Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1537 { - case "rule": - if r.TryDecodeAsNil() { - x.Rule = "" - } else { - x.Rule = RunAsUserStrategy(r.DecodeString()) - } - case "ranges": - if r.TryDecodeAsNil() { - x.Ranges = nil - } else { - yyv1539 := &x.Ranges - yym1540 := z.DecBinary() - _ = yym1540 - if false { - } else { - h.decSliceIDRange((*[]IDRange)(yyv1539), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys1537) - } // end switch yys1537 - } // end for yyj1537 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *RunAsUserStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1541 int - var yyb1541 bool - var yyhl1541 bool = l >= 0 - yyj1541++ - if yyhl1541 { - yyb1541 = yyj1541 > l - } else { - yyb1541 = r.CheckBreak() - } - if yyb1541 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Rule = "" - } else { - x.Rule = RunAsUserStrategy(r.DecodeString()) - } - yyj1541++ - if yyhl1541 { - yyb1541 = yyj1541 > l - } else { - yyb1541 = r.CheckBreak() - } - if yyb1541 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Ranges = nil - } else { - yyv1543 := &x.Ranges - yym1544 := z.DecBinary() - _ = yym1544 - if false { - } else { - h.decSliceIDRange((*[]IDRange)(yyv1543), d) - } - } - for { - yyj1541++ - if yyhl1541 { - yyb1541 = yyj1541 > l - } else { - yyb1541 = r.CheckBreak() - } - if yyb1541 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1541-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *IDRange) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1545 := z.EncBinary() - _ = yym1545 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1546 := !z.EncBinary() - yy2arr1546 := z.EncBasicHandle().StructToArray - var yyq1546 [2]bool - _, _, _ = yysep1546, yyq1546, yy2arr1546 - const yyr1546 bool = false - var yynn1546 int - if yyr1546 || yy2arr1546 { - r.EncodeArrayStart(2) - } else { - yynn1546 = 2 - for _, b := range yyq1546 { - if b { - yynn1546++ - } - } - r.EncodeMapStart(yynn1546) - yynn1546 = 0 - } - if yyr1546 || yy2arr1546 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1548 := z.EncBinary() - _ = yym1548 - if false { - } else { - r.EncodeInt(int64(x.Min)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("min")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1549 := z.EncBinary() - _ = yym1549 - if false { - } else { - r.EncodeInt(int64(x.Min)) - } - } - if yyr1546 || yy2arr1546 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1551 := z.EncBinary() - _ = yym1551 - if false { - } else { - r.EncodeInt(int64(x.Max)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("max")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1552 := z.EncBinary() - _ = yym1552 - if false { - } else { - r.EncodeInt(int64(x.Max)) - } - } - if yyr1546 || yy2arr1546 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *IDRange) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1553 := z.DecBinary() - _ = yym1553 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1554 := r.ContainerType() - if yyct1554 == codecSelferValueTypeMap1234 { - yyl1554 := r.ReadMapStart() - if yyl1554 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1554, d) - } - } else if yyct1554 == codecSelferValueTypeArray1234 { - yyl1554 := r.ReadArrayStart() - if yyl1554 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1554, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *IDRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1555Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1555Slc - var yyhl1555 bool = l >= 0 - for yyj1555 := 0; ; yyj1555++ { - if yyhl1555 { - if yyj1555 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1555Slc = r.DecodeBytes(yys1555Slc, true, true) - yys1555 := string(yys1555Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1555 { - case "min": - if r.TryDecodeAsNil() { - x.Min = 0 - } else { - x.Min = int64(r.DecodeInt(64)) - } - case "max": - if r.TryDecodeAsNil() { - x.Max = 0 - } else { - x.Max = int64(r.DecodeInt(64)) - } - default: - z.DecStructFieldNotFound(-1, yys1555) - } // end switch yys1555 - } // end for yyj1555 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *IDRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1558 int - var yyb1558 bool - var yyhl1558 bool = l >= 0 - yyj1558++ - if yyhl1558 { - yyb1558 = yyj1558 > l - } else { - yyb1558 = r.CheckBreak() - } - if yyb1558 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Min = 0 - } else { - x.Min = int64(r.DecodeInt(64)) - } - yyj1558++ - if yyhl1558 { - yyb1558 = yyj1558 > l - } else { - yyb1558 = r.CheckBreak() - } - if yyb1558 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Max = 0 - } else { - x.Max = int64(r.DecodeInt(64)) - } - for { - yyj1558++ - if yyhl1558 { - yyb1558 = yyj1558 > l - } else { - yyb1558 = r.CheckBreak() - } - if yyb1558 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1558-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x RunAsUserStrategy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym1561 := z.EncBinary() - _ = yym1561 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *RunAsUserStrategy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1562 := z.DecBinary() - _ = yym1562 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *FSGroupStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1563 := z.EncBinary() - _ = yym1563 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1564 := !z.EncBinary() - yy2arr1564 := z.EncBasicHandle().StructToArray - var yyq1564 [2]bool - _, _, _ = yysep1564, yyq1564, yy2arr1564 - const yyr1564 bool = false - yyq1564[0] = x.Rule != "" - yyq1564[1] = len(x.Ranges) != 0 - var yynn1564 int - if yyr1564 || yy2arr1564 { - r.EncodeArrayStart(2) - } else { - yynn1564 = 0 - for _, b := range yyq1564 { - if b { - yynn1564++ - } - } - r.EncodeMapStart(yynn1564) - yynn1564 = 0 - } - if yyr1564 || yy2arr1564 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1564[0] { - x.Rule.CodecEncodeSelf(e) - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1564[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("rule")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Rule.CodecEncodeSelf(e) - } - } - if yyr1564 || yy2arr1564 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1564[1] { - if x.Ranges == nil { - r.EncodeNil() - } else { - yym1567 := z.EncBinary() - _ = yym1567 - if false { - } else { - h.encSliceIDRange(([]IDRange)(x.Ranges), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1564[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("ranges")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Ranges == nil { - r.EncodeNil() - } else { - yym1568 := z.EncBinary() - _ = yym1568 - if false { - } else { - h.encSliceIDRange(([]IDRange)(x.Ranges), e) - } - } - } - } - if yyr1564 || yy2arr1564 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *FSGroupStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1569 := z.DecBinary() - _ = yym1569 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1570 := r.ContainerType() - if yyct1570 == codecSelferValueTypeMap1234 { - yyl1570 := r.ReadMapStart() - if yyl1570 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1570, d) - } - } else if yyct1570 == codecSelferValueTypeArray1234 { - yyl1570 := r.ReadArrayStart() - if yyl1570 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1570, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *FSGroupStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1571Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1571Slc - var yyhl1571 bool = l >= 0 - for yyj1571 := 0; ; yyj1571++ { - if yyhl1571 { - if yyj1571 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1571Slc = r.DecodeBytes(yys1571Slc, true, true) - yys1571 := string(yys1571Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1571 { - case "rule": - if r.TryDecodeAsNil() { - x.Rule = "" - } else { - x.Rule = FSGroupStrategyType(r.DecodeString()) - } - case "ranges": - if r.TryDecodeAsNil() { - x.Ranges = nil - } else { - yyv1573 := &x.Ranges - yym1574 := z.DecBinary() - _ = yym1574 - if false { - } else { - h.decSliceIDRange((*[]IDRange)(yyv1573), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys1571) - } // end switch yys1571 - } // end for yyj1571 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *FSGroupStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1575 int - var yyb1575 bool - var yyhl1575 bool = l >= 0 - yyj1575++ - if yyhl1575 { - yyb1575 = yyj1575 > l - } else { - yyb1575 = r.CheckBreak() - } - if yyb1575 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Rule = "" - } else { - x.Rule = FSGroupStrategyType(r.DecodeString()) - } - yyj1575++ - if yyhl1575 { - yyb1575 = yyj1575 > l - } else { - yyb1575 = r.CheckBreak() - } - if yyb1575 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Ranges = nil - } else { - yyv1577 := &x.Ranges - yym1578 := z.DecBinary() - _ = yym1578 - if false { - } else { - h.decSliceIDRange((*[]IDRange)(yyv1577), d) - } - } - for { - yyj1575++ - if yyhl1575 { - yyb1575 = yyj1575 > l - } else { - yyb1575 = r.CheckBreak() - } - if yyb1575 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1575-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x FSGroupStrategyType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym1579 := z.EncBinary() - _ = yym1579 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *FSGroupStrategyType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1580 := z.DecBinary() - _ = yym1580 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *SupplementalGroupsStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1581 := z.EncBinary() - _ = yym1581 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1582 := !z.EncBinary() - yy2arr1582 := z.EncBasicHandle().StructToArray - var yyq1582 [2]bool - _, _, _ = yysep1582, yyq1582, yy2arr1582 - const yyr1582 bool = false - yyq1582[0] = x.Rule != "" - yyq1582[1] = len(x.Ranges) != 0 - var yynn1582 int - if yyr1582 || yy2arr1582 { - r.EncodeArrayStart(2) - } else { - yynn1582 = 0 - for _, b := range yyq1582 { - if b { - yynn1582++ - } - } - r.EncodeMapStart(yynn1582) - yynn1582 = 0 - } - if yyr1582 || yy2arr1582 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1582[0] { - x.Rule.CodecEncodeSelf(e) - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1582[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("rule")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Rule.CodecEncodeSelf(e) - } - } - if yyr1582 || yy2arr1582 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1582[1] { - if x.Ranges == nil { - r.EncodeNil() - } else { - yym1585 := z.EncBinary() - _ = yym1585 - if false { - } else { - h.encSliceIDRange(([]IDRange)(x.Ranges), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1582[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("ranges")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Ranges == nil { - r.EncodeNil() - } else { - yym1586 := z.EncBinary() - _ = yym1586 - if false { - } else { - h.encSliceIDRange(([]IDRange)(x.Ranges), e) - } - } - } - } - if yyr1582 || yy2arr1582 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *SupplementalGroupsStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1587 := z.DecBinary() - _ = yym1587 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1588 := r.ContainerType() - if yyct1588 == codecSelferValueTypeMap1234 { - yyl1588 := r.ReadMapStart() - if yyl1588 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1588, d) - } - } else if yyct1588 == codecSelferValueTypeArray1234 { - yyl1588 := r.ReadArrayStart() - if yyl1588 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1588, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *SupplementalGroupsStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1589Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1589Slc - var yyhl1589 bool = l >= 0 - for yyj1589 := 0; ; yyj1589++ { - if yyhl1589 { - if yyj1589 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1589Slc = r.DecodeBytes(yys1589Slc, true, true) - yys1589 := string(yys1589Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1589 { - case "rule": - if r.TryDecodeAsNil() { - x.Rule = "" - } else { - x.Rule = SupplementalGroupsStrategyType(r.DecodeString()) - } - case "ranges": - if r.TryDecodeAsNil() { - x.Ranges = nil - } else { - yyv1591 := &x.Ranges - yym1592 := z.DecBinary() - _ = yym1592 - if false { - } else { - h.decSliceIDRange((*[]IDRange)(yyv1591), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys1589) - } // end switch yys1589 - } // end for yyj1589 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *SupplementalGroupsStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1593 int - var yyb1593 bool - var yyhl1593 bool = l >= 0 - yyj1593++ - if yyhl1593 { - yyb1593 = yyj1593 > l - } else { - yyb1593 = r.CheckBreak() - } - if yyb1593 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Rule = "" - } else { - x.Rule = SupplementalGroupsStrategyType(r.DecodeString()) - } - yyj1593++ - if yyhl1593 { - yyb1593 = yyj1593 > l - } else { - yyb1593 = r.CheckBreak() - } - if yyb1593 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Ranges = nil - } else { - yyv1595 := &x.Ranges - yym1596 := z.DecBinary() - _ = yym1596 - if false { - } else { - h.decSliceIDRange((*[]IDRange)(yyv1595), d) - } - } - for { - yyj1593++ - if yyhl1593 { - yyb1593 = yyj1593 > l - } else { - yyb1593 = r.CheckBreak() - } - if yyb1593 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1593-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x SupplementalGroupsStrategyType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym1597 := z.EncBinary() - _ = yym1597 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *SupplementalGroupsStrategyType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1598 := z.DecBinary() - _ = yym1598 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - -func (x *PodSecurityPolicyList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1599 := z.EncBinary() - _ = yym1599 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1600 := !z.EncBinary() - yy2arr1600 := z.EncBasicHandle().StructToArray - var yyq1600 [4]bool - _, _, _ = yysep1600, yyq1600, yy2arr1600 - const yyr1600 bool = false - yyq1600[0] = x.Kind != "" - yyq1600[1] = x.APIVersion != "" - yyq1600[2] = true - var yynn1600 int - if yyr1600 || yy2arr1600 { - r.EncodeArrayStart(4) - } else { - yynn1600 = 1 - for _, b := range yyq1600 { - if b { - yynn1600++ - } - } - r.EncodeMapStart(yynn1600) - yynn1600 = 0 - } - if yyr1600 || yy2arr1600 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1600[0] { - yym1602 := z.EncBinary() - _ = yym1602 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1600[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1603 := z.EncBinary() - _ = yym1603 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr1600 || yy2arr1600 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1600[1] { - yym1605 := z.EncBinary() - _ = yym1605 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1600[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1606 := z.EncBinary() - _ = yym1606 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr1600 || yy2arr1600 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1600[2] { - yy1608 := &x.ListMeta - yym1609 := z.EncBinary() - _ = yym1609 - if false { - } else if z.HasExtensions() && z.EncExt(yy1608) { - } else { - z.EncFallback(yy1608) - } - } else { - r.EncodeNil() - } - } else { - if yyq1600[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1610 := &x.ListMeta - yym1611 := z.EncBinary() - _ = yym1611 - if false { - } else if z.HasExtensions() && z.EncExt(yy1610) { - } else { - z.EncFallback(yy1610) - } - } - } - if yyr1600 || yy2arr1600 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym1613 := z.EncBinary() - _ = yym1613 - if false { - } else { - h.encSlicePodSecurityPolicy(([]PodSecurityPolicy)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym1614 := z.EncBinary() - _ = yym1614 - if false { - } else { - h.encSlicePodSecurityPolicy(([]PodSecurityPolicy)(x.Items), e) - } - } - } - if yyr1600 || yy2arr1600 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PodSecurityPolicyList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1615 := z.DecBinary() - _ = yym1615 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1616 := r.ContainerType() - if yyct1616 == codecSelferValueTypeMap1234 { - yyl1616 := r.ReadMapStart() - if yyl1616 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1616, d) - } - } else if yyct1616 == codecSelferValueTypeArray1234 { - yyl1616 := r.ReadArrayStart() - if yyl1616 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1616, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PodSecurityPolicyList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1617Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1617Slc - var yyhl1617 bool = l >= 0 - for yyj1617 := 0; ; yyj1617++ { - if yyhl1617 { - if yyj1617 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1617Slc = r.DecodeBytes(yys1617Slc, true, true) - yys1617 := string(yys1617Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1617 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv1620 := &x.ListMeta - yym1621 := z.DecBinary() - _ = yym1621 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1620) { - } else { - z.DecFallback(yyv1620, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv1622 := &x.Items - yym1623 := z.DecBinary() - _ = yym1623 - if false { - } else { - h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv1622), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys1617) - } // end switch yys1617 - } // end for yyj1617 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PodSecurityPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1624 int - var yyb1624 bool - var yyhl1624 bool = l >= 0 - yyj1624++ - if yyhl1624 { - yyb1624 = yyj1624 > l - } else { - yyb1624 = r.CheckBreak() - } - if yyb1624 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj1624++ - if yyhl1624 { - yyb1624 = yyj1624 > l - } else { - yyb1624 = r.CheckBreak() - } - if yyb1624 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj1624++ - if yyhl1624 { - yyb1624 = yyj1624 > l - } else { - yyb1624 = r.CheckBreak() - } - if yyb1624 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv1627 := &x.ListMeta - yym1628 := z.DecBinary() - _ = yym1628 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1627) { - } else { - z.DecFallback(yyv1627, false) - } - } - yyj1624++ - if yyhl1624 { - yyb1624 = yyj1624 > l - } else { - yyb1624 = r.CheckBreak() - } - if yyb1624 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv1629 := &x.Items - yym1630 := z.DecBinary() - _ = yym1630 - if false { - } else { - h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv1629), d) - } - } - for { - yyj1624++ - if yyhl1624 { - yyb1624 = yyj1624 > l - } else { - yyb1624 = r.CheckBreak() - } - if yyb1624 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1624-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *NetworkPolicy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1631 := z.EncBinary() - _ = yym1631 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1632 := !z.EncBinary() - yy2arr1632 := z.EncBasicHandle().StructToArray - var yyq1632 [4]bool - _, _, _ = yysep1632, yyq1632, yy2arr1632 - const yyr1632 bool = false - yyq1632[0] = x.Kind != "" - yyq1632[1] = x.APIVersion != "" - yyq1632[2] = true - yyq1632[3] = true - var yynn1632 int - if yyr1632 || yy2arr1632 { - r.EncodeArrayStart(4) - } else { - yynn1632 = 0 - for _, b := range yyq1632 { - if b { - yynn1632++ - } - } - r.EncodeMapStart(yynn1632) - yynn1632 = 0 - } - if yyr1632 || yy2arr1632 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1632[0] { - yym1634 := z.EncBinary() - _ = yym1634 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1632[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1635 := z.EncBinary() - _ = yym1635 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr1632 || yy2arr1632 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1632[1] { - yym1637 := z.EncBinary() - _ = yym1637 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1632[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1638 := z.EncBinary() - _ = yym1638 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr1632 || yy2arr1632 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1632[2] { - yy1640 := &x.ObjectMeta - yy1640.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq1632[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1641 := &x.ObjectMeta - yy1641.CodecEncodeSelf(e) - } - } - if yyr1632 || yy2arr1632 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1632[3] { - yy1643 := &x.Spec - yy1643.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq1632[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1644 := &x.Spec - yy1644.CodecEncodeSelf(e) - } - } - if yyr1632 || yy2arr1632 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *NetworkPolicy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1645 := z.DecBinary() - _ = yym1645 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1646 := r.ContainerType() - if yyct1646 == codecSelferValueTypeMap1234 { - yyl1646 := r.ReadMapStart() - if yyl1646 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1646, d) - } - } else if yyct1646 == codecSelferValueTypeArray1234 { - yyl1646 := r.ReadArrayStart() - if yyl1646 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1646, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *NetworkPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1647Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1647Slc - var yyhl1647 bool = l >= 0 - for yyj1647 := 0; ; yyj1647++ { - if yyhl1647 { - if yyj1647 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1647Slc = r.DecodeBytes(yys1647Slc, true, true) - yys1647 := string(yys1647Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1647 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv1650 := &x.ObjectMeta - yyv1650.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = NetworkPolicySpec{} - } else { - yyv1651 := &x.Spec - yyv1651.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys1647) - } // end switch yys1647 - } // end for yyj1647 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1652 int - var yyb1652 bool - var yyhl1652 bool = l >= 0 - yyj1652++ - if yyhl1652 { - yyb1652 = yyj1652 > l - } else { - yyb1652 = r.CheckBreak() - } - if yyb1652 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj1652++ - if yyhl1652 { - yyb1652 = yyj1652 > l - } else { - yyb1652 = r.CheckBreak() - } - if yyb1652 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj1652++ - if yyhl1652 { - yyb1652 = yyj1652 > l - } else { - yyb1652 = r.CheckBreak() - } - if yyb1652 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} - } else { - yyv1655 := &x.ObjectMeta - yyv1655.CodecDecodeSelf(d) - } - yyj1652++ - if yyhl1652 { - yyb1652 = yyj1652 > l - } else { - yyb1652 = r.CheckBreak() - } - if yyb1652 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = NetworkPolicySpec{} - } else { - yyv1656 := &x.Spec - yyv1656.CodecDecodeSelf(d) - } - for { - yyj1652++ - if yyhl1652 { - yyb1652 = yyj1652 > l - } else { - yyb1652 = r.CheckBreak() - } - if yyb1652 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1652-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *NetworkPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1657 := z.EncBinary() - _ = yym1657 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1658 := !z.EncBinary() - yy2arr1658 := z.EncBasicHandle().StructToArray - var yyq1658 [2]bool - _, _, _ = yysep1658, yyq1658, yy2arr1658 - const yyr1658 bool = false - yyq1658[1] = len(x.Ingress) != 0 - var yynn1658 int - if yyr1658 || yy2arr1658 { - r.EncodeArrayStart(2) - } else { - yynn1658 = 1 - for _, b := range yyq1658 { - if b { - yynn1658++ - } - } - r.EncodeMapStart(yynn1658) - yynn1658 = 0 - } - if yyr1658 || yy2arr1658 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1660 := &x.PodSelector - yy1660.CodecEncodeSelf(e) - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("podSelector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1661 := &x.PodSelector - yy1661.CodecEncodeSelf(e) - } - if yyr1658 || yy2arr1658 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1658[1] { - if x.Ingress == nil { - r.EncodeNil() - } else { - yym1663 := z.EncBinary() - _ = yym1663 - if false { - } else { - h.encSliceNetworkPolicyIngressRule(([]NetworkPolicyIngressRule)(x.Ingress), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1658[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("ingress")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Ingress == nil { - r.EncodeNil() - } else { - yym1664 := z.EncBinary() - _ = yym1664 - if false { - } else { - h.encSliceNetworkPolicyIngressRule(([]NetworkPolicyIngressRule)(x.Ingress), e) - } - } - } - } - if yyr1658 || yy2arr1658 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *NetworkPolicySpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1665 := z.DecBinary() - _ = yym1665 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1666 := r.ContainerType() - if yyct1666 == codecSelferValueTypeMap1234 { - yyl1666 := r.ReadMapStart() - if yyl1666 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1666, d) - } - } else if yyct1666 == codecSelferValueTypeArray1234 { - yyl1666 := r.ReadArrayStart() - if yyl1666 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1666, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *NetworkPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1667Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1667Slc - var yyhl1667 bool = l >= 0 - for yyj1667 := 0; ; yyj1667++ { - if yyhl1667 { - if yyj1667 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1667Slc = r.DecodeBytes(yys1667Slc, true, true) - yys1667 := string(yys1667Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1667 { - case "podSelector": - if r.TryDecodeAsNil() { - x.PodSelector = LabelSelector{} - } else { - yyv1668 := &x.PodSelector - yyv1668.CodecDecodeSelf(d) - } - case "ingress": - if r.TryDecodeAsNil() { - x.Ingress = nil - } else { - yyv1669 := &x.Ingress - yym1670 := z.DecBinary() - _ = yym1670 - if false { - } else { - h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv1669), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys1667) - } // end switch yys1667 - } // end for yyj1667 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *NetworkPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1671 int - var yyb1671 bool - var yyhl1671 bool = l >= 0 - yyj1671++ - if yyhl1671 { - yyb1671 = yyj1671 > l - } else { - yyb1671 = r.CheckBreak() - } - if yyb1671 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.PodSelector = LabelSelector{} - } else { - yyv1672 := &x.PodSelector - yyv1672.CodecDecodeSelf(d) - } - yyj1671++ - if yyhl1671 { - yyb1671 = yyj1671 > l - } else { - yyb1671 = r.CheckBreak() - } - if yyb1671 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Ingress = nil - } else { - yyv1673 := &x.Ingress - yym1674 := z.DecBinary() - _ = yym1674 - if false { - } else { - h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv1673), d) - } - } - for { - yyj1671++ - if yyhl1671 { - yyb1671 = yyj1671 > l - } else { - yyb1671 = r.CheckBreak() - } - if yyb1671 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1671-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *NetworkPolicyIngressRule) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1675 := z.EncBinary() - _ = yym1675 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1676 := !z.EncBinary() - yy2arr1676 := z.EncBasicHandle().StructToArray - var yyq1676 [2]bool - _, _, _ = yysep1676, yyq1676, yy2arr1676 - const yyr1676 bool = false - yyq1676[0] = len(x.Ports) != 0 - yyq1676[1] = len(x.From) != 0 - var yynn1676 int - if yyr1676 || yy2arr1676 { - r.EncodeArrayStart(2) - } else { - yynn1676 = 0 - for _, b := range yyq1676 { - if b { - yynn1676++ - } - } - r.EncodeMapStart(yynn1676) - yynn1676 = 0 - } - if yyr1676 || yy2arr1676 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1676[0] { - if x.Ports == nil { - r.EncodeNil() - } else { - yym1678 := z.EncBinary() - _ = yym1678 - if false { - } else { - h.encSliceNetworkPolicyPort(([]NetworkPolicyPort)(x.Ports), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1676[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("ports")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Ports == nil { - r.EncodeNil() - } else { - yym1679 := z.EncBinary() - _ = yym1679 - if false { - } else { - h.encSliceNetworkPolicyPort(([]NetworkPolicyPort)(x.Ports), e) - } - } - } - } - if yyr1676 || yy2arr1676 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1676[1] { - if x.From == nil { - r.EncodeNil() - } else { - yym1681 := z.EncBinary() - _ = yym1681 - if false { - } else { - h.encSliceNetworkPolicyPeer(([]NetworkPolicyPeer)(x.From), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1676[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("from")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.From == nil { - r.EncodeNil() - } else { - yym1682 := z.EncBinary() - _ = yym1682 - if false { - } else { - h.encSliceNetworkPolicyPeer(([]NetworkPolicyPeer)(x.From), e) - } - } - } - } - if yyr1676 || yy2arr1676 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *NetworkPolicyIngressRule) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1683 := z.DecBinary() - _ = yym1683 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1684 := r.ContainerType() - if yyct1684 == codecSelferValueTypeMap1234 { - yyl1684 := r.ReadMapStart() - if yyl1684 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1684, d) - } - } else if yyct1684 == codecSelferValueTypeArray1234 { - yyl1684 := r.ReadArrayStart() - if yyl1684 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1684, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *NetworkPolicyIngressRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1685Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1685Slc - var yyhl1685 bool = l >= 0 - for yyj1685 := 0; ; yyj1685++ { - if yyhl1685 { - if yyj1685 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1685Slc = r.DecodeBytes(yys1685Slc, true, true) - yys1685 := string(yys1685Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1685 { - case "ports": - if r.TryDecodeAsNil() { - x.Ports = nil - } else { - yyv1686 := &x.Ports - yym1687 := z.DecBinary() - _ = yym1687 - if false { - } else { - h.decSliceNetworkPolicyPort((*[]NetworkPolicyPort)(yyv1686), d) - } - } - case "from": - if r.TryDecodeAsNil() { - x.From = nil - } else { - yyv1688 := &x.From - yym1689 := z.DecBinary() - _ = yym1689 - if false { - } else { - h.decSliceNetworkPolicyPeer((*[]NetworkPolicyPeer)(yyv1688), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys1685) - } // end switch yys1685 - } // end for yyj1685 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *NetworkPolicyIngressRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1690 int - var yyb1690 bool - var yyhl1690 bool = l >= 0 - yyj1690++ - if yyhl1690 { - yyb1690 = yyj1690 > l - } else { - yyb1690 = r.CheckBreak() - } - if yyb1690 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Ports = nil - } else { - yyv1691 := &x.Ports - yym1692 := z.DecBinary() - _ = yym1692 - if false { - } else { - h.decSliceNetworkPolicyPort((*[]NetworkPolicyPort)(yyv1691), d) - } - } - yyj1690++ - if yyhl1690 { - yyb1690 = yyj1690 > l - } else { - yyb1690 = r.CheckBreak() - } - if yyb1690 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.From = nil - } else { - yyv1693 := &x.From - yym1694 := z.DecBinary() - _ = yym1694 - if false { - } else { - h.decSliceNetworkPolicyPeer((*[]NetworkPolicyPeer)(yyv1693), d) - } - } - for { - yyj1690++ - if yyhl1690 { - yyb1690 = yyj1690 > l - } else { - yyb1690 = r.CheckBreak() - } - if yyb1690 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1690-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *NetworkPolicyPort) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1695 := z.EncBinary() - _ = yym1695 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1696 := !z.EncBinary() - yy2arr1696 := z.EncBasicHandle().StructToArray - var yyq1696 [2]bool - _, _, _ = yysep1696, yyq1696, yy2arr1696 - const yyr1696 bool = false - yyq1696[0] = x.Protocol != nil - yyq1696[1] = x.Port != nil - var yynn1696 int - if yyr1696 || yy2arr1696 { - r.EncodeArrayStart(2) - } else { - yynn1696 = 0 - for _, b := range yyq1696 { - if b { - yynn1696++ - } - } - r.EncodeMapStart(yynn1696) - yynn1696 = 0 - } - if yyr1696 || yy2arr1696 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1696[0] { - if x.Protocol == nil { - r.EncodeNil() - } else { - yy1698 := *x.Protocol - yym1699 := z.EncBinary() - _ = yym1699 - if false { - } else if z.HasExtensions() && z.EncExt(yy1698) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(yy1698)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1696[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("protocol")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Protocol == nil { - r.EncodeNil() - } else { - yy1700 := *x.Protocol - yym1701 := z.EncBinary() - _ = yym1701 - if false { - } else if z.HasExtensions() && z.EncExt(yy1700) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(yy1700)) - } - } - } - } - if yyr1696 || yy2arr1696 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1696[1] { - if x.Port == nil { - r.EncodeNil() - } else { - yym1703 := z.EncBinary() - _ = yym1703 - if false { - } else if z.HasExtensions() && z.EncExt(x.Port) { - } else if !yym1703 && z.IsJSONHandle() { - z.EncJSONMarshal(x.Port) - } else { - z.EncFallback(x.Port) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq1696[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("port")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Port == nil { - r.EncodeNil() - } else { - yym1704 := z.EncBinary() - _ = yym1704 - if false { - } else if z.HasExtensions() && z.EncExt(x.Port) { - } else if !yym1704 && z.IsJSONHandle() { - z.EncJSONMarshal(x.Port) - } else { - z.EncFallback(x.Port) - } - } - } - } - if yyr1696 || yy2arr1696 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *NetworkPolicyPort) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1705 := z.DecBinary() - _ = yym1705 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1706 := r.ContainerType() - if yyct1706 == codecSelferValueTypeMap1234 { - yyl1706 := r.ReadMapStart() - if yyl1706 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1706, d) - } - } else if yyct1706 == codecSelferValueTypeArray1234 { - yyl1706 := r.ReadArrayStart() - if yyl1706 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1706, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *NetworkPolicyPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1707Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1707Slc - var yyhl1707 bool = l >= 0 - for yyj1707 := 0; ; yyj1707++ { - if yyhl1707 { - if yyj1707 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1707Slc = r.DecodeBytes(yys1707Slc, true, true) - yys1707 := string(yys1707Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1707 { - case "protocol": - if r.TryDecodeAsNil() { - if x.Protocol != nil { - x.Protocol = nil - } - } else { - if x.Protocol == nil { - x.Protocol = new(pkg2_v1.Protocol) - } - x.Protocol.CodecDecodeSelf(d) - } - case "port": - if r.TryDecodeAsNil() { - if x.Port != nil { - x.Port = nil - } - } else { - if x.Port == nil { - x.Port = new(pkg5_intstr.IntOrString) - } - yym1710 := z.DecBinary() - _ = yym1710 - if false { - } else if z.HasExtensions() && z.DecExt(x.Port) { - } else if !yym1710 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.Port) - } else { - z.DecFallback(x.Port, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys1707) - } // end switch yys1707 - } // end for yyj1707 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *NetworkPolicyPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1711 int - var yyb1711 bool - var yyhl1711 bool = l >= 0 - yyj1711++ - if yyhl1711 { - yyb1711 = yyj1711 > l - } else { - yyb1711 = r.CheckBreak() - } - if yyb1711 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Protocol != nil { - x.Protocol = nil - } - } else { - if x.Protocol == nil { - x.Protocol = new(pkg2_v1.Protocol) - } - x.Protocol.CodecDecodeSelf(d) - } - yyj1711++ - if yyhl1711 { - yyb1711 = yyj1711 > l - } else { - yyb1711 = r.CheckBreak() - } - if yyb1711 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Port != nil { - x.Port = nil - } - } else { - if x.Port == nil { - x.Port = new(pkg5_intstr.IntOrString) - } - yym1714 := z.DecBinary() - _ = yym1714 - if false { - } else if z.HasExtensions() && z.DecExt(x.Port) { - } else if !yym1714 && z.IsJSONHandle() { - z.DecJSONUnmarshal(x.Port) - } else { - z.DecFallback(x.Port, false) - } - } - for { - yyj1711++ - if yyhl1711 { - yyb1711 = yyj1711 > l - } else { - yyb1711 = r.CheckBreak() - } - if yyb1711 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1711-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *NetworkPolicyPeer) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1715 := z.EncBinary() - _ = yym1715 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1716 := !z.EncBinary() - yy2arr1716 := z.EncBasicHandle().StructToArray - var yyq1716 [2]bool - _, _, _ = yysep1716, yyq1716, yy2arr1716 - const yyr1716 bool = false - yyq1716[0] = x.PodSelector != nil - yyq1716[1] = x.NamespaceSelector != nil - var yynn1716 int - if yyr1716 || yy2arr1716 { - r.EncodeArrayStart(2) - } else { - yynn1716 = 0 - for _, b := range yyq1716 { - if b { - yynn1716++ - } - } - r.EncodeMapStart(yynn1716) - yynn1716 = 0 - } - if yyr1716 || yy2arr1716 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1716[0] { - if x.PodSelector == nil { - r.EncodeNil() - } else { - x.PodSelector.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq1716[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("podSelector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.PodSelector == nil { - r.EncodeNil() - } else { - x.PodSelector.CodecEncodeSelf(e) - } - } - } - if yyr1716 || yy2arr1716 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1716[1] { - if x.NamespaceSelector == nil { - r.EncodeNil() - } else { - x.NamespaceSelector.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq1716[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("namespaceSelector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.NamespaceSelector == nil { - r.EncodeNil() - } else { - x.NamespaceSelector.CodecEncodeSelf(e) - } - } - } - if yyr1716 || yy2arr1716 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *NetworkPolicyPeer) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1719 := z.DecBinary() - _ = yym1719 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1720 := r.ContainerType() - if yyct1720 == codecSelferValueTypeMap1234 { - yyl1720 := r.ReadMapStart() - if yyl1720 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1720, d) - } - } else if yyct1720 == codecSelferValueTypeArray1234 { - yyl1720 := r.ReadArrayStart() - if yyl1720 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1720, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *NetworkPolicyPeer) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1721Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1721Slc - var yyhl1721 bool = l >= 0 - for yyj1721 := 0; ; yyj1721++ { - if yyhl1721 { - if yyj1721 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1721Slc = r.DecodeBytes(yys1721Slc, true, true) - yys1721 := string(yys1721Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1721 { - case "podSelector": - if r.TryDecodeAsNil() { - if x.PodSelector != nil { - x.PodSelector = nil - } - } else { - if x.PodSelector == nil { - x.PodSelector = new(LabelSelector) - } - x.PodSelector.CodecDecodeSelf(d) - } - case "namespaceSelector": - if r.TryDecodeAsNil() { - if x.NamespaceSelector != nil { - x.NamespaceSelector = nil - } - } else { - if x.NamespaceSelector == nil { - x.NamespaceSelector = new(LabelSelector) - } - x.NamespaceSelector.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys1721) - } // end switch yys1721 - } // end for yyj1721 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *NetworkPolicyPeer) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1724 int - var yyb1724 bool - var yyhl1724 bool = l >= 0 - yyj1724++ - if yyhl1724 { - yyb1724 = yyj1724 > l - } else { - yyb1724 = r.CheckBreak() - } - if yyb1724 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.PodSelector != nil { - x.PodSelector = nil - } - } else { - if x.PodSelector == nil { - x.PodSelector = new(LabelSelector) - } - x.PodSelector.CodecDecodeSelf(d) - } - yyj1724++ - if yyhl1724 { - yyb1724 = yyj1724 > l - } else { - yyb1724 = r.CheckBreak() - } - if yyb1724 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.NamespaceSelector != nil { - x.NamespaceSelector = nil - } - } else { - if x.NamespaceSelector == nil { - x.NamespaceSelector = new(LabelSelector) - } - x.NamespaceSelector.CodecDecodeSelf(d) - } - for { - yyj1724++ - if yyhl1724 { - yyb1724 = yyj1724 > l - } else { - yyb1724 = r.CheckBreak() - } - if yyb1724 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1724-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *NetworkPolicyList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1727 := z.EncBinary() - _ = yym1727 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1728 := !z.EncBinary() - yy2arr1728 := z.EncBasicHandle().StructToArray - var yyq1728 [4]bool - _, _, _ = yysep1728, yyq1728, yy2arr1728 - const yyr1728 bool = false - yyq1728[0] = x.Kind != "" - yyq1728[1] = x.APIVersion != "" - yyq1728[2] = true - var yynn1728 int - if yyr1728 || yy2arr1728 { - r.EncodeArrayStart(4) - } else { - yynn1728 = 1 - for _, b := range yyq1728 { - if b { - yynn1728++ - } - } - r.EncodeMapStart(yynn1728) - yynn1728 = 0 - } - if yyr1728 || yy2arr1728 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1728[0] { - yym1730 := z.EncBinary() - _ = yym1730 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1728[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1731 := z.EncBinary() - _ = yym1731 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr1728 || yy2arr1728 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1728[1] { - yym1733 := z.EncBinary() - _ = yym1733 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1728[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1734 := z.EncBinary() - _ = yym1734 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr1728 || yy2arr1728 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1728[2] { - yy1736 := &x.ListMeta - yym1737 := z.EncBinary() - _ = yym1737 - if false { - } else if z.HasExtensions() && z.EncExt(yy1736) { - } else { - z.EncFallback(yy1736) - } - } else { - r.EncodeNil() - } - } else { - if yyq1728[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1738 := &x.ListMeta - yym1739 := z.EncBinary() - _ = yym1739 - if false { - } else if z.HasExtensions() && z.EncExt(yy1738) { - } else { - z.EncFallback(yy1738) - } - } - } - if yyr1728 || yy2arr1728 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym1741 := z.EncBinary() - _ = yym1741 - if false { - } else { - h.encSliceNetworkPolicy(([]NetworkPolicy)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym1742 := z.EncBinary() - _ = yym1742 - if false { - } else { - h.encSliceNetworkPolicy(([]NetworkPolicy)(x.Items), e) - } - } - } - if yyr1728 || yy2arr1728 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *NetworkPolicyList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1743 := z.DecBinary() - _ = yym1743 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1744 := r.ContainerType() - if yyct1744 == codecSelferValueTypeMap1234 { - yyl1744 := r.ReadMapStart() - if yyl1744 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1744, d) - } - } else if yyct1744 == codecSelferValueTypeArray1234 { - yyl1744 := r.ReadArrayStart() - if yyl1744 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1744, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *NetworkPolicyList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys1745Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1745Slc - var yyhl1745 bool = l >= 0 - for yyj1745 := 0; ; yyj1745++ { - if yyhl1745 { - if yyj1745 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1745Slc = r.DecodeBytes(yys1745Slc, true, true) - yys1745 := string(yys1745Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1745 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv1748 := &x.ListMeta - yym1749 := z.DecBinary() - _ = yym1749 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1748) { - } else { - z.DecFallback(yyv1748, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv1750 := &x.Items - yym1751 := z.DecBinary() - _ = yym1751 - if false { - } else { - h.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv1750), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys1745) - } // end switch yys1745 - } // end for yyj1745 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *NetworkPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj1752 int - var yyb1752 bool - var yyhl1752 bool = l >= 0 - yyj1752++ - if yyhl1752 { - yyb1752 = yyj1752 > l - } else { - yyb1752 = r.CheckBreak() - } - if yyb1752 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj1752++ - if yyhl1752 { - yyb1752 = yyj1752 > l - } else { - yyb1752 = r.CheckBreak() - } - if yyb1752 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj1752++ - if yyhl1752 { - yyb1752 = yyj1752 > l - } else { - yyb1752 = r.CheckBreak() - } - if yyb1752 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv1755 := &x.ListMeta - yym1756 := z.DecBinary() - _ = yym1756 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1755) { - } else { - z.DecFallback(yyv1755, false) - } - } - yyj1752++ - if yyhl1752 { - yyb1752 = yyj1752 > l - } else { - yyb1752 = r.CheckBreak() - } - if yyb1752 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv1757 := &x.Items - yym1758 := z.DecBinary() - _ = yym1758 - if false { - } else { - h.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv1757), d) - } - } - for { - yyj1752++ - if yyhl1752 { - yyb1752 = yyj1752 > l - } else { - yyb1752 = r.CheckBreak() - } - if yyb1752 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1752-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) encSliceCustomMetricTarget(v []CustomMetricTarget, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1759 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1760 := &yyv1759 - yy1760.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceCustomMetricTarget(v *[]CustomMetricTarget, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1761 := *v - yyh1761, yyl1761 := z.DecSliceHelperStart() - var yyc1761 bool - if yyl1761 == 0 { - if yyv1761 == nil { - yyv1761 = []CustomMetricTarget{} - yyc1761 = true - } else if len(yyv1761) != 0 { - yyv1761 = yyv1761[:0] - yyc1761 = true - } - } else if yyl1761 > 0 { - var yyrr1761, yyrl1761 int - var yyrt1761 bool - if yyl1761 > cap(yyv1761) { - - yyrg1761 := len(yyv1761) > 0 - yyv21761 := yyv1761 - yyrl1761, yyrt1761 = z.DecInferLen(yyl1761, z.DecBasicHandle().MaxInitLen, 72) - if yyrt1761 { - if yyrl1761 <= cap(yyv1761) { - yyv1761 = yyv1761[:yyrl1761] - } else { - yyv1761 = make([]CustomMetricTarget, yyrl1761) - } - } else { - yyv1761 = make([]CustomMetricTarget, yyrl1761) - } - yyc1761 = true - yyrr1761 = len(yyv1761) - if yyrg1761 { - copy(yyv1761, yyv21761) - } - } else if yyl1761 != len(yyv1761) { - yyv1761 = yyv1761[:yyl1761] - yyc1761 = true - } - yyj1761 := 0 - for ; yyj1761 < yyrr1761; yyj1761++ { - yyh1761.ElemContainerState(yyj1761) - if r.TryDecodeAsNil() { - yyv1761[yyj1761] = CustomMetricTarget{} - } else { - yyv1762 := &yyv1761[yyj1761] - yyv1762.CodecDecodeSelf(d) - } - - } - if yyrt1761 { - for ; yyj1761 < yyl1761; yyj1761++ { - yyv1761 = append(yyv1761, CustomMetricTarget{}) - yyh1761.ElemContainerState(yyj1761) - if r.TryDecodeAsNil() { - yyv1761[yyj1761] = CustomMetricTarget{} - } else { - yyv1763 := &yyv1761[yyj1761] - yyv1763.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1761 := 0 - for ; !r.CheckBreak(); yyj1761++ { - - if yyj1761 >= len(yyv1761) { - yyv1761 = append(yyv1761, CustomMetricTarget{}) // var yyz1761 CustomMetricTarget - yyc1761 = true - } - yyh1761.ElemContainerState(yyj1761) - if yyj1761 < len(yyv1761) { - if r.TryDecodeAsNil() { - yyv1761[yyj1761] = CustomMetricTarget{} - } else { - yyv1764 := &yyv1761[yyj1761] - yyv1764.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1761 < len(yyv1761) { - yyv1761 = yyv1761[:yyj1761] - yyc1761 = true - } else if yyj1761 == 0 && yyv1761 == nil { - yyv1761 = []CustomMetricTarget{} - yyc1761 = true - } - } - yyh1761.End() - if yyc1761 { - *v = yyv1761 - } -} - -func (x codecSelfer1234) encSliceCustomMetricCurrentStatus(v []CustomMetricCurrentStatus, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1765 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1766 := &yyv1765 - yy1766.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceCustomMetricCurrentStatus(v *[]CustomMetricCurrentStatus, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1767 := *v - yyh1767, yyl1767 := z.DecSliceHelperStart() - var yyc1767 bool - if yyl1767 == 0 { - if yyv1767 == nil { - yyv1767 = []CustomMetricCurrentStatus{} - yyc1767 = true - } else if len(yyv1767) != 0 { - yyv1767 = yyv1767[:0] - yyc1767 = true - } - } else if yyl1767 > 0 { - var yyrr1767, yyrl1767 int - var yyrt1767 bool - if yyl1767 > cap(yyv1767) { - - yyrg1767 := len(yyv1767) > 0 - yyv21767 := yyv1767 - yyrl1767, yyrt1767 = z.DecInferLen(yyl1767, z.DecBasicHandle().MaxInitLen, 72) - if yyrt1767 { - if yyrl1767 <= cap(yyv1767) { - yyv1767 = yyv1767[:yyrl1767] - } else { - yyv1767 = make([]CustomMetricCurrentStatus, yyrl1767) - } - } else { - yyv1767 = make([]CustomMetricCurrentStatus, yyrl1767) - } - yyc1767 = true - yyrr1767 = len(yyv1767) - if yyrg1767 { - copy(yyv1767, yyv21767) - } - } else if yyl1767 != len(yyv1767) { - yyv1767 = yyv1767[:yyl1767] - yyc1767 = true - } - yyj1767 := 0 - for ; yyj1767 < yyrr1767; yyj1767++ { - yyh1767.ElemContainerState(yyj1767) - if r.TryDecodeAsNil() { - yyv1767[yyj1767] = CustomMetricCurrentStatus{} - } else { - yyv1768 := &yyv1767[yyj1767] - yyv1768.CodecDecodeSelf(d) - } - - } - if yyrt1767 { - for ; yyj1767 < yyl1767; yyj1767++ { - yyv1767 = append(yyv1767, CustomMetricCurrentStatus{}) - yyh1767.ElemContainerState(yyj1767) - if r.TryDecodeAsNil() { - yyv1767[yyj1767] = CustomMetricCurrentStatus{} - } else { - yyv1769 := &yyv1767[yyj1767] - yyv1769.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1767 := 0 - for ; !r.CheckBreak(); yyj1767++ { - - if yyj1767 >= len(yyv1767) { - yyv1767 = append(yyv1767, CustomMetricCurrentStatus{}) // var yyz1767 CustomMetricCurrentStatus - yyc1767 = true - } - yyh1767.ElemContainerState(yyj1767) - if yyj1767 < len(yyv1767) { - if r.TryDecodeAsNil() { - yyv1767[yyj1767] = CustomMetricCurrentStatus{} - } else { - yyv1770 := &yyv1767[yyj1767] - yyv1770.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1767 < len(yyv1767) { - yyv1767 = yyv1767[:yyj1767] - yyc1767 = true - } else if yyj1767 == 0 && yyv1767 == nil { - yyv1767 = []CustomMetricCurrentStatus{} - yyc1767 = true - } - } - yyh1767.End() - if yyc1767 { - *v = yyv1767 - } -} - -func (x codecSelfer1234) encSliceHorizontalPodAutoscaler(v []HorizontalPodAutoscaler, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1771 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1772 := &yyv1771 - yy1772.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutoscaler, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1773 := *v - yyh1773, yyl1773 := z.DecSliceHelperStart() - var yyc1773 bool - if yyl1773 == 0 { - if yyv1773 == nil { - yyv1773 = []HorizontalPodAutoscaler{} - yyc1773 = true - } else if len(yyv1773) != 0 { - yyv1773 = yyv1773[:0] - yyc1773 = true - } - } else if yyl1773 > 0 { - var yyrr1773, yyrl1773 int - var yyrt1773 bool - if yyl1773 > cap(yyv1773) { - - yyrg1773 := len(yyv1773) > 0 - yyv21773 := yyv1773 - yyrl1773, yyrt1773 = z.DecInferLen(yyl1773, z.DecBasicHandle().MaxInitLen, 376) - if yyrt1773 { - if yyrl1773 <= cap(yyv1773) { - yyv1773 = yyv1773[:yyrl1773] - } else { - yyv1773 = make([]HorizontalPodAutoscaler, yyrl1773) - } - } else { - yyv1773 = make([]HorizontalPodAutoscaler, yyrl1773) - } - yyc1773 = true - yyrr1773 = len(yyv1773) - if yyrg1773 { - copy(yyv1773, yyv21773) - } - } else if yyl1773 != len(yyv1773) { - yyv1773 = yyv1773[:yyl1773] - yyc1773 = true - } - yyj1773 := 0 - for ; yyj1773 < yyrr1773; yyj1773++ { - yyh1773.ElemContainerState(yyj1773) - if r.TryDecodeAsNil() { - yyv1773[yyj1773] = HorizontalPodAutoscaler{} - } else { - yyv1774 := &yyv1773[yyj1773] - yyv1774.CodecDecodeSelf(d) - } - - } - if yyrt1773 { - for ; yyj1773 < yyl1773; yyj1773++ { - yyv1773 = append(yyv1773, HorizontalPodAutoscaler{}) - yyh1773.ElemContainerState(yyj1773) - if r.TryDecodeAsNil() { - yyv1773[yyj1773] = HorizontalPodAutoscaler{} - } else { - yyv1775 := &yyv1773[yyj1773] - yyv1775.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1773 := 0 - for ; !r.CheckBreak(); yyj1773++ { - - if yyj1773 >= len(yyv1773) { - yyv1773 = append(yyv1773, HorizontalPodAutoscaler{}) // var yyz1773 HorizontalPodAutoscaler - yyc1773 = true - } - yyh1773.ElemContainerState(yyj1773) - if yyj1773 < len(yyv1773) { - if r.TryDecodeAsNil() { - yyv1773[yyj1773] = HorizontalPodAutoscaler{} - } else { - yyv1776 := &yyv1773[yyj1773] - yyv1776.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1773 < len(yyv1773) { - yyv1773 = yyv1773[:yyj1773] - yyc1773 = true - } else if yyj1773 == 0 && yyv1773 == nil { - yyv1773 = []HorizontalPodAutoscaler{} - yyc1773 = true - } - } - yyh1773.End() - if yyc1773 { - *v = yyv1773 - } -} - -func (x codecSelfer1234) encSliceAPIVersion(v []APIVersion, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1777 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1778 := &yyv1777 - yy1778.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceAPIVersion(v *[]APIVersion, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1779 := *v - yyh1779, yyl1779 := z.DecSliceHelperStart() - var yyc1779 bool - if yyl1779 == 0 { - if yyv1779 == nil { - yyv1779 = []APIVersion{} - yyc1779 = true - } else if len(yyv1779) != 0 { - yyv1779 = yyv1779[:0] - yyc1779 = true - } - } else if yyl1779 > 0 { - var yyrr1779, yyrl1779 int - var yyrt1779 bool - if yyl1779 > cap(yyv1779) { - - yyrg1779 := len(yyv1779) > 0 - yyv21779 := yyv1779 - yyrl1779, yyrt1779 = z.DecInferLen(yyl1779, z.DecBasicHandle().MaxInitLen, 16) - if yyrt1779 { - if yyrl1779 <= cap(yyv1779) { - yyv1779 = yyv1779[:yyrl1779] - } else { - yyv1779 = make([]APIVersion, yyrl1779) - } - } else { - yyv1779 = make([]APIVersion, yyrl1779) - } - yyc1779 = true - yyrr1779 = len(yyv1779) - if yyrg1779 { - copy(yyv1779, yyv21779) - } - } else if yyl1779 != len(yyv1779) { - yyv1779 = yyv1779[:yyl1779] - yyc1779 = true - } - yyj1779 := 0 - for ; yyj1779 < yyrr1779; yyj1779++ { - yyh1779.ElemContainerState(yyj1779) - if r.TryDecodeAsNil() { - yyv1779[yyj1779] = APIVersion{} - } else { - yyv1780 := &yyv1779[yyj1779] - yyv1780.CodecDecodeSelf(d) - } - - } - if yyrt1779 { - for ; yyj1779 < yyl1779; yyj1779++ { - yyv1779 = append(yyv1779, APIVersion{}) - yyh1779.ElemContainerState(yyj1779) - if r.TryDecodeAsNil() { - yyv1779[yyj1779] = APIVersion{} - } else { - yyv1781 := &yyv1779[yyj1779] - yyv1781.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1779 := 0 - for ; !r.CheckBreak(); yyj1779++ { - - if yyj1779 >= len(yyv1779) { - yyv1779 = append(yyv1779, APIVersion{}) // var yyz1779 APIVersion - yyc1779 = true - } - yyh1779.ElemContainerState(yyj1779) - if yyj1779 < len(yyv1779) { - if r.TryDecodeAsNil() { - yyv1779[yyj1779] = APIVersion{} - } else { - yyv1782 := &yyv1779[yyj1779] - yyv1782.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1779 < len(yyv1779) { - yyv1779 = yyv1779[:yyj1779] - yyc1779 = true - } else if yyj1779 == 0 && yyv1779 == nil { - yyv1779 = []APIVersion{} - yyc1779 = true - } - } - yyh1779.End() - if yyc1779 { - *v = yyv1779 - } -} - -func (x codecSelfer1234) encSliceThirdPartyResource(v []ThirdPartyResource, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1783 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1784 := &yyv1783 - yy1784.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceThirdPartyResource(v *[]ThirdPartyResource, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1785 := *v - yyh1785, yyl1785 := z.DecSliceHelperStart() - var yyc1785 bool - if yyl1785 == 0 { - if yyv1785 == nil { - yyv1785 = []ThirdPartyResource{} - yyc1785 = true - } else if len(yyv1785) != 0 { - yyv1785 = yyv1785[:0] - yyc1785 = true - } - } else if yyl1785 > 0 { - var yyrr1785, yyrl1785 int - var yyrt1785 bool - if yyl1785 > cap(yyv1785) { - - yyrg1785 := len(yyv1785) > 0 - yyv21785 := yyv1785 - yyrl1785, yyrt1785 = z.DecInferLen(yyl1785, z.DecBasicHandle().MaxInitLen, 296) - if yyrt1785 { - if yyrl1785 <= cap(yyv1785) { - yyv1785 = yyv1785[:yyrl1785] - } else { - yyv1785 = make([]ThirdPartyResource, yyrl1785) - } - } else { - yyv1785 = make([]ThirdPartyResource, yyrl1785) - } - yyc1785 = true - yyrr1785 = len(yyv1785) - if yyrg1785 { - copy(yyv1785, yyv21785) - } - } else if yyl1785 != len(yyv1785) { - yyv1785 = yyv1785[:yyl1785] - yyc1785 = true - } - yyj1785 := 0 - for ; yyj1785 < yyrr1785; yyj1785++ { - yyh1785.ElemContainerState(yyj1785) - if r.TryDecodeAsNil() { - yyv1785[yyj1785] = ThirdPartyResource{} - } else { - yyv1786 := &yyv1785[yyj1785] - yyv1786.CodecDecodeSelf(d) - } - - } - if yyrt1785 { - for ; yyj1785 < yyl1785; yyj1785++ { - yyv1785 = append(yyv1785, ThirdPartyResource{}) - yyh1785.ElemContainerState(yyj1785) - if r.TryDecodeAsNil() { - yyv1785[yyj1785] = ThirdPartyResource{} - } else { - yyv1787 := &yyv1785[yyj1785] - yyv1787.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1785 := 0 - for ; !r.CheckBreak(); yyj1785++ { - - if yyj1785 >= len(yyv1785) { - yyv1785 = append(yyv1785, ThirdPartyResource{}) // var yyz1785 ThirdPartyResource - yyc1785 = true - } - yyh1785.ElemContainerState(yyj1785) - if yyj1785 < len(yyv1785) { - if r.TryDecodeAsNil() { - yyv1785[yyj1785] = ThirdPartyResource{} - } else { - yyv1788 := &yyv1785[yyj1785] - yyv1788.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1785 < len(yyv1785) { - yyv1785 = yyv1785[:yyj1785] - yyc1785 = true - } else if yyj1785 == 0 && yyv1785 == nil { - yyv1785 = []ThirdPartyResource{} - yyc1785 = true - } - } - yyh1785.End() - if yyc1785 { - *v = yyv1785 - } -} - -func (x codecSelfer1234) encSliceDeployment(v []Deployment, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1789 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1790 := &yyv1789 - yy1790.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1791 := *v - yyh1791, yyl1791 := z.DecSliceHelperStart() - var yyc1791 bool - if yyl1791 == 0 { - if yyv1791 == nil { - yyv1791 = []Deployment{} - yyc1791 = true - } else if len(yyv1791) != 0 { - yyv1791 = yyv1791[:0] - yyc1791 = true - } - } else if yyl1791 > 0 { - var yyrr1791, yyrl1791 int - var yyrt1791 bool - if yyl1791 > cap(yyv1791) { - - yyrg1791 := len(yyv1791) > 0 - yyv21791 := yyv1791 - yyrl1791, yyrt1791 = z.DecInferLen(yyl1791, z.DecBasicHandle().MaxInitLen, 824) - if yyrt1791 { - if yyrl1791 <= cap(yyv1791) { - yyv1791 = yyv1791[:yyrl1791] - } else { - yyv1791 = make([]Deployment, yyrl1791) - } - } else { - yyv1791 = make([]Deployment, yyrl1791) - } - yyc1791 = true - yyrr1791 = len(yyv1791) - if yyrg1791 { - copy(yyv1791, yyv21791) - } - } else if yyl1791 != len(yyv1791) { - yyv1791 = yyv1791[:yyl1791] - yyc1791 = true - } - yyj1791 := 0 - for ; yyj1791 < yyrr1791; yyj1791++ { - yyh1791.ElemContainerState(yyj1791) - if r.TryDecodeAsNil() { - yyv1791[yyj1791] = Deployment{} - } else { - yyv1792 := &yyv1791[yyj1791] - yyv1792.CodecDecodeSelf(d) - } - - } - if yyrt1791 { - for ; yyj1791 < yyl1791; yyj1791++ { - yyv1791 = append(yyv1791, Deployment{}) - yyh1791.ElemContainerState(yyj1791) - if r.TryDecodeAsNil() { - yyv1791[yyj1791] = Deployment{} - } else { - yyv1793 := &yyv1791[yyj1791] - yyv1793.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1791 := 0 - for ; !r.CheckBreak(); yyj1791++ { - - if yyj1791 >= len(yyv1791) { - yyv1791 = append(yyv1791, Deployment{}) // var yyz1791 Deployment - yyc1791 = true - } - yyh1791.ElemContainerState(yyj1791) - if yyj1791 < len(yyv1791) { - if r.TryDecodeAsNil() { - yyv1791[yyj1791] = Deployment{} - } else { - yyv1794 := &yyv1791[yyj1791] - yyv1794.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1791 < len(yyv1791) { - yyv1791 = yyv1791[:yyj1791] - yyc1791 = true - } else if yyj1791 == 0 && yyv1791 == nil { - yyv1791 = []Deployment{} - yyc1791 = true - } - } - yyh1791.End() - if yyc1791 { - *v = yyv1791 - } -} - -func (x codecSelfer1234) encSliceDaemonSet(v []DaemonSet, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1795 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1796 := &yyv1795 - yy1796.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1797 := *v - yyh1797, yyl1797 := z.DecSliceHelperStart() - var yyc1797 bool - if yyl1797 == 0 { - if yyv1797 == nil { - yyv1797 = []DaemonSet{} - yyc1797 = true - } else if len(yyv1797) != 0 { - yyv1797 = yyv1797[:0] - yyc1797 = true - } - } else if yyl1797 > 0 { - var yyrr1797, yyrl1797 int - var yyrt1797 bool - if yyl1797 > cap(yyv1797) { - - yyrg1797 := len(yyv1797) > 0 - yyv21797 := yyv1797 - yyrl1797, yyrt1797 = z.DecInferLen(yyl1797, z.DecBasicHandle().MaxInitLen, 752) - if yyrt1797 { - if yyrl1797 <= cap(yyv1797) { - yyv1797 = yyv1797[:yyrl1797] - } else { - yyv1797 = make([]DaemonSet, yyrl1797) - } - } else { - yyv1797 = make([]DaemonSet, yyrl1797) - } - yyc1797 = true - yyrr1797 = len(yyv1797) - if yyrg1797 { - copy(yyv1797, yyv21797) - } - } else if yyl1797 != len(yyv1797) { - yyv1797 = yyv1797[:yyl1797] - yyc1797 = true - } - yyj1797 := 0 - for ; yyj1797 < yyrr1797; yyj1797++ { - yyh1797.ElemContainerState(yyj1797) - if r.TryDecodeAsNil() { - yyv1797[yyj1797] = DaemonSet{} - } else { - yyv1798 := &yyv1797[yyj1797] - yyv1798.CodecDecodeSelf(d) - } - - } - if yyrt1797 { - for ; yyj1797 < yyl1797; yyj1797++ { - yyv1797 = append(yyv1797, DaemonSet{}) - yyh1797.ElemContainerState(yyj1797) - if r.TryDecodeAsNil() { - yyv1797[yyj1797] = DaemonSet{} - } else { - yyv1799 := &yyv1797[yyj1797] - yyv1799.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1797 := 0 - for ; !r.CheckBreak(); yyj1797++ { - - if yyj1797 >= len(yyv1797) { - yyv1797 = append(yyv1797, DaemonSet{}) // var yyz1797 DaemonSet - yyc1797 = true - } - yyh1797.ElemContainerState(yyj1797) - if yyj1797 < len(yyv1797) { - if r.TryDecodeAsNil() { - yyv1797[yyj1797] = DaemonSet{} - } else { - yyv1800 := &yyv1797[yyj1797] - yyv1800.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1797 < len(yyv1797) { - yyv1797 = yyv1797[:yyj1797] - yyc1797 = true - } else if yyj1797 == 0 && yyv1797 == nil { - yyv1797 = []DaemonSet{} - yyc1797 = true - } - } - yyh1797.End() - if yyc1797 { - *v = yyv1797 - } -} - -func (x codecSelfer1234) encSliceThirdPartyResourceData(v []ThirdPartyResourceData, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1801 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1802 := &yyv1801 - yy1802.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceThirdPartyResourceData(v *[]ThirdPartyResourceData, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1803 := *v - yyh1803, yyl1803 := z.DecSliceHelperStart() - var yyc1803 bool - if yyl1803 == 0 { - if yyv1803 == nil { - yyv1803 = []ThirdPartyResourceData{} - yyc1803 = true - } else if len(yyv1803) != 0 { - yyv1803 = yyv1803[:0] - yyc1803 = true - } - } else if yyl1803 > 0 { - var yyrr1803, yyrl1803 int - var yyrt1803 bool - if yyl1803 > cap(yyv1803) { - - yyrg1803 := len(yyv1803) > 0 - yyv21803 := yyv1803 - yyrl1803, yyrt1803 = z.DecInferLen(yyl1803, z.DecBasicHandle().MaxInitLen, 280) - if yyrt1803 { - if yyrl1803 <= cap(yyv1803) { - yyv1803 = yyv1803[:yyrl1803] - } else { - yyv1803 = make([]ThirdPartyResourceData, yyrl1803) - } - } else { - yyv1803 = make([]ThirdPartyResourceData, yyrl1803) - } - yyc1803 = true - yyrr1803 = len(yyv1803) - if yyrg1803 { - copy(yyv1803, yyv21803) - } - } else if yyl1803 != len(yyv1803) { - yyv1803 = yyv1803[:yyl1803] - yyc1803 = true - } - yyj1803 := 0 - for ; yyj1803 < yyrr1803; yyj1803++ { - yyh1803.ElemContainerState(yyj1803) - if r.TryDecodeAsNil() { - yyv1803[yyj1803] = ThirdPartyResourceData{} - } else { - yyv1804 := &yyv1803[yyj1803] - yyv1804.CodecDecodeSelf(d) - } - - } - if yyrt1803 { - for ; yyj1803 < yyl1803; yyj1803++ { - yyv1803 = append(yyv1803, ThirdPartyResourceData{}) - yyh1803.ElemContainerState(yyj1803) - if r.TryDecodeAsNil() { - yyv1803[yyj1803] = ThirdPartyResourceData{} - } else { - yyv1805 := &yyv1803[yyj1803] - yyv1805.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1803 := 0 - for ; !r.CheckBreak(); yyj1803++ { - - if yyj1803 >= len(yyv1803) { - yyv1803 = append(yyv1803, ThirdPartyResourceData{}) // var yyz1803 ThirdPartyResourceData - yyc1803 = true - } - yyh1803.ElemContainerState(yyj1803) - if yyj1803 < len(yyv1803) { - if r.TryDecodeAsNil() { - yyv1803[yyj1803] = ThirdPartyResourceData{} - } else { - yyv1806 := &yyv1803[yyj1803] - yyv1806.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1803 < len(yyv1803) { - yyv1803 = yyv1803[:yyj1803] - yyc1803 = true - } else if yyj1803 == 0 && yyv1803 == nil { - yyv1803 = []ThirdPartyResourceData{} - yyc1803 = true - } - } - yyh1803.End() - if yyc1803 { - *v = yyv1803 - } -} - -func (x codecSelfer1234) encSliceJob(v []Job, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1807 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1808 := &yyv1807 - yy1808.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1809 := *v - yyh1809, yyl1809 := z.DecSliceHelperStart() - var yyc1809 bool - if yyl1809 == 0 { - if yyv1809 == nil { - yyv1809 = []Job{} - yyc1809 = true - } else if len(yyv1809) != 0 { - yyv1809 = yyv1809[:0] - yyc1809 = true - } - } else if yyl1809 > 0 { - var yyrr1809, yyrl1809 int - var yyrt1809 bool - if yyl1809 > cap(yyv1809) { - - yyrg1809 := len(yyv1809) > 0 - yyv21809 := yyv1809 - yyrl1809, yyrt1809 = z.DecInferLen(yyl1809, z.DecBasicHandle().MaxInitLen, 824) - if yyrt1809 { - if yyrl1809 <= cap(yyv1809) { - yyv1809 = yyv1809[:yyrl1809] - } else { - yyv1809 = make([]Job, yyrl1809) - } - } else { - yyv1809 = make([]Job, yyrl1809) - } - yyc1809 = true - yyrr1809 = len(yyv1809) - if yyrg1809 { - copy(yyv1809, yyv21809) - } - } else if yyl1809 != len(yyv1809) { - yyv1809 = yyv1809[:yyl1809] - yyc1809 = true - } - yyj1809 := 0 - for ; yyj1809 < yyrr1809; yyj1809++ { - yyh1809.ElemContainerState(yyj1809) - if r.TryDecodeAsNil() { - yyv1809[yyj1809] = Job{} - } else { - yyv1810 := &yyv1809[yyj1809] - yyv1810.CodecDecodeSelf(d) - } - - } - if yyrt1809 { - for ; yyj1809 < yyl1809; yyj1809++ { - yyv1809 = append(yyv1809, Job{}) - yyh1809.ElemContainerState(yyj1809) - if r.TryDecodeAsNil() { - yyv1809[yyj1809] = Job{} - } else { - yyv1811 := &yyv1809[yyj1809] - yyv1811.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1809 := 0 - for ; !r.CheckBreak(); yyj1809++ { - - if yyj1809 >= len(yyv1809) { - yyv1809 = append(yyv1809, Job{}) // var yyz1809 Job - yyc1809 = true - } - yyh1809.ElemContainerState(yyj1809) - if yyj1809 < len(yyv1809) { - if r.TryDecodeAsNil() { - yyv1809[yyj1809] = Job{} - } else { - yyv1812 := &yyv1809[yyj1809] - yyv1812.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1809 < len(yyv1809) { - yyv1809 = yyv1809[:yyj1809] - yyc1809 = true - } else if yyj1809 == 0 && yyv1809 == nil { - yyv1809 = []Job{} - yyc1809 = true - } - } - yyh1809.End() - if yyc1809 { - *v = yyv1809 - } -} - -func (x codecSelfer1234) encSliceJobCondition(v []JobCondition, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1813 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1814 := &yyv1813 - yy1814.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1815 := *v - yyh1815, yyl1815 := z.DecSliceHelperStart() - var yyc1815 bool - if yyl1815 == 0 { - if yyv1815 == nil { - yyv1815 = []JobCondition{} - yyc1815 = true - } else if len(yyv1815) != 0 { - yyv1815 = yyv1815[:0] - yyc1815 = true - } - } else if yyl1815 > 0 { - var yyrr1815, yyrl1815 int - var yyrt1815 bool - if yyl1815 > cap(yyv1815) { - - yyrg1815 := len(yyv1815) > 0 - yyv21815 := yyv1815 - yyrl1815, yyrt1815 = z.DecInferLen(yyl1815, z.DecBasicHandle().MaxInitLen, 112) - if yyrt1815 { - if yyrl1815 <= cap(yyv1815) { - yyv1815 = yyv1815[:yyrl1815] - } else { - yyv1815 = make([]JobCondition, yyrl1815) - } - } else { - yyv1815 = make([]JobCondition, yyrl1815) - } - yyc1815 = true - yyrr1815 = len(yyv1815) - if yyrg1815 { - copy(yyv1815, yyv21815) - } - } else if yyl1815 != len(yyv1815) { - yyv1815 = yyv1815[:yyl1815] - yyc1815 = true - } - yyj1815 := 0 - for ; yyj1815 < yyrr1815; yyj1815++ { - yyh1815.ElemContainerState(yyj1815) - if r.TryDecodeAsNil() { - yyv1815[yyj1815] = JobCondition{} - } else { - yyv1816 := &yyv1815[yyj1815] - yyv1816.CodecDecodeSelf(d) - } - - } - if yyrt1815 { - for ; yyj1815 < yyl1815; yyj1815++ { - yyv1815 = append(yyv1815, JobCondition{}) - yyh1815.ElemContainerState(yyj1815) - if r.TryDecodeAsNil() { - yyv1815[yyj1815] = JobCondition{} - } else { - yyv1817 := &yyv1815[yyj1815] - yyv1817.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1815 := 0 - for ; !r.CheckBreak(); yyj1815++ { - - if yyj1815 >= len(yyv1815) { - yyv1815 = append(yyv1815, JobCondition{}) // var yyz1815 JobCondition - yyc1815 = true - } - yyh1815.ElemContainerState(yyj1815) - if yyj1815 < len(yyv1815) { - if r.TryDecodeAsNil() { - yyv1815[yyj1815] = JobCondition{} - } else { - yyv1818 := &yyv1815[yyj1815] - yyv1818.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1815 < len(yyv1815) { - yyv1815 = yyv1815[:yyj1815] - yyc1815 = true - } else if yyj1815 == 0 && yyv1815 == nil { - yyv1815 = []JobCondition{} - yyc1815 = true - } - } - yyh1815.End() - if yyc1815 { - *v = yyv1815 - } -} - -func (x codecSelfer1234) encSliceIngress(v []Ingress, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1819 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1820 := &yyv1819 - yy1820.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceIngress(v *[]Ingress, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1821 := *v - yyh1821, yyl1821 := z.DecSliceHelperStart() - var yyc1821 bool - if yyl1821 == 0 { - if yyv1821 == nil { - yyv1821 = []Ingress{} - yyc1821 = true - } else if len(yyv1821) != 0 { - yyv1821 = yyv1821[:0] - yyc1821 = true - } - } else if yyl1821 > 0 { - var yyrr1821, yyrl1821 int - var yyrt1821 bool - if yyl1821 > cap(yyv1821) { - - yyrg1821 := len(yyv1821) > 0 - yyv21821 := yyv1821 - yyrl1821, yyrt1821 = z.DecInferLen(yyl1821, z.DecBasicHandle().MaxInitLen, 336) - if yyrt1821 { - if yyrl1821 <= cap(yyv1821) { - yyv1821 = yyv1821[:yyrl1821] - } else { - yyv1821 = make([]Ingress, yyrl1821) - } - } else { - yyv1821 = make([]Ingress, yyrl1821) - } - yyc1821 = true - yyrr1821 = len(yyv1821) - if yyrg1821 { - copy(yyv1821, yyv21821) - } - } else if yyl1821 != len(yyv1821) { - yyv1821 = yyv1821[:yyl1821] - yyc1821 = true - } - yyj1821 := 0 - for ; yyj1821 < yyrr1821; yyj1821++ { - yyh1821.ElemContainerState(yyj1821) - if r.TryDecodeAsNil() { - yyv1821[yyj1821] = Ingress{} - } else { - yyv1822 := &yyv1821[yyj1821] - yyv1822.CodecDecodeSelf(d) - } - - } - if yyrt1821 { - for ; yyj1821 < yyl1821; yyj1821++ { - yyv1821 = append(yyv1821, Ingress{}) - yyh1821.ElemContainerState(yyj1821) - if r.TryDecodeAsNil() { - yyv1821[yyj1821] = Ingress{} - } else { - yyv1823 := &yyv1821[yyj1821] - yyv1823.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1821 := 0 - for ; !r.CheckBreak(); yyj1821++ { - - if yyj1821 >= len(yyv1821) { - yyv1821 = append(yyv1821, Ingress{}) // var yyz1821 Ingress - yyc1821 = true - } - yyh1821.ElemContainerState(yyj1821) - if yyj1821 < len(yyv1821) { - if r.TryDecodeAsNil() { - yyv1821[yyj1821] = Ingress{} - } else { - yyv1824 := &yyv1821[yyj1821] - yyv1824.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1821 < len(yyv1821) { - yyv1821 = yyv1821[:yyj1821] - yyc1821 = true - } else if yyj1821 == 0 && yyv1821 == nil { - yyv1821 = []Ingress{} - yyc1821 = true - } - } - yyh1821.End() - if yyc1821 { - *v = yyv1821 - } -} - -func (x codecSelfer1234) encSliceIngressTLS(v []IngressTLS, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1825 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1826 := &yyv1825 - yy1826.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceIngressTLS(v *[]IngressTLS, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1827 := *v - yyh1827, yyl1827 := z.DecSliceHelperStart() - var yyc1827 bool - if yyl1827 == 0 { - if yyv1827 == nil { - yyv1827 = []IngressTLS{} - yyc1827 = true - } else if len(yyv1827) != 0 { - yyv1827 = yyv1827[:0] - yyc1827 = true - } - } else if yyl1827 > 0 { - var yyrr1827, yyrl1827 int - var yyrt1827 bool - if yyl1827 > cap(yyv1827) { - - yyrg1827 := len(yyv1827) > 0 - yyv21827 := yyv1827 - yyrl1827, yyrt1827 = z.DecInferLen(yyl1827, z.DecBasicHandle().MaxInitLen, 40) - if yyrt1827 { - if yyrl1827 <= cap(yyv1827) { - yyv1827 = yyv1827[:yyrl1827] - } else { - yyv1827 = make([]IngressTLS, yyrl1827) - } - } else { - yyv1827 = make([]IngressTLS, yyrl1827) - } - yyc1827 = true - yyrr1827 = len(yyv1827) - if yyrg1827 { - copy(yyv1827, yyv21827) - } - } else if yyl1827 != len(yyv1827) { - yyv1827 = yyv1827[:yyl1827] - yyc1827 = true - } - yyj1827 := 0 - for ; yyj1827 < yyrr1827; yyj1827++ { - yyh1827.ElemContainerState(yyj1827) - if r.TryDecodeAsNil() { - yyv1827[yyj1827] = IngressTLS{} - } else { - yyv1828 := &yyv1827[yyj1827] - yyv1828.CodecDecodeSelf(d) - } - - } - if yyrt1827 { - for ; yyj1827 < yyl1827; yyj1827++ { - yyv1827 = append(yyv1827, IngressTLS{}) - yyh1827.ElemContainerState(yyj1827) - if r.TryDecodeAsNil() { - yyv1827[yyj1827] = IngressTLS{} - } else { - yyv1829 := &yyv1827[yyj1827] - yyv1829.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1827 := 0 - for ; !r.CheckBreak(); yyj1827++ { - - if yyj1827 >= len(yyv1827) { - yyv1827 = append(yyv1827, IngressTLS{}) // var yyz1827 IngressTLS - yyc1827 = true - } - yyh1827.ElemContainerState(yyj1827) - if yyj1827 < len(yyv1827) { - if r.TryDecodeAsNil() { - yyv1827[yyj1827] = IngressTLS{} - } else { - yyv1830 := &yyv1827[yyj1827] - yyv1830.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1827 < len(yyv1827) { - yyv1827 = yyv1827[:yyj1827] - yyc1827 = true - } else if yyj1827 == 0 && yyv1827 == nil { - yyv1827 = []IngressTLS{} - yyc1827 = true - } - } - yyh1827.End() - if yyc1827 { - *v = yyv1827 - } -} - -func (x codecSelfer1234) encSliceIngressRule(v []IngressRule, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1831 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1832 := &yyv1831 - yy1832.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceIngressRule(v *[]IngressRule, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1833 := *v - yyh1833, yyl1833 := z.DecSliceHelperStart() - var yyc1833 bool - if yyl1833 == 0 { - if yyv1833 == nil { - yyv1833 = []IngressRule{} - yyc1833 = true - } else if len(yyv1833) != 0 { - yyv1833 = yyv1833[:0] - yyc1833 = true - } - } else if yyl1833 > 0 { - var yyrr1833, yyrl1833 int - var yyrt1833 bool - if yyl1833 > cap(yyv1833) { - - yyrg1833 := len(yyv1833) > 0 - yyv21833 := yyv1833 - yyrl1833, yyrt1833 = z.DecInferLen(yyl1833, z.DecBasicHandle().MaxInitLen, 24) - if yyrt1833 { - if yyrl1833 <= cap(yyv1833) { - yyv1833 = yyv1833[:yyrl1833] - } else { - yyv1833 = make([]IngressRule, yyrl1833) - } - } else { - yyv1833 = make([]IngressRule, yyrl1833) - } - yyc1833 = true - yyrr1833 = len(yyv1833) - if yyrg1833 { - copy(yyv1833, yyv21833) - } - } else if yyl1833 != len(yyv1833) { - yyv1833 = yyv1833[:yyl1833] - yyc1833 = true - } - yyj1833 := 0 - for ; yyj1833 < yyrr1833; yyj1833++ { - yyh1833.ElemContainerState(yyj1833) - if r.TryDecodeAsNil() { - yyv1833[yyj1833] = IngressRule{} - } else { - yyv1834 := &yyv1833[yyj1833] - yyv1834.CodecDecodeSelf(d) - } - - } - if yyrt1833 { - for ; yyj1833 < yyl1833; yyj1833++ { - yyv1833 = append(yyv1833, IngressRule{}) - yyh1833.ElemContainerState(yyj1833) - if r.TryDecodeAsNil() { - yyv1833[yyj1833] = IngressRule{} - } else { - yyv1835 := &yyv1833[yyj1833] - yyv1835.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1833 := 0 - for ; !r.CheckBreak(); yyj1833++ { - - if yyj1833 >= len(yyv1833) { - yyv1833 = append(yyv1833, IngressRule{}) // var yyz1833 IngressRule - yyc1833 = true - } - yyh1833.ElemContainerState(yyj1833) - if yyj1833 < len(yyv1833) { - if r.TryDecodeAsNil() { - yyv1833[yyj1833] = IngressRule{} - } else { - yyv1836 := &yyv1833[yyj1833] - yyv1836.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1833 < len(yyv1833) { - yyv1833 = yyv1833[:yyj1833] - yyc1833 = true - } else if yyj1833 == 0 && yyv1833 == nil { - yyv1833 = []IngressRule{} - yyc1833 = true - } - } - yyh1833.End() - if yyc1833 { - *v = yyv1833 - } -} - -func (x codecSelfer1234) encSliceHTTPIngressPath(v []HTTPIngressPath, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1837 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1838 := &yyv1837 - yy1838.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceHTTPIngressPath(v *[]HTTPIngressPath, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1839 := *v - yyh1839, yyl1839 := z.DecSliceHelperStart() - var yyc1839 bool - if yyl1839 == 0 { - if yyv1839 == nil { - yyv1839 = []HTTPIngressPath{} - yyc1839 = true - } else if len(yyv1839) != 0 { - yyv1839 = yyv1839[:0] - yyc1839 = true - } - } else if yyl1839 > 0 { - var yyrr1839, yyrl1839 int - var yyrt1839 bool - if yyl1839 > cap(yyv1839) { - - yyrg1839 := len(yyv1839) > 0 - yyv21839 := yyv1839 - yyrl1839, yyrt1839 = z.DecInferLen(yyl1839, z.DecBasicHandle().MaxInitLen, 64) - if yyrt1839 { - if yyrl1839 <= cap(yyv1839) { - yyv1839 = yyv1839[:yyrl1839] - } else { - yyv1839 = make([]HTTPIngressPath, yyrl1839) - } - } else { - yyv1839 = make([]HTTPIngressPath, yyrl1839) - } - yyc1839 = true - yyrr1839 = len(yyv1839) - if yyrg1839 { - copy(yyv1839, yyv21839) - } - } else if yyl1839 != len(yyv1839) { - yyv1839 = yyv1839[:yyl1839] - yyc1839 = true - } - yyj1839 := 0 - for ; yyj1839 < yyrr1839; yyj1839++ { - yyh1839.ElemContainerState(yyj1839) - if r.TryDecodeAsNil() { - yyv1839[yyj1839] = HTTPIngressPath{} - } else { - yyv1840 := &yyv1839[yyj1839] - yyv1840.CodecDecodeSelf(d) - } - - } - if yyrt1839 { - for ; yyj1839 < yyl1839; yyj1839++ { - yyv1839 = append(yyv1839, HTTPIngressPath{}) - yyh1839.ElemContainerState(yyj1839) - if r.TryDecodeAsNil() { - yyv1839[yyj1839] = HTTPIngressPath{} - } else { - yyv1841 := &yyv1839[yyj1839] - yyv1841.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1839 := 0 - for ; !r.CheckBreak(); yyj1839++ { - - if yyj1839 >= len(yyv1839) { - yyv1839 = append(yyv1839, HTTPIngressPath{}) // var yyz1839 HTTPIngressPath - yyc1839 = true - } - yyh1839.ElemContainerState(yyj1839) - if yyj1839 < len(yyv1839) { - if r.TryDecodeAsNil() { - yyv1839[yyj1839] = HTTPIngressPath{} - } else { - yyv1842 := &yyv1839[yyj1839] - yyv1842.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1839 < len(yyv1839) { - yyv1839 = yyv1839[:yyj1839] - yyc1839 = true - } else if yyj1839 == 0 && yyv1839 == nil { - yyv1839 = []HTTPIngressPath{} - yyc1839 = true - } - } - yyh1839.End() - if yyc1839 { - *v = yyv1839 - } -} - -func (x codecSelfer1234) encSliceLabelSelectorRequirement(v []LabelSelectorRequirement, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1843 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1844 := &yyv1843 - yy1844.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceLabelSelectorRequirement(v *[]LabelSelectorRequirement, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1845 := *v - yyh1845, yyl1845 := z.DecSliceHelperStart() - var yyc1845 bool - if yyl1845 == 0 { - if yyv1845 == nil { - yyv1845 = []LabelSelectorRequirement{} - yyc1845 = true - } else if len(yyv1845) != 0 { - yyv1845 = yyv1845[:0] - yyc1845 = true - } - } else if yyl1845 > 0 { - var yyrr1845, yyrl1845 int - var yyrt1845 bool - if yyl1845 > cap(yyv1845) { - - yyrg1845 := len(yyv1845) > 0 - yyv21845 := yyv1845 - yyrl1845, yyrt1845 = z.DecInferLen(yyl1845, z.DecBasicHandle().MaxInitLen, 56) - if yyrt1845 { - if yyrl1845 <= cap(yyv1845) { - yyv1845 = yyv1845[:yyrl1845] - } else { - yyv1845 = make([]LabelSelectorRequirement, yyrl1845) - } - } else { - yyv1845 = make([]LabelSelectorRequirement, yyrl1845) - } - yyc1845 = true - yyrr1845 = len(yyv1845) - if yyrg1845 { - copy(yyv1845, yyv21845) - } - } else if yyl1845 != len(yyv1845) { - yyv1845 = yyv1845[:yyl1845] - yyc1845 = true - } - yyj1845 := 0 - for ; yyj1845 < yyrr1845; yyj1845++ { - yyh1845.ElemContainerState(yyj1845) - if r.TryDecodeAsNil() { - yyv1845[yyj1845] = LabelSelectorRequirement{} - } else { - yyv1846 := &yyv1845[yyj1845] - yyv1846.CodecDecodeSelf(d) - } - - } - if yyrt1845 { - for ; yyj1845 < yyl1845; yyj1845++ { - yyv1845 = append(yyv1845, LabelSelectorRequirement{}) - yyh1845.ElemContainerState(yyj1845) - if r.TryDecodeAsNil() { - yyv1845[yyj1845] = LabelSelectorRequirement{} - } else { - yyv1847 := &yyv1845[yyj1845] - yyv1847.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1845 := 0 - for ; !r.CheckBreak(); yyj1845++ { - - if yyj1845 >= len(yyv1845) { - yyv1845 = append(yyv1845, LabelSelectorRequirement{}) // var yyz1845 LabelSelectorRequirement - yyc1845 = true - } - yyh1845.ElemContainerState(yyj1845) - if yyj1845 < len(yyv1845) { - if r.TryDecodeAsNil() { - yyv1845[yyj1845] = LabelSelectorRequirement{} - } else { - yyv1848 := &yyv1845[yyj1845] - yyv1848.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1845 < len(yyv1845) { - yyv1845 = yyv1845[:yyj1845] - yyc1845 = true - } else if yyj1845 == 0 && yyv1845 == nil { - yyv1845 = []LabelSelectorRequirement{} - yyc1845 = true - } - } - yyh1845.End() - if yyc1845 { - *v = yyv1845 - } -} - -func (x codecSelfer1234) encSliceReplicaSet(v []ReplicaSet, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1849 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1850 := &yyv1849 - yy1850.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1851 := *v - yyh1851, yyl1851 := z.DecSliceHelperStart() - var yyc1851 bool - if yyl1851 == 0 { - if yyv1851 == nil { - yyv1851 = []ReplicaSet{} - yyc1851 = true - } else if len(yyv1851) != 0 { - yyv1851 = yyv1851[:0] - yyc1851 = true - } - } else if yyl1851 > 0 { - var yyrr1851, yyrl1851 int - var yyrt1851 bool - if yyl1851 > cap(yyv1851) { - - yyrg1851 := len(yyv1851) > 0 - yyv21851 := yyv1851 - yyrl1851, yyrt1851 = z.DecInferLen(yyl1851, z.DecBasicHandle().MaxInitLen, 768) - if yyrt1851 { - if yyrl1851 <= cap(yyv1851) { - yyv1851 = yyv1851[:yyrl1851] - } else { - yyv1851 = make([]ReplicaSet, yyrl1851) - } - } else { - yyv1851 = make([]ReplicaSet, yyrl1851) - } - yyc1851 = true - yyrr1851 = len(yyv1851) - if yyrg1851 { - copy(yyv1851, yyv21851) - } - } else if yyl1851 != len(yyv1851) { - yyv1851 = yyv1851[:yyl1851] - yyc1851 = true - } - yyj1851 := 0 - for ; yyj1851 < yyrr1851; yyj1851++ { - yyh1851.ElemContainerState(yyj1851) - if r.TryDecodeAsNil() { - yyv1851[yyj1851] = ReplicaSet{} - } else { - yyv1852 := &yyv1851[yyj1851] - yyv1852.CodecDecodeSelf(d) - } - - } - if yyrt1851 { - for ; yyj1851 < yyl1851; yyj1851++ { - yyv1851 = append(yyv1851, ReplicaSet{}) - yyh1851.ElemContainerState(yyj1851) - if r.TryDecodeAsNil() { - yyv1851[yyj1851] = ReplicaSet{} - } else { - yyv1853 := &yyv1851[yyj1851] - yyv1853.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1851 := 0 - for ; !r.CheckBreak(); yyj1851++ { - - if yyj1851 >= len(yyv1851) { - yyv1851 = append(yyv1851, ReplicaSet{}) // var yyz1851 ReplicaSet - yyc1851 = true - } - yyh1851.ElemContainerState(yyj1851) - if yyj1851 < len(yyv1851) { - if r.TryDecodeAsNil() { - yyv1851[yyj1851] = ReplicaSet{} - } else { - yyv1854 := &yyv1851[yyj1851] - yyv1854.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1851 < len(yyv1851) { - yyv1851 = yyv1851[:yyj1851] - yyc1851 = true - } else if yyj1851 == 0 && yyv1851 == nil { - yyv1851 = []ReplicaSet{} - yyc1851 = true - } - } - yyh1851.End() - if yyc1851 { - *v = yyv1851 - } -} - -func (x codecSelfer1234) encSlicev1_Capability(v []pkg2_v1.Capability, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1855 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1856 := z.EncBinary() - _ = yym1856 - if false { - } else if z.HasExtensions() && z.EncExt(yyv1855) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(yyv1855)) - } - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1857 := *v - yyh1857, yyl1857 := z.DecSliceHelperStart() - var yyc1857 bool - if yyl1857 == 0 { - if yyv1857 == nil { - yyv1857 = []pkg2_v1.Capability{} - yyc1857 = true - } else if len(yyv1857) != 0 { - yyv1857 = yyv1857[:0] - yyc1857 = true - } - } else if yyl1857 > 0 { - var yyrr1857, yyrl1857 int - var yyrt1857 bool - if yyl1857 > cap(yyv1857) { - - yyrl1857, yyrt1857 = z.DecInferLen(yyl1857, z.DecBasicHandle().MaxInitLen, 16) - if yyrt1857 { - if yyrl1857 <= cap(yyv1857) { - yyv1857 = yyv1857[:yyrl1857] - } else { - yyv1857 = make([]pkg2_v1.Capability, yyrl1857) - } - } else { - yyv1857 = make([]pkg2_v1.Capability, yyrl1857) - } - yyc1857 = true - yyrr1857 = len(yyv1857) - } else if yyl1857 != len(yyv1857) { - yyv1857 = yyv1857[:yyl1857] - yyc1857 = true - } - yyj1857 := 0 - for ; yyj1857 < yyrr1857; yyj1857++ { - yyh1857.ElemContainerState(yyj1857) - if r.TryDecodeAsNil() { - yyv1857[yyj1857] = "" - } else { - yyv1857[yyj1857] = pkg2_v1.Capability(r.DecodeString()) - } - - } - if yyrt1857 { - for ; yyj1857 < yyl1857; yyj1857++ { - yyv1857 = append(yyv1857, "") - yyh1857.ElemContainerState(yyj1857) - if r.TryDecodeAsNil() { - yyv1857[yyj1857] = "" - } else { - yyv1857[yyj1857] = pkg2_v1.Capability(r.DecodeString()) - } - - } - } - - } else { - yyj1857 := 0 - for ; !r.CheckBreak(); yyj1857++ { - - if yyj1857 >= len(yyv1857) { - yyv1857 = append(yyv1857, "") // var yyz1857 pkg2_v1.Capability - yyc1857 = true - } - yyh1857.ElemContainerState(yyj1857) - if yyj1857 < len(yyv1857) { - if r.TryDecodeAsNil() { - yyv1857[yyj1857] = "" - } else { - yyv1857[yyj1857] = pkg2_v1.Capability(r.DecodeString()) - } - - } else { - z.DecSwallow() - } - - } - if yyj1857 < len(yyv1857) { - yyv1857 = yyv1857[:yyj1857] - yyc1857 = true - } else if yyj1857 == 0 && yyv1857 == nil { - yyv1857 = []pkg2_v1.Capability{} - yyc1857 = true - } - } - yyh1857.End() - if yyc1857 { - *v = yyv1857 - } -} - -func (x codecSelfer1234) encSliceFSType(v []FSType, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1861 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv1861.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceFSType(v *[]FSType, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1862 := *v - yyh1862, yyl1862 := z.DecSliceHelperStart() - var yyc1862 bool - if yyl1862 == 0 { - if yyv1862 == nil { - yyv1862 = []FSType{} - yyc1862 = true - } else if len(yyv1862) != 0 { - yyv1862 = yyv1862[:0] - yyc1862 = true - } - } else if yyl1862 > 0 { - var yyrr1862, yyrl1862 int - var yyrt1862 bool - if yyl1862 > cap(yyv1862) { - - yyrl1862, yyrt1862 = z.DecInferLen(yyl1862, z.DecBasicHandle().MaxInitLen, 16) - if yyrt1862 { - if yyrl1862 <= cap(yyv1862) { - yyv1862 = yyv1862[:yyrl1862] - } else { - yyv1862 = make([]FSType, yyrl1862) - } - } else { - yyv1862 = make([]FSType, yyrl1862) - } - yyc1862 = true - yyrr1862 = len(yyv1862) - } else if yyl1862 != len(yyv1862) { - yyv1862 = yyv1862[:yyl1862] - yyc1862 = true - } - yyj1862 := 0 - for ; yyj1862 < yyrr1862; yyj1862++ { - yyh1862.ElemContainerState(yyj1862) - if r.TryDecodeAsNil() { - yyv1862[yyj1862] = "" - } else { - yyv1862[yyj1862] = FSType(r.DecodeString()) - } - - } - if yyrt1862 { - for ; yyj1862 < yyl1862; yyj1862++ { - yyv1862 = append(yyv1862, "") - yyh1862.ElemContainerState(yyj1862) - if r.TryDecodeAsNil() { - yyv1862[yyj1862] = "" - } else { - yyv1862[yyj1862] = FSType(r.DecodeString()) - } - - } - } - - } else { - yyj1862 := 0 - for ; !r.CheckBreak(); yyj1862++ { - - if yyj1862 >= len(yyv1862) { - yyv1862 = append(yyv1862, "") // var yyz1862 FSType - yyc1862 = true - } - yyh1862.ElemContainerState(yyj1862) - if yyj1862 < len(yyv1862) { - if r.TryDecodeAsNil() { - yyv1862[yyj1862] = "" - } else { - yyv1862[yyj1862] = FSType(r.DecodeString()) - } - - } else { - z.DecSwallow() - } - - } - if yyj1862 < len(yyv1862) { - yyv1862 = yyv1862[:yyj1862] - yyc1862 = true - } else if yyj1862 == 0 && yyv1862 == nil { - yyv1862 = []FSType{} - yyc1862 = true - } - } - yyh1862.End() - if yyc1862 { - *v = yyv1862 - } -} - -func (x codecSelfer1234) encSliceHostPortRange(v []HostPortRange, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1866 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1867 := &yyv1866 - yy1867.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceHostPortRange(v *[]HostPortRange, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1868 := *v - yyh1868, yyl1868 := z.DecSliceHelperStart() - var yyc1868 bool - if yyl1868 == 0 { - if yyv1868 == nil { - yyv1868 = []HostPortRange{} - yyc1868 = true - } else if len(yyv1868) != 0 { - yyv1868 = yyv1868[:0] - yyc1868 = true - } - } else if yyl1868 > 0 { - var yyrr1868, yyrl1868 int - var yyrt1868 bool - if yyl1868 > cap(yyv1868) { - - yyrg1868 := len(yyv1868) > 0 - yyv21868 := yyv1868 - yyrl1868, yyrt1868 = z.DecInferLen(yyl1868, z.DecBasicHandle().MaxInitLen, 8) - if yyrt1868 { - if yyrl1868 <= cap(yyv1868) { - yyv1868 = yyv1868[:yyrl1868] - } else { - yyv1868 = make([]HostPortRange, yyrl1868) - } - } else { - yyv1868 = make([]HostPortRange, yyrl1868) - } - yyc1868 = true - yyrr1868 = len(yyv1868) - if yyrg1868 { - copy(yyv1868, yyv21868) - } - } else if yyl1868 != len(yyv1868) { - yyv1868 = yyv1868[:yyl1868] - yyc1868 = true - } - yyj1868 := 0 - for ; yyj1868 < yyrr1868; yyj1868++ { - yyh1868.ElemContainerState(yyj1868) - if r.TryDecodeAsNil() { - yyv1868[yyj1868] = HostPortRange{} - } else { - yyv1869 := &yyv1868[yyj1868] - yyv1869.CodecDecodeSelf(d) - } - - } - if yyrt1868 { - for ; yyj1868 < yyl1868; yyj1868++ { - yyv1868 = append(yyv1868, HostPortRange{}) - yyh1868.ElemContainerState(yyj1868) - if r.TryDecodeAsNil() { - yyv1868[yyj1868] = HostPortRange{} - } else { - yyv1870 := &yyv1868[yyj1868] - yyv1870.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1868 := 0 - for ; !r.CheckBreak(); yyj1868++ { - - if yyj1868 >= len(yyv1868) { - yyv1868 = append(yyv1868, HostPortRange{}) // var yyz1868 HostPortRange - yyc1868 = true - } - yyh1868.ElemContainerState(yyj1868) - if yyj1868 < len(yyv1868) { - if r.TryDecodeAsNil() { - yyv1868[yyj1868] = HostPortRange{} - } else { - yyv1871 := &yyv1868[yyj1868] - yyv1871.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1868 < len(yyv1868) { - yyv1868 = yyv1868[:yyj1868] - yyc1868 = true - } else if yyj1868 == 0 && yyv1868 == nil { - yyv1868 = []HostPortRange{} - yyc1868 = true - } - } - yyh1868.End() - if yyc1868 { - *v = yyv1868 - } -} - -func (x codecSelfer1234) encSliceIDRange(v []IDRange, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1872 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1873 := &yyv1872 - yy1873.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceIDRange(v *[]IDRange, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1874 := *v - yyh1874, yyl1874 := z.DecSliceHelperStart() - var yyc1874 bool - if yyl1874 == 0 { - if yyv1874 == nil { - yyv1874 = []IDRange{} - yyc1874 = true - } else if len(yyv1874) != 0 { - yyv1874 = yyv1874[:0] - yyc1874 = true - } - } else if yyl1874 > 0 { - var yyrr1874, yyrl1874 int - var yyrt1874 bool - if yyl1874 > cap(yyv1874) { - - yyrg1874 := len(yyv1874) > 0 - yyv21874 := yyv1874 - yyrl1874, yyrt1874 = z.DecInferLen(yyl1874, z.DecBasicHandle().MaxInitLen, 16) - if yyrt1874 { - if yyrl1874 <= cap(yyv1874) { - yyv1874 = yyv1874[:yyrl1874] - } else { - yyv1874 = make([]IDRange, yyrl1874) - } - } else { - yyv1874 = make([]IDRange, yyrl1874) - } - yyc1874 = true - yyrr1874 = len(yyv1874) - if yyrg1874 { - copy(yyv1874, yyv21874) - } - } else if yyl1874 != len(yyv1874) { - yyv1874 = yyv1874[:yyl1874] - yyc1874 = true - } - yyj1874 := 0 - for ; yyj1874 < yyrr1874; yyj1874++ { - yyh1874.ElemContainerState(yyj1874) - if r.TryDecodeAsNil() { - yyv1874[yyj1874] = IDRange{} - } else { - yyv1875 := &yyv1874[yyj1874] - yyv1875.CodecDecodeSelf(d) - } - - } - if yyrt1874 { - for ; yyj1874 < yyl1874; yyj1874++ { - yyv1874 = append(yyv1874, IDRange{}) - yyh1874.ElemContainerState(yyj1874) - if r.TryDecodeAsNil() { - yyv1874[yyj1874] = IDRange{} - } else { - yyv1876 := &yyv1874[yyj1874] - yyv1876.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1874 := 0 - for ; !r.CheckBreak(); yyj1874++ { - - if yyj1874 >= len(yyv1874) { - yyv1874 = append(yyv1874, IDRange{}) // var yyz1874 IDRange - yyc1874 = true - } - yyh1874.ElemContainerState(yyj1874) - if yyj1874 < len(yyv1874) { - if r.TryDecodeAsNil() { - yyv1874[yyj1874] = IDRange{} - } else { - yyv1877 := &yyv1874[yyj1874] - yyv1877.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1874 < len(yyv1874) { - yyv1874 = yyv1874[:yyj1874] - yyc1874 = true - } else if yyj1874 == 0 && yyv1874 == nil { - yyv1874 = []IDRange{} - yyc1874 = true - } - } - yyh1874.End() - if yyc1874 { - *v = yyv1874 - } -} - -func (x codecSelfer1234) encSlicePodSecurityPolicy(v []PodSecurityPolicy, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1878 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1879 := &yyv1878 - yy1879.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSlicePodSecurityPolicy(v *[]PodSecurityPolicy, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1880 := *v - yyh1880, yyl1880 := z.DecSliceHelperStart() - var yyc1880 bool - if yyl1880 == 0 { - if yyv1880 == nil { - yyv1880 = []PodSecurityPolicy{} - yyc1880 = true - } else if len(yyv1880) != 0 { - yyv1880 = yyv1880[:0] - yyc1880 = true - } - } else if yyl1880 > 0 { - var yyrr1880, yyrl1880 int - var yyrt1880 bool - if yyl1880 > cap(yyv1880) { - - yyrg1880 := len(yyv1880) > 0 - yyv21880 := yyv1880 - yyrl1880, yyrt1880 = z.DecInferLen(yyl1880, z.DecBasicHandle().MaxInitLen, 552) - if yyrt1880 { - if yyrl1880 <= cap(yyv1880) { - yyv1880 = yyv1880[:yyrl1880] - } else { - yyv1880 = make([]PodSecurityPolicy, yyrl1880) - } - } else { - yyv1880 = make([]PodSecurityPolicy, yyrl1880) - } - yyc1880 = true - yyrr1880 = len(yyv1880) - if yyrg1880 { - copy(yyv1880, yyv21880) - } - } else if yyl1880 != len(yyv1880) { - yyv1880 = yyv1880[:yyl1880] - yyc1880 = true - } - yyj1880 := 0 - for ; yyj1880 < yyrr1880; yyj1880++ { - yyh1880.ElemContainerState(yyj1880) - if r.TryDecodeAsNil() { - yyv1880[yyj1880] = PodSecurityPolicy{} - } else { - yyv1881 := &yyv1880[yyj1880] - yyv1881.CodecDecodeSelf(d) - } - - } - if yyrt1880 { - for ; yyj1880 < yyl1880; yyj1880++ { - yyv1880 = append(yyv1880, PodSecurityPolicy{}) - yyh1880.ElemContainerState(yyj1880) - if r.TryDecodeAsNil() { - yyv1880[yyj1880] = PodSecurityPolicy{} - } else { - yyv1882 := &yyv1880[yyj1880] - yyv1882.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1880 := 0 - for ; !r.CheckBreak(); yyj1880++ { - - if yyj1880 >= len(yyv1880) { - yyv1880 = append(yyv1880, PodSecurityPolicy{}) // var yyz1880 PodSecurityPolicy - yyc1880 = true - } - yyh1880.ElemContainerState(yyj1880) - if yyj1880 < len(yyv1880) { - if r.TryDecodeAsNil() { - yyv1880[yyj1880] = PodSecurityPolicy{} - } else { - yyv1883 := &yyv1880[yyj1880] - yyv1883.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1880 < len(yyv1880) { - yyv1880 = yyv1880[:yyj1880] - yyc1880 = true - } else if yyj1880 == 0 && yyv1880 == nil { - yyv1880 = []PodSecurityPolicy{} - yyc1880 = true - } - } - yyh1880.End() - if yyc1880 { - *v = yyv1880 - } -} - -func (x codecSelfer1234) encSliceNetworkPolicyIngressRule(v []NetworkPolicyIngressRule, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1884 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1885 := &yyv1884 - yy1885.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceNetworkPolicyIngressRule(v *[]NetworkPolicyIngressRule, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1886 := *v - yyh1886, yyl1886 := z.DecSliceHelperStart() - var yyc1886 bool - if yyl1886 == 0 { - if yyv1886 == nil { - yyv1886 = []NetworkPolicyIngressRule{} - yyc1886 = true - } else if len(yyv1886) != 0 { - yyv1886 = yyv1886[:0] - yyc1886 = true - } - } else if yyl1886 > 0 { - var yyrr1886, yyrl1886 int - var yyrt1886 bool - if yyl1886 > cap(yyv1886) { - - yyrg1886 := len(yyv1886) > 0 - yyv21886 := yyv1886 - yyrl1886, yyrt1886 = z.DecInferLen(yyl1886, z.DecBasicHandle().MaxInitLen, 48) - if yyrt1886 { - if yyrl1886 <= cap(yyv1886) { - yyv1886 = yyv1886[:yyrl1886] - } else { - yyv1886 = make([]NetworkPolicyIngressRule, yyrl1886) - } - } else { - yyv1886 = make([]NetworkPolicyIngressRule, yyrl1886) - } - yyc1886 = true - yyrr1886 = len(yyv1886) - if yyrg1886 { - copy(yyv1886, yyv21886) - } - } else if yyl1886 != len(yyv1886) { - yyv1886 = yyv1886[:yyl1886] - yyc1886 = true - } - yyj1886 := 0 - for ; yyj1886 < yyrr1886; yyj1886++ { - yyh1886.ElemContainerState(yyj1886) - if r.TryDecodeAsNil() { - yyv1886[yyj1886] = NetworkPolicyIngressRule{} - } else { - yyv1887 := &yyv1886[yyj1886] - yyv1887.CodecDecodeSelf(d) - } - - } - if yyrt1886 { - for ; yyj1886 < yyl1886; yyj1886++ { - yyv1886 = append(yyv1886, NetworkPolicyIngressRule{}) - yyh1886.ElemContainerState(yyj1886) - if r.TryDecodeAsNil() { - yyv1886[yyj1886] = NetworkPolicyIngressRule{} - } else { - yyv1888 := &yyv1886[yyj1886] - yyv1888.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1886 := 0 - for ; !r.CheckBreak(); yyj1886++ { - - if yyj1886 >= len(yyv1886) { - yyv1886 = append(yyv1886, NetworkPolicyIngressRule{}) // var yyz1886 NetworkPolicyIngressRule - yyc1886 = true - } - yyh1886.ElemContainerState(yyj1886) - if yyj1886 < len(yyv1886) { - if r.TryDecodeAsNil() { - yyv1886[yyj1886] = NetworkPolicyIngressRule{} - } else { - yyv1889 := &yyv1886[yyj1886] - yyv1889.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1886 < len(yyv1886) { - yyv1886 = yyv1886[:yyj1886] - yyc1886 = true - } else if yyj1886 == 0 && yyv1886 == nil { - yyv1886 = []NetworkPolicyIngressRule{} - yyc1886 = true - } - } - yyh1886.End() - if yyc1886 { - *v = yyv1886 - } -} - -func (x codecSelfer1234) encSliceNetworkPolicyPort(v []NetworkPolicyPort, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1890 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1891 := &yyv1890 - yy1891.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceNetworkPolicyPort(v *[]NetworkPolicyPort, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1892 := *v - yyh1892, yyl1892 := z.DecSliceHelperStart() - var yyc1892 bool - if yyl1892 == 0 { - if yyv1892 == nil { - yyv1892 = []NetworkPolicyPort{} - yyc1892 = true - } else if len(yyv1892) != 0 { - yyv1892 = yyv1892[:0] - yyc1892 = true - } - } else if yyl1892 > 0 { - var yyrr1892, yyrl1892 int - var yyrt1892 bool - if yyl1892 > cap(yyv1892) { - - yyrg1892 := len(yyv1892) > 0 - yyv21892 := yyv1892 - yyrl1892, yyrt1892 = z.DecInferLen(yyl1892, z.DecBasicHandle().MaxInitLen, 16) - if yyrt1892 { - if yyrl1892 <= cap(yyv1892) { - yyv1892 = yyv1892[:yyrl1892] - } else { - yyv1892 = make([]NetworkPolicyPort, yyrl1892) - } - } else { - yyv1892 = make([]NetworkPolicyPort, yyrl1892) - } - yyc1892 = true - yyrr1892 = len(yyv1892) - if yyrg1892 { - copy(yyv1892, yyv21892) - } - } else if yyl1892 != len(yyv1892) { - yyv1892 = yyv1892[:yyl1892] - yyc1892 = true - } - yyj1892 := 0 - for ; yyj1892 < yyrr1892; yyj1892++ { - yyh1892.ElemContainerState(yyj1892) - if r.TryDecodeAsNil() { - yyv1892[yyj1892] = NetworkPolicyPort{} - } else { - yyv1893 := &yyv1892[yyj1892] - yyv1893.CodecDecodeSelf(d) - } - - } - if yyrt1892 { - for ; yyj1892 < yyl1892; yyj1892++ { - yyv1892 = append(yyv1892, NetworkPolicyPort{}) - yyh1892.ElemContainerState(yyj1892) - if r.TryDecodeAsNil() { - yyv1892[yyj1892] = NetworkPolicyPort{} - } else { - yyv1894 := &yyv1892[yyj1892] - yyv1894.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1892 := 0 - for ; !r.CheckBreak(); yyj1892++ { - - if yyj1892 >= len(yyv1892) { - yyv1892 = append(yyv1892, NetworkPolicyPort{}) // var yyz1892 NetworkPolicyPort - yyc1892 = true - } - yyh1892.ElemContainerState(yyj1892) - if yyj1892 < len(yyv1892) { - if r.TryDecodeAsNil() { - yyv1892[yyj1892] = NetworkPolicyPort{} - } else { - yyv1895 := &yyv1892[yyj1892] - yyv1895.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1892 < len(yyv1892) { - yyv1892 = yyv1892[:yyj1892] - yyc1892 = true - } else if yyj1892 == 0 && yyv1892 == nil { - yyv1892 = []NetworkPolicyPort{} - yyc1892 = true - } - } - yyh1892.End() - if yyc1892 { - *v = yyv1892 - } -} - -func (x codecSelfer1234) encSliceNetworkPolicyPeer(v []NetworkPolicyPeer, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1896 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1897 := &yyv1896 - yy1897.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceNetworkPolicyPeer(v *[]NetworkPolicyPeer, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1898 := *v - yyh1898, yyl1898 := z.DecSliceHelperStart() - var yyc1898 bool - if yyl1898 == 0 { - if yyv1898 == nil { - yyv1898 = []NetworkPolicyPeer{} - yyc1898 = true - } else if len(yyv1898) != 0 { - yyv1898 = yyv1898[:0] - yyc1898 = true - } - } else if yyl1898 > 0 { - var yyrr1898, yyrl1898 int - var yyrt1898 bool - if yyl1898 > cap(yyv1898) { - - yyrg1898 := len(yyv1898) > 0 - yyv21898 := yyv1898 - yyrl1898, yyrt1898 = z.DecInferLen(yyl1898, z.DecBasicHandle().MaxInitLen, 16) - if yyrt1898 { - if yyrl1898 <= cap(yyv1898) { - yyv1898 = yyv1898[:yyrl1898] - } else { - yyv1898 = make([]NetworkPolicyPeer, yyrl1898) - } - } else { - yyv1898 = make([]NetworkPolicyPeer, yyrl1898) - } - yyc1898 = true - yyrr1898 = len(yyv1898) - if yyrg1898 { - copy(yyv1898, yyv21898) - } - } else if yyl1898 != len(yyv1898) { - yyv1898 = yyv1898[:yyl1898] - yyc1898 = true - } - yyj1898 := 0 - for ; yyj1898 < yyrr1898; yyj1898++ { - yyh1898.ElemContainerState(yyj1898) - if r.TryDecodeAsNil() { - yyv1898[yyj1898] = NetworkPolicyPeer{} - } else { - yyv1899 := &yyv1898[yyj1898] - yyv1899.CodecDecodeSelf(d) - } - - } - if yyrt1898 { - for ; yyj1898 < yyl1898; yyj1898++ { - yyv1898 = append(yyv1898, NetworkPolicyPeer{}) - yyh1898.ElemContainerState(yyj1898) - if r.TryDecodeAsNil() { - yyv1898[yyj1898] = NetworkPolicyPeer{} - } else { - yyv1900 := &yyv1898[yyj1898] - yyv1900.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1898 := 0 - for ; !r.CheckBreak(); yyj1898++ { - - if yyj1898 >= len(yyv1898) { - yyv1898 = append(yyv1898, NetworkPolicyPeer{}) // var yyz1898 NetworkPolicyPeer - yyc1898 = true - } - yyh1898.ElemContainerState(yyj1898) - if yyj1898 < len(yyv1898) { - if r.TryDecodeAsNil() { - yyv1898[yyj1898] = NetworkPolicyPeer{} - } else { - yyv1901 := &yyv1898[yyj1898] - yyv1901.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1898 < len(yyv1898) { - yyv1898 = yyv1898[:yyj1898] - yyc1898 = true - } else if yyj1898 == 0 && yyv1898 == nil { - yyv1898 = []NetworkPolicyPeer{} - yyc1898 = true - } - } - yyh1898.End() - if yyc1898 { - *v = yyv1898 - } -} - -func (x codecSelfer1234) encSliceNetworkPolicy(v []NetworkPolicy, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv1902 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1903 := &yyv1902 - yy1903.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceNetworkPolicy(v *[]NetworkPolicy, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1904 := *v - yyh1904, yyl1904 := z.DecSliceHelperStart() - var yyc1904 bool - if yyl1904 == 0 { - if yyv1904 == nil { - yyv1904 = []NetworkPolicy{} - yyc1904 = true - } else if len(yyv1904) != 0 { - yyv1904 = yyv1904[:0] - yyc1904 = true - } - } else if yyl1904 > 0 { - var yyrr1904, yyrl1904 int - var yyrt1904 bool - if yyl1904 > cap(yyv1904) { - - yyrg1904 := len(yyv1904) > 0 - yyv21904 := yyv1904 - yyrl1904, yyrt1904 = z.DecInferLen(yyl1904, z.DecBasicHandle().MaxInitLen, 312) - if yyrt1904 { - if yyrl1904 <= cap(yyv1904) { - yyv1904 = yyv1904[:yyrl1904] - } else { - yyv1904 = make([]NetworkPolicy, yyrl1904) - } - } else { - yyv1904 = make([]NetworkPolicy, yyrl1904) - } - yyc1904 = true - yyrr1904 = len(yyv1904) - if yyrg1904 { - copy(yyv1904, yyv21904) - } - } else if yyl1904 != len(yyv1904) { - yyv1904 = yyv1904[:yyl1904] - yyc1904 = true - } - yyj1904 := 0 - for ; yyj1904 < yyrr1904; yyj1904++ { - yyh1904.ElemContainerState(yyj1904) - if r.TryDecodeAsNil() { - yyv1904[yyj1904] = NetworkPolicy{} - } else { - yyv1905 := &yyv1904[yyj1904] - yyv1905.CodecDecodeSelf(d) - } - - } - if yyrt1904 { - for ; yyj1904 < yyl1904; yyj1904++ { - yyv1904 = append(yyv1904, NetworkPolicy{}) - yyh1904.ElemContainerState(yyj1904) - if r.TryDecodeAsNil() { - yyv1904[yyj1904] = NetworkPolicy{} - } else { - yyv1906 := &yyv1904[yyj1904] - yyv1906.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj1904 := 0 - for ; !r.CheckBreak(); yyj1904++ { - - if yyj1904 >= len(yyv1904) { - yyv1904 = append(yyv1904, NetworkPolicy{}) // var yyz1904 NetworkPolicy - yyc1904 = true - } - yyh1904.ElemContainerState(yyj1904) - if yyj1904 < len(yyv1904) { - if r.TryDecodeAsNil() { - yyv1904[yyj1904] = NetworkPolicy{} - } else { - yyv1907 := &yyv1904[yyj1904] - yyv1907.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj1904 < len(yyv1904) { - yyv1904 = yyv1904[:yyj1904] - yyc1904 = true - } else if yyj1904 == 0 && yyv1904 == nil { - yyv1904 = []NetworkPolicy{} - yyc1904 = true - } - } - yyh1904.End() - if yyc1904 { - *v = yyv1904 - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/policy/doc.go deleted file mode 100644 index 6536d5c96..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/doc.go +++ /dev/null @@ -1,20 +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,register -// +k8s:openapi-gen=true - -package policy diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/types.go b/vendor/k8s.io/client-go/1.5/pkg/apis/policy/types.go deleted file mode 100644 index c2d272437..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/types.go +++ /dev/null @@ -1,83 +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 policy - -import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/util/intstr" -) - -// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. -type PodDisruptionBudgetSpec struct { - // The minimum number of pods that must be available simultaneously. This - // can be either an integer or a string specifying a percentage, e.g. "28%". - MinAvailable intstr.IntOrString `json:"minAvailable,omitempty"` - - // Label query over pods whose evictions are managed by the disruption - // budget. - Selector *unversioned.LabelSelector `json:"selector,omitempty"` -} - -// PodDisruptionBudgetStatus represents information about the status of a -// PodDisruptionBudget. Status may trail the actual state of a system. -type PodDisruptionBudgetStatus struct { - // Whether or not a disruption is currently allowed. - PodDisruptionAllowed bool `json:"disruptionAllowed"` - - // current number of healthy pods - CurrentHealthy int32 `json:"currentHealthy"` - - // minimum desired number of healthy pods - DesiredHealthy int32 `json:"desiredHealthy"` - - // total number of pods counted by this disruption budget - ExpectedPods int32 `json:"expectedPods"` -} - -// +genclient=true - -// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods -type PodDisruptionBudget struct { - unversioned.TypeMeta `json:",inline"` - api.ObjectMeta `json:"metadata,omitempty"` - - // Specification of the desired behavior of the PodDisruptionBudget. - Spec PodDisruptionBudgetSpec `json:"spec,omitempty"` - // Most recently observed status of the PodDisruptionBudget. - Status PodDisruptionBudgetStatus `json:"status,omitempty"` -} - -// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. -type PodDisruptionBudgetList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` - Items []PodDisruptionBudget `json:"items"` -} - -// Eviction evicts a pod from its node subject to certain policies and safety constraints. -// This is a subresource of Pod. A request to cause such an eviction is -// created by POSTing to .../pods//evictions. -type Eviction struct { - unversioned.TypeMeta `json:",inline"` - - // ObjectMeta describes the pod that is being evicted. - api.ObjectMeta `json:"metadata,omitempty"` - - // DeleteOptions may be provided - DeleteOptions *api.DeleteOptions `json:"deleteOptions,omitempty"` -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/generated.proto b/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/generated.proto deleted file mode 100644 index 8fb5c2be6..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/generated.proto +++ /dev/null @@ -1,88 +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.apis.policy.v1alpha1; - -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; -import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; -import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "v1alpha1"; - -// Eviction evicts a pod from its node subject to certain policies and safety constraints. -// This is a subresource of Pod. A request to cause such an eviction is -// created by POSTing to .../pods//evictions. -message Eviction { - // ObjectMeta describes the pod that is being evicted. - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; - - // DeleteOptions may be provided - optional k8s.io.kubernetes.pkg.api.v1.DeleteOptions deleteOptions = 2; -} - -// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods -message PodDisruptionBudget { - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; - - // Specification of the desired behavior of the PodDisruptionBudget. - optional PodDisruptionBudgetSpec spec = 2; - - // Most recently observed status of the PodDisruptionBudget. - optional PodDisruptionBudgetStatus status = 3; -} - -// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. -message PodDisruptionBudgetList { - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; - - repeated PodDisruptionBudget items = 2; -} - -// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. -message PodDisruptionBudgetSpec { - // The minimum number of pods that must be available simultaneously. This - // can be either an integer or a string specifying a percentage, e.g. "28%". - optional k8s.io.kubernetes.pkg.util.intstr.IntOrString minAvailable = 1; - - // Label query over pods whose evictions are managed by the disruption - // budget. - optional k8s.io.kubernetes.pkg.api.unversioned.LabelSelector selector = 2; -} - -// PodDisruptionBudgetStatus represents information about the status of a -// PodDisruptionBudget. Status may trail the actual state of a system. -message PodDisruptionBudgetStatus { - // Whether or not a disruption is currently allowed. - optional bool disruptionAllowed = 1; - - // current number of healthy pods - optional int32 currentHealthy = 2; - - // minimum desired number of healthy pods - optional int32 desiredHealthy = 3; - - // total number of pods counted by this disruption budget - optional int32 expectedPods = 4; -} - diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/types.generated.go deleted file mode 100644 index afaf78fdc..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/types.generated.go +++ /dev/null @@ -1,1752 +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 v1alpha1 - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - pkg2_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg3_v1 "k8s.io/client-go/1.5/pkg/api/v1" - pkg4_types "k8s.io/client-go/1.5/pkg/types" - pkg1_intstr "k8s.io/client-go/1.5/pkg/util/intstr" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg2_unversioned.LabelSelector - var v1 pkg3_v1.ObjectMeta - var v2 pkg4_types.UID - var v3 pkg1_intstr.IntOrString - var v4 time.Time - _, _, _, _, _ = v0, v1, v2, v3, v4 - } -} - -func (x *PodDisruptionBudgetSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [2]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = true - yyq2[1] = x.Selector != nil - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(2) - } else { - yynn2 = 0 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yy4 := &x.MinAvailable - yym5 := z.EncBinary() - _ = yym5 - if false { - } else if z.HasExtensions() && z.EncExt(yy4) { - } else if !yym5 && z.IsJSONHandle() { - z.EncJSONMarshal(yy4) - } else { - z.EncFallback(yy4) - } - } else { - r.EncodeNil() - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("minAvailable")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy6 := &x.MinAvailable - yym7 := z.EncBinary() - _ = yym7 - if false { - } else if z.HasExtensions() && z.EncExt(yy6) { - } else if !yym7 && z.IsJSONHandle() { - z.EncJSONMarshal(yy6) - } else { - z.EncFallback(yy6) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[1] { - if x.Selector == nil { - r.EncodeNil() - } else { - yym9 := z.EncBinary() - _ = yym9 - if false { - } else if z.HasExtensions() && z.EncExt(x.Selector) { - } else { - z.EncFallback(x.Selector) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Selector == nil { - r.EncodeNil() - } else { - yym10 := z.EncBinary() - _ = yym10 - if false { - } else if z.HasExtensions() && z.EncExt(x.Selector) { - } else { - z.EncFallback(x.Selector) - } - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PodDisruptionBudgetSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym11 := z.DecBinary() - _ = yym11 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct12 := r.ContainerType() - if yyct12 == codecSelferValueTypeMap1234 { - yyl12 := r.ReadMapStart() - if yyl12 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl12, d) - } - } else if yyct12 == codecSelferValueTypeArray1234 { - yyl12 := r.ReadArrayStart() - if yyl12 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl12, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys13Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys13Slc - var yyhl13 bool = l >= 0 - for yyj13 := 0; ; yyj13++ { - if yyhl13 { - if yyj13 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys13Slc = r.DecodeBytes(yys13Slc, true, true) - yys13 := string(yys13Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys13 { - case "minAvailable": - if r.TryDecodeAsNil() { - x.MinAvailable = pkg1_intstr.IntOrString{} - } else { - yyv14 := &x.MinAvailable - 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) - } - } - case "selector": - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(pkg2_unversioned.LabelSelector) - } - yym17 := z.DecBinary() - _ = yym17 - if false { - } else if z.HasExtensions() && z.DecExt(x.Selector) { - } else { - z.DecFallback(x.Selector, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys13) - } // end switch yys13 - } // end for yyj13 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var 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.MinAvailable = pkg1_intstr.IntOrString{} - } else { - yyv19 := &x.MinAvailable - yym20 := z.DecBinary() - _ = yym20 - if false { - } else if z.HasExtensions() && z.DecExt(yyv19) { - } else if !yym20 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv19) - } else { - z.DecFallback(yyv19, false) - } - } - 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.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(pkg2_unversioned.LabelSelector) - } - yym22 := z.DecBinary() - _ = yym22 - if false { - } else if z.HasExtensions() && z.DecExt(x.Selector) { - } else { - z.DecFallback(x.Selector, false) - } - } - 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 *PodDisruptionBudgetStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym23 := z.EncBinary() - _ = yym23 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep24 := !z.EncBinary() - yy2arr24 := z.EncBasicHandle().StructToArray - var yyq24 [4]bool - _, _, _ = yysep24, yyq24, yy2arr24 - const yyr24 bool = false - var yynn24 int - if yyr24 || yy2arr24 { - r.EncodeArrayStart(4) - } else { - yynn24 = 4 - for _, b := range yyq24 { - if b { - yynn24++ - } - } - r.EncodeMapStart(yynn24) - yynn24 = 0 - } - if yyr24 || yy2arr24 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym26 := z.EncBinary() - _ = yym26 - if false { - } else { - r.EncodeBool(bool(x.PodDisruptionAllowed)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("disruptionAllowed")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym27 := z.EncBinary() - _ = yym27 - if false { - } else { - r.EncodeBool(bool(x.PodDisruptionAllowed)) - } - } - if yyr24 || yy2arr24 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym29 := z.EncBinary() - _ = yym29 - if false { - } else { - r.EncodeInt(int64(x.CurrentHealthy)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("currentHealthy")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym30 := z.EncBinary() - _ = yym30 - if false { - } else { - r.EncodeInt(int64(x.CurrentHealthy)) - } - } - if yyr24 || yy2arr24 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym32 := z.EncBinary() - _ = yym32 - if false { - } else { - r.EncodeInt(int64(x.DesiredHealthy)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("desiredHealthy")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym33 := z.EncBinary() - _ = yym33 - if false { - } else { - r.EncodeInt(int64(x.DesiredHealthy)) - } - } - if yyr24 || yy2arr24 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym35 := z.EncBinary() - _ = yym35 - if false { - } else { - r.EncodeInt(int64(x.ExpectedPods)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("expectedPods")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym36 := z.EncBinary() - _ = yym36 - if false { - } else { - r.EncodeInt(int64(x.ExpectedPods)) - } - } - if yyr24 || yy2arr24 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PodDisruptionBudgetStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym37 := z.DecBinary() - _ = yym37 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct38 := r.ContainerType() - if yyct38 == codecSelferValueTypeMap1234 { - yyl38 := r.ReadMapStart() - if yyl38 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl38, d) - } - } else if yyct38 == codecSelferValueTypeArray1234 { - yyl38 := r.ReadArrayStart() - if yyl38 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl38, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys39Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys39Slc - var yyhl39 bool = l >= 0 - for yyj39 := 0; ; yyj39++ { - if yyhl39 { - if yyj39 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys39Slc = r.DecodeBytes(yys39Slc, true, true) - yys39 := string(yys39Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys39 { - case "disruptionAllowed": - if r.TryDecodeAsNil() { - x.PodDisruptionAllowed = false - } else { - x.PodDisruptionAllowed = bool(r.DecodeBool()) - } - case "currentHealthy": - if r.TryDecodeAsNil() { - x.CurrentHealthy = 0 - } else { - x.CurrentHealthy = int32(r.DecodeInt(32)) - } - case "desiredHealthy": - if r.TryDecodeAsNil() { - x.DesiredHealthy = 0 - } else { - x.DesiredHealthy = int32(r.DecodeInt(32)) - } - case "expectedPods": - if r.TryDecodeAsNil() { - x.ExpectedPods = 0 - } else { - x.ExpectedPods = int32(r.DecodeInt(32)) - } - default: - z.DecStructFieldNotFound(-1, yys39) - } // end switch yys39 - } // end for yyj39 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj44 int - var yyb44 bool - var yyhl44 bool = l >= 0 - yyj44++ - if yyhl44 { - yyb44 = yyj44 > l - } else { - yyb44 = r.CheckBreak() - } - if yyb44 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.PodDisruptionAllowed = false - } else { - x.PodDisruptionAllowed = bool(r.DecodeBool()) - } - yyj44++ - if yyhl44 { - yyb44 = yyj44 > l - } else { - yyb44 = r.CheckBreak() - } - if yyb44 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.CurrentHealthy = 0 - } else { - x.CurrentHealthy = int32(r.DecodeInt(32)) - } - yyj44++ - if yyhl44 { - yyb44 = yyj44 > l - } else { - yyb44 = r.CheckBreak() - } - if yyb44 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.DesiredHealthy = 0 - } else { - x.DesiredHealthy = int32(r.DecodeInt(32)) - } - yyj44++ - if yyhl44 { - yyb44 = yyj44 > l - } else { - yyb44 = r.CheckBreak() - } - if yyb44 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ExpectedPods = 0 - } else { - x.ExpectedPods = int32(r.DecodeInt(32)) - } - for { - yyj44++ - if yyhl44 { - yyb44 = yyj44 > l - } else { - yyb44 = r.CheckBreak() - } - if yyb44 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj44-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym49 := z.EncBinary() - _ = yym49 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep50 := !z.EncBinary() - yy2arr50 := z.EncBasicHandle().StructToArray - var yyq50 [5]bool - _, _, _ = yysep50, yyq50, yy2arr50 - const yyr50 bool = false - yyq50[0] = x.Kind != "" - yyq50[1] = x.APIVersion != "" - yyq50[2] = true - yyq50[3] = true - yyq50[4] = true - var yynn50 int - if yyr50 || yy2arr50 { - r.EncodeArrayStart(5) - } else { - yynn50 = 0 - for _, b := range yyq50 { - if b { - yynn50++ - } - } - r.EncodeMapStart(yynn50) - yynn50 = 0 - } - if yyr50 || yy2arr50 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq50[0] { - yym52 := z.EncBinary() - _ = yym52 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq50[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym53 := z.EncBinary() - _ = yym53 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr50 || yy2arr50 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq50[1] { - yym55 := z.EncBinary() - _ = yym55 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq50[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym56 := z.EncBinary() - _ = yym56 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr50 || yy2arr50 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq50[2] { - yy58 := &x.ObjectMeta - yy58.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq50[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy59 := &x.ObjectMeta - yy59.CodecEncodeSelf(e) - } - } - if yyr50 || yy2arr50 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq50[3] { - yy61 := &x.Spec - yy61.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq50[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("spec")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy62 := &x.Spec - yy62.CodecEncodeSelf(e) - } - } - if yyr50 || yy2arr50 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq50[4] { - yy64 := &x.Status - yy64.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq50[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("status")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy65 := &x.Status - yy65.CodecEncodeSelf(e) - } - } - if yyr50 || yy2arr50 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PodDisruptionBudget) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym66 := z.DecBinary() - _ = yym66 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct67 := r.ContainerType() - if yyct67 == codecSelferValueTypeMap1234 { - yyl67 := r.ReadMapStart() - if yyl67 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl67, d) - } - } else if yyct67 == codecSelferValueTypeArray1234 { - yyl67 := r.ReadArrayStart() - if yyl67 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl67, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PodDisruptionBudget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys68Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys68Slc - var yyhl68 bool = l >= 0 - for yyj68 := 0; ; yyj68++ { - if yyhl68 { - if yyj68 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys68Slc = r.DecodeBytes(yys68Slc, true, true) - yys68 := string(yys68Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys68 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} - } else { - yyv71 := &x.ObjectMeta - yyv71.CodecDecodeSelf(d) - } - case "spec": - if r.TryDecodeAsNil() { - x.Spec = PodDisruptionBudgetSpec{} - } else { - yyv72 := &x.Spec - yyv72.CodecDecodeSelf(d) - } - case "status": - if r.TryDecodeAsNil() { - x.Status = PodDisruptionBudgetStatus{} - } else { - yyv73 := &x.Status - yyv73.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys68) - } // end switch yys68 - } // end for yyj68 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj74 int - var yyb74 bool - var yyhl74 bool = l >= 0 - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l - } else { - yyb74 = r.CheckBreak() - } - if yyb74 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l - } else { - yyb74 = r.CheckBreak() - } - if yyb74 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l - } else { - yyb74 = r.CheckBreak() - } - if yyb74 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} - } else { - yyv77 := &x.ObjectMeta - yyv77.CodecDecodeSelf(d) - } - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l - } else { - yyb74 = r.CheckBreak() - } - if yyb74 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Spec = PodDisruptionBudgetSpec{} - } else { - yyv78 := &x.Spec - yyv78.CodecDecodeSelf(d) - } - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l - } else { - yyb74 = r.CheckBreak() - } - if yyb74 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Status = PodDisruptionBudgetStatus{} - } else { - yyv79 := &x.Status - yyv79.CodecDecodeSelf(d) - } - for { - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l - } else { - yyb74 = r.CheckBreak() - } - if yyb74 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj74-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *PodDisruptionBudgetList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym80 := z.EncBinary() - _ = yym80 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep81 := !z.EncBinary() - yy2arr81 := z.EncBasicHandle().StructToArray - var yyq81 [4]bool - _, _, _ = yysep81, yyq81, yy2arr81 - const yyr81 bool = false - yyq81[0] = x.Kind != "" - yyq81[1] = x.APIVersion != "" - yyq81[2] = true - var yynn81 int - if yyr81 || yy2arr81 { - r.EncodeArrayStart(4) - } else { - yynn81 = 1 - for _, b := range yyq81 { - if b { - yynn81++ - } - } - r.EncodeMapStart(yynn81) - yynn81 = 0 - } - if yyr81 || yy2arr81 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq81[0] { - yym83 := z.EncBinary() - _ = yym83 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq81[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym84 := z.EncBinary() - _ = yym84 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr81 || yy2arr81 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq81[1] { - yym86 := z.EncBinary() - _ = yym86 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq81[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym87 := z.EncBinary() - _ = yym87 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr81 || yy2arr81 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq81[2] { - yy89 := &x.ListMeta - yym90 := z.EncBinary() - _ = yym90 - if false { - } else if z.HasExtensions() && z.EncExt(yy89) { - } else { - z.EncFallback(yy89) - } - } else { - r.EncodeNil() - } - } else { - if yyq81[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy91 := &x.ListMeta - yym92 := z.EncBinary() - _ = yym92 - if false { - } else if z.HasExtensions() && z.EncExt(yy91) { - } else { - z.EncFallback(yy91) - } - } - } - if yyr81 || yy2arr81 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym94 := z.EncBinary() - _ = yym94 - if false { - } else { - h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym95 := z.EncBinary() - _ = yym95 - if false { - } else { - h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e) - } - } - } - if yyr81 || yy2arr81 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *PodDisruptionBudgetList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym96 := z.DecBinary() - _ = yym96 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct97 := r.ContainerType() - if yyct97 == codecSelferValueTypeMap1234 { - yyl97 := r.ReadMapStart() - if yyl97 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl97, d) - } - } else if yyct97 == codecSelferValueTypeArray1234 { - yyl97 := r.ReadArrayStart() - if yyl97 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl97, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *PodDisruptionBudgetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys98Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys98Slc - var yyhl98 bool = l >= 0 - for yyj98 := 0; ; yyj98++ { - if yyhl98 { - if yyj98 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys98Slc = r.DecodeBytes(yys98Slc, true, true) - yys98 := string(yys98Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys98 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} - } else { - yyv101 := &x.ListMeta - yym102 := z.DecBinary() - _ = yym102 - if false { - } else if z.HasExtensions() && z.DecExt(yyv101) { - } else { - z.DecFallback(yyv101, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv103 := &x.Items - yym104 := z.DecBinary() - _ = yym104 - if false { - } else { - h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv103), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys98) - } // end switch yys98 - } // end for yyj98 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *PodDisruptionBudgetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj105 int - var yyb105 bool - var yyhl105 bool = l >= 0 - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l - } else { - yyb105 = r.CheckBreak() - } - if yyb105 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l - } else { - yyb105 = r.CheckBreak() - } - if yyb105 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l - } else { - yyb105 = r.CheckBreak() - } - if yyb105 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} - } else { - yyv108 := &x.ListMeta - yym109 := z.DecBinary() - _ = yym109 - if false { - } else if z.HasExtensions() && z.DecExt(yyv108) { - } else { - z.DecFallback(yyv108, false) - } - } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l - } else { - yyb105 = r.CheckBreak() - } - if yyb105 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv110 := &x.Items - yym111 := z.DecBinary() - _ = yym111 - if false { - } else { - h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv110), d) - } - } - for { - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l - } else { - yyb105 = r.CheckBreak() - } - if yyb105 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj105-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym112 := z.EncBinary() - _ = yym112 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep113 := !z.EncBinary() - yy2arr113 := z.EncBasicHandle().StructToArray - var yyq113 [4]bool - _, _, _ = yysep113, yyq113, yy2arr113 - const yyr113 bool = false - yyq113[0] = x.Kind != "" - yyq113[1] = x.APIVersion != "" - yyq113[2] = true - yyq113[3] = x.DeleteOptions != nil - var yynn113 int - if yyr113 || yy2arr113 { - r.EncodeArrayStart(4) - } else { - yynn113 = 0 - for _, b := range yyq113 { - if b { - yynn113++ - } - } - r.EncodeMapStart(yynn113) - yynn113 = 0 - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[0] { - yym115 := z.EncBinary() - _ = yym115 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq113[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym116 := z.EncBinary() - _ = yym116 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[1] { - yym118 := z.EncBinary() - _ = yym118 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq113[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym119 := z.EncBinary() - _ = yym119 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[2] { - yy121 := &x.ObjectMeta - yy121.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq113[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy122 := &x.ObjectMeta - yy122.CodecEncodeSelf(e) - } - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[3] { - if x.DeleteOptions == nil { - r.EncodeNil() - } else { - x.DeleteOptions.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq113[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("deleteOptions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.DeleteOptions == nil { - r.EncodeNil() - } else { - x.DeleteOptions.CodecEncodeSelf(e) - } - } - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *Eviction) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym124 := z.DecBinary() - _ = yym124 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct125 := r.ContainerType() - if yyct125 == codecSelferValueTypeMap1234 { - yyl125 := r.ReadMapStart() - if yyl125 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl125, d) - } - } else if yyct125 == codecSelferValueTypeArray1234 { - yyl125 := r.ReadArrayStart() - if yyl125 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl125, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *Eviction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys126Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys126Slc - var yyhl126 bool = l >= 0 - for yyj126 := 0; ; yyj126++ { - if yyhl126 { - if yyj126 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys126Slc = r.DecodeBytes(yys126Slc, true, true) - yys126 := string(yys126Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys126 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} - } else { - yyv129 := &x.ObjectMeta - yyv129.CodecDecodeSelf(d) - } - case "deleteOptions": - if r.TryDecodeAsNil() { - if x.DeleteOptions != nil { - x.DeleteOptions = nil - } - } else { - if x.DeleteOptions == nil { - x.DeleteOptions = new(pkg3_v1.DeleteOptions) - } - x.DeleteOptions.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys126) - } // end switch yys126 - } // end for yyj126 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj131 int - var yyb131 bool - var yyhl131 bool = l >= 0 - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l - } else { - yyb131 = r.CheckBreak() - } - if yyb131 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l - } else { - yyb131 = r.CheckBreak() - } - if yyb131 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l - } else { - yyb131 = r.CheckBreak() - } - if yyb131 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} - } else { - yyv134 := &x.ObjectMeta - yyv134.CodecDecodeSelf(d) - } - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l - } else { - yyb131 = r.CheckBreak() - } - if yyb131 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.DeleteOptions != nil { - x.DeleteOptions = nil - } - } else { - if x.DeleteOptions == nil { - x.DeleteOptions = new(pkg3_v1.DeleteOptions) - } - x.DeleteOptions.CodecDecodeSelf(d) - } - for { - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l - } else { - yyb131 = r.CheckBreak() - } - if yyb131 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj131-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) encSlicePodDisruptionBudget(v []PodDisruptionBudget, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv136 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy137 := &yyv136 - yy137.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSlicePodDisruptionBudget(v *[]PodDisruptionBudget, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv138 := *v - yyh138, yyl138 := z.DecSliceHelperStart() - var yyc138 bool - if yyl138 == 0 { - if yyv138 == nil { - yyv138 = []PodDisruptionBudget{} - yyc138 = true - } else if len(yyv138) != 0 { - yyv138 = yyv138[:0] - yyc138 = true - } - } else if yyl138 > 0 { - var yyrr138, yyrl138 int - var yyrt138 bool - if yyl138 > cap(yyv138) { - - yyrg138 := len(yyv138) > 0 - yyv2138 := yyv138 - yyrl138, yyrt138 = z.DecInferLen(yyl138, z.DecBasicHandle().MaxInitLen, 312) - if yyrt138 { - if yyrl138 <= cap(yyv138) { - yyv138 = yyv138[:yyrl138] - } else { - yyv138 = make([]PodDisruptionBudget, yyrl138) - } - } else { - yyv138 = make([]PodDisruptionBudget, yyrl138) - } - yyc138 = true - yyrr138 = len(yyv138) - if yyrg138 { - copy(yyv138, yyv2138) - } - } else if yyl138 != len(yyv138) { - yyv138 = yyv138[:yyl138] - yyc138 = true - } - yyj138 := 0 - for ; yyj138 < yyrr138; yyj138++ { - yyh138.ElemContainerState(yyj138) - if r.TryDecodeAsNil() { - yyv138[yyj138] = PodDisruptionBudget{} - } else { - yyv139 := &yyv138[yyj138] - yyv139.CodecDecodeSelf(d) - } - - } - if yyrt138 { - for ; yyj138 < yyl138; yyj138++ { - yyv138 = append(yyv138, PodDisruptionBudget{}) - yyh138.ElemContainerState(yyj138) - if r.TryDecodeAsNil() { - yyv138[yyj138] = PodDisruptionBudget{} - } else { - yyv140 := &yyv138[yyj138] - yyv140.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj138 := 0 - for ; !r.CheckBreak(); yyj138++ { - - if yyj138 >= len(yyv138) { - yyv138 = append(yyv138, PodDisruptionBudget{}) // var yyz138 PodDisruptionBudget - yyc138 = true - } - yyh138.ElemContainerState(yyj138) - if yyj138 < len(yyv138) { - if r.TryDecodeAsNil() { - yyv138[yyj138] = PodDisruptionBudget{} - } else { - yyv141 := &yyv138[yyj138] - yyv141.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj138 < len(yyv138) { - yyv138 = yyv138[:yyj138] - yyc138 = true - } else if yyj138 == 0 && yyv138 == nil { - yyv138 = []PodDisruptionBudget{} - yyc138 = true - } - } - yyh138.End() - if yyc138 { - *v = yyv138 - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/types.go b/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/types.go deleted file mode 100644 index f10b84536..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/types.go +++ /dev/null @@ -1,83 +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 v1alpha1 - -import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/util/intstr" -) - -// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. -type PodDisruptionBudgetSpec struct { - // The minimum number of pods that must be available simultaneously. This - // can be either an integer or a string specifying a percentage, e.g. "28%". - MinAvailable intstr.IntOrString `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"` - - // Label query over pods whose evictions are managed by the disruption - // budget. - Selector *unversioned.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` -} - -// PodDisruptionBudgetStatus represents information about the status of a -// PodDisruptionBudget. Status may trail the actual state of a system. -type PodDisruptionBudgetStatus struct { - // Whether or not a disruption is currently allowed. - PodDisruptionAllowed bool `json:"disruptionAllowed" protobuf:"varint,1,opt,name=disruptionAllowed"` - - // current number of healthy pods - CurrentHealthy int32 `json:"currentHealthy" protobuf:"varint,2,opt,name=currentHealthy"` - - // minimum desired number of healthy pods - DesiredHealthy int32 `json:"desiredHealthy" protobuf:"varint,3,opt,name=desiredHealthy"` - - // total number of pods counted by this disruption budget - ExpectedPods int32 `json:"expectedPods" protobuf:"varint,4,opt,name=expectedPods"` -} - -// +genclient=true - -// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods -type PodDisruptionBudget struct { - unversioned.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Specification of the desired behavior of the PodDisruptionBudget. - Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - // Most recently observed status of the PodDisruptionBudget. - Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. -type PodDisruptionBudgetList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// Eviction evicts a pod from its node subject to certain policies and safety constraints. -// This is a subresource of Pod. A request to cause such an eviction is -// created by POSTing to .../pods//evictions. -type Eviction struct { - unversioned.TypeMeta `json:",inline"` - - // ObjectMeta describes the pod that is being evicted. - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // DeleteOptions may be provided - DeleteOptions *v1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"` -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index d20b4763d..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,240 +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 v1alpha1 - -import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - policy "k8s.io/client-go/1.5/pkg/apis/policy" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" -) - -func init() { - SchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1alpha1_Eviction_To_policy_Eviction, - Convert_policy_Eviction_To_v1alpha1_Eviction, - Convert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget, - Convert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget, - Convert_v1alpha1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList, - Convert_policy_PodDisruptionBudgetList_To_v1alpha1_PodDisruptionBudgetList, - Convert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec, - Convert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec, - Convert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus, - Convert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus, - ) -} - -func autoConvert_v1alpha1_Eviction_To_policy_Eviction(in *Eviction, out *policy.Eviction, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if in.DeleteOptions != nil { - in, out := &in.DeleteOptions, &out.DeleteOptions - *out = new(api.DeleteOptions) - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(*in, *out, 0); err != nil { - return err - } - } else { - out.DeleteOptions = nil - } - return nil -} - -func Convert_v1alpha1_Eviction_To_policy_Eviction(in *Eviction, out *policy.Eviction, s conversion.Scope) error { - return autoConvert_v1alpha1_Eviction_To_policy_Eviction(in, out, s) -} - -func autoConvert_policy_Eviction_To_v1alpha1_Eviction(in *policy.Eviction, out *Eviction, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if in.DeleteOptions != nil { - in, out := &in.DeleteOptions, &out.DeleteOptions - *out = new(v1.DeleteOptions) - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(*in, *out, 0); err != nil { - return err - } - } else { - out.DeleteOptions = nil - } - return nil -} - -func Convert_policy_Eviction_To_v1alpha1_Eviction(in *policy.Eviction, out *Eviction, s conversion.Scope) error { - return autoConvert_policy_Eviction_To_v1alpha1_Eviction(in, out, s) -} - -func autoConvert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error { - return autoConvert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in, out, s) -} - -func autoConvert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error { - return autoConvert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget(in, out, s) -} - -func autoConvert_v1alpha1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in *PodDisruptionBudgetList, out *policy.PodDisruptionBudgetList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]policy.PodDisruptionBudget, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_v1alpha1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in *PodDisruptionBudgetList, out *policy.PodDisruptionBudgetList, s conversion.Scope) error { - return autoConvert_v1alpha1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in, out, s) -} - -func autoConvert_policy_PodDisruptionBudgetList_To_v1alpha1_PodDisruptionBudgetList(in *policy.PodDisruptionBudgetList, out *PodDisruptionBudgetList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PodDisruptionBudget, len(*in)) - for i := range *in { - if err := Convert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_policy_PodDisruptionBudgetList_To_v1alpha1_PodDisruptionBudgetList(in *policy.PodDisruptionBudgetList, out *PodDisruptionBudgetList, s conversion.Scope) error { - return autoConvert_policy_PodDisruptionBudgetList_To_v1alpha1_PodDisruptionBudgetList(in, out, s) -} - -func autoConvert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in *PodDisruptionBudgetSpec, out *policy.PodDisruptionBudgetSpec, s conversion.Scope) error { - if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.MinAvailable, &out.MinAvailable, s); err != nil { - return err - } - out.Selector = in.Selector - return nil -} - -func Convert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in *PodDisruptionBudgetSpec, out *policy.PodDisruptionBudgetSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in, out, s) -} - -func autoConvert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec(in *policy.PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, s conversion.Scope) error { - if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.MinAvailable, &out.MinAvailable, s); err != nil { - return err - } - out.Selector = in.Selector - return nil -} - -func Convert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec(in *policy.PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, s conversion.Scope) error { - return autoConvert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec(in, out, s) -} - -func autoConvert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error { - out.PodDisruptionAllowed = in.PodDisruptionAllowed - out.CurrentHealthy = in.CurrentHealthy - out.DesiredHealthy = in.DesiredHealthy - out.ExpectedPods = in.ExpectedPods - return nil -} - -func Convert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in, out, s) -} - -func autoConvert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error { - out.PodDisruptionAllowed = in.PodDisruptionAllowed - out.CurrentHealthy = in.CurrentHealthy - out.DesiredHealthy = in.DesiredHealthy - out.ExpectedPods = in.ExpectedPods - return nil -} - -func Convert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error { - return autoConvert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus(in, out, s) -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 56439e069..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,133 +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 v1alpha1 - -import ( - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" - reflect "reflect" -) - -func init() { - SchemeBuilder.Register(RegisterDeepCopies) -} - -// RegisterDeepCopies adds deep-copy functions to the given scheme. Public -// to allow building arbitrary schemes. -func RegisterDeepCopies(scheme *runtime.Scheme) error { - return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Eviction, InType: reflect.TypeOf(&Eviction{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodDisruptionBudget, InType: reflect.TypeOf(&PodDisruptionBudget{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodDisruptionBudgetList, InType: reflect.TypeOf(&PodDisruptionBudgetList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodDisruptionBudgetSpec, InType: reflect.TypeOf(&PodDisruptionBudgetSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodDisruptionBudgetStatus, InType: reflect.TypeOf(&PodDisruptionBudgetStatus{})}, - ) -} - -func DeepCopy_v1alpha1_Eviction(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Eviction) - out := out.(*Eviction) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - if in.DeleteOptions != nil { - in, out := &in.DeleteOptions, &out.DeleteOptions - *out = new(v1.DeleteOptions) - if err := v1.DeepCopy_v1_DeleteOptions(*in, *out, c); err != nil { - return err - } - } else { - out.DeleteOptions = nil - } - return nil - } -} - -func DeepCopy_v1alpha1_PodDisruptionBudget(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*PodDisruptionBudget) - out := out.(*PodDisruptionBudget) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - if err := DeepCopy_v1alpha1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - out.Status = in.Status - return nil - } -} - -func DeepCopy_v1alpha1_PodDisruptionBudgetList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*PodDisruptionBudgetList) - out := out.(*PodDisruptionBudgetList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PodDisruptionBudget, len(*in)) - for i := range *in { - if err := DeepCopy_v1alpha1_PodDisruptionBudget(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil - } -} - -func DeepCopy_v1alpha1_PodDisruptionBudgetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*PodDisruptionBudgetSpec) - out := out.(*PodDisruptionBudgetSpec) - out.MinAvailable = in.MinAvailable - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(unversioned.LabelSelector) - if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil { - return err - } - } else { - out.Selector = nil - } - return nil - } -} - -func DeepCopy_v1alpha1_PodDisruptionBudgetStatus(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*PodDisruptionBudgetStatus) - out := out.(*PodDisruptionBudgetStatus) - out.PodDisruptionAllowed = in.PodDisruptionAllowed - out.CurrentHealthy = in.CurrentHealthy - out.DesiredHealthy = in.DesiredHealthy - out.ExpectedPods = in.ExpectedPods - return nil - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/doc.go deleted file mode 100644 index aefe6e09b..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/doc.go +++ /dev/null @@ -1,21 +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,register -// +k8s:openapi-gen=true - -// +groupName=rbac.authorization.k8s.io -package rbac diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/doc.go deleted file mode 100644 index ab6aa6aba..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/doc.go +++ /dev/null @@ -1,22 +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,register -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/rbac -// +k8s:openapi-gen=true - -// +groupName=rbac.authorization.k8s.io -package v1alpha1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/storage/doc.go deleted file mode 100644 index 0294d1350..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/doc.go +++ /dev/null @@ -1,20 +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,register -// +groupName=storage.k8s.io -// +g8k:openapi-gen=true -package storage diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/types.generated.go b/vendor/k8s.io/client-go/1.5/pkg/apis/storage/types.generated.go deleted file mode 100644 index 68f862894..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/types.generated.go +++ /dev/null @@ -1,900 +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 storage - -import ( - "errors" - "fmt" - codec1978 "github.com/ugorji/go/codec" - pkg2_api "k8s.io/client-go/1.5/pkg/api" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg3_types "k8s.io/client-go/1.5/pkg/types" - "reflect" - "runtime" - time "time" -) - -const ( - // ----- content types ---- - codecSelferC_UTF81234 = 1 - codecSelferC_RAW1234 = 0 - // ----- value types used ---- - codecSelferValueTypeArray1234 = 10 - codecSelferValueTypeMap1234 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey1234 = 2 - codecSelfer_containerMapValue1234 = 3 - codecSelfer_containerMapEnd1234 = 4 - codecSelfer_containerArrayElem1234 = 6 - codecSelfer_containerArrayEnd1234 = 7 -) - -var ( - codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer1234 struct{} - -func init() { - if codec1978.GenVersion != 5 { - _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 5, codec1978.GenVersion, file) - panic(err) - } - if false { // reference the types, but skip this branch at build/run time - var v0 pkg2_api.ObjectMeta - var v1 pkg1_unversioned.TypeMeta - var v2 pkg3_types.UID - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 - } -} - -func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [5]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = x.Kind != "" - yyq2[1] = x.APIVersion != "" - yyq2[2] = true - yyq2[4] = len(x.Parameters) != 0 - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(5) - } else { - yynn2 = 1 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[1] { - yym7 := z.EncBinary() - _ = yym7 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym8 := z.EncBinary() - _ = yym8 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy11 := &x.ObjectMeta - yy11.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym13 := z.EncBinary() - _ = yym13 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Provisioner)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("provisioner")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym14 := z.EncBinary() - _ = yym14 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Provisioner)) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { - if x.Parameters == nil { - r.EncodeNil() - } else { - yym16 := z.EncBinary() - _ = yym16 - if false { - } else { - z.F.EncMapStringStringV(x.Parameters, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("parameters")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Parameters == nil { - r.EncodeNil() - } else { - yym17 := z.EncBinary() - _ = yym17 - if false { - } else { - z.F.EncMapStringStringV(x.Parameters, false, e) - } - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *StorageClass) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym18 := z.DecBinary() - _ = yym18 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct19 := r.ContainerType() - if yyct19 == codecSelferValueTypeMap1234 { - yyl19 := r.ReadMapStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl19, d) - } - } else if yyct19 == codecSelferValueTypeArray1234 { - yyl19 := r.ReadArrayStart() - if yyl19 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl19, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *StorageClass) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys20Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys20Slc - var yyhl20 bool = l >= 0 - for yyj20 := 0; ; yyj20++ { - if yyhl20 { - if yyj20 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys20Slc = r.DecodeBytes(yys20Slc, true, true) - yys20 := string(yys20Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys20 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv23 := &x.ObjectMeta - yyv23.CodecDecodeSelf(d) - } - case "provisioner": - if r.TryDecodeAsNil() { - x.Provisioner = "" - } else { - x.Provisioner = string(r.DecodeString()) - } - case "parameters": - if r.TryDecodeAsNil() { - x.Parameters = nil - } else { - yyv25 := &x.Parameters - yym26 := z.DecBinary() - _ = yym26 - if false { - } else { - z.F.DecMapStringStringX(yyv25, false, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys20) - } // end switch yys20 - } // end for yyj20 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var 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.Kind = "" - } else { - x.Kind = 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.APIVersion = "" - } else { - x.APIVersion = 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.ObjectMeta = pkg2_api.ObjectMeta{} - } else { - yyv30 := &x.ObjectMeta - yyv30.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.Provisioner = "" - } else { - x.Provisioner = 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.Parameters = nil - } else { - yyv32 := &x.Parameters - yym33 := z.DecBinary() - _ = yym33 - if false { - } else { - z.F.DecMapStringStringX(yyv32, false, d) - } - } - 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 *StorageClassList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym34 := z.EncBinary() - _ = yym34 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep35 := !z.EncBinary() - yy2arr35 := z.EncBasicHandle().StructToArray - var yyq35 [4]bool - _, _, _ = yysep35, yyq35, yy2arr35 - const yyr35 bool = false - yyq35[0] = x.Kind != "" - yyq35[1] = x.APIVersion != "" - yyq35[2] = true - var yynn35 int - if yyr35 || yy2arr35 { - r.EncodeArrayStart(4) - } else { - yynn35 = 1 - for _, b := range yyq35 { - if b { - yynn35++ - } - } - r.EncodeMapStart(yynn35) - yynn35 = 0 - } - if yyr35 || yy2arr35 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq35[0] { - yym37 := z.EncBinary() - _ = yym37 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq35[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym38 := z.EncBinary() - _ = yym38 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr35 || yy2arr35 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq35[1] { - yym40 := z.EncBinary() - _ = yym40 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq35[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym41 := z.EncBinary() - _ = yym41 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr35 || yy2arr35 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq35[2] { - yy43 := &x.ListMeta - yym44 := z.EncBinary() - _ = yym44 - if false { - } else if z.HasExtensions() && z.EncExt(yy43) { - } else { - z.EncFallback(yy43) - } - } else { - r.EncodeNil() - } - } else { - if yyq35[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy45 := &x.ListMeta - yym46 := z.EncBinary() - _ = yym46 - if false { - } else if z.HasExtensions() && z.EncExt(yy45) { - } else { - z.EncFallback(yy45) - } - } - } - if yyr35 || yy2arr35 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym48 := z.EncBinary() - _ = yym48 - if false { - } else { - h.encSliceStorageClass(([]StorageClass)(x.Items), e) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym49 := z.EncBinary() - _ = yym49 - if false { - } else { - h.encSliceStorageClass(([]StorageClass)(x.Items), e) - } - } - } - if yyr35 || yy2arr35 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *StorageClassList) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym50 := z.DecBinary() - _ = yym50 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct51 := r.ContainerType() - if yyct51 == codecSelferValueTypeMap1234 { - yyl51 := r.ReadMapStart() - if yyl51 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl51, d) - } - } else if yyct51 == codecSelferValueTypeArray1234 { - yyl51 := r.ReadArrayStart() - if yyl51 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl51, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *StorageClassList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys52Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys52Slc - var yyhl52 bool = l >= 0 - for yyj52 := 0; ; yyj52++ { - if yyhl52 { - if yyj52 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys52Slc = r.DecodeBytes(yys52Slc, true, true) - yys52 := string(yys52Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys52 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv55 := &x.ListMeta - yym56 := z.DecBinary() - _ = yym56 - if false { - } else if z.HasExtensions() && z.DecExt(yyv55) { - } else { - z.DecFallback(yyv55, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv57 := &x.Items - yym58 := z.DecBinary() - _ = yym58 - if false { - } else { - h.decSliceStorageClass((*[]StorageClass)(yyv57), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys52) - } // end switch yys52 - } // end for yyj52 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *StorageClassList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj59 int - var yyb59 bool - var yyhl59 bool = l >= 0 - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l - } else { - yyb59 = r.CheckBreak() - } - if yyb59 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l - } else { - yyb59 = r.CheckBreak() - } - if yyb59 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l - } else { - yyb59 = r.CheckBreak() - } - if yyb59 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} - } else { - yyv62 := &x.ListMeta - yym63 := z.DecBinary() - _ = yym63 - if false { - } else if z.HasExtensions() && z.DecExt(yyv62) { - } else { - z.DecFallback(yyv62, false) - } - } - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l - } else { - yyb59 = r.CheckBreak() - } - if yyb59 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv64 := &x.Items - yym65 := z.DecBinary() - _ = yym65 - if false { - } else { - h.decSliceStorageClass((*[]StorageClass)(yyv64), d) - } - } - for { - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l - } else { - yyb59 = r.CheckBreak() - } - if yyb59 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj59-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) encSliceStorageClass(v []StorageClass, e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeArrayStart(len(v)) - for _, yyv66 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy67 := &yyv66 - yy67.CodecEncodeSelf(e) - } - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x codecSelfer1234) decSliceStorageClass(v *[]StorageClass, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv68 := *v - yyh68, yyl68 := z.DecSliceHelperStart() - var yyc68 bool - if yyl68 == 0 { - if yyv68 == nil { - yyv68 = []StorageClass{} - yyc68 = true - } else if len(yyv68) != 0 { - yyv68 = yyv68[:0] - yyc68 = true - } - } else if yyl68 > 0 { - var yyrr68, yyrl68 int - var yyrt68 bool - if yyl68 > cap(yyv68) { - - yyrg68 := len(yyv68) > 0 - yyv268 := yyv68 - yyrl68, yyrt68 = z.DecInferLen(yyl68, z.DecBasicHandle().MaxInitLen, 280) - if yyrt68 { - if yyrl68 <= cap(yyv68) { - yyv68 = yyv68[:yyrl68] - } else { - yyv68 = make([]StorageClass, yyrl68) - } - } else { - yyv68 = make([]StorageClass, yyrl68) - } - yyc68 = true - yyrr68 = len(yyv68) - if yyrg68 { - copy(yyv68, yyv268) - } - } else if yyl68 != len(yyv68) { - yyv68 = yyv68[:yyl68] - yyc68 = true - } - yyj68 := 0 - for ; yyj68 < yyrr68; yyj68++ { - yyh68.ElemContainerState(yyj68) - if r.TryDecodeAsNil() { - yyv68[yyj68] = StorageClass{} - } else { - yyv69 := &yyv68[yyj68] - yyv69.CodecDecodeSelf(d) - } - - } - if yyrt68 { - for ; yyj68 < yyl68; yyj68++ { - yyv68 = append(yyv68, StorageClass{}) - yyh68.ElemContainerState(yyj68) - if r.TryDecodeAsNil() { - yyv68[yyj68] = StorageClass{} - } else { - yyv70 := &yyv68[yyj68] - yyv70.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj68 := 0 - for ; !r.CheckBreak(); yyj68++ { - - if yyj68 >= len(yyv68) { - yyv68 = append(yyv68, StorageClass{}) // var yyz68 StorageClass - yyc68 = true - } - yyh68.ElemContainerState(yyj68) - if yyj68 < len(yyv68) { - if r.TryDecodeAsNil() { - yyv68[yyj68] = StorageClass{} - } else { - yyv71 := &yyv68[yyj68] - yyv71.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj68 < len(yyv68) { - yyv68 = yyv68[:yyj68] - yyc68 = true - } else if yyj68 == 0 && yyv68 == nil { - yyv68 = []StorageClass{} - yyc68 = true - } - } - yyh68.End() - if yyc68 { - *v = yyv68 - } -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/doc.go b/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/doc.go deleted file mode 100644 index c560310f2..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/doc.go +++ /dev/null @@ -1,21 +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,register -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/storage -// +groupName=storage.k8s.io -// +k8s:openapi-gen=true -package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/auth/user/doc.go b/vendor/k8s.io/client-go/1.5/pkg/auth/user/doc.go deleted file mode 100644 index 570c51ae9..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/auth/user/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 user contains utilities for dealing with simple user exchange in the auth -// packages. The user.Info interface defines an interface for exchanging that info. -package user diff --git a/vendor/k8s.io/client-go/1.5/pkg/auth/user/user.go b/vendor/k8s.io/client-go/1.5/pkg/auth/user/user.go deleted file mode 100644 index 7e7cc16f6..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/auth/user/user.go +++ /dev/null @@ -1,67 +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 user - -// Info describes a user that has been authenticated to the system. -type Info interface { - // GetName returns the name that uniquely identifies this user among all - // other active users. - GetName() string - // GetUID returns a unique value for a particular user that will change - // if the user is removed from the system and another user is added with - // the same name. - GetUID() string - // GetGroups returns the names of the groups the user is a member of - GetGroups() []string - - // GetExtra can contain any additional information that the authenticator - // thought was interesting. One example would be scopes on a token. - // Keys in this map should be namespaced to the authenticator or - // authenticator/authorizer pair making use of them. - // For instance: "example.org/foo" instead of "foo" - // This is a map[string][]string because it needs to be serializeable into - // a SubjectAccessReviewSpec.authorization.k8s.io for proper authorization - // delegation flows - // In order to faithfully round-trip through an impersonation flow, these keys - // MUST be lowercase. - GetExtra() map[string][]string -} - -// DefaultInfo provides a simple user information exchange object -// for components that implement the UserInfo interface. -type DefaultInfo struct { - Name string - UID string - Groups []string - Extra map[string][]string -} - -func (i *DefaultInfo) GetName() string { - return i.Name -} - -func (i *DefaultInfo) GetUID() string { - return i.UID -} - -func (i *DefaultInfo) GetGroups() []string { - return i.Groups -} - -func (i *DefaultInfo) GetExtra() map[string][]string { - return i.Extra -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/conversion/OWNERS b/vendor/k8s.io/client-go/1.5/pkg/conversion/OWNERS deleted file mode 100644 index a046efc0c..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/conversion/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -assignees: - - derekwaynecarr - - lavalamp - - smarterclayton - - wojtek-t diff --git a/vendor/k8s.io/client-go/1.5/pkg/genericapiserver/openapi/common/doc.go b/vendor/k8s.io/client-go/1.5/pkg/genericapiserver/openapi/common/doc.go deleted file mode 100644 index 0308d58b4..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/genericapiserver/openapi/common/doc.go +++ /dev/null @@ -1,18 +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 common holds shared codes and types between open API code generator and spec generator. -package common diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/OWNERS b/vendor/k8s.io/client-go/1.5/pkg/runtime/OWNERS deleted file mode 100644 index d038b5e9b..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -assignees: - - caesarxuchao - - deads2k - - lavalamp - - smarterclayton diff --git a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/negotiated_codec.go b/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/negotiated_codec.go deleted file mode 100644 index 6b3cf018e..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/runtime/serializer/negotiated_codec.go +++ /dev/null @@ -1,56 +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 serializer - -import ( - "k8s.io/client-go/1.5/pkg/runtime" -) - -// TODO: We should figure out what happens when someone asks -// encoder for version and it conflicts with the raw serializer. -type negotiatedSerializerWrapper struct { - info runtime.SerializerInfo - streamInfo runtime.StreamSerializerInfo -} - -func NegotiatedSerializerWrapper(info runtime.SerializerInfo, streamInfo runtime.StreamSerializerInfo) runtime.NegotiatedSerializer { - return &negotiatedSerializerWrapper{info, streamInfo} -} - -func (n *negotiatedSerializerWrapper) SupportedMediaTypes() []string { - return []string{} -} - -func (n *negotiatedSerializerWrapper) SerializerForMediaType(mediaType string, options map[string]string) (runtime.SerializerInfo, bool) { - return n.info, true -} - -func (n *negotiatedSerializerWrapper) SupportedStreamingMediaTypes() []string { - return []string{} -} - -func (n *negotiatedSerializerWrapper) StreamingSerializerForMediaType(mediaType string, options map[string]string) (runtime.StreamSerializerInfo, bool) { - return n.streamInfo, true -} - -func (n *negotiatedSerializerWrapper) EncoderForVersion(e runtime.Encoder, _ runtime.GroupVersioner) runtime.Encoder { - return e -} - -func (n *negotiatedSerializerWrapper) DecoderToVersion(d runtime.Decoder, _gv runtime.GroupVersioner) runtime.Decoder { - return d -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/labels/doc.go b/vendor/k8s.io/client-go/1.5/pkg/util/labels/doc.go deleted file mode 100644 index c87305fb0..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/util/labels/doc.go +++ /dev/null @@ -1,18 +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 labels provides utilities to work with Kubernetes labels. -package labels diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/string_flag.go b/vendor/k8s.io/client-go/1.5/pkg/util/string_flag.go deleted file mode 100644 index 9d6a00a15..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/util/string_flag.go +++ /dev/null @@ -1,56 +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 util - -// StringFlag is a string flag compatible with flags and pflags that keeps track of whether it had a value supplied or not. -type StringFlag struct { - // If Set has been invoked this value is true - provided bool - // The exact value provided on the flag - value string -} - -func NewStringFlag(defaultVal string) StringFlag { - return StringFlag{value: defaultVal} -} - -func (f *StringFlag) Default(value string) { - f.value = value -} - -func (f StringFlag) String() string { - return f.value -} - -func (f StringFlag) Value() string { - return f.value -} - -func (f *StringFlag) Set(value string) error { - f.value = value - f.provided = true - - return nil -} - -func (f StringFlag) Provided() bool { - return f.provided -} - -func (f *StringFlag) Type() string { - return "string" -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/trace.go b/vendor/k8s.io/client-go/1.5/pkg/util/trace.go deleted file mode 100644 index fe93db8df..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/util/trace.go +++ /dev/null @@ -1,72 +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 util - -import ( - "bytes" - "fmt" - "time" - - "github.com/golang/glog" -) - -type traceStep struct { - stepTime time.Time - msg string -} - -type Trace struct { - name string - startTime time.Time - steps []traceStep -} - -func NewTrace(name string) *Trace { - return &Trace{name, time.Now(), nil} -} - -func (t *Trace) Step(msg string) { - if t.steps == nil { - // traces almost always have less than 6 steps, do this to avoid more than a single allocation - t.steps = make([]traceStep, 0, 6) - } - t.steps = append(t.steps, traceStep{time.Now(), msg}) -} - -func (t *Trace) Log() { - endTime := time.Now() - var buffer bytes.Buffer - - buffer.WriteString(fmt.Sprintf("Trace %q (started %v):\n", t.name, t.startTime)) - lastStepTime := t.startTime - for _, step := range t.steps { - buffer.WriteString(fmt.Sprintf("[%v] [%v] %v\n", step.stepTime.Sub(t.startTime), step.stepTime.Sub(lastStepTime), step.msg)) - lastStepTime = step.stepTime - } - buffer.WriteString(fmt.Sprintf("[%v] [%v] END\n", endTime.Sub(t.startTime), endTime.Sub(lastStepTime))) - glog.Info(buffer.String()) -} - -func (t *Trace) LogIfLong(threshold time.Duration) { - if time.Since(t.startTime) >= threshold { - t.Log() - } -} - -func (t *Trace) TotalTime() time.Duration { - return time.Since(t.startTime) -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/uuid/uuid.go b/vendor/k8s.io/client-go/1.5/pkg/util/uuid/uuid.go deleted file mode 100644 index d1cbda5da..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/util/uuid/uuid.go +++ /dev/null @@ -1,42 +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 uuid - -import ( - "sync" - - "github.com/pborman/uuid" - "k8s.io/client-go/1.5/pkg/types" -) - -var uuidLock sync.Mutex -var lastUUID uuid.UUID - -func NewUUID() types.UID { - uuidLock.Lock() - defer uuidLock.Unlock() - result := uuid.NewUUID() - // The UUID package is naive and can generate identical UUIDs if the - // time interval is quick enough. - // The UUID uses 100 ns increments so it's short enough to actively - // wait for a new value. - for uuid.Equal(lastUUID, result) == true { - result = uuid.NewUUID() - } - lastUUID = result - return types.UID(result.String()) -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/version/semver.go b/vendor/k8s.io/client-go/1.5/pkg/version/semver.go deleted file mode 100644 index 1f4067e21..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/version/semver.go +++ /dev/null @@ -1,50 +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 version - -import ( - "strings" - "unicode" - - "github.com/blang/semver" - "github.com/golang/glog" -) - -func Parse(gitversion string) (semver.Version, error) { - // optionally trim leading spaces then one v - var seen bool - gitversion = strings.TrimLeftFunc(gitversion, func(ch rune) bool { - if seen { - return false - } - if ch == 'v' { - seen = true - return true - } - return unicode.IsSpace(ch) - }) - - return semver.Make(gitversion) -} - -func MustParse(gitversion string) semver.Version { - v, err := Parse(gitversion) - if err != nil { - glog.Fatalf("failed to parse semver from gitversion %q: %v", gitversion, err) - } - return v -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/generated.pb.go b/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/generated.pb.go deleted file mode 100644 index 241878de1..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/generated.pb.go +++ /dev/null @@ -1,390 +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/watch/versioned/generated.proto -// DO NOT EDIT! - -/* - Package versioned is a generated protocol buffer package. - - It is generated from these files: - k8s.io/kubernetes/pkg/watch/versioned/generated.proto - - It has these top-level messages: - Event -*/ -package versioned - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import strings "strings" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -const _ = proto.GoGoProtoPackageIsVersion1 - -func (m *Event) Reset() { *m = Event{} } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } - -func init() { - proto.RegisterType((*Event)(nil), "k8s.io.client-go.1.5.pkg.watch.versioned.Event") -} -func (m *Event) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Event) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Type))) - i += copy(data[i:], m.Type) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Object.Size())) - n1, err := m.Object.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - return i, nil -} - -func encodeFixed64Generated(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Generated(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintGenerated(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *Event) Size() (n int) { - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Object.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Event) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Event{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Object:` + strings.Replace(strings.Replace(this.Object.String(), "RawExtension", "k8s_io_kubernetes_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Event) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Object.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") -) - -var fileDescriptorGenerated = []byte{ - // 273 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x32, 0xcd, 0xb6, 0x28, 0xd6, - 0xcb, 0xcc, 0xd7, 0xcf, 0x2e, 0x4d, 0x4a, 0x2d, 0xca, 0x4b, 0x2d, 0x49, 0x2d, 0xd6, 0x2f, 0xc8, - 0x4e, 0xd7, 0x2f, 0x4f, 0x2c, 0x49, 0xce, 0xd0, 0x2f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0x4b, - 0x4d, 0xd1, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0x17, 0x52, 0x85, 0x68, 0xd3, 0x43, 0x68, 0xd3, 0x03, 0x6a, 0xd3, 0x03, 0x6b, 0xd3, 0x83, - 0x6b, 0x93, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, - 0x4f, 0xcf, 0xd7, 0x07, 0xeb, 0x4e, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0xaa, - 0x94, 0x2e, 0x76, 0xc7, 0x14, 0x95, 0xe6, 0x95, 0x64, 0xe6, 0xa6, 0xa2, 0x3b, 0x42, 0xca, 0x10, - 0xbb, 0xf2, 0xd2, 0x92, 0xcc, 0x1c, 0xfd, 0xcc, 0xbc, 0x92, 0xe2, 0x92, 0x22, 0x74, 0x2d, 0x4a, - 0x75, 0x5c, 0xac, 0xae, 0x65, 0xa9, 0x79, 0x25, 0x42, 0x0a, 0x5c, 0x2c, 0x25, 0x95, 0x05, 0xa9, - 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x4e, 0x3c, 0x27, 0xee, 0xc9, 0x33, 0x3c, 0xba, 0x27, 0xcf, - 0x12, 0x02, 0x14, 0x0b, 0x02, 0xcb, 0x08, 0x05, 0x73, 0xb1, 0xe5, 0x27, 0x65, 0xa5, 0x26, 0x97, - 0x48, 0x30, 0x01, 0xd5, 0x70, 0x1b, 0x69, 0xeb, 0x61, 0xf7, 0x33, 0xd4, 0x75, 0x7a, 0x41, 0x89, - 0xe5, 0xae, 0x15, 0x25, 0xa9, 0x79, 0x20, 0xaf, 0x3b, 0xf1, 0x41, 0x0d, 0x64, 0xf3, 0x07, 0x1b, - 0x11, 0x04, 0x35, 0xca, 0x49, 0xfb, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x40, 0x7c, 0x03, 0x88, 0x1b, - 0x1e, 0xc9, 0x31, 0x9e, 0x00, 0xe2, 0x0b, 0x40, 0xfc, 0x00, 0x88, 0x27, 0x3c, 0x96, 0x63, 0x88, - 0xe2, 0x84, 0x87, 0x1e, 0x20, 0x00, 0x00, 0xff, 0xff, 0x23, 0x3d, 0x7b, 0x7e, 0x9c, 0x01, 0x00, - 0x00, -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/generated.proto b/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/generated.proto deleted file mode 100644 index 340e18dad..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/generated.proto +++ /dev/null @@ -1,44 +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.watch.versioned; - -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "versioned"; - -// Event represents a single event to a watched resource. -// -// +protobuf=true -// +k8s:openapi-gen=true -message Event { - optional string type = 1; - - // Object is: - // * If Type is Added or Modified: the new state of the object. - // * If Type is Deleted: the state of the object immediately before deletion. - // * If Type is Error: *api.Status is recommended; other types may make sense - // depending on context. - optional k8s.io.kubernetes.pkg.runtime.RawExtension object = 2; -} - diff --git a/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/types.go b/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/types.go deleted file mode 100644 index f73cb68db..000000000 --- a/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/types.go +++ /dev/null @@ -1,38 +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 versioned contains the versioned types for watch. This is the first -// serialization version unless otherwise noted. -package versioned - -import ( - "k8s.io/client-go/1.5/pkg/runtime" -) - -// Event represents a single event to a watched resource. -// -// +protobuf=true -// +k8s:openapi-gen=true -type Event struct { - Type string `json:"type" protobuf:"bytes,1,opt,name=type"` - - // Object is: - // * If Type is Added or Modified: the new state of the object. - // * If Type is Deleted: the state of the object immediately before deletion. - // * If Type is Error: *api.Status is recommended; other types may make sense - // depending on context. - Object runtime.RawExtension `json:"object" protobuf:"bytes,2,opt,name=object"` -} diff --git a/vendor/k8s.io/client-go/1.5/plugin/pkg/client/auth/gcp/gcp.go b/vendor/k8s.io/client-go/1.5/plugin/pkg/client/auth/gcp/gcp.go deleted file mode 100644 index bbc0f0b8b..000000000 --- a/vendor/k8s.io/client-go/1.5/plugin/pkg/client/auth/gcp/gcp.go +++ /dev/null @@ -1,105 +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 gcp - -import ( - "net/http" - "time" - - "github.com/golang/glog" - "golang.org/x/net/context" - "golang.org/x/oauth2" - "golang.org/x/oauth2/google" - "k8s.io/client-go/1.5/rest" -) - -func init() { - if err := rest.RegisterAuthProviderPlugin("gcp", newGCPAuthProvider); err != nil { - glog.Fatalf("Failed to register gcp auth plugin: %v", err) - } -} - -type gcpAuthProvider struct { - tokenSource oauth2.TokenSource - persister rest.AuthProviderConfigPersister -} - -func newGCPAuthProvider(_ string, gcpConfig map[string]string, persister rest.AuthProviderConfigPersister) (rest.AuthProvider, error) { - ts, err := newCachedTokenSource(gcpConfig["access-token"], gcpConfig["expiry"], persister) - if err != nil { - return nil, err - } - return &gcpAuthProvider{ts, persister}, nil -} - -func (g *gcpAuthProvider) WrapTransport(rt http.RoundTripper) http.RoundTripper { - return &oauth2.Transport{ - Source: g.tokenSource, - Base: rt, - } -} - -func (g *gcpAuthProvider) Login() error { return nil } - -type cachedTokenSource struct { - source oauth2.TokenSource - accessToken string - expiry time.Time - persister rest.AuthProviderConfigPersister -} - -func newCachedTokenSource(accessToken, expiry string, persister rest.AuthProviderConfigPersister) (*cachedTokenSource, error) { - var expiryTime time.Time - if parsedTime, err := time.Parse(time.RFC3339Nano, expiry); err == nil { - expiryTime = parsedTime - } - ts, err := google.DefaultTokenSource(context.Background(), "https://www.googleapis.com/auth/cloud-platform") - if err != nil { - return nil, err - } - return &cachedTokenSource{ - source: ts, - accessToken: accessToken, - expiry: expiryTime, - persister: persister, - }, nil -} - -func (t *cachedTokenSource) Token() (*oauth2.Token, error) { - tok := &oauth2.Token{ - AccessToken: t.accessToken, - TokenType: "Bearer", - Expiry: t.expiry, - } - if tok.Valid() && !tok.Expiry.IsZero() { - return tok, nil - } - tok, err := t.source.Token() - if err != nil { - return nil, err - } - if t.persister != nil { - cached := map[string]string{ - "access-token": tok.AccessToken, - "expiry": tok.Expiry.Format(time.RFC3339Nano), - } - if err := t.persister.Persist(cached); err != nil { - glog.V(4).Infof("Failed to persist token: %v", err) - } - } - return tok, nil -} diff --git a/vendor/k8s.io/client-go/1.5/plugin/pkg/client/auth/oidc/OWNERS b/vendor/k8s.io/client-go/1.5/plugin/pkg/client/auth/oidc/OWNERS deleted file mode 100644 index 2f80bc7e1..000000000 --- a/vendor/k8s.io/client-go/1.5/plugin/pkg/client/auth/oidc/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -assignees: - - ericchiang diff --git a/vendor/k8s.io/client-go/1.5/plugin/pkg/client/auth/oidc/oidc.go b/vendor/k8s.io/client-go/1.5/plugin/pkg/client/auth/oidc/oidc.go deleted file mode 100644 index b397fa162..000000000 --- a/vendor/k8s.io/client-go/1.5/plugin/pkg/client/auth/oidc/oidc.go +++ /dev/null @@ -1,270 +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 oidc - -import ( - "encoding/base64" - "errors" - "fmt" - "net/http" - "strings" - "time" - - "github.com/coreos/go-oidc/jose" - "github.com/coreos/go-oidc/oauth2" - "github.com/coreos/go-oidc/oidc" - "github.com/golang/glog" - - "k8s.io/client-go/1.5/pkg/util/wait" - "k8s.io/client-go/1.5/rest" -) - -const ( - cfgIssuerUrl = "idp-issuer-url" - cfgClientID = "client-id" - cfgClientSecret = "client-secret" - cfgCertificateAuthority = "idp-certificate-authority" - cfgCertificateAuthorityData = "idp-certificate-authority-data" - cfgExtraScopes = "extra-scopes" - cfgIDToken = "id-token" - cfgRefreshToken = "refresh-token" -) - -var ( - backoff = wait.Backoff{ - Duration: 1 * time.Second, - Factor: 2, - Jitter: .1, - Steps: 5, - } -) - -func init() { - if err := rest.RegisterAuthProviderPlugin("oidc", newOIDCAuthProvider); err != nil { - glog.Fatalf("Failed to register oidc auth plugin: %v", err) - } -} - -func newOIDCAuthProvider(_ string, cfg map[string]string, persister rest.AuthProviderConfigPersister) (rest.AuthProvider, error) { - issuer := cfg[cfgIssuerUrl] - if issuer == "" { - return nil, fmt.Errorf("Must provide %s", cfgIssuerUrl) - } - - clientID := cfg[cfgClientID] - if clientID == "" { - return nil, fmt.Errorf("Must provide %s", cfgClientID) - } - - clientSecret := cfg[cfgClientSecret] - if clientSecret == "" { - return nil, fmt.Errorf("Must provide %s", cfgClientSecret) - } - - var certAuthData []byte - var err error - if cfg[cfgCertificateAuthorityData] != "" { - certAuthData, err = base64.StdEncoding.DecodeString(cfg[cfgCertificateAuthorityData]) - if err != nil { - return nil, err - } - } - - clientConfig := rest.Config{ - TLSClientConfig: rest.TLSClientConfig{ - CAFile: cfg[cfgCertificateAuthority], - CAData: certAuthData, - }, - } - - trans, err := rest.TransportFor(&clientConfig) - if err != nil { - return nil, err - } - hc := &http.Client{Transport: trans} - - providerCfg, err := oidc.FetchProviderConfig(hc, issuer) - if err != nil { - return nil, fmt.Errorf("error fetching provider config: %v", err) - } - - scopes := strings.Split(cfg[cfgExtraScopes], ",") - oidcCfg := oidc.ClientConfig{ - HTTPClient: hc, - Credentials: oidc.ClientCredentials{ - ID: clientID, - Secret: clientSecret, - }, - ProviderConfig: providerCfg, - Scope: append(scopes, oidc.DefaultScope...), - } - - client, err := oidc.NewClient(oidcCfg) - if err != nil { - return nil, fmt.Errorf("error creating OIDC Client: %v", err) - } - - oClient := &oidcClient{client} - - var initialIDToken jose.JWT - if cfg[cfgIDToken] != "" { - initialIDToken, err = jose.ParseJWT(cfg[cfgIDToken]) - if err != nil { - return nil, err - } - } - - return &oidcAuthProvider{ - initialIDToken: initialIDToken, - refresher: &idTokenRefresher{ - client: oClient, - cfg: cfg, - persister: persister, - }, - }, nil -} - -type oidcAuthProvider struct { - refresher *idTokenRefresher - initialIDToken jose.JWT -} - -func (g *oidcAuthProvider) WrapTransport(rt http.RoundTripper) http.RoundTripper { - at := &oidc.AuthenticatedTransport{ - TokenRefresher: g.refresher, - RoundTripper: rt, - } - at.SetJWT(g.initialIDToken) - return &roundTripper{ - wrapped: at, - refresher: g.refresher, - } -} - -func (g *oidcAuthProvider) Login() error { - return errors.New("not yet implemented") -} - -type OIDCClient interface { - refreshToken(rt string) (oauth2.TokenResponse, error) - verifyJWT(jwt jose.JWT) error -} - -type roundTripper struct { - refresher *idTokenRefresher - wrapped *oidc.AuthenticatedTransport -} - -func (r *roundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - var res *http.Response - var err error - firstTime := true - wait.ExponentialBackoff(backoff, func() (bool, error) { - if !firstTime { - var jwt jose.JWT - jwt, err = r.refresher.Refresh() - if err != nil { - return true, nil - } - r.wrapped.SetJWT(jwt) - } else { - firstTime = false - } - - res, err = r.wrapped.RoundTrip(req) - if err != nil { - return true, nil - } - if res.StatusCode == http.StatusUnauthorized { - return false, nil - } - return true, nil - }) - return res, err -} - -type idTokenRefresher struct { - cfg map[string]string - client OIDCClient - persister rest.AuthProviderConfigPersister - intialIDToken jose.JWT -} - -func (r *idTokenRefresher) Verify(jwt jose.JWT) error { - claims, err := jwt.Claims() - if err != nil { - return err - } - - now := time.Now() - exp, ok, err := claims.TimeClaim("exp") - switch { - case err != nil: - return fmt.Errorf("failed to parse 'exp' claim: %v", err) - case !ok: - return errors.New("missing required 'exp' claim") - case exp.Before(now): - return fmt.Errorf("token already expired at: %v", exp) - } - - return nil -} - -func (r *idTokenRefresher) Refresh() (jose.JWT, error) { - rt, ok := r.cfg[cfgRefreshToken] - if !ok { - return jose.JWT{}, errors.New("No valid id-token, and cannot refresh without refresh-token") - } - - tokens, err := r.client.refreshToken(rt) - if err != nil { - return jose.JWT{}, fmt.Errorf("could not refresh token: %v", err) - } - jwt, err := jose.ParseJWT(tokens.IDToken) - if err != nil { - return jose.JWT{}, err - } - - if tokens.RefreshToken != "" && tokens.RefreshToken != rt { - r.cfg[cfgRefreshToken] = tokens.RefreshToken - } - r.cfg[cfgIDToken] = jwt.Encode() - - err = r.persister.Persist(r.cfg) - if err != nil { - return jose.JWT{}, fmt.Errorf("could not perist new tokens: %v", err) - } - - return jwt, r.client.verifyJWT(jwt) -} - -type oidcClient struct { - client *oidc.Client -} - -func (o *oidcClient) refreshToken(rt string) (oauth2.TokenResponse, error) { - oac, err := o.client.OAuthClient() - if err != nil { - return oauth2.TokenResponse{}, err - } - - return oac.RequestToken(oauth2.GrantTypeRefreshToken, rt) -} - -func (o *oidcClient) verifyJWT(jwt jose.JWT) error { - return o.client.VerifyJWT(jwt) -} diff --git a/vendor/k8s.io/client-go/1.5/plugin/pkg/client/auth/plugins.go b/vendor/k8s.io/client-go/1.5/plugin/pkg/client/auth/plugins.go deleted file mode 100644 index 4be6cc515..000000000 --- a/vendor/k8s.io/client-go/1.5/plugin/pkg/client/auth/plugins.go +++ /dev/null @@ -1,23 +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 auth - -import ( - // Initialize all known client auth plugins. - _ "k8s.io/client-go/1.5/plugin/pkg/client/auth/gcp" - _ "k8s.io/client-go/1.5/plugin/pkg/client/auth/oidc" -) diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/listers.go b/vendor/k8s.io/client-go/1.5/tools/cache/listers.go deleted file mode 100644 index 1b607e773..000000000 --- a/vendor/k8s.io/client-go/1.5/tools/cache/listers.go +++ /dev/null @@ -1,668 +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 cache - -import ( - "fmt" - - "github.com/golang/glog" - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/errors" - "k8s.io/client-go/1.5/pkg/api/meta" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/apis/apps" - "k8s.io/client-go/1.5/pkg/apis/batch" - "k8s.io/client-go/1.5/pkg/apis/certificates" - "k8s.io/client-go/1.5/pkg/apis/extensions" - "k8s.io/client-go/1.5/pkg/apis/policy" - "k8s.io/client-go/1.5/pkg/labels" -) - -// AppendFunc is used to add a matching item to whatever list the caller is using -type AppendFunc func(interface{}) - -func ListAll(store Store, selector labels.Selector, appendFn AppendFunc) error { - for _, m := range store.List() { - metadata, err := meta.Accessor(m) - if err != nil { - return err - } - if selector.Matches(labels.Set(metadata.GetLabels())) { - appendFn(m) - } - } - return nil -} - -func ListAllByNamespace(indexer Indexer, namespace string, selector labels.Selector, appendFn AppendFunc) error { - if namespace == api.NamespaceAll { - for _, m := range indexer.List() { - metadata, err := meta.Accessor(m) - if err != nil { - return err - } - if selector.Matches(labels.Set(metadata.GetLabels())) { - appendFn(m) - } - } - return nil - } - - items, err := indexer.Index(NamespaceIndex, api.ObjectMeta{Namespace: namespace}) - if err != nil { - // Ignore error; do slow search without index. - glog.Warningf("can not retrieve list of objects using index : %v", err) - for _, m := range indexer.List() { - metadata, err := meta.Accessor(m) - if err != nil { - return err - } - if metadata.GetNamespace() == namespace && selector.Matches(labels.Set(metadata.GetLabels())) { - appendFn(m) - } - - } - return nil - } - for _, m := range items { - metadata, err := meta.Accessor(m) - if err != nil { - return err - } - if selector.Matches(labels.Set(metadata.GetLabels())) { - appendFn(m) - } - } - - return nil -} - -// TODO: generate these classes and methods for all resources of interest using -// a script. Can use "go generate" once 1.4 is supported by all users. - -// NodeConditionPredicate is a function that indicates whether the given node's conditions meet -// some set of criteria defined by the function. -type NodeConditionPredicate func(node *api.Node) bool - -// StoreToNodeLister makes a Store have the List method of the client.NodeInterface -// The Store must contain (only) Nodes. -type StoreToNodeLister struct { - Store -} - -func (s *StoreToNodeLister) List() (machines api.NodeList, err error) { - for _, m := range s.Store.List() { - machines.Items = append(machines.Items, *(m.(*api.Node))) - } - return machines, nil -} - -// NodeCondition returns a storeToNodeConditionLister -func (s *StoreToNodeLister) NodeCondition(predicate NodeConditionPredicate) storeToNodeConditionLister { - // TODO: Move this filtering server side. Currently our selectors don't facilitate searching through a list so we - // have the reflector filter out the Unschedulable field and sift through node conditions in the lister. - return storeToNodeConditionLister{s.Store, predicate} -} - -// storeToNodeConditionLister filters and returns nodes matching the given type and status from the store. -type storeToNodeConditionLister struct { - store Store - predicate NodeConditionPredicate -} - -// List returns a list of nodes that match the conditions defined by the predicate functions in the storeToNodeConditionLister. -func (s storeToNodeConditionLister) List() (nodes []*api.Node, err error) { - for _, m := range s.store.List() { - node := m.(*api.Node) - if s.predicate(node) { - nodes = append(nodes, node) - } else { - glog.V(5).Infof("Node %s matches none of the conditions", node.Name) - } - } - return -} - -// StoreToDeploymentLister gives a store List and Exists methods. The store must contain only Deployments. -type StoreToDeploymentLister struct { - Indexer -} - -// Exists checks if the given deployment exists in the store. -func (s *StoreToDeploymentLister) Exists(deployment *extensions.Deployment) (bool, error) { - _, exists, err := s.Indexer.Get(deployment) - if err != nil { - return false, err - } - return exists, nil -} - -// StoreToDeploymentLister lists all deployments in the store. -// TODO: converge on the interface in pkg/client -func (s *StoreToDeploymentLister) List() (deployments []extensions.Deployment, err error) { - for _, c := range s.Indexer.List() { - deployments = append(deployments, *(c.(*extensions.Deployment))) - } - return deployments, nil -} - -// GetDeploymentsForReplicaSet returns a list of deployments managing a replica set. Returns an error only if no matching deployments are found. -func (s *StoreToDeploymentLister) GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) (deployments []extensions.Deployment, err error) { - if len(rs.Labels) == 0 { - err = fmt.Errorf("no deployments found for ReplicaSet %v because it has no labels", rs.Name) - return - } - - // TODO: MODIFY THIS METHOD so that it checks for the podTemplateSpecHash label - dList, err := s.Deployments(rs.Namespace).List(labels.Everything()) - if err != nil { - return - } - for _, d := range dList { - selector, err := unversioned.LabelSelectorAsSelector(d.Spec.Selector) - if err != nil { - return nil, fmt.Errorf("invalid label selector: %v", err) - } - // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(rs.Labels)) { - continue - } - deployments = append(deployments, d) - } - if len(deployments) == 0 { - err = fmt.Errorf("could not find deployments set for ReplicaSet %s in namespace %s with labels: %v", rs.Name, rs.Namespace, rs.Labels) - } - return -} - -type storeToDeploymentNamespacer struct { - indexer Indexer - namespace string -} - -// storeToDeploymentNamespacer lists deployments under its namespace in the store. -func (s storeToDeploymentNamespacer) List(selector labels.Selector) (deployments []extensions.Deployment, err error) { - if s.namespace == api.NamespaceAll { - for _, m := range s.indexer.List() { - d := *(m.(*extensions.Deployment)) - if selector.Matches(labels.Set(d.Labels)) { - deployments = append(deployments, d) - } - } - return - } - - key := &extensions.Deployment{ObjectMeta: api.ObjectMeta{Namespace: s.namespace}} - items, err := s.indexer.Index(NamespaceIndex, key) - if err != nil { - // Ignore error; do slow search without index. - glog.Warningf("can not retrieve list of objects using index : %v", err) - for _, m := range s.indexer.List() { - d := *(m.(*extensions.Deployment)) - if s.namespace == d.Namespace && selector.Matches(labels.Set(d.Labels)) { - deployments = append(deployments, d) - } - } - return deployments, nil - } - for _, m := range items { - d := *(m.(*extensions.Deployment)) - if selector.Matches(labels.Set(d.Labels)) { - deployments = append(deployments, d) - } - } - return -} - -func (s *StoreToDeploymentLister) Deployments(namespace string) storeToDeploymentNamespacer { - return storeToDeploymentNamespacer{s.Indexer, namespace} -} - -// GetDeploymentsForPods returns a list of deployments managing a pod. Returns an error only if no matching deployments are found. -func (s *StoreToDeploymentLister) GetDeploymentsForPod(pod *api.Pod) (deployments []extensions.Deployment, err error) { - if len(pod.Labels) == 0 { - err = fmt.Errorf("no deployments found for Pod %v because it has no labels", pod.Name) - return - } - - if len(pod.Labels[extensions.DefaultDeploymentUniqueLabelKey]) == 0 { - return - } - - dList, err := s.Deployments(pod.Namespace).List(labels.Everything()) - if err != nil { - return - } - for _, d := range dList { - selector, err := unversioned.LabelSelectorAsSelector(d.Spec.Selector) - if err != nil { - return nil, fmt.Errorf("invalid label selector: %v", err) - } - // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - deployments = append(deployments, d) - } - if len(deployments) == 0 { - err = fmt.Errorf("could not find deployments set for Pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} - -// StoreToReplicaSetLister gives a store List and Exists methods. The store must contain only ReplicaSets. -type StoreToReplicaSetLister struct { - Store -} - -// Exists checks if the given ReplicaSet exists in the store. -func (s *StoreToReplicaSetLister) Exists(rs *extensions.ReplicaSet) (bool, error) { - _, exists, err := s.Store.Get(rs) - if err != nil { - return false, err - } - return exists, nil -} - -// List lists all ReplicaSets in the store. -// TODO: converge on the interface in pkg/client -func (s *StoreToReplicaSetLister) List() (rss []extensions.ReplicaSet, err error) { - for _, rs := range s.Store.List() { - rss = append(rss, *(rs.(*extensions.ReplicaSet))) - } - return rss, nil -} - -type storeReplicaSetsNamespacer struct { - store Store - namespace string -} - -func (s storeReplicaSetsNamespacer) List(selector labels.Selector) (rss []extensions.ReplicaSet, err error) { - for _, c := range s.store.List() { - rs := *(c.(*extensions.ReplicaSet)) - if s.namespace == api.NamespaceAll || s.namespace == rs.Namespace { - if selector.Matches(labels.Set(rs.Labels)) { - rss = append(rss, rs) - } - } - } - return -} - -func (s storeReplicaSetsNamespacer) Get(name string) (*extensions.ReplicaSet, error) { - obj, exists, err := s.store.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(extensions.Resource("replicaset"), name) - } - return obj.(*extensions.ReplicaSet), nil -} - -func (s *StoreToReplicaSetLister) ReplicaSets(namespace string) storeReplicaSetsNamespacer { - return storeReplicaSetsNamespacer{s.Store, namespace} -} - -// GetPodReplicaSets returns a list of ReplicaSets managing a pod. Returns an error only if no matching ReplicaSets are found. -func (s *StoreToReplicaSetLister) GetPodReplicaSets(pod *api.Pod) (rss []extensions.ReplicaSet, err error) { - var selector labels.Selector - var rs extensions.ReplicaSet - - if len(pod.Labels) == 0 { - err = fmt.Errorf("no ReplicaSets found for pod %v because it has no labels", pod.Name) - return - } - - for _, m := range s.Store.List() { - rs = *m.(*extensions.ReplicaSet) - if rs.Namespace != pod.Namespace { - continue - } - selector, err = unversioned.LabelSelectorAsSelector(rs.Spec.Selector) - if err != nil { - err = fmt.Errorf("invalid selector: %v", err) - return - } - - // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - rss = append(rss, rs) - } - if len(rss) == 0 { - err = fmt.Errorf("could not find ReplicaSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} - -// StoreToDaemonSetLister gives a store List and Exists methods. The store must contain only DaemonSets. -type StoreToDaemonSetLister struct { - Store -} - -// Exists checks if the given daemon set exists in the store. -func (s *StoreToDaemonSetLister) Exists(ds *extensions.DaemonSet) (bool, error) { - _, exists, err := s.Store.Get(ds) - if err != nil { - return false, err - } - return exists, nil -} - -// List lists all daemon sets in the store. -// TODO: converge on the interface in pkg/client -func (s *StoreToDaemonSetLister) List() (dss extensions.DaemonSetList, err error) { - for _, c := range s.Store.List() { - dss.Items = append(dss.Items, *(c.(*extensions.DaemonSet))) - } - return dss, nil -} - -// GetPodDaemonSets returns a list of daemon sets managing a pod. -// Returns an error if and only if no matching daemon sets are found. -func (s *StoreToDaemonSetLister) GetPodDaemonSets(pod *api.Pod) (daemonSets []extensions.DaemonSet, err error) { - var selector labels.Selector - var daemonSet extensions.DaemonSet - - if len(pod.Labels) == 0 { - err = fmt.Errorf("no daemon sets found for pod %v because it has no labels", pod.Name) - return - } - - for _, m := range s.Store.List() { - daemonSet = *m.(*extensions.DaemonSet) - if daemonSet.Namespace != pod.Namespace { - continue - } - selector, err = unversioned.LabelSelectorAsSelector(daemonSet.Spec.Selector) - if err != nil { - // this should not happen if the DaemonSet passed validation - return nil, err - } - - // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - daemonSets = append(daemonSets, daemonSet) - } - if len(daemonSets) == 0 { - err = fmt.Errorf("could not find daemon set for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} - -// StoreToEndpointsLister makes a Store that lists endpoints. -type StoreToEndpointsLister struct { - Store -} - -// List lists all endpoints in the store. -func (s *StoreToEndpointsLister) List() (services api.EndpointsList, err error) { - for _, m := range s.Store.List() { - services.Items = append(services.Items, *(m.(*api.Endpoints))) - } - return services, nil -} - -// GetServiceEndpoints returns the endpoints of a service, matched on service name. -func (s *StoreToEndpointsLister) GetServiceEndpoints(svc *api.Service) (ep api.Endpoints, err error) { - for _, m := range s.Store.List() { - ep = *m.(*api.Endpoints) - if svc.Name == ep.Name && svc.Namespace == ep.Namespace { - return ep, nil - } - } - err = fmt.Errorf("could not find endpoints for service: %v", svc.Name) - return -} - -// StoreToJobLister gives a store List and Exists methods. The store must contain only Jobs. -type StoreToJobLister struct { - Store -} - -// Exists checks if the given job exists in the store. -func (s *StoreToJobLister) Exists(job *batch.Job) (bool, error) { - _, exists, err := s.Store.Get(job) - if err != nil { - return false, err - } - return exists, nil -} - -// StoreToJobLister lists all jobs in the store. -func (s *StoreToJobLister) List() (jobs batch.JobList, err error) { - for _, c := range s.Store.List() { - jobs.Items = append(jobs.Items, *(c.(*batch.Job))) - } - return jobs, nil -} - -// GetPodJobs returns a list of jobs managing a pod. Returns an error only if no matching jobs are found. -func (s *StoreToJobLister) GetPodJobs(pod *api.Pod) (jobs []batch.Job, err error) { - var selector labels.Selector - var job batch.Job - - if len(pod.Labels) == 0 { - err = fmt.Errorf("no jobs found for pod %v because it has no labels", pod.Name) - return - } - - for _, m := range s.Store.List() { - job = *m.(*batch.Job) - if job.Namespace != pod.Namespace { - continue - } - - selector, _ = unversioned.LabelSelectorAsSelector(job.Spec.Selector) - if !selector.Matches(labels.Set(pod.Labels)) { - continue - } - jobs = append(jobs, job) - } - if len(jobs) == 0 { - err = fmt.Errorf("could not find jobs for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} - -// Typed wrapper around a store of PersistentVolumes -type StoreToPVFetcher struct { - Store -} - -// GetPersistentVolumeInfo returns cached data for the PersistentVolume 'id'. -func (s *StoreToPVFetcher) GetPersistentVolumeInfo(id string) (*api.PersistentVolume, error) { - o, exists, err := s.Get(&api.PersistentVolume{ObjectMeta: api.ObjectMeta{Name: id}}) - - if err != nil { - return nil, fmt.Errorf("error retrieving PersistentVolume '%v' from cache: %v", id, err) - } - - if !exists { - return nil, fmt.Errorf("PersistentVolume '%v' not found", id) - } - - return o.(*api.PersistentVolume), nil -} - -// Typed wrapper around a store of PersistentVolumeClaims -type StoreToPVCFetcher struct { - Store -} - -// GetPersistentVolumeClaimInfo returns cached data for the PersistentVolumeClaim 'id'. -func (s *StoreToPVCFetcher) GetPersistentVolumeClaimInfo(namespace string, id string) (*api.PersistentVolumeClaim, error) { - o, exists, err := s.Get(&api.PersistentVolumeClaim{ObjectMeta: api.ObjectMeta{Namespace: namespace, Name: id}}) - if err != nil { - return nil, fmt.Errorf("error retrieving PersistentVolumeClaim '%s/%s' from cache: %v", namespace, id, err) - } - - if !exists { - return nil, fmt.Errorf("PersistentVolumeClaim '%s/%s' not found", namespace, id) - } - - return o.(*api.PersistentVolumeClaim), nil -} - -// StoreToPetSetLister gives a store List and Exists methods. The store must contain only PetSets. -type StoreToPetSetLister struct { - Store -} - -// Exists checks if the given PetSet exists in the store. -func (s *StoreToPetSetLister) Exists(ps *apps.PetSet) (bool, error) { - _, exists, err := s.Store.Get(ps) - if err != nil { - return false, err - } - return exists, nil -} - -// List lists all PetSets in the store. -func (s *StoreToPetSetLister) List() (psList []apps.PetSet, err error) { - for _, ps := range s.Store.List() { - psList = append(psList, *(ps.(*apps.PetSet))) - } - return psList, nil -} - -type storePetSetsNamespacer struct { - store Store - namespace string -} - -func (s *StoreToPetSetLister) PetSets(namespace string) storePetSetsNamespacer { - return storePetSetsNamespacer{s.Store, namespace} -} - -// GetPodPetSets returns a list of PetSets managing a pod. Returns an error only if no matching PetSets are found. -func (s *StoreToPetSetLister) GetPodPetSets(pod *api.Pod) (psList []apps.PetSet, err error) { - var selector labels.Selector - var ps apps.PetSet - - if len(pod.Labels) == 0 { - err = fmt.Errorf("no PetSets found for pod %v because it has no labels", pod.Name) - return - } - - for _, m := range s.Store.List() { - ps = *m.(*apps.PetSet) - if ps.Namespace != pod.Namespace { - continue - } - selector, err = unversioned.LabelSelectorAsSelector(ps.Spec.Selector) - if err != nil { - err = fmt.Errorf("invalid selector: %v", err) - return - } - - // If a PetSet with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - psList = append(psList, ps) - } - if len(psList) == 0 { - err = fmt.Errorf("could not find PetSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} - -// StoreToCertificateRequestLister gives a store List and Exists methods. The store must contain only CertificateRequests. -type StoreToCertificateRequestLister struct { - Store -} - -// Exists checks if the given csr exists in the store. -func (s *StoreToCertificateRequestLister) Exists(csr *certificates.CertificateSigningRequest) (bool, error) { - _, exists, err := s.Store.Get(csr) - if err != nil { - return false, err - } - return exists, nil -} - -// StoreToCertificateRequestLister lists all csrs in the store. -func (s *StoreToCertificateRequestLister) List() (csrs certificates.CertificateSigningRequestList, err error) { - for _, c := range s.Store.List() { - csrs.Items = append(csrs.Items, *(c.(*certificates.CertificateSigningRequest))) - } - return csrs, nil -} - -// IndexerToNamespaceLister gives an Indexer List method -type IndexerToNamespaceLister struct { - Indexer -} - -// List returns a list of namespaces -func (i *IndexerToNamespaceLister) List(selector labels.Selector) (namespaces []*api.Namespace, err error) { - for _, m := range i.Indexer.List() { - namespace := m.(*api.Namespace) - if selector.Matches(labels.Set(namespace.Labels)) { - namespaces = append(namespaces, namespace) - } - } - - return namespaces, nil -} - -type StoreToPodDisruptionBudgetLister struct { - Store -} - -// GetPodPodDisruptionBudgets returns a list of PodDisruptionBudgets matching a pod. Returns an error only if no matching PodDisruptionBudgets are found. -func (s *StoreToPodDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *api.Pod) (pdbList []policy.PodDisruptionBudget, err error) { - var selector labels.Selector - - if len(pod.Labels) == 0 { - err = fmt.Errorf("no PodDisruptionBudgets found for pod %v because it has no labels", pod.Name) - return - } - - for _, m := range s.Store.List() { - pdb, ok := m.(*policy.PodDisruptionBudget) - if !ok { - glog.Errorf("Unexpected: %v is not a PodDisruptionBudget", m) - continue - } - if pdb.Namespace != pod.Namespace { - continue - } - selector, err = unversioned.LabelSelectorAsSelector(pdb.Spec.Selector) - if err != nil { - glog.Warningf("invalid selector: %v", err) - // TODO(mml): add an event to the PDB - continue - } - - // If a PDB with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - pdbList = append(pdbList, *pdb) - } - if len(pdbList) == 0 { - err = fmt.Errorf("could not find PodDisruptionBudget for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/listers_core.go b/vendor/k8s.io/client-go/1.5/tools/cache/listers_core.go deleted file mode 100644 index 854c2a2ca..000000000 --- a/vendor/k8s.io/client-go/1.5/tools/cache/listers_core.go +++ /dev/null @@ -1,205 +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 cache - -import ( - "fmt" - - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/errors" - "k8s.io/client-go/1.5/pkg/labels" -) - -// TODO: generate these classes and methods for all resources of interest using -// a script. Can use "go generate" once 1.4 is supported by all users. - -// Lister makes an Index have the List method. The Stores must contain only the expected type -// Example: -// s := cache.NewStore() -// lw := cache.ListWatch{Client: c, FieldSelector: sel, Resource: "pods"} -// r := cache.NewReflector(lw, &api.Pod{}, s).Run() -// l := StoreToPodLister{s} -// l.List() - -// StoreToPodLister helps list pods -type StoreToPodLister struct { - Indexer Indexer -} - -func (s *StoreToPodLister) List(selector labels.Selector) (ret []*api.Pod, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { - ret = append(ret, m.(*api.Pod)) - }) - return ret, err -} - -func (s *StoreToPodLister) Pods(namespace string) storePodsNamespacer { - return storePodsNamespacer{Indexer: s.Indexer, namespace: namespace} -} - -type storePodsNamespacer struct { - Indexer Indexer - namespace string -} - -func (s storePodsNamespacer) List(selector labels.Selector) (ret []*api.Pod, err error) { - err = ListAllByNamespace(s.Indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*api.Pod)) - }) - return ret, err -} - -func (s storePodsNamespacer) Get(name string) (*api.Pod, error) { - obj, exists, err := s.Indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(api.Resource("pod"), name) - } - return obj.(*api.Pod), nil -} - -// StoreToServiceLister helps list services -type StoreToServiceLister struct { - Indexer Indexer -} - -func (s *StoreToServiceLister) List(selector labels.Selector) (ret []*api.Service, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { - ret = append(ret, m.(*api.Service)) - }) - return ret, err -} - -func (s *StoreToServiceLister) Services(namespace string) storeServicesNamespacer { - return storeServicesNamespacer{s.Indexer, namespace} -} - -type storeServicesNamespacer struct { - indexer Indexer - namespace string -} - -func (s storeServicesNamespacer) List(selector labels.Selector) (ret []*api.Service, err error) { - err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*api.Service)) - }) - return ret, err -} - -func (s storeServicesNamespacer) Get(name string) (*api.Service, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(api.Resource("service"), name) - } - return obj.(*api.Service), nil -} - -// TODO: Move this back to scheduler as a helper function that takes a Store, -// rather than a method of StoreToServiceLister. -func (s *StoreToServiceLister) GetPodServices(pod *api.Pod) (services []*api.Service, err error) { - allServices, err := s.Services(pod.Namespace).List(labels.Everything()) - if err != nil { - return nil, err - } - - for i := range allServices { - service := allServices[i] - if service.Spec.Selector == nil { - // services with nil selectors match nothing, not everything. - continue - } - selector := labels.Set(service.Spec.Selector).AsSelectorPreValidated() - if selector.Matches(labels.Set(pod.Labels)) { - services = append(services, service) - } - } - - return services, nil -} - -// StoreToReplicationControllerLister helps list rcs -type StoreToReplicationControllerLister struct { - Indexer Indexer -} - -func (s *StoreToReplicationControllerLister) List(selector labels.Selector) (ret []*api.ReplicationController, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { - ret = append(ret, m.(*api.ReplicationController)) - }) - return ret, err -} - -func (s *StoreToReplicationControllerLister) ReplicationControllers(namespace string) storeReplicationControllersNamespacer { - return storeReplicationControllersNamespacer{s.Indexer, namespace} -} - -type storeReplicationControllersNamespacer struct { - indexer Indexer - namespace string -} - -func (s storeReplicationControllersNamespacer) List(selector labels.Selector) (ret []*api.ReplicationController, err error) { - err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*api.ReplicationController)) - }) - return ret, err -} - -func (s storeReplicationControllersNamespacer) Get(name string) (*api.ReplicationController, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(api.Resource("replicationcontroller"), name) - } - return obj.(*api.ReplicationController), nil -} - -// GetPodControllers returns a list of replication controllers managing a pod. Returns an error only if no matching controllers are found. -func (s *StoreToReplicationControllerLister) GetPodControllers(pod *api.Pod) (controllers []*api.ReplicationController, err error) { - if len(pod.Labels) == 0 { - err = fmt.Errorf("no controllers found for pod %v because it has no labels", pod.Name) - return - } - - key := &api.ReplicationController{ObjectMeta: api.ObjectMeta{Namespace: pod.Namespace}} - items, err := s.Indexer.Index(NamespaceIndex, key) - if err != nil { - return - } - - for _, m := range items { - rc := m.(*api.ReplicationController) - selector := labels.Set(rc.Spec.Selector).AsSelectorPreValidated() - - // If an rc with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - controllers = append(controllers, rc) - } - if len(controllers) == 0 { - err = fmt.Errorf("could not find controller for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/listwatch.go b/vendor/k8s.io/client-go/1.5/tools/cache/listwatch.go deleted file mode 100644 index 4790c9c5c..000000000 --- a/vendor/k8s.io/client-go/1.5/tools/cache/listwatch.go +++ /dev/null @@ -1,86 +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 cache - -import ( - "time" - - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/fields" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/watch" - "k8s.io/client-go/1.5/rest" -) - -// ListFunc knows how to list resources -type ListFunc func(options api.ListOptions) (runtime.Object, error) - -// WatchFunc knows how to watch resources -type WatchFunc func(options api.ListOptions) (watch.Interface, error) - -// ListWatch knows how to list and watch a set of apiserver resources. It satisfies the ListerWatcher interface. -// It is a convenience function for users of NewReflector, etc. -// ListFunc and WatchFunc must not be nil -type ListWatch struct { - ListFunc ListFunc - WatchFunc WatchFunc -} - -// Getter interface knows how to access Get method from RESTClient. -type Getter interface { - Get() *rest.Request -} - -// NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector. -func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSelector fields.Selector) *ListWatch { - listFunc := func(options api.ListOptions) (runtime.Object, error) { - return c.Get(). - Namespace(namespace). - Resource(resource). - VersionedParams(&options, api.ParameterCodec). - FieldsSelectorParam(fieldSelector). - Do(). - Get() - } - watchFunc := func(options api.ListOptions) (watch.Interface, error) { - return c.Get(). - Prefix("watch"). - Namespace(namespace). - Resource(resource). - VersionedParams(&options, api.ParameterCodec). - FieldsSelectorParam(fieldSelector). - Watch() - } - return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc} -} - -func timeoutFromListOptions(options api.ListOptions) time.Duration { - if options.TimeoutSeconds != nil { - return time.Duration(*options.TimeoutSeconds) * time.Second - } - return 0 -} - -// List a set of apiserver resources -func (lw *ListWatch) List(options api.ListOptions) (runtime.Object, error) { - return lw.ListFunc(options) -} - -// Watch a set of apiserver resources -func (lw *ListWatch) Watch(options api.ListOptions) (watch.Interface, error) { - return lw.WatchFunc(options) -} diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/shared_informer.go b/vendor/k8s.io/client-go/1.5/tools/cache/shared_informer.go deleted file mode 100644 index ffa6a919a..000000000 --- a/vendor/k8s.io/client-go/1.5/tools/cache/shared_informer.go +++ /dev/null @@ -1,413 +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 cache - -import ( - "fmt" - "sync" - "time" - - "k8s.io/client-go/1.5/pkg/runtime" - utilruntime "k8s.io/client-go/1.5/pkg/util/runtime" - "k8s.io/client-go/1.5/pkg/util/wait" - - "github.com/golang/glog" -) - -// if you use this, there is one behavior change compared to a standard Informer. -// When you receive a notification, the cache will be AT LEAST as fresh as the -// notification, but it MAY be more fresh. You should NOT depend on the contents -// of the cache exactly matching the notification you've received in handler -// functions. If there was a create, followed by a delete, the cache may NOT -// have your item. This has advantages over the broadcaster since it allows us -// to share a common cache across many controllers. Extending the broadcaster -// would have required us keep duplicate caches for each watch. -type SharedInformer interface { - // events to a single handler are delivered sequentially, but there is no coordination between different handlers - // You may NOT add a handler *after* the SharedInformer is running. That will result in an error being returned. - // TODO we should try to remove this restriction eventually. - AddEventHandler(handler ResourceEventHandler) error - GetStore() Store - // GetController gives back a synthetic interface that "votes" to start the informer - GetController() ControllerInterface - Run(stopCh <-chan struct{}) - HasSynced() bool - LastSyncResourceVersion() string -} - -type SharedIndexInformer interface { - SharedInformer - // AddIndexers add indexers to the informer before it starts. - AddIndexers(indexers Indexers) error - GetIndexer() Indexer -} - -// NewSharedInformer creates a new instance for the listwatcher. -// TODO: create a cache/factory of these at a higher level for the list all, watch all of a given resource that can -// be shared amongst all consumers. -func NewSharedInformer(lw ListerWatcher, objType runtime.Object, resyncPeriod time.Duration) SharedInformer { - return NewSharedIndexInformer(lw, objType, resyncPeriod, Indexers{}) -} - -// NewSharedIndexInformer creates a new instance for the listwatcher. -// TODO: create a cache/factory of these at a higher level for the list all, watch all of a given resource that can -// be shared amongst all consumers. -func NewSharedIndexInformer(lw ListerWatcher, objType runtime.Object, resyncPeriod time.Duration, indexers Indexers) SharedIndexInformer { - sharedIndexInformer := &sharedIndexInformer{ - processor: &sharedProcessor{}, - indexer: NewIndexer(DeletionHandlingMetaNamespaceKeyFunc, indexers), - listerWatcher: lw, - objectType: objType, - fullResyncPeriod: resyncPeriod, - } - return sharedIndexInformer -} - -// InformerSynced is a function that can be used to determine if an informer has synced. This is useful for determining if caches have synced. -type InformerSynced func() bool - -// syncedPollPeriod controls how often you look at the status of your sync funcs -const syncedPollPeriod = 100 * time.Millisecond - -// WaitForCacheSync waits for caches to populate. It returns true if it was successful, false -// if the contoller should shutdown -func WaitForCacheSync(stopCh <-chan struct{}, cacheSyncs ...InformerSynced) bool { - err := wait.PollUntil(syncedPollPeriod, - func() (bool, error) { - for _, syncFunc := range cacheSyncs { - if !syncFunc() { - return false, nil - } - } - return true, nil - }, - stopCh) - if err != nil { - glog.V(2).Infof("stop requested") - return false - } - - glog.V(4).Infof("caches populated") - return true -} - -type sharedIndexInformer struct { - indexer Indexer - controller *Controller - - processor *sharedProcessor - - // This block is tracked to handle late initialization of the controller - listerWatcher ListerWatcher - objectType runtime.Object - fullResyncPeriod time.Duration - - started bool - startedLock sync.Mutex - - // blockDeltas gives a way to stop all event distribution so that a late event handler - // can safely join the shared informer. - blockDeltas sync.Mutex - // stopCh is the channel used to stop the main Run process. We have to track it so that - // late joiners can have a proper stop - stopCh <-chan struct{} -} - -// dummyController hides the fact that a SharedInformer is different from a dedicated one -// where a caller can `Run`. The run method is disonnected in this case, because higher -// level logic will decide when to start the SharedInformer and related controller. -// Because returning information back is always asynchronous, the legacy callers shouldn't -// notice any change in behavior. -type dummyController struct { - informer *sharedIndexInformer -} - -func (v *dummyController) Run(stopCh <-chan struct{}) { -} - -func (v *dummyController) HasSynced() bool { - return v.informer.HasSynced() -} - -type updateNotification struct { - oldObj interface{} - newObj interface{} -} - -type addNotification struct { - newObj interface{} -} - -type deleteNotification struct { - oldObj interface{} -} - -func (s *sharedIndexInformer) Run(stopCh <-chan struct{}) { - defer utilruntime.HandleCrash() - - fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, nil, s.indexer) - - cfg := &Config{ - Queue: fifo, - ListerWatcher: s.listerWatcher, - ObjectType: s.objectType, - FullResyncPeriod: s.fullResyncPeriod, - RetryOnError: false, - - Process: s.HandleDeltas, - } - - func() { - s.startedLock.Lock() - defer s.startedLock.Unlock() - - s.controller = New(cfg) - s.started = true - }() - - s.stopCh = stopCh - s.processor.run(stopCh) - s.controller.Run(stopCh) -} - -func (s *sharedIndexInformer) isStarted() bool { - s.startedLock.Lock() - defer s.startedLock.Unlock() - return s.started -} - -func (s *sharedIndexInformer) HasSynced() bool { - s.startedLock.Lock() - defer s.startedLock.Unlock() - - if s.controller == nil { - return false - } - return s.controller.HasSynced() -} - -func (s *sharedIndexInformer) LastSyncResourceVersion() string { - s.startedLock.Lock() - defer s.startedLock.Unlock() - - if s.controller == nil { - return "" - } - return s.controller.reflector.LastSyncResourceVersion() -} - -func (s *sharedIndexInformer) GetStore() Store { - return s.indexer -} - -func (s *sharedIndexInformer) GetIndexer() Indexer { - return s.indexer -} - -func (s *sharedIndexInformer) AddIndexers(indexers Indexers) error { - s.startedLock.Lock() - defer s.startedLock.Unlock() - - if s.started { - return fmt.Errorf("informer has already started") - } - - return s.indexer.AddIndexers(indexers) -} - -func (s *sharedIndexInformer) GetController() ControllerInterface { - return &dummyController{informer: s} -} - -func (s *sharedIndexInformer) AddEventHandler(handler ResourceEventHandler) error { - s.startedLock.Lock() - defer s.startedLock.Unlock() - - if !s.started { - listener := newProcessListener(handler) - s.processor.listeners = append(s.processor.listeners, listener) - return nil - } - - // in order to safely join, we have to - // 1. stop sending add/update/delete notifications - // 2. do a list against the store - // 3. send synthetic "Add" events to the new handler - // 4. unblock - s.blockDeltas.Lock() - defer s.blockDeltas.Unlock() - - listener := newProcessListener(handler) - s.processor.listeners = append(s.processor.listeners, listener) - - go listener.run(s.stopCh) - go listener.pop(s.stopCh) - - items := s.indexer.List() - for i := range items { - listener.add(addNotification{newObj: items[i]}) - } - - return nil -} - -func (s *sharedIndexInformer) HandleDeltas(obj interface{}) error { - s.blockDeltas.Lock() - defer s.blockDeltas.Unlock() - - // from oldest to newest - for _, d := range obj.(Deltas) { - switch d.Type { - case Sync, Added, Updated: - if old, exists, err := s.indexer.Get(d.Object); err == nil && exists { - if err := s.indexer.Update(d.Object); err != nil { - return err - } - s.processor.distribute(updateNotification{oldObj: old, newObj: d.Object}) - } else { - if err := s.indexer.Add(d.Object); err != nil { - return err - } - s.processor.distribute(addNotification{newObj: d.Object}) - } - case Deleted: - if err := s.indexer.Delete(d.Object); err != nil { - return err - } - s.processor.distribute(deleteNotification{oldObj: d.Object}) - } - } - return nil -} - -type sharedProcessor struct { - listeners []*processorListener -} - -func (p *sharedProcessor) distribute(obj interface{}) { - for _, listener := range p.listeners { - listener.add(obj) - } -} - -func (p *sharedProcessor) run(stopCh <-chan struct{}) { - for _, listener := range p.listeners { - go listener.run(stopCh) - go listener.pop(stopCh) - } -} - -type processorListener struct { - // lock/cond protects access to 'pendingNotifications'. - lock sync.RWMutex - cond sync.Cond - - // pendingNotifications is an unbounded slice that holds all notifications not yet distributed - // there is one per listener, but a failing/stalled listener will have infinite pendingNotifications - // added until we OOM. - // TODO This is no worse that before, since reflectors were backed by unbounded DeltaFIFOs, but - // we should try to do something better - pendingNotifications []interface{} - - nextCh chan interface{} - - handler ResourceEventHandler -} - -func newProcessListener(handler ResourceEventHandler) *processorListener { - ret := &processorListener{ - pendingNotifications: []interface{}{}, - nextCh: make(chan interface{}), - handler: handler, - } - - ret.cond.L = &ret.lock - return ret -} - -func (p *processorListener) add(notification interface{}) { - p.lock.Lock() - defer p.lock.Unlock() - - p.pendingNotifications = append(p.pendingNotifications, notification) - p.cond.Broadcast() -} - -func (p *processorListener) pop(stopCh <-chan struct{}) { - defer utilruntime.HandleCrash() - - for { - blockingGet := func() (interface{}, bool) { - p.lock.Lock() - defer p.lock.Unlock() - - for len(p.pendingNotifications) == 0 { - // check if we're shutdown - select { - case <-stopCh: - return nil, true - default: - } - p.cond.Wait() - } - - nt := p.pendingNotifications[0] - p.pendingNotifications = p.pendingNotifications[1:] - return nt, false - } - - notification, stopped := blockingGet() - if stopped { - return - } - - select { - case <-stopCh: - return - case p.nextCh <- notification: - } - } -} - -func (p *processorListener) run(stopCh <-chan struct{}) { - defer utilruntime.HandleCrash() - - for { - var next interface{} - select { - case <-stopCh: - func() { - p.lock.Lock() - defer p.lock.Unlock() - p.cond.Broadcast() - }() - return - case next = <-p.nextCh: - } - - switch notification := next.(type) { - case updateNotification: - p.handler.OnUpdate(notification.oldObj, notification.newObj) - case addNotification: - p.handler.OnAdd(notification.newObj) - case deleteNotification: - p.handler.OnDelete(notification.oldObj) - default: - utilruntime.HandleError(fmt.Errorf("unrecognized notification: %#v", next)) - } - } -} diff --git a/vendor/k8s.io/client-go/discovery/discovery_client.go b/vendor/k8s.io/client-go/discovery/discovery_client.go new file mode 100644 index 000000000..ff4c57a4f --- /dev/null +++ b/vendor/k8s.io/client-go/discovery/discovery_client.go @@ -0,0 +1,439 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package discovery + +import ( + "encoding/json" + "fmt" + "net/url" + "sort" + "strings" + + "github.com/emicklei/go-restful/swagger" + + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/version" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/api/v1" + restclient "k8s.io/client-go/rest" +) + +// defaultRetries is the number of times a resource discovery is repeated if an api group disappears on the fly (e.g. ThirdPartyResources). +const defaultRetries = 2 + +// DiscoveryInterface holds the methods that discover server-supported API groups, +// versions and resources. +type DiscoveryInterface interface { + RESTClient() restclient.Interface + ServerGroupsInterface + ServerResourcesInterface + ServerVersionInterface + SwaggerSchemaInterface +} + +// CachedDiscoveryInterface is a DiscoveryInterface with cache invalidation and freshness. +type CachedDiscoveryInterface interface { + DiscoveryInterface + // Fresh returns true if no cached data was used that had been retrieved before the instantiation. + Fresh() bool + // Invalidate enforces that no cached data is used in the future that is older than the current time. + Invalidate() +} + +// ServerGroupsInterface has methods for obtaining supported groups on the API server +type ServerGroupsInterface interface { + // ServerGroups returns the supported groups, with information like supported versions and the + // preferred version. + ServerGroups() (*metav1.APIGroupList, error) +} + +// ServerResourcesInterface has methods for obtaining supported resources on the API server +type ServerResourcesInterface interface { + // ServerResourcesForGroupVersion returns the supported resources for a group and version. + ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) + // ServerResources returns the supported resources for all groups and versions. + ServerResources() ([]*metav1.APIResourceList, error) + // ServerPreferredResources returns the supported resources with the version preferred by the + // server. + ServerPreferredResources() ([]*metav1.APIResourceList, error) + // ServerPreferredNamespacedResources returns the supported namespaced resources with the + // version preferred by the server. + ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) +} + +// ServerVersionInterface has a method for retrieving the server's version. +type ServerVersionInterface interface { + // ServerVersion retrieves and parses the server's version (git version). + ServerVersion() (*version.Info, error) +} + +// SwaggerSchemaInterface has a method to retrieve the swagger schema. +type SwaggerSchemaInterface interface { + // SwaggerSchema retrieves and parses the swagger API schema the server supports. + SwaggerSchema(version schema.GroupVersion) (*swagger.ApiDeclaration, error) +} + +// DiscoveryClient implements the functions that discover server-supported API groups, +// versions and resources. +type DiscoveryClient struct { + restClient restclient.Interface + + LegacyPrefix string +} + +// Convert metav1.APIVersions to metav1.APIGroup. APIVersions is used by legacy v1, so +// group would be "". +func apiVersionsToAPIGroup(apiVersions *metav1.APIVersions) (apiGroup metav1.APIGroup) { + groupVersions := []metav1.GroupVersionForDiscovery{} + for _, version := range apiVersions.Versions { + groupVersion := metav1.GroupVersionForDiscovery{ + GroupVersion: version, + Version: version, + } + groupVersions = append(groupVersions, groupVersion) + } + apiGroup.Versions = groupVersions + // There should be only one groupVersion returned at /api + apiGroup.PreferredVersion = groupVersions[0] + return +} + +// ServerGroups returns the supported groups, with information like supported versions and the +// preferred version. +func (d *DiscoveryClient) ServerGroups() (apiGroupList *metav1.APIGroupList, err error) { + // Get the groupVersions exposed at /api + v := &metav1.APIVersions{} + err = d.restClient.Get().AbsPath(d.LegacyPrefix).Do().Into(v) + apiGroup := metav1.APIGroup{} + if err == nil && len(v.Versions) != 0 { + apiGroup = apiVersionsToAPIGroup(v) + } + if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) { + return nil, err + } + + // Get the groupVersions exposed at /apis + apiGroupList = &metav1.APIGroupList{} + err = d.restClient.Get().AbsPath("/apis").Do().Into(apiGroupList) + if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) { + return nil, err + } + // to be compatible with a v1.0 server, if it's a 403 or 404, ignore and return whatever we got from /api + if err != nil && (errors.IsNotFound(err) || errors.IsForbidden(err)) { + apiGroupList = &metav1.APIGroupList{} + } + + // append the group retrieved from /api to the list if not empty + if len(v.Versions) != 0 { + apiGroupList.Groups = append(apiGroupList.Groups, apiGroup) + } + return apiGroupList, nil +} + +// ServerResourcesForGroupVersion returns the supported resources for a group and version. +func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (resources *metav1.APIResourceList, err error) { + url := url.URL{} + if len(groupVersion) == 0 { + return nil, fmt.Errorf("groupVersion shouldn't be empty") + } + if len(d.LegacyPrefix) > 0 && groupVersion == "v1" { + url.Path = d.LegacyPrefix + "/" + groupVersion + } else { + url.Path = "/apis/" + groupVersion + } + resources = &metav1.APIResourceList{ + GroupVersion: groupVersion, + } + err = d.restClient.Get().AbsPath(url.String()).Do().Into(resources) + if err != nil { + // ignore 403 or 404 error to be compatible with an v1.0 server. + if groupVersion == "v1" && (errors.IsNotFound(err) || errors.IsForbidden(err)) { + return resources, nil + } + return nil, err + } + return resources, nil +} + +// serverResources returns the supported resources for all groups and versions. +func (d *DiscoveryClient) serverResources(failEarly bool) ([]*metav1.APIResourceList, error) { + apiGroups, err := d.ServerGroups() + if err != nil { + return nil, err + } + + result := []*metav1.APIResourceList{} + failedGroups := make(map[schema.GroupVersion]error) + + for _, apiGroup := range apiGroups.Groups { + for _, version := range apiGroup.Versions { + gv := schema.GroupVersion{Group: apiGroup.Name, Version: version.Version} + resources, err := d.ServerResourcesForGroupVersion(version.GroupVersion) + if err != nil { + // TODO: maybe restrict this to NotFound errors + failedGroups[gv] = err + if failEarly { + return nil, &ErrGroupDiscoveryFailed{Groups: failedGroups} + } + continue + } + + result = append(result, resources) + } + } + + if len(failedGroups) == 0 { + return result, nil + } + + return result, &ErrGroupDiscoveryFailed{Groups: failedGroups} +} + +// ServerResources returns the supported resources for all groups and versions. +func (d *DiscoveryClient) ServerResources() ([]*metav1.APIResourceList, error) { + return withRetries(defaultRetries, d.serverResources) +} + +// ErrGroupDiscoveryFailed is returned if one or more API groups fail to load. +type ErrGroupDiscoveryFailed struct { + // Groups is a list of the groups that failed to load and the error cause + Groups map[schema.GroupVersion]error +} + +// Error implements the error interface +func (e *ErrGroupDiscoveryFailed) Error() string { + var groups []string + for k, v := range e.Groups { + groups = append(groups, fmt.Sprintf("%s: %v", k, v)) + } + sort.Strings(groups) + return fmt.Sprintf("unable to retrieve the complete list of server APIs: %s", strings.Join(groups, ", ")) +} + +// IsGroupDiscoveryFailedError returns true if the provided error indicates the server was unable to discover +// a complete list of APIs for the client to use. +func IsGroupDiscoveryFailedError(err error) bool { + _, ok := err.(*ErrGroupDiscoveryFailed) + return err != nil && ok +} + +// serverPreferredResources returns the supported resources with the version preferred by the server. +func (d *DiscoveryClient) serverPreferredResources(failEarly bool) ([]*metav1.APIResourceList, error) { + serverGroupList, err := d.ServerGroups() + if err != nil { + return nil, err + } + + result := []*metav1.APIResourceList{} + failedGroups := make(map[schema.GroupVersion]error) + + grVersions := map[schema.GroupResource]string{} // selected version of a GroupResource + grApiResources := map[schema.GroupResource]*metav1.APIResource{} // selected APIResource for a GroupResource + gvApiResourceLists := map[schema.GroupVersion]*metav1.APIResourceList{} // blueprint for a APIResourceList for later grouping + + for _, apiGroup := range serverGroupList.Groups { + for _, version := range apiGroup.Versions { + groupVersion := schema.GroupVersion{Group: apiGroup.Name, Version: version.Version} + apiResourceList, err := d.ServerResourcesForGroupVersion(version.GroupVersion) + if err != nil { + // TODO: maybe restrict this to NotFound errors + failedGroups[groupVersion] = err + if failEarly { + return nil, &ErrGroupDiscoveryFailed{Groups: failedGroups} + } + continue + } + + // create empty list which is filled later in another loop + emptyApiResourceList := metav1.APIResourceList{ + GroupVersion: version.GroupVersion, + } + gvApiResourceLists[groupVersion] = &emptyApiResourceList + result = append(result, &emptyApiResourceList) + + for i := range apiResourceList.APIResources { + apiResource := &apiResourceList.APIResources[i] + if strings.Contains(apiResource.Name, "/") { + continue + } + gv := schema.GroupResource{Group: apiGroup.Name, Resource: apiResource.Name} + if _, ok := grApiResources[gv]; ok && version.Version != apiGroup.PreferredVersion.Version { + // only override with preferred version + continue + } + grVersions[gv] = version.Version + grApiResources[gv] = apiResource + } + } + } + + // group selected APIResources according to GroupVersion into APIResourceLists + for groupResource, apiResource := range grApiResources { + version := grVersions[groupResource] + groupVersion := schema.GroupVersion{Group: groupResource.Group, Version: version} + apiResourceList := gvApiResourceLists[groupVersion] + apiResourceList.APIResources = append(apiResourceList.APIResources, *apiResource) + } + + if len(failedGroups) == 0 { + return result, nil + } + + return result, &ErrGroupDiscoveryFailed{Groups: failedGroups} +} + +// ServerPreferredResources returns the supported resources with the version preferred by the +// server. +func (d *DiscoveryClient) ServerPreferredResources() ([]*metav1.APIResourceList, error) { + return withRetries(defaultRetries, func(retryEarly bool) ([]*metav1.APIResourceList, error) { + return d.serverPreferredResources(retryEarly) + }) +} + +// ServerPreferredNamespacedResources returns the supported namespaced resources with the +// version preferred by the server. +func (d *DiscoveryClient) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) { + all, err := d.ServerPreferredResources() + return FilteredBy(ResourcePredicateFunc(func(groupVersion string, r *metav1.APIResource) bool { + return r.Namespaced + }), all), err +} + +// ServerVersion retrieves and parses the server's version (git version). +func (d *DiscoveryClient) ServerVersion() (*version.Info, error) { + body, err := d.restClient.Get().AbsPath("/version").Do().Raw() + if err != nil { + return nil, err + } + var info version.Info + err = json.Unmarshal(body, &info) + if err != nil { + return nil, fmt.Errorf("got '%s': %v", string(body), err) + } + return &info, nil +} + +// SwaggerSchema retrieves and parses the swagger API schema the server supports. +func (d *DiscoveryClient) SwaggerSchema(version schema.GroupVersion) (*swagger.ApiDeclaration, error) { + if version.Empty() { + return nil, fmt.Errorf("groupVersion cannot be empty") + } + + groupList, err := d.ServerGroups() + if err != nil { + return nil, err + } + groupVersions := metav1.ExtractGroupVersions(groupList) + // This check also takes care the case that kubectl is newer than the running endpoint + if stringDoesntExistIn(version.String(), groupVersions) { + return nil, fmt.Errorf("API version: %v is not supported by the server. Use one of: %v", version, groupVersions) + } + var path string + if len(d.LegacyPrefix) > 0 && version == v1.SchemeGroupVersion { + path = "/swaggerapi" + d.LegacyPrefix + "/" + version.Version + } else { + path = "/swaggerapi/apis/" + version.Group + "/" + version.Version + } + + body, err := d.restClient.Get().AbsPath(path).Do().Raw() + if err != nil { + return nil, err + } + var schema swagger.ApiDeclaration + err = json.Unmarshal(body, &schema) + if err != nil { + return nil, fmt.Errorf("got '%s': %v", string(body), err) + } + return &schema, nil +} + +// withRetries retries the given recovery function in case the groups supported by the server change after ServerGroup() returns. +func withRetries(maxRetries int, f func(failEarly bool) ([]*metav1.APIResourceList, error)) ([]*metav1.APIResourceList, error) { + var result []*metav1.APIResourceList + var err error + for i := 0; i < maxRetries; i++ { + failEarly := i < maxRetries-1 + result, err = f(failEarly) + if err == nil { + return result, nil + } + if _, ok := err.(*ErrGroupDiscoveryFailed); !ok { + return nil, err + } + } + return result, err +} + +func setDiscoveryDefaults(config *restclient.Config) error { + config.APIPath = "" + config.GroupVersion = nil + codec := runtime.NoopEncoder{Decoder: api.Codecs.UniversalDecoder()} + config.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: codec}) + if len(config.UserAgent) == 0 { + config.UserAgent = restclient.DefaultKubernetesUserAgent() + } + return nil +} + +// NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. This client +// can be used to discover supported resources in the API server. +func NewDiscoveryClientForConfig(c *restclient.Config) (*DiscoveryClient, error) { + config := *c + if err := setDiscoveryDefaults(&config); err != nil { + return nil, err + } + client, err := restclient.UnversionedRESTClientFor(&config) + return &DiscoveryClient{restClient: client, LegacyPrefix: "/api"}, err +} + +// NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. If +// there is an error, it panics. +func NewDiscoveryClientForConfigOrDie(c *restclient.Config) *DiscoveryClient { + client, err := NewDiscoveryClientForConfig(c) + if err != nil { + panic(err) + } + return client + +} + +// New creates a new DiscoveryClient for the given RESTClient. +func NewDiscoveryClient(c restclient.Interface) *DiscoveryClient { + return &DiscoveryClient{restClient: c, LegacyPrefix: "/api"} +} + +func stringDoesntExistIn(str string, slice []string) bool { + for _, s := range slice { + if s == str { + return false + } + } + return true +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *DiscoveryClient) RESTClient() restclient.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/discovery/helper.go b/vendor/k8s.io/client-go/discovery/helper.go new file mode 100644 index 000000000..f184bc929 --- /dev/null +++ b/vendor/k8s.io/client-go/discovery/helper.go @@ -0,0 +1,162 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package discovery + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/sets" + apimachineryversion "k8s.io/apimachinery/pkg/version" +) + +// MatchesServerVersion queries the server to compares the build version +// (git hash) of the client with the server's build version. It returns an error +// if it failed to contact the server or if the versions are not an exact match. +func MatchesServerVersion(clientVersion apimachineryversion.Info, client DiscoveryInterface) error { + sVer, err := client.ServerVersion() + if err != nil { + return fmt.Errorf("couldn't read version from server: %v\n", err) + } + // GitVersion includes GitCommit and GitTreeState, but best to be safe? + if clientVersion.GitVersion != sVer.GitVersion || clientVersion.GitCommit != sVer.GitCommit || clientVersion.GitTreeState != sVer.GitTreeState { + return fmt.Errorf("server version (%#v) differs from client version (%#v)!\n", sVer, clientVersion) + } + + return nil +} + +// NegotiateVersion queries the server's supported api versions to find +// a version that both client and server support. +// - If no version is provided, try registered client versions in order of +// preference. +// - If version is provided and the server does not support it, +// return an error. +// TODO negotiation should be reserved for cases where we need a version for a given group. In those cases, it should return an ordered list of +// server preferences. From that list, a separate function can match from an ordered list of client versions. +// This is not what the function has ever done before, but it makes more logical sense. +func NegotiateVersion(client DiscoveryInterface, requiredGV *schema.GroupVersion, clientRegisteredGVs []schema.GroupVersion) (*schema.GroupVersion, error) { + clientVersions := sets.String{} + for _, gv := range clientRegisteredGVs { + clientVersions.Insert(gv.String()) + } + groups, err := client.ServerGroups() + if err != nil { + // This is almost always a connection error, and higher level code should treat this as a generic error, + // not a negotiation specific error. + return nil, err + } + versions := metav1.ExtractGroupVersions(groups) + serverVersions := sets.String{} + for _, v := range versions { + serverVersions.Insert(v) + } + + // If version explicitly requested verify that both client and server support it. + // If server does not support warn, but try to negotiate a lower version. + if requiredGV != nil { + if !clientVersions.Has(requiredGV.String()) { + return nil, fmt.Errorf("client does not support API version %q; client supported API versions: %v", requiredGV, clientVersions) + + } + // If the server supports no versions, then we should just use the preferredGV + // This can happen because discovery fails due to 403 Forbidden errors + if len(serverVersions) == 0 { + return requiredGV, nil + } + if serverVersions.Has(requiredGV.String()) { + return requiredGV, nil + } + // If we are using an explicit config version the server does not support, fail. + return nil, fmt.Errorf("server does not support API version %q", requiredGV) + } + + for _, clientGV := range clientRegisteredGVs { + if serverVersions.Has(clientGV.String()) { + // Version was not explicitly requested in command config (--api-version). + // Ok to fall back to a supported version with a warning. + // TODO: caesarxuchao: enable the warning message when we have + // proper fix. Please refer to issue #14895. + // if len(version) != 0 { + // glog.Warningf("Server does not support API version '%s'. Falling back to '%s'.", version, clientVersion) + // } + t := clientGV + return &t, nil + } + } + + // if we have no server versions and we have no required version, choose the first clientRegisteredVersion + if len(serverVersions) == 0 && len(clientRegisteredGVs) > 0 { + return &clientRegisteredGVs[0], nil + } + + // fall back to an empty GroupVersion. Most client commands no longer respect a GroupVersion anyway + return &schema.GroupVersion{}, nil +} + +// GroupVersionResources converts APIResourceLists to the GroupVersionResources. +func GroupVersionResources(rls []*metav1.APIResourceList) (map[schema.GroupVersionResource]struct{}, error) { + gvrs := map[schema.GroupVersionResource]struct{}{} + for _, rl := range rls { + gv, err := schema.ParseGroupVersion(rl.GroupVersion) + if err != nil { + return nil, err + } + for i := range rl.APIResources { + gvrs[schema.GroupVersionResource{Group: gv.Group, Version: gv.Version, Resource: rl.APIResources[i].Name}] = struct{}{} + } + } + return gvrs, nil +} + +// FilteredBy filters by the given predicate. Empty APIResourceLists are dropped. +func FilteredBy(pred ResourcePredicate, rls []*metav1.APIResourceList) []*metav1.APIResourceList { + result := []*metav1.APIResourceList{} + for _, rl := range rls { + filtered := *rl + filtered.APIResources = nil + for i := range rl.APIResources { + if pred.Match(rl.GroupVersion, &rl.APIResources[i]) { + filtered.APIResources = append(filtered.APIResources, rl.APIResources[i]) + } + } + if filtered.APIResources != nil { + result = append(result, &filtered) + } + } + return result +} + +type ResourcePredicate interface { + Match(groupVersion string, r *metav1.APIResource) bool +} + +type ResourcePredicateFunc func(groupVersion string, r *metav1.APIResource) bool + +func (fn ResourcePredicateFunc) Match(groupVersion string, r *metav1.APIResource) bool { + return fn(groupVersion, r) +} + +// SupportsAllVerbs is a predicate matching a resource iff all given verbs are supported. +type SupportsAllVerbs struct { + Verbs []string +} + +func (p SupportsAllVerbs) Match(groupVersion string, r *metav1.APIResource) bool { + return sets.NewString([]string(r.Verbs)...).HasAll(p.Verbs...) +} diff --git a/vendor/k8s.io/client-go/1.5/discovery/restmapper.go b/vendor/k8s.io/client-go/discovery/restmapper.go similarity index 64% rename from vendor/k8s.io/client-go/1.5/discovery/restmapper.go rename to vendor/k8s.io/client-go/discovery/restmapper.go index 81dc905f4..9b0769a18 100644 --- a/vendor/k8s.io/client-go/1.5/discovery/restmapper.go +++ b/vendor/k8s.io/client-go/discovery/restmapper.go @@ -20,42 +20,46 @@ import ( "fmt" "sync" - "k8s.io/client-go/1.5/pkg/api/errors" - "k8s.io/client-go/1.5/pkg/api/meta" - "k8s.io/client-go/1.5/pkg/api/unversioned" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + "github.com/golang/glog" ) // APIGroupResources is an API group with a mapping of versions to // resources. type APIGroupResources struct { - Group unversioned.APIGroup + Group metav1.APIGroup // A mapping of version string to a slice of APIResources for // that version. - VersionedResources map[string][]unversioned.APIResource + VersionedResources map[string][]metav1.APIResource } // NewRESTMapper returns a PriorityRESTMapper based on the discovered -// groups and resourced passed in. +// groups and resources passed in. func NewRESTMapper(groupResources []*APIGroupResources, versionInterfaces meta.VersionInterfacesFunc) meta.RESTMapper { unionMapper := meta.MultiRESTMapper{} var groupPriority []string - var resourcePriority []unversioned.GroupVersionResource - var kindPriority []unversioned.GroupVersionKind + // /v1 is special. It should always come first + resourcePriority := []schema.GroupVersionResource{{Group: "", Version: "v1", Resource: meta.AnyResource}} + kindPriority := []schema.GroupVersionKind{{Group: "", Version: "v1", Kind: meta.AnyKind}} for _, group := range groupResources { groupPriority = append(groupPriority, group.Group.Name) if len(group.Group.PreferredVersion.Version) != 0 { - preffered := group.Group.PreferredVersion.Version - if _, ok := group.VersionedResources[preffered]; ok { - resourcePriority = append(resourcePriority, unversioned.GroupVersionResource{ + preferred := group.Group.PreferredVersion.Version + if _, ok := group.VersionedResources[preferred]; ok { + resourcePriority = append(resourcePriority, schema.GroupVersionResource{ Group: group.Group.Name, Version: group.Group.PreferredVersion.Version, Resource: meta.AnyResource, }) - kindPriority = append(kindPriority, unversioned.GroupVersionKind{ + kindPriority = append(kindPriority, schema.GroupVersionKind{ Group: group.Group.Name, Version: group.Group.PreferredVersion.Version, Kind: meta.AnyKind, @@ -69,8 +73,8 @@ func NewRESTMapper(groupResources []*APIGroupResources, versionInterfaces meta.V continue } - gv := unversioned.GroupVersion{Group: group.Group.Name, Version: discoveryVersion.Version} - versionMapper := meta.NewDefaultRESTMapper([]unversioned.GroupVersion{gv}, versionInterfaces) + gv := schema.GroupVersion{Group: group.Group.Name, Version: discoveryVersion.Version} + versionMapper := meta.NewDefaultRESTMapper([]schema.GroupVersion{gv}, versionInterfaces) for _, resource := range resources { scope := meta.RESTScopeNamespace @@ -88,12 +92,12 @@ func NewRESTMapper(groupResources []*APIGroupResources, versionInterfaces meta.V } for _, group := range groupPriority { - resourcePriority = append(resourcePriority, unversioned.GroupVersionResource{ + resourcePriority = append(resourcePriority, schema.GroupVersionResource{ Group: group, Version: meta.AnyVersion, Resource: meta.AnyResource, }) - kindPriority = append(kindPriority, unversioned.GroupVersionKind{ + kindPriority = append(kindPriority, schema.GroupVersionKind{ Group: group, Version: meta.AnyVersion, Kind: meta.AnyKind, @@ -118,7 +122,7 @@ func GetAPIGroupResources(cl DiscoveryInterface) ([]*APIGroupResources, error) { for _, group := range apiGroups.Groups { groupResources := &APIGroupResources{ Group: group, - VersionedResources: make(map[string][]unversioned.APIResource), + VersionedResources: make(map[string][]metav1.APIResource), } for _, version := range group.Versions { resources, err := cl.ServerResourcesForGroupVersion(version.GroupVersion) @@ -141,14 +145,14 @@ func GetAPIGroupResources(cl DiscoveryInterface) ([]*APIGroupResources, error) { type DeferredDiscoveryRESTMapper struct { initMu sync.Mutex delegate meta.RESTMapper - cl DiscoveryInterface + cl CachedDiscoveryInterface versionInterface meta.VersionInterfacesFunc } // NewDeferredDiscoveryRESTMapper returns a // DeferredDiscoveryRESTMapper that will lazily query the provided // client for discovery information to do REST mappings. -func NewDeferredDiscoveryRESTMapper(cl DiscoveryInterface, versionInterface meta.VersionInterfacesFunc) *DeferredDiscoveryRESTMapper { +func NewDeferredDiscoveryRESTMapper(cl CachedDiscoveryInterface, versionInterface meta.VersionInterfacesFunc) *DeferredDiscoveryRESTMapper { return &DeferredDiscoveryRESTMapper{ cl: cl, versionInterface: versionInterface, @@ -175,79 +179,118 @@ func (d *DeferredDiscoveryRESTMapper) getDelegate() (meta.RESTMapper, error) { // Reset resets the internally cached Discovery information and will // cause the next mapping request to re-discover. func (d *DeferredDiscoveryRESTMapper) Reset() { + glog.V(5).Info("Invalidating discovery information") + d.initMu.Lock() + defer d.initMu.Unlock() + + d.cl.Invalidate() d.delegate = nil - d.initMu.Unlock() } // KindFor takes a partial resource and returns back the single match. // It returns an error if there are multiple matches. -func (d *DeferredDiscoveryRESTMapper) KindFor(resource unversioned.GroupVersionResource) (unversioned.GroupVersionKind, error) { +func (d *DeferredDiscoveryRESTMapper) KindFor(resource schema.GroupVersionResource) (gvk schema.GroupVersionKind, err error) { del, err := d.getDelegate() if err != nil { - return unversioned.GroupVersionKind{}, err + return schema.GroupVersionKind{}, err } - return del.KindFor(resource) + gvk, err = del.KindFor(resource) + if err != nil && !d.cl.Fresh() { + d.Reset() + gvk, err = d.KindFor(resource) + } + return } // KindsFor takes a partial resource and returns back the list of // potential kinds in priority order. -func (d *DeferredDiscoveryRESTMapper) KindsFor(resource unversioned.GroupVersionResource) ([]unversioned.GroupVersionKind, error) { +func (d *DeferredDiscoveryRESTMapper) KindsFor(resource schema.GroupVersionResource) (gvks []schema.GroupVersionKind, err error) { del, err := d.getDelegate() if err != nil { return nil, err } - return del.KindsFor(resource) + gvks, err = del.KindsFor(resource) + if len(gvks) == 0 && !d.cl.Fresh() { + d.Reset() + gvks, err = d.KindsFor(resource) + } + return } // ResourceFor takes a partial resource and returns back the single // match. It returns an error if there are multiple matches. -func (d *DeferredDiscoveryRESTMapper) ResourceFor(input unversioned.GroupVersionResource) (unversioned.GroupVersionResource, error) { +func (d *DeferredDiscoveryRESTMapper) ResourceFor(input schema.GroupVersionResource) (gvr schema.GroupVersionResource, err error) { del, err := d.getDelegate() if err != nil { - return unversioned.GroupVersionResource{}, err + return schema.GroupVersionResource{}, err } - return del.ResourceFor(input) + gvr, err = del.ResourceFor(input) + if err != nil && !d.cl.Fresh() { + d.Reset() + gvr, err = d.ResourceFor(input) + } + return } // ResourcesFor takes a partial resource and returns back the list of // potential resource in priority order. -func (d *DeferredDiscoveryRESTMapper) ResourcesFor(input unversioned.GroupVersionResource) ([]unversioned.GroupVersionResource, error) { +func (d *DeferredDiscoveryRESTMapper) ResourcesFor(input schema.GroupVersionResource) (gvrs []schema.GroupVersionResource, err error) { del, err := d.getDelegate() if err != nil { return nil, err } - return del.ResourcesFor(input) + gvrs, err = del.ResourcesFor(input) + if len(gvrs) == 0 && !d.cl.Fresh() { + d.Reset() + gvrs, err = d.ResourcesFor(input) + } + return } // RESTMapping identifies a preferred resource mapping for the // provided group kind. -func (d *DeferredDiscoveryRESTMapper) RESTMapping(gk unversioned.GroupKind, versions ...string) (*meta.RESTMapping, error) { +func (d *DeferredDiscoveryRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (m *meta.RESTMapping, err error) { del, err := d.getDelegate() if err != nil { return nil, err } - return del.RESTMapping(gk, versions...) + m, err = del.RESTMapping(gk, versions...) + if err != nil && !d.cl.Fresh() { + d.Reset() + m, err = d.RESTMapping(gk, versions...) + } + return } // RESTMappings returns the RESTMappings for the provided group kind // in a rough internal preferred order. If no kind is found, it will // return a NoResourceMatchError. -func (d *DeferredDiscoveryRESTMapper) RESTMappings(gk unversioned.GroupKind) ([]*meta.RESTMapping, error) { +func (d *DeferredDiscoveryRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) (ms []*meta.RESTMapping, err error) { del, err := d.getDelegate() if err != nil { return nil, err } - return del.RESTMappings(gk) + ms, err = del.RESTMappings(gk, versions...) + if len(ms) == 0 && !d.cl.Fresh() { + d.Reset() + ms, err = d.RESTMappings(gk, versions...) + } + return } // AliasesForResource returns whether a resource has an alias or not. -func (d *DeferredDiscoveryRESTMapper) AliasesForResource(resource string) ([]string, bool) { +func (d *DeferredDiscoveryRESTMapper) AliasesForResource(resource string) (as []string, ok bool) { del, err := d.getDelegate() if err != nil { return nil, false } - return del.AliasesForResource(resource) + as, ok = del.AliasesForResource(resource) + if len(as) == 0 && !d.cl.Fresh() { + d.Reset() + as, ok = d.AliasesForResource(resource) + } + return } // ResourceSingularizer converts a resource name from plural to @@ -257,7 +300,12 @@ func (d *DeferredDiscoveryRESTMapper) ResourceSingularizer(resource string) (sin if err != nil { return resource, err } - return del.ResourceSingularizer(resource) + singular, err = del.ResourceSingularizer(resource) + if err != nil && !d.cl.Fresh() { + d.Reset() + singular, err = d.ResourceSingularizer(resource) + } + return } func (d *DeferredDiscoveryRESTMapper) String() string { diff --git a/vendor/k8s.io/client-go/1.5/discovery/unstructured.go b/vendor/k8s.io/client-go/discovery/unstructured.go similarity index 70% rename from vendor/k8s.io/client-go/1.5/discovery/unstructured.go rename to vendor/k8s.io/client-go/discovery/unstructured.go index cb8050823..ee72d668b 100644 --- a/vendor/k8s.io/client-go/1.5/discovery/unstructured.go +++ b/vendor/k8s.io/client-go/discovery/unstructured.go @@ -19,20 +19,20 @@ package discovery import ( "fmt" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // UnstructuredObjectTyper provides a runtime.ObjectTyper implmentation for // runtime.Unstructured object based on discovery information. type UnstructuredObjectTyper struct { - registered map[unversioned.GroupVersionKind]bool + registered map[schema.GroupVersionKind]bool } // NewUnstructuredObjectTyper returns a runtime.ObjectTyper for // unstructred objects based on discovery information. func NewUnstructuredObjectTyper(groupResources []*APIGroupResources) *UnstructuredObjectTyper { - dot := &UnstructuredObjectTyper{registered: make(map[unversioned.GroupVersionKind]bool)} + dot := &UnstructuredObjectTyper{registered: make(map[schema.GroupVersionKind]bool)} for _, group := range groupResources { for _, discoveryVersion := range group.Group.Versions { resources, ok := group.VersionedResources[discoveryVersion.Version] @@ -40,7 +40,7 @@ func NewUnstructuredObjectTyper(groupResources []*APIGroupResources) *Unstructur continue } - gv := unversioned.GroupVersion{Group: group.Group.Name, Version: discoveryVersion.Version} + gv := schema.GroupVersion{Group: group.Group.Name, Version: discoveryVersion.Version} for _, resource := range resources { dot.registered[gv.WithKind(resource.Kind)] = true } @@ -50,39 +50,39 @@ func NewUnstructuredObjectTyper(groupResources []*APIGroupResources) *Unstructur } // ObjectKind returns the group,version,kind of the provided object, or an error -// if the object in not *runtime.Unstructured or has no group,version,kind +// if the object in not runtime.Unstructured or has no group,version,kind // information. -func (d *UnstructuredObjectTyper) ObjectKind(obj runtime.Object) (unversioned.GroupVersionKind, error) { - if _, ok := obj.(*runtime.Unstructured); !ok { - return unversioned.GroupVersionKind{}, fmt.Errorf("type %T is invalid for dynamic object typer", obj) +func (d *UnstructuredObjectTyper) ObjectKind(obj runtime.Object) (schema.GroupVersionKind, error) { + if _, ok := obj.(runtime.Unstructured); !ok { + return schema.GroupVersionKind{}, fmt.Errorf("type %T is invalid for dynamic object typer", obj) } return obj.GetObjectKind().GroupVersionKind(), nil } // ObjectKinds returns a slice of one element with the group,version,kind of the -// provided object, or an error if the object is not *runtime.Unstructured or +// provided object, or an error if the object is not runtime.Unstructured or // has no group,version,kind information. unversionedType will always be false // because runtime.Unstructured object should always have group,version,kind // information set. -func (d *UnstructuredObjectTyper) ObjectKinds(obj runtime.Object) (gvks []unversioned.GroupVersionKind, unversionedType bool, err error) { +func (d *UnstructuredObjectTyper) ObjectKinds(obj runtime.Object) (gvks []schema.GroupVersionKind, unversionedType bool, err error) { gvk, err := d.ObjectKind(obj) if err != nil { return nil, false, err } - return []unversioned.GroupVersionKind{gvk}, false, nil + return []schema.GroupVersionKind{gvk}, false, nil } // Recognizes returns true if the provided group,version,kind was in the // discovery information. -func (d *UnstructuredObjectTyper) Recognizes(gvk unversioned.GroupVersionKind) bool { +func (d *UnstructuredObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool { return d.registered[gvk] } -// IsUnversioned returns false always because *runtime.Unstructured objects +// IsUnversioned returns false always because runtime.Unstructured objects // should always have group,version,kind information set. ok will be true if the -// object's group,version,kind is registered. +// object's group,version,kind is api.Registry. func (d *UnstructuredObjectTyper) IsUnversioned(obj runtime.Object) (unversioned bool, ok bool) { gvk, err := d.ObjectKind(obj) if err != nil { diff --git a/vendor/k8s.io/client-go/kubernetes/clientset.go b/vendor/k8s.io/client-go/kubernetes/clientset.go new file mode 100644 index 000000000..5fd0c54e8 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/clientset.go @@ -0,0 +1,514 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubernetes + +import ( + glog "github.com/golang/glog" + discovery "k8s.io/client-go/discovery" + appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" + authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1" + authenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" + authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1" + authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" + autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" + autoscalingv2alpha1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1" + batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1" + batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1" + certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" + corev1 "k8s.io/client-go/kubernetes/typed/core/v1" + extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" + policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1" + rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" + rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" + settingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1" + storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" + storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + CoreV1() corev1.CoreV1Interface + // Deprecated: please explicitly pick a version if possible. + Core() corev1.CoreV1Interface + AppsV1beta1() appsv1beta1.AppsV1beta1Interface + // Deprecated: please explicitly pick a version if possible. + Apps() appsv1beta1.AppsV1beta1Interface + AuthenticationV1() authenticationv1.AuthenticationV1Interface + // Deprecated: please explicitly pick a version if possible. + Authentication() authenticationv1.AuthenticationV1Interface + AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface + AuthorizationV1() authorizationv1.AuthorizationV1Interface + // Deprecated: please explicitly pick a version if possible. + Authorization() authorizationv1.AuthorizationV1Interface + AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface + AutoscalingV1() autoscalingv1.AutoscalingV1Interface + // Deprecated: please explicitly pick a version if possible. + Autoscaling() autoscalingv1.AutoscalingV1Interface + AutoscalingV2alpha1() autoscalingv2alpha1.AutoscalingV2alpha1Interface + BatchV1() batchv1.BatchV1Interface + // Deprecated: please explicitly pick a version if possible. + Batch() batchv1.BatchV1Interface + BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface + CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface + // Deprecated: please explicitly pick a version if possible. + Certificates() certificatesv1beta1.CertificatesV1beta1Interface + ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface + // Deprecated: please explicitly pick a version if possible. + Extensions() extensionsv1beta1.ExtensionsV1beta1Interface + PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface + // Deprecated: please explicitly pick a version if possible. + Policy() policyv1beta1.PolicyV1beta1Interface + RbacV1beta1() rbacv1beta1.RbacV1beta1Interface + // Deprecated: please explicitly pick a version if possible. + Rbac() rbacv1beta1.RbacV1beta1Interface + RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface + SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface + // Deprecated: please explicitly pick a version if possible. + Settings() settingsv1alpha1.SettingsV1alpha1Interface + StorageV1beta1() storagev1beta1.StorageV1beta1Interface + StorageV1() storagev1.StorageV1Interface + // Deprecated: please explicitly pick a version if possible. + Storage() storagev1.StorageV1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + *corev1.CoreV1Client + *appsv1beta1.AppsV1beta1Client + *authenticationv1.AuthenticationV1Client + *authenticationv1beta1.AuthenticationV1beta1Client + *authorizationv1.AuthorizationV1Client + *authorizationv1beta1.AuthorizationV1beta1Client + *autoscalingv1.AutoscalingV1Client + *autoscalingv2alpha1.AutoscalingV2alpha1Client + *batchv1.BatchV1Client + *batchv2alpha1.BatchV2alpha1Client + *certificatesv1beta1.CertificatesV1beta1Client + *extensionsv1beta1.ExtensionsV1beta1Client + *policyv1beta1.PolicyV1beta1Client + *rbacv1beta1.RbacV1beta1Client + *rbacv1alpha1.RbacV1alpha1Client + *settingsv1alpha1.SettingsV1alpha1Client + *storagev1beta1.StorageV1beta1Client + *storagev1.StorageV1Client +} + +// CoreV1 retrieves the CoreV1Client +func (c *Clientset) CoreV1() corev1.CoreV1Interface { + if c == nil { + return nil + } + return c.CoreV1Client +} + +// Deprecated: Core retrieves the default version of CoreClient. +// Please explicitly pick a version. +func (c *Clientset) Core() corev1.CoreV1Interface { + if c == nil { + return nil + } + return c.CoreV1Client +} + +// AppsV1beta1 retrieves the AppsV1beta1Client +func (c *Clientset) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { + if c == nil { + return nil + } + return c.AppsV1beta1Client +} + +// Deprecated: Apps retrieves the default version of AppsClient. +// Please explicitly pick a version. +func (c *Clientset) Apps() appsv1beta1.AppsV1beta1Interface { + if c == nil { + return nil + } + return c.AppsV1beta1Client +} + +// AuthenticationV1 retrieves the AuthenticationV1Client +func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface { + if c == nil { + return nil + } + return c.AuthenticationV1Client +} + +// Deprecated: Authentication retrieves the default version of AuthenticationClient. +// Please explicitly pick a version. +func (c *Clientset) Authentication() authenticationv1.AuthenticationV1Interface { + if c == nil { + return nil + } + return c.AuthenticationV1Client +} + +// AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client +func (c *Clientset) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { + if c == nil { + return nil + } + return c.AuthenticationV1beta1Client +} + +// AuthorizationV1 retrieves the AuthorizationV1Client +func (c *Clientset) AuthorizationV1() authorizationv1.AuthorizationV1Interface { + if c == nil { + return nil + } + return c.AuthorizationV1Client +} + +// Deprecated: Authorization retrieves the default version of AuthorizationClient. +// Please explicitly pick a version. +func (c *Clientset) Authorization() authorizationv1.AuthorizationV1Interface { + if c == nil { + return nil + } + return c.AuthorizationV1Client +} + +// AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client +func (c *Clientset) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { + if c == nil { + return nil + } + return c.AuthorizationV1beta1Client +} + +// AutoscalingV1 retrieves the AutoscalingV1Client +func (c *Clientset) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { + if c == nil { + return nil + } + return c.AutoscalingV1Client +} + +// Deprecated: Autoscaling retrieves the default version of AutoscalingClient. +// Please explicitly pick a version. +func (c *Clientset) Autoscaling() autoscalingv1.AutoscalingV1Interface { + if c == nil { + return nil + } + return c.AutoscalingV1Client +} + +// AutoscalingV2alpha1 retrieves the AutoscalingV2alpha1Client +func (c *Clientset) AutoscalingV2alpha1() autoscalingv2alpha1.AutoscalingV2alpha1Interface { + if c == nil { + return nil + } + return c.AutoscalingV2alpha1Client +} + +// BatchV1 retrieves the BatchV1Client +func (c *Clientset) BatchV1() batchv1.BatchV1Interface { + if c == nil { + return nil + } + return c.BatchV1Client +} + +// Deprecated: Batch retrieves the default version of BatchClient. +// Please explicitly pick a version. +func (c *Clientset) Batch() batchv1.BatchV1Interface { + if c == nil { + return nil + } + return c.BatchV1Client +} + +// BatchV2alpha1 retrieves the BatchV2alpha1Client +func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface { + if c == nil { + return nil + } + return c.BatchV2alpha1Client +} + +// CertificatesV1beta1 retrieves the CertificatesV1beta1Client +func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { + if c == nil { + return nil + } + return c.CertificatesV1beta1Client +} + +// Deprecated: Certificates retrieves the default version of CertificatesClient. +// Please explicitly pick a version. +func (c *Clientset) Certificates() certificatesv1beta1.CertificatesV1beta1Interface { + if c == nil { + return nil + } + return c.CertificatesV1beta1Client +} + +// ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client +func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { + if c == nil { + return nil + } + return c.ExtensionsV1beta1Client +} + +// Deprecated: Extensions retrieves the default version of ExtensionsClient. +// Please explicitly pick a version. +func (c *Clientset) Extensions() extensionsv1beta1.ExtensionsV1beta1Interface { + if c == nil { + return nil + } + return c.ExtensionsV1beta1Client +} + +// PolicyV1beta1 retrieves the PolicyV1beta1Client +func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { + if c == nil { + return nil + } + return c.PolicyV1beta1Client +} + +// Deprecated: Policy retrieves the default version of PolicyClient. +// Please explicitly pick a version. +func (c *Clientset) Policy() policyv1beta1.PolicyV1beta1Interface { + if c == nil { + return nil + } + return c.PolicyV1beta1Client +} + +// RbacV1beta1 retrieves the RbacV1beta1Client +func (c *Clientset) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { + if c == nil { + return nil + } + return c.RbacV1beta1Client +} + +// Deprecated: Rbac retrieves the default version of RbacClient. +// Please explicitly pick a version. +func (c *Clientset) Rbac() rbacv1beta1.RbacV1beta1Interface { + if c == nil { + return nil + } + return c.RbacV1beta1Client +} + +// RbacV1alpha1 retrieves the RbacV1alpha1Client +func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { + if c == nil { + return nil + } + return c.RbacV1alpha1Client +} + +// SettingsV1alpha1 retrieves the SettingsV1alpha1Client +func (c *Clientset) SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface { + if c == nil { + return nil + } + return c.SettingsV1alpha1Client +} + +// Deprecated: Settings retrieves the default version of SettingsClient. +// Please explicitly pick a version. +func (c *Clientset) Settings() settingsv1alpha1.SettingsV1alpha1Interface { + if c == nil { + return nil + } + return c.SettingsV1alpha1Client +} + +// StorageV1beta1 retrieves the StorageV1beta1Client +func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { + if c == nil { + return nil + } + return c.StorageV1beta1Client +} + +// StorageV1 retrieves the StorageV1Client +func (c *Clientset) StorageV1() storagev1.StorageV1Interface { + if c == nil { + return nil + } + return c.StorageV1Client +} + +// Deprecated: Storage retrieves the default version of StorageClient. +// Please explicitly pick a version. +func (c *Clientset) Storage() storagev1.StorageV1Interface { + if c == nil { + return nil + } + return c.StorageV1Client +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.CoreV1Client, err = corev1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.AppsV1beta1Client, err = appsv1beta1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.AuthenticationV1Client, err = authenticationv1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.AuthenticationV1beta1Client, err = authenticationv1beta1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.AuthorizationV1Client, err = authorizationv1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.AuthorizationV1beta1Client, err = authorizationv1beta1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.AutoscalingV1Client, err = autoscalingv1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.AutoscalingV2alpha1Client, err = autoscalingv2alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.BatchV1Client, err = batchv1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.BatchV2alpha1Client, err = batchv2alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.CertificatesV1beta1Client, err = certificatesv1beta1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.ExtensionsV1beta1Client, err = extensionsv1beta1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.PolicyV1beta1Client, err = policyv1beta1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.RbacV1beta1Client, err = rbacv1beta1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.RbacV1alpha1Client, err = rbacv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.SettingsV1alpha1Client, err = settingsv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.StorageV1beta1Client, err = storagev1beta1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.StorageV1Client, err = storagev1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + glog.Errorf("failed to create the DiscoveryClient: %v", err) + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.CoreV1Client = corev1.NewForConfigOrDie(c) + cs.AppsV1beta1Client = appsv1beta1.NewForConfigOrDie(c) + cs.AuthenticationV1Client = authenticationv1.NewForConfigOrDie(c) + cs.AuthenticationV1beta1Client = authenticationv1beta1.NewForConfigOrDie(c) + cs.AuthorizationV1Client = authorizationv1.NewForConfigOrDie(c) + cs.AuthorizationV1beta1Client = authorizationv1beta1.NewForConfigOrDie(c) + cs.AutoscalingV1Client = autoscalingv1.NewForConfigOrDie(c) + cs.AutoscalingV2alpha1Client = autoscalingv2alpha1.NewForConfigOrDie(c) + cs.BatchV1Client = batchv1.NewForConfigOrDie(c) + cs.BatchV2alpha1Client = batchv2alpha1.NewForConfigOrDie(c) + cs.CertificatesV1beta1Client = certificatesv1beta1.NewForConfigOrDie(c) + cs.ExtensionsV1beta1Client = extensionsv1beta1.NewForConfigOrDie(c) + cs.PolicyV1beta1Client = policyv1beta1.NewForConfigOrDie(c) + cs.RbacV1beta1Client = rbacv1beta1.NewForConfigOrDie(c) + cs.RbacV1alpha1Client = rbacv1alpha1.NewForConfigOrDie(c) + cs.SettingsV1alpha1Client = settingsv1alpha1.NewForConfigOrDie(c) + cs.StorageV1beta1Client = storagev1beta1.NewForConfigOrDie(c) + cs.StorageV1Client = storagev1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.CoreV1Client = corev1.New(c) + cs.AppsV1beta1Client = appsv1beta1.New(c) + cs.AuthenticationV1Client = authenticationv1.New(c) + cs.AuthenticationV1beta1Client = authenticationv1beta1.New(c) + cs.AuthorizationV1Client = authorizationv1.New(c) + cs.AuthorizationV1beta1Client = authorizationv1beta1.New(c) + cs.AutoscalingV1Client = autoscalingv1.New(c) + cs.AutoscalingV2alpha1Client = autoscalingv2alpha1.New(c) + cs.BatchV1Client = batchv1.New(c) + cs.BatchV2alpha1Client = batchv2alpha1.New(c) + cs.CertificatesV1beta1Client = certificatesv1beta1.New(c) + cs.ExtensionsV1beta1Client = extensionsv1beta1.New(c) + cs.PolicyV1beta1Client = policyv1beta1.New(c) + cs.RbacV1beta1Client = rbacv1beta1.New(c) + cs.RbacV1alpha1Client = rbacv1alpha1.New(c) + cs.SettingsV1alpha1Client = settingsv1alpha1.New(c) + cs.StorageV1beta1Client = storagev1beta1.New(c) + cs.StorageV1Client = storagev1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/doc.go b/vendor/k8s.io/client-go/kubernetes/doc.go similarity index 74% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/doc.go rename to vendor/k8s.io/client-go/kubernetes/doc.go index 4e2deb516..2af84c669 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/doc.go +++ b/vendor/k8s.io/client-go/kubernetes/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register -// +k8s:openapi-gen=true +// This package is generated by client-gen with custom arguments. -// +groupName=authorization.k8s.io -package authorization +// This package has the automatically generated clientset. +package kubernetes diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/import_known_versions.go b/vendor/k8s.io/client-go/kubernetes/import_known_versions.go similarity index 52% rename from vendor/k8s.io/client-go/1.5/kubernetes/import_known_versions.go rename to vendor/k8s.io/client-go/kubernetes/import_known_versions.go index 2a27c780f..297466b01 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/import_known_versions.go +++ b/vendor/k8s.io/client-go/kubernetes/import_known_versions.go @@ -20,22 +20,23 @@ package kubernetes import ( "fmt" - _ "k8s.io/client-go/1.5/pkg/api/install" - "k8s.io/client-go/1.5/pkg/apimachinery/registered" - _ "k8s.io/client-go/1.5/pkg/apis/apps/install" - _ "k8s.io/client-go/1.5/pkg/apis/authentication/install" - _ "k8s.io/client-go/1.5/pkg/apis/authorization/install" - _ "k8s.io/client-go/1.5/pkg/apis/autoscaling/install" - _ "k8s.io/client-go/1.5/pkg/apis/batch/install" - _ "k8s.io/client-go/1.5/pkg/apis/certificates/install" - _ "k8s.io/client-go/1.5/pkg/apis/extensions/install" - _ "k8s.io/client-go/1.5/pkg/apis/policy/install" - _ "k8s.io/client-go/1.5/pkg/apis/rbac/install" - _ "k8s.io/client-go/1.5/pkg/apis/storage/install" + "k8s.io/client-go/pkg/api" + _ "k8s.io/client-go/pkg/api/install" + _ "k8s.io/client-go/pkg/apis/apps/install" + _ "k8s.io/client-go/pkg/apis/authentication/install" + _ "k8s.io/client-go/pkg/apis/authorization/install" + _ "k8s.io/client-go/pkg/apis/autoscaling/install" + _ "k8s.io/client-go/pkg/apis/batch/install" + _ "k8s.io/client-go/pkg/apis/certificates/install" + _ "k8s.io/client-go/pkg/apis/extensions/install" + _ "k8s.io/client-go/pkg/apis/policy/install" + _ "k8s.io/client-go/pkg/apis/rbac/install" + _ "k8s.io/client-go/pkg/apis/settings/install" + _ "k8s.io/client-go/pkg/apis/storage/install" ) func init() { - if missingVersions := registered.ValidateEnvRequestedVersions(); len(missingVersions) != 0 { + if missingVersions := api.Registry.ValidateEnvRequestedVersions(); len(missingVersions) != 0 { panic(fmt.Sprintf("KUBE_API_VERSIONS contains versions that are not installed: %q.", missingVersions)) } } diff --git a/vendor/k8s.io/client-go/kubernetes/scheme/doc.go b/vendor/k8s.io/client-go/kubernetes/scheme/doc.go new file mode 100644 index 000000000..5d8ec824f --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/scheme/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/k8s.io/client-go/kubernetes/scheme/register.go b/vendor/k8s.io/client-go/kubernetes/scheme/register.go new file mode 100644 index 000000000..1fe5dbe4c --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/scheme/register.go @@ -0,0 +1,87 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package scheme + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + corev1 "k8s.io/client-go/pkg/api/v1" + appsv1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1" + authenticationv1 "k8s.io/client-go/pkg/apis/authentication/v1" + authenticationv1beta1 "k8s.io/client-go/pkg/apis/authentication/v1beta1" + authorizationv1 "k8s.io/client-go/pkg/apis/authorization/v1" + authorizationv1beta1 "k8s.io/client-go/pkg/apis/authorization/v1beta1" + autoscalingv1 "k8s.io/client-go/pkg/apis/autoscaling/v1" + autoscalingv2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1" + batchv1 "k8s.io/client-go/pkg/apis/batch/v1" + batchv2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1" + certificatesv1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1" + extensionsv1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + policyv1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1" + rbacv1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + rbacv1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + settingsv1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1" + storagev1 "k8s.io/client-go/pkg/apis/storage/v1" + storagev1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + AddToScheme(Scheme) +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kuberentes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +func AddToScheme(scheme *runtime.Scheme) { + corev1.AddToScheme(scheme) + appsv1beta1.AddToScheme(scheme) + authenticationv1.AddToScheme(scheme) + authenticationv1beta1.AddToScheme(scheme) + authorizationv1.AddToScheme(scheme) + authorizationv1beta1.AddToScheme(scheme) + autoscalingv1.AddToScheme(scheme) + autoscalingv2alpha1.AddToScheme(scheme) + batchv1.AddToScheme(scheme) + batchv2alpha1.AddToScheme(scheme) + certificatesv1beta1.AddToScheme(scheme) + extensionsv1beta1.AddToScheme(scheme) + policyv1beta1.AddToScheme(scheme) + rbacv1beta1.AddToScheme(scheme) + rbacv1alpha1.AddToScheme(scheme) + settingsv1alpha1.AddToScheme(scheme) + storagev1beta1.AddToScheme(scheme) + storagev1.AddToScheme(scheme) + +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go new file mode 100644 index 000000000..a520f87fc --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go @@ -0,0 +1,98 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1" + rest "k8s.io/client-go/rest" +) + +type AppsV1beta1Interface interface { + RESTClient() rest.Interface + DeploymentsGetter + ScalesGetter + StatefulSetsGetter +} + +// AppsV1beta1Client is used to interact with features provided by the apps group. +type AppsV1beta1Client struct { + restClient rest.Interface +} + +func (c *AppsV1beta1Client) Deployments(namespace string) DeploymentInterface { + return newDeployments(c, namespace) +} + +func (c *AppsV1beta1Client) Scales(namespace string) ScaleInterface { + return newScales(c, namespace) +} + +func (c *AppsV1beta1Client) StatefulSets(namespace string) StatefulSetInterface { + return newStatefulSets(c, namespace) +} + +// NewForConfig creates a new AppsV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*AppsV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &AppsV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new AppsV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *AppsV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new AppsV1beta1Client for the given RESTClient. +func New(c rest.Interface) *AppsV1beta1Client { + return &AppsV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *AppsV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go similarity index 67% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/deployment.go rename to vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go index 540617130..b30965ee7 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/deployment.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1beta1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1beta1 "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1" - watch "k8s.io/client-go/1.5/pkg/watch" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1" + rest "k8s.io/client-go/rest" ) // DeploymentsGetter has a method to return a DeploymentInterface. @@ -33,25 +36,25 @@ type DeploymentInterface interface { Create(*v1beta1.Deployment) (*v1beta1.Deployment, error) Update(*v1beta1.Deployment) (*v1beta1.Deployment, error) UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1beta1.Deployment, error) - List(opts api.ListOptions) (*v1beta1.DeploymentList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error) + List(opts v1.ListOptions) (*v1beta1.DeploymentList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) DeploymentExpansion } // deployments implements DeploymentInterface type deployments struct { - client *ExtensionsClient + client rest.Interface ns string } // newDeployments returns a Deployments -func newDeployments(c *ExtensionsClient, namespace string) *deployments { +func newDeployments(c *AppsV1beta1Client, namespace string) *deployments { return &deployments{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,6 +84,9 @@ func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.De return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Put(). @@ -95,7 +101,7 @@ func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1be } // Delete takes name of the deployment and deletes it. Returns an error if one occurs. -func (c *deployments) Delete(name string, options *api.DeleteOptions) error { +func (c *deployments) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("deployments"). @@ -106,52 +112,53 @@ func (c *deployments) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *deployments) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("deployments"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *deployments) Get(name string) (result *v1beta1.Deployment, err error) { +func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Get(). Namespace(c.ns). Resource("deployments"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *deployments) List(opts api.ListOptions) (result *v1beta1.DeploymentList, err error) { +func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { result = &v1beta1.DeploymentList{} err = c.client.Get(). Namespace(c.ns). Resource("deployments"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested deployments. -func (c *deployments) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("deployments"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go new file mode 100644 index 000000000..11b523897 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go similarity index 78% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/generated_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go index 0e5d86e3a..deca5c866 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,6 +16,8 @@ limitations under the License. package v1beta1 -type LocalSubjectAccessReviewExpansion interface{} +type DeploymentExpansion interface{} -type SelfSubjectAccessReviewExpansion interface{} +type ScaleExpansion interface{} + +type StatefulSetExpansion interface{} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/scale.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go similarity index 83% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/scale.go rename to vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go index 3a7be158a..d3bf9e103 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/scale.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,6 +16,10 @@ limitations under the License. package v1beta1 +import ( + rest "k8s.io/client-go/rest" +) + // ScalesGetter has a method to return a ScaleInterface. // A group's client should implement this interface. type ScalesGetter interface { @@ -29,14 +33,14 @@ type ScaleInterface interface { // scales implements ScaleInterface type scales struct { - client *ExtensionsClient + client rest.Interface ns string } // newScales returns a Scales -func newScales(c *ExtensionsClient, namespace string) *scales { +func newScales(c *AppsV1beta1Client, namespace string) *scales { return &scales{ - client: c, + client: c.RESTClient(), ns: namespace, } } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go new file mode 100644 index 000000000..8b5a7822f --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go @@ -0,0 +1,172 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1" + rest "k8s.io/client-go/rest" +) + +// StatefulSetsGetter has a method to return a StatefulSetInterface. +// A group's client should implement this interface. +type StatefulSetsGetter interface { + StatefulSets(namespace string) StatefulSetInterface +} + +// StatefulSetInterface has methods to work with StatefulSet resources. +type StatefulSetInterface interface { + Create(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) + Update(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) + UpdateStatus(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.StatefulSet, error) + List(opts v1.ListOptions) (*v1beta1.StatefulSetList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) + StatefulSetExpansion +} + +// statefulSets implements StatefulSetInterface +type statefulSets struct { + client rest.Interface + ns string +} + +// newStatefulSets returns a StatefulSets +func newStatefulSets(c *AppsV1beta1Client, namespace string) *statefulSets { + return &statefulSets{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. +func (c *statefulSets) Create(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) { + result = &v1beta1.StatefulSet{} + err = c.client.Post(). + Namespace(c.ns). + Resource("statefulsets"). + Body(statefulSet). + Do(). + Into(result) + return +} + +// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. +func (c *statefulSets) Update(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) { + result = &v1beta1.StatefulSet{} + err = c.client.Put(). + Namespace(c.ns). + Resource("statefulsets"). + Name(statefulSet.Name). + Body(statefulSet). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + +func (c *statefulSets) UpdateStatus(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) { + result = &v1beta1.StatefulSet{} + err = c.client.Put(). + Namespace(c.ns). + Resource("statefulsets"). + Name(statefulSet.Name). + SubResource("status"). + Body(statefulSet). + Do(). + Into(result) + return +} + +// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. +func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("statefulsets"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("statefulsets"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. +func (c *statefulSets) Get(name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) { + result = &v1beta1.StatefulSet{} + err = c.client.Get(). + Namespace(c.ns). + Resource("statefulsets"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of StatefulSets that match those selectors. +func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) { + result = &v1beta1.StatefulSetList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("statefulsets"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested statefulSets. +func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("statefulsets"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched statefulSet. +func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) { + result = &v1beta1.StatefulSet{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("statefulsets"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go new file mode 100644 index 000000000..bd53fc249 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go @@ -0,0 +1,88 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/apis/authentication/v1" + rest "k8s.io/client-go/rest" +) + +type AuthenticationV1Interface interface { + RESTClient() rest.Interface + TokenReviewsGetter +} + +// AuthenticationV1Client is used to interact with features provided by the authentication.k8s.io group. +type AuthenticationV1Client struct { + restClient rest.Interface +} + +func (c *AuthenticationV1Client) TokenReviews() TokenReviewInterface { + return newTokenReviews(c) +} + +// NewForConfig creates a new AuthenticationV1Client for the given config. +func NewForConfig(c *rest.Config) (*AuthenticationV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &AuthenticationV1Client{client}, nil +} + +// NewForConfigOrDie creates a new AuthenticationV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *AuthenticationV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new AuthenticationV1Client for the given RESTClient. +func New(c rest.Interface) *AuthenticationV1Client { + return &AuthenticationV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *AuthenticationV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go similarity index 76% rename from vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/doc.go rename to vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go index f89c5c89c..54673bfa7 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/doc.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling -// +k8s:openapi-gen=true +// This package is generated by client-gen with custom arguments. +// This package has the automatically generated typed clients. package v1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go new file mode 100644 index 000000000..42e76d5e4 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go @@ -0,0 +1,17 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go new file mode 100644 index 000000000..9cfef4e6a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go @@ -0,0 +1,44 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + rest "k8s.io/client-go/rest" +) + +// TokenReviewsGetter has a method to return a TokenReviewInterface. +// A group's client should implement this interface. +type TokenReviewsGetter interface { + TokenReviews() TokenReviewInterface +} + +// TokenReviewInterface has methods to work with TokenReview resources. +type TokenReviewInterface interface { + TokenReviewExpansion +} + +// tokenReviews implements TokenReviewInterface +type tokenReviews struct { + client rest.Interface +} + +// newTokenReviews returns a TokenReviews +func newTokenReviews(c *AuthenticationV1Client) *tokenReviews { + return &tokenReviews{ + client: c.RESTClient(), + } +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview_expansion.go new file mode 100644 index 000000000..fb41782fe --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview_expansion.go @@ -0,0 +1,35 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + authenticationapi "k8s.io/client-go/pkg/apis/authentication/v1" +) + +type TokenReviewExpansion interface { + Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) +} + +func (c *tokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) { + result = &authenticationapi.TokenReview{} + err = c.client.Post(). + Resource("tokenreviews"). + Body(tokenReview). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go new file mode 100644 index 000000000..419dc2cb6 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go @@ -0,0 +1,88 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/authentication/v1beta1" + rest "k8s.io/client-go/rest" +) + +type AuthenticationV1beta1Interface interface { + RESTClient() rest.Interface + TokenReviewsGetter +} + +// AuthenticationV1beta1Client is used to interact with features provided by the authentication.k8s.io group. +type AuthenticationV1beta1Client struct { + restClient rest.Interface +} + +func (c *AuthenticationV1beta1Client) TokenReviews() TokenReviewInterface { + return newTokenReviews(c) +} + +// NewForConfig creates a new AuthenticationV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*AuthenticationV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &AuthenticationV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new AuthenticationV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *AuthenticationV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new AuthenticationV1beta1Client for the given RESTClient. +func New(c rest.Interface) *AuthenticationV1beta1Client { + return &AuthenticationV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *AuthenticationV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go new file mode 100644 index 000000000..11b523897 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go new file mode 100644 index 000000000..2b7e8ca0b --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go @@ -0,0 +1,17 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/tokenreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go similarity index 83% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/tokenreview.go rename to vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go index dc9313bae..7f9f1e9fa 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/tokenreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,6 +16,10 @@ limitations under the License. package v1beta1 +import ( + rest "k8s.io/client-go/rest" +) + // TokenReviewsGetter has a method to return a TokenReviewInterface. // A group's client should implement this interface. type TokenReviewsGetter interface { @@ -29,12 +33,12 @@ type TokenReviewInterface interface { // tokenReviews implements TokenReviewInterface type tokenReviews struct { - client *AuthenticationClient + client rest.Interface } // newTokenReviews returns a TokenReviews -func newTokenReviews(c *AuthenticationClient) *tokenReviews { +func newTokenReviews(c *AuthenticationV1beta1Client) *tokenReviews { return &tokenReviews{ - client: c, + client: c.RESTClient(), } } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go new file mode 100644 index 000000000..375b6f637 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go @@ -0,0 +1,35 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + authenticationapi "k8s.io/client-go/pkg/apis/authentication/v1beta1" +) + +type TokenReviewExpansion interface { + Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) +} + +func (c *tokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) { + result = &authenticationapi.TokenReview{} + err = c.client.Post(). + Resource("tokenreviews"). + Body(tokenReview). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go new file mode 100644 index 000000000..af2924a30 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go @@ -0,0 +1,98 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/apis/authorization/v1" + rest "k8s.io/client-go/rest" +) + +type AuthorizationV1Interface interface { + RESTClient() rest.Interface + LocalSubjectAccessReviewsGetter + SelfSubjectAccessReviewsGetter + SubjectAccessReviewsGetter +} + +// AuthorizationV1Client is used to interact with features provided by the authorization.k8s.io group. +type AuthorizationV1Client struct { + restClient rest.Interface +} + +func (c *AuthorizationV1Client) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface { + return newLocalSubjectAccessReviews(c, namespace) +} + +func (c *AuthorizationV1Client) SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface { + return newSelfSubjectAccessReviews(c) +} + +func (c *AuthorizationV1Client) SubjectAccessReviews() SubjectAccessReviewInterface { + return newSubjectAccessReviews(c) +} + +// NewForConfig creates a new AuthorizationV1Client for the given config. +func NewForConfig(c *rest.Config) (*AuthorizationV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &AuthorizationV1Client{client}, nil +} + +// NewForConfigOrDie creates a new AuthorizationV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *AuthorizationV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new AuthorizationV1Client for the given RESTClient. +func New(c rest.Interface) *AuthorizationV1Client { + return &AuthorizationV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *AuthorizationV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go similarity index 76% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/doc.go rename to vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go index 608c03bdd..54673bfa7 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/doc.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch -// +k8s:openapi-gen=true +// This package is generated by client-gen with custom arguments. +// This package has the automatically generated typed clients. package v1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go new file mode 100644 index 000000000..42e76d5e4 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go @@ -0,0 +1,17 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go new file mode 100644 index 000000000..b2085bceb --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go @@ -0,0 +1,46 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + rest "k8s.io/client-go/rest" +) + +// LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface. +// A group's client should implement this interface. +type LocalSubjectAccessReviewsGetter interface { + LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface +} + +// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources. +type LocalSubjectAccessReviewInterface interface { + LocalSubjectAccessReviewExpansion +} + +// localSubjectAccessReviews implements LocalSubjectAccessReviewInterface +type localSubjectAccessReviews struct { + client rest.Interface + ns string +} + +// newLocalSubjectAccessReviews returns a LocalSubjectAccessReviews +func newLocalSubjectAccessReviews(c *AuthorizationV1Client, namespace string) *localSubjectAccessReviews { + return &localSubjectAccessReviews{ + client: c.RESTClient(), + ns: namespace, + } +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go new file mode 100644 index 000000000..c3b487c72 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go @@ -0,0 +1,36 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1" +) + +type LocalSubjectAccessReviewExpansion interface { + Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) +} + +func (c *localSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) { + result = &authorizationapi.LocalSubjectAccessReview{} + err = c.client.Post(). + Namespace(c.ns). + Resource("localsubjectaccessreviews"). + Body(sar). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go new file mode 100644 index 000000000..cfb019eaa --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go @@ -0,0 +1,44 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + rest "k8s.io/client-go/rest" +) + +// SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface. +// A group's client should implement this interface. +type SelfSubjectAccessReviewsGetter interface { + SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface +} + +// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources. +type SelfSubjectAccessReviewInterface interface { + SelfSubjectAccessReviewExpansion +} + +// selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface +type selfSubjectAccessReviews struct { + client rest.Interface +} + +// newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews +func newSelfSubjectAccessReviews(c *AuthorizationV1Client) *selfSubjectAccessReviews { + return &selfSubjectAccessReviews{ + client: c.RESTClient(), + } +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go new file mode 100644 index 000000000..107615080 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go @@ -0,0 +1,35 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1" +) + +type SelfSubjectAccessReviewExpansion interface { + Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) +} + +func (c *selfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) { + result = &authorizationapi.SelfSubjectAccessReview{} + err = c.client.Post(). + Resource("selfsubjectaccessreviews"). + Body(sar). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go new file mode 100644 index 000000000..08f6d6095 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go @@ -0,0 +1,44 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + rest "k8s.io/client-go/rest" +) + +// SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface. +// A group's client should implement this interface. +type SubjectAccessReviewsGetter interface { + SubjectAccessReviews() SubjectAccessReviewInterface +} + +// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources. +type SubjectAccessReviewInterface interface { + SubjectAccessReviewExpansion +} + +// subjectAccessReviews implements SubjectAccessReviewInterface +type subjectAccessReviews struct { + client rest.Interface +} + +// newSubjectAccessReviews returns a SubjectAccessReviews +func newSubjectAccessReviews(c *AuthorizationV1Client) *subjectAccessReviews { + return &subjectAccessReviews{ + client: c.RESTClient(), + } +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go new file mode 100644 index 000000000..dfdf6521a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go @@ -0,0 +1,36 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1" +) + +// The SubjectAccessReviewExpansion interface allows manually adding extra methods to the AuthorizationInterface. +type SubjectAccessReviewExpansion interface { + Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) +} + +func (c *subjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) { + result = &authorizationapi.SubjectAccessReview{} + err = c.client.Post(). + Resource("subjectaccessreviews"). + Body(sar). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go new file mode 100644 index 000000000..b49b3b30b --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go @@ -0,0 +1,98 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/authorization/v1beta1" + rest "k8s.io/client-go/rest" +) + +type AuthorizationV1beta1Interface interface { + RESTClient() rest.Interface + LocalSubjectAccessReviewsGetter + SelfSubjectAccessReviewsGetter + SubjectAccessReviewsGetter +} + +// AuthorizationV1beta1Client is used to interact with features provided by the authorization.k8s.io group. +type AuthorizationV1beta1Client struct { + restClient rest.Interface +} + +func (c *AuthorizationV1beta1Client) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface { + return newLocalSubjectAccessReviews(c, namespace) +} + +func (c *AuthorizationV1beta1Client) SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface { + return newSelfSubjectAccessReviews(c) +} + +func (c *AuthorizationV1beta1Client) SubjectAccessReviews() SubjectAccessReviewInterface { + return newSubjectAccessReviews(c) +} + +// NewForConfig creates a new AuthorizationV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*AuthorizationV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &AuthorizationV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new AuthorizationV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *AuthorizationV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new AuthorizationV1beta1Client for the given RESTClient. +func New(c rest.Interface) *AuthorizationV1beta1Client { + return &AuthorizationV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *AuthorizationV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go new file mode 100644 index 000000000..11b523897 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go new file mode 100644 index 000000000..2b7e8ca0b --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go @@ -0,0 +1,17 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go similarity index 84% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go rename to vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go index c605b8d04..9b8e10341 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,6 +16,10 @@ limitations under the License. package v1beta1 +import ( + rest "k8s.io/client-go/rest" +) + // LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface. // A group's client should implement this interface. type LocalSubjectAccessReviewsGetter interface { @@ -29,14 +33,14 @@ type LocalSubjectAccessReviewInterface interface { // localSubjectAccessReviews implements LocalSubjectAccessReviewInterface type localSubjectAccessReviews struct { - client *AuthorizationClient + client rest.Interface ns string } // newLocalSubjectAccessReviews returns a LocalSubjectAccessReviews -func newLocalSubjectAccessReviews(c *AuthorizationClient, namespace string) *localSubjectAccessReviews { +func newLocalSubjectAccessReviews(c *AuthorizationV1beta1Client, namespace string) *localSubjectAccessReviews { return &localSubjectAccessReviews{ - client: c, + client: c.RESTClient(), ns: namespace, } } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go new file mode 100644 index 000000000..d2ce4f0d7 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go @@ -0,0 +1,36 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1beta1" +) + +type LocalSubjectAccessReviewExpansion interface { + Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) +} + +func (c *localSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) { + result = &authorizationapi.LocalSubjectAccessReview{} + err = c.client.Post(). + Namespace(c.ns). + Resource("localsubjectaccessreviews"). + Body(sar). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go similarity index 84% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go rename to vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go index 7e0fd5fc2..1ef3e49af 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,6 +16,10 @@ limitations under the License. package v1beta1 +import ( + rest "k8s.io/client-go/rest" +) + // SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface. // A group's client should implement this interface. type SelfSubjectAccessReviewsGetter interface { @@ -29,12 +33,12 @@ type SelfSubjectAccessReviewInterface interface { // selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface type selfSubjectAccessReviews struct { - client *AuthorizationClient + client rest.Interface } // newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews -func newSelfSubjectAccessReviews(c *AuthorizationClient) *selfSubjectAccessReviews { +func newSelfSubjectAccessReviews(c *AuthorizationV1beta1Client) *selfSubjectAccessReviews { return &selfSubjectAccessReviews{ - client: c, + client: c.RESTClient(), } } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go new file mode 100644 index 000000000..d341eb14a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go @@ -0,0 +1,35 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1beta1" +) + +type SelfSubjectAccessReviewExpansion interface { + Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) +} + +func (c *selfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) { + result = &authorizationapi.SelfSubjectAccessReview{} + err = c.client.Post(). + Resource("selfsubjectaccessreviews"). + Body(sar). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go similarity index 84% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go rename to vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go index 1c9367218..cd60e9df6 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,6 +16,10 @@ limitations under the License. package v1beta1 +import ( + rest "k8s.io/client-go/rest" +) + // SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface. // A group's client should implement this interface. type SubjectAccessReviewsGetter interface { @@ -29,12 +33,12 @@ type SubjectAccessReviewInterface interface { // subjectAccessReviews implements SubjectAccessReviewInterface type subjectAccessReviews struct { - client *AuthorizationClient + client rest.Interface } // newSubjectAccessReviews returns a SubjectAccessReviews -func newSubjectAccessReviews(c *AuthorizationClient) *subjectAccessReviews { +func newSubjectAccessReviews(c *AuthorizationV1beta1Client) *subjectAccessReviews { return &subjectAccessReviews{ - client: c, + client: c.RESTClient(), } } diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go similarity index 94% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go index 788ac3db3..8d03b0811 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - authorizationapi "k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1" + authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1beta1" ) // The SubjectAccessReviewExpansion interface allows manually adding extra methods to the AuthorizationInterface. diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go new file mode 100644 index 000000000..b235891c9 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go @@ -0,0 +1,88 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/apis/autoscaling/v1" + rest "k8s.io/client-go/rest" +) + +type AutoscalingV1Interface interface { + RESTClient() rest.Interface + HorizontalPodAutoscalersGetter +} + +// AutoscalingV1Client is used to interact with features provided by the autoscaling group. +type AutoscalingV1Client struct { + restClient rest.Interface +} + +func (c *AutoscalingV1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { + return newHorizontalPodAutoscalers(c, namespace) +} + +// NewForConfig creates a new AutoscalingV1Client for the given config. +func NewForConfig(c *rest.Config) (*AutoscalingV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &AutoscalingV1Client{client}, nil +} + +// NewForConfigOrDie creates a new AutoscalingV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *AutoscalingV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new AutoscalingV1Client for the given RESTClient. +func New(c rest.Interface) *AutoscalingV1Client { + return &AutoscalingV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *AutoscalingV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go new file mode 100644 index 000000000..54673bfa7 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go similarity index 93% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/generated_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go index 3e37a64ef..effefbd50 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go similarity index 69% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go rename to vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go index b28317919..f9c790af2 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/apis/autoscaling/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/apis/autoscaling/v1" + rest "k8s.io/client-go/rest" ) // HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface. @@ -33,25 +36,25 @@ type HorizontalPodAutoscalerInterface interface { Create(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.HorizontalPodAutoscaler, error) - List(opts api.ListOptions) (*v1.HorizontalPodAutoscalerList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.HorizontalPodAutoscaler, error) + List(opts meta_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) HorizontalPodAutoscalerExpansion } // horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface type horizontalPodAutoscalers struct { - client *AutoscalingClient + client rest.Interface ns string } // newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers -func newHorizontalPodAutoscalers(c *AutoscalingClient, namespace string) *horizontalPodAutoscalers { +func newHorizontalPodAutoscalers(c *AutoscalingV1Client, namespace string) *horizontalPodAutoscalers { return &horizontalPodAutoscalers{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,6 +84,9 @@ func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.Horizontal return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Put(). @@ -95,7 +101,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.Hori } // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. -func (c *horizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error { +func (c *horizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). @@ -106,52 +112,53 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *api.DeleteOption } // DeleteCollection deletes a collection of objects. -func (c *horizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *horizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. -func (c *horizontalPodAutoscalers) Get(name string) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Get(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. -func (c *horizontalPodAutoscalers) List(opts api.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { +func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { result = &v1.HorizontalPodAutoscalerList{} err = c.client.Get(). Namespace(c.ns). Resource("horizontalpodautoscalers"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *horizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("horizontalpodautoscalers"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *horizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/autoscaling_client.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/autoscaling_client.go new file mode 100644 index 000000000..0d16aa3e9 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/autoscaling_client.go @@ -0,0 +1,88 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2alpha1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1" + rest "k8s.io/client-go/rest" +) + +type AutoscalingV2alpha1Interface interface { + RESTClient() rest.Interface + HorizontalPodAutoscalersGetter +} + +// AutoscalingV2alpha1Client is used to interact with features provided by the autoscaling group. +type AutoscalingV2alpha1Client struct { + restClient rest.Interface +} + +func (c *AutoscalingV2alpha1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { + return newHorizontalPodAutoscalers(c, namespace) +} + +// NewForConfig creates a new AutoscalingV2alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*AutoscalingV2alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &AutoscalingV2alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new AutoscalingV2alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *AutoscalingV2alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new AutoscalingV2alpha1Client for the given RESTClient. +func New(c rest.Interface) *AutoscalingV2alpha1Client { + return &AutoscalingV2alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v2alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *AutoscalingV2alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/doc.go similarity index 76% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/doc.go rename to vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/doc.go index 087b478c9..d29bd3f4e 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/doc.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch -// +k8s:openapi-gen=true +// This package is generated by client-gen with custom arguments. +// This package has the automatically generated typed clients. package v2alpha1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/generated_expansion.go new file mode 100644 index 000000000..e40f2c5a1 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/generated_expansion.go @@ -0,0 +1,19 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2alpha1 + +type HorizontalPodAutoscalerExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/horizontalpodautoscaler.go new file mode 100644 index 000000000..c85bfd9f3 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/horizontalpodautoscaler.go @@ -0,0 +1,172 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1" + rest "k8s.io/client-go/rest" +) + +// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface. +// A group's client should implement this interface. +type HorizontalPodAutoscalersGetter interface { + HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface +} + +// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources. +type HorizontalPodAutoscalerInterface interface { + Create(*v2alpha1.HorizontalPodAutoscaler) (*v2alpha1.HorizontalPodAutoscaler, error) + Update(*v2alpha1.HorizontalPodAutoscaler) (*v2alpha1.HorizontalPodAutoscaler, error) + UpdateStatus(*v2alpha1.HorizontalPodAutoscaler) (*v2alpha1.HorizontalPodAutoscaler, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v2alpha1.HorizontalPodAutoscaler, error) + List(opts v1.ListOptions) (*v2alpha1.HorizontalPodAutoscalerList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.HorizontalPodAutoscaler, err error) + HorizontalPodAutoscalerExpansion +} + +// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface +type horizontalPodAutoscalers struct { + client rest.Interface + ns string +} + +// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers +func newHorizontalPodAutoscalers(c *AutoscalingV2alpha1Client, namespace string) *horizontalPodAutoscalers { + return &horizontalPodAutoscalers{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2alpha1.HorizontalPodAutoscaler) (result *v2alpha1.HorizontalPodAutoscaler, err error) { + result = &v2alpha1.HorizontalPodAutoscaler{} + err = c.client.Post(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Body(horizontalPodAutoscaler). + Do(). + Into(result) + return +} + +// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2alpha1.HorizontalPodAutoscaler) (result *v2alpha1.HorizontalPodAutoscaler, err error) { + result = &v2alpha1.HorizontalPodAutoscaler{} + err = c.client.Put(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(horizontalPodAutoscaler.Name). + Body(horizontalPodAutoscaler). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + +func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2alpha1.HorizontalPodAutoscaler) (result *v2alpha1.HorizontalPodAutoscaler, err error) { + result = &v2alpha1.HorizontalPodAutoscaler{} + err = c.client.Put(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(horizontalPodAutoscaler.Name). + SubResource("status"). + Body(horizontalPodAutoscaler). + Do(). + Into(result) + return +} + +// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. +func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. +func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2alpha1.HorizontalPodAutoscaler, err error) { + result = &v2alpha1.HorizontalPodAutoscaler{} + err = c.client.Get(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. +func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2alpha1.HorizontalPodAutoscalerList, err error) { + result = &v2alpha1.HorizontalPodAutoscalerList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. +func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.HorizontalPodAutoscaler, err error) { + result = &v2alpha1.HorizontalPodAutoscaler{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go new file mode 100644 index 000000000..c8766f5b6 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go @@ -0,0 +1,88 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/apis/batch/v1" + rest "k8s.io/client-go/rest" +) + +type BatchV1Interface interface { + RESTClient() rest.Interface + JobsGetter +} + +// BatchV1Client is used to interact with features provided by the batch group. +type BatchV1Client struct { + restClient rest.Interface +} + +func (c *BatchV1Client) Jobs(namespace string) JobInterface { + return newJobs(c, namespace) +} + +// NewForConfig creates a new BatchV1Client for the given config. +func NewForConfig(c *rest.Config) (*BatchV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &BatchV1Client{client}, nil +} + +// NewForConfigOrDie creates a new BatchV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *BatchV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new BatchV1Client for the given RESTClient. +func New(c rest.Interface) *BatchV1Client { + return &BatchV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *BatchV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go new file mode 100644 index 000000000..54673bfa7 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go new file mode 100644 index 000000000..68d7741fa --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go @@ -0,0 +1,19 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +type JobExpansion interface{} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/job.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go similarity index 64% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/job.go rename to vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go index c201bddc7..c8120f6d8 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/job.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/apis/batch/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/apis/batch/v1" + rest "k8s.io/client-go/rest" ) // JobsGetter has a method to return a JobInterface. @@ -33,25 +36,25 @@ type JobInterface interface { Create(*v1.Job) (*v1.Job, error) Update(*v1.Job) (*v1.Job, error) UpdateStatus(*v1.Job) (*v1.Job, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.Job, error) - List(opts api.ListOptions) (*v1.JobList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.Job, error) + List(opts meta_v1.ListOptions) (*v1.JobList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) JobExpansion } // jobs implements JobInterface type jobs struct { - client *BatchClient + client rest.Interface ns string } // newJobs returns a Jobs -func newJobs(c *BatchClient, namespace string) *jobs { +func newJobs(c *BatchV1Client, namespace string) *jobs { return &jobs{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,6 +84,9 @@ func (c *jobs) Update(job *v1.Job) (result *v1.Job, err error) { return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Put(). @@ -95,7 +101,7 @@ func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) { } // Delete takes name of the job and deletes it. Returns an error if one occurs. -func (c *jobs) Delete(name string, options *api.DeleteOptions) error { +func (c *jobs) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). @@ -106,52 +112,53 @@ func (c *jobs) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *jobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *jobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the job, and returns the corresponding job object, and an error if there is any. -func (c *jobs) Get(name string) (result *v1.Job, err error) { +func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Get(). Namespace(c.ns). Resource("jobs"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *jobs) List(opts api.ListOptions) (result *v1.JobList, err error) { +func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) { result = &v1.JobList{} err = c.client.Get(). Namespace(c.ns). Resource("jobs"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested jobs. -func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("jobs"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched job. -func (c *jobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { +func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go new file mode 100644 index 000000000..e2b2dd5cd --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go @@ -0,0 +1,88 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2alpha1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1" + rest "k8s.io/client-go/rest" +) + +type BatchV2alpha1Interface interface { + RESTClient() rest.Interface + CronJobsGetter +} + +// BatchV2alpha1Client is used to interact with features provided by the batch group. +type BatchV2alpha1Client struct { + restClient rest.Interface +} + +func (c *BatchV2alpha1Client) CronJobs(namespace string) CronJobInterface { + return newCronJobs(c, namespace) +} + +// NewForConfig creates a new BatchV2alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*BatchV2alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &BatchV2alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new BatchV2alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *BatchV2alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new BatchV2alpha1Client for the given RESTClient. +func New(c rest.Interface) *BatchV2alpha1Client { + return &BatchV2alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v2alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *BatchV2alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go new file mode 100644 index 000000000..2447f2add --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go @@ -0,0 +1,172 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1" + rest "k8s.io/client-go/rest" +) + +// CronJobsGetter has a method to return a CronJobInterface. +// A group's client should implement this interface. +type CronJobsGetter interface { + CronJobs(namespace string) CronJobInterface +} + +// CronJobInterface has methods to work with CronJob resources. +type CronJobInterface interface { + Create(*v2alpha1.CronJob) (*v2alpha1.CronJob, error) + Update(*v2alpha1.CronJob) (*v2alpha1.CronJob, error) + UpdateStatus(*v2alpha1.CronJob) (*v2alpha1.CronJob, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v2alpha1.CronJob, error) + List(opts v1.ListOptions) (*v2alpha1.CronJobList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) + CronJobExpansion +} + +// cronJobs implements CronJobInterface +type cronJobs struct { + client rest.Interface + ns string +} + +// newCronJobs returns a CronJobs +func newCronJobs(c *BatchV2alpha1Client, namespace string) *cronJobs { + return &cronJobs{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. +func (c *cronJobs) Create(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) { + result = &v2alpha1.CronJob{} + err = c.client.Post(). + Namespace(c.ns). + Resource("cronjobs"). + Body(cronJob). + Do(). + Into(result) + return +} + +// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any. +func (c *cronJobs) Update(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) { + result = &v2alpha1.CronJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("cronjobs"). + Name(cronJob.Name). + Body(cronJob). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + +func (c *cronJobs) UpdateStatus(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) { + result = &v2alpha1.CronJob{} + err = c.client.Put(). + Namespace(c.ns). + Resource("cronjobs"). + Name(cronJob.Name). + SubResource("status"). + Body(cronJob). + Do(). + Into(result) + return +} + +// Delete takes name of the cronJob and deletes it. Returns an error if one occurs. +func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("cronjobs"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("cronjobs"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any. +func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) { + result = &v2alpha1.CronJob{} + err = c.client.Get(). + Namespace(c.ns). + Resource("cronjobs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of CronJobs that match those selectors. +func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) { + result = &v2alpha1.CronJobList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("cronjobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested cronJobs. +func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("cronjobs"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched cronJob. +func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) { + result = &v2alpha1.CronJob{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("cronjobs"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go new file mode 100644 index 000000000..d29bd3f4e --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v2alpha1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go new file mode 100644 index 000000000..078027ef4 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go @@ -0,0 +1,19 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2alpha1 + +type CronJobExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go new file mode 100644 index 000000000..c9c39acb2 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go @@ -0,0 +1,88 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1" + rest "k8s.io/client-go/rest" +) + +type CertificatesV1beta1Interface interface { + RESTClient() rest.Interface + CertificateSigningRequestsGetter +} + +// CertificatesV1beta1Client is used to interact with features provided by the certificates.k8s.io group. +type CertificatesV1beta1Client struct { + restClient rest.Interface +} + +func (c *CertificatesV1beta1Client) CertificateSigningRequests() CertificateSigningRequestInterface { + return newCertificateSigningRequests(c) +} + +// NewForConfig creates a new CertificatesV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*CertificatesV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &CertificatesV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new CertificatesV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *CertificatesV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new CertificatesV1beta1Client for the given RESTClient. +func New(c rest.Interface) *CertificatesV1beta1Client { + return &CertificatesV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *CertificatesV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/certificatesigningrequest.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go similarity index 56% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/certificatesigningrequest.go rename to vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go index 07e6a0404..7407ef068 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/certificatesigningrequest.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,12 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1alpha1 "k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1" - watch "k8s.io/client-go/1.5/pkg/watch" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1" + rest "k8s.io/client-go/rest" ) // CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface. @@ -30,33 +33,33 @@ type CertificateSigningRequestsGetter interface { // CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources. type CertificateSigningRequestInterface interface { - Create(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) - Update(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) - UpdateStatus(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1alpha1.CertificateSigningRequest, error) - List(opts api.ListOptions) (*v1alpha1.CertificateSigningRequestList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.CertificateSigningRequest, err error) + Create(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) + Update(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) + UpdateStatus(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.CertificateSigningRequest, error) + List(opts v1.ListOptions) (*v1beta1.CertificateSigningRequestList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) CertificateSigningRequestExpansion } // certificateSigningRequests implements CertificateSigningRequestInterface type certificateSigningRequests struct { - client *CertificatesClient + client rest.Interface } // newCertificateSigningRequests returns a CertificateSigningRequests -func newCertificateSigningRequests(c *CertificatesClient) *certificateSigningRequests { +func newCertificateSigningRequests(c *CertificatesV1beta1Client) *certificateSigningRequests { return &certificateSigningRequests{ - client: c, + client: c.RESTClient(), } } // Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *certificateSigningRequests) Create(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +func (c *certificateSigningRequests) Create(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Post(). Resource("certificatesigningrequests"). Body(certificateSigningRequest). @@ -66,8 +69,8 @@ func (c *certificateSigningRequests) Create(certificateSigningRequest *v1alpha1. } // Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *certificateSigningRequests) Update(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +func (c *certificateSigningRequests) Update(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Put(). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). @@ -77,8 +80,11 @@ func (c *certificateSigningRequests) Update(certificateSigningRequest *v1alpha1. return } -func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + +func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Put(). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). @@ -90,7 +96,7 @@ func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1a } // Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. -func (c *certificateSigningRequests) Delete(name string, options *api.DeleteOptions) error { +func (c *certificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("certificatesigningrequests"). Name(name). @@ -100,49 +106,50 @@ func (c *certificateSigningRequests) Delete(name string, options *api.DeleteOpti } // DeleteCollection deletes a collection of objects. -func (c *certificateSigningRequests) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("certificatesigningrequests"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any. -func (c *certificateSigningRequests) Get(name string) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +func (c *certificateSigningRequests) Get(name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Get(). Resource("certificatesigningrequests"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. -func (c *certificateSigningRequests) List(opts api.ListOptions) (result *v1alpha1.CertificateSigningRequestList, err error) { - result = &v1alpha1.CertificateSigningRequestList{} +func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) { + result = &v1beta1.CertificateSigningRequestList{} err = c.client.Get(). Resource("certificatesigningrequests"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested certificateSigningRequests. -func (c *certificateSigningRequests) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Resource("certificatesigningrequests"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched certificateSigningRequest. -func (c *certificateSigningRequests) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +func (c *certificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Patch(pt). Resource("certificatesigningrequests"). SubResource(subresources...). diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go new file mode 100644 index 000000000..4765bba8a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go @@ -0,0 +1,37 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + certificates "k8s.io/client-go/pkg/apis/certificates/v1beta1" +) + +type CertificateSigningRequestExpansion interface { + UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) +} + +func (c *certificateSigningRequests) UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { + result = &certificates.CertificateSigningRequest{} + err = c.client.Put(). + Resource("certificatesigningrequests"). + Name(certificateSigningRequest.Name). + Body(certificateSigningRequest). + SubResource("approval"). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go new file mode 100644 index 000000000..11b523897 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go new file mode 100644 index 000000000..2b7e8ca0b --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go @@ -0,0 +1,17 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/componentstatus.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go similarity index 65% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/componentstatus.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go index bcdbbc34a..50671976a 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/componentstatus.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // ComponentStatusesGetter has a method to return a ComponentStatusInterface. @@ -32,24 +35,24 @@ type ComponentStatusesGetter interface { type ComponentStatusInterface interface { Create(*v1.ComponentStatus) (*v1.ComponentStatus, error) Update(*v1.ComponentStatus) (*v1.ComponentStatus, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.ComponentStatus, error) - List(opts api.ListOptions) (*v1.ComponentStatusList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.ComponentStatus, error) + List(opts meta_v1.ListOptions) (*v1.ComponentStatusList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) ComponentStatusExpansion } // componentStatuses implements ComponentStatusInterface type componentStatuses struct { - client *CoreClient + client rest.Interface } // newComponentStatuses returns a ComponentStatuses -func newComponentStatuses(c *CoreClient) *componentStatuses { +func newComponentStatuses(c *CoreV1Client) *componentStatuses { return &componentStatuses{ - client: c, + client: c.RESTClient(), } } @@ -77,7 +80,7 @@ func (c *componentStatuses) Update(componentStatus *v1.ComponentStatus) (result } // Delete takes name of the componentStatus and deletes it. Returns an error if one occurs. -func (c *componentStatuses) Delete(name string, options *api.DeleteOptions) error { +func (c *componentStatuses) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Resource("componentstatuses"). Name(name). @@ -87,48 +90,49 @@ func (c *componentStatuses) Delete(name string, options *api.DeleteOptions) erro } // DeleteCollection deletes a collection of objects. -func (c *componentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *componentStatuses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("componentstatuses"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any. -func (c *componentStatuses) Get(name string) (result *v1.ComponentStatus, err error) { +func (c *componentStatuses) Get(name string, options meta_v1.GetOptions) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Get(). Resource("componentstatuses"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors. -func (c *componentStatuses) List(opts api.ListOptions) (result *v1.ComponentStatusList, err error) { +func (c *componentStatuses) List(opts meta_v1.ListOptions) (result *v1.ComponentStatusList, err error) { result = &v1.ComponentStatusList{} err = c.client.Get(). Resource("componentstatuses"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested componentStatuses. -func (c *componentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *componentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Resource("componentstatuses"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched componentStatus. -func (c *componentStatuses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) { +func (c *componentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Patch(pt). Resource("componentstatuses"). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/configmap.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go similarity index 66% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/configmap.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go index 5ede52bc4..bb21636e2 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/configmap.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // ConfigMapsGetter has a method to return a ConfigMapInterface. @@ -32,25 +35,25 @@ type ConfigMapsGetter interface { type ConfigMapInterface interface { Create(*v1.ConfigMap) (*v1.ConfigMap, error) Update(*v1.ConfigMap) (*v1.ConfigMap, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.ConfigMap, error) - List(opts api.ListOptions) (*v1.ConfigMapList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.ConfigMap, error) + List(opts meta_v1.ListOptions) (*v1.ConfigMapList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) ConfigMapExpansion } // configMaps implements ConfigMapInterface type configMaps struct { - client *CoreClient + client rest.Interface ns string } // newConfigMaps returns a ConfigMaps -func newConfigMaps(c *CoreClient, namespace string) *configMaps { +func newConfigMaps(c *CoreV1Client, namespace string) *configMaps { return &configMaps{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,7 +84,7 @@ func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err } // Delete takes name of the configMap and deletes it. Returns an error if one occurs. -func (c *configMaps) Delete(name string, options *api.DeleteOptions) error { +func (c *configMaps) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). @@ -92,52 +95,53 @@ func (c *configMaps) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *configMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *configMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any. -func (c *configMaps) Get(name string) (result *v1.ConfigMap, err error) { +func (c *configMaps) Get(name string, options meta_v1.GetOptions) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Get(). Namespace(c.ns). Resource("configmaps"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. -func (c *configMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, err error) { +func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) { result = &v1.ConfigMapList{} err = c.client.Get(). Namespace(c.ns). Resource("configmaps"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested configMaps. -func (c *configMaps) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("configmaps"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched configMap. -func (c *configMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { +func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go new file mode 100644 index 000000000..0972960d1 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go @@ -0,0 +1,163 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" +) + +type CoreV1Interface interface { + RESTClient() rest.Interface + ComponentStatusesGetter + ConfigMapsGetter + EndpointsGetter + EventsGetter + LimitRangesGetter + NamespacesGetter + NodesGetter + PersistentVolumesGetter + PersistentVolumeClaimsGetter + PodsGetter + PodTemplatesGetter + ReplicationControllersGetter + ResourceQuotasGetter + SecretsGetter + ServicesGetter + ServiceAccountsGetter +} + +// CoreV1Client is used to interact with features provided by the group. +type CoreV1Client struct { + restClient rest.Interface +} + +func (c *CoreV1Client) ComponentStatuses() ComponentStatusInterface { + return newComponentStatuses(c) +} + +func (c *CoreV1Client) ConfigMaps(namespace string) ConfigMapInterface { + return newConfigMaps(c, namespace) +} + +func (c *CoreV1Client) Endpoints(namespace string) EndpointsInterface { + return newEndpoints(c, namespace) +} + +func (c *CoreV1Client) Events(namespace string) EventInterface { + return newEvents(c, namespace) +} + +func (c *CoreV1Client) LimitRanges(namespace string) LimitRangeInterface { + return newLimitRanges(c, namespace) +} + +func (c *CoreV1Client) Namespaces() NamespaceInterface { + return newNamespaces(c) +} + +func (c *CoreV1Client) Nodes() NodeInterface { + return newNodes(c) +} + +func (c *CoreV1Client) PersistentVolumes() PersistentVolumeInterface { + return newPersistentVolumes(c) +} + +func (c *CoreV1Client) PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface { + return newPersistentVolumeClaims(c, namespace) +} + +func (c *CoreV1Client) Pods(namespace string) PodInterface { + return newPods(c, namespace) +} + +func (c *CoreV1Client) PodTemplates(namespace string) PodTemplateInterface { + return newPodTemplates(c, namespace) +} + +func (c *CoreV1Client) ReplicationControllers(namespace string) ReplicationControllerInterface { + return newReplicationControllers(c, namespace) +} + +func (c *CoreV1Client) ResourceQuotas(namespace string) ResourceQuotaInterface { + return newResourceQuotas(c, namespace) +} + +func (c *CoreV1Client) Secrets(namespace string) SecretInterface { + return newSecrets(c, namespace) +} + +func (c *CoreV1Client) Services(namespace string) ServiceInterface { + return newServices(c, namespace) +} + +func (c *CoreV1Client) ServiceAccounts(namespace string) ServiceAccountInterface { + return newServiceAccounts(c, namespace) +} + +// NewForConfig creates a new CoreV1Client for the given config. +func NewForConfig(c *rest.Config) (*CoreV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &CoreV1Client{client}, nil +} + +// NewForConfigOrDie creates a new CoreV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *CoreV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new CoreV1Client for the given RESTClient. +func New(c rest.Interface) *CoreV1Client { + return &CoreV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/api" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *CoreV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/doc.go new file mode 100644 index 000000000..54673bfa7 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/endpoints.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go similarity index 66% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/endpoints.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go index 119e92da3..3580742a8 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/endpoints.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // EndpointsGetter has a method to return a EndpointsInterface. @@ -32,25 +35,25 @@ type EndpointsGetter interface { type EndpointsInterface interface { Create(*v1.Endpoints) (*v1.Endpoints, error) Update(*v1.Endpoints) (*v1.Endpoints, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.Endpoints, error) - List(opts api.ListOptions) (*v1.EndpointsList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.Endpoints, error) + List(opts meta_v1.ListOptions) (*v1.EndpointsList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) EndpointsExpansion } // endpoints implements EndpointsInterface type endpoints struct { - client *CoreClient + client rest.Interface ns string } // newEndpoints returns a Endpoints -func newEndpoints(c *CoreClient, namespace string) *endpoints { +func newEndpoints(c *CoreV1Client, namespace string) *endpoints { return &endpoints{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,7 +84,7 @@ func (c *endpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err e } // Delete takes name of the endpoints and deletes it. Returns an error if one occurs. -func (c *endpoints) Delete(name string, options *api.DeleteOptions) error { +func (c *endpoints) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("endpoints"). @@ -92,52 +95,53 @@ func (c *endpoints) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *endpoints) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *endpoints) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("endpoints"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any. -func (c *endpoints) Get(name string) (result *v1.Endpoints, err error) { +func (c *endpoints) Get(name string, options meta_v1.GetOptions) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Get(). Namespace(c.ns). Resource("endpoints"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of Endpoints that match those selectors. -func (c *endpoints) List(opts api.ListOptions) (result *v1.EndpointsList, err error) { +func (c *endpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, err error) { result = &v1.EndpointsList{} err = c.client.Get(). Namespace(c.ns). Resource("endpoints"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested endpoints. -func (c *endpoints) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *endpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("endpoints"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched endpoints. -func (c *endpoints) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) { +func (c *endpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/event.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go similarity index 65% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/event.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go index e4a7ef6a9..c4ac11006 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/event.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // EventsGetter has a method to return a EventInterface. @@ -32,25 +35,25 @@ type EventsGetter interface { type EventInterface interface { Create(*v1.Event) (*v1.Event, error) Update(*v1.Event) (*v1.Event, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.Event, error) - List(opts api.ListOptions) (*v1.EventList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.Event, error) + List(opts meta_v1.ListOptions) (*v1.EventList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) EventExpansion } // events implements EventInterface type events struct { - client *CoreClient + client rest.Interface ns string } // newEvents returns a Events -func newEvents(c *CoreClient, namespace string) *events { +func newEvents(c *CoreV1Client, namespace string) *events { return &events{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,7 +84,7 @@ func (c *events) Update(event *v1.Event) (result *v1.Event, err error) { } // Delete takes name of the event and deletes it. Returns an error if one occurs. -func (c *events) Delete(name string, options *api.DeleteOptions) error { +func (c *events) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). @@ -92,52 +95,53 @@ func (c *events) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *events) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *events) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the event, and returns the corresponding event object, and an error if there is any. -func (c *events) Get(name string) (result *v1.Event, err error) { +func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Get(). Namespace(c.ns). Resource("events"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of Events that match those selectors. -func (c *events) List(opts api.ListOptions) (result *v1.EventList, err error) { +func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) { result = &v1.EventList{} err = c.client.Get(). Namespace(c.ns). Resource("events"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested events. -func (c *events) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("events"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched event. -func (c *events) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { +func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/event_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go similarity index 91% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/event_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go index b768053ba..9b4490ea9 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/event_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go @@ -19,10 +19,11 @@ package v1 import ( "fmt" - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/fields" - "k8s.io/client-go/1.5/pkg/runtime" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/pkg/api/v1" ) // The EventExpansion interface allows manually adding extra methods to the EventInterface. @@ -33,7 +34,7 @@ type EventExpansion interface { UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) PatchWithEventNamespace(event *v1.Event, data []byte) (*v1.Event, error) // Search finds events about the specified object - Search(objOrRef runtime.Object) (*v1.EventList, error) + Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.EventList, error) // Returns the appropriate field selector based on the API version being used to communicate with the server. // The returned field selector can be used with List and Watch to filter desired events. GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector @@ -84,7 +85,7 @@ func (e *events) PatchWithEventNamespace(incompleteEvent *v1.Event, data []byte) return nil, fmt.Errorf("can't patch an event with namespace '%v' in namespace '%v'", incompleteEvent.Namespace, e.ns) } result := &v1.Event{} - err := e.client.Patch(api.StrategicMergePatchType). + err := e.client.Patch(types.StrategicMergePatchType). NamespaceIfScoped(incompleteEvent.Namespace, len(incompleteEvent.Namespace) > 0). Resource("events"). Name(incompleteEvent.Name). @@ -97,8 +98,8 @@ func (e *events) PatchWithEventNamespace(incompleteEvent *v1.Event, data []byte) // Search finds events about the specified object. The namespace of the // object must match this event's client namespace unless the event client // was made with the "" namespace. -func (e *events) Search(objOrRef runtime.Object) (*v1.EventList, error) { - ref, err := api.GetReference(objOrRef) +func (e *events) Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.EventList, error) { + ref, err := v1.GetReference(scheme, objOrRef) if err != nil { return nil, err } @@ -116,7 +117,7 @@ func (e *events) Search(objOrRef runtime.Object) (*v1.EventList, error) { refUID = &stringRefUID } fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID) - return e.List(api.ListOptions{FieldSelector: fieldSelector}) + return e.List(metav1.ListOptions{FieldSelector: fieldSelector.String()}) } // Returns the appropriate field selector based on the API version being used to communicate with the server. diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go similarity index 93% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/generated_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go index 0039ffd03..5fe0585b4 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,8 +24,6 @@ type EndpointsExpansion interface{} type LimitRangeExpansion interface{} -type NodeExpansion interface{} - type PersistentVolumeExpansion interface{} type PersistentVolumeClaimExpansion interface{} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/limitrange.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go similarity index 66% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/limitrange.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go index 784656901..998f03452 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/limitrange.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // LimitRangesGetter has a method to return a LimitRangeInterface. @@ -32,25 +35,25 @@ type LimitRangesGetter interface { type LimitRangeInterface interface { Create(*v1.LimitRange) (*v1.LimitRange, error) Update(*v1.LimitRange) (*v1.LimitRange, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.LimitRange, error) - List(opts api.ListOptions) (*v1.LimitRangeList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.LimitRange, error) + List(opts meta_v1.ListOptions) (*v1.LimitRangeList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) LimitRangeExpansion } // limitRanges implements LimitRangeInterface type limitRanges struct { - client *CoreClient + client rest.Interface ns string } // newLimitRanges returns a LimitRanges -func newLimitRanges(c *CoreClient, namespace string) *limitRanges { +func newLimitRanges(c *CoreV1Client, namespace string) *limitRanges { return &limitRanges{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,7 +84,7 @@ func (c *limitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRange, } // Delete takes name of the limitRange and deletes it. Returns an error if one occurs. -func (c *limitRanges) Delete(name string, options *api.DeleteOptions) error { +func (c *limitRanges) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("limitranges"). @@ -92,52 +95,53 @@ func (c *limitRanges) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *limitRanges) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *limitRanges) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("limitranges"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any. -func (c *limitRanges) Get(name string) (result *v1.LimitRange, err error) { +func (c *limitRanges) Get(name string, options meta_v1.GetOptions) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Get(). Namespace(c.ns). Resource("limitranges"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of LimitRanges that match those selectors. -func (c *limitRanges) List(opts api.ListOptions) (result *v1.LimitRangeList, err error) { +func (c *limitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList, err error) { result = &v1.LimitRangeList{} err = c.client.Get(). Namespace(c.ns). Resource("limitranges"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested limitRanges. -func (c *limitRanges) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *limitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("limitranges"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched limitRange. -func (c *limitRanges) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) { +func (c *limitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/namespace.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go similarity index 64% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/namespace.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go index 7aed5bfd3..3092bd8e1 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/namespace.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // NamespacesGetter has a method to return a NamespaceInterface. @@ -33,24 +36,24 @@ type NamespaceInterface interface { Create(*v1.Namespace) (*v1.Namespace, error) Update(*v1.Namespace) (*v1.Namespace, error) UpdateStatus(*v1.Namespace) (*v1.Namespace, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.Namespace, error) - List(opts api.ListOptions) (*v1.NamespaceList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.Namespace, error) + List(opts meta_v1.ListOptions) (*v1.NamespaceList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) NamespaceExpansion } // namespaces implements NamespaceInterface type namespaces struct { - client *CoreClient + client rest.Interface } // newNamespaces returns a Namespaces -func newNamespaces(c *CoreClient) *namespaces { +func newNamespaces(c *CoreV1Client) *namespaces { return &namespaces{ - client: c, + client: c.RESTClient(), } } @@ -77,6 +80,9 @@ func (c *namespaces) Update(namespace *v1.Namespace) (result *v1.Namespace, err return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Put(). @@ -90,7 +96,7 @@ func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace } // Delete takes name of the namespace and deletes it. Returns an error if one occurs. -func (c *namespaces) Delete(name string, options *api.DeleteOptions) error { +func (c *namespaces) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Resource("namespaces"). Name(name). @@ -100,48 +106,49 @@ func (c *namespaces) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *namespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *namespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("namespaces"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any. -func (c *namespaces) Get(name string) (result *v1.Namespace, err error) { +func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Get(). Resource("namespaces"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of Namespaces that match those selectors. -func (c *namespaces) List(opts api.ListOptions) (result *v1.NamespaceList, err error) { +func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) { result = &v1.NamespaceList{} err = c.client.Get(). Resource("namespaces"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested namespaces. -func (c *namespaces) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Resource("namespaces"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched namespace. -func (c *namespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { +func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Patch(pt). Resource("namespaces"). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/namespace_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go similarity index 96% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/namespace_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go index 5ab37194a..203430000 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/namespace_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go @@ -16,7 +16,7 @@ limitations under the License. package v1 -import "k8s.io/client-go/1.5/pkg/api/v1" +import "k8s.io/client-go/pkg/api/v1" // The NamespaceExpansion interface allows manually adding extra methods to the NamespaceInterface. type NamespaceExpansion interface { diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/node.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go similarity index 63% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/node.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go index 26cf2e30d..6b82d4fab 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/node.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // NodesGetter has a method to return a NodeInterface. @@ -33,24 +36,24 @@ type NodeInterface interface { Create(*v1.Node) (*v1.Node, error) Update(*v1.Node) (*v1.Node, error) UpdateStatus(*v1.Node) (*v1.Node, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.Node, error) - List(opts api.ListOptions) (*v1.NodeList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.Node, error) + List(opts meta_v1.ListOptions) (*v1.NodeList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) NodeExpansion } // nodes implements NodeInterface type nodes struct { - client *CoreClient + client rest.Interface } // newNodes returns a Nodes -func newNodes(c *CoreClient) *nodes { +func newNodes(c *CoreV1Client) *nodes { return &nodes{ - client: c, + client: c.RESTClient(), } } @@ -77,6 +80,9 @@ func (c *nodes) Update(node *v1.Node) (result *v1.Node, err error) { return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + func (c *nodes) UpdateStatus(node *v1.Node) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Put(). @@ -90,7 +96,7 @@ func (c *nodes) UpdateStatus(node *v1.Node) (result *v1.Node, err error) { } // Delete takes name of the node and deletes it. Returns an error if one occurs. -func (c *nodes) Delete(name string, options *api.DeleteOptions) error { +func (c *nodes) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Resource("nodes"). Name(name). @@ -100,48 +106,49 @@ func (c *nodes) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *nodes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *nodes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("nodes"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the node, and returns the corresponding node object, and an error if there is any. -func (c *nodes) Get(name string) (result *v1.Node, err error) { +func (c *nodes) Get(name string, options meta_v1.GetOptions) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Get(). Resource("nodes"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of Nodes that match those selectors. -func (c *nodes) List(opts api.ListOptions) (result *v1.NodeList, err error) { +func (c *nodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error) { result = &v1.NodeList{} err = c.client.Get(). Resource("nodes"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested nodes. -func (c *nodes) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *nodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Resource("nodes"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched node. -func (c *nodes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) { +func (c *nodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Patch(pt). Resource("nodes"). diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go new file mode 100644 index 000000000..29c12aabc --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go @@ -0,0 +1,43 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/pkg/api/v1" +) + +// The NodeExpansion interface allows manually adding extra methods to the NodeInterface. +type NodeExpansion interface { + // PatchStatus modifies the status of an existing node. It returns the copy + // of the node that the server returns, or an error. + PatchStatus(nodeName string, data []byte) (*v1.Node, error) +} + +// PatchStatus modifies the status of an existing node. It returns the copy of +// the node that the server returns, or an error. +func (c *nodes) PatchStatus(nodeName string, data []byte) (*v1.Node, error) { + result := &v1.Node{} + err := c.client.Patch(types.StrategicMergePatchType). + Resource("nodes"). + Name(nodeName). + SubResource("status"). + Body(data). + Do(). + Into(result) + return result, err +} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/persistentvolume.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go similarity index 66% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/persistentvolume.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go index 31cd3b6da..16a4b7316 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/persistentvolume.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // PersistentVolumesGetter has a method to return a PersistentVolumeInterface. @@ -33,24 +36,24 @@ type PersistentVolumeInterface interface { Create(*v1.PersistentVolume) (*v1.PersistentVolume, error) Update(*v1.PersistentVolume) (*v1.PersistentVolume, error) UpdateStatus(*v1.PersistentVolume) (*v1.PersistentVolume, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.PersistentVolume, error) - List(opts api.ListOptions) (*v1.PersistentVolumeList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.PersistentVolume, error) + List(opts meta_v1.ListOptions) (*v1.PersistentVolumeList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) PersistentVolumeExpansion } // persistentVolumes implements PersistentVolumeInterface type persistentVolumes struct { - client *CoreClient + client rest.Interface } // newPersistentVolumes returns a PersistentVolumes -func newPersistentVolumes(c *CoreClient) *persistentVolumes { +func newPersistentVolumes(c *CoreV1Client) *persistentVolumes { return &persistentVolumes{ - client: c, + client: c.RESTClient(), } } @@ -77,6 +80,9 @@ func (c *persistentVolumes) Update(persistentVolume *v1.PersistentVolume) (resul return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + func (c *persistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Put(). @@ -90,7 +96,7 @@ func (c *persistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolume) } // Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs. -func (c *persistentVolumes) Delete(name string, options *api.DeleteOptions) error { +func (c *persistentVolumes) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Resource("persistentvolumes"). Name(name). @@ -100,48 +106,49 @@ func (c *persistentVolumes) Delete(name string, options *api.DeleteOptions) erro } // DeleteCollection deletes a collection of objects. -func (c *persistentVolumes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *persistentVolumes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("persistentvolumes"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any. -func (c *persistentVolumes) Get(name string) (result *v1.PersistentVolume, err error) { +func (c *persistentVolumes) Get(name string, options meta_v1.GetOptions) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Get(). Resource("persistentvolumes"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors. -func (c *persistentVolumes) List(opts api.ListOptions) (result *v1.PersistentVolumeList, err error) { +func (c *persistentVolumes) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeList, err error) { result = &v1.PersistentVolumeList{} err = c.client.Get(). Resource("persistentvolumes"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested persistentVolumes. -func (c *persistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *persistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Resource("persistentvolumes"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched persistentVolume. -func (c *persistentVolumes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) { +func (c *persistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Patch(pt). Resource("persistentvolumes"). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go similarity index 68% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/persistentvolumeclaim.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go index aa2a996c9..ae7cc4a4f 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/persistentvolumeclaim.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // PersistentVolumeClaimsGetter has a method to return a PersistentVolumeClaimInterface. @@ -33,25 +36,25 @@ type PersistentVolumeClaimInterface interface { Create(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) Update(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) UpdateStatus(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.PersistentVolumeClaim, error) - List(opts api.ListOptions) (*v1.PersistentVolumeClaimList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.PersistentVolumeClaim, error) + List(opts meta_v1.ListOptions) (*v1.PersistentVolumeClaimList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) PersistentVolumeClaimExpansion } // persistentVolumeClaims implements PersistentVolumeClaimInterface type persistentVolumeClaims struct { - client *CoreClient + client rest.Interface ns string } // newPersistentVolumeClaims returns a PersistentVolumeClaims -func newPersistentVolumeClaims(c *CoreClient, namespace string) *persistentVolumeClaims { +func newPersistentVolumeClaims(c *CoreV1Client, namespace string) *persistentVolumeClaims { return &persistentVolumeClaims{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,6 +84,9 @@ func (c *persistentVolumeClaims) Update(persistentVolumeClaim *v1.PersistentVolu return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + func (c *persistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Put(). @@ -95,7 +101,7 @@ func (c *persistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.Persiste } // Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs. -func (c *persistentVolumeClaims) Delete(name string, options *api.DeleteOptions) error { +func (c *persistentVolumeClaims) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("persistentvolumeclaims"). @@ -106,52 +112,53 @@ func (c *persistentVolumeClaims) Delete(name string, options *api.DeleteOptions) } // DeleteCollection deletes a collection of objects. -func (c *persistentVolumeClaims) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *persistentVolumeClaims) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("persistentvolumeclaims"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any. -func (c *persistentVolumeClaims) Get(name string) (result *v1.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) Get(name string, options meta_v1.GetOptions) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Get(). Namespace(c.ns). Resource("persistentvolumeclaims"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors. -func (c *persistentVolumeClaims) List(opts api.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { +func (c *persistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { result = &v1.PersistentVolumeClaimList{} err = c.client.Get(). Namespace(c.ns). Resource("persistentvolumeclaims"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested persistentVolumeClaims. -func (c *persistentVolumeClaims) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *persistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("persistentvolumeclaims"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched persistentVolumeClaim. -func (c *persistentVolumeClaims) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/pod.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go similarity index 64% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/pod.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go index ad6e0eb20..5648750ea 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/pod.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // PodsGetter has a method to return a PodInterface. @@ -33,25 +36,25 @@ type PodInterface interface { Create(*v1.Pod) (*v1.Pod, error) Update(*v1.Pod) (*v1.Pod, error) UpdateStatus(*v1.Pod) (*v1.Pod, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.Pod, error) - List(opts api.ListOptions) (*v1.PodList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.Pod, error) + List(opts meta_v1.ListOptions) (*v1.PodList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) PodExpansion } // pods implements PodInterface type pods struct { - client *CoreClient + client rest.Interface ns string } // newPods returns a Pods -func newPods(c *CoreClient, namespace string) *pods { +func newPods(c *CoreV1Client, namespace string) *pods { return &pods{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,6 +84,9 @@ func (c *pods) Update(pod *v1.Pod) (result *v1.Pod, err error) { return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + func (c *pods) UpdateStatus(pod *v1.Pod) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Put(). @@ -95,7 +101,7 @@ func (c *pods) UpdateStatus(pod *v1.Pod) (result *v1.Pod, err error) { } // Delete takes name of the pod and deletes it. Returns an error if one occurs. -func (c *pods) Delete(name string, options *api.DeleteOptions) error { +func (c *pods) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("pods"). @@ -106,52 +112,53 @@ func (c *pods) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *pods) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *pods) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("pods"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the pod, and returns the corresponding pod object, and an error if there is any. -func (c *pods) Get(name string) (result *v1.Pod, err error) { +func (c *pods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Get(). Namespace(c.ns). Resource("pods"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of Pods that match those selectors. -func (c *pods) List(opts api.ListOptions) (result *v1.PodList, err error) { +func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) { result = &v1.PodList{} err = c.client.Get(). Namespace(c.ns). Resource("pods"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested pods. -func (c *pods) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *pods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("pods"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched pod. -func (c *pods) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) { +func (c *pods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/pod_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go similarity index 86% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/pod_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go index a2a85a3f8..82f3b7fba 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/pod_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go @@ -17,17 +17,17 @@ limitations under the License. package v1 import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/v1" - policy "k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1" - "k8s.io/client-go/1.5/rest" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/api/v1" + policy "k8s.io/client-go/pkg/apis/policy/v1beta1" + restclient "k8s.io/client-go/rest" ) // The PodExpansion interface allows manually adding extra methods to the PodInterface. type PodExpansion interface { Bind(binding *v1.Binding) error Evict(eviction *policy.Eviction) error - GetLogs(name string, opts *v1.PodLogOptions) *rest.Request + GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request } // Bind applies the provided binding to the named pod in the current namespace (binding.Namespace is ignored). @@ -40,6 +40,6 @@ func (c *pods) Evict(eviction *policy.Eviction) error { } // Get constructs a request for getting the logs for a pod -func (c *pods) GetLogs(name string, opts *v1.PodLogOptions) *rest.Request { +func (c *pods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request { return c.client.Get().Namespace(c.ns).Name(name).Resource("pods").SubResource("log").VersionedParams(opts, api.ParameterCodec) } diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/podtemplate.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go similarity index 66% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/podtemplate.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go index 98788ea6d..19c82f17b 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/podtemplate.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // PodTemplatesGetter has a method to return a PodTemplateInterface. @@ -32,25 +35,25 @@ type PodTemplatesGetter interface { type PodTemplateInterface interface { Create(*v1.PodTemplate) (*v1.PodTemplate, error) Update(*v1.PodTemplate) (*v1.PodTemplate, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.PodTemplate, error) - List(opts api.ListOptions) (*v1.PodTemplateList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.PodTemplate, error) + List(opts meta_v1.ListOptions) (*v1.PodTemplateList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) PodTemplateExpansion } // podTemplates implements PodTemplateInterface type podTemplates struct { - client *CoreClient + client rest.Interface ns string } // newPodTemplates returns a PodTemplates -func newPodTemplates(c *CoreClient, namespace string) *podTemplates { +func newPodTemplates(c *CoreV1Client, namespace string) *podTemplates { return &podTemplates{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,7 +84,7 @@ func (c *podTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTempla } // Delete takes name of the podTemplate and deletes it. Returns an error if one occurs. -func (c *podTemplates) Delete(name string, options *api.DeleteOptions) error { +func (c *podTemplates) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("podtemplates"). @@ -92,52 +95,53 @@ func (c *podTemplates) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *podTemplates) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *podTemplates) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("podtemplates"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any. -func (c *podTemplates) Get(name string) (result *v1.PodTemplate, err error) { +func (c *podTemplates) Get(name string, options meta_v1.GetOptions) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Get(). Namespace(c.ns). Resource("podtemplates"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of PodTemplates that match those selectors. -func (c *podTemplates) List(opts api.ListOptions) (result *v1.PodTemplateList, err error) { +func (c *podTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateList, err error) { result = &v1.PodTemplateList{} err = c.client.Get(). Namespace(c.ns). Resource("podtemplates"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested podTemplates. -func (c *podTemplates) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *podTemplates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("podtemplates"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched podTemplate. -func (c *podTemplates) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) { +func (c *podTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/replicationcontroller.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go similarity index 68% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/replicationcontroller.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go index eb4f789ec..2f4f4fa9e 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/replicationcontroller.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // ReplicationControllersGetter has a method to return a ReplicationControllerInterface. @@ -33,25 +36,25 @@ type ReplicationControllerInterface interface { Create(*v1.ReplicationController) (*v1.ReplicationController, error) Update(*v1.ReplicationController) (*v1.ReplicationController, error) UpdateStatus(*v1.ReplicationController) (*v1.ReplicationController, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.ReplicationController, error) - List(opts api.ListOptions) (*v1.ReplicationControllerList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.ReplicationController, error) + List(opts meta_v1.ListOptions) (*v1.ReplicationControllerList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) ReplicationControllerExpansion } // replicationControllers implements ReplicationControllerInterface type replicationControllers struct { - client *CoreClient + client rest.Interface ns string } // newReplicationControllers returns a ReplicationControllers -func newReplicationControllers(c *CoreClient, namespace string) *replicationControllers { +func newReplicationControllers(c *CoreV1Client, namespace string) *replicationControllers { return &replicationControllers{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,6 +84,9 @@ func (c *replicationControllers) Update(replicationController *v1.ReplicationCon return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + func (c *replicationControllers) UpdateStatus(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Put(). @@ -95,7 +101,7 @@ func (c *replicationControllers) UpdateStatus(replicationController *v1.Replicat } // Delete takes name of the replicationController and deletes it. Returns an error if one occurs. -func (c *replicationControllers) Delete(name string, options *api.DeleteOptions) error { +func (c *replicationControllers) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicationcontrollers"). @@ -106,52 +112,53 @@ func (c *replicationControllers) Delete(name string, options *api.DeleteOptions) } // DeleteCollection deletes a collection of objects. -func (c *replicationControllers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *replicationControllers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicationcontrollers"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any. -func (c *replicationControllers) Get(name string) (result *v1.ReplicationController, err error) { +func (c *replicationControllers) Get(name string, options meta_v1.GetOptions) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Get(). Namespace(c.ns). Resource("replicationcontrollers"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors. -func (c *replicationControllers) List(opts api.ListOptions) (result *v1.ReplicationControllerList, err error) { +func (c *replicationControllers) List(opts meta_v1.ListOptions) (result *v1.ReplicationControllerList, err error) { result = &v1.ReplicationControllerList{} err = c.client.Get(). Namespace(c.ns). Resource("replicationcontrollers"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested replicationControllers. -func (c *replicationControllers) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *replicationControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("replicationcontrollers"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched replicationController. -func (c *replicationControllers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) { +func (c *replicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/resourcequota.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go similarity index 67% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/resourcequota.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go index 0b58bcf20..565fe1e6d 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/resourcequota.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // ResourceQuotasGetter has a method to return a ResourceQuotaInterface. @@ -33,25 +36,25 @@ type ResourceQuotaInterface interface { Create(*v1.ResourceQuota) (*v1.ResourceQuota, error) Update(*v1.ResourceQuota) (*v1.ResourceQuota, error) UpdateStatus(*v1.ResourceQuota) (*v1.ResourceQuota, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.ResourceQuota, error) - List(opts api.ListOptions) (*v1.ResourceQuotaList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.ResourceQuota, error) + List(opts meta_v1.ListOptions) (*v1.ResourceQuotaList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) ResourceQuotaExpansion } // resourceQuotas implements ResourceQuotaInterface type resourceQuotas struct { - client *CoreClient + client rest.Interface ns string } // newResourceQuotas returns a ResourceQuotas -func newResourceQuotas(c *CoreClient, namespace string) *resourceQuotas { +func newResourceQuotas(c *CoreV1Client, namespace string) *resourceQuotas { return &resourceQuotas{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,6 +84,9 @@ func (c *resourceQuotas) Update(resourceQuota *v1.ResourceQuota) (result *v1.Res return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + func (c *resourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Put(). @@ -95,7 +101,7 @@ func (c *resourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (result * } // Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs. -func (c *resourceQuotas) Delete(name string, options *api.DeleteOptions) error { +func (c *resourceQuotas) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("resourcequotas"). @@ -106,52 +112,53 @@ func (c *resourceQuotas) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *resourceQuotas) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *resourceQuotas) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("resourcequotas"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any. -func (c *resourceQuotas) Get(name string) (result *v1.ResourceQuota, err error) { +func (c *resourceQuotas) Get(name string, options meta_v1.GetOptions) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Get(). Namespace(c.ns). Resource("resourcequotas"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors. -func (c *resourceQuotas) List(opts api.ListOptions) (result *v1.ResourceQuotaList, err error) { +func (c *resourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuotaList, err error) { result = &v1.ResourceQuotaList{} err = c.client.Get(). Namespace(c.ns). Resource("resourcequotas"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested resourceQuotas. -func (c *resourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *resourceQuotas) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("resourcequotas"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched resourceQuota. -func (c *resourceQuotas) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) { +func (c *resourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/secret.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go similarity index 65% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/secret.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go index 611b59c01..fbcede818 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/secret.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // SecretsGetter has a method to return a SecretInterface. @@ -32,25 +35,25 @@ type SecretsGetter interface { type SecretInterface interface { Create(*v1.Secret) (*v1.Secret, error) Update(*v1.Secret) (*v1.Secret, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.Secret, error) - List(opts api.ListOptions) (*v1.SecretList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.Secret, error) + List(opts meta_v1.ListOptions) (*v1.SecretList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) SecretExpansion } // secrets implements SecretInterface type secrets struct { - client *CoreClient + client rest.Interface ns string } // newSecrets returns a Secrets -func newSecrets(c *CoreClient, namespace string) *secrets { +func newSecrets(c *CoreV1Client, namespace string) *secrets { return &secrets{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,7 +84,7 @@ func (c *secrets) Update(secret *v1.Secret) (result *v1.Secret, err error) { } // Delete takes name of the secret and deletes it. Returns an error if one occurs. -func (c *secrets) Delete(name string, options *api.DeleteOptions) error { +func (c *secrets) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("secrets"). @@ -92,52 +95,53 @@ func (c *secrets) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *secrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *secrets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("secrets"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the secret, and returns the corresponding secret object, and an error if there is any. -func (c *secrets) Get(name string) (result *v1.Secret, err error) { +func (c *secrets) Get(name string, options meta_v1.GetOptions) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Get(). Namespace(c.ns). Resource("secrets"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of Secrets that match those selectors. -func (c *secrets) List(opts api.ListOptions) (result *v1.SecretList, err error) { +func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) { result = &v1.SecretList{} err = c.client.Get(). Namespace(c.ns). Resource("secrets"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested secrets. -func (c *secrets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("secrets"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched secret. -func (c *secrets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { +func (c *secrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/service.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go similarity index 65% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/service.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go index d40efde6e..0eccf79a8 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/service.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // ServicesGetter has a method to return a ServiceInterface. @@ -33,25 +36,25 @@ type ServiceInterface interface { Create(*v1.Service) (*v1.Service, error) Update(*v1.Service) (*v1.Service, error) UpdateStatus(*v1.Service) (*v1.Service, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.Service, error) - List(opts api.ListOptions) (*v1.ServiceList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.Service, error) + List(opts meta_v1.ListOptions) (*v1.ServiceList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) ServiceExpansion } // services implements ServiceInterface type services struct { - client *CoreClient + client rest.Interface ns string } // newServices returns a Services -func newServices(c *CoreClient, namespace string) *services { +func newServices(c *CoreV1Client, namespace string) *services { return &services{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,6 +84,9 @@ func (c *services) Update(service *v1.Service) (result *v1.Service, err error) { return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Put(). @@ -95,7 +101,7 @@ func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err er } // Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *services) Delete(name string, options *api.DeleteOptions) error { +func (c *services) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). @@ -106,52 +112,53 @@ func (c *services) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *services) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *services) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the service, and returns the corresponding service object, and an error if there is any. -func (c *services) Get(name string) (result *v1.Service, err error) { +func (c *services) Get(name string, options meta_v1.GetOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Get(). Namespace(c.ns). Resource("services"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *services) List(opts api.ListOptions) (result *v1.ServiceList, err error) { +func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) { result = &v1.ServiceList{} err = c.client.Get(). Namespace(c.ns). Resource("services"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested services. -func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("services"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched service. -func (c *services) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { +func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/service_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go similarity index 86% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/service_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go index 89d69f860..4937fd1a3 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/service_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go @@ -17,21 +17,21 @@ limitations under the License. package v1 import ( - "k8s.io/client-go/1.5/pkg/util/net" - "k8s.io/client-go/1.5/rest" + "k8s.io/apimachinery/pkg/util/net" + restclient "k8s.io/client-go/rest" ) // The ServiceExpansion interface allows manually adding extra methods to the ServiceInterface. type ServiceExpansion interface { - ProxyGet(scheme, name, port, path string, params map[string]string) rest.ResponseWrapper + ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper } // ProxyGet returns a response of the service by calling it through the proxy. -func (c *services) ProxyGet(scheme, name, port, path string, params map[string]string) rest.ResponseWrapper { +func (c *services) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper { request := c.client.Get(). - Prefix("proxy"). Namespace(c.ns). Resource("services"). + SubResource("proxy"). Name(net.JoinSchemeNamePort(scheme, name, port)). Suffix(path) for k, v := range params { diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/serviceaccount.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go similarity index 66% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/serviceaccount.go rename to vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go index ce8cc882e..f71789f6a 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/core/v1/serviceaccount.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - watch "k8s.io/client-go/1.5/pkg/watch" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/api/v1" + rest "k8s.io/client-go/rest" ) // ServiceAccountsGetter has a method to return a ServiceAccountInterface. @@ -32,25 +35,25 @@ type ServiceAccountsGetter interface { type ServiceAccountInterface interface { Create(*v1.ServiceAccount) (*v1.ServiceAccount, error) Update(*v1.ServiceAccount) (*v1.ServiceAccount, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1.ServiceAccount, error) - List(opts api.ListOptions) (*v1.ServiceAccountList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.ServiceAccount, error) + List(opts meta_v1.ListOptions) (*v1.ServiceAccountList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) ServiceAccountExpansion } // serviceAccounts implements ServiceAccountInterface type serviceAccounts struct { - client *CoreClient + client rest.Interface ns string } // newServiceAccounts returns a ServiceAccounts -func newServiceAccounts(c *CoreClient, namespace string) *serviceAccounts { +func newServiceAccounts(c *CoreV1Client, namespace string) *serviceAccounts { return &serviceAccounts{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,7 +84,7 @@ func (c *serviceAccounts) Update(serviceAccount *v1.ServiceAccount) (result *v1. } // Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs. -func (c *serviceAccounts) Delete(name string, options *api.DeleteOptions) error { +func (c *serviceAccounts) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("serviceaccounts"). @@ -92,52 +95,53 @@ func (c *serviceAccounts) Delete(name string, options *api.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *serviceAccounts) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *serviceAccounts) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("serviceaccounts"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any. -func (c *serviceAccounts) Get(name string) (result *v1.ServiceAccount, err error) { +func (c *serviceAccounts) Get(name string, options meta_v1.GetOptions) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Get(). Namespace(c.ns). Resource("serviceaccounts"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors. -func (c *serviceAccounts) List(opts api.ListOptions) (result *v1.ServiceAccountList, err error) { +func (c *serviceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAccountList, err error) { result = &v1.ServiceAccountList{} err = c.client.Get(). Namespace(c.ns). Resource("serviceaccounts"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested serviceAccounts. -func (c *serviceAccounts) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *serviceAccounts) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("serviceaccounts"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched serviceAccount. -func (c *serviceAccounts) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) { +func (c *serviceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/daemonset.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go similarity index 66% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/daemonset.go rename to vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go index 2ae93b151..8c132db9b 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/daemonset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1beta1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1beta1 "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1" - watch "k8s.io/client-go/1.5/pkg/watch" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + rest "k8s.io/client-go/rest" ) // DaemonSetsGetter has a method to return a DaemonSetInterface. @@ -33,25 +36,25 @@ type DaemonSetInterface interface { Create(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) Update(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) UpdateStatus(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1beta1.DaemonSet, error) - List(opts api.ListOptions) (*v1beta1.DaemonSetList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.DaemonSet, error) + List(opts v1.ListOptions) (*v1beta1.DaemonSetList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) DaemonSetExpansion } // daemonSets implements DaemonSetInterface type daemonSets struct { - client *ExtensionsClient + client rest.Interface ns string } // newDaemonSets returns a DaemonSets -func newDaemonSets(c *ExtensionsClient, namespace string) *daemonSets { +func newDaemonSets(c *ExtensionsV1beta1Client, namespace string) *daemonSets { return &daemonSets{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,6 +84,9 @@ func (c *daemonSets) Update(daemonSet *v1beta1.DaemonSet) (result *v1beta1.Daemo return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + func (c *daemonSets) UpdateStatus(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Put(). @@ -95,7 +101,7 @@ func (c *daemonSets) UpdateStatus(daemonSet *v1beta1.DaemonSet) (result *v1beta1 } // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. -func (c *daemonSets) Delete(name string, options *api.DeleteOptions) error { +func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). @@ -106,52 +112,53 @@ func (c *daemonSets) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *daemonSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. -func (c *daemonSets) Get(name string) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) Get(name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Get(). Namespace(c.ns). Resource("daemonsets"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. -func (c *daemonSets) List(opts api.ListOptions) (result *v1beta1.DaemonSetList, err error) { +func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) { result = &v1beta1.DaemonSetList{} err = c.client.Get(). Namespace(c.ns). Resource("daemonsets"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested daemonSets. -func (c *daemonSets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("daemonsets"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched daemonSet. -func (c *daemonSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go new file mode 100644 index 000000000..7d0122c2a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go @@ -0,0 +1,172 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + rest "k8s.io/client-go/rest" +) + +// DeploymentsGetter has a method to return a DeploymentInterface. +// A group's client should implement this interface. +type DeploymentsGetter interface { + Deployments(namespace string) DeploymentInterface +} + +// DeploymentInterface has methods to work with Deployment resources. +type DeploymentInterface interface { + Create(*v1beta1.Deployment) (*v1beta1.Deployment, error) + Update(*v1beta1.Deployment) (*v1beta1.Deployment, error) + UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error) + List(opts v1.ListOptions) (*v1beta1.DeploymentList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) + DeploymentExpansion +} + +// deployments implements DeploymentInterface +type deployments struct { + client rest.Interface + ns string +} + +// newDeployments returns a Deployments +func newDeployments(c *ExtensionsV1beta1Client, namespace string) *deployments { + return &deployments{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. +func (c *deployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { + result = &v1beta1.Deployment{} + err = c.client.Post(). + Namespace(c.ns). + Resource("deployments"). + Body(deployment). + Do(). + Into(result) + return +} + +// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. +func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { + result = &v1beta1.Deployment{} + err = c.client.Put(). + Namespace(c.ns). + Resource("deployments"). + Name(deployment.Name). + Body(deployment). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + +func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { + result = &v1beta1.Deployment{} + err = c.client.Put(). + Namespace(c.ns). + Resource("deployments"). + Name(deployment.Name). + SubResource("status"). + Body(deployment). + Do(). + Into(result) + return +} + +// Delete takes name of the deployment and deletes it. Returns an error if one occurs. +func (c *deployments) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("deployments"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("deployments"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. +func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { + result = &v1beta1.Deployment{} + err = c.client.Get(). + Namespace(c.ns). + Resource("deployments"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Deployments that match those selectors. +func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { + result = &v1beta1.DeploymentList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("deployments"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested deployments. +func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("deployments"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched deployment. +func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { + result = &v1beta1.Deployment{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("deployments"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/deployment_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go similarity index 95% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/deployment_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go index 293ed8c44..e737f09ae 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/deployment_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go @@ -16,7 +16,7 @@ limitations under the License. package v1beta1 -import "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1" +import "k8s.io/client-go/pkg/apis/extensions/v1beta1" // The DeploymentExpansion interface allows manually adding extra methods to the DeploymentInterface. type DeploymentExpansion interface { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go new file mode 100644 index 000000000..11b523897 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go new file mode 100644 index 000000000..5284346e1 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go @@ -0,0 +1,118 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + rest "k8s.io/client-go/rest" +) + +type ExtensionsV1beta1Interface interface { + RESTClient() rest.Interface + DaemonSetsGetter + DeploymentsGetter + IngressesGetter + PodSecurityPoliciesGetter + ReplicaSetsGetter + ScalesGetter + ThirdPartyResourcesGetter +} + +// ExtensionsV1beta1Client is used to interact with features provided by the extensions group. +type ExtensionsV1beta1Client struct { + restClient rest.Interface +} + +func (c *ExtensionsV1beta1Client) DaemonSets(namespace string) DaemonSetInterface { + return newDaemonSets(c, namespace) +} + +func (c *ExtensionsV1beta1Client) Deployments(namespace string) DeploymentInterface { + return newDeployments(c, namespace) +} + +func (c *ExtensionsV1beta1Client) Ingresses(namespace string) IngressInterface { + return newIngresses(c, namespace) +} + +func (c *ExtensionsV1beta1Client) PodSecurityPolicies() PodSecurityPolicyInterface { + return newPodSecurityPolicies(c) +} + +func (c *ExtensionsV1beta1Client) ReplicaSets(namespace string) ReplicaSetInterface { + return newReplicaSets(c, namespace) +} + +func (c *ExtensionsV1beta1Client) Scales(namespace string) ScaleInterface { + return newScales(c, namespace) +} + +func (c *ExtensionsV1beta1Client) ThirdPartyResources() ThirdPartyResourceInterface { + return newThirdPartyResources(c) +} + +// NewForConfig creates a new ExtensionsV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*ExtensionsV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &ExtensionsV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new ExtensionsV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *ExtensionsV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new ExtensionsV1beta1Client for the given RESTClient. +func New(c rest.Interface) *ExtensionsV1beta1Client { + return &ExtensionsV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *ExtensionsV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go similarity index 91% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/generated_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go index 60cf61d4b..d0a3d64bc 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -20,8 +20,6 @@ type DaemonSetExpansion interface{} type IngressExpansion interface{} -type JobExpansion interface{} - type PodSecurityPolicyExpansion interface{} type ReplicaSetExpansion interface{} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/ingress.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go similarity index 66% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/ingress.go rename to vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go index 29b93cef5..86bf65b8f 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/ingress.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1beta1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1beta1 "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1" - watch "k8s.io/client-go/1.5/pkg/watch" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + rest "k8s.io/client-go/rest" ) // IngressesGetter has a method to return a IngressInterface. @@ -33,25 +36,25 @@ type IngressInterface interface { Create(*v1beta1.Ingress) (*v1beta1.Ingress, error) Update(*v1beta1.Ingress) (*v1beta1.Ingress, error) UpdateStatus(*v1beta1.Ingress) (*v1beta1.Ingress, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1beta1.Ingress, error) - List(opts api.ListOptions) (*v1beta1.IngressList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.Ingress, error) + List(opts v1.ListOptions) (*v1beta1.IngressList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) IngressExpansion } // ingresses implements IngressInterface type ingresses struct { - client *ExtensionsClient + client rest.Interface ns string } // newIngresses returns a Ingresses -func newIngresses(c *ExtensionsClient, namespace string) *ingresses { +func newIngresses(c *ExtensionsV1beta1Client, namespace string) *ingresses { return &ingresses{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,6 +84,9 @@ func (c *ingresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, e return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + func (c *ingresses) UpdateStatus(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Put(). @@ -95,7 +101,7 @@ func (c *ingresses) UpdateStatus(ingress *v1beta1.Ingress) (result *v1beta1.Ingr } // Delete takes name of the ingress and deletes it. Returns an error if one occurs. -func (c *ingresses) Delete(name string, options *api.DeleteOptions) error { +func (c *ingresses) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("ingresses"). @@ -106,52 +112,53 @@ func (c *ingresses) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *ingresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("ingresses"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. -func (c *ingresses) Get(name string) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Get(). Namespace(c.ns). Resource("ingresses"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of Ingresses that match those selectors. -func (c *ingresses) List(opts api.ListOptions) (result *v1beta1.IngressList, err error) { +func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) { result = &v1beta1.IngressList{} err = c.client.Get(). Namespace(c.ns). Resource("ingresses"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested ingresses. -func (c *ingresses) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("ingresses"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched ingress. -func (c *ingresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go similarity index 66% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go rename to vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go index 53646543b..ad57a6cab 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1beta1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1beta1 "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1" - watch "k8s.io/client-go/1.5/pkg/watch" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + rest "k8s.io/client-go/rest" ) // PodSecurityPoliciesGetter has a method to return a PodSecurityPolicyInterface. @@ -32,24 +35,24 @@ type PodSecurityPoliciesGetter interface { type PodSecurityPolicyInterface interface { Create(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) Update(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1beta1.PodSecurityPolicy, error) - List(opts api.ListOptions) (*v1beta1.PodSecurityPolicyList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) + List(opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) PodSecurityPolicyExpansion } // podSecurityPolicies implements PodSecurityPolicyInterface type podSecurityPolicies struct { - client *ExtensionsClient + client rest.Interface } // newPodSecurityPolicies returns a PodSecurityPolicies -func newPodSecurityPolicies(c *ExtensionsClient) *podSecurityPolicies { +func newPodSecurityPolicies(c *ExtensionsV1beta1Client) *podSecurityPolicies { return &podSecurityPolicies{ - client: c, + client: c.RESTClient(), } } @@ -77,7 +80,7 @@ func (c *podSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolic } // Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs. -func (c *podSecurityPolicies) Delete(name string, options *api.DeleteOptions) error { +func (c *podSecurityPolicies) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("podsecuritypolicies"). Name(name). @@ -87,48 +90,49 @@ func (c *podSecurityPolicies) Delete(name string, options *api.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *podSecurityPolicies) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("podsecuritypolicies"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any. -func (c *podSecurityPolicies) Get(name string) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Get(). Resource("podsecuritypolicies"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors. -func (c *podSecurityPolicies) List(opts api.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { +func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { result = &v1beta1.PodSecurityPolicyList{} err = c.client.Get(). Resource("podsecuritypolicies"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested podSecurityPolicies. -func (c *podSecurityPolicies) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Resource("podsecuritypolicies"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *podSecurityPolicies) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Patch(pt). Resource("podsecuritypolicies"). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/replicaset.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go similarity index 66% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/replicaset.go rename to vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go index 722a4b4e9..aa6f505a2 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/replicaset.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1beta1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1beta1 "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1" - watch "k8s.io/client-go/1.5/pkg/watch" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + rest "k8s.io/client-go/rest" ) // ReplicaSetsGetter has a method to return a ReplicaSetInterface. @@ -33,25 +36,25 @@ type ReplicaSetInterface interface { Create(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) Update(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) UpdateStatus(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1beta1.ReplicaSet, error) - List(opts api.ListOptions) (*v1beta1.ReplicaSetList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.ReplicaSet, error) + List(opts v1.ListOptions) (*v1beta1.ReplicaSetList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) ReplicaSetExpansion } // replicaSets implements ReplicaSetInterface type replicaSets struct { - client *ExtensionsClient + client rest.Interface ns string } // newReplicaSets returns a ReplicaSets -func newReplicaSets(c *ExtensionsClient, namespace string) *replicaSets { +func newReplicaSets(c *ExtensionsV1beta1Client, namespace string) *replicaSets { return &replicaSets{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,6 +84,9 @@ func (c *replicaSets) Update(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.Re return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + func (c *replicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Put(). @@ -95,7 +101,7 @@ func (c *replicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (result *v1be } // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. -func (c *replicaSets) Delete(name string, options *api.DeleteOptions) error { +func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). @@ -106,52 +112,53 @@ func (c *replicaSets) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *replicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. -func (c *replicaSets) Get(name string) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) Get(name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Get(). Namespace(c.ns). Resource("replicasets"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. -func (c *replicaSets) List(opts api.ListOptions) (result *v1beta1.ReplicaSetList, err error) { +func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) { result = &v1beta1.ReplicaSetList{} err = c.client.Get(). Namespace(c.ns). Resource("replicasets"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested replicaSets. -func (c *replicaSets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("replicasets"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched replicaSet. -func (c *replicaSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go new file mode 100644 index 000000000..733012ade --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go @@ -0,0 +1,46 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + rest "k8s.io/client-go/rest" +) + +// ScalesGetter has a method to return a ScaleInterface. +// A group's client should implement this interface. +type ScalesGetter interface { + Scales(namespace string) ScaleInterface +} + +// ScaleInterface has methods to work with Scale resources. +type ScaleInterface interface { + ScaleExpansion +} + +// scales implements ScaleInterface +type scales struct { + client rest.Interface + ns string +} + +// newScales returns a Scales +func newScales(c *ExtensionsV1beta1Client, namespace string) *scales { + return &scales{ + client: c.RESTClient(), + ns: namespace, + } +} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/scale_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale_expansion.go similarity index 86% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/scale_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale_expansion.go index 435506f1c..efeae4b01 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/scale_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale_expansion.go @@ -17,9 +17,9 @@ limitations under the License. package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/api/meta" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/pkg/apis/extensions/v1beta1" ) // The ScaleExpansion interface allows manually adding extra methods to the ScaleInterface. @@ -33,7 +33,7 @@ func (c *scales) Get(kind string, name string) (result *v1beta1.Scale, err error result = &v1beta1.Scale{} // TODO this method needs to take a proper unambiguous kind - fullyQualifiedKind := unversioned.GroupVersionKind{Kind: kind} + fullyQualifiedKind := schema.GroupVersionKind{Kind: kind} resource, _ := meta.KindToResource(fullyQualifiedKind) err = c.client.Get(). @@ -50,7 +50,7 @@ func (c *scales) Update(kind string, scale *v1beta1.Scale) (result *v1beta1.Scal result = &v1beta1.Scale{} // TODO this method needs to take a proper unambiguous kind - fullyQualifiedKind := unversioned.GroupVersionKind{Kind: kind} + fullyQualifiedKind := schema.GroupVersionKind{Kind: kind} resource, _ := meta.KindToResource(fullyQualifiedKind) err = c.client.Put(). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/thirdpartyresource.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/thirdpartyresource.go similarity index 66% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/thirdpartyresource.go rename to vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/thirdpartyresource.go index 65162d46e..617c2069b 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1/thirdpartyresource.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/thirdpartyresource.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1beta1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1beta1 "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1" - watch "k8s.io/client-go/1.5/pkg/watch" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" + rest "k8s.io/client-go/rest" ) // ThirdPartyResourcesGetter has a method to return a ThirdPartyResourceInterface. @@ -32,24 +35,24 @@ type ThirdPartyResourcesGetter interface { type ThirdPartyResourceInterface interface { Create(*v1beta1.ThirdPartyResource) (*v1beta1.ThirdPartyResource, error) Update(*v1beta1.ThirdPartyResource) (*v1beta1.ThirdPartyResource, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1beta1.ThirdPartyResource, error) - List(opts api.ListOptions) (*v1beta1.ThirdPartyResourceList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.ThirdPartyResource, error) + List(opts v1.ListOptions) (*v1beta1.ThirdPartyResourceList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) ThirdPartyResourceExpansion } // thirdPartyResources implements ThirdPartyResourceInterface type thirdPartyResources struct { - client *ExtensionsClient + client rest.Interface } // newThirdPartyResources returns a ThirdPartyResources -func newThirdPartyResources(c *ExtensionsClient) *thirdPartyResources { +func newThirdPartyResources(c *ExtensionsV1beta1Client) *thirdPartyResources { return &thirdPartyResources{ - client: c, + client: c.RESTClient(), } } @@ -77,7 +80,7 @@ func (c *thirdPartyResources) Update(thirdPartyResource *v1beta1.ThirdPartyResou } // Delete takes name of the thirdPartyResource and deletes it. Returns an error if one occurs. -func (c *thirdPartyResources) Delete(name string, options *api.DeleteOptions) error { +func (c *thirdPartyResources) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("thirdpartyresources"). Name(name). @@ -87,48 +90,49 @@ func (c *thirdPartyResources) Delete(name string, options *api.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *thirdPartyResources) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *thirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("thirdpartyresources"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the thirdPartyResource, and returns the corresponding thirdPartyResource object, and an error if there is any. -func (c *thirdPartyResources) Get(name string) (result *v1beta1.ThirdPartyResource, err error) { +func (c *thirdPartyResources) Get(name string, options v1.GetOptions) (result *v1beta1.ThirdPartyResource, err error) { result = &v1beta1.ThirdPartyResource{} err = c.client.Get(). Resource("thirdpartyresources"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of ThirdPartyResources that match those selectors. -func (c *thirdPartyResources) List(opts api.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) { +func (c *thirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) { result = &v1beta1.ThirdPartyResourceList{} err = c.client.Get(). Resource("thirdpartyresources"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested thirdPartyResources. -func (c *thirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Resource("thirdpartyresources"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched thirdPartyResource. -func (c *thirdPartyResources) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) { +func (c *thirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) { result = &v1beta1.ThirdPartyResource{} err = c.client.Patch(pt). Resource("thirdpartyresources"). diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go new file mode 100644 index 000000000..11b523897 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go new file mode 100644 index 000000000..9c4133e36 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go @@ -0,0 +1,46 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + rest "k8s.io/client-go/rest" +) + +// EvictionsGetter has a method to return a EvictionInterface. +// A group's client should implement this interface. +type EvictionsGetter interface { + Evictions(namespace string) EvictionInterface +} + +// EvictionInterface has methods to work with Eviction resources. +type EvictionInterface interface { + EvictionExpansion +} + +// evictions implements EvictionInterface +type evictions struct { + client rest.Interface + ns string +} + +// newEvictions returns a Evictions +func newEvictions(c *PolicyV1beta1Client, namespace string) *evictions { + return &evictions{ + client: c.RESTClient(), + ns: namespace, + } +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go new file mode 100644 index 000000000..bde1baca6 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go @@ -0,0 +1,38 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + policy "k8s.io/client-go/pkg/apis/policy/v1beta1" +) + +// The EvictionExpansion interface allows manually adding extra methods to the ScaleInterface. +type EvictionExpansion interface { + Evict(eviction *policy.Eviction) error +} + +func (c *evictions) Evict(eviction *policy.Eviction) error { + return c.client.Post(). + AbsPath("/api/v1"). + Namespace(eviction.Namespace). + Resource("pods"). + Name(eviction.Name). + SubResource("eviction"). + Body(eviction). + Do(). + Error() +} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go similarity index 91% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/generated_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go index a2e74c84d..511adc6ef 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 type PodDisruptionBudgetExpansion interface{} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/poddisruptionbudget.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go similarity index 54% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/poddisruptionbudget.go rename to vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go index f3cdd3acd..8088dd019 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1/poddisruptionbudget.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,12 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1alpha1 "k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1" - watch "k8s.io/client-go/1.5/pkg/watch" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1" + rest "k8s.io/client-go/rest" ) // PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface. @@ -30,35 +33,35 @@ type PodDisruptionBudgetsGetter interface { // PodDisruptionBudgetInterface has methods to work with PodDisruptionBudget resources. type PodDisruptionBudgetInterface interface { - Create(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - Update(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - UpdateStatus(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1alpha1.PodDisruptionBudget, error) - List(opts api.ListOptions) (*v1alpha1.PodDisruptionBudgetList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) + Create(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) + Update(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) + UpdateStatus(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.PodDisruptionBudget, error) + List(opts v1.ListOptions) (*v1beta1.PodDisruptionBudgetList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) PodDisruptionBudgetExpansion } // podDisruptionBudgets implements PodDisruptionBudgetInterface type podDisruptionBudgets struct { - client *PolicyClient + client rest.Interface ns string } // newPodDisruptionBudgets returns a PodDisruptionBudgets -func newPodDisruptionBudgets(c *PolicyClient, namespace string) *podDisruptionBudgets { +func newPodDisruptionBudgets(c *PolicyV1beta1Client, namespace string) *podDisruptionBudgets { return &podDisruptionBudgets{ - client: c, + client: c.RESTClient(), ns: namespace, } } // Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Create(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} +func (c *podDisruptionBudgets) Create(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) { + result = &v1beta1.PodDisruptionBudget{} err = c.client.Post(). Namespace(c.ns). Resource("poddisruptionbudgets"). @@ -69,8 +72,8 @@ func (c *podDisruptionBudgets) Create(podDisruptionBudget *v1alpha1.PodDisruptio } // Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Update(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} +func (c *podDisruptionBudgets) Update(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) { + result = &v1beta1.PodDisruptionBudget{} err = c.client.Put(). Namespace(c.ns). Resource("poddisruptionbudgets"). @@ -81,8 +84,11 @@ func (c *podDisruptionBudgets) Update(podDisruptionBudget *v1alpha1.PodDisruptio return } -func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + +func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) { + result = &v1beta1.PodDisruptionBudget{} err = c.client.Put(). Namespace(c.ns). Resource("poddisruptionbudgets"). @@ -95,7 +101,7 @@ func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1alpha1.PodDis } // Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs. -func (c *podDisruptionBudgets) Delete(name string, options *api.DeleteOptions) error { +func (c *podDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("poddisruptionbudgets"). @@ -106,53 +112,54 @@ func (c *podDisruptionBudgets) Delete(name string, options *api.DeleteOptions) e } // DeleteCollection deletes a collection of objects. -func (c *podDisruptionBudgets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("poddisruptionbudgets"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any. -func (c *podDisruptionBudgets) Get(name string) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} +func (c *podDisruptionBudgets) Get(name string, options v1.GetOptions) (result *v1beta1.PodDisruptionBudget, err error) { + result = &v1beta1.PodDisruptionBudget{} err = c.client.Get(). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. -func (c *podDisruptionBudgets) List(opts api.ListOptions) (result *v1alpha1.PodDisruptionBudgetList, err error) { - result = &v1alpha1.PodDisruptionBudgetList{} +func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) { + result = &v1beta1.PodDisruptionBudgetList{} err = c.client.Get(). Namespace(c.ns). Resource("poddisruptionbudgets"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *podDisruptionBudgets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("poddisruptionbudgets"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched podDisruptionBudget. -func (c *podDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} +func (c *podDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { + result = &v1beta1.PodDisruptionBudget{} err = c.client.Patch(pt). Namespace(c.ns). Resource("poddisruptionbudgets"). diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go new file mode 100644 index 000000000..9d62aad04 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go @@ -0,0 +1,93 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1" + rest "k8s.io/client-go/rest" +) + +type PolicyV1beta1Interface interface { + RESTClient() rest.Interface + EvictionsGetter + PodDisruptionBudgetsGetter +} + +// PolicyV1beta1Client is used to interact with features provided by the policy group. +type PolicyV1beta1Client struct { + restClient rest.Interface +} + +func (c *PolicyV1beta1Client) Evictions(namespace string) EvictionInterface { + return newEvictions(c, namespace) +} + +func (c *PolicyV1beta1Client) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface { + return newPodDisruptionBudgets(c, namespace) +} + +// NewForConfig creates a new PolicyV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*PolicyV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &PolicyV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new PolicyV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *PolicyV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new PolicyV1beta1Client for the given RESTClient. +func New(c rest.Interface) *PolicyV1beta1Client { + return &PolicyV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *PolicyV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go similarity index 65% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/clusterrole.go rename to vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go index 8e4a838d1..241061025 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/clusterrole.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1alpha1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1alpha1 "k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1" - watch "k8s.io/client-go/1.5/pkg/watch" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + rest "k8s.io/client-go/rest" ) // ClusterRolesGetter has a method to return a ClusterRoleInterface. @@ -32,24 +35,24 @@ type ClusterRolesGetter interface { type ClusterRoleInterface interface { Create(*v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error) Update(*v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1alpha1.ClusterRole, error) - List(opts api.ListOptions) (*v1alpha1.ClusterRoleList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1alpha1.ClusterRole, error) + List(opts v1.ListOptions) (*v1alpha1.ClusterRoleList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) ClusterRoleExpansion } // clusterRoles implements ClusterRoleInterface type clusterRoles struct { - client *RbacClient + client rest.Interface } // newClusterRoles returns a ClusterRoles -func newClusterRoles(c *RbacClient) *clusterRoles { +func newClusterRoles(c *RbacV1alpha1Client) *clusterRoles { return &clusterRoles{ - client: c, + client: c.RESTClient(), } } @@ -77,7 +80,7 @@ func (c *clusterRoles) Update(clusterRole *v1alpha1.ClusterRole) (result *v1alph } // Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. -func (c *clusterRoles) Delete(name string, options *api.DeleteOptions) error { +func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("clusterroles"). Name(name). @@ -87,48 +90,49 @@ func (c *clusterRoles) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *clusterRoles) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("clusterroles"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. -func (c *clusterRoles) Get(name string) (result *v1alpha1.ClusterRole, err error) { +func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Get(). Resource("clusterroles"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. -func (c *clusterRoles) List(opts api.ListOptions) (result *v1alpha1.ClusterRoleList, err error) { +func (c *clusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) { result = &v1alpha1.ClusterRoleList{} err = c.client.Get(). Resource("clusterroles"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *clusterRoles) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Resource("clusterroles"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched clusterRole. -func (c *clusterRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) { +func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Patch(pt). Resource("clusterroles"). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go similarity index 67% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go rename to vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go index 919f84074..bc48873a5 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1alpha1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1alpha1 "k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1" - watch "k8s.io/client-go/1.5/pkg/watch" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + rest "k8s.io/client-go/rest" ) // ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface. @@ -32,24 +35,24 @@ type ClusterRoleBindingsGetter interface { type ClusterRoleBindingInterface interface { Create(*v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error) Update(*v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1alpha1.ClusterRoleBinding, error) - List(opts api.ListOptions) (*v1alpha1.ClusterRoleBindingList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1alpha1.ClusterRoleBinding, error) + List(opts v1.ListOptions) (*v1alpha1.ClusterRoleBindingList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) ClusterRoleBindingExpansion } // clusterRoleBindings implements ClusterRoleBindingInterface type clusterRoleBindings struct { - client *RbacClient + client rest.Interface } // newClusterRoleBindings returns a ClusterRoleBindings -func newClusterRoleBindings(c *RbacClient) *clusterRoleBindings { +func newClusterRoleBindings(c *RbacV1alpha1Client) *clusterRoleBindings { return &clusterRoleBindings{ - client: c, + client: c.RESTClient(), } } @@ -77,7 +80,7 @@ func (c *clusterRoleBindings) Update(clusterRoleBinding *v1alpha1.ClusterRoleBin } // Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. -func (c *clusterRoleBindings) Delete(name string, options *api.DeleteOptions) error { +func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("clusterrolebindings"). Name(name). @@ -87,48 +90,49 @@ func (c *clusterRoleBindings) Delete(name string, options *api.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *clusterRoleBindings) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("clusterrolebindings"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. -func (c *clusterRoleBindings) Get(name string) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Get(). Resource("clusterrolebindings"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. -func (c *clusterRoleBindings) List(opts api.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) { +func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) { result = &v1alpha1.ClusterRoleBindingList{} err = c.client.Get(). Resource("clusterrolebindings"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *clusterRoleBindings) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Resource("clusterrolebindings"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *clusterRoleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Patch(pt). Resource("clusterrolebindings"). diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go similarity index 76% rename from vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/doc.go rename to vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go index 5e6926dfa..ba8d10d3b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/doc.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps -// +k8s:openapi-gen=true +// This package is generated by client-gen with custom arguments. +// This package has the automatically generated typed clients. package v1alpha1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go similarity index 94% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/generated_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go index 86def2663..f506fc346 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go new file mode 100644 index 000000000..67256d50f --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go @@ -0,0 +1,103 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + rest "k8s.io/client-go/rest" +) + +type RbacV1alpha1Interface interface { + RESTClient() rest.Interface + ClusterRolesGetter + ClusterRoleBindingsGetter + RolesGetter + RoleBindingsGetter +} + +// RbacV1alpha1Client is used to interact with features provided by the rbac.authorization.k8s.io group. +type RbacV1alpha1Client struct { + restClient rest.Interface +} + +func (c *RbacV1alpha1Client) ClusterRoles() ClusterRoleInterface { + return newClusterRoles(c) +} + +func (c *RbacV1alpha1Client) ClusterRoleBindings() ClusterRoleBindingInterface { + return newClusterRoleBindings(c) +} + +func (c *RbacV1alpha1Client) Roles(namespace string) RoleInterface { + return newRoles(c, namespace) +} + +func (c *RbacV1alpha1Client) RoleBindings(namespace string) RoleBindingInterface { + return newRoleBindings(c, namespace) +} + +// NewForConfig creates a new RbacV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*RbacV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &RbacV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new RbacV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *RbacV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new RbacV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *RbacV1alpha1Client { + return &RbacV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *RbacV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go similarity index 65% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/role.go rename to vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go index 72de75c65..9c4fa915e 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/role.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1alpha1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1alpha1 "k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1" - watch "k8s.io/client-go/1.5/pkg/watch" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + rest "k8s.io/client-go/rest" ) // RolesGetter has a method to return a RoleInterface. @@ -32,25 +35,25 @@ type RolesGetter interface { type RoleInterface interface { Create(*v1alpha1.Role) (*v1alpha1.Role, error) Update(*v1alpha1.Role) (*v1alpha1.Role, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1alpha1.Role, error) - List(opts api.ListOptions) (*v1alpha1.RoleList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1alpha1.Role, error) + List(opts v1.ListOptions) (*v1alpha1.RoleList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) RoleExpansion } // roles implements RoleInterface type roles struct { - client *RbacClient + client rest.Interface ns string } // newRoles returns a Roles -func newRoles(c *RbacClient, namespace string) *roles { +func newRoles(c *RbacV1alpha1Client, namespace string) *roles { return &roles{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,7 +84,7 @@ func (c *roles) Update(role *v1alpha1.Role) (result *v1alpha1.Role, err error) { } // Delete takes name of the role and deletes it. Returns an error if one occurs. -func (c *roles) Delete(name string, options *api.DeleteOptions) error { +func (c *roles) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("roles"). @@ -92,52 +95,53 @@ func (c *roles) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *roles) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("roles"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the role, and returns the corresponding role object, and an error if there is any. -func (c *roles) Get(name string) (result *v1alpha1.Role, err error) { +func (c *roles) Get(name string, options v1.GetOptions) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Get(). Namespace(c.ns). Resource("roles"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of Roles that match those selectors. -func (c *roles) List(opts api.ListOptions) (result *v1alpha1.RoleList, err error) { +func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error) { result = &v1alpha1.RoleList{} err = c.client.Get(). Namespace(c.ns). Resource("roles"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested roles. -func (c *roles) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("roles"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched role. -func (c *roles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) { +func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go similarity index 66% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/rolebinding.go rename to vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go index 649a9dd30..5e81967f1 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1/rolebinding.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1alpha1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1alpha1 "k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1" - watch "k8s.io/client-go/1.5/pkg/watch" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + rest "k8s.io/client-go/rest" ) // RoleBindingsGetter has a method to return a RoleBindingInterface. @@ -32,25 +35,25 @@ type RoleBindingsGetter interface { type RoleBindingInterface interface { Create(*v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error) Update(*v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1alpha1.RoleBinding, error) - List(opts api.ListOptions) (*v1alpha1.RoleBindingList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1alpha1.RoleBinding, error) + List(opts v1.ListOptions) (*v1alpha1.RoleBindingList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) RoleBindingExpansion } // roleBindings implements RoleBindingInterface type roleBindings struct { - client *RbacClient + client rest.Interface ns string } // newRoleBindings returns a RoleBindings -func newRoleBindings(c *RbacClient, namespace string) *roleBindings { +func newRoleBindings(c *RbacV1alpha1Client, namespace string) *roleBindings { return &roleBindings{ - client: c, + client: c.RESTClient(), ns: namespace, } } @@ -81,7 +84,7 @@ func (c *roleBindings) Update(roleBinding *v1alpha1.RoleBinding) (result *v1alph } // Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. -func (c *roleBindings) Delete(name string, options *api.DeleteOptions) error { +func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("rolebindings"). @@ -92,52 +95,53 @@ func (c *roleBindings) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *roleBindings) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("rolebindings"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. -func (c *roleBindings) Get(name string) (result *v1alpha1.RoleBinding, err error) { +func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Get(). Namespace(c.ns). Resource("rolebindings"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of RoleBindings that match those selectors. -func (c *roleBindings) List(opts api.ListOptions) (result *v1alpha1.RoleBindingList, err error) { +func (c *roleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) { result = &v1alpha1.RoleBindingList{} err = c.client.Get(). Namespace(c.ns). Resource("rolebindings"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested roleBindings. -func (c *roleBindings) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Namespace(c.ns). Resource("rolebindings"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched roleBinding. -func (c *roleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) { +func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go new file mode 100644 index 000000000..6a63571f3 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go @@ -0,0 +1,145 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + rest "k8s.io/client-go/rest" +) + +// ClusterRolesGetter has a method to return a ClusterRoleInterface. +// A group's client should implement this interface. +type ClusterRolesGetter interface { + ClusterRoles() ClusterRoleInterface +} + +// ClusterRoleInterface has methods to work with ClusterRole resources. +type ClusterRoleInterface interface { + Create(*v1beta1.ClusterRole) (*v1beta1.ClusterRole, error) + Update(*v1beta1.ClusterRole) (*v1beta1.ClusterRole, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.ClusterRole, error) + List(opts v1.ListOptions) (*v1beta1.ClusterRoleList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) + ClusterRoleExpansion +} + +// clusterRoles implements ClusterRoleInterface +type clusterRoles struct { + client rest.Interface +} + +// newClusterRoles returns a ClusterRoles +func newClusterRoles(c *RbacV1beta1Client) *clusterRoles { + return &clusterRoles{ + client: c.RESTClient(), + } +} + +// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. +func (c *clusterRoles) Create(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { + result = &v1beta1.ClusterRole{} + err = c.client.Post(). + Resource("clusterroles"). + Body(clusterRole). + Do(). + Into(result) + return +} + +// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. +func (c *clusterRoles) Update(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { + result = &v1beta1.ClusterRole{} + err = c.client.Put(). + Resource("clusterroles"). + Name(clusterRole.Name). + Body(clusterRole). + Do(). + Into(result) + return +} + +// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. +func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusterroles"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Resource("clusterroles"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. +func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRole, err error) { + result = &v1beta1.ClusterRole{} + err = c.client.Get(). + Resource("clusterroles"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. +func (c *clusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) { + result = &v1beta1.ClusterRoleList{} + err = c.client.Get(). + Resource("clusterroles"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterRoles. +func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("clusterroles"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched clusterRole. +func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) { + result = &v1beta1.ClusterRole{} + err = c.client.Patch(pt). + Resource("clusterroles"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go new file mode 100644 index 000000000..a2f387509 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go @@ -0,0 +1,145 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + rest "k8s.io/client-go/rest" +) + +// ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface. +// A group's client should implement this interface. +type ClusterRoleBindingsGetter interface { + ClusterRoleBindings() ClusterRoleBindingInterface +} + +// ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources. +type ClusterRoleBindingInterface interface { + Create(*v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error) + Update(*v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.ClusterRoleBinding, error) + List(opts v1.ListOptions) (*v1beta1.ClusterRoleBindingList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) + ClusterRoleBindingExpansion +} + +// clusterRoleBindings implements ClusterRoleBindingInterface +type clusterRoleBindings struct { + client rest.Interface +} + +// newClusterRoleBindings returns a ClusterRoleBindings +func newClusterRoleBindings(c *RbacV1beta1Client) *clusterRoleBindings { + return &clusterRoleBindings{ + client: c.RESTClient(), + } +} + +// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. +func (c *clusterRoleBindings) Create(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { + result = &v1beta1.ClusterRoleBinding{} + err = c.client.Post(). + Resource("clusterrolebindings"). + Body(clusterRoleBinding). + Do(). + Into(result) + return +} + +// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. +func (c *clusterRoleBindings) Update(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { + result = &v1beta1.ClusterRoleBinding{} + err = c.client.Put(). + Resource("clusterrolebindings"). + Name(clusterRoleBinding.Name). + Body(clusterRoleBinding). + Do(). + Into(result) + return +} + +// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. +func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusterrolebindings"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Resource("clusterrolebindings"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. +func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRoleBinding, err error) { + result = &v1beta1.ClusterRoleBinding{} + err = c.client.Get(). + Resource("clusterrolebindings"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. +func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) { + result = &v1beta1.ClusterRoleBindingList{} + err = c.client.Get(). + Resource("clusterrolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterRoleBindings. +func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("clusterrolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched clusterRoleBinding. +func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { + result = &v1beta1.ClusterRoleBinding{} + err = c.client.Patch(pt). + Resource("clusterrolebindings"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go new file mode 100644 index 000000000..11b523897 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go new file mode 100644 index 000000000..d7f80c004 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go @@ -0,0 +1,25 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +type ClusterRoleExpansion interface{} + +type ClusterRoleBindingExpansion interface{} + +type RoleExpansion interface{} + +type RoleBindingExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go new file mode 100644 index 000000000..a24ef4f9a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go @@ -0,0 +1,103 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + rest "k8s.io/client-go/rest" +) + +type RbacV1beta1Interface interface { + RESTClient() rest.Interface + ClusterRolesGetter + ClusterRoleBindingsGetter + RolesGetter + RoleBindingsGetter +} + +// RbacV1beta1Client is used to interact with features provided by the rbac.authorization.k8s.io group. +type RbacV1beta1Client struct { + restClient rest.Interface +} + +func (c *RbacV1beta1Client) ClusterRoles() ClusterRoleInterface { + return newClusterRoles(c) +} + +func (c *RbacV1beta1Client) ClusterRoleBindings() ClusterRoleBindingInterface { + return newClusterRoleBindings(c) +} + +func (c *RbacV1beta1Client) Roles(namespace string) RoleInterface { + return newRoles(c, namespace) +} + +func (c *RbacV1beta1Client) RoleBindings(namespace string) RoleBindingInterface { + return newRoleBindings(c, namespace) +} + +// NewForConfig creates a new RbacV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*RbacV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &RbacV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new RbacV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *RbacV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new RbacV1beta1Client for the given RESTClient. +func New(c rest.Interface) *RbacV1beta1Client { + return &RbacV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *RbacV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go new file mode 100644 index 000000000..aa57ac319 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go @@ -0,0 +1,155 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + rest "k8s.io/client-go/rest" +) + +// RolesGetter has a method to return a RoleInterface. +// A group's client should implement this interface. +type RolesGetter interface { + Roles(namespace string) RoleInterface +} + +// RoleInterface has methods to work with Role resources. +type RoleInterface interface { + Create(*v1beta1.Role) (*v1beta1.Role, error) + Update(*v1beta1.Role) (*v1beta1.Role, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.Role, error) + List(opts v1.ListOptions) (*v1beta1.RoleList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) + RoleExpansion +} + +// roles implements RoleInterface +type roles struct { + client rest.Interface + ns string +} + +// newRoles returns a Roles +func newRoles(c *RbacV1beta1Client, namespace string) *roles { + return &roles{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. +func (c *roles) Create(role *v1beta1.Role) (result *v1beta1.Role, err error) { + result = &v1beta1.Role{} + err = c.client.Post(). + Namespace(c.ns). + Resource("roles"). + Body(role). + Do(). + Into(result) + return +} + +// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. +func (c *roles) Update(role *v1beta1.Role) (result *v1beta1.Role, err error) { + result = &v1beta1.Role{} + err = c.client.Put(). + Namespace(c.ns). + Resource("roles"). + Name(role.Name). + Body(role). + Do(). + Into(result) + return +} + +// Delete takes name of the role and deletes it. Returns an error if one occurs. +func (c *roles) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("roles"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("roles"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the role, and returns the corresponding role object, and an error if there is any. +func (c *roles) Get(name string, options v1.GetOptions) (result *v1beta1.Role, err error) { + result = &v1beta1.Role{} + err = c.client.Get(). + Namespace(c.ns). + Resource("roles"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Roles that match those selectors. +func (c *roles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error) { + result = &v1beta1.RoleList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("roles"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested roles. +func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("roles"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched role. +func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) { + result = &v1beta1.Role{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("roles"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go new file mode 100644 index 000000000..3dee9107e --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go @@ -0,0 +1,155 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + rest "k8s.io/client-go/rest" +) + +// RoleBindingsGetter has a method to return a RoleBindingInterface. +// A group's client should implement this interface. +type RoleBindingsGetter interface { + RoleBindings(namespace string) RoleBindingInterface +} + +// RoleBindingInterface has methods to work with RoleBinding resources. +type RoleBindingInterface interface { + Create(*v1beta1.RoleBinding) (*v1beta1.RoleBinding, error) + Update(*v1beta1.RoleBinding) (*v1beta1.RoleBinding, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.RoleBinding, error) + List(opts v1.ListOptions) (*v1beta1.RoleBindingList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) + RoleBindingExpansion +} + +// roleBindings implements RoleBindingInterface +type roleBindings struct { + client rest.Interface + ns string +} + +// newRoleBindings returns a RoleBindings +func newRoleBindings(c *RbacV1beta1Client, namespace string) *roleBindings { + return &roleBindings{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. +func (c *roleBindings) Create(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { + result = &v1beta1.RoleBinding{} + err = c.client.Post(). + Namespace(c.ns). + Resource("rolebindings"). + Body(roleBinding). + Do(). + Into(result) + return +} + +// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. +func (c *roleBindings) Update(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { + result = &v1beta1.RoleBinding{} + err = c.client.Put(). + Namespace(c.ns). + Resource("rolebindings"). + Name(roleBinding.Name). + Body(roleBinding). + Do(). + Into(result) + return +} + +// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. +func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("rolebindings"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("rolebindings"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. +func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.RoleBinding, err error) { + result = &v1beta1.RoleBinding{} + err = c.client.Get(). + Namespace(c.ns). + Resource("rolebindings"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of RoleBindings that match those selectors. +func (c *roleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindingList, err error) { + result = &v1beta1.RoleBindingList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("rolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested roleBindings. +func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("rolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched roleBinding. +func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) { + result = &v1beta1.RoleBinding{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("rolebindings"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go new file mode 100644 index 000000000..ba8d10d3b --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go similarity index 85% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/generated_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go index 1f67dc9d8..d599b2935 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,4 +16,4 @@ limitations under the License. package v1alpha1 -type CertificateSigningRequestExpansion interface{} +type PodPresetExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go new file mode 100644 index 000000000..b8fc0a022 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go @@ -0,0 +1,155 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1" + rest "k8s.io/client-go/rest" +) + +// PodPresetsGetter has a method to return a PodPresetInterface. +// A group's client should implement this interface. +type PodPresetsGetter interface { + PodPresets(namespace string) PodPresetInterface +} + +// PodPresetInterface has methods to work with PodPreset resources. +type PodPresetInterface interface { + Create(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error) + Update(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1alpha1.PodPreset, error) + List(opts v1.ListOptions) (*v1alpha1.PodPresetList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) + PodPresetExpansion +} + +// podPresets implements PodPresetInterface +type podPresets struct { + client rest.Interface + ns string +} + +// newPodPresets returns a PodPresets +func newPodPresets(c *SettingsV1alpha1Client, namespace string) *podPresets { + return &podPresets{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any. +func (c *podPresets) Create(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) { + result = &v1alpha1.PodPreset{} + err = c.client.Post(). + Namespace(c.ns). + Resource("podpresets"). + Body(podPreset). + Do(). + Into(result) + return +} + +// Update takes the representation of a podPreset and updates it. Returns the server's representation of the podPreset, and an error, if there is any. +func (c *podPresets) Update(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) { + result = &v1alpha1.PodPreset{} + err = c.client.Put(). + Namespace(c.ns). + Resource("podpresets"). + Name(podPreset.Name). + Body(podPreset). + Do(). + Into(result) + return +} + +// Delete takes name of the podPreset and deletes it. Returns an error if one occurs. +func (c *podPresets) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("podpresets"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *podPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("podpresets"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the podPreset, and returns the corresponding podPreset object, and an error if there is any. +func (c *podPresets) Get(name string, options v1.GetOptions) (result *v1alpha1.PodPreset, err error) { + result = &v1alpha1.PodPreset{} + err = c.client.Get(). + Namespace(c.ns). + Resource("podpresets"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of PodPresets that match those selectors. +func (c *podPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetList, err error) { + result = &v1alpha1.PodPresetList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("podpresets"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested podPresets. +func (c *podPresets) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("podpresets"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched podPreset. +func (c *podPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) { + result = &v1alpha1.PodPreset{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("podpresets"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go new file mode 100644 index 000000000..1a90034bc --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go @@ -0,0 +1,88 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1" + rest "k8s.io/client-go/rest" +) + +type SettingsV1alpha1Interface interface { + RESTClient() rest.Interface + PodPresetsGetter +} + +// SettingsV1alpha1Client is used to interact with features provided by the settings.k8s.io group. +type SettingsV1alpha1Client struct { + restClient rest.Interface +} + +func (c *SettingsV1alpha1Client) PodPresets(namespace string) PodPresetInterface { + return newPodPresets(c, namespace) +} + +// NewForConfig creates a new SettingsV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*SettingsV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &SettingsV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new SettingsV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *SettingsV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new SettingsV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *SettingsV1alpha1Client { + return &SettingsV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *SettingsV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go new file mode 100644 index 000000000..54673bfa7 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go new file mode 100644 index 000000000..39df9fb87 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go @@ -0,0 +1,19 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +type StorageClassExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go new file mode 100644 index 000000000..a95d30b2d --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go @@ -0,0 +1,88 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/apis/storage/v1" + rest "k8s.io/client-go/rest" +) + +type StorageV1Interface interface { + RESTClient() rest.Interface + StorageClassesGetter +} + +// StorageV1Client is used to interact with features provided by the storage.k8s.io group. +type StorageV1Client struct { + restClient rest.Interface +} + +func (c *StorageV1Client) StorageClasses() StorageClassInterface { + return newStorageClasses(c) +} + +// NewForConfig creates a new StorageV1Client for the given config. +func NewForConfig(c *rest.Config) (*StorageV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &StorageV1Client{client}, nil +} + +// NewForConfigOrDie creates a new StorageV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *StorageV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new StorageV1Client for the given RESTClient. +func New(c rest.Interface) *StorageV1Client { + return &StorageV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *StorageV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go new file mode 100644 index 000000000..0283c9970 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go @@ -0,0 +1,145 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1 "k8s.io/client-go/pkg/apis/storage/v1" + rest "k8s.io/client-go/rest" +) + +// StorageClassesGetter has a method to return a StorageClassInterface. +// A group's client should implement this interface. +type StorageClassesGetter interface { + StorageClasses() StorageClassInterface +} + +// StorageClassInterface has methods to work with StorageClass resources. +type StorageClassInterface interface { + Create(*v1.StorageClass) (*v1.StorageClass, error) + Update(*v1.StorageClass) (*v1.StorageClass, error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.StorageClass, error) + List(opts meta_v1.ListOptions) (*v1.StorageClassList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error) + StorageClassExpansion +} + +// storageClasses implements StorageClassInterface +type storageClasses struct { + client rest.Interface +} + +// newStorageClasses returns a StorageClasses +func newStorageClasses(c *StorageV1Client) *storageClasses { + return &storageClasses{ + client: c.RESTClient(), + } +} + +// Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. +func (c *storageClasses) Create(storageClass *v1.StorageClass) (result *v1.StorageClass, err error) { + result = &v1.StorageClass{} + err = c.client.Post(). + Resource("storageclasses"). + Body(storageClass). + Do(). + Into(result) + return +} + +// Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. +func (c *storageClasses) Update(storageClass *v1.StorageClass) (result *v1.StorageClass, err error) { + result = &v1.StorageClass{} + err = c.client.Put(). + Resource("storageclasses"). + Name(storageClass.Name). + Body(storageClass). + Do(). + Into(result) + return +} + +// Delete takes name of the storageClass and deletes it. Returns an error if one occurs. +func (c *storageClasses) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("storageclasses"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *storageClasses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("storageclasses"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any. +func (c *storageClasses) Get(name string, options meta_v1.GetOptions) (result *v1.StorageClass, err error) { + result = &v1.StorageClass{} + err = c.client.Get(). + Resource("storageclasses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of StorageClasses that match those selectors. +func (c *storageClasses) List(opts meta_v1.ListOptions) (result *v1.StorageClassList, err error) { + result = &v1.StorageClassList{} + err = c.client.Get(). + Resource("storageclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested storageClasses. +func (c *storageClasses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("storageclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched storageClass. +func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error) { + result = &v1.StorageClass{} + err = c.client.Patch(pt). + Resource("storageclasses"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go new file mode 100644 index 000000000..11b523897 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with custom arguments. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go similarity index 93% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/generated_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go index b18dda009..6f3f0c55e 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go new file mode 100644 index 000000000..7abb99e57 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go @@ -0,0 +1,88 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1" + rest "k8s.io/client-go/rest" +) + +type StorageV1beta1Interface interface { + RESTClient() rest.Interface + StorageClassesGetter +} + +// StorageV1beta1Client is used to interact with features provided by the storage.k8s.io group. +type StorageV1beta1Client struct { + restClient rest.Interface +} + +func (c *StorageV1beta1Client) StorageClasses() StorageClassInterface { + return newStorageClasses(c) +} + +// NewForConfig creates a new StorageV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*StorageV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &StorageV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new StorageV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *StorageV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new StorageV1beta1Client for the given RESTClient. +func New(c rest.Interface) *StorageV1beta1Client { + return &StorageV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *StorageV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/storageclass.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go similarity index 66% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/storageclass.go rename to vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go index c1453cd43..6980fc78b 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1/storageclass.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ limitations under the License. package v1beta1 import ( - api "k8s.io/client-go/1.5/pkg/api" - v1beta1 "k8s.io/client-go/1.5/pkg/apis/storage/v1beta1" - watch "k8s.io/client-go/1.5/pkg/watch" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1" + rest "k8s.io/client-go/rest" ) // StorageClassesGetter has a method to return a StorageClassInterface. @@ -32,24 +35,24 @@ type StorageClassesGetter interface { type StorageClassInterface interface { Create(*v1beta1.StorageClass) (*v1beta1.StorageClass, error) Update(*v1beta1.StorageClass) (*v1beta1.StorageClass, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1beta1.StorageClass, error) - List(opts api.ListOptions) (*v1beta1.StorageClassList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.StorageClass, error) + List(opts v1.ListOptions) (*v1beta1.StorageClassList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) StorageClassExpansion } // storageClasses implements StorageClassInterface type storageClasses struct { - client *StorageClient + client rest.Interface } // newStorageClasses returns a StorageClasses -func newStorageClasses(c *StorageClient) *storageClasses { +func newStorageClasses(c *StorageV1beta1Client) *storageClasses { return &storageClasses{ - client: c, + client: c.RESTClient(), } } @@ -77,7 +80,7 @@ func (c *storageClasses) Update(storageClass *v1beta1.StorageClass) (result *v1b } // Delete takes name of the storageClass and deletes it. Returns an error if one occurs. -func (c *storageClasses) Delete(name string, options *api.DeleteOptions) error { +func (c *storageClasses) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("storageclasses"). Name(name). @@ -87,48 +90,49 @@ func (c *storageClasses) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *storageClasses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *storageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("storageclasses"). - VersionedParams(&listOptions, api.ParameterCodec). + VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any. -func (c *storageClasses) Get(name string) (result *v1beta1.StorageClass, err error) { +func (c *storageClasses) Get(name string, options v1.GetOptions) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Get(). Resource("storageclasses"). Name(name). + VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of StorageClasses that match those selectors. -func (c *storageClasses) List(opts api.ListOptions) (result *v1beta1.StorageClassList, err error) { +func (c *storageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClassList, err error) { result = &v1beta1.StorageClassList{} err = c.client.Get(). Resource("storageclasses"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested storageClasses. -func (c *storageClasses) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true return c.client.Get(). - Prefix("watch"). Resource("storageclasses"). - VersionedParams(&opts, api.ParameterCodec). + VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched storageClass. -func (c *storageClasses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { +func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Patch(pt). Resource("storageclasses"). diff --git a/vendor/k8s.io/client-go/pkg/api/OWNERS b/vendor/k8s.io/client-go/pkg/api/OWNERS new file mode 100644 index 000000000..3a9b0c6d1 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/api/OWNERS @@ -0,0 +1,44 @@ +approvers: +- erictune +- lavalamp +- smarterclayton +- thockin +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- yujuhong +- brendandburns +- derekwaynecarr +- caesarxuchao +- vishh +- mikedanese +- liggitt +- nikhiljindal +- bprashanth +- gmarek +- erictune +- davidopp +- pmorie +- sttts +- kargakis +- dchen1107 +- saad-ali +- zmerlynn +- luxas +- janetkuo +- justinsb +- pwittrock +- roberthbailey +- ncdc +- timstclair +- yifan-gu +- eparis +- mwielgus +- timothysc +- soltysh +- piosz +- jsafrane +- jbeda diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/defaults.go b/vendor/k8s.io/client-go/pkg/api/defaults.go similarity index 89% rename from vendor/k8s.io/client-go/1.5/pkg/api/defaults.go rename to vendor/k8s.io/client-go/pkg/api/defaults.go index 33f72151f..baa49a8d7 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/defaults.go +++ b/vendor/k8s.io/client-go/pkg/api/defaults.go @@ -17,9 +17,9 @@ limitations under the License. package api import ( - "k8s.io/client-go/1.5/pkg/fields" - "k8s.io/client-go/1.5/pkg/labels" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/doc.go b/vendor/k8s.io/client-go/pkg/api/doc.go similarity index 96% rename from vendor/k8s.io/client-go/1.5/pkg/api/doc.go rename to vendor/k8s.io/client-go/pkg/api/doc.go index 1507a8823..a4262ab36 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/doc.go +++ b/vendor/k8s.io/client-go/pkg/api/doc.go @@ -14,8 +14,6 @@ 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, diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/field_constants.go b/vendor/k8s.io/client-go/pkg/api/field_constants.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/api/field_constants.go rename to vendor/k8s.io/client-go/pkg/api/field_constants.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/helpers.go b/vendor/k8s.io/client-go/pkg/api/helpers.go similarity index 76% rename from vendor/k8s.io/client-go/1.5/pkg/api/helpers.go rename to vendor/k8s.io/client-go/pkg/api/helpers.go index 6aa1a311d..faa7df7c0 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/helpers.go +++ b/vendor/k8s.io/client-go/pkg/api/helpers.go @@ -24,17 +24,16 @@ import ( "strings" "time" - "k8s.io/client-go/1.5/pkg/api/resource" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/conversion" - "k8s.io/client-go/1.5/pkg/fields" - "k8s.io/client-go/1.5/pkg/labels" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/selection" - "k8s.io/client-go/1.5/pkg/types" - "k8s.io/client-go/1.5/pkg/util/sets" - "github.com/davecgh/go-spew/spew" + + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/selection" + "k8s.io/apimachinery/pkg/util/sets" ) // Conversion error conveniently packages up errors in conversions. @@ -51,8 +50,25 @@ func (c *ConversionError) Error() string { ) } +const ( + // annotation key prefix used to identify non-convertible json paths. + NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io" +) + +// NonConvertibleFields iterates over the provided map and filters out all but +// any keys with the "non-convertible.kubernetes.io" prefix. +func NonConvertibleFields(annotations map[string]string) map[string]string { + nonConvertibleKeys := map[string]string{} + for key, value := range annotations { + if strings.HasPrefix(key, NonConvertibleAnnotationPrefix) { + nonConvertibleKeys[key] = value + } + } + return nonConvertibleKeys +} + // Semantic can do semantic deep equality checks for api objects. -// Example: api.Semantic.DeepEqual(aPod, aPodWithNonNilButEmptyMaps) == true +// Example: apiequality.Semantic.DeepEqual(aPod, aPodWithNonNilButEmptyMaps) == true var Semantic = conversion.EqualitiesOrDie( func(a, b resource.Quantity) bool { // Ignore formatting, only care that numeric value stayed the same. @@ -61,7 +77,7 @@ var Semantic = conversion.EqualitiesOrDie( // Uninitialized quantities are equivalent to 0 quantities. return a.Cmp(b) == 0 }, - func(a, b unversioned.Time) bool { + func(a, b metav1.Time) bool { return a.UTC() == b.UTC() }, func(a, b labels.Selector) bool { @@ -120,9 +136,26 @@ func IsStandardContainerResourceName(str string) bool { return standardContainerResources.Has(str) } +// IsOpaqueIntResourceName returns true if the resource name has the opaque +// integer resource prefix. +func IsOpaqueIntResourceName(name ResourceName) bool { + return strings.HasPrefix(string(name), ResourceOpaqueIntPrefix) +} + +// OpaqueIntResourceName returns a ResourceName with the canonical opaque +// integer prefix prepended. If the argument already has the prefix, it is +// returned unmodified. +func OpaqueIntResourceName(name string) ResourceName { + if IsOpaqueIntResourceName(ResourceName(name)) { + return ResourceName(name) + } + return ResourceName(fmt.Sprintf("%s%s", ResourceOpaqueIntPrefix, name)) +} + var standardLimitRangeTypes = sets.NewString( string(LimitTypePod), string(LimitTypeContainer), + string(LimitTypePersistentVolumeClaim), ) // IsStandardLimitRangeType returns true if the type is Pod or Container @@ -170,6 +203,7 @@ var standardResources = sets.NewString( string(ResourceConfigMaps), string(ResourcePersistentVolumeClaims), string(ResourceStorage), + string(ResourceRequestsStorage), ) // IsStandardResourceName returns true if the resource is known to the system @@ -191,28 +225,7 @@ var integerResources = sets.NewString( // 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} + return integerResources.Has(str) || IsOpaqueIntResourceName(ResourceName(str)) } // this function aims to check if the service's ClusterIP is set or not @@ -232,21 +245,27 @@ func IsServiceIPRequested(service *Service) bool { var standardFinalizers = sets.NewString( string(FinalizerKubernetes), - FinalizerOrphan, + metav1.FinalizerOrphanDependents, ) +// HasAnnotation returns a bool if passed in annotation exists +func HasAnnotation(obj ObjectMeta, ann string) bool { + _, found := obj.Annotations[ann] + return found +} + +// SetMetaDataAnnotation sets the annotation and value +func SetMetaDataAnnotation(obj *ObjectMeta, ann string, value string) { + if obj.Annotations == nil { + obj.Annotations = make(map[string]string) + } + obj.Annotations[ann] = value +} + 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) { @@ -365,15 +384,15 @@ func containsAccessMode(modes []PersistentVolumeAccessMode, mode PersistentVolum } // ParseRFC3339 parses an RFC3339 date in either RFC3339Nano or RFC3339 format. -func ParseRFC3339(s string, nowFn func() unversioned.Time) (unversioned.Time, error) { +func ParseRFC3339(s string, nowFn func() metav1.Time) (metav1.Time, error) { if t, timeErr := time.Parse(time.RFC3339Nano, s); timeErr == nil { - return unversioned.Time{Time: t}, nil + return metav1.Time{Time: t}, nil } t, err := time.Parse(time.RFC3339, s) if err != nil { - return unversioned.Time{}, err + return metav1.Time{}, err } - return unversioned.Time{Time: t}, nil + return metav1.Time{Time: t}, nil } // NodeSelectorRequirementsAsSelector converts the []NodeSelectorRequirement api type into a struct that implements @@ -401,7 +420,7 @@ func NodeSelectorRequirementsAsSelector(nsm []NodeSelectorRequirement) (labels.S 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...)) + r, err := labels.NewRequirement(expr.Key, op, expr.Values) if err != nil { return nil, err } @@ -411,10 +430,6 @@ func NodeSelectorRequirementsAsSelector(nsm []NodeSelectorRequirement) (labels.S } 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" @@ -452,21 +467,17 @@ const ( // is at-your-own-risk. Pods that attempt to set an unsafe sysctl that is not enabled for a kubelet // will fail to launch. UnsafeSysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/unsafe-sysctls" -) -// 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) { - if len(annotations) > 0 && annotations[AffinityAnnotationKey] != "" { - var affinity Affinity - err := json.Unmarshal([]byte(annotations[AffinityAnnotationKey]), &affinity) - if err != nil { - return nil, err - } - return &affinity, nil - } - return nil, nil -} + // ObjectTTLAnnotations represents a suggestion for kubelet for how long it can cache + // an object (e.g. secret, config map) before fetching it again from apiserver. + // This annotation can be attached to node. + ObjectTTLAnnotationKey string = "node.alpha.kubernetes.io/ttl" + + // AffinityAnnotationKey represents the key of affinity data (json serialized) + // in the Annotations of a Pod. + // TODO: remove when alpha support for affinity is removed + AffinityAnnotationKey string = "scheduler.alpha.kubernetes.io/affinity" +) // GetTolerationsFromPodAnnotations gets the json serialized tolerations data from Pod.Annotations // and converts it to the []Toleration type in api. @@ -481,17 +492,42 @@ func GetTolerationsFromPodAnnotations(annotations map[string]string) ([]Tolerati 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 +// AddOrUpdateTolerationInPod tries to add a toleration to the pod's toleration list. +// Returns true if something was updated, false otherwise. +func AddOrUpdateTolerationInPod(pod *Pod, toleration *Toleration) (bool, error) { + podTolerations := pod.Spec.Tolerations + + var newTolerations []Toleration + updated := false + for i := range podTolerations { + if toleration.MatchToleration(&podTolerations[i]) { + if Semantic.DeepEqual(toleration, podTolerations[i]) { + return false, nil + } + newTolerations = append(newTolerations, *toleration) + updated = true + continue } + + newTolerations = append(newTolerations, podTolerations[i]) } - return taints, nil + + if !updated { + newTolerations = append(newTolerations, *toleration) + } + + pod.Spec.Tolerations = newTolerations + return true, nil +} + +// MatchToleration checks if the toleration matches tolerationToMatch. Tolerations are unique by , +// if the two tolerations have same combination, regard as they match. +// TODO: uniqueness check for tolerations in api validations. +func (t *Toleration) MatchToleration(tolerationToMatch *Toleration) bool { + return t.Key == tolerationToMatch.Key && + t.Effect == tolerationToMatch.Effect && + t.Operator == tolerationToMatch.Operator && + t.Value == tolerationToMatch.Value } // TolerationToleratesTaint checks if the toleration tolerates the taint. @@ -511,7 +547,6 @@ func TolerationToleratesTaint(toleration *Toleration, taint *Taint) bool { return true } return false - } // TaintToleratedByTolerations checks if taint is tolerated by any of the tolerations. @@ -540,15 +575,17 @@ func (t *Taint) ToString() string { return fmt.Sprintf("%v=%v:%v", t.Key, t.Value, t.Effect) } -func GetAvoidPodsFromNodeAnnotations(annotations map[string]string) (AvoidPods, error) { - var avoidPods AvoidPods - if len(annotations) > 0 && annotations[PreferAvoidPodsAnnotationKey] != "" { - err := json.Unmarshal([]byte(annotations[PreferAvoidPodsAnnotationKey]), &avoidPods) +// 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 avoidPods, err + return []Taint{}, err } } - return avoidPods, nil + return taints, nil } // SysctlsFromPodAnnotations parses the sysctl annotations into a slice of safe Sysctls @@ -577,7 +614,7 @@ func SysctlsFromPodAnnotation(annotation string) ([]Sysctl, error) { sysctls := make([]Sysctl, len(kvs)) for i, kv := range kvs { cs := strings.Split(kv, "=") - if len(cs) != 2 { + if len(cs) != 2 || len(cs[0]) == 0 { return nil, fmt.Errorf("sysctl %q not of the format sysctl_name=value", kv) } sysctls[i].Name = cs[0] @@ -598,3 +635,57 @@ func PodAnnotationsFromSysctls(sysctls []Sysctl) string { } return strings.Join(kvs, ",") } + +// GetAffinityFromPodAnnotations gets the json serialized affinity data from Pod.Annotations +// and converts it to the Affinity type in api. +// TODO: remove when alpha support for affinity is removed +func GetAffinityFromPodAnnotations(annotations map[string]string) (*Affinity, error) { + if len(annotations) > 0 && annotations[AffinityAnnotationKey] != "" { + var affinity Affinity + err := json.Unmarshal([]byte(annotations[AffinityAnnotationKey]), &affinity) + if err != nil { + return nil, err + } + return &affinity, nil + } + return nil, nil +} + +// GetPersistentVolumeClass returns StorageClassName. +func GetPersistentVolumeClass(volume *PersistentVolume) string { + // Use beta annotation first + if class, found := volume.Annotations[BetaStorageClassAnnotation]; found { + return class + } + + return volume.Spec.StorageClassName +} + +// GetPersistentVolumeClaimClass returns StorageClassName. If no storage class was +// requested, it returns "". +func GetPersistentVolumeClaimClass(claim *PersistentVolumeClaim) string { + // Use beta annotation first + if class, found := claim.Annotations[BetaStorageClassAnnotation]; found { + return class + } + + if claim.Spec.StorageClassName != nil { + return *claim.Spec.StorageClassName + } + + return "" +} + +// PersistentVolumeClaimHasClass returns true if given claim has set StorageClassName field. +func PersistentVolumeClaimHasClass(claim *PersistentVolumeClaim) bool { + // Use beta annotation first + if _, found := claim.Annotations[BetaStorageClassAnnotation]; found { + return true + } + + if claim.Spec.StorageClassName != nil { + return true + } + + return false +} diff --git a/vendor/k8s.io/client-go/pkg/api/install/OWNERS b/vendor/k8s.io/client-go/pkg/api/install/OWNERS new file mode 100755 index 000000000..01d6b3702 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/api/install/OWNERS @@ -0,0 +1,11 @@ +reviewers: +- lavalamp +- smarterclayton +- deads2k +- caesarxuchao +- liggitt +- nikhiljindal +- dims +- krousey +- david-mcmahon +- feihujiang diff --git a/vendor/k8s.io/client-go/pkg/api/install/install.go b/vendor/k8s.io/client-go/pkg/api/install/install.go new file mode 100644 index 000000000..1b9553b70 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/api/install/install.go @@ -0,0 +1,70 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package install installs the v1 monolithic api, making it available as an +// option to all of the API encoding/decoding machinery. +package install + +import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/api/v1" +) + +func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { + if err := announced.NewGroupMetaFactory( + &announced.GroupMetaFactoryArgs{ + GroupName: api.GroupName, + VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version}, + ImportPrefix: "k8s.io/client-go/pkg/api", + AddInternalObjectsToScheme: api.AddToScheme, + RootScopedKinds: sets.NewString( + "Node", + "Namespace", + "PersistentVolume", + "ComponentStatus", + ), + IgnoredKinds: sets.NewString( + "ListOptions", + "DeleteOptions", + "Status", + "PodLogOptions", + "PodExecOptions", + "PodAttachOptions", + "PodPortForwardOptions", + "PodProxyOptions", + "NodeProxyOptions", + "ServiceProxyOptions", + "ThirdPartyResource", + "ThirdPartyResourceData", + "ThirdPartyResourceList", + ), + }, + announced.VersionToSchemeFunc{ + v1.SchemeGroupVersion.Version: v1.AddToScheme, + }, + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { + panic(err) + } +} diff --git a/vendor/k8s.io/client-go/pkg/api/json.go b/vendor/k8s.io/client-go/pkg/api/json.go new file mode 100644 index 000000000..3a6e04c18 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/api/json.go @@ -0,0 +1,28 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api + +import "encoding/json" + +// This file implements json marshaling/unmarshaling interfaces on objects that are currently marshaled into annotations +// to prevent anyone from marshaling these internal structs. + +var _ = json.Marshaler(&AvoidPods{}) +var _ = json.Unmarshaler(&AvoidPods{}) + +func (AvoidPods) MarshalJSON() ([]byte, error) { panic("do not marshal internal struct") } +func (*AvoidPods) UnmarshalJSON([]byte) error { panic("do not unmarshal to internal struct") } diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/ref.go b/vendor/k8s.io/client-go/pkg/api/ref.go similarity index 82% rename from vendor/k8s.io/client-go/1.5/pkg/api/ref.go rename to vendor/k8s.io/client-go/pkg/api/ref.go index d25b4dc18..370cf5513 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/ref.go +++ b/vendor/k8s.io/client-go/pkg/api/ref.go @@ -22,9 +22,9 @@ import ( "net/url" "strings" - "k8s.io/client-go/1.5/pkg/api/meta" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) var ( @@ -37,7 +37,7 @@ var ( // 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) { +func GetReference(scheme *runtime.Scheme, obj runtime.Object) (*ObjectReference, error) { if obj == nil { return nil, ErrNilObject } @@ -53,7 +53,7 @@ func GetReference(obj runtime.Object) (*ObjectReference, error) { kind := gvk.Kind if len(kind) == 0 { // TODO: this is wrong - gvks, _, err := Scheme.ObjectKinds(obj) + gvks, _, err := scheme.ObjectKinds(obj) if err != nil { return nil, err } @@ -111,8 +111,8 @@ func GetReference(obj runtime.Object) (*ObjectReference, error) { } // 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) +func GetPartialReference(scheme *runtime.Scheme, obj runtime.Object, fieldPath string) (*ObjectReference, error) { + ref, err := GetReference(scheme, obj) if err != nil { return nil, err } @@ -122,11 +122,11 @@ func GetPartialReference(obj runtime.Object, fieldPath string) (*ObjectReference // 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) { +func (obj *ObjectReference) SetGroupVersionKind(gvk schema.GroupVersionKind) { obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() } -func (obj *ObjectReference) GroupVersionKind() unversioned.GroupVersionKind { - return unversioned.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) +func (obj *ObjectReference) GroupVersionKind() schema.GroupVersionKind { + return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) } -func (obj *ObjectReference) GetObjectKind() unversioned.ObjectKind { return obj } +func (obj *ObjectReference) GetObjectKind() schema.ObjectKind { return obj } diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/register.go b/vendor/k8s.io/client-go/pkg/api/register.go similarity index 70% rename from vendor/k8s.io/client-go/1.5/pkg/api/register.go rename to vendor/k8s.io/client-go/pkg/api/register.go index 46addba88..bd842b182 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/register.go +++ b/vendor/k8s.io/client-go/pkg/api/register.go @@ -17,11 +17,23 @@ limitations under the License. package api import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/runtime/serializer" + "os" + + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" ) +// GroupFactoryRegistry is the APIGroupFactoryRegistry (overlaps a bit with Registry, see comments in package for details) +var GroupFactoryRegistry = make(announced.APIGroupFactoryRegistry) + +// Registry is an instance of an API registry. This is an interim step to start removing the idea of a global +// API registry. +var Registry = registered.NewOrDie(os.Getenv("KUBE_API_VERSIONS")) + // Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered. // NOTE: If you are copying this file to start a new api group, STOP! Copy the // extensions group instead. This Scheme is special and should appear ONLY in @@ -36,22 +48,22 @@ var Codecs = serializer.NewCodecFactory(Scheme) const GroupName = "" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} // Unversioned is group version for unversioned API objects // TODO: this should be v1 probably -var Unversioned = unversioned.GroupVersion{Group: "", Version: "v1"} +var Unversioned = schema.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 a Group qualified GroupKind -func Kind(kind string) unversioned.GroupKind { +func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) unversioned.GroupResource { +func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } @@ -60,22 +72,8 @@ var ( AddToScheme = SchemeBuilder.AddToScheme ) -func init() { - // TODO(lavalamp): move this call to scheme builder above. Can't - // remove it from here because lots of people inappropriately rely on it - // (specifically the unversioned time conversion). Can't have it in - // both places because then it gets double registered. Consequence of - // current state is that it only ever gets registered in the main - // api.Scheme, even though everyone that uses anything from unversioned - // needs these. - if err := addConversionFuncs(Scheme); err != nil { - // Programmer error. - panic(err) - } -} - func addKnownTypes(scheme *runtime.Scheme) error { - if err := scheme.AddIgnoredConversionType(&unversioned.TypeMeta{}, &unversioned.TypeMeta{}); err != nil { + if err := scheme.AddIgnoredConversionType(&metav1.TypeMeta{}, &metav1.TypeMeta{}); err != nil { return err } scheme.AddKnownTypes(SchemeGroupVersion, @@ -112,11 +110,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PersistentVolumeList{}, &PersistentVolumeClaim{}, &PersistentVolumeClaimList{}, - &DeleteOptions{}, - &ListOptions{}, &PodAttachOptions{}, &PodLogOptions{}, &PodExecOptions{}, + &PodPortForwardOptions{}, &PodProxyOptions{}, &ComponentStatus{}, &ComponentStatusList{}, @@ -128,12 +125,11 @@ func addKnownTypes(scheme *runtime.Scheme) error { // Register Unversioned types under their own special group scheme.AddUnversionedTypes(Unversioned, - &unversioned.ExportOptions{}, - &unversioned.Status{}, - &unversioned.APIVersions{}, - &unversioned.APIGroupList{}, - &unversioned.APIGroup{}, - &unversioned.APIResourceList{}, + &metav1.Status{}, + &metav1.APIVersions{}, + &metav1.APIGroupList{}, + &metav1.APIGroup{}, + &metav1.APIResourceList{}, ) return nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/resource_helpers.go b/vendor/k8s.io/client-go/pkg/api/resource_helpers.go similarity index 87% rename from vendor/k8s.io/client-go/1.5/pkg/api/resource_helpers.go rename to vendor/k8s.io/client-go/pkg/api/resource_helpers.go index 37b77c8c3..88d0f80d7 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/resource_helpers.go +++ b/vendor/k8s.io/client-go/pkg/api/resource_helpers.go @@ -17,8 +17,10 @@ limitations under the License. package api import ( - "k8s.io/client-go/1.5/pkg/api/resource" - "k8s.io/client-go/1.5/pkg/api/unversioned" + "time" + + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // Returns string version of ResourceName. @@ -74,6 +76,24 @@ func GetExistingContainerStatus(statuses []ContainerStatus, name string) Contain return ContainerStatus{} } +// IsPodAvailable returns true if a pod is available; false otherwise. +// Precondition for an available pod is that it must be ready. On top +// of that, there are two cases when a pod can be considered available: +// 1. minReadySeconds == 0, or +// 2. LastTransitionTime (is set) + minReadySeconds < current time +func IsPodAvailable(pod *Pod, minReadySeconds int32, now metav1.Time) bool { + if !IsPodReady(pod) { + return false + } + + c := GetPodReadyCondition(pod.Status) + minReadySecondsDuration := time.Duration(minReadySeconds) * time.Second + if minReadySeconds == 0 || !c.LastTransitionTime.IsZero() && c.LastTransitionTime.Add(minReadySecondsDuration).Before(now.Time) { + return true + } + return false +} + // IsPodReady returns true if a pod is ready; false otherwise. func IsPodReady(pod *Pod) bool { return IsPodReadyConditionTrue(pod.Status) @@ -124,7 +144,7 @@ func GetNodeCondition(status *NodeStatus, conditionType NodeConditionType) (int, // 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() + condition.LastTransitionTime = metav1.Now() // Try to find this pod condition. conditionIndex, oldCondition := GetPodCondition(status, condition.Type) diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/types.go b/vendor/k8s.io/client-go/pkg/api/types.go similarity index 74% rename from vendor/k8s.io/client-go/1.5/pkg/api/types.go rename to vendor/k8s.io/client-go/pkg/api/types.go index 94ae87d76..4f4236950 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/types.go +++ b/vendor/k8s.io/client-go/pkg/api/types.go @@ -17,13 +17,13 @@ limitations under the License. package api import ( - "k8s.io/client-go/1.5/pkg/api/resource" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/fields" - "k8s.io/client-go/1.5/pkg/labels" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/types" - "k8s.io/client-go/1.5/pkg/util/intstr" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" ) // Common string formats @@ -57,12 +57,14 @@ import ( // ObjectMeta is metadata that all persisted resources must have, which includes all objects // users must create. +// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon. type ObjectMeta struct { // Name is unique within a namespace. Name is required when creating resources, although // some resources may allow a client to request the generation of an appropriate name // automatically. Name is primarily intended for creation idempotence and configuration // definition. - Name string `json:"name,omitempty"` + // +optional + Name string // GenerateName indicates that the name should be made unique by the server prior to persisting // it. A non-empty value for the field indicates the name will be made unique (and the name @@ -75,51 +77,68 @@ type ObjectMeta struct { // 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"` + // +optional + GenerateName string // Namespace defines the space within which name must be unique. An empty namespace is // equivalent to the "default" namespace, but "default" is the canonical representation. // Not all objects are required to be scoped to a namespace - the value of this field for // those objects will be empty. - Namespace string `json:"namespace,omitempty"` + // +optional + Namespace string // SelfLink is a URL representing this object. - SelfLink string `json:"selfLink,omitempty"` + // +optional + SelfLink string // UID is the unique in time and space value for this object. It is typically generated by // the server on successful creation of a resource and is not allowed to change on PUT // operations. - UID types.UID `json:"uid,omitempty"` + // +optional + UID types.UID // An opaque value that represents the version of this resource. May be used for optimistic // concurrency, change detection, and the watch operation on a resource or set of resources. // Clients must treat these values as opaque and values may only be valid for a particular // resource or set of resources. Only servers will generate resource versions. - ResourceVersion string `json:"resourceVersion,omitempty"` + // +optional + ResourceVersion string // A sequence number representing a specific generation of the desired state. // Populated by the system. Read-only. - Generation int64 `json:"generation,omitempty"` + // +optional + Generation int64 // CreationTimestamp is a timestamp representing the server time when this object was // created. It is not guaranteed to be set in happens-before order across separate operations. // Clients may not set this value. It is represented in RFC3339 form and is in UTC. - CreationTimestamp unversioned.Time `json:"creationTimestamp,omitempty"` + // +optional + CreationTimestamp metav1.Time - // DeletionTimestamp is the time after which this resource will be deleted. This + // 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 + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field. Once set, + // this value may not be unset or be set further into the future, although it may be shortened // or the resource may be deleted prior to this time. For example, a user may request that // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination - // signal to the containers in the pod. 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"` + // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard + // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the + // API. In the presence of network partitions, this object may still exist after this + // timestamp, until an administrator or automated process can determine the resource is + // fully terminated. + // If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. + // Read-only. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + DeletionTimestamp *metav1.Time // DeletionGracePeriodSeconds records the graceful deletion value set when graceful deletion // was requested. Represents the most recent grace period, and may only be shortened once set. - DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty"` + // +optional + DeletionGracePeriodSeconds *int64 // Labels are key value pairs that may be used to scope and select individual resources. // Label keys are of the form: @@ -130,30 +149,35 @@ type ObjectMeta struct { // 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. - Labels map[string]string `json:"labels,omitempty"` + // +optional + Labels map[string]string // Annotations are unstructured key value data stored with a resource that may be set by // external tooling. They are not queryable and should be preserved when modifying // objects. Annotation keys have the same formatting restrictions as Label keys. See the // comments on Labels for details. - Annotations map[string]string `json:"annotations,omitempty"` + // +optional + Annotations map[string]string // List of objects depended by this object. If ALL objects in the list have // been deleted, this object will be garbage collected. If this object is managed by a controller, // then an entry in this list will point to this controller, with the controller field set to true. // There cannot be more than one managing controller. - OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"` + // +optional + OwnerReferences []metav1.OwnerReference // 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"` + // +optional + Finalizers []string // The name of the cluster which the object belongs to. // This is used to distinguish resources with same name and namespace in different clusters. // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. - ClusterName string `json:"clusterName,omitempty"` + // +optional + ClusterName string } const ( @@ -165,6 +189,8 @@ const ( NamespaceNone string = "" // NamespaceSystem is the system namespace where we place system components. NamespaceSystem string = "kube-system" + // NamespacePublic is the namespace where we place public info (ConfigMaps) + NamespacePublic string = "kube-public" // TerminationMessagePathDefault means the default path to capture the application termination message running in a container TerminationMessagePathDefault string = "/dev/termination-log" ) @@ -173,11 +199,12 @@ const ( type Volume struct { // Required: This must be a DNS_LABEL. Each volume in a pod must have // a unique name. - Name string `json:"name"` + Name string // The VolumeSource represents the location and type of a volume to mount. // This is optional for now. If not specified, the Volume is implied to be an EmptyDir. // This implied behavior is deprecated and will be removed in a future version. - VolumeSource `json:",inline,omitempty"` + // +optional + VolumeSource } // VolumeSource represents the source location of a volume to mount. @@ -190,59 +217,91 @@ type VolumeSource struct { // --- // 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"` + // +optional + HostPath *HostPathVolumeSource // EmptyDir represents a temporary directory that shares a pod's lifetime. - EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty"` + // +optional + EmptyDir *EmptyDirVolumeSource // 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"` + // +optional + GCEPersistentDisk *GCEPersistentDiskVolumeSource // 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"` + // +optional + AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource // GitRepo represents a git repository at a particular revision. - GitRepo *GitRepoVolumeSource `json:"gitRepo,omitempty"` + // +optional + GitRepo *GitRepoVolumeSource // Secret represents a secret that should populate this volume. - Secret *SecretVolumeSource `json:"secret,omitempty"` + // +optional + Secret *SecretVolumeSource // NFS represents an NFS mount on the host that shares a pod's lifetime - NFS *NFSVolumeSource `json:"nfs,omitempty"` + // +optional + NFS *NFSVolumeSource // 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"` + // +optional + ISCSI *ISCSIVolumeSource // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime - Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty"` + // +optional + Glusterfs *GlusterfsVolumeSource // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace - PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"` + // +optional + PersistentVolumeClaim *PersistentVolumeClaimVolumeSource // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime - RBD *RBDVolumeSource `json:"rbd,omitempty"` + // +optional + RBD *RBDVolumeSource // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty"` + // +optional + Quobyte *QuobyteVolumeSource // FlexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. - FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty"` + // +optional + FlexVolume *FlexVolumeSource // Cinder represents a cinder volume attached and mounted on kubelets host machine - Cinder *CinderVolumeSource `json:"cinder,omitempty"` + // +optional + Cinder *CinderVolumeSource // CephFS represents a Cephfs mount on the host that shares a pod's lifetime - CephFS *CephFSVolumeSource `json:"cephfs,omitempty"` + // +optional + CephFS *CephFSVolumeSource // 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"` + // +optional + Flocker *FlockerVolumeSource // DownwardAPI represents metadata about the pod that should populate this volume - DownwardAPI *DownwardAPIVolumeSource `json:"downwardAPI,omitempty"` + // +optional + DownwardAPI *DownwardAPIVolumeSource // 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"` + // +optional + FC *FCVolumeSource // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty"` + // +optional + AzureFile *AzureFileVolumeSource // ConfigMap represents a configMap that should populate this volume - ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty"` + // +optional + ConfigMap *ConfigMapVolumeSource // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty"` + // +optional + VsphereVolume *VsphereVirtualDiskVolumeSource // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty"` + // +optional + AzureDisk *AzureDiskVolumeSource + // PhotonPersistentDisk represents a Photon Controller persistent disk attached and mounted on kubelets host machine + PhotonPersistentDisk *PhotonPersistentDiskVolumeSource + // Items for all in one resources secrets, configmaps, and downward API + Projected *ProjectedVolumeSource + // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + // +optional + PortworxVolume *PortworxVolumeSource + // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // +optional + ScaleIO *ScaleIOVolumeSource } // Similar to VolumeSource but meant for the administrator who creates PVs. @@ -250,82 +309,123 @@ type VolumeSource struct { 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"` + // +optional + GCEPersistentDisk *GCEPersistentDiskVolumeSource // 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"` + // +optional + AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource // HostPath represents a directory on the host. // Provisioned by a developer or tester. // This is useful for single-node development and testing only! // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. - HostPath *HostPathVolumeSource `json:"hostPath,omitempty"` + // +optional + HostPath *HostPathVolumeSource // Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod - Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty"` + // +optional + Glusterfs *GlusterfsVolumeSource // NFS represents an NFS mount on the host that shares a pod's lifetime - NFS *NFSVolumeSource `json:"nfs,omitempty"` + // +optional + NFS *NFSVolumeSource // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime - RBD *RBDVolumeSource `json:"rbd,omitempty"` + // +optional + RBD *RBDVolumeSource // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty"` + // +optional + Quobyte *QuobyteVolumeSource // 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"` + // +optional + ISCSI *ISCSIVolumeSource // FlexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. - FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty"` + // +optional + FlexVolume *FlexVolumeSource // Cinder represents a cinder volume attached and mounted on kubelets host machine - Cinder *CinderVolumeSource `json:"cinder,omitempty"` + // +optional + Cinder *CinderVolumeSource // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - CephFS *CephFSVolumeSource `json:"cephfs,omitempty"` + // +optional + CephFS *CephFSVolumeSource // 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"` + // +optional + FC *FCVolumeSource // 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"` + // +optional + Flocker *FlockerVolumeSource // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty"` + // +optional + AzureFile *AzureFileVolumeSource // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty"` + // +optional + VsphereVolume *VsphereVirtualDiskVolumeSource // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty"` + // +optional + AzureDisk *AzureDiskVolumeSource + // PhotonPersistentDisk represents a Photon Controller persistent disk attached and mounted on kubelets host machine + PhotonPersistentDisk *PhotonPersistentDiskVolumeSource + // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + // +optional + PortworxVolume *PortworxVolumeSource + // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // +optional + ScaleIO *ScaleIOVolumeSource } type PersistentVolumeClaimVolumeSource struct { // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume - ClaimName string `json:"claimName"` + ClaimName string // Optional: Defaults to false (read/write). ReadOnly here // will force the ReadOnly setting in VolumeMounts - ReadOnly bool `json:"readOnly,omitempty"` + // +optional + ReadOnly bool } +const ( + // BetaStorageClassAnnotation represents the beta/previous StorageClass annotation. + // It's currently still used and will be held for backwards compatibility + BetaStorageClassAnnotation = "volume.beta.kubernetes.io/storage-class" +) + // +genclient=true // +nonNamespaced=true type PersistentVolume struct { - unversioned.TypeMeta `json:",inline"` - ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta //Spec defines a persistent volume owned by the cluster - Spec PersistentVolumeSpec `json:"spec,omitempty"` + // +optional + Spec PersistentVolumeSpec // Status represents the current information about persistent volume. - Status PersistentVolumeStatus `json:"status,omitempty"` + // +optional + Status PersistentVolumeStatus } type PersistentVolumeSpec struct { // Resources represents the actual resources of the volume - Capacity ResourceList `json:"capacity"` + Capacity ResourceList // Source represents the location and type of a volume to mount. - PersistentVolumeSource `json:",inline"` + PersistentVolumeSource // AccessModes contains all ways the volume can be mounted - AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty"` + // +optional + AccessModes []PersistentVolumeAccessMode // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. // ClaimRef is expected to be non-nil when bound. // claim.VolumeName is the authoritative bind between PV and PVC. // When set to non-nil value, PVC.Spec.Selector of the referenced PVC is // ignored, i.e. labels of this PV do not need to match PVC selector. - ClaimRef *ObjectReference `json:"claimRef,omitempty"` + // +optional + ClaimRef *ObjectReference // Optional: what happens to a persistent volume when released from its claim. - PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty"` + // +optional + PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy + // Name of StorageClass to which this persistent volume belongs. Empty value + // means that this volume does not belong to any StorageClass. + // +optional + StorageClassName string } // PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes @@ -345,61 +445,80 @@ const ( type PersistentVolumeStatus struct { // Phase indicates if a volume is available, bound to a claim, or released by a claim - Phase PersistentVolumePhase `json:"phase,omitempty"` + // +optional + Phase PersistentVolumePhase // A human-readable message indicating details about why the volume is in this state. - Message string `json:"message,omitempty"` + // +optional + Message string // Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI - Reason string `json:"reason,omitempty"` + // +optional + Reason string } type PersistentVolumeList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` - Items []PersistentVolume `json:"items"` + metav1.TypeMeta + // +optional + metav1.ListMeta + Items []PersistentVolume } // +genclient=true // PersistentVolumeClaim is a user's request for and claim to a persistent volume type PersistentVolumeClaim struct { - unversioned.TypeMeta `json:",inline"` - ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Spec defines the volume requested by a pod author - Spec PersistentVolumeClaimSpec `json:"spec,omitempty"` + // +optional + Spec PersistentVolumeClaimSpec // Status represents the current information about a claim - Status PersistentVolumeClaimStatus `json:"status,omitempty"` + // +optional + Status PersistentVolumeClaimStatus } type PersistentVolumeClaimList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` - Items []PersistentVolumeClaim `json:"items"` + metav1.TypeMeta + // +optional + metav1.ListMeta + Items []PersistentVolumeClaim } // PersistentVolumeClaimSpec describes the common attributes of storage devices // and allows a Source for provider-specific attributes type PersistentVolumeClaimSpec struct { // Contains the types of access modes required - AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty"` + // +optional + AccessModes []PersistentVolumeAccessMode // A label query over volumes to consider for binding. This selector is // ignored when VolumeName is set - Selector *unversioned.LabelSelector `json:"selector,omitempty"` + // +optional + Selector *metav1.LabelSelector // Resources represents the minimum resources required - Resources ResourceRequirements `json:"resources,omitempty"` + // +optional + Resources ResourceRequirements // 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"` + // +optional + VolumeName string + // Name of the StorageClass required by the claim. + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1 + // +optional + StorageClassName *string } type PersistentVolumeClaimStatus struct { // Phase represents the current phase of PersistentVolumeClaim - Phase PersistentVolumeClaimPhase `json:"phase,omitempty"` + // +optional + Phase PersistentVolumeClaimPhase // AccessModes contains all ways the volume backing the PVC can be mounted - AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty"` + // +optional + AccessModes []PersistentVolumeAccessMode // Represents the actual resources of the underlying volume - Capacity ResourceList `json:"capacity,omitempty"` + // +optional + Capacity ResourceList } type PersistentVolumeAccessMode string @@ -447,7 +566,7 @@ const ( // 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"` + Path string } // Represents an empty directory for a pod. @@ -459,7 +578,8 @@ type EmptyDirVolumeSource struct { // 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"` + // +optional + Medium StorageMedium } // StorageMedium defines ways that storage can be allocated to a volume. @@ -488,19 +608,22 @@ const ( // 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"` + PDName string // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // TODO: how do we prevent errors in the filesystem from compromising the machine - FSType string `json:"fsType,omitempty"` + // +optional + FSType string // Optional: Partition on the disk to mount. // If omitted, kubelet will attempt to mount the device name. // Ex. For /dev/sda1, this field is "1", for /dev/sda, this field is 0 or empty. - Partition int32 `json:"partition,omitempty"` + // +optional + Partition int32 // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. - ReadOnly bool `json:"readOnly,omitempty"` + // +optional + ReadOnly bool } // Represents an ISCSI disk. @@ -509,21 +632,31 @@ type GCEPersistentDiskVolumeSource struct { 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"` + // +optional + TargetPortal string // Required: target iSCSI Qualified Name - IQN string `json:"iqn,omitempty"` + // +optional + IQN string // Required: iSCSI target lun number - Lun int32 `json:"lun,omitempty"` + // +optional + Lun int32 // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. - ISCSIInterface string `json:"iscsiInterface,omitempty"` + // +optional + ISCSIInterface string // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // TODO: how do we prevent errors in the filesystem from compromising the machine - FSType string `json:"fsType,omitempty"` + // +optional + FSType string // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. - ReadOnly bool `json:"readOnly,omitempty"` + // +optional + ReadOnly bool + // Required: list of iSCSI target portal ips for high availability. + // the portal is either an IP or ip_addr:port if port is other than default (typically TCP ports 860 and 3260) + // +optional + Portals []string } // Represents a Fibre Channel volume. @@ -531,39 +664,45 @@ type ISCSIVolumeSource struct { // Fibre Channel volumes support ownership management and SELinux relabeling. type FCVolumeSource struct { // Required: FC target worldwide names (WWNs) - TargetWWNs []string `json:"targetWWNs"` + TargetWWNs []string // Required: FC target lun number - Lun *int32 `json:"lun"` + Lun *int32 // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // TODO: how do we prevent errors in the filesystem from compromising the machine - FSType string `json:"fsType,omitempty"` + // +optional + FSType string // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. - ReadOnly bool `json:"readOnly,omitempty"` + // +optional + ReadOnly bool } // FlexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. type FlexVolumeSource struct { // Driver is the name of the driver to use for this volume. - Driver string `json:"driver"` + Driver string // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. - FSType string `json:"fsType,omitempty"` + // +optional + FSType string // Optional: SecretRef is reference to the secret object containing // sensitive information to pass to the plugin scripts. This may be // empty if no secret object is specified. If the secret object // contains more than one secret, all secrets are passed to the plugin // scripts. - SecretRef *LocalObjectReference `json:"secretRef,omitempty"` + // +optional + SecretRef *LocalObjectReference // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. - ReadOnly bool `json:"readOnly,omitempty"` + // +optional + ReadOnly bool // Optional: Extra driver options if any. - Options map[string]string `json:"options,omitempty"` + // +optional + Options map[string]string } // Represents a Persistent Disk resource in AWS. @@ -574,19 +713,22 @@ type FlexVolumeSource struct { // 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"` + VolumeID string // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // TODO: how do we prevent errors in the filesystem from compromising the machine - FSType string `json:"fsType,omitempty"` + // +optional + FSType string // Optional: Partition on the disk to mount. // If omitted, kubelet will attempt to mount the device name. // Ex. For /dev/sda1, this field is "1", for /dev/sda, this field is 0 or empty. - Partition int32 `json:"partition,omitempty"` + // +optional + Partition int32 // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. - ReadOnly bool `json:"readOnly,omitempty"` + // +optional + ReadOnly bool } // Represents a volume that is populated with the contents of a git repository. @@ -594,14 +736,16 @@ type AWSElasticBlockStoreVolumeSource struct { // Git repo volumes support SELinux relabeling. type GitRepoVolumeSource struct { // Repository URL - Repository string `json:"repository"` + Repository string // Commit hash, this is optional - Revision string `json:"revision,omitempty"` + // +optional + Revision string // Clone target, this is optional // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the // git repository. Otherwise, if specified, the volume will contain the git repository in // the subdirectory with the given name. - Directory string `json:"directory,omitempty"` + // +optional + Directory string // TODO: Consider credentials here. } @@ -612,35 +756,64 @@ type GitRepoVolumeSource struct { // 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"` + // +optional + SecretName string // If unspecified, each key-value pair in the Data field of the referenced // Secret will be projected into the volume as a file whose name is the // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be // present. If a key is specified which is not present in the Secret, - // the volume setup will error. Paths must be relative and may not contain - // the '..' path or start with '..'. - Items []KeyToPath `json:"items,omitempty"` + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional + Items []KeyToPath // Mode bits to use on created files by default. Must be a value between // 0 and 0777. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. - DefaultMode *int32 `json:"defaultMode,omitempty"` + // +optional + DefaultMode *int32 + // Specify whether the Secret or its key must be defined + // +optional + Optional *bool +} + +// Adapts a secret into a projected volume. +// +// The contents of the target Secret's Data field will be presented in a +// projected volume as files using the keys in the Data field as the file names. +// Note that this is identical to a secret volume source without the default +// mode. +type SecretProjection struct { + LocalObjectReference + // If unspecified, each key-value pair in the Data field of the referenced + // Secret will be projected into the volume as a file whose name is the + // key and content is the value. If specified, the listed keys will be + // projected into the specified paths, and unlisted keys will not be + // present. If a key is specified which is not present in the Secret, + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional + Items []KeyToPath + // Specify whether the Secret or its key must be defined + // +optional + Optional *bool } // Represents an NFS mount that lasts the lifetime of a pod. // NFS volumes do not support ownership management or SELinux relabeling. type NFSVolumeSource struct { // Server is the hostname or IP address of the NFS server - Server string `json:"server"` + Server string // Path is the exported NFS share - Path string `json:"path"` + Path string // 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"` + // +optional + ReadOnly bool } // Represents a Quobyte mount that lasts the lifetime of a pod. @@ -649,61 +822,71 @@ type QuobyteVolumeSource struct { // Registry represents a single or multiple Quobyte Registry services // specified as a string as host:port pair (multiple entries are separated with commas) // which acts as the central registry for volumes - Registry string `json:"registry"` + Registry string // Volume is a string that references an already created Quobyte volume by name. - Volume string `json:"volume"` + Volume string // Defaults to false (read/write). ReadOnly here will force // the Quobyte to be mounted with read-only permissions - ReadOnly bool `json:"readOnly,omitempty"` + // +optional + ReadOnly bool // User to map volume access to // Defaults to the root user - User string `json:"user,omitempty"` + // +optional + User string // Group to map volume access to // Default is no group - Group string `json:"group,omitempty"` + // +optional + Group string } // Represents a Glusterfs mount that lasts the lifetime of a pod. // Glusterfs volumes do not support ownership management or SELinux relabeling. type GlusterfsVolumeSource struct { // Required: EndpointsName is the endpoint name that details Glusterfs topology - EndpointsName string `json:"endpoints"` + EndpointsName string // Required: Path is the Glusterfs volume path - Path string `json:"path"` + Path string // Optional: Defaults to false (read/write). ReadOnly here will force // the Glusterfs to be mounted with read-only permissions - ReadOnly bool `json:"readOnly,omitempty"` + // +optional + ReadOnly bool } // Represents a Rados Block Device mount that lasts the lifetime of a pod. // RBD volumes support ownership management and SELinux relabeling. type RBDVolumeSource struct { // Required: CephMonitors is a collection of Ceph monitors - CephMonitors []string `json:"monitors"` + CephMonitors []string // Required: RBDImage is the rados image name - RBDImage string `json:"image"` + RBDImage string // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // TODO: how do we prevent errors in the filesystem from compromising the machine - FSType string `json:"fsType,omitempty"` + // +optional + FSType string // Optional: RadosPool is the rados pool name,default is rbd - RBDPool string `json:"pool,omitempty"` + // +optional + RBDPool string // Optional: RBDUser is the rados user name, default is admin - RadosUser string `json:"user,omitempty"` + // +optional + RadosUser string // Optional: Keyring is the path to key ring for RBDUser, default is /etc/ceph/keyring - Keyring string `json:"keyring,omitempty"` + // +optional + Keyring string // Optional: SecretRef is name of the authentication secret for RBDUser, default is nil. - SecretRef *LocalObjectReference `json:"secretRef,omitempty"` + // +optional + SecretRef *LocalObjectReference // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. - ReadOnly bool `json:"readOnly,omitempty"` + // +optional + ReadOnly bool } // Represents a cinder volume resource in Openstack. A Cinder volume @@ -712,89 +895,143 @@ type RBDVolumeSource struct { // management and SELinux relabeling. type CinderVolumeSource struct { // Unique id of the volume used to identify the cinder volume - VolumeID string `json:"volumeID"` + VolumeID string // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - FSType string `json:"fsType,omitempty"` + // +optional + FSType string // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. - ReadOnly bool `json:"readOnly,omitempty"` + // +optional + ReadOnly bool } // Represents a Ceph Filesystem mount that lasts the lifetime of a pod // Cephfs volumes do not support ownership management or SELinux relabeling. type CephFSVolumeSource struct { // Required: Monitors is a collection of Ceph monitors - Monitors []string `json:"monitors"` + Monitors []string // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - Path string `json:"path,omitempty"` + // +optional + Path string // Optional: User is the rados user name, default is admin - User string `json:"user,omitempty"` + // +optional + User string // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret - SecretFile string `json:"secretFile,omitempty"` + // +optional + SecretFile string // Optional: SecretRef is reference to the authentication secret for User, default is empty. - SecretRef *LocalObjectReference `json:"secretRef,omitempty"` + // +optional + SecretRef *LocalObjectReference // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. - ReadOnly bool `json:"readOnly,omitempty"` + // +optional + ReadOnly bool } // Represents a Flocker volume mounted by the Flocker agent. +// One and only one of datasetName and datasetUUID should be set. // Flocker volumes do not support ownership management or SELinux relabeling. type FlockerVolumeSource struct { - // Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker - DatasetName string `json:"datasetName"` + // Name of the dataset stored as metadata -> name on the dataset for Flocker + // should be considered as deprecated + // +optional + DatasetName string + // UUID of the dataset. This is unique identifier of a Flocker dataset + // +optional + DatasetUUID string } // Represents a volume containing downward API info. // Downward API volumes support ownership management and SELinux relabeling. type DownwardAPIVolumeSource struct { // Items is a list of DownwardAPIVolume file - Items []DownwardAPIVolumeFile `json:"items,omitempty"` + // +optional + Items []DownwardAPIVolumeFile // Mode bits to use on created files by default. Must be a value between // 0 and 0777. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. - DefaultMode *int32 `json:"defaultMode,omitempty"` + // +optional + DefaultMode *int32 } // Represents a single file containing information from the downward API type DownwardAPIVolumeFile struct { // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' - Path string `json:"path"` + Path string // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. - FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty"` + // +optional + FieldRef *ObjectFieldSelector // Selects a resource of the container: only resources limits and requests // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty"` + // +optional + ResourceFieldRef *ResourceFieldSelector // Optional: mode bits to use on this file, must be a value between 0 // and 0777. If not specified, the volume defaultMode will be used. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. - Mode *int32 `json:"mode,omitempty"` + // +optional + Mode *int32 +} + +// Represents downward API info for projecting into a projected volume. +// Note that this is identical to a downwardAPI volume source without the default +// mode. +type DownwardAPIProjection struct { + // Items is a list of DownwardAPIVolume file + // +optional + Items []DownwardAPIVolumeFile } // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. type AzureFileVolumeSource struct { // the name of secret that contains Azure Storage Account Name and Key - SecretName string `json:"secretName"` + SecretName string // Share Name - ShareName string `json:"shareName"` + ShareName string // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. - ReadOnly bool `json:"readOnly,omitempty"` + // +optional + ReadOnly bool } // Represents a vSphere volume resource. type VsphereVirtualDiskVolumeSource struct { // Path that identifies vSphere volume vmdk - VolumePath string `json:"volumePath"` + VolumePath string // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - FSType string `json:"fsType,omitempty"` + // +optional + FSType string +} + +// Represents a Photon Controller persistent disk resource. +type PhotonPersistentDiskVolumeSource struct { + // ID that identifies Photon Controller persistent disk + PdID string + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + FSType string +} + +// PortworxVolumeSource represents a Portworx volume resource. +type PortworxVolumeSource struct { + // VolumeID uniquely identifies a Portworx volume + VolumeID string + // FSType represents the filesystem type to mount + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + // +optional + FSType string + // Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // +optional + ReadOnly bool } type AzureDataDiskCachingMode string @@ -808,18 +1045,56 @@ const ( // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. type AzureDiskVolumeSource struct { // The Name of the data disk in the blob storage - DiskName string `json:"diskName"` + DiskName string // The URI the the data disk in the blob storage - DataDiskURI string `json:"diskURI"` + DataDiskURI string // Host Caching mode: None, Read Only, Read Write. - CachingMode *AzureDataDiskCachingMode `json:"cachingMode,omitempty"` + // +optional + CachingMode *AzureDataDiskCachingMode // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - FSType *string `json:"fsType,omitempty"` + // +optional + FSType *string // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. - ReadOnly *bool `json:"readOnly,omitempty"` + // +optional + ReadOnly *bool +} + +// ScaleIOVolumeSource represents a persistent ScaleIO volume +type ScaleIOVolumeSource struct { + // The host address of the ScaleIO API Gateway. + Gateway string + // The name of the storage system as configured in ScaleIO. + System string + // SecretRef references to the secret for ScaleIO user and other + // sensitive information. If this is not provided, Login operation will fail. + SecretRef *LocalObjectReference + // Flag to enable/disable SSL communication with Gateway, default false + // +optional + SSLEnabled bool + // The name of the Protection Domain for the configured storage (defaults to "default"). + // +optional + ProtectionDomain string + // The Storage Pool associated with the protection domain (defaults to "default"). + // +optional + StoragePool string + // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). + // +optional + StorageMode string + // The name of a volume already created in the ScaleIO system + // that is associated with this volume source. + VolumeName string + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // +optional + FSType string + // Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // +optional + ReadOnly bool } // Adapts a ConfigMap into a volume. @@ -829,73 +1104,133 @@ type AzureDiskVolumeSource struct { // 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"` + 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"` + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional + Items []KeyToPath // Mode bits to use on created files by default. Must be a value between // 0 and 0777. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. - DefaultMode *int32 `json:"defaultMode,omitempty"` + // +optional + DefaultMode *int32 + // Specify whether the ConfigMap or it's keys must be defined + // +optional + Optional *bool +} + +// Adapts a ConfigMap into a projected volume. +// +// The contents of the target ConfigMap's Data field will be presented in a +// projected volume as files using the keys in the Data field as the file names, +// unless the items element is populated with specific mappings of keys to paths. +// Note that this is identical to a configmap volume source without the default +// mode. +type ConfigMapProjection struct { + LocalObjectReference + // If unspecified, each key-value pair in the Data field of the referenced + // ConfigMap will be projected into the volume as a file whose name is the + // key and content is the value. If specified, the listed keys will be + // projected into the specified paths, and unlisted keys will not be + // present. If a key is specified which is not present in the ConfigMap, + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional + Items []KeyToPath + // Specify whether the ConfigMap or it's keys must be defined + // +optional + Optional *bool +} + +// Represents a projected volume source +type ProjectedVolumeSource struct { + // list of volume projections + Sources []VolumeProjection + // Mode bits to use on created files by default. Must be a value between + // 0 and 0777. + // Directories within the path are not affected by this setting. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + // +optional + DefaultMode *int32 +} + +// Projection that may be projected along with other supported volume types +type VolumeProjection struct { + // all types below are the supported types for projection into the same volume + + // information about the secret data to project + Secret *SecretProjection + // information about the downwardAPI data to project + DownwardAPI *DownwardAPIProjection + // information about the configMap data to project + ConfigMap *ConfigMapProjection } // Maps a string key to a path within a volume. type KeyToPath struct { // The key to project. - Key string `json:"key"` + Key string // The relative path of the file to map the key to. // May not be an absolute path. // May not contain the path element '..'. // May not start with the string '..'. - Path string `json:"path"` + Path string // Optional: mode bits to use on this file, should be a value between 0 // and 0777. If not specified, the volume defaultMode will be used. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. - Mode *int32 `json:"mode,omitempty"` + // +optional + Mode *int32 } // 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 + Name string // 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"` + // +optional + HostPort int32 // Required: This must be a valid port number, 0 < x < 65536. - ContainerPort int32 `json:"containerPort"` + ContainerPort int32 // Required: Supports "TCP" and "UDP". - Protocol Protocol `json:"protocol,omitempty"` + // +optional + Protocol Protocol // Optional: What host IP to bind the external port to. - HostIP string `json:"hostIP,omitempty"` + // +optional + HostIP string } // VolumeMount describes a mounting of a Volume within a container. type VolumeMount struct { // Required: This must match the Name of a Volume [above]. - Name string `json:"name"` + Name string // Optional: Defaults to false (read-write). - ReadOnly bool `json:"readOnly,omitempty"` + // +optional + ReadOnly bool // Required. Must not contain ':'. - MountPath string `json:"mountPath"` + MountPath string // Path within the volume from which the container's volume should be mounted. // Defaults to "" (volume's root). - SubPath string `json:"subPath,omitempty"` + // +optional + SubPath string } // EnvVar represents an environment variable present in a Container. type EnvVar struct { // Required: This must be a C_IDENTIFIER. - Name string `json:"name"` + Name string // Optional: no more than one of the following may be specified. // Optional: Defaults to ""; variable references $(VAR_NAME) are expanded // using the previous defined environment variables in the container and @@ -904,9 +1239,11 @@ type EnvVar struct { // 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 + Value string // Optional: Specifies a source the value of this var should come from. - ValueFrom *EnvVarSource `json:"valueFrom,omitempty"` + // +optional + ValueFrom *EnvVarSource } // EnvVarSource represents a source for the value of an EnvVar. @@ -914,14 +1251,18 @@ type EnvVar struct { type EnvVarSource struct { // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, // spec.nodeName, spec.serviceAccountName, status.podIP. - FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty"` + // +optional + FieldRef *ObjectFieldSelector // Selects a resource of the container: only resources limits and requests // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty"` + // +optional + ResourceFieldRef *ResourceFieldSelector // Selects a key of a ConfigMap. - ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty"` + // +optional + ConfigMapKeyRef *ConfigMapKeySelector // Selects a key of a secret in the pod's namespace. - SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty"` + // +optional + SecretKeyRef *SecretKeySelector } // ObjectFieldSelector selects an APIVersioned field of an object. @@ -929,58 +1270,110 @@ 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"` + APIVersion string // Required: Path of the field to select in the specified API version - FieldPath string `json:"fieldPath"` + FieldPath string } // 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"` + // +optional + ContainerName string // Required: resource to select - Resource string `json:"resource"` + Resource string // Specifies the output format of the exposed resources, defaults to "1" - Divisor resource.Quantity `json:"divisor,omitempty"` + // +optional + Divisor resource.Quantity } // Selects a key from a ConfigMap. type ConfigMapKeySelector struct { // The ConfigMap to select from. - LocalObjectReference `json:",inline"` + LocalObjectReference // The key to select. - Key string `json:"key"` + Key string + // Specify whether the ConfigMap or it's key must be defined + // +optional + Optional *bool } // SecretKeySelector selects a key of a Secret. type SecretKeySelector struct { // The name of the secret in the pod's namespace to select from. - LocalObjectReference `json:",inline"` + LocalObjectReference // The key of the secret to select from. Must be a valid secret key. - Key string `json:"key"` + Key string + // Specify whether the Secret or it's key must be defined + // +optional + Optional *bool +} + +// EnvFromSource represents the source of a set of ConfigMaps +type EnvFromSource struct { + // An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + // +optional + Prefix string + // The ConfigMap to select from. + //+optional + ConfigMapRef *ConfigMapEnvSource + // The Secret to select from. + //+optional + SecretRef *SecretEnvSource +} + +// ConfigMapEnvSource selects a ConfigMap to populate the environment +// variables with. +// +// The contents of the target ConfigMap's Data field will represent the +// key-value pairs as environment variables. +type ConfigMapEnvSource struct { + // The ConfigMap to select from. + LocalObjectReference + // Specify whether the ConfigMap must be defined + // +optional + Optional *bool +} + +// SecretEnvSource selects a Secret to populate the environment +// variables with. +// +// The contents of the target Secret's Data field will represent the +// key-value pairs as environment variables. +type SecretEnvSource struct { + // The Secret to select from. + LocalObjectReference + // Specify whether the Secret must be defined + // +optional + Optional *bool } // HTTPHeader describes a custom header to be used in HTTP probes type HTTPHeader struct { // The header field name - Name string `json:"name"` + Name string // The header field value - Value string `json:"value"` + Value string } // 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"` + // +optional + Path string // Required: Name or number of the port to access on the container. - Port intstr.IntOrString `json:"port,omitempty"` + // +optional + Port intstr.IntOrString // 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 + Host string // Optional: Scheme to use for connecting to the host, defaults to HTTP. - Scheme URIScheme `json:"scheme,omitempty"` + // +optional + Scheme URIScheme // Optional: Custom headers to set in the request. HTTP allows repeated headers. - HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty"` + // +optional + HTTPHeaders []HTTPHeader } // URIScheme identifies the scheme used for connection to a host for Get actions @@ -996,7 +1389,8 @@ const ( // TCPSocketAction describes an action based on opening a socket type TCPSocketAction struct { // Required: Port to connect to. - Port intstr.IntOrString `json:"port,omitempty"` + // +optional + Port intstr.IntOrString } // ExecAction describes a "run in container" action. @@ -1005,25 +1399,31 @@ type ExecAction struct { // 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"` + // +optional + Command []string } // Probe describes a health check to be performed against a container to determine whether it is // alive or ready to receive traffic. type Probe struct { // The action taken to determine the health of a container - Handler `json:",inline"` + Handler // Length of time before health checking is activated. In seconds. - InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"` + // +optional + InitialDelaySeconds int32 // Length of time before health checking times out. In seconds. - TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"` + // +optional + TimeoutSeconds int32 // How often (in seconds) to perform the probe. - PeriodSeconds int32 `json:"periodSeconds,omitempty"` + // +optional + PeriodSeconds int32 // Minimum consecutive successes for the probe to be considered successful after having failed. // Must be 1 for liveness. - SuccessThreshold int32 `json:"successThreshold,omitempty"` + // +optional + SuccessThreshold int32 // Minimum consecutive failures for the probe to be considered failed after having succeeded. - FailureThreshold int32 `json:"failureThreshold,omitempty"` + // +optional + FailureThreshold int32 } // PullPolicy describes a policy for if/when to pull a container image @@ -1038,69 +1438,111 @@ const ( PullIfNotPresent PullPolicy = "IfNotPresent" ) +// TerminationMessagePolicy describes how termination messages are retrieved from a container. +type TerminationMessagePolicy string + +const ( + // TerminationMessageReadFile is the default behavior and will set the container status message to + // the contents of the container's terminationMessagePath when the container exits. + TerminationMessageReadFile TerminationMessagePolicy = "File" + // TerminationMessageFallbackToLogsOnError will read the most recent contents of the container logs + // for the container status message when the container exits with an error and the + // terminationMessagePath has no contents. + TerminationMessageFallbackToLogsOnError TerminationMessagePolicy = "FallbackToLogsOnError" +) + // Capability represent POSIX capabilities type type Capability string // Capabilities represent POSIX capabilities that can be added or removed to a running container. type Capabilities struct { // Added capabilities - Add []Capability `json:"add,omitempty"` + // +optional + Add []Capability // Removed capabilities - Drop []Capability `json:"drop,omitempty"` + // +optional + Drop []Capability } // ResourceRequirements describes the compute resource requirements. type ResourceRequirements struct { // Limits describes the maximum amount of compute resources allowed. - Limits ResourceList `json:"limits,omitempty"` + // +optional + Limits ResourceList // Requests describes the minimum amount of compute resources required. // If Request is omitted for a container, it defaults to Limits if that is explicitly specified, // otherwise to an implementation-defined value - Requests ResourceList `json:"requests,omitempty"` + // +optional + Requests ResourceList } // Container represents a single container that is expected to be run on the host. type Container struct { // Required: This must be a DNS_LABEL. Each container in a pod must // have a unique name. - Name string `json:"name"` + Name string // Required. - Image string `json:"image"` + Image string // Optional: The docker image's entrypoint is used if this is not provided; cannot be updated. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, // regardless of whether the variable exists or not. - Command []string `json:"command,omitempty"` + // +optional + Command []string // Optional: The docker image's cmd is used if this is not provided; cannot be updated. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, // regardless of whether the variable exists or not. - Args []string `json:"args,omitempty"` + // +optional + Args []string // Optional: Defaults to Docker's default. - WorkingDir string `json:"workingDir,omitempty"` - Ports []ContainerPort `json:"ports,omitempty"` - Env []EnvVar `json:"env,omitempty"` + // +optional + WorkingDir string + // +optional + Ports []ContainerPort + // List of sources to populate environment variables in the container. + // The keys defined within a source must be a C_IDENTIFIER. All invalid keys + // will be reported as an event when the container is starting. When a key exists in multiple + // sources, the value associated with the last source will take precedence. + // Values defined by an Env with a duplicate key will take precedence. + // Cannot be updated. + // +optional + EnvFrom []EnvFromSource + // +optional + Env []EnvVar // Compute resource requirements. - 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"` + // +optional + Resources ResourceRequirements + // +optional + VolumeMounts []VolumeMount + // +optional + LivenessProbe *Probe + // +optional + ReadinessProbe *Probe + // +optional + Lifecycle *Lifecycle // Required. - TerminationMessagePath string `json:"terminationMessagePath,omitempty"` + // +optional + TerminationMessagePath string + // +optional + TerminationMessagePolicy TerminationMessagePolicy // Required: Policy for pulling images for this container - ImagePullPolicy PullPolicy `json:"imagePullPolicy"` + ImagePullPolicy PullPolicy // Optional: SecurityContext defines the security options the container should be run with. // If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. - SecurityContext *SecurityContext `json:"securityContext,omitempty"` + // +optional + SecurityContext *SecurityContext // Variables for interactive containers, these have very specialized use-cases (e.g. debugging) // and shouldn't be used for general purpose containers. - Stdin bool `json:"stdin,omitempty"` - StdinOnce bool `json:"stdinOnce,omitempty"` - TTY bool `json:"tty,omitempty"` + // +optional + Stdin bool + // +optional + StdinOnce bool + // +optional + TTY bool } // Handler defines a specific action that should be taken @@ -1108,12 +1550,15 @@ type Container struct { type Handler struct { // One and only one of the following should be specified. // Exec specifies the action to take. - Exec *ExecAction `json:"exec,omitempty"` + // +optional + Exec *ExecAction // HTTPGet specifies the http request to perform. - HTTPGet *HTTPGetAction `json:"httpGet,omitempty"` + // +optional + HTTPGet *HTTPGetAction // TCPSocket specifies an action involving a TCP port. // TODO: implement a realistic TCP lifecycle hook - TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty"` + // +optional + TCPSocket *TCPSocketAction } // Lifecycle describes actions that the management system should take in response to container lifecycle @@ -1122,10 +1567,12 @@ type Handler struct { 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"` + // +optional + PostStart *Handler // PreStop is called immediately before a container is terminated. The reason for termination is // passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. - PreStop *Handler `json:"preStop,omitempty"` + // +optional + PreStop *Handler } // The below types are used by kube_client and api_server. @@ -1144,47 +1591,62 @@ const ( type ContainerStateWaiting struct { // A brief CamelCase string indicating details about why the container is in waiting state. - Reason string `json:"reason,omitempty"` + // +optional + Reason string // A human-readable message indicating details about why the container is in waiting state. - Message string `json:"message,omitempty"` + // +optional + Message string } type ContainerStateRunning struct { - StartedAt unversioned.Time `json:"startedAt,omitempty"` + // +optional + StartedAt metav1.Time } 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"` + ExitCode int32 + // +optional + Signal int32 + // +optional + Reason string + // +optional + Message string + // +optional + StartedAt metav1.Time + // +optional + FinishedAt metav1.Time + // +optional + ContainerID string } // ContainerState holds a possible state of container. // Only one of its members may be specified. // If none of them is specified, the default one is ContainerStateWaiting. type ContainerState struct { - Waiting *ContainerStateWaiting `json:"waiting,omitempty"` - Running *ContainerStateRunning `json:"running,omitempty"` - Terminated *ContainerStateTerminated `json:"terminated,omitempty"` + // +optional + Waiting *ContainerStateWaiting + // +optional + Running *ContainerStateRunning + // +optional + Terminated *ContainerStateTerminated } 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"` + Name string + // +optional + State ContainerState + // +optional + LastTerminationState ContainerState // Ready specifies whether the container has passed its readiness check. - Ready bool `json:"ready"` + Ready bool // Note that this is calculated from dead containers. But those containers are subject to // garbage collection. This value will get capped at 5 by GC. - RestartCount int32 `json:"restartCount"` - Image string `json:"image"` - ImageID string `json:"imageID"` - ContainerID string `json:"containerID,omitempty"` + RestartCount int32 + Image string + ImageID string + // +optional + ContainerID string } // PodPhase is a label for the condition of a pod at the current time. @@ -1221,15 +1683,22 @@ const ( PodReady PodConditionType = "Ready" // PodInitialized means that all init containers in the pod have started successfully. PodInitialized PodConditionType = "Initialized" + // PodReasonUnschedulable reason in PodScheduled PodCondition means that the scheduler + // can't schedule the pod right now, for example due to insufficient resources in the cluster. + PodReasonUnschedulable = "Unschedulable" ) type PodCondition struct { - Type PodConditionType `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"` + Type PodConditionType + Status ConditionStatus + // +optional + LastProbeTime metav1.Time + // +optional + LastTransitionTime metav1.Time + // +optional + Reason string + // +optional + Message string } // RestartPolicy describes how the container should be restarted. @@ -1246,19 +1715,25 @@ const ( // PodList is a list of Pods. type PodList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []Pod `json:"items"` + Items []Pod } // DNSPolicy defines how a pod's DNS will be configured. type DNSPolicy string const ( + // DNSClusterFirstWithHostNet indicates that the pod should use cluster DNS + // first, if it is available, then fall back on the default + // (as determined by kubelet) DNS settings. + DNSClusterFirstWithHostNet DNSPolicy = "ClusterFirstWithHostNet" + // DNSClusterFirst indicates that the pod should use cluster DNS - // first, if it is available, then fall back on the default (as - // determined by kubelet) DNS settings. + // first unless hostNetwork is true, if it is available, then + // fall back on the default (as determined by kubelet) DNS settings. DNSClusterFirst DNSPolicy = "ClusterFirst" // DNSDefault indicates that the pod should use the default (as @@ -1271,29 +1746,30 @@ const ( // by the node selector terms. type NodeSelector struct { //Required. A list of node selector terms. The terms are ORed. - NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms"` + NodeSelectorTerms []NodeSelectorTerm } // A null or empty node selector term matches no objects. type NodeSelectorTerm struct { //Required. A list of node selector requirements. The requirements are ANDed. - MatchExpressions []NodeSelectorRequirement `json:"matchExpressions"` + MatchExpressions []NodeSelectorRequirement } // A node selector requirement is a selector that contains values, a key, and an operator // that relates the key and values. type NodeSelectorRequirement struct { // The label key that the selector applies to. - Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key"` + Key string // Represents a key's relationship to a set of values. // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - Operator NodeSelectorOperator `json:"operator"` + Operator NodeSelectorOperator // An array of string values. If the operator is In or NotIn, // the values array must be non-empty. If the operator is Exists or DoesNotExist, // the values array must be empty. If the operator is Gt or Lt, the values // array must have a single element, which will be interpreted as an integer. // This array is replaced during a strategic merge patch. - Values []string `json:"values,omitempty"` + // +optional + Values []string } // A node selector operator is the set of operators that can be used in @@ -1312,11 +1788,14 @@ const ( // Affinity is a group of affinity scheduling rules. type Affinity struct { // Describes node affinity scheduling rules for the pod. - NodeAffinity *NodeAffinity `json:"nodeAffinity,omitempty"` + // +optional + NodeAffinity *NodeAffinity // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - PodAffinity *PodAffinity `json:"podAffinity,omitempty"` + // +optional + PodAffinity *PodAffinity // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). - PodAntiAffinity *PodAntiAffinity `json:"podAntiAffinity,omitempty"` + // +optional + PodAntiAffinity *PodAntiAffinity } // Pod affinity is a group of inter pod affinity scheduling rules. @@ -1329,7 +1808,8 @@ type PodAffinity struct { // 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"` + // +optional + // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm // If the affinity requirements specified by this field are not met at // scheduling time, the pod will not be scheduled onto the node. // If the affinity requirements specified by this field cease to be met @@ -1337,7 +1817,8 @@ type PodAffinity struct { // 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"` + // +optional + RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm // The scheduler will prefer to schedule pods to nodes that satisfy // the affinity expressions specified by this field, but it may choose // a node that violates one or more of the expressions. The node that is @@ -1347,7 +1828,8 @@ type PodAffinity struct { // 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"` + // +optional + PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm } // Pod anti affinity is a group of inter pod anti affinity scheduling rules. @@ -1360,7 +1842,8 @@ type PodAntiAffinity struct { // 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"` + // +optional + // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm // If the anti-affinity requirements specified by this field are not met at // scheduling time, the pod will not be scheduled onto the node. // If the anti-affinity requirements specified by this field cease to be met @@ -1368,7 +1851,8 @@ type PodAntiAffinity struct { // 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"` + // +optional + RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm // The scheduler will prefer to schedule pods to nodes that satisfy // the anti-affinity expressions specified by this field, but it may choose // a node that violates one or more of the expressions. The node that is @@ -1378,16 +1862,17 @@ type PodAntiAffinity struct { // 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"` + // +optional + PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm } // The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) type WeightedPodAffinityTerm struct { // weight associated with matching the corresponding podAffinityTerm, // in the range 1-100. - Weight int `json:"weight"` + Weight int32 // Required. A pod affinity term, associated with the corresponding weight. - PodAffinityTerm PodAffinityTerm `json:"podAffinityTerm"` + PodAffinityTerm PodAffinityTerm } // Defines a set of pods (namely those matching the labelSelector @@ -1398,12 +1883,11 @@ type WeightedPodAffinityTerm struct { // 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"` + // +optional + LabelSelector *metav1.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"` + // null or empty list means "this pod's namespace" + Namespaces []string // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching // the labelSelector in the specified namespaces, where co-located is defined as running on a node // whose value of the label with key topologyKey matches that of any node on which any of the @@ -1411,7 +1895,8 @@ type PodAffinityTerm struct { // 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"` + // +optional + TopologyKey string } // Node affinity is a group of node affinity scheduling rules. @@ -1422,14 +1907,16 @@ type NodeAffinity struct { // 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"` + // +optional + // RequiredDuringSchedulingRequiredDuringExecution *NodeSelector // If the affinity requirements specified by this field are not met at // scheduling time, the pod will not be scheduled onto the node. // If the affinity requirements specified by this field cease to be met // at some point during pod execution (e.g. due to an update), the system // may or may not try to eventually evict the pod from its node. - RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"` + // +optional + RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector // The scheduler will prefer to schedule pods to nodes that satisfy // the affinity expressions specified by this field, but it may choose // a node that violates one or more of the expressions. The node that is @@ -1439,29 +1926,35 @@ type NodeAffinity struct { // 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"` + // +optional + PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm } // An empty preferred scheduling term matches all objects with implicit weight 0 // (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). type PreferredSchedulingTerm struct { // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - Weight int32 `json:"weight"` + Weight int32 // A node selector term, associated with the corresponding weight. - Preference NodeSelectorTerm `json:"preference"` + Preference NodeSelectorTerm } // The node this Taint is attached to has the effect "effect" on // any pod that that does not tolerate the Taint. type Taint struct { // Required. The taint key to be applied to a node. - Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key"` + Key string // Required. The taint value corresponding to the taint key. - Value string `json:"value,omitempty"` + // +optional + Value string // Required. The effect of the taint on pods // that do not tolerate the taint. - // Valid effects are NoSchedule and PreferNoSchedule. - Effect TaintEffect `json:"effect"` + // Valid effects are NoSchedule, PreferNoSchedule and NoExecute. + Effect TaintEffect + // TimeAdded represents the time at which the taint was added. + // It is only written for NoExecute taints. + // +optional + TimeAdded metav1.Time } type TaintEffect string @@ -1477,37 +1970,42 @@ const ( // 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. + // Like TaintEffectNoSchedule, but additionally do not allow pods submitted to + // Kubelet without going through the scheduler to start. + // Enforced by Kubelet and the scheduler. // TaintEffectNoScheduleNoAdmit TaintEffect = "NoScheduleNoAdmit" - // 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" + // Evict any already-running pods that do not tolerate the taint. + // Currently enforced by NodeController. + TaintEffectNoExecute TaintEffect = "NoExecute" ) // The pod this Toleration is attached to tolerates any taint that matches // the triple using the matching 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. + // Key is the taint key that the toleration applies to. Empty means match all taint keys. + // If the key is empty, operator must be Exists; this combination means to match all values and all keys. + // +optional + Key string + // Operator represents a key's relationship to the value. // Valid operators are Exists and Equal. Defaults to Equal. // Exists is equivalent to wildcard for value, so that a pod can // tolerate all taints of a particular category. - Operator TolerationOperator `json:"operator,omitempty"` + // +optional + Operator TolerationOperator // Value is the taint value the toleration matches to. // If the operator is Exists, the value should be empty, otherwise just a regular string. - Value string `json:"value,omitempty"` + // +optional + Value string // 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. + // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + // +optional + Effect TaintEffect + // TolerationSeconds represents the period of time the toleration (which must be + // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + // it is not set, which means tolerate the taint forever (do not evict). Zero and + // negative values will be treated as 0 (evict immediately) by the system. + // +optional + TolerationSeconds *int64 } // A toleration operator is the set of operators that can be used in a toleration. @@ -1520,56 +2018,79 @@ const ( // PodSpec is a description of a pod type PodSpec struct { - Volumes []Volume `json:"volumes"` + Volumes []Volume // List of initialization containers belonging to the pod. - InitContainers []Container `json:"-"` + InitContainers []Container // List of containers belonging to the pod. - Containers []Container `json:"containers"` - RestartPolicy RestartPolicy `json:"restartPolicy,omitempty"` + Containers []Container + // +optional + RestartPolicy RestartPolicy // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. // Value must be non-negative integer. The value zero indicates delete immediately. // If this value is nil, the default grace period will be used instead. // The grace period is the duration in seconds after the processes running in the pod are sent // a termination signal and the time when the processes are forcibly halted with a kill signal. // Set this value longer than the expected cleanup time for your process. - TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` + // +optional + TerminationGracePeriodSeconds *int64 // Optional duration in seconds relative to the StartTime that the pod may be active on a node // before the system actively tries to terminate the pod; value must be positive integer - ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` + // +optional + ActiveDeadlineSeconds *int64 // Required: Set DNS policy. - DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty"` + // +optional + DNSPolicy DNSPolicy // NodeSelector is a selector which must be true for the pod to fit on a node - NodeSelector map[string]string `json:"nodeSelector,omitempty"` + // +optional + NodeSelector map[string]string // ServiceAccountName is the name of the ServiceAccount to use to run this pod // The pod will be allowed to use secrets referenced by the ServiceAccount - ServiceAccountName string `json:"serviceAccountName"` + ServiceAccountName string + // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. + // +optional + AutomountServiceAccountToken *bool // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, // the scheduler simply schedules this pod onto that node, assuming that it fits resource // requirements. - NodeName string `json:"nodeName,omitempty"` + // +optional + NodeName string // SecurityContext holds pod-level security attributes and common container settings. // Optional: Defaults to empty. See type description for default values of each field. - SecurityContext *PodSecurityContext `json:"securityContext,omitempty"` + // +optional + SecurityContext *PodSecurityContext // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. // If specified, these secrets will be passed to individual puller implementations for them to use. For example, // in the case of docker, only DockerConfig type secrets are honored. - ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty"` + // +optional + ImagePullSecrets []LocalObjectReference // 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"` + // +optional + Hostname string // If specified, the fully qualified Pod hostname will be "...svc.". // If not specified, the pod will not have a domainname at all. - Subdomain string `json:"subdomain,omitempty"` + // +optional + Subdomain string + // If specified, the pod's scheduling constraints + // +optional + Affinity *Affinity + // If specified, the pod will be dispatched by specified scheduler. + // If not specified, the pod will be dispatched by default scheduler. + // +optional + SchedulerName string + // If specified, the pod's tolerations. + // +optional + Tolerations []Toleration } // Sysctl defines a kernel parameter to be set type Sysctl struct { // Name of a property to set - Name string `json:"name"` + Name string // Value of a property to set - Value string `json:"value"` + Value string } // PodSecurityContext holds pod-level security attributes and common container settings. @@ -1580,38 +2101,45 @@ type PodSecurityContext struct { // used must be specified. // Optional: Default to false // +k8s:conversion-gen=false - HostNetwork bool `json:"hostNetwork,omitempty"` + // +optional + HostNetwork bool // Use the host's pid namespace. // Optional: Default to false. // +k8s:conversion-gen=false - HostPID bool `json:"hostPID,omitempty"` + // +optional + HostPID bool // Use the host's ipc namespace. // Optional: Default to false. // +k8s:conversion-gen=false - HostIPC bool `json:"hostIPC,omitempty"` + // +optional + HostIPC bool // The SELinux context to be applied to all containers. // If unspecified, the container runtime will allocate a random SELinux context for each // container. May also be set in SecurityContext. If set in // both SecurityContext and PodSecurityContext, the value specified in SecurityContext // takes precedence for that container. - SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty"` + // +optional + SELinuxOptions *SELinuxOptions // The UID to run the entrypoint of the container process. // Defaults to user specified in image metadata if unspecified. // May also be set in SecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence // for that container. - RunAsUser *int64 `json:"runAsUser,omitempty"` + // +optional + RunAsUser *int64 // Indicates that the container must run as a non-root user. // If true, the Kubelet will validate the image at runtime to ensure that it // does not run as UID 0 (root) and fail to start the container if it does. // If unset or false, no such validation will be performed. // May also be set in SecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence. - RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"` + // +optional + RunAsNonRoot *bool // A list of groups applied to the first process run in each container, in addition // to the container's primary GID. If unspecified, no groups will be added to // any container. - SupplementalGroups []int64 `json:"supplementalGroups,omitempty"` + // +optional + SupplementalGroups []int64 // A special supplemental group that applies to all containers in a pod. // Some volume types allow the Kubelet to change the ownership of that volume // to be owned by the pod: @@ -1621,89 +2149,122 @@ type PodSecurityContext struct { // 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"` + // +optional + FSGroup *int64 } +// PodQOSClass defines the supported qos classes of Pods. +type PodQOSClass string + +const ( + // PodQOSGuaranteed is the Guaranteed qos class. + PodQOSGuaranteed PodQOSClass = "Guaranteed" + // PodQOSBurstable is the Burstable qos class. + PodQOSBurstable PodQOSClass = "Burstable" + // PodQOSBestEffort is the BestEffort qos class. + PodQOSBestEffort PodQOSClass = "BestEffort" +) + // PodStatus represents information about the status of a pod. Status may trail the actual // state of a system. type PodStatus struct { - Phase PodPhase `json:"phase,omitempty"` - Conditions []PodCondition `json:"conditions,omitempty"` + // +optional + Phase PodPhase + // +optional + Conditions []PodCondition // A human readable message indicating details about why the pod is in this state. - Message string `json:"message,omitempty"` + // +optional + Message string // A brief CamelCase message indicating details about why the pod is in this state. e.g. 'OutOfDisk' - Reason string `json:"reason,omitempty"` + // +optional + Reason string - HostIP string `json:"hostIP,omitempty"` - PodIP string `json:"podIP,omitempty"` + // +optional + HostIP string + // +optional + PodIP string // Date and time at which the object was acknowledged by the Kubelet. // This is before the Kubelet pulled the container image(s) for the pod. - StartTime *unversioned.Time `json:"startTime,omitempty"` + // +optional + StartTime *metav1.Time + // +optional + QOSClass PodQOSClass // The list has one entry per init container in the manifest. The most recent successful // init container will have ready = true, the most recently started container will have // startTime set. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-statuses - InitContainerStatuses []ContainerStatus `json:"-"` + // More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses + InitContainerStatuses []ContainerStatus // The list has one entry per container in the manifest. Each entry is // currently the output of `docker inspect`. This output format is *not* // final and should not be relied upon. // TODO: Make real decisions about what our info should look like. Re-enable fuzz test // when we have done this. - ContainerStatuses []ContainerStatus `json:"containerStatuses,omitempty"` + // +optional + ContainerStatuses []ContainerStatus } // 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"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Status represents the current information about a pod. This data may not be up // to date. - Status PodStatus `json:"status,omitempty"` + // +optional + Status PodStatus } // +genclient=true // Pod is a collection of containers, used as either input (create, update) or as output (list, get). type Pod struct { - unversioned.TypeMeta `json:",inline"` - ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Spec defines the behavior of a pod. - Spec PodSpec `json:"spec,omitempty"` + // +optional + Spec PodSpec // Status represents the current information about a pod. This data may not be up // to date. - Status PodStatus `json:"status,omitempty"` + // +optional + Status PodStatus } // PodTemplateSpec describes the data a pod should have when created from a template type PodTemplateSpec struct { // Metadata of the pods created from this template. - ObjectMeta `json:"metadata,omitempty"` + // +optional + metav1.ObjectMeta // Spec defines the behavior of a pod. - Spec PodSpec `json:"spec,omitempty"` + // +optional + Spec PodSpec } // +genclient=true // PodTemplate describes a template for creating copies of a predefined pod. type PodTemplate struct { - unversioned.TypeMeta `json:",inline"` - ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Template defines the pods that will be created from this pod template - Template PodTemplateSpec `json:"template,omitempty"` + // +optional + Template PodTemplateSpec } // PodTemplateList is a list of PodTemplates. type PodTemplateList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []PodTemplate `json:"items"` + Items []PodTemplate } // ReplicationControllerSpec is the specification of a replication controller. @@ -1711,59 +2272,109 @@ type PodTemplateList struct { // a TemplateRef or a Template set. type ReplicationControllerSpec struct { // Replicas is the number of desired replicas. - Replicas int32 `json:"replicas"` + Replicas int32 + + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + // +optional + MinReadySeconds int32 // Selector is a label query over pods that should match the Replicas count. - Selector map[string]string `json:"selector"` + Selector map[string]string // TemplateRef is a reference to an object that describes the pod that will be created if // insufficient replicas are detected. This reference is ignored if a Template is set. // Must be set before converting to a versioned API object - //TemplateRef *ObjectReference `json:"templateRef,omitempty"` + // +optional + //TemplateRef *ObjectReference // Template is the object that describes the pod that will be created if // insufficient replicas are detected. Internally, this takes precedence over a // TemplateRef. - Template *PodTemplateSpec `json:"template,omitempty"` + // +optional + Template *PodTemplateSpec } // ReplicationControllerStatus represents the current status of a replication // controller. type ReplicationControllerStatus struct { // Replicas is the number of actual replicas. - Replicas int32 `json:"replicas"` + Replicas int32 // The number of pods that have labels matching the labels of the pod template of the replication controller. - FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"` + // +optional + FullyLabeledReplicas int32 // The number of ready replicas for this replication controller. - ReadyReplicas int32 `json:"readyReplicas,omitempty"` + // +optional + ReadyReplicas int32 + + // The number of available replicas (ready for at least minReadySeconds) for this replication controller. + // +optional + AvailableReplicas int32 // ObservedGeneration is the most recent generation observed by the controller. - ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // +optional + ObservedGeneration int64 + + // Represents the latest available observations of a replication controller's current state. + // +optional + Conditions []ReplicationControllerCondition +} + +type ReplicationControllerConditionType string + +// These are valid conditions of a replication controller. +const ( + // ReplicationControllerReplicaFailure is added in a replication controller when one of its pods + // fails to be created due to insufficient quota, limit ranges, pod security policy, node selectors, + // etc. or deleted due to kubelet being down or finalizers are failing. + ReplicationControllerReplicaFailure ReplicationControllerConditionType = "ReplicaFailure" +) + +// ReplicationControllerCondition describes the state of a replication controller at a certain point. +type ReplicationControllerCondition struct { + // Type of replication controller condition. + Type ReplicationControllerConditionType + // Status of the condition, one of True, False, Unknown. + Status ConditionStatus + // The last time the condition transitioned from one status to another. + // +optional + LastTransitionTime metav1.Time + // The reason for the condition's last transition. + // +optional + Reason string + // A human readable message indicating details about the transition. + // +optional + Message string } // +genclient=true // ReplicationController represents the configuration of a replication controller. type ReplicationController struct { - unversioned.TypeMeta `json:",inline"` - ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Spec defines the desired behavior of this replication controller. - Spec ReplicationControllerSpec `json:"spec,omitempty"` + // +optional + Spec ReplicationControllerSpec // 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"` + // +optional + Status ReplicationControllerStatus } // ReplicationControllerList is a collection of replication controllers. type ReplicationControllerList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []ReplicationController `json:"items"` + Items []ReplicationController } const ( @@ -1774,10 +2385,11 @@ const ( // ServiceList holds a list of services. type ServiceList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []Service `json:"items"` + Items []Service } // Session Affinity Type string @@ -1818,14 +2430,16 @@ const ( type ServiceStatus struct { // LoadBalancer contains the current status of the load-balancer, // if one is present. - LoadBalancer LoadBalancerStatus `json:"loadBalancer,omitempty"` + // +optional + LoadBalancer LoadBalancerStatus } // LoadBalancerStatus represents the status of a load-balancer type LoadBalancerStatus struct { // Ingress is a list containing ingress points for the load-balancer; // traffic intended for the service should be sent to these ingress points. - Ingress []LoadBalancerIngress `json:"ingress,omitempty"` + // +optional + Ingress []LoadBalancerIngress } // LoadBalancerIngress represents the status of a load-balancer ingress point: @@ -1833,11 +2447,13 @@ type LoadBalancerStatus struct { 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"` + // +optional + IP string // Hostname is set for load-balancer ingress points that are DNS based // (typically AWS load-balancers) - Hostname string `json:"hostname,omitempty"` + // +optional + Hostname string } // ServiceSpec describes the attributes that a user creates on a service @@ -1855,19 +2471,20 @@ type ServiceSpec struct { // "LoadBalancer" builds on NodePort and creates an // external load-balancer (if supported in the current cloud) which routes // to the clusterIP. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview - Type ServiceType `json:"type,omitempty"` + // More info: http://kubernetes.io/docs/user-guide/services#overview + // +optional + Type ServiceType // Required: The list of ports that are exposed by this service. - Ports []ServicePort `json:"ports"` + Ports []ServicePort // Route service traffic to pods with label keys and values matching this // selector. If empty or not present, the service is assumed to have an // external process managing its endpoints, which Kubernetes will not // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. // Ignored if type is ExternalName. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview - Selector map[string]string `json:"selector"` + // More info: http://kubernetes.io/docs/user-guide/services#overview + Selector map[string]string // ClusterIP is the IP address of the service and is usually assigned // randomly by the master. If an address is specified manually and is not in @@ -1877,8 +2494,9 @@ type ServiceSpec struct { // can be specified for headless services when proxying is not required. // Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if // type is ExternalName. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies - ClusterIP string `json:"clusterIP,omitempty"` + // More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies + // +optional + ClusterIP string // ExternalName is the external reference that kubedns or equivalent will // return as a CNAME record for this service. No proxying will be involved. @@ -1887,22 +2505,26 @@ type ServiceSpec struct { // 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"` + // +optional + ExternalIPs []string // Only applies to Service Type: LoadBalancer // LoadBalancer will get created with the IP specified in this field. // This feature depends on whether the underlying cloud-provider supports specifying // the loadBalancerIP when a load balancer is created. // This field will be ignored if the cloud-provider does not support the feature. - LoadBalancerIP string `json:"loadBalancerIP,omitempty"` + // +optional + LoadBalancerIP string // Optional: Supports "ClientIP" and "None". Used to maintain session affinity. - SessionAffinity ServiceAffinity `json:"sessionAffinity,omitempty"` + // +optional + SessionAffinity ServiceAffinity // Optional: If specified and supported by the platform, this will restrict traffic through the cloud-provider // load-balancer will be restricted to the specified client IPs. This field will be ignored if the // cloud-provider does not support the feature." - LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"` + // +optional + LoadBalancerSourceRanges []string } type ServicePort struct { @@ -1910,13 +2532,13 @@ type ServicePort struct { // 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"` + Name string // The IP protocol for this port. Supports "TCP" and "UDP". - Protocol Protocol `json:"protocol"` + Protocol Protocol // The port that will be exposed on the service. - Port int32 `json:"port"` + Port int32 // Optional: The target port on pods selected by this service. If this // is a string, it will be looked up as a named port in the target @@ -1924,11 +2546,11 @@ type ServicePort struct { // 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"` + TargetPort intstr.IntOrString // The port on each node on which this service is exposed. // Default is to auto-allocate a port if the ServiceType of this Service requires one. - NodePort int32 `json:"nodePort"` + NodePort int32 } // +genclient=true @@ -1937,14 +2559,17 @@ type ServicePort struct { // (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"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Spec defines the behavior of a service. - Spec ServiceSpec `json:"spec,omitempty"` + // +optional + Spec ServiceSpec // Status represents the current status of a service. - Status ServiceStatus `json:"status,omitempty"` + // +optional + Status ServiceStatus } // +genclient=true @@ -1954,24 +2579,32 @@ type Service struct { // * a principal that can be authenticated and authorized // * a set of secrets type ServiceAccount struct { - unversioned.TypeMeta `json:",inline"` - ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount - Secrets []ObjectReference `json:"secrets"` + Secrets []ObjectReference // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images // in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. - ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty"` + // +optional + ImagePullSecrets []LocalObjectReference + + // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. + // Can be overridden at the pod level. + // +optional + AutomountServiceAccountToken *bool } // ServiceAccountList is a list of ServiceAccount objects type ServiceAccountList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []ServiceAccount `json:"items"` + Items []ServiceAccount } // +genclient=true @@ -1989,8 +2622,9 @@ type ServiceAccountList struct { // }, // ] type Endpoints struct { - unversioned.TypeMeta `json:",inline"` - ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // The set of all endpoints is the union of all subsets. Subsets []EndpointSubset @@ -2021,9 +2655,11 @@ type EndpointAddress struct { IP string // Optional: Hostname of this endpoint // Meant to be used by DNS servers etc. - Hostname string `json:"hostname,omitempty"` + // +optional + Hostname string // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. - NodeName *string `json:"nodeName,omitempty"` + // +optional + NodeName *string // Optional: The kubernetes object related to the entry point. TargetRef *ObjectReference } @@ -2043,27 +2679,36 @@ type EndpointPort struct { // EndpointsList is a list of endpoints. type EndpointsList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []Endpoints `json:"items"` + Items []Endpoints } // NodeSpec describes the attributes that a node is created with. type NodeSpec struct { // PodCIDR represents the pod IP range assigned to the node // Note: assigning IP ranges to nodes might need to be revisited when we support migratable IPs. - PodCIDR string `json:"podCIDR,omitempty"` + // +optional + PodCIDR string // External ID of the node assigned by some machine database (e.g. a cloud provider) - ExternalID string `json:"externalID,omitempty"` + // +optional + ExternalID string // ID of the node assigned by the cloud provider // Note: format is "://" - ProviderID string `json:"providerID,omitempty"` + // +optional + ProviderID string // Unschedulable controls node schedulability of new pods. By default node is schedulable. - Unschedulable bool `json:"unschedulable,omitempty"` + // +optional + Unschedulable bool + + // If specified, the node's taints. + // +optional + Taints []Taint } // DaemonEndpoint contains information about a single Daemon endpoint. @@ -2075,13 +2720,14 @@ type DaemonEndpoint struct { */ // Port number of the given endpoint. - Port int32 `json:"Port"` + Port int32 } // NodeDaemonEndpoints lists ports opened by daemons running on the Node. type NodeDaemonEndpoints struct { // Endpoint on which Kubelet is listening. - KubeletEndpoint DaemonEndpoint `json:"kubeletEndpoint,omitempty"` + // +optional + KubeletEndpoint DaemonEndpoint } // NodeSystemInfo is a set of ids/uuids to uniquely identify the node. @@ -2089,51 +2735,61 @@ type NodeSystemInfo struct { // MachineID reported by the node. For unique machine identification // in the cluster this field is prefered. Learn more from man(5) // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html - MachineID string `json:"machineID"` + MachineID string // SystemUUID reported by the node. For unique machine identification // MachineID is prefered. This field is specific to Red Hat hosts // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html - SystemUUID string `json:"systemUUID"` + SystemUUID string // Boot ID reported by the node. - BootID string `json:"bootID"` + BootID string // Kernel Version reported by the node. - KernelVersion string `json:"kernelVersion"` + KernelVersion string // OS Image reported by the node. - OSImage string `json:"osImage"` + OSImage string // ContainerRuntime Version reported by the node. - ContainerRuntimeVersion string `json:"containerRuntimeVersion"` + ContainerRuntimeVersion string // Kubelet Version reported by the node. - KubeletVersion string `json:"kubeletVersion"` + KubeletVersion string // KubeProxy Version reported by the node. - KubeProxyVersion string `json:"kubeProxyVersion"` + KubeProxyVersion string // The Operating System reported by the node - OperatingSystem string `json:"operatingSystem"` + OperatingSystem string // The Architecture reported by the node - Architecture string `json:"architecture"` + Architecture string } // 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"` + // +optional + Capacity ResourceList // Allocatable represents the resources of a node that are available for scheduling. - Allocatable ResourceList `json:"allocatable,omitempty"` + // +optional + Allocatable ResourceList // NodePhase is the current lifecycle phase of the node. - Phase NodePhase `json:"phase,omitempty"` + // +optional + Phase NodePhase // Conditions is an array of current node conditions. - Conditions []NodeCondition `json:"conditions,omitempty"` + // +optional + Conditions []NodeCondition // Queried from cloud provider, if available. - Addresses []NodeAddress `json:"addresses,omitempty"` + // +optional + Addresses []NodeAddress // Endpoints of daemons running on the Node. - DaemonEndpoints NodeDaemonEndpoints `json:"daemonEndpoints,omitempty"` + // +optional + DaemonEndpoints NodeDaemonEndpoints // Set of ids/uuids to uniquely identify the node. - NodeInfo NodeSystemInfo `json:"nodeInfo,omitempty"` + // +optional + NodeInfo NodeSystemInfo // List of container images on this node - Images []ContainerImage `json:"images,omitempty"` + // +optional + Images []ContainerImage // List of attachable volumes in use (mounted) by the node. - VolumesInUse []UniqueVolumeName `json:"volumesInUse,omitempty"` + // +optional + VolumesInUse []UniqueVolumeName // List of volumes that are attached to the node. - VolumesAttached []AttachedVolume `json:"volumesAttached,omitempty"` + // +optional + VolumesAttached []AttachedVolume } type UniqueVolumeName string @@ -2141,10 +2797,10 @@ type UniqueVolumeName string // AttachedVolume describes a volume attached to a node type AttachedVolume struct { // Name of the attached volume - Name UniqueVolumeName `json:"name"` + Name UniqueVolumeName // DevicePath represents the device path where the volume should be available - DevicePath string `json:"devicePath"` + DevicePath string } // AvoidPods describes pods that should avoid this node. This is the value for a @@ -2153,34 +2809,40 @@ type AttachedVolume struct { type AvoidPods struct { // Bounded-sized list of signatures of pods that should avoid this node, sorted // in timestamp order from oldest to newest. Size of the slice is unspecified. - PreferAvoidPods []PreferAvoidPodsEntry `json:"preferAvoidPods,omitempty"` + // +optional + PreferAvoidPods []PreferAvoidPodsEntry } // Describes a class of pods that should avoid this node. type PreferAvoidPodsEntry struct { // The class of pods. - PodSignature PodSignature `json:"podSignature"` + PodSignature PodSignature // Time at which this entry was added to the list. - EvictionTime unversioned.Time `json:"evictionTime,omitempty"` + // +optional + EvictionTime metav1.Time // (brief) reason why this entry was added to the list. - Reason string `json:"reason,omitempty"` + // +optional + Reason string // Human readable message indicating why this entry was added to the list. - Message string `json:"message,omitempty"` + // +optional + Message string } // Describes the class of pods that should avoid this node. // Exactly one field should be set. type PodSignature struct { // Reference to controller whose pods should avoid this node. - PodController *OwnerReference `json:"podController,omitempty"` + // +optional + PodController *metav1.OwnerReference } // Describe a container image type ContainerImage struct { // Names by which this image is known. - Names []string `json:"names"` + Names []string // The size of the image in bytes. - SizeBytes int64 `json:"sizeBytes,omitempty"` + // +optional + SizeBytes int64 } type NodePhase string @@ -2215,12 +2877,16 @@ const ( ) 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 NodeConditionType + Status ConditionStatus + // +optional + LastHeartbeatTime metav1.Time + // +optional + LastTransitionTime metav1.Time + // +optional + Reason string + // +optional + Message string } type NodeAddressType string @@ -2228,22 +2894,26 @@ type NodeAddressType string // These are valid address types of node. NodeLegacyHostIP is used to transit // from out-dated HostIP field to NodeAddress. const ( + // Deprecated: NodeLegacyHostIP will be removed in 1.7. NodeLegacyHostIP NodeAddressType = "LegacyHostIP" NodeHostName NodeAddressType = "Hostname" NodeExternalIP NodeAddressType = "ExternalIP" NodeInternalIP NodeAddressType = "InternalIP" + NodeExternalDNS NodeAddressType = "ExternalDNS" + NodeInternalDNS NodeAddressType = "InternalDNS" ) type NodeAddress struct { - Type NodeAddressType `json:"type"` - Address string `json:"address"` + Type NodeAddressType + Address string } // NodeResources is an object for conveying resource information about a node. // see http://releases.k8s.io/HEAD/docs/design/resources.md for more details. type NodeResources struct { // Capacity represents the available resources of a node - Capacity ResourceList `json:"capacity,omitempty"` + // +optional + Capacity ResourceList } // ResourceName is the name identifying various resources in a ResourceList. @@ -2266,6 +2936,11 @@ const ( // Number of Pods that may be running on this Node: see ResourcePods ) +const ( + // Namespace prefix for opaque counted resources (alpha). + ResourceOpaqueIntPrefix = "pod.alpha.kubernetes.io/opaque-int-resource-" +) + // ResourceList is a set of (resource name, quantity) pairs. type ResourceList map[ResourceName]resource.Quantity @@ -2275,22 +2950,26 @@ type ResourceList map[ResourceName]resource.Quantity // 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"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Spec defines the behavior of a node. - Spec NodeSpec `json:"spec,omitempty"` + // +optional + Spec NodeSpec // Status describes the current status of a Node - Status NodeStatus `json:"status,omitempty"` + // +optional + Status NodeStatus } // NodeList is a list of nodes. type NodeList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []Node `json:"items"` + Items []Node } // NamespaceSpec describes the attributes on a Namespace @@ -2299,18 +2978,20 @@ type NamespaceSpec struct { Finalizers []FinalizerName } +// FinalizerName is the name identifying a finalizer during namespace lifecycle. type FinalizerName string -// These are internal finalizer values to Kubernetes, must be qualified name unless defined here +// These are internal finalizer values to Kubernetes, must be qualified name unless defined here or +// in metav1. 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"` + // +optional + Phase NamespacePhase } type NamespacePhase string @@ -2329,71 +3010,96 @@ const ( // A namespace provides a scope for Names. // Use of multiple namespaces is optional type Namespace struct { - unversioned.TypeMeta `json:",inline"` - ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Spec defines the behavior of the Namespace. - Spec NamespaceSpec `json:"spec,omitempty"` + // +optional + Spec NamespaceSpec // Status describes the current status of a Namespace - Status NamespaceStatus `json:"status,omitempty"` + // +optional + Status NamespaceStatus } // NamespaceList is a list of Namespaces. type NamespaceList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []Namespace `json:"items"` + Items []Namespace } // 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"` + metav1.TypeMeta // ObjectMeta describes the object that is being bound. - ObjectMeta `json:"metadata,omitempty"` + // +optional + metav1.ObjectMeta // Target is the object to bind to. - Target ObjectReference `json:"target"` + Target ObjectReference } // 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"` + // +optional + UID *types.UID } +// DeletionPropagation decides whether and how garbage collection will be performed. +type DeletionPropagation string + +const ( + // Orphans the dependents. + DeletePropagationOrphan DeletionPropagation = "Orphan" + // Deletes the object from the key-value store, the garbage collector will delete the dependents in the background. + DeletePropagationBackground DeletionPropagation = "Background" + // The object exists in the key-value store until the garbage collector deletes all the dependents whose ownerReference.blockOwnerDeletion=true from the key-value store. + // API sever will put the "DeletingDependents" finalizer on the object, and sets its deletionTimestamp. + // This policy is cascading, i.e., the dependents will be deleted with Foreground. + DeletePropagationForeground DeletionPropagation = "Foreground" +) + // DeleteOptions may be provided when deleting an API object +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. type DeleteOptions struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Optional duration in seconds before the object should be deleted. Value must be non-negative integer. // The value zero indicates delete immediately. If this value is nil, the default grace period for the // specified type will be used. - GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"` + // +optional + GracePeriodSeconds *int64 // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be // returned. - Preconditions *Preconditions `json:"preconditions,omitempty"` + // +optional + Preconditions *Preconditions + // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. // Should the dependent objects be orphaned. If true/false, the "orphan" // finalizer will be added to/removed from the object's finalizers list. - OrphanDependents *bool `json:"orphanDependents,omitempty"` -} + // Either this field or PropagationPolicy may be set, but not both. + // +optional + OrphanDependents *bool -// 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"` + // Whether and how garbage collection will be performed. + // Either this field or OrphanDependents may be set, but not both. + // The default policy is decided by the existing finalizer set in the + // metadata.finalizers and the resource-specific default policy. + // +optional + PropagationPolicy *DeletionPropagation } // ListOptions is the query options to a standard REST list call, and has future support for // watch calls. +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. type ListOptions struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // A selector based on labels LabelSelector labels.Selector @@ -2401,11 +3107,12 @@ type ListOptions struct { FieldSelector fields.Selector // If true, watch for changes to this list Watch bool - // For watch, it's the resource version to watch. - // For list, + // When specified with a watch call, shows changes that occur after that particular version of a resource. + // Defaults to changes from the beginning of history. + // When specified for list: // - if unset, then the result is returned from remote storage based on quorum-read flag; // - if it's 0, then we simply return what we currently have in cache, no guarantee; - // - if set to non zero, then the result is as fresh as given rv. + // - if set to non zero, then the result is at least as fresh as given rv. ResourceVersion string // Timeout for the list/watch call. TimeoutSeconds *int64 @@ -2413,7 +3120,7 @@ type ListOptions struct { // PodLogOptions is the query options for a Pod's logs REST call type PodLogOptions struct { - unversioned.TypeMeta + metav1.TypeMeta // Container for which to return logs Container string @@ -2430,7 +3137,7 @@ type PodLogOptions struct { // 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 + SinceTime *metav1.Time // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line // of log output. Timestamps bool @@ -2446,27 +3153,32 @@ type PodLogOptions struct { // 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"` + metav1.TypeMeta // Stdin if true indicates that stdin is to be redirected for the attach call - Stdin bool `json:"stdin,omitempty"` + // +optional + Stdin bool // Stdout if true indicates that stdout is to be redirected for the attach call - Stdout bool `json:"stdout,omitempty"` + // +optional + Stdout bool // Stderr if true indicates that stderr is to be redirected for the attach call - Stderr bool `json:"stderr,omitempty"` + // +optional + Stderr bool // TTY if true indicates that a tty will be allocated for the attach call - TTY bool `json:"tty,omitempty"` + // +optional + TTY bool // Container to attach to. - Container string `json:"container,omitempty"` + // +optional + Container string } // PodExecOptions is the query options to a Pod's remote exec call type PodExecOptions struct { - unversioned.TypeMeta + metav1.TypeMeta // Stdin if true indicates that stdin is to be redirected for the exec call Stdin bool @@ -2487,9 +3199,18 @@ type PodExecOptions struct { Command []string } +// PodPortForwardOptions is the query options to a Pod's port forward call +type PodPortForwardOptions struct { + metav1.TypeMeta + + // The list of ports to forward + // +optional + Ports []int32 +} + // PodProxyOptions is the query options to a Pod's proxy call type PodProxyOptions struct { - unversioned.TypeMeta + metav1.TypeMeta // Path is the URL path to use for the current proxy request Path string @@ -2497,7 +3218,7 @@ type PodProxyOptions struct { // NodeProxyOptions is the query options to a Node's proxy call type NodeProxyOptions struct { - unversioned.TypeMeta + metav1.TypeMeta // Path is the URL path to use for the current proxy request Path string @@ -2505,7 +3226,7 @@ type NodeProxyOptions struct { // ServiceProxyOptions is the query options to a Service's proxy call. type ServiceProxyOptions struct { - unversioned.TypeMeta + metav1.TypeMeta // Path is the part of URLs that include service endpoints, suffixes, // and parameters to use for the current proxy request to service. @@ -2515,33 +3236,20 @@ type ServiceProxyOptions struct { 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 + Kind string + // +optional + Namespace string + // +optional + Name string + // +optional + UID types.UID + // +optional + APIVersion string + // +optional + ResourceVersion string // Optional. If referring to a piece of an object instead of an entire object, this string // should contain information to identify the sub-object. For example, if the object @@ -2551,7 +3259,8 @@ type ObjectReference struct { // 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"` + // +optional + FieldPath string } // LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. @@ -2561,15 +3270,18 @@ type LocalObjectReference struct { } type SerializedReference struct { - unversioned.TypeMeta `json:",inline"` - Reference ObjectReference `json:"reference,omitempty"` + metav1.TypeMeta + // +optional + Reference ObjectReference } type EventSource struct { // Component from which the event is generated. - Component string `json:"component,omitempty"` + // +optional + Component string // Node name on which the event is generated. - Host string `json:"host,omitempty"` + // +optional + Host string } // Valid values for event types (new types could be added in future) @@ -2585,52 +3297,63 @@ const ( // 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"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Required. The object that this event is about. - InvolvedObject ObjectReference `json:"involvedObject,omitempty"` + // +optional + InvolvedObject ObjectReference // Optional; this should be a short, machine understandable string that gives the reason // for this event being generated. For example, if the event is reporting that a container // can't start, the Reason might be "ImageNotFound". // TODO: provide exact specification for format. - Reason string `json:"reason,omitempty"` + // +optional + Reason string // Optional. A human-readable description of the status of this operation. // TODO: decide on maximum length. - Message string `json:"message,omitempty"` + // +optional + Message string // Optional. The component reporting this event. Should be a short machine understandable string. - Source EventSource `json:"source,omitempty"` + // +optional + Source EventSource // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) - FirstTimestamp unversioned.Time `json:"firstTimestamp,omitempty"` + // +optional + FirstTimestamp metav1.Time // The time at which the most recent occurrence of this event was recorded. - LastTimestamp unversioned.Time `json:"lastTimestamp,omitempty"` + // +optional + LastTimestamp metav1.Time // The number of times this event has occurred. - Count int32 `json:"count,omitempty"` + // +optional + Count int32 // Type of this event (Normal, Warning), new types could be added in the future. - Type string `json:"type,omitempty"` + // +optional + Type string } // EventList is a list of events. type EventList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []Event `json:"items"` + Items []Event } // 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"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []runtime.Object `json:"items"` + Items []runtime.Object } // A type of object that is limited @@ -2641,48 +3364,59 @@ const ( LimitTypePod LimitType = "Pod" // Limit that applies to all containers in a namespace LimitTypeContainer LimitType = "Container" + // Limit that applies to all persistent volume claims in a namespace + LimitTypePersistentVolumeClaim LimitType = "PersistentVolumeClaim" ) // LimitRangeItem defines a min/max usage limit for any resource that matches on kind type LimitRangeItem struct { // Type of resource that this limit applies to - Type LimitType `json:"type,omitempty"` + // +optional + Type LimitType // Max usage constraints on this kind by resource name - Max ResourceList `json:"max,omitempty"` + // +optional + Max ResourceList // Min usage constraints on this kind by resource name - Min ResourceList `json:"min,omitempty"` + // +optional + Min ResourceList // Default resource requirement limit value by resource name. - Default ResourceList `json:"default,omitempty"` + // +optional + Default ResourceList // DefaultRequest resource requirement request value by resource name. - DefaultRequest ResourceList `json:"defaultRequest,omitempty"` + // +optional + DefaultRequest ResourceList // MaxLimitRequestRatio represents the max burst value for the named resource - MaxLimitRequestRatio ResourceList `json:"maxLimitRequestRatio,omitempty"` + // +optional + MaxLimitRequestRatio ResourceList } // LimitRangeSpec defines a min/max usage limit for resources that match on kind type LimitRangeSpec struct { // Limits is the list of LimitRangeItem objects that are enforced - Limits []LimitRangeItem `json:"limits"` + Limits []LimitRangeItem } // +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"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Spec defines the limits enforced - Spec LimitRangeSpec `json:"spec,omitempty"` + // +optional + Spec LimitRangeSpec } // LimitRangeList is a list of LimitRange items. type LimitRangeList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta // Items is a list of LimitRange objects - Items []LimitRange `json:"items"` + Items []LimitRange } // The following identify resource constants for Kubernetes object types @@ -2734,41 +3468,49 @@ const ( // 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"` + // +optional + Hard ResourceList // 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"` + // +optional + Scopes []ResourceQuotaScope } // ResourceQuotaStatus defines the enforced hard limits and observed use type ResourceQuotaStatus struct { // Hard is the set of enforced hard limits for each named resource - Hard ResourceList `json:"hard,omitempty"` + // +optional + Hard ResourceList // Used is the current observed total usage of the resource in the namespace - Used ResourceList `json:"used,omitempty"` + // +optional + Used ResourceList } // +genclient=true // ResourceQuota sets aggregate quota restrictions enforced per namespace type ResourceQuota struct { - unversioned.TypeMeta `json:",inline"` - ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Spec defines the desired quota - Spec ResourceQuotaSpec `json:"spec,omitempty"` + // +optional + Spec ResourceQuotaSpec // Status defines the actual enforced quota and its current usage - Status ResourceQuotaStatus `json:"status,omitempty"` + // +optional + Status ResourceQuotaStatus } // ResourceQuotaList is a list of ResourceQuota items type ResourceQuotaList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta // Items is a list of ResourceQuota objects - Items []ResourceQuota `json:"items"` + Items []ResourceQuota } // +genclient=true @@ -2776,17 +3518,20 @@ type ResourceQuotaList struct { // 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"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // 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"` + // +optional + Data map[string][]byte // Used to facilitate programmatic handling of secret data. - Type SecretType `json:"type,omitempty"` + // +optional + Type SecretType } const MaxSecretSize = 1 * 1024 * 1024 @@ -2874,31 +3619,35 @@ const ( ) type SecretList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []Secret `json:"items"` + Items []Secret } // +genclient=true // ConfigMap holds configuration data for components or applications to consume. type ConfigMap struct { - unversioned.TypeMeta `json:",inline"` - ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // 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"` + // +optional + Data map[string]string } // ConfigMapList is a resource containing a list of ConfigMap objects. type ConfigMapList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta // Items is the list of ConfigMaps. - Items []ConfigMap `json:"items"` + Items []ConfigMap } // These constants are for remote command execution and port forwarding and are @@ -2942,17 +3691,6 @@ const ( 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 @@ -2962,10 +3700,12 @@ const ( ) type ComponentCondition struct { - Type ComponentConditionType `json:"type"` - Status ConditionStatus `json:"status"` - Message string `json:"message,omitempty"` - Error string `json:"error,omitempty"` + Type ComponentConditionType + Status ConditionStatus + // +optional + Message string + // +optional + Error string } // +genclient=true @@ -2973,17 +3713,20 @@ type ComponentCondition struct { // ComponentStatus (and ComponentStatusList) holds the cluster validation info. type ComponentStatus struct { - unversioned.TypeMeta `json:",inline"` - ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta - Conditions []ComponentCondition `json:"conditions,omitempty"` + // +optional + Conditions []ComponentCondition } type ComponentStatusList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []ComponentStatus `json:"items"` + Items []ComponentStatus } // SecurityContext holds security configuration that will be applied to a container. @@ -2992,43 +3735,53 @@ type ComponentStatusList struct { 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"` + // +optional + Capabilities *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"` + // +optional + Privileged *bool // The SELinux context to be applied to the container. // If unspecified, the container runtime will allocate a random SELinux context for each // container. May also be set in PodSecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence. - SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty"` + // +optional + SELinuxOptions *SELinuxOptions // The UID to run the entrypoint of the container process. // Defaults to user specified in image metadata if unspecified. // May also be set in PodSecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence. - RunAsUser *int64 `json:"runAsUser,omitempty"` + // +optional + RunAsUser *int64 // Indicates that the container must run as a non-root user. // If true, the Kubelet will validate the image at runtime to ensure that it // does not run as UID 0 (root) and fail to start the container if it does. // If unset or false, no such validation will be performed. // May also be set in PodSecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence. - RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"` + // +optional + RunAsNonRoot *bool // The read-only root filesystem allows you to restrict the locations that an application can write // files to, ensuring the persistent data can only be written to mounts. - ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty"` + // +optional + ReadOnlyRootFilesystem *bool } // SELinuxOptions are the labels to be applied to the container. type SELinuxOptions struct { // SELinux user label - User string `json:"user,omitempty"` + // +optional + User string // SELinux role label - Role string `json:"role,omitempty"` + // +optional + Role string // SELinux type label - Type string `json:"type,omitempty"` + // +optional + Type string // SELinux level label. - Level string `json:"level,omitempty"` + // +optional + Level string } // RangeAllocation is an opaque API object (not exposed to end users) that can be persisted to record @@ -3039,17 +3792,18 @@ type SELinuxOptions struct { // 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"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // A string representing a unique label for a range of resources, such as a CIDR "10.0.0.0/8" or // port range "10000-30000". Range is not strongly schema'd here. The Range is expected to define // a start and end unless there is an implicit end. - Range string `json:"range"` + Range string // A byte array representing the serialized state of a range allocation. Additional clarifiers on // the type or format of data should be represented with annotations. For IP allocations, this is // represented as a bit array starting at the base IP of the CIDR in Range, with each bit representing // a single allocated address (the fifth bit on CIDR 10.0.0.0/8 is 10.0.0.4). - Data []byte `json:"data"` + Data []byte } const ( @@ -3064,5 +3818,5 @@ const ( // 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 + DefaultFailureDomains string = metav1.LabelHostname + "," + metav1.LabelZoneFailureDomain + "," + metav1.LabelZoneRegion ) diff --git a/vendor/k8s.io/client-go/pkg/api/v1/OWNERS b/vendor/k8s.io/client-go/pkg/api/v1/OWNERS new file mode 100755 index 000000000..fdb84b24a --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/api/v1/OWNERS @@ -0,0 +1,41 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- yujuhong +- brendandburns +- derekwaynecarr +- caesarxuchao +- vishh +- mikedanese +- liggitt +- nikhiljindal +- bprashanth +- gmarek +- erictune +- davidopp +- pmorie +- sttts +- kargakis +- dchen1107 +- saad-ali +- zmerlynn +- luxas +- janetkuo +- justinsb +- roberthbailey +- ncdc +- timstclair +- eparis +- timothysc +- piosz +- jsafrane +- dims +- errordeveloper +- madhusudancs +- krousey +- jayunit100 +- rootfs +- markturansky diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/v1/conversion.go b/vendor/k8s.io/client-go/pkg/api/v1/conversion.go similarity index 89% rename from vendor/k8s.io/client-go/1.5/pkg/api/v1/conversion.go rename to vendor/k8s.io/client-go/pkg/api/v1/conversion.go index 2ba5c32b2..041517819 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/v1/conversion.go +++ b/vendor/k8s.io/client-go/pkg/api/v1/conversion.go @@ -21,23 +21,12 @@ import ( "fmt" "reflect" - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/apis/extensions" - "k8s.io/client-go/1.5/pkg/conversion" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/util/validation/field" - "k8s.io/client-go/1.5/pkg/watch/versioned" -) - -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" - - // annotation key prefix used to identify non-convertible json paths. - NonConvertibleAnnotationPrefix = "kubernetes.io/non-convertible" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/apis/extensions" ) // This is a "fast-path" that avoids reflection for common types. It focuses on the objects that are @@ -123,15 +112,15 @@ func addFastPathConversionFuncs(scheme *runtime.Scheme) error { return true, Convert_api_Endpoints_To_v1_Endpoints(a, b, s) } - case *versioned.Event: + case *metav1.WatchEvent: switch b := objB.(type) { - case *versioned.InternalEvent: - return true, versioned.Convert_versioned_Event_to_versioned_InternalEvent(a, b, s) + case *metav1.InternalEvent: + return true, metav1.Convert_versioned_Event_to_versioned_InternalEvent(a, b, s) } - case *versioned.InternalEvent: + case *metav1.InternalEvent: switch b := objB.(type) { - case *versioned.Event: - return true, versioned.Convert_versioned_InternalEvent_to_versioned_Event(a, b, s) + case *metav1.WatchEvent: + return true, metav1.Convert_versioned_InternalEvent_to_versioned_Event(a, b, s) } } return false, nil @@ -269,15 +258,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error { } func Convert_v1_ReplicationController_to_extensions_ReplicaSet(in *ReplicationController, out *extensions.ReplicaSet, s conversion.Scope) error { - if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { - defaulting.(func(*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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -288,12 +269,9 @@ func Convert_v1_ReplicationController_to_extensions_ReplicaSet(in *ReplicationCo } func Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec(in *ReplicationControllerSpec, out *extensions.ReplicaSetSpec, s conversion.Scope) error { - if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { - defaulting.(func(*ReplicationControllerSpec))(in) - } out.Replicas = *in.Replicas if in.Selector != nil { - api.Convert_map_to_unversioned_LabelSelector(&in.Selector, out.Selector, s) + metav1.Convert_map_to_unversioned_LabelSelector(&in.Selector, out.Selector, s) } if in.Template != nil { if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, &out.Template, s); err != nil { @@ -304,25 +282,16 @@ func Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec(in *Repli } func Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus(in *ReplicationControllerStatus, out *extensions.ReplicaSetStatus, s conversion.Scope) error { - if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { - defaulting.(func(*ReplicationControllerStatus))(in) - } out.Replicas = in.Replicas out.FullyLabeledReplicas = in.FullyLabeledReplicas + out.ReadyReplicas = in.ReadyReplicas + out.AvailableReplicas = in.AvailableReplicas out.ObservedGeneration = in.ObservedGeneration return nil } func Convert_extensions_ReplicaSet_to_v1_ReplicationController(in *extensions.ReplicaSet, out *ReplicationController, s conversion.Scope) error { - if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { - defaulting.(func(*extensions.ReplicaSet))(in) - } - 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.ObjectMeta = in.ObjectMeta if err := Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil { fieldErr, ok := err.(*field.Error) if !ok { @@ -331,7 +300,7 @@ func Convert_extensions_ReplicaSet_to_v1_ReplicationController(in *extensions.Re if out.Annotations == nil { out.Annotations = make(map[string]string) } - out.Annotations[NonConvertibleAnnotationPrefix+"/"+fieldErr.Field] = reflect.ValueOf(fieldErr.BadValue).String() + out.Annotations[api.NonConvertibleAnnotationPrefix+"/"+fieldErr.Field] = reflect.ValueOf(fieldErr.BadValue).String() } if err := Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus(&in.Status, &out.Status, s); err != nil { return err @@ -340,14 +309,12 @@ func Convert_extensions_ReplicaSet_to_v1_ReplicationController(in *extensions.Re } func Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec(in *extensions.ReplicaSetSpec, out *ReplicationControllerSpec, s conversion.Scope) error { - if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { - defaulting.(func(*extensions.ReplicaSetSpec))(in) - } out.Replicas = new(int32) *out.Replicas = in.Replicas + out.MinReadySeconds = in.MinReadySeconds var invalidErr error if in.Selector != nil { - invalidErr = api.Convert_unversioned_LabelSelector_to_map(in.Selector, &out.Selector, s) + invalidErr = metav1.Convert_unversioned_LabelSelector_to_map(in.Selector, &out.Selector, s) } out.Template = new(PodTemplateSpec) if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, out.Template, s); err != nil { @@ -357,17 +324,17 @@ func Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec(in *exten } func Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus(in *extensions.ReplicaSetStatus, out *ReplicationControllerStatus, s conversion.Scope) error { - if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { - defaulting.(func(*extensions.ReplicaSetStatus))(in) - } out.Replicas = in.Replicas out.FullyLabeledReplicas = in.FullyLabeledReplicas + out.ReadyReplicas = in.ReadyReplicas + out.AvailableReplicas = in.AvailableReplicas out.ObservedGeneration = in.ObservedGeneration return nil } func Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(in *api.ReplicationControllerSpec, out *ReplicationControllerSpec, s conversion.Scope) error { out.Replicas = &in.Replicas + out.MinReadySeconds = in.MinReadySeconds out.Selector = in.Selector if in.Template != nil { out.Template = new(PodTemplateSpec) @@ -381,7 +348,10 @@ func Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(in *a } func Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(in *ReplicationControllerSpec, out *api.ReplicationControllerSpec, s conversion.Scope) error { - out.Replicas = *in.Replicas + if in.Replicas != nil { + out.Replicas = *in.Replicas + } + out.MinReadySeconds = in.MinReadySeconds out.Selector = in.Selector if in.Template != nil { out.Template = new(api.PodTemplateSpec) @@ -508,6 +478,12 @@ func Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, out // taking responsibility to ensure mutation of in is not exposed // back to the caller. in.Spec.InitContainers = values + + // Call defaulters explicitly until annotations are removed + for i := range in.Spec.InitContainers { + c := &in.Spec.InitContainers[i] + SetDefaults_Container(c) + } } if err := autoConvert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in, out, s); err != nil { @@ -603,17 +579,6 @@ func Convert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error out.Annotations[PodInitContainerStatusesBetaAnnotationKey] = 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 } @@ -637,6 +602,11 @@ func Convert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error // taking responsibility to ensure mutation of in is not exposed // back to the caller. in.Spec.InitContainers = values + // Call defaulters explicitly until annotations are removed + for i := range in.Spec.InitContainers { + c := &in.Spec.InitContainers[i] + SetDefaults_Container(c) + } } // If there is a beta annotation, copy to alpha key. // See commit log for PR #31026 for why we do this. @@ -744,19 +714,20 @@ func Convert_v1_PodSecurityContext_To_api_PodSecurityContext(in *PodSecurityCont return nil } +// +k8s:conversion-fn=copy-only func Convert_v1_ResourceList_To_api_ResourceList(in *ResourceList, out *api.ResourceList, s conversion.Scope) error { if *in == nil { return nil } - if *out == nil { *out = make(api.ResourceList, len(*in)) } for key, val := range *in { + // Moved to defaults // TODO(#18538): We round up resource values to milli scale to maintain API compatibility. // In the future, we should instead reject values that need rounding. - const milliScale = -3 - val.RoundUp(milliScale) + // const milliScale = -3 + // val.RoundUp(milliScale) (*out)[api.ResourceName(key)] = val } diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/v1/defaults.go b/vendor/k8s.io/client-go/pkg/api/v1/defaults.go similarity index 83% rename from vendor/k8s.io/client-go/1.5/pkg/api/v1/defaults.go rename to vendor/k8s.io/client-go/pkg/api/v1/defaults.go index 3864516ff..17b0deb01 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/v1/defaults.go +++ b/vendor/k8s.io/client-go/pkg/api/v1/defaults.go @@ -17,13 +17,14 @@ limitations under the License. package v1 import ( - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/util" - "k8s.io/client-go/1.5/pkg/util/intstr" - "k8s.io/client-go/1.5/pkg/util/parsers" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/client-go/pkg/util" + "k8s.io/client-go/pkg/util/parsers" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { + RegisterDefaults(scheme) return scheme.AddDefaultingFuncs( SetDefaults_PodExecOptions, SetDefaults_PodAttachOptions, @@ -38,6 +39,7 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error { SetDefaults_SecretVolumeSource, SetDefaults_ConfigMapVolumeSource, SetDefaults_DownwardAPIVolumeSource, + SetDefaults_ProjectedVolumeSource, SetDefaults_Secret, SetDefaults_PersistentVolume, SetDefaults_PersistentVolumeClaim, @@ -51,9 +53,21 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error { SetDefaults_LimitRangeItem, SetDefaults_ConfigMap, SetDefaults_RBDVolumeSource, + SetDefaults_ResourceList, ) } +func SetDefaults_ResourceList(obj *ResourceList) { + for key, val := range *obj { + // TODO(#18538): We round up resource values to milli scale to maintain API compatibility. + // In the future, we should instead reject values that need rounding. + const milliScale = -3 + val.RoundUp(milliScale) + + (*obj)[ResourceName(key)] = val + } +} + func SetDefaults_PodExecOptions(obj *PodExecOptions) { obj.Stdout = true obj.Stderr = true @@ -99,7 +113,6 @@ func SetDefaults_Container(obj *Container) { _, tag, _, _ := parsers.ParseImageName(obj.Image) // Check image tag - if tag == "latest" { obj.ImagePullPolicy = PullAlways } else { @@ -109,6 +122,9 @@ func SetDefaults_Container(obj *Container) { if obj.TerminationMessagePath == "" { obj.TerminationMessagePath = TerminationMessagePathDefault } + if obj.TerminationMessagePolicy == "" { + obj.TerminationMessagePolicy = TerminationMessageReadFile + } } func SetDefaults_ServiceSpec(obj *ServiceSpec) { if obj.SessionAffinity == "" { @@ -144,6 +160,18 @@ func SetDefaults_Pod(obj *Pod) { } } } + for i := range obj.Spec.InitContainers { + if obj.Spec.InitContainers[i].Resources.Limits != nil { + if obj.Spec.InitContainers[i].Resources.Requests == nil { + obj.Spec.InitContainers[i].Resources.Requests = make(ResourceList) + } + for key, value := range obj.Spec.InitContainers[i].Resources.Limits { + if _, exists := obj.Spec.InitContainers[i].Resources.Requests[key]; !exists { + obj.Spec.InitContainers[i].Resources.Requests[key] = *(value.Copy()) + } + } + } + } } func SetDefaults_PodSpec(obj *PodSpec) { if obj.DNSPolicy == "" { @@ -154,6 +182,7 @@ func SetDefaults_PodSpec(obj *PodSpec) { } if obj.HostNetwork { defaultHostNetworkPorts(&obj.Containers) + defaultHostNetworkPorts(&obj.InitContainers) } if obj.SecurityContext == nil { obj.SecurityContext = &PodSecurityContext{} @@ -162,6 +191,9 @@ func SetDefaults_PodSpec(obj *PodSpec) { period := int64(DefaultTerminationGracePeriodSeconds) obj.TerminationGracePeriodSeconds = &period } + if obj.SchedulerName == "" { + obj.SchedulerName = DefaultSchedulerName + } } func SetDefaults_Probe(obj *Probe) { if obj.TimeoutSeconds == 0 { @@ -200,6 +232,12 @@ func SetDefaults_Secret(obj *Secret) { obj.Type = SecretTypeOpaque } } +func SetDefaults_ProjectedVolumeSource(obj *ProjectedVolumeSource) { + if obj.DefaultMode == nil { + perm := int32(ProjectedVolumeSourceDefaultMode) + obj.DefaultMode = &perm + } +} func SetDefaults_PersistentVolume(obj *PersistentVolume) { if obj.Status.Phase == "" { obj.Status.Phase = VolumePending @@ -334,3 +372,18 @@ func SetDefaults_RBDVolumeSource(obj *RBDVolumeSource) { obj.Keyring = "/etc/ceph/keyring" } } + +func SetDefaults_ScaleIOVolumeSource(obj *ScaleIOVolumeSource) { + if obj.ProtectionDomain == "" { + obj.ProtectionDomain = "default" + } + if obj.StoragePool == "" { + obj.StoragePool = "default" + } + if obj.StorageMode == "" { + obj.StorageMode = "ThinProvisioned" + } + if obj.FSType == "" { + obj.FSType = "xfs" + } +} diff --git a/vendor/k8s.io/client-go/pkg/api/v1/doc.go b/vendor/k8s.io/client-go/pkg/api/v1/doc.go new file mode 100644 index 000000000..0fdd87f75 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/api/v1/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1 is the v1 version of the API. +package v1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/generate.go b/vendor/k8s.io/client-go/pkg/api/v1/generate.go similarity index 97% rename from vendor/k8s.io/client-go/1.5/pkg/api/generate.go rename to vendor/k8s.io/client-go/pkg/api/v1/generate.go index 59be6f54c..b8c44e4c7 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/generate.go +++ b/vendor/k8s.io/client-go/pkg/api/v1/generate.go @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package v1 import ( "fmt" - utilrand "k8s.io/client-go/1.5/pkg/util/rand" + utilrand "k8s.io/apimachinery/pkg/util/rand" ) // NameGenerator generates names for objects. Some backends may have more information diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/v1/generated.pb.go b/vendor/k8s.io/client-go/pkg/api/v1/generated.pb.go similarity index 81% rename from vendor/k8s.io/client-go/1.5/pkg/api/v1/generated.pb.go rename to vendor/k8s.io/client-go/pkg/api/v1/generated.pb.go index 44c55edd4..20f632dc9 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/v1/generated.pb.go +++ b/vendor/k8s.io/client-go/pkg/api/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -39,8 +39,10 @@ limitations under the License. ComponentStatus ComponentStatusList ConfigMap + ConfigMapEnvSource ConfigMapKeySelector ConfigMapList + ConfigMapProjection ConfigMapVolumeSource Container ContainerImage @@ -52,6 +54,7 @@ limitations under the License. ContainerStatus DaemonEndpoint DeleteOptions + DownwardAPIProjection DownwardAPIVolumeFile DownwardAPIVolumeSource EmptyDirVolumeSource @@ -60,13 +63,13 @@ limitations under the License. EndpointSubset Endpoints EndpointsList + EnvFromSource EnvVar EnvVarSource Event EventList EventSource ExecAction - ExportOptions FCVolumeSource FlexVolumeSource FlockerVolumeSource @@ -101,6 +104,7 @@ limitations under the License. NodeDaemonEndpoints NodeList NodeProxyOptions + NodeResources NodeSelector NodeSelectorRequirement NodeSelectorTerm @@ -110,7 +114,6 @@ limitations under the License. ObjectFieldSelector ObjectMeta ObjectReference - OwnerReference PersistentVolume PersistentVolumeClaim PersistentVolumeClaimList @@ -121,6 +124,7 @@ limitations under the License. PersistentVolumeSource PersistentVolumeSpec PersistentVolumeStatus + PhotonPersistentDiskVolumeSource Pod PodAffinity PodAffinityTerm @@ -130,6 +134,7 @@ limitations under the License. PodExecOptions PodList PodLogOptions + PodPortForwardOptions PodProxyOptions PodSecurityContext PodSignature @@ -139,14 +144,17 @@ limitations under the License. PodTemplate PodTemplateList PodTemplateSpec + PortworxVolumeSource Preconditions PreferAvoidPodsEntry PreferredSchedulingTerm Probe + ProjectedVolumeSource QuobyteVolumeSource RBDVolumeSource RangeAllocation ReplicationController + ReplicationControllerCondition ReplicationControllerList ReplicationControllerSpec ReplicationControllerStatus @@ -157,9 +165,12 @@ limitations under the License. ResourceQuotaStatus ResourceRequirements SELinuxOptions + ScaleIOVolumeSource Secret + SecretEnvSource SecretKeySelector SecretList + SecretProjection SecretVolumeSource SecurityContext SerializedReference @@ -171,11 +182,13 @@ limitations under the License. ServiceProxyOptions ServiceSpec ServiceStatus + Sysctl TCPSocketAction Taint Toleration Volume VolumeMount + VolumeProjection VolumeSource VsphereVirtualDiskVolumeSource WeightedPodAffinityTerm @@ -186,11 +199,11 @@ import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import k8s_io_kubernetes_pkg_api_resource "k8s.io/client-go/1.5/pkg/api/resource" -import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" -import k8s_io_kubernetes_pkg_runtime "k8s.io/client-go/1.5/pkg/runtime" +import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource" +import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import k8s_io_apimachinery_pkg_runtime "k8s.io/apimachinery/pkg/runtime" -import k8s_io_kubernetes_pkg_types "k8s.io/client-go/1.5/pkg/types" +import k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" import strings "strings" import reflect "reflect" @@ -265,749 +278,818 @@ func (m *ConfigMap) Reset() { *m = ConfigMap{} } func (*ConfigMap) ProtoMessage() {} func (*ConfigMap) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } +func (m *ConfigMapEnvSource) Reset() { *m = ConfigMapEnvSource{} } +func (*ConfigMapEnvSource) ProtoMessage() {} +func (*ConfigMapEnvSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } + func (m *ConfigMapKeySelector) Reset() { *m = ConfigMapKeySelector{} } func (*ConfigMapKeySelector) ProtoMessage() {} -func (*ConfigMapKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } +func (*ConfigMapKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } func (m *ConfigMapList) Reset() { *m = ConfigMapList{} } func (*ConfigMapList) ProtoMessage() {} -func (*ConfigMapList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } +func (*ConfigMapList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } + +func (m *ConfigMapProjection) Reset() { *m = ConfigMapProjection{} } +func (*ConfigMapProjection) ProtoMessage() {} +func (*ConfigMapProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } func (m *ConfigMapVolumeSource) Reset() { *m = ConfigMapVolumeSource{} } func (*ConfigMapVolumeSource) ProtoMessage() {} -func (*ConfigMapVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } +func (*ConfigMapVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } func (m *Container) Reset() { *m = Container{} } func (*Container) ProtoMessage() {} -func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } +func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } func (m *ContainerImage) Reset() { *m = ContainerImage{} } func (*ContainerImage) ProtoMessage() {} -func (*ContainerImage) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } +func (*ContainerImage) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } func (m *ContainerPort) Reset() { *m = ContainerPort{} } func (*ContainerPort) ProtoMessage() {} -func (*ContainerPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } +func (*ContainerPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } func (m *ContainerState) Reset() { *m = ContainerState{} } func (*ContainerState) ProtoMessage() {} -func (*ContainerState) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } +func (*ContainerState) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } func (m *ContainerStateRunning) Reset() { *m = ContainerStateRunning{} } func (*ContainerStateRunning) ProtoMessage() {} -func (*ContainerStateRunning) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } +func (*ContainerStateRunning) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } func (m *ContainerStateTerminated) Reset() { *m = ContainerStateTerminated{} } func (*ContainerStateTerminated) ProtoMessage() {} func (*ContainerStateTerminated) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{22} + return fileDescriptorGenerated, []int{24} } func (m *ContainerStateWaiting) Reset() { *m = ContainerStateWaiting{} } func (*ContainerStateWaiting) ProtoMessage() {} -func (*ContainerStateWaiting) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } +func (*ContainerStateWaiting) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } func (m *ContainerStatus) Reset() { *m = ContainerStatus{} } func (*ContainerStatus) ProtoMessage() {} -func (*ContainerStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } +func (*ContainerStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } func (m *DaemonEndpoint) Reset() { *m = DaemonEndpoint{} } func (*DaemonEndpoint) ProtoMessage() {} -func (*DaemonEndpoint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } +func (*DaemonEndpoint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } func (m *DeleteOptions) Reset() { *m = DeleteOptions{} } func (*DeleteOptions) ProtoMessage() {} -func (*DeleteOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } +func (*DeleteOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} } + +func (m *DownwardAPIProjection) Reset() { *m = DownwardAPIProjection{} } +func (*DownwardAPIProjection) ProtoMessage() {} +func (*DownwardAPIProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} } func (m *DownwardAPIVolumeFile) Reset() { *m = DownwardAPIVolumeFile{} } func (*DownwardAPIVolumeFile) ProtoMessage() {} -func (*DownwardAPIVolumeFile) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } +func (*DownwardAPIVolumeFile) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} } func (m *DownwardAPIVolumeSource) Reset() { *m = DownwardAPIVolumeSource{} } func (*DownwardAPIVolumeSource) ProtoMessage() {} func (*DownwardAPIVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{28} + return fileDescriptorGenerated, []int{31} } func (m *EmptyDirVolumeSource) Reset() { *m = EmptyDirVolumeSource{} } func (*EmptyDirVolumeSource) ProtoMessage() {} -func (*EmptyDirVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} } +func (*EmptyDirVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} } func (m *EndpointAddress) Reset() { *m = EndpointAddress{} } func (*EndpointAddress) ProtoMessage() {} -func (*EndpointAddress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} } +func (*EndpointAddress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} } func (m *EndpointPort) Reset() { *m = EndpointPort{} } func (*EndpointPort) ProtoMessage() {} -func (*EndpointPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{31} } +func (*EndpointPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} } func (m *EndpointSubset) Reset() { *m = EndpointSubset{} } func (*EndpointSubset) ProtoMessage() {} -func (*EndpointSubset) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} } +func (*EndpointSubset) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} } func (m *Endpoints) Reset() { *m = Endpoints{} } func (*Endpoints) ProtoMessage() {} -func (*Endpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} } +func (*Endpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} } func (m *EndpointsList) Reset() { *m = EndpointsList{} } func (*EndpointsList) ProtoMessage() {} -func (*EndpointsList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} } +func (*EndpointsList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} } + +func (m *EnvFromSource) Reset() { *m = EnvFromSource{} } +func (*EnvFromSource) ProtoMessage() {} +func (*EnvFromSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} } func (m *EnvVar) Reset() { *m = EnvVar{} } func (*EnvVar) ProtoMessage() {} -func (*EnvVar) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} } +func (*EnvVar) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{39} } func (m *EnvVarSource) Reset() { *m = EnvVarSource{} } func (*EnvVarSource) ProtoMessage() {} -func (*EnvVarSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} } +func (*EnvVarSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{40} } func (m *Event) Reset() { *m = Event{} } func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} } +func (*Event) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{41} } func (m *EventList) Reset() { *m = EventList{} } func (*EventList) ProtoMessage() {} -func (*EventList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} } +func (*EventList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{42} } func (m *EventSource) Reset() { *m = EventSource{} } func (*EventSource) ProtoMessage() {} -func (*EventSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{39} } +func (*EventSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{43} } func (m *ExecAction) Reset() { *m = ExecAction{} } func (*ExecAction) ProtoMessage() {} -func (*ExecAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{40} } - -func (m *ExportOptions) Reset() { *m = ExportOptions{} } -func (*ExportOptions) ProtoMessage() {} -func (*ExportOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{41} } +func (*ExecAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{44} } func (m *FCVolumeSource) Reset() { *m = FCVolumeSource{} } func (*FCVolumeSource) ProtoMessage() {} -func (*FCVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{42} } +func (*FCVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{45} } func (m *FlexVolumeSource) Reset() { *m = FlexVolumeSource{} } func (*FlexVolumeSource) ProtoMessage() {} -func (*FlexVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{43} } +func (*FlexVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{46} } func (m *FlockerVolumeSource) Reset() { *m = FlockerVolumeSource{} } func (*FlockerVolumeSource) ProtoMessage() {} -func (*FlockerVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{44} } +func (*FlockerVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{47} } func (m *GCEPersistentDiskVolumeSource) Reset() { *m = GCEPersistentDiskVolumeSource{} } func (*GCEPersistentDiskVolumeSource) ProtoMessage() {} func (*GCEPersistentDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{45} + return fileDescriptorGenerated, []int{48} } func (m *GitRepoVolumeSource) Reset() { *m = GitRepoVolumeSource{} } func (*GitRepoVolumeSource) ProtoMessage() {} -func (*GitRepoVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{46} } +func (*GitRepoVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{49} } func (m *GlusterfsVolumeSource) Reset() { *m = GlusterfsVolumeSource{} } func (*GlusterfsVolumeSource) ProtoMessage() {} -func (*GlusterfsVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{47} } +func (*GlusterfsVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} } func (m *HTTPGetAction) Reset() { *m = HTTPGetAction{} } func (*HTTPGetAction) ProtoMessage() {} -func (*HTTPGetAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{48} } +func (*HTTPGetAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{51} } func (m *HTTPHeader) Reset() { *m = HTTPHeader{} } func (*HTTPHeader) ProtoMessage() {} -func (*HTTPHeader) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{49} } +func (*HTTPHeader) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{52} } func (m *Handler) Reset() { *m = Handler{} } func (*Handler) ProtoMessage() {} -func (*Handler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} } +func (*Handler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{53} } func (m *HostPathVolumeSource) Reset() { *m = HostPathVolumeSource{} } func (*HostPathVolumeSource) ProtoMessage() {} -func (*HostPathVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{51} } +func (*HostPathVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{54} } func (m *ISCSIVolumeSource) Reset() { *m = ISCSIVolumeSource{} } func (*ISCSIVolumeSource) ProtoMessage() {} -func (*ISCSIVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{52} } +func (*ISCSIVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{55} } func (m *KeyToPath) Reset() { *m = KeyToPath{} } func (*KeyToPath) ProtoMessage() {} -func (*KeyToPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{53} } +func (*KeyToPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{56} } func (m *Lifecycle) Reset() { *m = Lifecycle{} } func (*Lifecycle) ProtoMessage() {} -func (*Lifecycle) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{54} } +func (*Lifecycle) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{57} } func (m *LimitRange) Reset() { *m = LimitRange{} } func (*LimitRange) ProtoMessage() {} -func (*LimitRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{55} } +func (*LimitRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{58} } func (m *LimitRangeItem) Reset() { *m = LimitRangeItem{} } func (*LimitRangeItem) ProtoMessage() {} -func (*LimitRangeItem) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{56} } +func (*LimitRangeItem) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{59} } func (m *LimitRangeList) Reset() { *m = LimitRangeList{} } func (*LimitRangeList) ProtoMessage() {} -func (*LimitRangeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{57} } +func (*LimitRangeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{60} } func (m *LimitRangeSpec) Reset() { *m = LimitRangeSpec{} } func (*LimitRangeSpec) ProtoMessage() {} -func (*LimitRangeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{58} } +func (*LimitRangeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{61} } func (m *List) Reset() { *m = List{} } func (*List) ProtoMessage() {} -func (*List) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{59} } +func (*List) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{62} } func (m *ListOptions) Reset() { *m = ListOptions{} } func (*ListOptions) ProtoMessage() {} -func (*ListOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{60} } +func (*ListOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{63} } func (m *LoadBalancerIngress) Reset() { *m = LoadBalancerIngress{} } func (*LoadBalancerIngress) ProtoMessage() {} -func (*LoadBalancerIngress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{61} } +func (*LoadBalancerIngress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{64} } func (m *LoadBalancerStatus) Reset() { *m = LoadBalancerStatus{} } func (*LoadBalancerStatus) ProtoMessage() {} -func (*LoadBalancerStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{62} } +func (*LoadBalancerStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{65} } func (m *LocalObjectReference) Reset() { *m = LocalObjectReference{} } func (*LocalObjectReference) ProtoMessage() {} -func (*LocalObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{63} } +func (*LocalObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{66} } func (m *NFSVolumeSource) Reset() { *m = NFSVolumeSource{} } func (*NFSVolumeSource) ProtoMessage() {} -func (*NFSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{64} } +func (*NFSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{67} } func (m *Namespace) Reset() { *m = Namespace{} } func (*Namespace) ProtoMessage() {} -func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{65} } +func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{68} } func (m *NamespaceList) Reset() { *m = NamespaceList{} } func (*NamespaceList) ProtoMessage() {} -func (*NamespaceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{66} } +func (*NamespaceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{69} } func (m *NamespaceSpec) Reset() { *m = NamespaceSpec{} } func (*NamespaceSpec) ProtoMessage() {} -func (*NamespaceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{67} } +func (*NamespaceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{70} } func (m *NamespaceStatus) Reset() { *m = NamespaceStatus{} } func (*NamespaceStatus) ProtoMessage() {} -func (*NamespaceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{68} } +func (*NamespaceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{71} } func (m *Node) Reset() { *m = Node{} } func (*Node) ProtoMessage() {} -func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{69} } +func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{72} } func (m *NodeAddress) Reset() { *m = NodeAddress{} } func (*NodeAddress) ProtoMessage() {} -func (*NodeAddress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{70} } +func (*NodeAddress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{73} } func (m *NodeAffinity) Reset() { *m = NodeAffinity{} } func (*NodeAffinity) ProtoMessage() {} -func (*NodeAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{71} } +func (*NodeAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{74} } func (m *NodeCondition) Reset() { *m = NodeCondition{} } func (*NodeCondition) ProtoMessage() {} -func (*NodeCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{72} } +func (*NodeCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{75} } func (m *NodeDaemonEndpoints) Reset() { *m = NodeDaemonEndpoints{} } func (*NodeDaemonEndpoints) ProtoMessage() {} -func (*NodeDaemonEndpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{73} } +func (*NodeDaemonEndpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{76} } func (m *NodeList) Reset() { *m = NodeList{} } func (*NodeList) ProtoMessage() {} -func (*NodeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{74} } +func (*NodeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{77} } func (m *NodeProxyOptions) Reset() { *m = NodeProxyOptions{} } func (*NodeProxyOptions) ProtoMessage() {} -func (*NodeProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{75} } +func (*NodeProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{78} } + +func (m *NodeResources) Reset() { *m = NodeResources{} } +func (*NodeResources) ProtoMessage() {} +func (*NodeResources) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{79} } func (m *NodeSelector) Reset() { *m = NodeSelector{} } func (*NodeSelector) ProtoMessage() {} -func (*NodeSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{76} } +func (*NodeSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{80} } func (m *NodeSelectorRequirement) Reset() { *m = NodeSelectorRequirement{} } func (*NodeSelectorRequirement) ProtoMessage() {} func (*NodeSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{77} + return fileDescriptorGenerated, []int{81} } func (m *NodeSelectorTerm) Reset() { *m = NodeSelectorTerm{} } func (*NodeSelectorTerm) ProtoMessage() {} -func (*NodeSelectorTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{78} } +func (*NodeSelectorTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{82} } func (m *NodeSpec) Reset() { *m = NodeSpec{} } func (*NodeSpec) ProtoMessage() {} -func (*NodeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{79} } +func (*NodeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{83} } func (m *NodeStatus) Reset() { *m = NodeStatus{} } func (*NodeStatus) ProtoMessage() {} -func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{80} } +func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{84} } func (m *NodeSystemInfo) Reset() { *m = NodeSystemInfo{} } func (*NodeSystemInfo) ProtoMessage() {} -func (*NodeSystemInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{81} } +func (*NodeSystemInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{85} } func (m *ObjectFieldSelector) Reset() { *m = ObjectFieldSelector{} } func (*ObjectFieldSelector) ProtoMessage() {} -func (*ObjectFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{82} } +func (*ObjectFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{86} } func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } func (*ObjectMeta) ProtoMessage() {} -func (*ObjectMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{83} } +func (*ObjectMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{87} } func (m *ObjectReference) Reset() { *m = ObjectReference{} } func (*ObjectReference) ProtoMessage() {} -func (*ObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{84} } - -func (m *OwnerReference) Reset() { *m = OwnerReference{} } -func (*OwnerReference) ProtoMessage() {} -func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{85} } +func (*ObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{88} } func (m *PersistentVolume) Reset() { *m = PersistentVolume{} } func (*PersistentVolume) ProtoMessage() {} -func (*PersistentVolume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{86} } +func (*PersistentVolume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{89} } func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} } func (*PersistentVolumeClaim) ProtoMessage() {} -func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{87} } +func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{90} } func (m *PersistentVolumeClaimList) Reset() { *m = PersistentVolumeClaimList{} } func (*PersistentVolumeClaimList) ProtoMessage() {} func (*PersistentVolumeClaimList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{88} + return fileDescriptorGenerated, []int{91} } func (m *PersistentVolumeClaimSpec) Reset() { *m = PersistentVolumeClaimSpec{} } func (*PersistentVolumeClaimSpec) ProtoMessage() {} func (*PersistentVolumeClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{89} + return fileDescriptorGenerated, []int{92} } func (m *PersistentVolumeClaimStatus) Reset() { *m = PersistentVolumeClaimStatus{} } func (*PersistentVolumeClaimStatus) ProtoMessage() {} func (*PersistentVolumeClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{90} + return fileDescriptorGenerated, []int{93} } func (m *PersistentVolumeClaimVolumeSource) Reset() { *m = PersistentVolumeClaimVolumeSource{} } func (*PersistentVolumeClaimVolumeSource) ProtoMessage() {} func (*PersistentVolumeClaimVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{91} + return fileDescriptorGenerated, []int{94} } func (m *PersistentVolumeList) Reset() { *m = PersistentVolumeList{} } func (*PersistentVolumeList) ProtoMessage() {} -func (*PersistentVolumeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{92} } +func (*PersistentVolumeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{95} } func (m *PersistentVolumeSource) Reset() { *m = PersistentVolumeSource{} } func (*PersistentVolumeSource) ProtoMessage() {} -func (*PersistentVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{93} } +func (*PersistentVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{96} } func (m *PersistentVolumeSpec) Reset() { *m = PersistentVolumeSpec{} } func (*PersistentVolumeSpec) ProtoMessage() {} -func (*PersistentVolumeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{94} } +func (*PersistentVolumeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{97} } func (m *PersistentVolumeStatus) Reset() { *m = PersistentVolumeStatus{} } func (*PersistentVolumeStatus) ProtoMessage() {} -func (*PersistentVolumeStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{95} } +func (*PersistentVolumeStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{98} } + +func (m *PhotonPersistentDiskVolumeSource) Reset() { *m = PhotonPersistentDiskVolumeSource{} } +func (*PhotonPersistentDiskVolumeSource) ProtoMessage() {} +func (*PhotonPersistentDiskVolumeSource) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{99} +} func (m *Pod) Reset() { *m = Pod{} } func (*Pod) ProtoMessage() {} -func (*Pod) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{96} } +func (*Pod) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{100} } func (m *PodAffinity) Reset() { *m = PodAffinity{} } func (*PodAffinity) ProtoMessage() {} -func (*PodAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{97} } +func (*PodAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{101} } func (m *PodAffinityTerm) Reset() { *m = PodAffinityTerm{} } func (*PodAffinityTerm) ProtoMessage() {} -func (*PodAffinityTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{98} } +func (*PodAffinityTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{102} } func (m *PodAntiAffinity) Reset() { *m = PodAntiAffinity{} } func (*PodAntiAffinity) ProtoMessage() {} -func (*PodAntiAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{99} } +func (*PodAntiAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{103} } func (m *PodAttachOptions) Reset() { *m = PodAttachOptions{} } func (*PodAttachOptions) ProtoMessage() {} -func (*PodAttachOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{100} } +func (*PodAttachOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{104} } func (m *PodCondition) Reset() { *m = PodCondition{} } func (*PodCondition) ProtoMessage() {} -func (*PodCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{101} } +func (*PodCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{105} } func (m *PodExecOptions) Reset() { *m = PodExecOptions{} } func (*PodExecOptions) ProtoMessage() {} -func (*PodExecOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{102} } +func (*PodExecOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{106} } func (m *PodList) Reset() { *m = PodList{} } func (*PodList) ProtoMessage() {} -func (*PodList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{103} } +func (*PodList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{107} } func (m *PodLogOptions) Reset() { *m = PodLogOptions{} } func (*PodLogOptions) ProtoMessage() {} -func (*PodLogOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{104} } +func (*PodLogOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{108} } + +func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } +func (*PodPortForwardOptions) ProtoMessage() {} +func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{109} } func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} } func (*PodProxyOptions) ProtoMessage() {} -func (*PodProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{105} } +func (*PodProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{110} } func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} } func (*PodSecurityContext) ProtoMessage() {} -func (*PodSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{106} } +func (*PodSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{111} } func (m *PodSignature) Reset() { *m = PodSignature{} } func (*PodSignature) ProtoMessage() {} -func (*PodSignature) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{107} } +func (*PodSignature) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{112} } func (m *PodSpec) Reset() { *m = PodSpec{} } func (*PodSpec) ProtoMessage() {} -func (*PodSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{108} } +func (*PodSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{113} } func (m *PodStatus) Reset() { *m = PodStatus{} } func (*PodStatus) ProtoMessage() {} -func (*PodStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{109} } +func (*PodStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{114} } func (m *PodStatusResult) Reset() { *m = PodStatusResult{} } func (*PodStatusResult) ProtoMessage() {} -func (*PodStatusResult) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{110} } +func (*PodStatusResult) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{115} } func (m *PodTemplate) Reset() { *m = PodTemplate{} } func (*PodTemplate) ProtoMessage() {} -func (*PodTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{111} } +func (*PodTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{116} } func (m *PodTemplateList) Reset() { *m = PodTemplateList{} } func (*PodTemplateList) ProtoMessage() {} -func (*PodTemplateList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{112} } +func (*PodTemplateList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{117} } func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} } func (*PodTemplateSpec) ProtoMessage() {} -func (*PodTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{113} } +func (*PodTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{118} } + +func (m *PortworxVolumeSource) Reset() { *m = PortworxVolumeSource{} } +func (*PortworxVolumeSource) ProtoMessage() {} +func (*PortworxVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{119} } func (m *Preconditions) Reset() { *m = Preconditions{} } func (*Preconditions) ProtoMessage() {} -func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{114} } +func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{120} } func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} } func (*PreferAvoidPodsEntry) ProtoMessage() {} -func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{115} } +func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{121} } func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} } func (*PreferredSchedulingTerm) ProtoMessage() {} func (*PreferredSchedulingTerm) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{116} + return fileDescriptorGenerated, []int{122} } func (m *Probe) Reset() { *m = Probe{} } func (*Probe) ProtoMessage() {} -func (*Probe) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{117} } +func (*Probe) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{123} } + +func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} } +func (*ProjectedVolumeSource) ProtoMessage() {} +func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{124} } func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} } func (*QuobyteVolumeSource) ProtoMessage() {} -func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{118} } +func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{125} } func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} } func (*RBDVolumeSource) ProtoMessage() {} -func (*RBDVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{119} } +func (*RBDVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{126} } func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } func (*RangeAllocation) ProtoMessage() {} -func (*RangeAllocation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{120} } +func (*RangeAllocation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{127} } func (m *ReplicationController) Reset() { *m = ReplicationController{} } func (*ReplicationController) ProtoMessage() {} -func (*ReplicationController) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{121} } +func (*ReplicationController) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{128} } + +func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} } +func (*ReplicationControllerCondition) ProtoMessage() {} +func (*ReplicationControllerCondition) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{129} +} func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} } func (*ReplicationControllerList) ProtoMessage() {} func (*ReplicationControllerList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{122} + return fileDescriptorGenerated, []int{130} } func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} } func (*ReplicationControllerSpec) ProtoMessage() {} func (*ReplicationControllerSpec) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{123} + return fileDescriptorGenerated, []int{131} } func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} } func (*ReplicationControllerStatus) ProtoMessage() {} func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{124} + return fileDescriptorGenerated, []int{132} } func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } func (*ResourceFieldSelector) ProtoMessage() {} -func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{125} } +func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{133} } func (m *ResourceQuota) Reset() { *m = ResourceQuota{} } func (*ResourceQuota) ProtoMessage() {} -func (*ResourceQuota) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{126} } +func (*ResourceQuota) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{134} } func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} } func (*ResourceQuotaList) ProtoMessage() {} -func (*ResourceQuotaList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{127} } +func (*ResourceQuotaList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{135} } func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} } func (*ResourceQuotaSpec) ProtoMessage() {} -func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{128} } +func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{136} } func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} } func (*ResourceQuotaStatus) ProtoMessage() {} -func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{129} } +func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{137} } func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} } func (*ResourceRequirements) ProtoMessage() {} -func (*ResourceRequirements) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{130} } +func (*ResourceRequirements) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{138} } func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} } func (*SELinuxOptions) ProtoMessage() {} -func (*SELinuxOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{131} } +func (*SELinuxOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{139} } + +func (m *ScaleIOVolumeSource) Reset() { *m = ScaleIOVolumeSource{} } +func (*ScaleIOVolumeSource) ProtoMessage() {} +func (*ScaleIOVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{140} } func (m *Secret) Reset() { *m = Secret{} } func (*Secret) ProtoMessage() {} -func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{132} } +func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{141} } + +func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} } +func (*SecretEnvSource) ProtoMessage() {} +func (*SecretEnvSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{142} } func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} } func (*SecretKeySelector) ProtoMessage() {} -func (*SecretKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{133} } +func (*SecretKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{143} } func (m *SecretList) Reset() { *m = SecretList{} } func (*SecretList) ProtoMessage() {} -func (*SecretList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{134} } +func (*SecretList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{144} } + +func (m *SecretProjection) Reset() { *m = SecretProjection{} } +func (*SecretProjection) ProtoMessage() {} +func (*SecretProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{145} } func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} } func (*SecretVolumeSource) ProtoMessage() {} -func (*SecretVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{135} } +func (*SecretVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{146} } func (m *SecurityContext) Reset() { *m = SecurityContext{} } func (*SecurityContext) ProtoMessage() {} -func (*SecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{136} } +func (*SecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{147} } func (m *SerializedReference) Reset() { *m = SerializedReference{} } func (*SerializedReference) ProtoMessage() {} -func (*SerializedReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{137} } +func (*SerializedReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{148} } func (m *Service) Reset() { *m = Service{} } func (*Service) ProtoMessage() {} -func (*Service) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{138} } +func (*Service) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{149} } func (m *ServiceAccount) Reset() { *m = ServiceAccount{} } func (*ServiceAccount) ProtoMessage() {} -func (*ServiceAccount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{139} } +func (*ServiceAccount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{150} } func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} } func (*ServiceAccountList) ProtoMessage() {} -func (*ServiceAccountList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{140} } +func (*ServiceAccountList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{151} } func (m *ServiceList) Reset() { *m = ServiceList{} } func (*ServiceList) ProtoMessage() {} -func (*ServiceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{141} } +func (*ServiceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{152} } func (m *ServicePort) Reset() { *m = ServicePort{} } func (*ServicePort) ProtoMessage() {} -func (*ServicePort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{142} } +func (*ServicePort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{153} } func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} } func (*ServiceProxyOptions) ProtoMessage() {} -func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{143} } +func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{154} } func (m *ServiceSpec) Reset() { *m = ServiceSpec{} } func (*ServiceSpec) ProtoMessage() {} -func (*ServiceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{144} } +func (*ServiceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{155} } func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } func (*ServiceStatus) ProtoMessage() {} -func (*ServiceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{145} } +func (*ServiceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{156} } + +func (m *Sysctl) Reset() { *m = Sysctl{} } +func (*Sysctl) ProtoMessage() {} +func (*Sysctl) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{157} } func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} } func (*TCPSocketAction) ProtoMessage() {} -func (*TCPSocketAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{146} } +func (*TCPSocketAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{158} } func (m *Taint) Reset() { *m = Taint{} } func (*Taint) ProtoMessage() {} -func (*Taint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{147} } +func (*Taint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{159} } func (m *Toleration) Reset() { *m = Toleration{} } func (*Toleration) ProtoMessage() {} -func (*Toleration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{148} } +func (*Toleration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{160} } func (m *Volume) Reset() { *m = Volume{} } func (*Volume) ProtoMessage() {} -func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{149} } +func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{161} } func (m *VolumeMount) Reset() { *m = VolumeMount{} } func (*VolumeMount) ProtoMessage() {} -func (*VolumeMount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{150} } +func (*VolumeMount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{162} } + +func (m *VolumeProjection) Reset() { *m = VolumeProjection{} } +func (*VolumeProjection) ProtoMessage() {} +func (*VolumeProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{163} } func (m *VolumeSource) Reset() { *m = VolumeSource{} } func (*VolumeSource) ProtoMessage() {} -func (*VolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{151} } +func (*VolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{164} } func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} } func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {} func (*VsphereVirtualDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{152} + return fileDescriptorGenerated, []int{165} } func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} } func (*WeightedPodAffinityTerm) ProtoMessage() {} func (*WeightedPodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{153} + return fileDescriptorGenerated, []int{166} } func init() { - proto.RegisterType((*AWSElasticBlockStoreVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.AWSElasticBlockStoreVolumeSource") - proto.RegisterType((*Affinity)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Affinity") - proto.RegisterType((*AttachedVolume)(nil), "k8s.io.client-go.1.5.pkg.api.v1.AttachedVolume") - proto.RegisterType((*AvoidPods)(nil), "k8s.io.client-go.1.5.pkg.api.v1.AvoidPods") - proto.RegisterType((*AzureDiskVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.AzureDiskVolumeSource") - proto.RegisterType((*AzureFileVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.AzureFileVolumeSource") - proto.RegisterType((*Binding)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Binding") - proto.RegisterType((*Capabilities)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Capabilities") - proto.RegisterType((*CephFSVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.CephFSVolumeSource") - proto.RegisterType((*CinderVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.CinderVolumeSource") - proto.RegisterType((*ComponentCondition)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ComponentCondition") - proto.RegisterType((*ComponentStatus)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ComponentStatus") - proto.RegisterType((*ComponentStatusList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ComponentStatusList") - proto.RegisterType((*ConfigMap)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ConfigMap") - proto.RegisterType((*ConfigMapKeySelector)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ConfigMapKeySelector") - proto.RegisterType((*ConfigMapList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ConfigMapList") - proto.RegisterType((*ConfigMapVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ConfigMapVolumeSource") - proto.RegisterType((*Container)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Container") - proto.RegisterType((*ContainerImage)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ContainerImage") - proto.RegisterType((*ContainerPort)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ContainerPort") - proto.RegisterType((*ContainerState)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ContainerState") - proto.RegisterType((*ContainerStateRunning)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ContainerStateRunning") - proto.RegisterType((*ContainerStateTerminated)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ContainerStateTerminated") - proto.RegisterType((*ContainerStateWaiting)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ContainerStateWaiting") - proto.RegisterType((*ContainerStatus)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ContainerStatus") - proto.RegisterType((*DaemonEndpoint)(nil), "k8s.io.client-go.1.5.pkg.api.v1.DaemonEndpoint") - proto.RegisterType((*DeleteOptions)(nil), "k8s.io.client-go.1.5.pkg.api.v1.DeleteOptions") - proto.RegisterType((*DownwardAPIVolumeFile)(nil), "k8s.io.client-go.1.5.pkg.api.v1.DownwardAPIVolumeFile") - proto.RegisterType((*DownwardAPIVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.DownwardAPIVolumeSource") - proto.RegisterType((*EmptyDirVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.EmptyDirVolumeSource") - proto.RegisterType((*EndpointAddress)(nil), "k8s.io.client-go.1.5.pkg.api.v1.EndpointAddress") - proto.RegisterType((*EndpointPort)(nil), "k8s.io.client-go.1.5.pkg.api.v1.EndpointPort") - proto.RegisterType((*EndpointSubset)(nil), "k8s.io.client-go.1.5.pkg.api.v1.EndpointSubset") - proto.RegisterType((*Endpoints)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Endpoints") - proto.RegisterType((*EndpointsList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.EndpointsList") - proto.RegisterType((*EnvVar)(nil), "k8s.io.client-go.1.5.pkg.api.v1.EnvVar") - proto.RegisterType((*EnvVarSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.EnvVarSource") - proto.RegisterType((*Event)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Event") - proto.RegisterType((*EventList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.EventList") - proto.RegisterType((*EventSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.EventSource") - proto.RegisterType((*ExecAction)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ExecAction") - proto.RegisterType((*ExportOptions)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ExportOptions") - proto.RegisterType((*FCVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.FCVolumeSource") - proto.RegisterType((*FlexVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.FlexVolumeSource") - proto.RegisterType((*FlockerVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.FlockerVolumeSource") - proto.RegisterType((*GCEPersistentDiskVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.GCEPersistentDiskVolumeSource") - proto.RegisterType((*GitRepoVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.GitRepoVolumeSource") - proto.RegisterType((*GlusterfsVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.GlusterfsVolumeSource") - proto.RegisterType((*HTTPGetAction)(nil), "k8s.io.client-go.1.5.pkg.api.v1.HTTPGetAction") - proto.RegisterType((*HTTPHeader)(nil), "k8s.io.client-go.1.5.pkg.api.v1.HTTPHeader") - proto.RegisterType((*Handler)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Handler") - proto.RegisterType((*HostPathVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.HostPathVolumeSource") - proto.RegisterType((*ISCSIVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ISCSIVolumeSource") - proto.RegisterType((*KeyToPath)(nil), "k8s.io.client-go.1.5.pkg.api.v1.KeyToPath") - proto.RegisterType((*Lifecycle)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Lifecycle") - proto.RegisterType((*LimitRange)(nil), "k8s.io.client-go.1.5.pkg.api.v1.LimitRange") - proto.RegisterType((*LimitRangeItem)(nil), "k8s.io.client-go.1.5.pkg.api.v1.LimitRangeItem") - proto.RegisterType((*LimitRangeList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.LimitRangeList") - proto.RegisterType((*LimitRangeSpec)(nil), "k8s.io.client-go.1.5.pkg.api.v1.LimitRangeSpec") - proto.RegisterType((*List)(nil), "k8s.io.client-go.1.5.pkg.api.v1.List") - proto.RegisterType((*ListOptions)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ListOptions") - proto.RegisterType((*LoadBalancerIngress)(nil), "k8s.io.client-go.1.5.pkg.api.v1.LoadBalancerIngress") - proto.RegisterType((*LoadBalancerStatus)(nil), "k8s.io.client-go.1.5.pkg.api.v1.LoadBalancerStatus") - proto.RegisterType((*LocalObjectReference)(nil), "k8s.io.client-go.1.5.pkg.api.v1.LocalObjectReference") - proto.RegisterType((*NFSVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NFSVolumeSource") - proto.RegisterType((*Namespace)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Namespace") - proto.RegisterType((*NamespaceList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NamespaceList") - proto.RegisterType((*NamespaceSpec)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NamespaceSpec") - proto.RegisterType((*NamespaceStatus)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NamespaceStatus") - proto.RegisterType((*Node)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Node") - proto.RegisterType((*NodeAddress)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NodeAddress") - proto.RegisterType((*NodeAffinity)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NodeAffinity") - proto.RegisterType((*NodeCondition)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NodeCondition") - proto.RegisterType((*NodeDaemonEndpoints)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NodeDaemonEndpoints") - proto.RegisterType((*NodeList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NodeList") - proto.RegisterType((*NodeProxyOptions)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NodeProxyOptions") - proto.RegisterType((*NodeSelector)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NodeSelector") - proto.RegisterType((*NodeSelectorRequirement)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NodeSelectorRequirement") - proto.RegisterType((*NodeSelectorTerm)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NodeSelectorTerm") - proto.RegisterType((*NodeSpec)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NodeSpec") - proto.RegisterType((*NodeStatus)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NodeStatus") - proto.RegisterType((*NodeSystemInfo)(nil), "k8s.io.client-go.1.5.pkg.api.v1.NodeSystemInfo") - proto.RegisterType((*ObjectFieldSelector)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ObjectFieldSelector") - proto.RegisterType((*ObjectMeta)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ObjectMeta") - proto.RegisterType((*ObjectReference)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ObjectReference") - proto.RegisterType((*OwnerReference)(nil), "k8s.io.client-go.1.5.pkg.api.v1.OwnerReference") - proto.RegisterType((*PersistentVolume)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PersistentVolume") - proto.RegisterType((*PersistentVolumeClaim)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PersistentVolumeClaim") - proto.RegisterType((*PersistentVolumeClaimList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PersistentVolumeClaimList") - proto.RegisterType((*PersistentVolumeClaimSpec)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PersistentVolumeClaimSpec") - proto.RegisterType((*PersistentVolumeClaimStatus)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PersistentVolumeClaimStatus") - proto.RegisterType((*PersistentVolumeClaimVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PersistentVolumeClaimVolumeSource") - proto.RegisterType((*PersistentVolumeList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PersistentVolumeList") - proto.RegisterType((*PersistentVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PersistentVolumeSource") - proto.RegisterType((*PersistentVolumeSpec)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PersistentVolumeSpec") - proto.RegisterType((*PersistentVolumeStatus)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PersistentVolumeStatus") - proto.RegisterType((*Pod)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Pod") - proto.RegisterType((*PodAffinity)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodAffinity") - proto.RegisterType((*PodAffinityTerm)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodAffinityTerm") - proto.RegisterType((*PodAntiAffinity)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodAntiAffinity") - proto.RegisterType((*PodAttachOptions)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodAttachOptions") - proto.RegisterType((*PodCondition)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodCondition") - proto.RegisterType((*PodExecOptions)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodExecOptions") - proto.RegisterType((*PodList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodList") - proto.RegisterType((*PodLogOptions)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodLogOptions") - proto.RegisterType((*PodProxyOptions)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodProxyOptions") - proto.RegisterType((*PodSecurityContext)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodSecurityContext") - proto.RegisterType((*PodSignature)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodSignature") - proto.RegisterType((*PodSpec)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodSpec") - proto.RegisterType((*PodStatus)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodStatus") - proto.RegisterType((*PodStatusResult)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodStatusResult") - proto.RegisterType((*PodTemplate)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodTemplate") - proto.RegisterType((*PodTemplateList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodTemplateList") - proto.RegisterType((*PodTemplateSpec)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PodTemplateSpec") - proto.RegisterType((*Preconditions)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Preconditions") - proto.RegisterType((*PreferAvoidPodsEntry)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PreferAvoidPodsEntry") - proto.RegisterType((*PreferredSchedulingTerm)(nil), "k8s.io.client-go.1.5.pkg.api.v1.PreferredSchedulingTerm") - proto.RegisterType((*Probe)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Probe") - proto.RegisterType((*QuobyteVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.QuobyteVolumeSource") - proto.RegisterType((*RBDVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.RBDVolumeSource") - proto.RegisterType((*RangeAllocation)(nil), "k8s.io.client-go.1.5.pkg.api.v1.RangeAllocation") - proto.RegisterType((*ReplicationController)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ReplicationController") - proto.RegisterType((*ReplicationControllerList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ReplicationControllerList") - proto.RegisterType((*ReplicationControllerSpec)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ReplicationControllerSpec") - proto.RegisterType((*ReplicationControllerStatus)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ReplicationControllerStatus") - proto.RegisterType((*ResourceFieldSelector)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ResourceFieldSelector") - proto.RegisterType((*ResourceQuota)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ResourceQuota") - proto.RegisterType((*ResourceQuotaList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ResourceQuotaList") - proto.RegisterType((*ResourceQuotaSpec)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ResourceQuotaSpec") - proto.RegisterType((*ResourceQuotaStatus)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ResourceQuotaStatus") - proto.RegisterType((*ResourceRequirements)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ResourceRequirements") - proto.RegisterType((*SELinuxOptions)(nil), "k8s.io.client-go.1.5.pkg.api.v1.SELinuxOptions") - proto.RegisterType((*Secret)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Secret") - proto.RegisterType((*SecretKeySelector)(nil), "k8s.io.client-go.1.5.pkg.api.v1.SecretKeySelector") - proto.RegisterType((*SecretList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.SecretList") - proto.RegisterType((*SecretVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.SecretVolumeSource") - proto.RegisterType((*SecurityContext)(nil), "k8s.io.client-go.1.5.pkg.api.v1.SecurityContext") - proto.RegisterType((*SerializedReference)(nil), "k8s.io.client-go.1.5.pkg.api.v1.SerializedReference") - proto.RegisterType((*Service)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Service") - proto.RegisterType((*ServiceAccount)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ServiceAccount") - proto.RegisterType((*ServiceAccountList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ServiceAccountList") - proto.RegisterType((*ServiceList)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ServiceList") - proto.RegisterType((*ServicePort)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ServicePort") - proto.RegisterType((*ServiceProxyOptions)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ServiceProxyOptions") - proto.RegisterType((*ServiceSpec)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ServiceSpec") - proto.RegisterType((*ServiceStatus)(nil), "k8s.io.client-go.1.5.pkg.api.v1.ServiceStatus") - proto.RegisterType((*TCPSocketAction)(nil), "k8s.io.client-go.1.5.pkg.api.v1.TCPSocketAction") - proto.RegisterType((*Taint)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Taint") - proto.RegisterType((*Toleration)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Toleration") - proto.RegisterType((*Volume)(nil), "k8s.io.client-go.1.5.pkg.api.v1.Volume") - proto.RegisterType((*VolumeMount)(nil), "k8s.io.client-go.1.5.pkg.api.v1.VolumeMount") - proto.RegisterType((*VolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.VolumeSource") - proto.RegisterType((*VsphereVirtualDiskVolumeSource)(nil), "k8s.io.client-go.1.5.pkg.api.v1.VsphereVirtualDiskVolumeSource") - proto.RegisterType((*WeightedPodAffinityTerm)(nil), "k8s.io.client-go.1.5.pkg.api.v1.WeightedPodAffinityTerm") + proto.RegisterType((*AWSElasticBlockStoreVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.AWSElasticBlockStoreVolumeSource") + proto.RegisterType((*Affinity)(nil), "k8s.io.client-go.pkg.api.v1.Affinity") + proto.RegisterType((*AttachedVolume)(nil), "k8s.io.client-go.pkg.api.v1.AttachedVolume") + proto.RegisterType((*AvoidPods)(nil), "k8s.io.client-go.pkg.api.v1.AvoidPods") + proto.RegisterType((*AzureDiskVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.AzureDiskVolumeSource") + proto.RegisterType((*AzureFileVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.AzureFileVolumeSource") + proto.RegisterType((*Binding)(nil), "k8s.io.client-go.pkg.api.v1.Binding") + proto.RegisterType((*Capabilities)(nil), "k8s.io.client-go.pkg.api.v1.Capabilities") + proto.RegisterType((*CephFSVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.CephFSVolumeSource") + proto.RegisterType((*CinderVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.CinderVolumeSource") + proto.RegisterType((*ComponentCondition)(nil), "k8s.io.client-go.pkg.api.v1.ComponentCondition") + proto.RegisterType((*ComponentStatus)(nil), "k8s.io.client-go.pkg.api.v1.ComponentStatus") + proto.RegisterType((*ComponentStatusList)(nil), "k8s.io.client-go.pkg.api.v1.ComponentStatusList") + proto.RegisterType((*ConfigMap)(nil), "k8s.io.client-go.pkg.api.v1.ConfigMap") + proto.RegisterType((*ConfigMapEnvSource)(nil), "k8s.io.client-go.pkg.api.v1.ConfigMapEnvSource") + proto.RegisterType((*ConfigMapKeySelector)(nil), "k8s.io.client-go.pkg.api.v1.ConfigMapKeySelector") + proto.RegisterType((*ConfigMapList)(nil), "k8s.io.client-go.pkg.api.v1.ConfigMapList") + proto.RegisterType((*ConfigMapProjection)(nil), "k8s.io.client-go.pkg.api.v1.ConfigMapProjection") + proto.RegisterType((*ConfigMapVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.ConfigMapVolumeSource") + proto.RegisterType((*Container)(nil), "k8s.io.client-go.pkg.api.v1.Container") + proto.RegisterType((*ContainerImage)(nil), "k8s.io.client-go.pkg.api.v1.ContainerImage") + proto.RegisterType((*ContainerPort)(nil), "k8s.io.client-go.pkg.api.v1.ContainerPort") + proto.RegisterType((*ContainerState)(nil), "k8s.io.client-go.pkg.api.v1.ContainerState") + proto.RegisterType((*ContainerStateRunning)(nil), "k8s.io.client-go.pkg.api.v1.ContainerStateRunning") + proto.RegisterType((*ContainerStateTerminated)(nil), "k8s.io.client-go.pkg.api.v1.ContainerStateTerminated") + proto.RegisterType((*ContainerStateWaiting)(nil), "k8s.io.client-go.pkg.api.v1.ContainerStateWaiting") + proto.RegisterType((*ContainerStatus)(nil), "k8s.io.client-go.pkg.api.v1.ContainerStatus") + proto.RegisterType((*DaemonEndpoint)(nil), "k8s.io.client-go.pkg.api.v1.DaemonEndpoint") + proto.RegisterType((*DeleteOptions)(nil), "k8s.io.client-go.pkg.api.v1.DeleteOptions") + proto.RegisterType((*DownwardAPIProjection)(nil), "k8s.io.client-go.pkg.api.v1.DownwardAPIProjection") + proto.RegisterType((*DownwardAPIVolumeFile)(nil), "k8s.io.client-go.pkg.api.v1.DownwardAPIVolumeFile") + proto.RegisterType((*DownwardAPIVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.DownwardAPIVolumeSource") + proto.RegisterType((*EmptyDirVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.EmptyDirVolumeSource") + proto.RegisterType((*EndpointAddress)(nil), "k8s.io.client-go.pkg.api.v1.EndpointAddress") + proto.RegisterType((*EndpointPort)(nil), "k8s.io.client-go.pkg.api.v1.EndpointPort") + proto.RegisterType((*EndpointSubset)(nil), "k8s.io.client-go.pkg.api.v1.EndpointSubset") + proto.RegisterType((*Endpoints)(nil), "k8s.io.client-go.pkg.api.v1.Endpoints") + proto.RegisterType((*EndpointsList)(nil), "k8s.io.client-go.pkg.api.v1.EndpointsList") + proto.RegisterType((*EnvFromSource)(nil), "k8s.io.client-go.pkg.api.v1.EnvFromSource") + proto.RegisterType((*EnvVar)(nil), "k8s.io.client-go.pkg.api.v1.EnvVar") + proto.RegisterType((*EnvVarSource)(nil), "k8s.io.client-go.pkg.api.v1.EnvVarSource") + proto.RegisterType((*Event)(nil), "k8s.io.client-go.pkg.api.v1.Event") + proto.RegisterType((*EventList)(nil), "k8s.io.client-go.pkg.api.v1.EventList") + proto.RegisterType((*EventSource)(nil), "k8s.io.client-go.pkg.api.v1.EventSource") + proto.RegisterType((*ExecAction)(nil), "k8s.io.client-go.pkg.api.v1.ExecAction") + proto.RegisterType((*FCVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.FCVolumeSource") + proto.RegisterType((*FlexVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.FlexVolumeSource") + proto.RegisterType((*FlockerVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.FlockerVolumeSource") + proto.RegisterType((*GCEPersistentDiskVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.GCEPersistentDiskVolumeSource") + proto.RegisterType((*GitRepoVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.GitRepoVolumeSource") + proto.RegisterType((*GlusterfsVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.GlusterfsVolumeSource") + proto.RegisterType((*HTTPGetAction)(nil), "k8s.io.client-go.pkg.api.v1.HTTPGetAction") + proto.RegisterType((*HTTPHeader)(nil), "k8s.io.client-go.pkg.api.v1.HTTPHeader") + proto.RegisterType((*Handler)(nil), "k8s.io.client-go.pkg.api.v1.Handler") + proto.RegisterType((*HostPathVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.HostPathVolumeSource") + proto.RegisterType((*ISCSIVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.ISCSIVolumeSource") + proto.RegisterType((*KeyToPath)(nil), "k8s.io.client-go.pkg.api.v1.KeyToPath") + proto.RegisterType((*Lifecycle)(nil), "k8s.io.client-go.pkg.api.v1.Lifecycle") + proto.RegisterType((*LimitRange)(nil), "k8s.io.client-go.pkg.api.v1.LimitRange") + proto.RegisterType((*LimitRangeItem)(nil), "k8s.io.client-go.pkg.api.v1.LimitRangeItem") + proto.RegisterType((*LimitRangeList)(nil), "k8s.io.client-go.pkg.api.v1.LimitRangeList") + proto.RegisterType((*LimitRangeSpec)(nil), "k8s.io.client-go.pkg.api.v1.LimitRangeSpec") + proto.RegisterType((*List)(nil), "k8s.io.client-go.pkg.api.v1.List") + proto.RegisterType((*ListOptions)(nil), "k8s.io.client-go.pkg.api.v1.ListOptions") + proto.RegisterType((*LoadBalancerIngress)(nil), "k8s.io.client-go.pkg.api.v1.LoadBalancerIngress") + proto.RegisterType((*LoadBalancerStatus)(nil), "k8s.io.client-go.pkg.api.v1.LoadBalancerStatus") + proto.RegisterType((*LocalObjectReference)(nil), "k8s.io.client-go.pkg.api.v1.LocalObjectReference") + proto.RegisterType((*NFSVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.NFSVolumeSource") + proto.RegisterType((*Namespace)(nil), "k8s.io.client-go.pkg.api.v1.Namespace") + proto.RegisterType((*NamespaceList)(nil), "k8s.io.client-go.pkg.api.v1.NamespaceList") + proto.RegisterType((*NamespaceSpec)(nil), "k8s.io.client-go.pkg.api.v1.NamespaceSpec") + proto.RegisterType((*NamespaceStatus)(nil), "k8s.io.client-go.pkg.api.v1.NamespaceStatus") + proto.RegisterType((*Node)(nil), "k8s.io.client-go.pkg.api.v1.Node") + proto.RegisterType((*NodeAddress)(nil), "k8s.io.client-go.pkg.api.v1.NodeAddress") + proto.RegisterType((*NodeAffinity)(nil), "k8s.io.client-go.pkg.api.v1.NodeAffinity") + proto.RegisterType((*NodeCondition)(nil), "k8s.io.client-go.pkg.api.v1.NodeCondition") + proto.RegisterType((*NodeDaemonEndpoints)(nil), "k8s.io.client-go.pkg.api.v1.NodeDaemonEndpoints") + proto.RegisterType((*NodeList)(nil), "k8s.io.client-go.pkg.api.v1.NodeList") + proto.RegisterType((*NodeProxyOptions)(nil), "k8s.io.client-go.pkg.api.v1.NodeProxyOptions") + proto.RegisterType((*NodeResources)(nil), "k8s.io.client-go.pkg.api.v1.NodeResources") + proto.RegisterType((*NodeSelector)(nil), "k8s.io.client-go.pkg.api.v1.NodeSelector") + proto.RegisterType((*NodeSelectorRequirement)(nil), "k8s.io.client-go.pkg.api.v1.NodeSelectorRequirement") + proto.RegisterType((*NodeSelectorTerm)(nil), "k8s.io.client-go.pkg.api.v1.NodeSelectorTerm") + proto.RegisterType((*NodeSpec)(nil), "k8s.io.client-go.pkg.api.v1.NodeSpec") + proto.RegisterType((*NodeStatus)(nil), "k8s.io.client-go.pkg.api.v1.NodeStatus") + proto.RegisterType((*NodeSystemInfo)(nil), "k8s.io.client-go.pkg.api.v1.NodeSystemInfo") + proto.RegisterType((*ObjectFieldSelector)(nil), "k8s.io.client-go.pkg.api.v1.ObjectFieldSelector") + proto.RegisterType((*ObjectMeta)(nil), "k8s.io.client-go.pkg.api.v1.ObjectMeta") + proto.RegisterType((*ObjectReference)(nil), "k8s.io.client-go.pkg.api.v1.ObjectReference") + proto.RegisterType((*PersistentVolume)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolume") + proto.RegisterType((*PersistentVolumeClaim)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeClaim") + proto.RegisterType((*PersistentVolumeClaimList)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeClaimList") + proto.RegisterType((*PersistentVolumeClaimSpec)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeClaimSpec") + proto.RegisterType((*PersistentVolumeClaimStatus)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeClaimStatus") + proto.RegisterType((*PersistentVolumeClaimVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeClaimVolumeSource") + proto.RegisterType((*PersistentVolumeList)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeList") + proto.RegisterType((*PersistentVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeSource") + proto.RegisterType((*PersistentVolumeSpec)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeSpec") + proto.RegisterType((*PersistentVolumeStatus)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeStatus") + proto.RegisterType((*PhotonPersistentDiskVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.PhotonPersistentDiskVolumeSource") + proto.RegisterType((*Pod)(nil), "k8s.io.client-go.pkg.api.v1.Pod") + proto.RegisterType((*PodAffinity)(nil), "k8s.io.client-go.pkg.api.v1.PodAffinity") + proto.RegisterType((*PodAffinityTerm)(nil), "k8s.io.client-go.pkg.api.v1.PodAffinityTerm") + proto.RegisterType((*PodAntiAffinity)(nil), "k8s.io.client-go.pkg.api.v1.PodAntiAffinity") + proto.RegisterType((*PodAttachOptions)(nil), "k8s.io.client-go.pkg.api.v1.PodAttachOptions") + proto.RegisterType((*PodCondition)(nil), "k8s.io.client-go.pkg.api.v1.PodCondition") + proto.RegisterType((*PodExecOptions)(nil), "k8s.io.client-go.pkg.api.v1.PodExecOptions") + proto.RegisterType((*PodList)(nil), "k8s.io.client-go.pkg.api.v1.PodList") + proto.RegisterType((*PodLogOptions)(nil), "k8s.io.client-go.pkg.api.v1.PodLogOptions") + proto.RegisterType((*PodPortForwardOptions)(nil), "k8s.io.client-go.pkg.api.v1.PodPortForwardOptions") + proto.RegisterType((*PodProxyOptions)(nil), "k8s.io.client-go.pkg.api.v1.PodProxyOptions") + proto.RegisterType((*PodSecurityContext)(nil), "k8s.io.client-go.pkg.api.v1.PodSecurityContext") + proto.RegisterType((*PodSignature)(nil), "k8s.io.client-go.pkg.api.v1.PodSignature") + proto.RegisterType((*PodSpec)(nil), "k8s.io.client-go.pkg.api.v1.PodSpec") + proto.RegisterType((*PodStatus)(nil), "k8s.io.client-go.pkg.api.v1.PodStatus") + proto.RegisterType((*PodStatusResult)(nil), "k8s.io.client-go.pkg.api.v1.PodStatusResult") + proto.RegisterType((*PodTemplate)(nil), "k8s.io.client-go.pkg.api.v1.PodTemplate") + proto.RegisterType((*PodTemplateList)(nil), "k8s.io.client-go.pkg.api.v1.PodTemplateList") + proto.RegisterType((*PodTemplateSpec)(nil), "k8s.io.client-go.pkg.api.v1.PodTemplateSpec") + proto.RegisterType((*PortworxVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.PortworxVolumeSource") + proto.RegisterType((*Preconditions)(nil), "k8s.io.client-go.pkg.api.v1.Preconditions") + proto.RegisterType((*PreferAvoidPodsEntry)(nil), "k8s.io.client-go.pkg.api.v1.PreferAvoidPodsEntry") + proto.RegisterType((*PreferredSchedulingTerm)(nil), "k8s.io.client-go.pkg.api.v1.PreferredSchedulingTerm") + proto.RegisterType((*Probe)(nil), "k8s.io.client-go.pkg.api.v1.Probe") + proto.RegisterType((*ProjectedVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.ProjectedVolumeSource") + proto.RegisterType((*QuobyteVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.QuobyteVolumeSource") + proto.RegisterType((*RBDVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.RBDVolumeSource") + proto.RegisterType((*RangeAllocation)(nil), "k8s.io.client-go.pkg.api.v1.RangeAllocation") + proto.RegisterType((*ReplicationController)(nil), "k8s.io.client-go.pkg.api.v1.ReplicationController") + proto.RegisterType((*ReplicationControllerCondition)(nil), "k8s.io.client-go.pkg.api.v1.ReplicationControllerCondition") + proto.RegisterType((*ReplicationControllerList)(nil), "k8s.io.client-go.pkg.api.v1.ReplicationControllerList") + proto.RegisterType((*ReplicationControllerSpec)(nil), "k8s.io.client-go.pkg.api.v1.ReplicationControllerSpec") + proto.RegisterType((*ReplicationControllerStatus)(nil), "k8s.io.client-go.pkg.api.v1.ReplicationControllerStatus") + proto.RegisterType((*ResourceFieldSelector)(nil), "k8s.io.client-go.pkg.api.v1.ResourceFieldSelector") + proto.RegisterType((*ResourceQuota)(nil), "k8s.io.client-go.pkg.api.v1.ResourceQuota") + proto.RegisterType((*ResourceQuotaList)(nil), "k8s.io.client-go.pkg.api.v1.ResourceQuotaList") + proto.RegisterType((*ResourceQuotaSpec)(nil), "k8s.io.client-go.pkg.api.v1.ResourceQuotaSpec") + proto.RegisterType((*ResourceQuotaStatus)(nil), "k8s.io.client-go.pkg.api.v1.ResourceQuotaStatus") + proto.RegisterType((*ResourceRequirements)(nil), "k8s.io.client-go.pkg.api.v1.ResourceRequirements") + proto.RegisterType((*SELinuxOptions)(nil), "k8s.io.client-go.pkg.api.v1.SELinuxOptions") + proto.RegisterType((*ScaleIOVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.ScaleIOVolumeSource") + proto.RegisterType((*Secret)(nil), "k8s.io.client-go.pkg.api.v1.Secret") + proto.RegisterType((*SecretEnvSource)(nil), "k8s.io.client-go.pkg.api.v1.SecretEnvSource") + proto.RegisterType((*SecretKeySelector)(nil), "k8s.io.client-go.pkg.api.v1.SecretKeySelector") + proto.RegisterType((*SecretList)(nil), "k8s.io.client-go.pkg.api.v1.SecretList") + proto.RegisterType((*SecretProjection)(nil), "k8s.io.client-go.pkg.api.v1.SecretProjection") + proto.RegisterType((*SecretVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.SecretVolumeSource") + proto.RegisterType((*SecurityContext)(nil), "k8s.io.client-go.pkg.api.v1.SecurityContext") + proto.RegisterType((*SerializedReference)(nil), "k8s.io.client-go.pkg.api.v1.SerializedReference") + proto.RegisterType((*Service)(nil), "k8s.io.client-go.pkg.api.v1.Service") + proto.RegisterType((*ServiceAccount)(nil), "k8s.io.client-go.pkg.api.v1.ServiceAccount") + proto.RegisterType((*ServiceAccountList)(nil), "k8s.io.client-go.pkg.api.v1.ServiceAccountList") + proto.RegisterType((*ServiceList)(nil), "k8s.io.client-go.pkg.api.v1.ServiceList") + proto.RegisterType((*ServicePort)(nil), "k8s.io.client-go.pkg.api.v1.ServicePort") + proto.RegisterType((*ServiceProxyOptions)(nil), "k8s.io.client-go.pkg.api.v1.ServiceProxyOptions") + proto.RegisterType((*ServiceSpec)(nil), "k8s.io.client-go.pkg.api.v1.ServiceSpec") + proto.RegisterType((*ServiceStatus)(nil), "k8s.io.client-go.pkg.api.v1.ServiceStatus") + proto.RegisterType((*Sysctl)(nil), "k8s.io.client-go.pkg.api.v1.Sysctl") + proto.RegisterType((*TCPSocketAction)(nil), "k8s.io.client-go.pkg.api.v1.TCPSocketAction") + proto.RegisterType((*Taint)(nil), "k8s.io.client-go.pkg.api.v1.Taint") + proto.RegisterType((*Toleration)(nil), "k8s.io.client-go.pkg.api.v1.Toleration") + proto.RegisterType((*Volume)(nil), "k8s.io.client-go.pkg.api.v1.Volume") + proto.RegisterType((*VolumeMount)(nil), "k8s.io.client-go.pkg.api.v1.VolumeMount") + proto.RegisterType((*VolumeProjection)(nil), "k8s.io.client-go.pkg.api.v1.VolumeProjection") + proto.RegisterType((*VolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.VolumeSource") + proto.RegisterType((*VsphereVirtualDiskVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.VsphereVirtualDiskVolumeSource") + proto.RegisterType((*WeightedPodAffinityTerm)(nil), "k8s.io.client-go.pkg.api.v1.WeightedPodAffinityTerm") } func (m *AWSElasticBlockStoreVolumeSource) Marshal() (data []byte, err error) { size := m.Size() @@ -1564,6 +1646,42 @@ func (m *ConfigMap) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *ConfigMapEnvSource) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ConfigMapEnvSource) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.LocalObjectReference.Size())) + n10, err := m.LocalObjectReference.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n10 + if m.Optional != nil { + data[i] = 0x10 + i++ + if *m.Optional { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + func (m *ConfigMapKeySelector) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -1582,15 +1700,25 @@ func (m *ConfigMapKeySelector) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.LocalObjectReference.Size())) - n10, err := m.LocalObjectReference.MarshalTo(data[i:]) + n11, err := m.LocalObjectReference.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n10 + i += n11 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(len(m.Key))) i += copy(data[i:], m.Key) + if m.Optional != nil { + data[i] = 0x18 + i++ + if *m.Optional { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } return i, nil } @@ -1612,11 +1740,11 @@ func (m *ConfigMapList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n11, err := m.ListMeta.MarshalTo(data[i:]) + n12, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n11 + i += n12 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -1632,6 +1760,54 @@ func (m *ConfigMapList) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *ConfigMapProjection) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ConfigMapProjection) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.LocalObjectReference.Size())) + n13, err := m.LocalObjectReference.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n13 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Optional != nil { + data[i] = 0x20 + i++ + if *m.Optional { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + func (m *ConfigMapVolumeSource) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -1650,11 +1826,11 @@ func (m *ConfigMapVolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.LocalObjectReference.Size())) - n12, err := m.LocalObjectReference.MarshalTo(data[i:]) + n14, err := m.LocalObjectReference.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n12 + i += n14 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -1672,6 +1848,16 @@ func (m *ConfigMapVolumeSource) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintGenerated(data, i, uint64(*m.DefaultMode)) } + if m.Optional != nil { + data[i] = 0x20 + i++ + if *m.Optional { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } return i, nil } @@ -1759,11 +1945,11 @@ func (m *Container) MarshalTo(data []byte) (int, error) { data[i] = 0x42 i++ i = encodeVarintGenerated(data, i, uint64(m.Resources.Size())) - n13, err := m.Resources.MarshalTo(data[i:]) + n15, err := m.Resources.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n13 + i += n15 if len(m.VolumeMounts) > 0 { for _, msg := range m.VolumeMounts { data[i] = 0x4a @@ -1780,31 +1966,31 @@ func (m *Container) MarshalTo(data []byte) (int, error) { data[i] = 0x52 i++ i = encodeVarintGenerated(data, i, uint64(m.LivenessProbe.Size())) - n14, err := m.LivenessProbe.MarshalTo(data[i:]) + n16, err := m.LivenessProbe.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n14 + i += n16 } if m.ReadinessProbe != nil { data[i] = 0x5a i++ i = encodeVarintGenerated(data, i, uint64(m.ReadinessProbe.Size())) - n15, err := m.ReadinessProbe.MarshalTo(data[i:]) + n17, err := m.ReadinessProbe.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n15 + i += n17 } if m.Lifecycle != nil { data[i] = 0x62 i++ i = encodeVarintGenerated(data, i, uint64(m.Lifecycle.Size())) - n16, err := m.Lifecycle.MarshalTo(data[i:]) + n18, err := m.Lifecycle.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n16 + i += n18 } data[i] = 0x6a i++ @@ -1818,11 +2004,11 @@ func (m *Container) MarshalTo(data []byte) (int, error) { data[i] = 0x7a i++ i = encodeVarintGenerated(data, i, uint64(m.SecurityContext.Size())) - n17, err := m.SecurityContext.MarshalTo(data[i:]) + n19, err := m.SecurityContext.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n17 + i += n19 } data[i] = 0x80 i++ @@ -1854,6 +2040,26 @@ func (m *Container) MarshalTo(data []byte) (int, error) { data[i] = 0 } i++ + if len(m.EnvFrom) > 0 { + for _, msg := range m.EnvFrom { + data[i] = 0x9a + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + data[i] = 0xa2 + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.TerminationMessagePolicy))) + i += copy(data[i:], m.TerminationMessagePolicy) return i, nil } @@ -1948,31 +2154,31 @@ func (m *ContainerState) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Waiting.Size())) - n18, err := m.Waiting.MarshalTo(data[i:]) + n20, err := m.Waiting.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n18 + i += n20 } if m.Running != nil { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Running.Size())) - n19, err := m.Running.MarshalTo(data[i:]) + n21, err := m.Running.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n19 + i += n21 } if m.Terminated != nil { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Terminated.Size())) - n20, err := m.Terminated.MarshalTo(data[i:]) + n22, err := m.Terminated.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n20 + i += n22 } return i, nil } @@ -1995,11 +2201,11 @@ func (m *ContainerStateRunning) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.StartedAt.Size())) - n21, err := m.StartedAt.MarshalTo(data[i:]) + n23, err := m.StartedAt.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n21 + i += n23 return i, nil } @@ -2035,19 +2241,19 @@ func (m *ContainerStateTerminated) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(m.StartedAt.Size())) - n22, err := m.StartedAt.MarshalTo(data[i:]) + n24, err := m.StartedAt.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n22 + i += n24 data[i] = 0x32 i++ i = encodeVarintGenerated(data, i, uint64(m.FinishedAt.Size())) - n23, err := m.FinishedAt.MarshalTo(data[i:]) + n25, err := m.FinishedAt.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n23 + i += n25 data[i] = 0x3a i++ i = encodeVarintGenerated(data, i, uint64(len(m.ContainerID))) @@ -2103,19 +2309,19 @@ func (m *ContainerStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.State.Size())) - n24, err := m.State.MarshalTo(data[i:]) + n26, err := m.State.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n24 + i += n26 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.LastTerminationState.Size())) - n25, err := m.LastTerminationState.MarshalTo(data[i:]) + n27, err := m.LastTerminationState.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n25 + i += n27 data[i] = 0x20 i++ if m.Ready { @@ -2187,11 +2393,11 @@ func (m *DeleteOptions) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Preconditions.Size())) - n26, err := m.Preconditions.MarshalTo(data[i:]) + n28, err := m.Preconditions.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n26 + i += n28 } if m.OrphanDependents != nil { data[i] = 0x18 @@ -2203,6 +2409,42 @@ func (m *DeleteOptions) MarshalTo(data []byte) (int, error) { } i++ } + if m.PropagationPolicy != nil { + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(*m.PropagationPolicy))) + i += copy(data[i:], *m.PropagationPolicy) + } + return i, nil +} + +func (m *DownwardAPIProjection) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DownwardAPIProjection) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -2229,21 +2471,21 @@ func (m *DownwardAPIVolumeFile) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.FieldRef.Size())) - n27, err := m.FieldRef.MarshalTo(data[i:]) + n29, err := m.FieldRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n27 + i += n29 } if m.ResourceFieldRef != nil { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.ResourceFieldRef.Size())) - n28, err := m.ResourceFieldRef.MarshalTo(data[i:]) + n30, err := m.ResourceFieldRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n28 + i += n30 } if m.Mode != nil { data[i] = 0x20 @@ -2333,11 +2575,11 @@ func (m *EndpointAddress) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.TargetRef.Size())) - n29, err := m.TargetRef.MarshalTo(data[i:]) + n31, err := m.TargetRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n29 + i += n31 } data[i] = 0x1a i++ @@ -2453,11 +2695,11 @@ func (m *Endpoints) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n30, err := m.ObjectMeta.MarshalTo(data[i:]) + n32, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n30 + i += n32 if len(m.Subsets) > 0 { for _, msg := range m.Subsets { data[i] = 0x12 @@ -2491,11 +2733,11 @@ func (m *EndpointsList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n31, err := m.ListMeta.MarshalTo(data[i:]) + n33, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n31 + i += n33 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -2511,6 +2753,48 @@ func (m *EndpointsList) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *EnvFromSource) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *EnvFromSource) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Prefix))) + i += copy(data[i:], m.Prefix) + if m.ConfigMapRef != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.ConfigMapRef.Size())) + n34, err := m.ConfigMapRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n34 + } + if m.SecretRef != nil { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.SecretRef.Size())) + n35, err := m.SecretRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n35 + } + return i, nil +} + func (m *EnvVar) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -2538,11 +2822,11 @@ func (m *EnvVar) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.ValueFrom.Size())) - n32, err := m.ValueFrom.MarshalTo(data[i:]) + n36, err := m.ValueFrom.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n32 + i += n36 } return i, nil } @@ -2566,41 +2850,41 @@ func (m *EnvVarSource) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.FieldRef.Size())) - n33, err := m.FieldRef.MarshalTo(data[i:]) + n37, err := m.FieldRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n33 + i += n37 } if m.ResourceFieldRef != nil { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.ResourceFieldRef.Size())) - n34, err := m.ResourceFieldRef.MarshalTo(data[i:]) + n38, err := m.ResourceFieldRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n34 + i += n38 } if m.ConfigMapKeyRef != nil { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.ConfigMapKeyRef.Size())) - n35, err := m.ConfigMapKeyRef.MarshalTo(data[i:]) + n39, err := m.ConfigMapKeyRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n35 + i += n39 } if m.SecretKeyRef != nil { data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(m.SecretKeyRef.Size())) - n36, err := m.SecretKeyRef.MarshalTo(data[i:]) + n40, err := m.SecretKeyRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n36 + i += n40 } return i, nil } @@ -2623,19 +2907,19 @@ func (m *Event) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n37, err := m.ObjectMeta.MarshalTo(data[i:]) + n41, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n37 + i += n41 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.InvolvedObject.Size())) - n38, err := m.InvolvedObject.MarshalTo(data[i:]) + n42, err := m.InvolvedObject.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n38 + i += n42 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) @@ -2647,27 +2931,27 @@ func (m *Event) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(m.Source.Size())) - n39, err := m.Source.MarshalTo(data[i:]) + n43, err := m.Source.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n39 + i += n43 data[i] = 0x32 i++ i = encodeVarintGenerated(data, i, uint64(m.FirstTimestamp.Size())) - n40, err := m.FirstTimestamp.MarshalTo(data[i:]) + n44, err := m.FirstTimestamp.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n40 + i += n44 data[i] = 0x3a i++ i = encodeVarintGenerated(data, i, uint64(m.LastTimestamp.Size())) - n41, err := m.LastTimestamp.MarshalTo(data[i:]) + n45, err := m.LastTimestamp.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n41 + i += n45 data[i] = 0x40 i++ i = encodeVarintGenerated(data, i, uint64(m.Count)) @@ -2696,11 +2980,11 @@ func (m *EventList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n42, err := m.ListMeta.MarshalTo(data[i:]) + n46, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n42 + i += n46 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -2775,40 +3059,6 @@ func (m *ExecAction) MarshalTo(data []byte) (int, error) { 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) @@ -2886,11 +3136,11 @@ func (m *FlexVolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.SecretRef.Size())) - n43, err := m.SecretRef.MarshalTo(data[i:]) + n47, err := m.SecretRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n43 + i += n47 } data[i] = 0x20 i++ @@ -2939,6 +3189,10 @@ func (m *FlockerVolumeSource) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintGenerated(data, i, uint64(len(m.DatasetName))) i += copy(data[i:], m.DatasetName) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.DatasetUUID))) + i += copy(data[i:], m.DatasetUUID) return i, nil } @@ -3065,11 +3319,11 @@ func (m *HTTPGetAction) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Port.Size())) - n44, err := m.Port.MarshalTo(data[i:]) + n48, err := m.Port.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n44 + i += n48 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Host))) @@ -3138,31 +3392,31 @@ func (m *Handler) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Exec.Size())) - n45, err := m.Exec.MarshalTo(data[i:]) + n49, err := m.Exec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n45 + i += n49 } if m.HTTPGet != nil { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.HTTPGet.Size())) - n46, err := m.HTTPGet.MarshalTo(data[i:]) + n50, err := m.HTTPGet.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n46 + i += n50 } if m.TCPSocket != nil { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.TCPSocket.Size())) - n47, err := m.TCPSocket.MarshalTo(data[i:]) + n51, err := m.TCPSocket.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n47 + i += n51 } return i, nil } @@ -3231,6 +3485,21 @@ func (m *ISCSIVolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0 } i++ + if len(m.Portals) > 0 { + for _, s := range m.Portals { + data[i] = 0x3a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } return i, nil } @@ -3284,21 +3553,21 @@ func (m *Lifecycle) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.PostStart.Size())) - n48, err := m.PostStart.MarshalTo(data[i:]) + n52, err := m.PostStart.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n48 + i += n52 } if m.PreStop != nil { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.PreStop.Size())) - n49, err := m.PreStop.MarshalTo(data[i:]) + n53, err := m.PreStop.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n49 + i += n53 } return i, nil } @@ -3321,19 +3590,19 @@ func (m *LimitRange) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n50, err := m.ObjectMeta.MarshalTo(data[i:]) + n54, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n50 + i += n54 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n51, err := m.Spec.MarshalTo(data[i:]) + n55, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n51 + i += n55 return i, nil } @@ -3371,11 +3640,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n52, err := (&v).MarshalTo(data[i:]) + n56, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n52 + i += n56 } } if len(m.Min) > 0 { @@ -3393,11 +3662,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n53, err := (&v).MarshalTo(data[i:]) + n57, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n53 + i += n57 } } if len(m.Default) > 0 { @@ -3415,11 +3684,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n54, err := (&v).MarshalTo(data[i:]) + n58, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n54 + i += n58 } } if len(m.DefaultRequest) > 0 { @@ -3437,11 +3706,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n55, err := (&v).MarshalTo(data[i:]) + n59, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n55 + i += n59 } } if len(m.MaxLimitRequestRatio) > 0 { @@ -3459,11 +3728,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n56, err := (&v).MarshalTo(data[i:]) + n60, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n56 + i += n60 } } return i, nil @@ -3487,11 +3756,11 @@ func (m *LimitRangeList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n57, err := m.ListMeta.MarshalTo(data[i:]) + n61, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n57 + i += n61 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -3555,11 +3824,11 @@ func (m *List) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n58, err := m.ListMeta.MarshalTo(data[i:]) + n62, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n58 + i += n62 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -3748,27 +4017,27 @@ func (m *Namespace) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n59, err := m.ObjectMeta.MarshalTo(data[i:]) + n63, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n59 + i += n63 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n60, err := m.Spec.MarshalTo(data[i:]) + n64, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n60 + i += n64 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n61, err := m.Status.MarshalTo(data[i:]) + n65, err := m.Status.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n61 + i += n65 return i, nil } @@ -3790,11 +4059,11 @@ func (m *NamespaceList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n62, err := m.ListMeta.MarshalTo(data[i:]) + n66, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n62 + i += n66 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -3883,27 +4152,27 @@ func (m *Node) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n63, err := m.ObjectMeta.MarshalTo(data[i:]) + n67, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n63 + i += n67 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n64, err := m.Spec.MarshalTo(data[i:]) + n68, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n64 + i += n68 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n65, err := m.Status.MarshalTo(data[i:]) + n69, err := m.Status.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n65 + i += n69 return i, nil } @@ -3952,11 +4221,11 @@ func (m *NodeAffinity) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.RequiredDuringSchedulingIgnoredDuringExecution.Size())) - n66, err := m.RequiredDuringSchedulingIgnoredDuringExecution.MarshalTo(data[i:]) + n70, err := m.RequiredDuringSchedulingIgnoredDuringExecution.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n66 + i += n70 } if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 { for _, msg := range m.PreferredDuringSchedulingIgnoredDuringExecution { @@ -3999,19 +4268,19 @@ func (m *NodeCondition) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.LastHeartbeatTime.Size())) - n67, err := m.LastHeartbeatTime.MarshalTo(data[i:]) + n71, err := m.LastHeartbeatTime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n67 + i += n71 data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) - n68, err := m.LastTransitionTime.MarshalTo(data[i:]) + n72, err := m.LastTransitionTime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n68 + i += n72 data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) @@ -4041,11 +4310,11 @@ func (m *NodeDaemonEndpoints) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.KubeletEndpoint.Size())) - n69, err := m.KubeletEndpoint.MarshalTo(data[i:]) + n73, err := m.KubeletEndpoint.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n69 + i += n73 return i, nil } @@ -4067,11 +4336,11 @@ func (m *NodeList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n70, err := m.ListMeta.MarshalTo(data[i:]) + n74, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n70 + i += n74 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -4109,6 +4378,46 @@ func (m *NodeProxyOptions) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *NodeResources) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NodeResources) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Capacity) > 0 { + 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())) + n75, err := (&v).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n75 + } + } + return i, nil +} + func (m *NodeSelector) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -4245,6 +4554,18 @@ func (m *NodeSpec) MarshalTo(data []byte) (int, error) { data[i] = 0 } i++ + if len(m.Taints) > 0 { + for _, msg := range m.Taints { + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -4278,11 +4599,11 @@ func (m *NodeStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n71, err := (&v).MarshalTo(data[i:]) + n76, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n71 + i += n76 } } if len(m.Allocatable) > 0 { @@ -4300,11 +4621,11 @@ func (m *NodeStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n72, err := (&v).MarshalTo(data[i:]) + n77, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n72 + i += n77 } } data[i] = 0x1a @@ -4338,19 +4659,19 @@ func (m *NodeStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x32 i++ i = encodeVarintGenerated(data, i, uint64(m.DaemonEndpoints.Size())) - n73, err := m.DaemonEndpoints.MarshalTo(data[i:]) + n78, err := m.DaemonEndpoints.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n73 + i += n78 data[i] = 0x3a i++ i = encodeVarintGenerated(data, i, uint64(m.NodeInfo.Size())) - n74, err := m.NodeInfo.MarshalTo(data[i:]) + n79, err := m.NodeInfo.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n74 + i += n79 if len(m.Images) > 0 { for _, msg := range m.Images { data[i] = 0x42 @@ -4522,20 +4843,20 @@ func (m *ObjectMeta) MarshalTo(data []byte) (int, error) { data[i] = 0x42 i++ i = encodeVarintGenerated(data, i, uint64(m.CreationTimestamp.Size())) - n75, err := m.CreationTimestamp.MarshalTo(data[i:]) + n80, err := m.CreationTimestamp.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n75 + i += n80 if m.DeletionTimestamp != nil { data[i] = 0x4a i++ i = encodeVarintGenerated(data, i, uint64(m.DeletionTimestamp.Size())) - n76, err := m.DeletionTimestamp.MarshalTo(data[i:]) + n81, err := m.DeletionTimestamp.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n76 + i += n81 } if m.DeletionGracePeriodSeconds != nil { data[i] = 0x50 @@ -4656,50 +4977,6 @@ func (m *ObjectReference) MarshalTo(data []byte) (int, error) { 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) @@ -4718,27 +4995,27 @@ func (m *PersistentVolume) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n77, err := m.ObjectMeta.MarshalTo(data[i:]) + n82, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n77 + i += n82 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n78, err := m.Spec.MarshalTo(data[i:]) + n83, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n78 + i += n83 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n79, err := m.Status.MarshalTo(data[i:]) + n84, err := m.Status.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n79 + i += n84 return i, nil } @@ -4760,27 +5037,27 @@ func (m *PersistentVolumeClaim) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n80, err := m.ObjectMeta.MarshalTo(data[i:]) + n85, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n80 + i += n85 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n81, err := m.Spec.MarshalTo(data[i:]) + n86, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n81 + i += n86 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n82, err := m.Status.MarshalTo(data[i:]) + n87, err := m.Status.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n82 + i += n87 return i, nil } @@ -4802,11 +5079,11 @@ func (m *PersistentVolumeClaimList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n83, err := m.ListMeta.MarshalTo(data[i:]) + n88, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n83 + i += n88 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -4855,11 +5132,11 @@ func (m *PersistentVolumeClaimSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Resources.Size())) - n84, err := m.Resources.MarshalTo(data[i:]) + n89, err := m.Resources.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n84 + i += n89 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(len(m.VolumeName))) @@ -4868,11 +5145,17 @@ func (m *PersistentVolumeClaimSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(m.Selector.Size())) - n85, err := m.Selector.MarshalTo(data[i:]) + n90, err := m.Selector.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n85 + i += n90 + } + if m.StorageClassName != nil { + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(*m.StorageClassName))) + i += copy(data[i:], *m.StorageClassName) } return i, nil } @@ -4926,11 +5209,11 @@ func (m *PersistentVolumeClaimStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n86, err := (&v).MarshalTo(data[i:]) + n91, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n86 + i += n91 } } return i, nil @@ -4984,11 +5267,11 @@ func (m *PersistentVolumeList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n87, err := m.ListMeta.MarshalTo(data[i:]) + n92, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n87 + i += n92 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -5023,163 +5306,199 @@ func (m *PersistentVolumeSource) MarshalTo(data []byte) (int, error) { 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:]) + n93, err := m.GCEPersistentDisk.MarshalTo(data[i:]) if err != nil { return 0, err } i += n93 } - if m.ISCSI != nil { - data[i] = 0x3a + if m.AWSElasticBlockStore != nil { + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.ISCSI.Size())) - n94, err := m.ISCSI.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.AWSElasticBlockStore.Size())) + n94, err := m.AWSElasticBlockStore.MarshalTo(data[i:]) if err != nil { return 0, err } i += n94 } - if m.Cinder != nil { - data[i] = 0x42 + if m.HostPath != nil { + data[i] = 0x1a i++ - i = encodeVarintGenerated(data, i, uint64(m.Cinder.Size())) - n95, err := m.Cinder.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.HostPath.Size())) + n95, err := m.HostPath.MarshalTo(data[i:]) if err != nil { return 0, err } i += n95 } - if m.CephFS != nil { - data[i] = 0x4a + if m.Glusterfs != nil { + data[i] = 0x22 i++ - i = encodeVarintGenerated(data, i, uint64(m.CephFS.Size())) - n96, err := m.CephFS.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Glusterfs.Size())) + n96, err := m.Glusterfs.MarshalTo(data[i:]) if err != nil { return 0, err } i += n96 } - if m.FC != nil { - data[i] = 0x52 + if m.NFS != nil { + data[i] = 0x2a i++ - i = encodeVarintGenerated(data, i, uint64(m.FC.Size())) - n97, err := m.FC.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.NFS.Size())) + n97, err := m.NFS.MarshalTo(data[i:]) if err != nil { return 0, err } i += n97 } - if m.Flocker != nil { - data[i] = 0x5a + if m.RBD != nil { + data[i] = 0x32 i++ - i = encodeVarintGenerated(data, i, uint64(m.Flocker.Size())) - n98, err := m.Flocker.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.RBD.Size())) + n98, err := m.RBD.MarshalTo(data[i:]) if err != nil { return 0, err } i += n98 } - if m.FlexVolume != nil { - data[i] = 0x62 + if m.ISCSI != nil { + data[i] = 0x3a i++ - i = encodeVarintGenerated(data, i, uint64(m.FlexVolume.Size())) - n99, err := m.FlexVolume.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.ISCSI.Size())) + n99, err := m.ISCSI.MarshalTo(data[i:]) if err != nil { return 0, err } i += n99 } - if m.AzureFile != nil { - data[i] = 0x6a + if m.Cinder != nil { + data[i] = 0x42 i++ - i = encodeVarintGenerated(data, i, uint64(m.AzureFile.Size())) - n100, err := m.AzureFile.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Cinder.Size())) + n100, err := m.Cinder.MarshalTo(data[i:]) if err != nil { return 0, err } i += n100 } - if m.VsphereVolume != nil { - data[i] = 0x72 + if m.CephFS != nil { + data[i] = 0x4a i++ - i = encodeVarintGenerated(data, i, uint64(m.VsphereVolume.Size())) - n101, err := m.VsphereVolume.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.CephFS.Size())) + n101, err := m.CephFS.MarshalTo(data[i:]) if err != nil { return 0, err } i += n101 } - if m.Quobyte != nil { - data[i] = 0x7a + if m.FC != nil { + data[i] = 0x52 i++ - i = encodeVarintGenerated(data, i, uint64(m.Quobyte.Size())) - n102, err := m.Quobyte.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.FC.Size())) + n102, err := m.FC.MarshalTo(data[i:]) if err != nil { return 0, err } i += n102 } + if m.Flocker != nil { + data[i] = 0x5a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Flocker.Size())) + n103, err := m.Flocker.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n103 + } + if m.FlexVolume != nil { + data[i] = 0x62 + i++ + i = encodeVarintGenerated(data, i, uint64(m.FlexVolume.Size())) + n104, err := m.FlexVolume.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n104 + } + if m.AzureFile != nil { + data[i] = 0x6a + i++ + i = encodeVarintGenerated(data, i, uint64(m.AzureFile.Size())) + n105, err := m.AzureFile.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n105 + } + if m.VsphereVolume != nil { + data[i] = 0x72 + i++ + i = encodeVarintGenerated(data, i, uint64(m.VsphereVolume.Size())) + n106, err := m.VsphereVolume.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n106 + } + if m.Quobyte != nil { + data[i] = 0x7a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Quobyte.Size())) + n107, err := m.Quobyte.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n107 + } if m.AzureDisk != nil { data[i] = 0x82 i++ data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.AzureDisk.Size())) - n103, err := m.AzureDisk.MarshalTo(data[i:]) + n108, err := m.AzureDisk.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n103 + i += n108 + } + if m.PhotonPersistentDisk != nil { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(m.PhotonPersistentDisk.Size())) + n109, err := m.PhotonPersistentDisk.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n109 + } + if m.PortworxVolume != nil { + data[i] = 0x92 + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(m.PortworxVolume.Size())) + n110, err := m.PortworxVolume.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n110 + } + if m.ScaleIO != nil { + data[i] = 0x9a + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(m.ScaleIO.Size())) + n111, err := m.ScaleIO.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n111 } return i, nil } @@ -5214,21 +5533,21 @@ func (m *PersistentVolumeSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n104, err := (&v).MarshalTo(data[i:]) + n112, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n104 + i += n112 } } data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.PersistentVolumeSource.Size())) - n105, err := m.PersistentVolumeSource.MarshalTo(data[i:]) + n113, err := m.PersistentVolumeSource.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n105 + i += n113 if len(m.AccessModes) > 0 { for _, s := range m.AccessModes { data[i] = 0x1a @@ -5248,16 +5567,20 @@ func (m *PersistentVolumeSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(m.ClaimRef.Size())) - n106, err := m.ClaimRef.MarshalTo(data[i:]) + n114, err := m.ClaimRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n106 + i += n114 } data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(len(m.PersistentVolumeReclaimPolicy))) i += copy(data[i:], m.PersistentVolumeReclaimPolicy) + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.StorageClassName))) + i += copy(data[i:], m.StorageClassName) return i, nil } @@ -5291,6 +5614,32 @@ func (m *PersistentVolumeStatus) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *PhotonPersistentDiskVolumeSource) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PhotonPersistentDiskVolumeSource) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.PdID))) + i += copy(data[i:], m.PdID) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.FSType))) + i += copy(data[i:], m.FSType) + return i, nil +} + func (m *Pod) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -5309,27 +5658,27 @@ func (m *Pod) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n107, err := m.ObjectMeta.MarshalTo(data[i:]) + n115, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n107 + i += n115 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n108, err := m.Spec.MarshalTo(data[i:]) + n116, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n108 + i += n116 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n109, err := m.Status.MarshalTo(data[i:]) + n117, err := m.Status.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n109 + i += n117 return i, nil } @@ -5394,11 +5743,11 @@ func (m *PodAffinityTerm) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.LabelSelector.Size())) - n110, err := m.LabelSelector.MarshalTo(data[i:]) + n118, err := m.LabelSelector.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n110 + i += n118 } if len(m.Namespaces) > 0 { for _, s := range m.Namespaces { @@ -5544,19 +5893,19 @@ func (m *PodCondition) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.LastProbeTime.Size())) - n111, err := m.LastProbeTime.MarshalTo(data[i:]) + n119, err := m.LastProbeTime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n111 + i += n119 data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) - n112, err := m.LastTransitionTime.MarshalTo(data[i:]) + n120, err := m.LastTransitionTime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n112 + i += n120 data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) @@ -5655,11 +6004,11 @@ func (m *PodList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n113, err := m.ListMeta.MarshalTo(data[i:]) + n121, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n113 + i += n121 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -5719,11 +6068,11 @@ func (m *PodLogOptions) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(m.SinceTime.Size())) - n114, err := m.SinceTime.MarshalTo(data[i:]) + n122, err := m.SinceTime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n114 + i += n122 } data[i] = 0x30 i++ @@ -5746,6 +6095,31 @@ func (m *PodLogOptions) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *PodPortForwardOptions) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodPortForwardOptions) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Ports) > 0 { + for _, num := range m.Ports { + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(num)) + } + } + return i, nil +} + func (m *PodProxyOptions) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -5787,11 +6161,11 @@ func (m *PodSecurityContext) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.SELinuxOptions.Size())) - n115, err := m.SELinuxOptions.MarshalTo(data[i:]) + n123, err := m.SELinuxOptions.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n115 + i += n123 } if m.RunAsUser != nil { data[i] = 0x10 @@ -5842,11 +6216,11 @@ func (m *PodSignature) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.PodController.Size())) - n116, err := m.PodController.MarshalTo(data[i:]) + n124, err := m.PodController.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n116 + i += n124 } return i, nil } @@ -5965,11 +6339,11 @@ func (m *PodSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x72 i++ i = encodeVarintGenerated(data, i, uint64(m.SecurityContext.Size())) - n117, err := m.SecurityContext.MarshalTo(data[i:]) + n125, err := m.SecurityContext.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n117 + i += n125 } if len(m.ImagePullSecrets) > 0 { for _, msg := range m.ImagePullSecrets { @@ -5995,6 +6369,64 @@ func (m *PodSpec) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintGenerated(data, i, uint64(len(m.Subdomain))) i += copy(data[i:], m.Subdomain) + if m.Affinity != nil { + data[i] = 0x92 + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Affinity.Size())) + n126, err := m.Affinity.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n126 + } + data[i] = 0x9a + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.SchedulerName))) + i += copy(data[i:], m.SchedulerName) + if len(m.InitContainers) > 0 { + for _, msg := range m.InitContainers { + data[i] = 0xa2 + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.AutomountServiceAccountToken != nil { + data[i] = 0xa8 + i++ + data[i] = 0x1 + i++ + if *m.AutomountServiceAccountToken { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if len(m.Tolerations) > 0 { + for _, msg := range m.Tolerations { + data[i] = 0xb2 + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -6049,11 +6481,11 @@ func (m *PodStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintGenerated(data, i, uint64(m.StartTime.Size())) - n118, err := m.StartTime.MarshalTo(data[i:]) + n127, err := m.StartTime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n118 + i += n127 } if len(m.ContainerStatuses) > 0 { for _, msg := range m.ContainerStatuses { @@ -6067,6 +6499,22 @@ func (m *PodStatus) MarshalTo(data []byte) (int, error) { i += n } } + data[i] = 0x4a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.QOSClass))) + i += copy(data[i:], m.QOSClass) + if len(m.InitContainerStatuses) > 0 { + for _, msg := range m.InitContainerStatuses { + data[i] = 0x52 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -6088,19 +6536,19 @@ func (m *PodStatusResult) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n119, err := m.ObjectMeta.MarshalTo(data[i:]) + n128, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n119 + i += n128 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n120, err := m.Status.MarshalTo(data[i:]) + n129, err := m.Status.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n120 + i += n129 return i, nil } @@ -6122,19 +6570,19 @@ func (m *PodTemplate) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n121, err := m.ObjectMeta.MarshalTo(data[i:]) + n130, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n121 + i += n130 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) - n122, err := m.Template.MarshalTo(data[i:]) + n131, err := m.Template.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n122 + i += n131 return i, nil } @@ -6156,11 +6604,11 @@ func (m *PodTemplateList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n123, err := m.ListMeta.MarshalTo(data[i:]) + n132, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n123 + i += n132 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -6194,19 +6642,53 @@ func (m *PodTemplateSpec) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n124, err := m.ObjectMeta.MarshalTo(data[i:]) + n133, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n124 + i += n133 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n125, err := m.Spec.MarshalTo(data[i:]) + n134, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n125 + i += n134 + return i, nil +} + +func (m *PortworxVolumeSource) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PortworxVolumeSource) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.VolumeID))) + i += copy(data[i:], m.VolumeID) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.FSType))) + i += copy(data[i:], m.FSType) + data[i] = 0x18 + i++ + if m.ReadOnly { + data[i] = 1 + } else { + data[i] = 0 + } + i++ return i, nil } @@ -6252,19 +6734,19 @@ func (m *PreferAvoidPodsEntry) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.PodSignature.Size())) - n126, err := m.PodSignature.MarshalTo(data[i:]) + n135, err := m.PodSignature.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n126 + i += n135 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.EvictionTime.Size())) - n127, err := m.EvictionTime.MarshalTo(data[i:]) + n136, err := m.EvictionTime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n127 + i += n136 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) @@ -6297,11 +6779,11 @@ func (m *PreferredSchedulingTerm) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Preference.Size())) - n128, err := m.Preference.MarshalTo(data[i:]) + n137, err := m.Preference.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n128 + i += n137 return i, nil } @@ -6323,11 +6805,11 @@ func (m *Probe) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Handler.Size())) - n129, err := m.Handler.MarshalTo(data[i:]) + n138, err := m.Handler.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n129 + i += n138 data[i] = 0x10 i++ i = encodeVarintGenerated(data, i, uint64(m.InitialDelaySeconds)) @@ -6346,6 +6828,41 @@ func (m *Probe) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *ProjectedVolumeSource) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ProjectedVolumeSource) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Sources) > 0 { + for _, msg := range m.Sources { + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.DefaultMode != nil { + data[i] = 0x10 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.DefaultMode)) + } + return i, nil +} + func (m *QuobyteVolumeSource) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -6442,11 +6959,11 @@ func (m *RBDVolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintGenerated(data, i, uint64(m.SecretRef.Size())) - n130, err := m.SecretRef.MarshalTo(data[i:]) + n139, err := m.SecretRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n130 + i += n139 } data[i] = 0x40 i++ @@ -6477,11 +6994,11 @@ func (m *RangeAllocation) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n131, err := m.ObjectMeta.MarshalTo(data[i:]) + n140, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n131 + i += n140 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(len(m.Range))) @@ -6513,27 +7030,69 @@ func (m *ReplicationController) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n132, err := m.ObjectMeta.MarshalTo(data[i:]) + n141, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n132 + i += n141 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n133, err := m.Spec.MarshalTo(data[i:]) + n142, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n133 + i += n142 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n134, err := m.Status.MarshalTo(data[i:]) + n143, err := m.Status.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n134 + i += n143 + return i, nil +} + +func (m *ReplicationControllerCondition) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ReplicationControllerCondition) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Status))) + i += copy(data[i:], m.Status) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) + n144, err := m.LastTransitionTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n144 + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) + i += copy(data[i:], m.Reason) + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Message))) + i += copy(data[i:], m.Message) return i, nil } @@ -6555,11 +7114,11 @@ func (m *ReplicationControllerList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n135, err := m.ListMeta.MarshalTo(data[i:]) + n145, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n135 + i += n145 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -6616,12 +7175,15 @@ func (m *ReplicationControllerSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) - n136, err := m.Template.MarshalTo(data[i:]) + n146, err := m.Template.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n136 + i += n146 } + data[i] = 0x20 + i++ + i = encodeVarintGenerated(data, i, uint64(m.MinReadySeconds)) return i, nil } @@ -6652,6 +7214,21 @@ func (m *ReplicationControllerStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x20 i++ i = encodeVarintGenerated(data, i, uint64(m.ReadyReplicas)) + data[i] = 0x28 + i++ + i = encodeVarintGenerated(data, i, uint64(m.AvailableReplicas)) + if len(m.Conditions) > 0 { + for _, msg := range m.Conditions { + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -6681,11 +7258,11 @@ func (m *ResourceFieldSelector) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Divisor.Size())) - n137, err := m.Divisor.MarshalTo(data[i:]) + n147, err := m.Divisor.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n137 + i += n147 return i, nil } @@ -6707,27 +7284,27 @@ func (m *ResourceQuota) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n138, err := m.ObjectMeta.MarshalTo(data[i:]) + n148, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n138 + i += n148 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n139, err := m.Spec.MarshalTo(data[i:]) + n149, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n139 + i += n149 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n140, err := m.Status.MarshalTo(data[i:]) + n150, err := m.Status.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n140 + i += n150 return i, nil } @@ -6749,11 +7326,11 @@ func (m *ResourceQuotaList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n141, err := m.ListMeta.MarshalTo(data[i:]) + n151, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n141 + i += n151 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -6799,11 +7376,11 @@ func (m *ResourceQuotaSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n142, err := (&v).MarshalTo(data[i:]) + n152, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n142 + i += n152 } } if len(m.Scopes) > 0 { @@ -6854,11 +7431,11 @@ func (m *ResourceQuotaStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n143, err := (&v).MarshalTo(data[i:]) + n153, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n143 + i += n153 } } if len(m.Used) > 0 { @@ -6876,11 +7453,11 @@ func (m *ResourceQuotaStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n144, err := (&v).MarshalTo(data[i:]) + n154, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n144 + i += n154 } } return i, nil @@ -6916,11 +7493,11 @@ func (m *ResourceRequirements) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n145, err := (&v).MarshalTo(data[i:]) + n155, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n145 + i += n155 } } if len(m.Requests) > 0 { @@ -6938,11 +7515,11 @@ func (m *ResourceRequirements) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n146, err := (&v).MarshalTo(data[i:]) + n156, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n146 + i += n156 } } return i, nil @@ -6982,6 +7559,78 @@ func (m *SELinuxOptions) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *ScaleIOVolumeSource) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ScaleIOVolumeSource) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Gateway))) + i += copy(data[i:], m.Gateway) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.System))) + i += copy(data[i:], m.System) + if m.SecretRef != nil { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.SecretRef.Size())) + n157, err := m.SecretRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n157 + } + data[i] = 0x20 + i++ + if m.SSLEnabled { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ProtectionDomain))) + i += copy(data[i:], m.ProtectionDomain) + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.StoragePool))) + i += copy(data[i:], m.StoragePool) + data[i] = 0x3a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.StorageMode))) + i += copy(data[i:], m.StorageMode) + data[i] = 0x42 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.VolumeName))) + i += copy(data[i:], m.VolumeName) + data[i] = 0x4a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.FSType))) + i += copy(data[i:], m.FSType) + data[i] = 0x50 + i++ + if m.ReadOnly { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + return i, nil +} + func (m *Secret) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -7000,11 +7649,11 @@ func (m *Secret) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n147, err := m.ObjectMeta.MarshalTo(data[i:]) + n158, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n147 + i += n158 if len(m.Data) > 0 { for k := range m.Data { data[i] = 0x12 @@ -7046,6 +7695,42 @@ func (m *Secret) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *SecretEnvSource) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SecretEnvSource) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.LocalObjectReference.Size())) + n159, err := m.LocalObjectReference.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n159 + if m.Optional != nil { + data[i] = 0x10 + i++ + if *m.Optional { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + func (m *SecretKeySelector) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -7064,15 +7749,25 @@ func (m *SecretKeySelector) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.LocalObjectReference.Size())) - n148, err := m.LocalObjectReference.MarshalTo(data[i:]) + n160, err := m.LocalObjectReference.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n148 + i += n160 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(len(m.Key))) i += copy(data[i:], m.Key) + if m.Optional != nil { + data[i] = 0x18 + i++ + if *m.Optional { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } return i, nil } @@ -7094,11 +7789,11 @@ func (m *SecretList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n149, err := m.ListMeta.MarshalTo(data[i:]) + n161, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n149 + i += n161 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -7114,6 +7809,54 @@ func (m *SecretList) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *SecretProjection) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SecretProjection) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.LocalObjectReference.Size())) + n162, err := m.LocalObjectReference.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n162 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Optional != nil { + data[i] = 0x20 + i++ + if *m.Optional { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + func (m *SecretVolumeSource) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -7150,6 +7893,16 @@ func (m *SecretVolumeSource) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintGenerated(data, i, uint64(*m.DefaultMode)) } + if m.Optional != nil { + data[i] = 0x20 + i++ + if *m.Optional { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } return i, nil } @@ -7172,11 +7925,11 @@ func (m *SecurityContext) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Capabilities.Size())) - n150, err := m.Capabilities.MarshalTo(data[i:]) + n163, err := m.Capabilities.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n150 + i += n163 } if m.Privileged != nil { data[i] = 0x10 @@ -7192,11 +7945,11 @@ func (m *SecurityContext) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.SELinuxOptions.Size())) - n151, err := m.SELinuxOptions.MarshalTo(data[i:]) + n164, err := m.SELinuxOptions.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n151 + i += n164 } if m.RunAsUser != nil { data[i] = 0x20 @@ -7244,11 +7997,11 @@ func (m *SerializedReference) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Reference.Size())) - n152, err := m.Reference.MarshalTo(data[i:]) + n165, err := m.Reference.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n152 + i += n165 return i, nil } @@ -7270,27 +8023,27 @@ func (m *Service) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n153, err := m.ObjectMeta.MarshalTo(data[i:]) + n166, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n153 + i += n166 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n154, err := m.Spec.MarshalTo(data[i:]) + n167, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n154 + i += n167 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n155, err := m.Status.MarshalTo(data[i:]) + n168, err := m.Status.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n155 + i += n168 return i, nil } @@ -7312,11 +8065,11 @@ func (m *ServiceAccount) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n156, err := m.ObjectMeta.MarshalTo(data[i:]) + n169, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n156 + i += n169 if len(m.Secrets) > 0 { for _, msg := range m.Secrets { data[i] = 0x12 @@ -7341,6 +8094,16 @@ func (m *ServiceAccount) MarshalTo(data []byte) (int, error) { i += n } } + if m.AutomountServiceAccountToken != nil { + data[i] = 0x20 + i++ + if *m.AutomountServiceAccountToken { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } return i, nil } @@ -7362,11 +8125,11 @@ func (m *ServiceAccountList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n157, err := m.ListMeta.MarshalTo(data[i:]) + n170, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n157 + i += n170 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -7400,11 +8163,11 @@ func (m *ServiceList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n158, err := m.ListMeta.MarshalTo(data[i:]) + n171, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n158 + i += n171 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -7449,11 +8212,11 @@ func (m *ServicePort) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(m.TargetPort.Size())) - n159, err := m.TargetPort.MarshalTo(data[i:]) + n172, err := m.TargetPort.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n159 + i += n172 data[i] = 0x28 i++ i = encodeVarintGenerated(data, i, uint64(m.NodePort)) @@ -7612,11 +8375,37 @@ func (m *ServiceStatus) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.LoadBalancer.Size())) - n160, err := m.LoadBalancer.MarshalTo(data[i:]) + n173, err := m.LoadBalancer.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n160 + i += n173 + return i, nil +} + +func (m *Sysctl) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Sysctl) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Value))) + i += copy(data[i:], m.Value) return i, nil } @@ -7638,11 +8427,11 @@ func (m *TCPSocketAction) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Port.Size())) - n161, err := m.Port.MarshalTo(data[i:]) + n174, err := m.Port.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n161 + i += n174 return i, nil } @@ -7673,6 +8462,14 @@ func (m *Taint) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintGenerated(data, i, uint64(len(m.Effect))) i += copy(data[i:], m.Effect) + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(m.TimeAdded.Size())) + n175, err := m.TimeAdded.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n175 return i, nil } @@ -7707,6 +8504,11 @@ func (m *Toleration) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintGenerated(data, i, uint64(len(m.Effect))) i += copy(data[i:], m.Effect) + if m.TolerationSeconds != nil { + data[i] = 0x28 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.TolerationSeconds)) + } return i, nil } @@ -7732,11 +8534,11 @@ func (m *Volume) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.VolumeSource.Size())) - n162, err := m.VolumeSource.MarshalTo(data[i:]) + n176, err := m.VolumeSource.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n162 + i += n176 return i, nil } @@ -7778,6 +8580,54 @@ func (m *VolumeMount) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *VolumeProjection) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *VolumeProjection) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Secret != nil { + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.Secret.Size())) + n177, err := m.Secret.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n177 + } + if m.DownwardAPI != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.DownwardAPI.Size())) + n178, err := m.DownwardAPI.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n178 + } + if m.ConfigMap != nil { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.ConfigMap.Size())) + n179, err := m.ConfigMap.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n179 + } + return i, nil +} + func (m *VolumeSource) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -7797,151 +8647,151 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.HostPath.Size())) - n163, err := m.HostPath.MarshalTo(data[i:]) + n180, err := m.HostPath.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n163 + i += n180 } if m.EmptyDir != nil { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.EmptyDir.Size())) - n164, err := m.EmptyDir.MarshalTo(data[i:]) + n181, err := m.EmptyDir.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n164 + i += n181 } if m.GCEPersistentDisk != nil { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.GCEPersistentDisk.Size())) - n165, err := m.GCEPersistentDisk.MarshalTo(data[i:]) + n182, err := m.GCEPersistentDisk.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n165 + i += n182 } if m.AWSElasticBlockStore != nil { data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(m.AWSElasticBlockStore.Size())) - n166, err := m.AWSElasticBlockStore.MarshalTo(data[i:]) + n183, err := m.AWSElasticBlockStore.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n166 + i += n183 } if m.GitRepo != nil { data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(m.GitRepo.Size())) - n167, err := m.GitRepo.MarshalTo(data[i:]) + n184, err := m.GitRepo.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n167 + i += n184 } if m.Secret != nil { data[i] = 0x32 i++ i = encodeVarintGenerated(data, i, uint64(m.Secret.Size())) - n168, err := m.Secret.MarshalTo(data[i:]) + n185, err := m.Secret.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n168 + i += n185 } if m.NFS != nil { data[i] = 0x3a i++ i = encodeVarintGenerated(data, i, uint64(m.NFS.Size())) - n169, err := m.NFS.MarshalTo(data[i:]) + n186, err := m.NFS.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n169 + i += n186 } if m.ISCSI != nil { data[i] = 0x42 i++ i = encodeVarintGenerated(data, i, uint64(m.ISCSI.Size())) - n170, err := m.ISCSI.MarshalTo(data[i:]) + n187, err := m.ISCSI.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n170 + i += n187 } if m.Glusterfs != nil { data[i] = 0x4a i++ i = encodeVarintGenerated(data, i, uint64(m.Glusterfs.Size())) - n171, err := m.Glusterfs.MarshalTo(data[i:]) + n188, err := m.Glusterfs.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n171 + i += n188 } if m.PersistentVolumeClaim != nil { data[i] = 0x52 i++ i = encodeVarintGenerated(data, i, uint64(m.PersistentVolumeClaim.Size())) - n172, err := m.PersistentVolumeClaim.MarshalTo(data[i:]) + n189, err := m.PersistentVolumeClaim.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n172 + i += n189 } if m.RBD != nil { data[i] = 0x5a i++ i = encodeVarintGenerated(data, i, uint64(m.RBD.Size())) - n173, err := m.RBD.MarshalTo(data[i:]) + n190, err := m.RBD.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n173 + i += n190 } if m.FlexVolume != nil { data[i] = 0x62 i++ i = encodeVarintGenerated(data, i, uint64(m.FlexVolume.Size())) - n174, err := m.FlexVolume.MarshalTo(data[i:]) + n191, err := m.FlexVolume.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n174 + i += n191 } if m.Cinder != nil { data[i] = 0x6a i++ i = encodeVarintGenerated(data, i, uint64(m.Cinder.Size())) - n175, err := m.Cinder.MarshalTo(data[i:]) + n192, err := m.Cinder.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n175 + i += n192 } if m.CephFS != nil { data[i] = 0x72 i++ i = encodeVarintGenerated(data, i, uint64(m.CephFS.Size())) - n176, err := m.CephFS.MarshalTo(data[i:]) + n193, err := m.CephFS.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n176 + i += n193 } if m.Flocker != nil { data[i] = 0x7a i++ i = encodeVarintGenerated(data, i, uint64(m.Flocker.Size())) - n177, err := m.Flocker.MarshalTo(data[i:]) + n194, err := m.Flocker.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n177 + i += n194 } if m.DownwardAPI != nil { data[i] = 0x82 @@ -7949,11 +8799,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.DownwardAPI.Size())) - n178, err := m.DownwardAPI.MarshalTo(data[i:]) + n195, err := m.DownwardAPI.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n178 + i += n195 } if m.FC != nil { data[i] = 0x8a @@ -7961,11 +8811,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.FC.Size())) - n179, err := m.FC.MarshalTo(data[i:]) + n196, err := m.FC.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n179 + i += n196 } if m.AzureFile != nil { data[i] = 0x92 @@ -7973,11 +8823,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.AzureFile.Size())) - n180, err := m.AzureFile.MarshalTo(data[i:]) + n197, err := m.AzureFile.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n180 + i += n197 } if m.ConfigMap != nil { data[i] = 0x9a @@ -7985,11 +8835,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.ConfigMap.Size())) - n181, err := m.ConfigMap.MarshalTo(data[i:]) + n198, err := m.ConfigMap.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n181 + i += n198 } if m.VsphereVolume != nil { data[i] = 0xa2 @@ -7997,11 +8847,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.VsphereVolume.Size())) - n182, err := m.VsphereVolume.MarshalTo(data[i:]) + n199, err := m.VsphereVolume.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n182 + i += n199 } if m.Quobyte != nil { data[i] = 0xaa @@ -8009,11 +8859,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.Quobyte.Size())) - n183, err := m.Quobyte.MarshalTo(data[i:]) + n200, err := m.Quobyte.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n183 + i += n200 } if m.AzureDisk != nil { data[i] = 0xb2 @@ -8021,11 +8871,59 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.AzureDisk.Size())) - n184, err := m.AzureDisk.MarshalTo(data[i:]) + n201, err := m.AzureDisk.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n184 + i += n201 + } + if m.PhotonPersistentDisk != nil { + data[i] = 0xba + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(m.PhotonPersistentDisk.Size())) + n202, err := m.PhotonPersistentDisk.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n202 + } + if m.PortworxVolume != nil { + data[i] = 0xc2 + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(m.PortworxVolume.Size())) + n203, err := m.PortworxVolume.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n203 + } + if m.ScaleIO != nil { + data[i] = 0xca + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(m.ScaleIO.Size())) + n204, err := m.ScaleIO.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n204 + } + if m.Projected != nil { + data[i] = 0xd2 + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Projected.Size())) + n205, err := m.Projected.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n205 } return i, nil } @@ -8077,11 +8975,11 @@ func (m *WeightedPodAffinityTerm) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.PodAffinityTerm.Size())) - n185, err := m.PodAffinityTerm.MarshalTo(data[i:]) + n206, err := m.PodAffinityTerm.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n185 + i += n206 return i, nil } @@ -8316,6 +9214,17 @@ func (m *ConfigMap) Size() (n int) { return n } +func (m *ConfigMapEnvSource) Size() (n int) { + var l int + _ = l + l = m.LocalObjectReference.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.Optional != nil { + n += 2 + } + return n +} + func (m *ConfigMapKeySelector) Size() (n int) { var l int _ = l @@ -8323,6 +9232,9 @@ func (m *ConfigMapKeySelector) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.Key) n += 1 + l + sovGenerated(uint64(l)) + if m.Optional != nil { + n += 2 + } return n } @@ -8340,6 +9252,23 @@ func (m *ConfigMapList) Size() (n int) { return n } +func (m *ConfigMapProjection) Size() (n int) { + var l int + _ = l + l = m.LocalObjectReference.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.Optional != nil { + n += 2 + } + return n +} + func (m *ConfigMapVolumeSource) Size() (n int) { var l int _ = l @@ -8354,6 +9283,9 @@ func (m *ConfigMapVolumeSource) Size() (n int) { if m.DefaultMode != nil { n += 1 + sovGenerated(uint64(*m.DefaultMode)) } + if m.Optional != nil { + n += 2 + } return n } @@ -8421,6 +9353,14 @@ func (m *Container) Size() (n int) { n += 3 n += 3 n += 3 + if len(m.EnvFrom) > 0 { + for _, e := range m.EnvFrom { + l = e.Size() + n += 2 + l + sovGenerated(uint64(l)) + } + } + l = len(m.TerminationMessagePolicy) + n += 2 + l + sovGenerated(uint64(l)) return n } @@ -8545,6 +9485,22 @@ func (m *DeleteOptions) Size() (n int) { if m.OrphanDependents != nil { n += 2 } + if m.PropagationPolicy != nil { + l = len(*m.PropagationPolicy) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *DownwardAPIProjection) Size() (n int) { + var l int + _ = l + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -8671,6 +9627,22 @@ func (m *EndpointsList) Size() (n int) { return n } +func (m *EnvFromSource) Size() (n int) { + var l int + _ = l + l = len(m.Prefix) + n += 1 + l + sovGenerated(uint64(l)) + if m.ConfigMapRef != nil { + l = m.ConfigMapRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.SecretRef != nil { + l = m.SecretRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *EnvVar) Size() (n int) { var l int _ = l @@ -8766,14 +9738,6 @@ func (m *ExecAction) Size() (n int) { 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 @@ -8820,6 +9784,8 @@ func (m *FlockerVolumeSource) Size() (n int) { _ = l l = len(m.DatasetName) n += 1 + l + sovGenerated(uint64(l)) + l = len(m.DatasetUUID) + n += 1 + l + sovGenerated(uint64(l)) return n } @@ -8927,6 +9893,12 @@ func (m *ISCSIVolumeSource) Size() (n int) { l = len(m.FSType) n += 1 + l + sovGenerated(uint64(l)) n += 2 + if len(m.Portals) > 0 { + for _, s := range m.Portals { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -9249,6 +10221,21 @@ func (m *NodeProxyOptions) Size() (n int) { return n } +func (m *NodeResources) Size() (n int) { + var l int + _ = l + if len(m.Capacity) > 0 { + for k, v := range m.Capacity { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + return n +} + func (m *NodeSelector) Size() (n int) { var l int _ = l @@ -9299,6 +10286,12 @@ func (m *NodeSpec) Size() (n int) { l = len(m.ProviderID) n += 1 + l + sovGenerated(uint64(l)) n += 2 + if len(m.Taints) > 0 { + for _, e := range m.Taints { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -9476,23 +10469,6 @@ func (m *ObjectReference) Size() (n int) { 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 @@ -9548,6 +10524,10 @@ func (m *PersistentVolumeClaimSpec) Size() (n int) { l = m.Selector.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.StorageClassName != nil { + l = len(*m.StorageClassName) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -9664,6 +10644,18 @@ func (m *PersistentVolumeSource) Size() (n int) { l = m.AzureDisk.Size() n += 2 + l + sovGenerated(uint64(l)) } + if m.PhotonPersistentDisk != nil { + l = m.PhotonPersistentDisk.Size() + n += 2 + l + sovGenerated(uint64(l)) + } + if m.PortworxVolume != nil { + l = m.PortworxVolume.Size() + n += 2 + l + sovGenerated(uint64(l)) + } + if m.ScaleIO != nil { + l = m.ScaleIO.Size() + n += 2 + l + sovGenerated(uint64(l)) + } return n } @@ -9693,6 +10685,8 @@ func (m *PersistentVolumeSpec) Size() (n int) { } l = len(m.PersistentVolumeReclaimPolicy) n += 1 + l + sovGenerated(uint64(l)) + l = len(m.StorageClassName) + n += 1 + l + sovGenerated(uint64(l)) return n } @@ -9708,6 +10702,16 @@ func (m *PersistentVolumeStatus) Size() (n int) { return n } +func (m *PhotonPersistentDiskVolumeSource) Size() (n int) { + var l int + _ = l + l = len(m.PdID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.FSType) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *Pod) Size() (n int) { var l int _ = l @@ -9860,6 +10864,17 @@ func (m *PodLogOptions) Size() (n int) { return n } +func (m *PodPortForwardOptions) Size() (n int) { + var l int + _ = l + if len(m.Ports) > 0 { + for _, e := range m.Ports { + n += 1 + sovGenerated(uint64(e)) + } + } + return n +} + func (m *PodProxyOptions) Size() (n int) { var l int _ = l @@ -9958,6 +10973,27 @@ func (m *PodSpec) Size() (n int) { n += 2 + l + sovGenerated(uint64(l)) l = len(m.Subdomain) n += 2 + l + sovGenerated(uint64(l)) + if m.Affinity != nil { + l = m.Affinity.Size() + n += 2 + l + sovGenerated(uint64(l)) + } + l = len(m.SchedulerName) + n += 2 + l + sovGenerated(uint64(l)) + if len(m.InitContainers) > 0 { + for _, e := range m.InitContainers { + l = e.Size() + n += 2 + l + sovGenerated(uint64(l)) + } + } + if m.AutomountServiceAccountToken != nil { + n += 3 + } + if len(m.Tolerations) > 0 { + for _, e := range m.Tolerations { + l = e.Size() + n += 2 + l + sovGenerated(uint64(l)) + } + } return n } @@ -9990,6 +11026,14 @@ func (m *PodStatus) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + l = len(m.QOSClass) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.InitContainerStatuses) > 0 { + for _, e := range m.InitContainerStatuses { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -10037,6 +11081,17 @@ func (m *PodTemplateSpec) Size() (n int) { return n } +func (m *PortworxVolumeSource) Size() (n int) { + var l int + _ = l + l = len(m.VolumeID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.FSType) + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + return n +} + func (m *Preconditions) Size() (n int) { var l int _ = l @@ -10083,6 +11138,21 @@ func (m *Probe) Size() (n int) { return n } +func (m *ProjectedVolumeSource) Size() (n int) { + var l int + _ = l + if len(m.Sources) > 0 { + for _, e := range m.Sources { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.DefaultMode != nil { + n += 1 + sovGenerated(uint64(*m.DefaultMode)) + } + return n +} + func (m *QuobyteVolumeSource) Size() (n int) { var l int _ = l @@ -10151,6 +11221,22 @@ func (m *ReplicationController) Size() (n int) { return n } +func (m *ReplicationControllerCondition) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Status) + n += 1 + l + sovGenerated(uint64(l)) + l = m.LastTransitionTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *ReplicationControllerList) Size() (n int) { var l int _ = l @@ -10183,6 +11269,7 @@ func (m *ReplicationControllerSpec) Size() (n int) { l = m.Template.Size() n += 1 + l + sovGenerated(uint64(l)) } + n += 1 + sovGenerated(uint64(m.MinReadySeconds)) return n } @@ -10193,6 +11280,13 @@ func (m *ReplicationControllerStatus) Size() (n int) { n += 1 + sovGenerated(uint64(m.FullyLabeledReplicas)) n += 1 + sovGenerated(uint64(m.ObservedGeneration)) n += 1 + sovGenerated(uint64(m.ReadyReplicas)) + n += 1 + sovGenerated(uint64(m.AvailableReplicas)) + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -10317,6 +11411,32 @@ func (m *SELinuxOptions) Size() (n int) { return n } +func (m *ScaleIOVolumeSource) Size() (n int) { + var l int + _ = l + l = len(m.Gateway) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.System) + n += 1 + l + sovGenerated(uint64(l)) + if m.SecretRef != nil { + l = m.SecretRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + n += 2 + l = len(m.ProtectionDomain) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.StoragePool) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.StorageMode) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.VolumeName) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.FSType) + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + return n +} + func (m *Secret) Size() (n int) { var l int _ = l @@ -10343,6 +11463,17 @@ func (m *Secret) Size() (n int) { return n } +func (m *SecretEnvSource) Size() (n int) { + var l int + _ = l + l = m.LocalObjectReference.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.Optional != nil { + n += 2 + } + return n +} + func (m *SecretKeySelector) Size() (n int) { var l int _ = l @@ -10350,6 +11481,9 @@ func (m *SecretKeySelector) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.Key) n += 1 + l + sovGenerated(uint64(l)) + if m.Optional != nil { + n += 2 + } return n } @@ -10367,6 +11501,23 @@ func (m *SecretList) Size() (n int) { return n } +func (m *SecretProjection) Size() (n int) { + var l int + _ = l + l = m.LocalObjectReference.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.Optional != nil { + n += 2 + } + return n +} + func (m *SecretVolumeSource) Size() (n int) { var l int _ = l @@ -10381,6 +11532,9 @@ func (m *SecretVolumeSource) Size() (n int) { if m.DefaultMode != nil { n += 1 + sovGenerated(uint64(*m.DefaultMode)) } + if m.Optional != nil { + n += 2 + } return n } @@ -10447,6 +11601,9 @@ func (m *ServiceAccount) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if m.AutomountServiceAccountToken != nil { + n += 2 + } return n } @@ -10556,6 +11713,16 @@ func (m *ServiceStatus) Size() (n int) { return n } +func (m *Sysctl) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Value) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *TCPSocketAction) Size() (n int) { var l int _ = l @@ -10573,6 +11740,8 @@ func (m *Taint) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.Effect) n += 1 + l + sovGenerated(uint64(l)) + l = m.TimeAdded.Size() + n += 1 + l + sovGenerated(uint64(l)) return n } @@ -10587,6 +11756,9 @@ func (m *Toleration) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.Effect) n += 1 + l + sovGenerated(uint64(l)) + if m.TolerationSeconds != nil { + n += 1 + sovGenerated(uint64(*m.TolerationSeconds)) + } return n } @@ -10613,6 +11785,24 @@ func (m *VolumeMount) Size() (n int) { return n } +func (m *VolumeProjection) Size() (n int) { + var l int + _ = l + if m.Secret != nil { + l = m.Secret.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.DownwardAPI != nil { + l = m.DownwardAPI.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ConfigMap != nil { + l = m.ConfigMap.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *VolumeSource) Size() (n int) { var l int _ = l @@ -10704,6 +11894,22 @@ func (m *VolumeSource) Size() (n int) { l = m.AzureDisk.Size() n += 2 + l + sovGenerated(uint64(l)) } + if m.PhotonPersistentDisk != nil { + l = m.PhotonPersistentDisk.Size() + n += 2 + l + sovGenerated(uint64(l)) + } + if m.PortworxVolume != nil { + l = m.PortworxVolume.Size() + n += 2 + l + sovGenerated(uint64(l)) + } + if m.ScaleIO != nil { + l = m.ScaleIO.Size() + n += 2 + l + sovGenerated(uint64(l)) + } + if m.Projected != nil { + l = m.Projected.Size() + n += 2 + l + sovGenerated(uint64(l)) + } return n } @@ -10816,7 +12022,7 @@ func (this *Binding) String() string { return "nil" } s := strings.Join([]string{`&Binding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Target:` + strings.Replace(strings.Replace(this.Target.String(), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -10878,7 +12084,7 @@ func (this *ComponentStatus) String() string { return "nil" } s := strings.Join([]string{`&ComponentStatus{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ComponentCondition", "ComponentCondition", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -10889,7 +12095,7 @@ func (this *ComponentStatusList) String() string { return "nil" } s := strings.Join([]string{`&ComponentStatusList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ComponentStatus", "ComponentStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -10910,12 +12116,23 @@ func (this *ConfigMap) String() string { } mapStringForData += "}" s := strings.Join([]string{`&ConfigMap{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Data:` + mapStringForData + `,`, `}`, }, "") return s } +func (this *ConfigMapEnvSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ConfigMapEnvSource{`, + `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, + `Optional:` + valueToStringGenerated(this.Optional) + `,`, + `}`, + }, "") + return s +} func (this *ConfigMapKeySelector) String() string { if this == nil { return "nil" @@ -10923,6 +12140,7 @@ func (this *ConfigMapKeySelector) String() string { s := strings.Join([]string{`&ConfigMapKeySelector{`, `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Optional:` + valueToStringGenerated(this.Optional) + `,`, `}`, }, "") return s @@ -10932,12 +12150,24 @@ func (this *ConfigMapList) String() string { return "nil" } s := strings.Join([]string{`&ConfigMapList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ConfigMap", "ConfigMap", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } +func (this *ConfigMapProjection) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ConfigMapProjection{`, + `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "KeyToPath", "KeyToPath", 1), `&`, ``, 1) + `,`, + `Optional:` + valueToStringGenerated(this.Optional) + `,`, + `}`, + }, "") + return s +} func (this *ConfigMapVolumeSource) String() string { if this == nil { return "nil" @@ -10946,6 +12176,7 @@ func (this *ConfigMapVolumeSource) String() string { `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "KeyToPath", "KeyToPath", 1), `&`, ``, 1) + `,`, `DefaultMode:` + valueToStringGenerated(this.DefaultMode) + `,`, + `Optional:` + valueToStringGenerated(this.Optional) + `,`, `}`, }, "") return s @@ -10973,6 +12204,8 @@ func (this *Container) String() string { `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, `StdinOnce:` + fmt.Sprintf("%v", this.StdinOnce) + `,`, `TTY:` + fmt.Sprintf("%v", this.TTY) + `,`, + `EnvFrom:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EnvFrom), "EnvFromSource", "EnvFromSource", 1), `&`, ``, 1) + `,`, + `TerminationMessagePolicy:` + fmt.Sprintf("%v", this.TerminationMessagePolicy) + `,`, `}`, }, "") return s @@ -11019,7 +12252,7 @@ func (this *ContainerStateRunning) String() string { return "nil" } s := strings.Join([]string{`&ContainerStateRunning{`, - `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, + `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -11033,8 +12266,8 @@ func (this *ContainerStateTerminated) String() string { `Signal:` + fmt.Sprintf("%v", this.Signal) + `,`, `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, - `FinishedAt:` + strings.Replace(strings.Replace(this.FinishedAt.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, + `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, + `FinishedAt:` + strings.Replace(strings.Replace(this.FinishedAt.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `}`, }, "") @@ -11086,6 +12319,17 @@ func (this *DeleteOptions) String() string { `GracePeriodSeconds:` + valueToStringGenerated(this.GracePeriodSeconds) + `,`, `Preconditions:` + strings.Replace(fmt.Sprintf("%v", this.Preconditions), "Preconditions", "Preconditions", 1) + `,`, `OrphanDependents:` + valueToStringGenerated(this.OrphanDependents) + `,`, + `PropagationPolicy:` + valueToStringGenerated(this.PropagationPolicy) + `,`, + `}`, + }, "") + return s +} +func (this *DownwardAPIProjection) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DownwardAPIProjection{`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "DownwardAPIVolumeFile", "DownwardAPIVolumeFile", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -11166,7 +12410,7 @@ func (this *Endpoints) String() string { return "nil" } s := strings.Join([]string{`&Endpoints{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Subsets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subsets), "EndpointSubset", "EndpointSubset", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11177,12 +12421,24 @@ func (this *EndpointsList) String() string { return "nil" } s := strings.Join([]string{`&EndpointsList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Endpoints", "Endpoints", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } +func (this *EnvFromSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&EnvFromSource{`, + `Prefix:` + fmt.Sprintf("%v", this.Prefix) + `,`, + `ConfigMapRef:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMapRef), "ConfigMapEnvSource", "ConfigMapEnvSource", 1) + `,`, + `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "SecretEnvSource", "SecretEnvSource", 1) + `,`, + `}`, + }, "") + return s +} func (this *EnvVar) String() string { if this == nil { return "nil" @@ -11213,13 +12469,13 @@ func (this *Event) String() string { return "nil" } s := strings.Join([]string{`&Event{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `InvolvedObject:` + strings.Replace(strings.Replace(this.InvolvedObject.String(), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`, `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, `Source:` + strings.Replace(strings.Replace(this.Source.String(), "EventSource", "EventSource", 1), `&`, ``, 1) + `,`, - `FirstTimestamp:` + strings.Replace(strings.Replace(this.FirstTimestamp.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, - `LastTimestamp:` + strings.Replace(strings.Replace(this.LastTimestamp.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, + `FirstTimestamp:` + strings.Replace(strings.Replace(this.FirstTimestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, + `LastTimestamp:` + strings.Replace(strings.Replace(this.LastTimestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, `Count:` + fmt.Sprintf("%v", this.Count) + `,`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `}`, @@ -11231,7 +12487,7 @@ func (this *EventList) String() string { return "nil" } s := strings.Join([]string{`&EventList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Event", "Event", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11258,17 +12514,6 @@ func (this *ExecAction) String() string { }, "") return s } -func (this *ExportOptions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ExportOptions{`, - `Export:` + fmt.Sprintf("%v", this.Export) + `,`, - `Exact:` + fmt.Sprintf("%v", this.Exact) + `,`, - `}`, - }, "") - return s -} func (this *FCVolumeSource) String() string { if this == nil { return "nil" @@ -11312,6 +12557,7 @@ func (this *FlockerVolumeSource) String() string { } s := strings.Join([]string{`&FlockerVolumeSource{`, `DatasetName:` + fmt.Sprintf("%v", this.DatasetName) + `,`, + `DatasetUUID:` + fmt.Sprintf("%v", this.DatasetUUID) + `,`, `}`, }, "") return s @@ -11359,7 +12605,7 @@ func (this *HTTPGetAction) String() string { } s := strings.Join([]string{`&HTTPGetAction{`, `Path:` + fmt.Sprintf("%v", this.Path) + `,`, - `Port:` + strings.Replace(strings.Replace(this.Port.String(), "IntOrString", "k8s_io_kubernetes_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`, + `Port:` + strings.Replace(strings.Replace(this.Port.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`, `Host:` + fmt.Sprintf("%v", this.Host) + `,`, `Scheme:` + fmt.Sprintf("%v", this.Scheme) + `,`, `HTTPHeaders:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.HTTPHeaders), "HTTPHeader", "HTTPHeader", 1), `&`, ``, 1) + `,`, @@ -11411,6 +12657,7 @@ func (this *ISCSIVolumeSource) String() string { `ISCSIInterface:` + fmt.Sprintf("%v", this.ISCSIInterface) + `,`, `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`, `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, + `Portals:` + fmt.Sprintf("%v", this.Portals) + `,`, `}`, }, "") return s @@ -11443,7 +12690,7 @@ func (this *LimitRange) String() string { return "nil" } s := strings.Join([]string{`&LimitRange{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "LimitRangeSpec", "LimitRangeSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11519,7 +12766,7 @@ func (this *LimitRangeList) String() string { return "nil" } s := strings.Join([]string{`&LimitRangeList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "LimitRange", "LimitRange", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11540,8 +12787,8 @@ func (this *List) String() string { return "nil" } s := strings.Join([]string{`&List{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RawExtension", "k8s_io_kubernetes_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -11608,7 +12855,7 @@ func (this *Namespace) String() string { return "nil" } s := strings.Join([]string{`&Namespace{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NamespaceSpec", "NamespaceSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NamespaceStatus", "NamespaceStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -11620,7 +12867,7 @@ func (this *NamespaceList) String() string { return "nil" } s := strings.Join([]string{`&NamespaceList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11651,7 +12898,7 @@ func (this *Node) String() string { return "nil" } s := strings.Join([]string{`&Node{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NodeSpec", "NodeSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NodeStatus", "NodeStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -11687,8 +12934,8 @@ func (this *NodeCondition) String() string { s := strings.Join([]string{`&NodeCondition{`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastHeartbeatTime:` + strings.Replace(strings.Replace(this.LastHeartbeatTime.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, + `LastHeartbeatTime:` + strings.Replace(strings.Replace(this.LastHeartbeatTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, + `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, `}`, @@ -11710,7 +12957,7 @@ func (this *NodeList) String() string { return "nil" } s := strings.Join([]string{`&NodeList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Node", "Node", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11726,6 +12973,26 @@ func (this *NodeProxyOptions) String() string { }, "") return s } +func (this *NodeResources) String() string { + if this == nil { + return "nil" + } + keysForCapacity := make([]string, 0, len(this.Capacity)) + for k := range this.Capacity { + keysForCapacity = append(keysForCapacity, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + mapStringForCapacity := "ResourceList{" + for _, k := range keysForCapacity { + mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[ResourceName(k)]) + } + mapStringForCapacity += "}" + s := strings.Join([]string{`&NodeResources{`, + `Capacity:` + mapStringForCapacity + `,`, + `}`, + }, "") + return s +} func (this *NodeSelector) String() string { if this == nil { return "nil" @@ -11767,6 +13034,7 @@ func (this *NodeSpec) String() string { `ExternalID:` + fmt.Sprintf("%v", this.ExternalID) + `,`, `ProviderID:` + fmt.Sprintf("%v", this.ProviderID) + `,`, `Unschedulable:` + fmt.Sprintf("%v", this.Unschedulable) + `,`, + `Taints:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Taints), "Taint", "Taint", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -11872,12 +13140,12 @@ func (this *ObjectMeta) String() string { `UID:` + fmt.Sprintf("%v", this.UID) + `,`, `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`, - `CreationTimestamp:` + strings.Replace(strings.Replace(this.CreationTimestamp.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, - `DeletionTimestamp:` + strings.Replace(fmt.Sprintf("%v", this.DeletionTimestamp), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1) + `,`, + `CreationTimestamp:` + strings.Replace(strings.Replace(this.CreationTimestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, + `DeletionTimestamp:` + strings.Replace(fmt.Sprintf("%v", this.DeletionTimestamp), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`, `DeletionGracePeriodSeconds:` + valueToStringGenerated(this.DeletionGracePeriodSeconds) + `,`, `Labels:` + mapStringForLabels + `,`, `Annotations:` + mapStringForAnnotations + `,`, - `OwnerReferences:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.OwnerReferences), "OwnerReference", "OwnerReference", 1), `&`, ``, 1) + `,`, + `OwnerReferences:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.OwnerReferences), "OwnerReference", "k8s_io_apimachinery_pkg_apis_meta_v1.OwnerReference", 1), `&`, ``, 1) + `,`, `Finalizers:` + fmt.Sprintf("%v", this.Finalizers) + `,`, `ClusterName:` + fmt.Sprintf("%v", this.ClusterName) + `,`, `}`, @@ -11900,26 +13168,12 @@ func (this *ObjectReference) String() string { }, "") return s } -func (this *OwnerReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OwnerReference{`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, - `Controller:` + valueToStringGenerated(this.Controller) + `,`, - `}`, - }, "") - return s -} func (this *PersistentVolume) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&PersistentVolume{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PersistentVolumeSpec", "PersistentVolumeSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PersistentVolumeStatus", "PersistentVolumeStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -11931,7 +13185,7 @@ func (this *PersistentVolumeClaim) String() string { return "nil" } s := strings.Join([]string{`&PersistentVolumeClaim{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PersistentVolumeClaimSpec", "PersistentVolumeClaimSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PersistentVolumeClaimStatus", "PersistentVolumeClaimStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -11943,7 +13197,7 @@ func (this *PersistentVolumeClaimList) String() string { return "nil" } s := strings.Join([]string{`&PersistentVolumeClaimList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PersistentVolumeClaim", "PersistentVolumeClaim", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11957,7 +13211,8 @@ func (this *PersistentVolumeClaimSpec) String() string { `AccessModes:` + fmt.Sprintf("%v", this.AccessModes) + `,`, `Resources:` + strings.Replace(strings.Replace(this.Resources.String(), "ResourceRequirements", "ResourceRequirements", 1), `&`, ``, 1) + `,`, `VolumeName:` + fmt.Sprintf("%v", this.VolumeName) + `,`, - `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_kubernetes_pkg_api_unversioned.LabelSelector", 1) + `,`, + `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, + `StorageClassName:` + valueToStringGenerated(this.StorageClassName) + `,`, `}`, }, "") return s @@ -12000,7 +13255,7 @@ func (this *PersistentVolumeList) String() string { return "nil" } s := strings.Join([]string{`&PersistentVolumeList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PersistentVolume", "PersistentVolume", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12027,6 +13282,9 @@ func (this *PersistentVolumeSource) String() string { `VsphereVolume:` + strings.Replace(fmt.Sprintf("%v", this.VsphereVolume), "VsphereVirtualDiskVolumeSource", "VsphereVirtualDiskVolumeSource", 1) + `,`, `Quobyte:` + strings.Replace(fmt.Sprintf("%v", this.Quobyte), "QuobyteVolumeSource", "QuobyteVolumeSource", 1) + `,`, `AzureDisk:` + strings.Replace(fmt.Sprintf("%v", this.AzureDisk), "AzureDiskVolumeSource", "AzureDiskVolumeSource", 1) + `,`, + `PhotonPersistentDisk:` + strings.Replace(fmt.Sprintf("%v", this.PhotonPersistentDisk), "PhotonPersistentDiskVolumeSource", "PhotonPersistentDiskVolumeSource", 1) + `,`, + `PortworxVolume:` + strings.Replace(fmt.Sprintf("%v", this.PortworxVolume), "PortworxVolumeSource", "PortworxVolumeSource", 1) + `,`, + `ScaleIO:` + strings.Replace(fmt.Sprintf("%v", this.ScaleIO), "ScaleIOVolumeSource", "ScaleIOVolumeSource", 1) + `,`, `}`, }, "") return s @@ -12051,6 +13309,7 @@ func (this *PersistentVolumeSpec) String() string { `AccessModes:` + fmt.Sprintf("%v", this.AccessModes) + `,`, `ClaimRef:` + strings.Replace(fmt.Sprintf("%v", this.ClaimRef), "ObjectReference", "ObjectReference", 1) + `,`, `PersistentVolumeReclaimPolicy:` + fmt.Sprintf("%v", this.PersistentVolumeReclaimPolicy) + `,`, + `StorageClassName:` + fmt.Sprintf("%v", this.StorageClassName) + `,`, `}`, }, "") return s @@ -12067,12 +13326,23 @@ func (this *PersistentVolumeStatus) String() string { }, "") return s } +func (this *PhotonPersistentDiskVolumeSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PhotonPersistentDiskVolumeSource{`, + `PdID:` + fmt.Sprintf("%v", this.PdID) + `,`, + `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`, + `}`, + }, "") + return s +} func (this *Pod) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Pod{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSpec", "PodSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodStatus", "PodStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12095,7 +13365,7 @@ func (this *PodAffinityTerm) String() string { return "nil" } s := strings.Join([]string{`&PodAffinityTerm{`, - `LabelSelector:` + strings.Replace(fmt.Sprintf("%v", this.LabelSelector), "LabelSelector", "k8s_io_kubernetes_pkg_api_unversioned.LabelSelector", 1) + `,`, + `LabelSelector:` + strings.Replace(fmt.Sprintf("%v", this.LabelSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, `Namespaces:` + fmt.Sprintf("%v", this.Namespaces) + `,`, `TopologyKey:` + fmt.Sprintf("%v", this.TopologyKey) + `,`, `}`, @@ -12134,8 +13404,8 @@ func (this *PodCondition) String() string { s := strings.Join([]string{`&PodCondition{`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastProbeTime:` + strings.Replace(strings.Replace(this.LastProbeTime.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, + `LastProbeTime:` + strings.Replace(strings.Replace(this.LastProbeTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, + `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, `}`, @@ -12162,7 +13432,7 @@ func (this *PodList) String() string { return "nil" } s := strings.Join([]string{`&PodList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Pod", "Pod", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12177,7 +13447,7 @@ func (this *PodLogOptions) String() string { `Follow:` + fmt.Sprintf("%v", this.Follow) + `,`, `Previous:` + fmt.Sprintf("%v", this.Previous) + `,`, `SinceSeconds:` + valueToStringGenerated(this.SinceSeconds) + `,`, - `SinceTime:` + strings.Replace(fmt.Sprintf("%v", this.SinceTime), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1) + `,`, + `SinceTime:` + strings.Replace(fmt.Sprintf("%v", this.SinceTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`, `Timestamps:` + fmt.Sprintf("%v", this.Timestamps) + `,`, `TailLines:` + valueToStringGenerated(this.TailLines) + `,`, `LimitBytes:` + valueToStringGenerated(this.LimitBytes) + `,`, @@ -12185,6 +13455,16 @@ func (this *PodLogOptions) String() string { }, "") return s } +func (this *PodPortForwardOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodPortForwardOptions{`, + `Ports:` + fmt.Sprintf("%v", this.Ports) + `,`, + `}`, + }, "") + return s +} func (this *PodProxyOptions) String() string { if this == nil { return "nil" @@ -12214,7 +13494,7 @@ func (this *PodSignature) String() string { return "nil" } s := strings.Join([]string{`&PodSignature{`, - `PodController:` + strings.Replace(fmt.Sprintf("%v", this.PodController), "OwnerReference", "OwnerReference", 1) + `,`, + `PodController:` + strings.Replace(fmt.Sprintf("%v", this.PodController), "OwnerReference", "k8s_io_apimachinery_pkg_apis_meta_v1.OwnerReference", 1) + `,`, `}`, }, "") return s @@ -12251,6 +13531,11 @@ func (this *PodSpec) String() string { `ImagePullSecrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ImagePullSecrets), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`, `Subdomain:` + fmt.Sprintf("%v", this.Subdomain) + `,`, + `Affinity:` + strings.Replace(fmt.Sprintf("%v", this.Affinity), "Affinity", "Affinity", 1) + `,`, + `SchedulerName:` + fmt.Sprintf("%v", this.SchedulerName) + `,`, + `InitContainers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.InitContainers), "Container", "Container", 1), `&`, ``, 1) + `,`, + `AutomountServiceAccountToken:` + valueToStringGenerated(this.AutomountServiceAccountToken) + `,`, + `Tolerations:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Tolerations), "Toleration", "Toleration", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -12266,8 +13551,10 @@ func (this *PodStatus) String() string { `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `HostIP:` + fmt.Sprintf("%v", this.HostIP) + `,`, `PodIP:` + fmt.Sprintf("%v", this.PodIP) + `,`, - `StartTime:` + strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1) + `,`, + `StartTime:` + strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`, `ContainerStatuses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ContainerStatuses), "ContainerStatus", "ContainerStatus", 1), `&`, ``, 1) + `,`, + `QOSClass:` + fmt.Sprintf("%v", this.QOSClass) + `,`, + `InitContainerStatuses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.InitContainerStatuses), "ContainerStatus", "ContainerStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -12277,7 +13564,7 @@ func (this *PodStatusResult) String() string { return "nil" } s := strings.Join([]string{`&PodStatusResult{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodStatus", "PodStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12288,7 +13575,7 @@ func (this *PodTemplate) String() string { return "nil" } s := strings.Join([]string{`&PodTemplate{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "PodTemplateSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12299,7 +13586,7 @@ func (this *PodTemplateList) String() string { return "nil" } s := strings.Join([]string{`&PodTemplateList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodTemplate", "PodTemplate", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12310,12 +13597,24 @@ func (this *PodTemplateSpec) String() string { return "nil" } s := strings.Join([]string{`&PodTemplateSpec{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSpec", "PodSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } +func (this *PortworxVolumeSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PortworxVolumeSource{`, + `VolumeID:` + fmt.Sprintf("%v", this.VolumeID) + `,`, + `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`, + `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, + `}`, + }, "") + return s +} func (this *Preconditions) String() string { if this == nil { return "nil" @@ -12332,7 +13631,7 @@ func (this *PreferAvoidPodsEntry) String() string { } s := strings.Join([]string{`&PreferAvoidPodsEntry{`, `PodSignature:` + strings.Replace(strings.Replace(this.PodSignature.String(), "PodSignature", "PodSignature", 1), `&`, ``, 1) + `,`, - `EvictionTime:` + strings.Replace(strings.Replace(this.EvictionTime.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, + `EvictionTime:` + strings.Replace(strings.Replace(this.EvictionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, `}`, @@ -12365,6 +13664,17 @@ func (this *Probe) String() string { }, "") return s } +func (this *ProjectedVolumeSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProjectedVolumeSource{`, + `Sources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Sources), "VolumeProjection", "VolumeProjection", 1), `&`, ``, 1) + `,`, + `DefaultMode:` + valueToStringGenerated(this.DefaultMode) + `,`, + `}`, + }, "") + return s +} func (this *QuobyteVolumeSource) String() string { if this == nil { return "nil" @@ -12401,7 +13711,7 @@ func (this *RangeAllocation) String() string { return "nil" } s := strings.Join([]string{`&RangeAllocation{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Range:` + fmt.Sprintf("%v", this.Range) + `,`, `Data:` + valueToStringGenerated(this.Data) + `,`, `}`, @@ -12413,19 +13723,33 @@ func (this *ReplicationController) String() string { return "nil" } s := strings.Join([]string{`&ReplicationController{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicationControllerSpec", "ReplicationControllerSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicationControllerStatus", "ReplicationControllerStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } +func (this *ReplicationControllerCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ReplicationControllerCondition{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `}`, + }, "") + return s +} func (this *ReplicationControllerList) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ReplicationControllerList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ReplicationController", "ReplicationController", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12449,6 +13773,7 @@ func (this *ReplicationControllerSpec) String() string { `Replicas:` + valueToStringGenerated(this.Replicas) + `,`, `Selector:` + mapStringForSelector + `,`, `Template:` + strings.Replace(fmt.Sprintf("%v", this.Template), "PodTemplateSpec", "PodTemplateSpec", 1) + `,`, + `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`, `}`, }, "") return s @@ -12462,6 +13787,8 @@ func (this *ReplicationControllerStatus) String() string { `FullyLabeledReplicas:` + fmt.Sprintf("%v", this.FullyLabeledReplicas) + `,`, `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`, + `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`, + `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ReplicationControllerCondition", "ReplicationControllerCondition", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -12473,7 +13800,7 @@ func (this *ResourceFieldSelector) String() string { s := strings.Join([]string{`&ResourceFieldSelector{`, `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, - `Divisor:` + strings.Replace(strings.Replace(this.Divisor.String(), "Quantity", "k8s_io_kubernetes_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, + `Divisor:` + strings.Replace(strings.Replace(this.Divisor.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -12483,7 +13810,7 @@ func (this *ResourceQuota) String() string { return "nil" } s := strings.Join([]string{`&ResourceQuota{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceQuotaSpec", "ResourceQuotaSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceQuotaStatus", "ResourceQuotaStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12495,7 +13822,7 @@ func (this *ResourceQuotaList) String() string { return "nil" } s := strings.Join([]string{`&ResourceQuotaList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ResourceQuota", "ResourceQuota", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12597,6 +13924,25 @@ func (this *SELinuxOptions) String() string { }, "") return s } +func (this *ScaleIOVolumeSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ScaleIOVolumeSource{`, + `Gateway:` + fmt.Sprintf("%v", this.Gateway) + `,`, + `System:` + fmt.Sprintf("%v", this.System) + `,`, + `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "LocalObjectReference", 1) + `,`, + `SSLEnabled:` + fmt.Sprintf("%v", this.SSLEnabled) + `,`, + `ProtectionDomain:` + fmt.Sprintf("%v", this.ProtectionDomain) + `,`, + `StoragePool:` + fmt.Sprintf("%v", this.StoragePool) + `,`, + `StorageMode:` + fmt.Sprintf("%v", this.StorageMode) + `,`, + `VolumeName:` + fmt.Sprintf("%v", this.VolumeName) + `,`, + `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`, + `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, + `}`, + }, "") + return s +} func (this *Secret) String() string { if this == nil { return "nil" @@ -12622,7 +13968,7 @@ func (this *Secret) String() string { } mapStringForStringData += "}" s := strings.Join([]string{`&Secret{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Data:` + mapStringForData + `,`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `StringData:` + mapStringForStringData + `,`, @@ -12630,6 +13976,17 @@ func (this *Secret) String() string { }, "") return s } +func (this *SecretEnvSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SecretEnvSource{`, + `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, + `Optional:` + valueToStringGenerated(this.Optional) + `,`, + `}`, + }, "") + return s +} func (this *SecretKeySelector) String() string { if this == nil { return "nil" @@ -12637,6 +13994,7 @@ func (this *SecretKeySelector) String() string { s := strings.Join([]string{`&SecretKeySelector{`, `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Optional:` + valueToStringGenerated(this.Optional) + `,`, `}`, }, "") return s @@ -12646,12 +14004,24 @@ func (this *SecretList) String() string { return "nil" } s := strings.Join([]string{`&SecretList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Secret", "Secret", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } +func (this *SecretProjection) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SecretProjection{`, + `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "KeyToPath", "KeyToPath", 1), `&`, ``, 1) + `,`, + `Optional:` + valueToStringGenerated(this.Optional) + `,`, + `}`, + }, "") + return s +} func (this *SecretVolumeSource) String() string { if this == nil { return "nil" @@ -12660,6 +14030,7 @@ func (this *SecretVolumeSource) String() string { `SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "KeyToPath", "KeyToPath", 1), `&`, ``, 1) + `,`, `DefaultMode:` + valueToStringGenerated(this.DefaultMode) + `,`, + `Optional:` + valueToStringGenerated(this.Optional) + `,`, `}`, }, "") return s @@ -12694,7 +14065,7 @@ func (this *Service) String() string { return "nil" } s := strings.Join([]string{`&Service{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ServiceSpec", "ServiceSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ServiceStatus", "ServiceStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12706,9 +14077,10 @@ func (this *ServiceAccount) String() string { return "nil" } s := strings.Join([]string{`&ServiceAccount{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Secrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Secrets), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`, `ImagePullSecrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ImagePullSecrets), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, + `AutomountServiceAccountToken:` + valueToStringGenerated(this.AutomountServiceAccountToken) + `,`, `}`, }, "") return s @@ -12718,7 +14090,7 @@ func (this *ServiceAccountList) String() string { return "nil" } s := strings.Join([]string{`&ServiceAccountList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ServiceAccount", "ServiceAccount", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12729,7 +14101,7 @@ func (this *ServiceList) String() string { return "nil" } s := strings.Join([]string{`&ServiceList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Service", "Service", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12743,7 +14115,7 @@ func (this *ServicePort) String() string { `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, `Port:` + fmt.Sprintf("%v", this.Port) + `,`, - `TargetPort:` + strings.Replace(strings.Replace(this.TargetPort.String(), "IntOrString", "k8s_io_kubernetes_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`, + `TargetPort:` + strings.Replace(strings.Replace(this.TargetPort.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`, `NodePort:` + fmt.Sprintf("%v", this.NodePort) + `,`, `}`, }, "") @@ -12798,12 +14170,23 @@ func (this *ServiceStatus) String() string { }, "") return s } +func (this *Sysctl) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Sysctl{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} func (this *TCPSocketAction) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&TCPSocketAction{`, - `Port:` + strings.Replace(strings.Replace(this.Port.String(), "IntOrString", "k8s_io_kubernetes_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`, + `Port:` + strings.Replace(strings.Replace(this.Port.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -12816,6 +14199,7 @@ func (this *Taint) String() string { `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `Value:` + fmt.Sprintf("%v", this.Value) + `,`, `Effect:` + fmt.Sprintf("%v", this.Effect) + `,`, + `TimeAdded:` + strings.Replace(strings.Replace(this.TimeAdded.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -12829,6 +14213,7 @@ func (this *Toleration) String() string { `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`, `Value:` + fmt.Sprintf("%v", this.Value) + `,`, `Effect:` + fmt.Sprintf("%v", this.Effect) + `,`, + `TolerationSeconds:` + valueToStringGenerated(this.TolerationSeconds) + `,`, `}`, }, "") return s @@ -12857,6 +14242,18 @@ func (this *VolumeMount) String() string { }, "") return s } +func (this *VolumeProjection) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VolumeProjection{`, + `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "SecretProjection", "SecretProjection", 1) + `,`, + `DownwardAPI:` + strings.Replace(fmt.Sprintf("%v", this.DownwardAPI), "DownwardAPIProjection", "DownwardAPIProjection", 1) + `,`, + `ConfigMap:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMap), "ConfigMapProjection", "ConfigMapProjection", 1) + `,`, + `}`, + }, "") + return s +} func (this *VolumeSource) String() string { if this == nil { return "nil" @@ -12884,6 +14281,10 @@ func (this *VolumeSource) String() string { `VsphereVolume:` + strings.Replace(fmt.Sprintf("%v", this.VsphereVolume), "VsphereVirtualDiskVolumeSource", "VsphereVirtualDiskVolumeSource", 1) + `,`, `Quobyte:` + strings.Replace(fmt.Sprintf("%v", this.Quobyte), "QuobyteVolumeSource", "QuobyteVolumeSource", 1) + `,`, `AzureDisk:` + strings.Replace(fmt.Sprintf("%v", this.AzureDisk), "AzureDiskVolumeSource", "AzureDiskVolumeSource", 1) + `,`, + `PhotonPersistentDisk:` + strings.Replace(fmt.Sprintf("%v", this.PhotonPersistentDisk), "PhotonPersistentDiskVolumeSource", "PhotonPersistentDiskVolumeSource", 1) + `,`, + `PortworxVolume:` + strings.Replace(fmt.Sprintf("%v", this.PortworxVolume), "PortworxVolumeSource", "PortworxVolumeSource", 1) + `,`, + `ScaleIO:` + strings.Replace(fmt.Sprintf("%v", this.ScaleIO), "ScaleIOVolumeSource", "ScaleIOVolumeSource", 1) + `,`, + `Projected:` + strings.Replace(fmt.Sprintf("%v", this.Projected), "ProjectedVolumeSource", "ProjectedVolumeSource", 1) + `,`, `}`, }, "") return s @@ -14864,6 +16265,107 @@ func (m *ConfigMap) Unmarshal(data []byte) error { } return nil } +func (m *ConfigMapEnvSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConfigMapEnvSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfigMapEnvSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LocalObjectReference.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ConfigMapKeySelector) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -14952,6 +16454,27 @@ func (m *ConfigMapKeySelector) Unmarshal(data []byte) error { } m.Key = string(data[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -15084,6 +16607,138 @@ func (m *ConfigMapList) Unmarshal(data []byte) error { } return nil } +func (m *ConfigMapProjection) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConfigMapProjection: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfigMapProjection: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LocalObjectReference.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, KeyToPath{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ConfigMapVolumeSource) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -15194,6 +16849,27 @@ func (m *ConfigMapVolumeSource) Unmarshal(data []byte) error { } } m.DefaultMode = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -15762,6 +17438,66 @@ func (m *Container) Unmarshal(data []byte) error { } } m.TTY = bool(v != 0) + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EnvFrom", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EnvFrom = append(m.EnvFrom, EnvFromSource{}) + if err := m.EnvFrom[len(m.EnvFrom)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TerminationMessagePolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TerminationMessagePolicy = TerminationMessagePolicy(data[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -17065,6 +18801,117 @@ func (m *DeleteOptions) Unmarshal(data []byte) error { } b := bool(v != 0) m.OrphanDependents = &b + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PropagationPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := DeletionPropagation(data[iNdEx:postIndex]) + m.PropagationPolicy = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DownwardAPIProjection) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DownwardAPIProjection: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DownwardAPIProjection: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, DownwardAPIVolumeFile{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -18094,6 +19941,151 @@ func (m *EndpointsList) Unmarshal(data []byte) error { } return nil } +func (m *EnvFromSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EnvFromSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EnvFromSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Prefix = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConfigMapRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConfigMapRef == nil { + m.ConfigMapRef = &ConfigMapEnvSource{} + } + if err := m.ConfigMapRef.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SecretRef == nil { + m.SecretRef = &SecretEnvSource{} + } + if err := m.SecretRef.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *EnvVar) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -19021,96 +21013,6 @@ func (m *ExecAction) Unmarshal(data []byte) error { } 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 @@ -19589,6 +21491,35 @@ func (m *FlockerVolumeSource) Unmarshal(data []byte) error { } m.DatasetName = string(data[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DatasetUUID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DatasetUUID = string(data[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -20740,6 +22671,35 @@ func (m *ISCSIVolumeSource) Unmarshal(data []byte) error { } } m.ReadOnly = bool(v != 0) + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Portals", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Portals = append(m.Portals, string(data[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -21279,7 +23239,7 @@ func (m *LimitRangeItem) Unmarshal(data []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } @@ -21395,7 +23355,7 @@ func (m *LimitRangeItem) Unmarshal(data []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } @@ -21511,7 +23471,7 @@ func (m *LimitRangeItem) Unmarshal(data []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } @@ -21627,7 +23587,7 @@ func (m *LimitRangeItem) Unmarshal(data []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } @@ -21743,7 +23703,7 @@ func (m *LimitRangeItem) Unmarshal(data []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } @@ -22051,7 +24011,7 @@ func (m *List) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, k8s_io_kubernetes_pkg_runtime.RawExtension{}) + m.Items = append(m.Items, k8s_io_apimachinery_pkg_runtime.RawExtension{}) if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } @@ -23917,6 +25877,172 @@ func (m *NodeProxyOptions) Unmarshal(data []byte) error { } return nil } +func (m *NodeResources) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodeResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := ResourceName(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + 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 *NodeSelector) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -24352,6 +26478,37 @@ func (m *NodeSpec) Unmarshal(data []byte) error { } } m.Unschedulable = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Taints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Taints = append(m.Taints, Taint{}) + if err := m.Taints[len(m.Taints)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -24508,7 +26665,7 @@ func (m *NodeStatus) Unmarshal(data []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } @@ -24624,7 +26781,7 @@ func (m *NodeStatus) Unmarshal(data []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } @@ -25517,7 +27674,7 @@ func (m *ObjectMeta) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UID = k8s_io_kubernetes_pkg_types.UID(data[iNdEx:postIndex]) + m.UID = k8s_io_apimachinery_pkg_types.UID(data[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { @@ -25624,7 +27781,7 @@ func (m *ObjectMeta) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.DeletionTimestamp == nil { - m.DeletionTimestamp = &k8s_io_kubernetes_pkg_api_unversioned.Time{} + m.DeletionTimestamp = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} } if err := m.DeletionTimestamp.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -25898,7 +28055,7 @@ func (m *ObjectMeta) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OwnerReferences = append(m.OwnerReferences, OwnerReference{}) + m.OwnerReferences = append(m.OwnerReferences, k8s_io_apimachinery_pkg_apis_meta_v1.OwnerReference{}) if err := m.OwnerReferences[len(m.OwnerReferences)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } @@ -26125,7 +28282,7 @@ func (m *ObjectReference) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UID = k8s_io_kubernetes_pkg_types.UID(data[iNdEx:postIndex]) + m.UID = k8s_io_apimachinery_pkg_types.UID(data[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { @@ -26235,193 +28392,6 @@ func (m *ObjectReference) Unmarshal(data []byte) error { } 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 @@ -26957,12 +28927,42 @@ func (m *PersistentVolumeClaimSpec) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.Selector == nil { - m.Selector = &k8s_io_kubernetes_pkg_api_unversioned.LabelSelector{} + m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} } if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageClassName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.StorageClassName = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -27177,7 +29177,7 @@ func (m *PersistentVolumeClaimStatus) Unmarshal(data []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } @@ -27975,6 +29975,105 @@ func (m *PersistentVolumeSource) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PhotonPersistentDisk", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PhotonPersistentDisk == nil { + m.PhotonPersistentDisk = &PhotonPersistentDiskVolumeSource{} + } + if err := m.PhotonPersistentDisk.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortworxVolume", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PortworxVolume == nil { + m.PortworxVolume = &PortworxVolumeSource{} + } + if err := m.PortworxVolume.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScaleIO", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ScaleIO == nil { + m.ScaleIO = &ScaleIOVolumeSource{} + } + if err := m.ScaleIO.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -28131,7 +30230,7 @@ func (m *PersistentVolumeSpec) Unmarshal(data []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } @@ -28262,6 +30361,35 @@ func (m *PersistentVolumeSpec) Unmarshal(data []byte) error { } m.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(data[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageClassName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageClassName = string(data[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -28420,6 +30548,114 @@ func (m *PersistentVolumeStatus) Unmarshal(data []byte) error { } return nil } +func (m *PhotonPersistentDiskVolumeSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PhotonPersistentDiskVolumeSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PhotonPersistentDiskVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PdID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PdID = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FSType = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Pod) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -28728,7 +30964,7 @@ func (m *PodAffinityTerm) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.LabelSelector == nil { - m.LabelSelector = &k8s_io_kubernetes_pkg_api_unversioned.LabelSelector{} + m.LabelSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} } if err := m.LabelSelector.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -29754,7 +31990,7 @@ func (m *PodLogOptions) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.SinceTime == nil { - m.SinceTime = &k8s_io_kubernetes_pkg_api_unversioned.Time{} + m.SinceTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} } if err := m.SinceTime.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -29841,6 +32077,76 @@ func (m *PodLogOptions) Unmarshal(data []byte) error { } return nil } +func (m *PodPortForwardOptions) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodPortForwardOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodPortForwardOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Ports", 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.Ports = append(m.Ports, 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 @@ -30140,7 +32446,7 @@ func (m *PodSignature) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.PodController == nil { - m.PodController = &OwnerReference{} + m.PodController = &k8s_io_apimachinery_pkg_apis_meta_v1.OwnerReference{} } if err := m.PodController.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -30736,6 +33042,151 @@ func (m *PodSpec) Unmarshal(data []byte) error { } m.Subdomain = string(data[iNdEx:postIndex]) iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Affinity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Affinity == nil { + m.Affinity = &Affinity{} + } + if err := m.Affinity.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SchedulerName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SchedulerName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitContainers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InitContainers = append(m.InitContainers, Container{}) + if err := m.InitContainers[len(m.InitContainers)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AutomountServiceAccountToken", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.AutomountServiceAccountToken = &b + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tolerations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tolerations = append(m.Tolerations, Toleration{}) + if err := m.Tolerations[len(m.Tolerations)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -30989,7 +33440,7 @@ func (m *PodStatus) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.StartTime == nil { - m.StartTime = &k8s_io_kubernetes_pkg_api_unversioned.Time{} + m.StartTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} } if err := m.StartTime.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -31026,6 +33477,66 @@ func (m *PodStatus) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QOSClass", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QOSClass = PodQOSClass(data[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitContainerStatuses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InitContainerStatuses = append(m.InitContainerStatuses, ContainerStatus{}) + if err := m.InitContainerStatuses[len(m.InitContainerStatuses)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -31488,6 +33999,134 @@ func (m *PodTemplateSpec) Unmarshal(data []byte) error { } return nil } +func (m *PortworxVolumeSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PortworxVolumeSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PortworxVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VolumeID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VolumeID = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FSType = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadOnly = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Preconditions) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -31544,7 +34183,7 @@ func (m *Preconditions) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := k8s_io_kubernetes_pkg_types.UID(data[iNdEx:postIndex]) + s := k8s_io_apimachinery_pkg_types.UID(data[iNdEx:postIndex]) m.UID = &s iNdEx = postIndex default: @@ -32010,6 +34649,107 @@ func (m *Probe) Unmarshal(data []byte) error { } return nil } +func (m *ProjectedVolumeSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ProjectedVolumeSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProjectedVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sources = append(m.Sources, VolumeProjection{}) + if err := m.Sources[len(m.Sources)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultMode", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DefaultMode = &v + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QuobyteVolumeSource) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -32753,6 +35493,202 @@ func (m *ReplicationController) Unmarshal(data []byte) error { } return nil } +func (m *ReplicationControllerCondition) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReplicationControllerCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReplicationControllerCondition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = ReplicationControllerConditionType(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = ConditionStatus(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTransitionTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ReplicationControllerList) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -33057,6 +35993,25 @@ func (m *ReplicationControllerSpec) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType) + } + m.MinReadySeconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.MinReadySeconds |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -33183,6 +36138,56 @@ func (m *ReplicationControllerStatus) Unmarshal(data []byte) error { break } } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType) + } + m.AvailableReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.AvailableReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, ReplicationControllerCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -33728,7 +36733,7 @@ func (m *ResourceQuotaSpec) Unmarshal(data []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } @@ -33923,7 +36928,7 @@ func (m *ResourceQuotaStatus) Unmarshal(data []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } @@ -34039,7 +37044,7 @@ func (m *ResourceQuotaStatus) Unmarshal(data []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } @@ -34205,7 +37210,7 @@ func (m *ResourceRequirements) Unmarshal(data []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } @@ -34321,7 +37326,7 @@ func (m *ResourceRequirements) Unmarshal(data []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } @@ -34518,6 +37523,332 @@ func (m *SELinuxOptions) Unmarshal(data []byte) error { } return nil } +func (m *ScaleIOVolumeSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ScaleIOVolumeSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ScaleIOVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Gateway = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field System", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.System = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SecretRef == nil { + m.SecretRef = &LocalObjectReference{} + } + if err := m.SecretRef.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SSLEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SSLEnabled = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProtectionDomain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProtectionDomain = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StoragePool", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StoragePool = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageMode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageMode = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VolumeName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VolumeName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FSType = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadOnly = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Secret) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -34850,6 +38181,107 @@ func (m *Secret) Unmarshal(data []byte) error { } return nil } +func (m *SecretEnvSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SecretEnvSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SecretEnvSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LocalObjectReference.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *SecretKeySelector) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -34938,6 +38370,27 @@ func (m *SecretKeySelector) Unmarshal(data []byte) error { } m.Key = string(data[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -35070,6 +38523,138 @@ func (m *SecretList) Unmarshal(data []byte) error { } return nil } +func (m *SecretProjection) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SecretProjection: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SecretProjection: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LocalObjectReference.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, KeyToPath{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *SecretVolumeSource) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -35179,6 +38764,27 @@ func (m *SecretVolumeSource) Unmarshal(data []byte) error { } } m.DefaultMode = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -35740,6 +39346,27 @@ func (m *ServiceAccount) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AutomountServiceAccountToken", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.AutomountServiceAccountToken = &b default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -36742,6 +40369,114 @@ func (m *ServiceStatus) Unmarshal(data []byte) error { } return nil } +func (m *Sysctl) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Sysctl: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Sysctl: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *TCPSocketAction) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -36938,6 +40673,36 @@ func (m *Taint) Unmarshal(data []byte) error { } m.Effect = TaintEffect(data[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeAdded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TimeAdded.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -37104,6 +40869,26 @@ func (m *Toleration) Unmarshal(data []byte) error { } m.Effect = TaintEffect(data[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TolerationSeconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TolerationSeconds = &v default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -37391,6 +41176,155 @@ func (m *VolumeMount) Unmarshal(data []byte) error { } return nil } +func (m *VolumeProjection) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VolumeProjection: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VolumeProjection: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Secret == nil { + m.Secret = &SecretProjection{} + } + if err := m.Secret.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DownwardAPI", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DownwardAPI == nil { + m.DownwardAPI = &DownwardAPIProjection{} + } + if err := m.DownwardAPI.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConfigMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConfigMap == nil { + m.ConfigMap = &ConfigMapProjection{} + } + if err := m.ConfigMap.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *VolumeSource) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -38146,6 +42080,138 @@ func (m *VolumeSource) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 23: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PhotonPersistentDisk", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PhotonPersistentDisk == nil { + m.PhotonPersistentDisk = &PhotonPersistentDiskVolumeSource{} + } + if err := m.PhotonPersistentDisk.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 24: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortworxVolume", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PortworxVolume == nil { + m.PortworxVolume = &PortworxVolumeSource{} + } + if err := m.PortworxVolume.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 25: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScaleIO", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ScaleIO == nil { + m.ScaleIO = &ScaleIOVolumeSource{} + } + if err := m.ScaleIO.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 26: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Projected", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Projected == nil { + m.Projected = &ProjectedVolumeSource{} + } + if err := m.Projected.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -38480,615 +42546,693 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 9750 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x8c, 0x24, 0xc7, - 0x75, 0x98, 0x66, 0x66, 0xbf, 0xa6, 0xf6, 0xf3, 0xfa, 0x8e, 0xc7, 0xe5, 0x4a, 0xfc, 0x50, 0x8b, - 0xa4, 0xc8, 0x23, 0x6f, 0x8f, 0x77, 0x24, 0x4d, 0x52, 0x52, 0x24, 0xee, 0xee, 0xec, 0xde, 0xad, - 0x6f, 0xef, 0x6e, 0xf8, 0x66, 0xef, 0x4e, 0xb2, 0x18, 0x99, 0xbd, 0x33, 0xbd, 0xbb, 0xad, 0x9b, - 0x9d, 0x1e, 0x76, 0xf7, 0xec, 0xdd, 0x52, 0x31, 0xe0, 0x18, 0x8e, 0x83, 0xc0, 0x86, 0x23, 0x03, - 0x31, 0x12, 0x20, 0x09, 0xe2, 0x04, 0x88, 0x91, 0xc4, 0x88, 0x63, 0x39, 0x8a, 0x2d, 0x25, 0x86, - 0x11, 0x20, 0x8e, 0xa0, 0x7c, 0x38, 0x90, 0x81, 0x20, 0x36, 0x6c, 0x40, 0xb1, 0x6c, 0x04, 0xf9, - 0x91, 0x3f, 0x01, 0x92, 0x3f, 0x21, 0x8c, 0x24, 0xf5, 0xea, 0xbb, 0x7a, 0x7a, 0xb6, 0x7b, 0x96, - 0x37, 0x9b, 0xb3, 0x91, 0x1f, 0x0b, 0xec, 0xbc, 0xf7, 0xea, 0xd5, 0x47, 0x57, 0xbd, 0x7a, 0xef, - 0xd5, 0xab, 0x57, 0xe4, 0xe5, 0x7b, 0x6f, 0xc6, 0xcb, 0x41, 0x78, 0xe9, 0x5e, 0x6f, 0xc7, 0x8f, - 0x3a, 0x7e, 0xe2, 0xc7, 0x97, 0xba, 0xf7, 0xf6, 0x2e, 0x79, 0xdd, 0xe0, 0xd2, 0xe1, 0xe5, 0x4b, - 0x7b, 0x7e, 0xc7, 0x8f, 0xbc, 0xc4, 0x6f, 0x2d, 0x77, 0xa3, 0x30, 0x09, 0x9d, 0x4f, 0x70, 0xea, - 0x65, 0x4d, 0xbd, 0x4c, 0xa9, 0x97, 0x29, 0xf5, 0xf2, 0xe1, 0xe5, 0xa5, 0x8b, 0x7b, 0x41, 0xb2, - 0xdf, 0xdb, 0x59, 0x6e, 0x86, 0x07, 0x97, 0xf6, 0xc2, 0xbd, 0xf0, 0x12, 0x2b, 0xb4, 0xd3, 0xdb, - 0x65, 0xbf, 0xd8, 0x0f, 0xf6, 0x1f, 0x67, 0xb6, 0x74, 0x65, 0x70, 0xd5, 0x91, 0x1f, 0x87, 0xbd, - 0xa8, 0xe9, 0xa7, 0x1b, 0xb0, 0xf4, 0xfa, 0xe0, 0x32, 0xbd, 0xce, 0xa1, 0x1f, 0xc5, 0x41, 0xd8, - 0xf1, 0x5b, 0x7d, 0xc5, 0x2e, 0x66, 0x17, 0x8b, 0x7a, 0x9d, 0x24, 0x38, 0xe8, 0xaf, 0xe5, 0x72, - 0x36, 0x79, 0x2f, 0x09, 0xda, 0x97, 0x82, 0x4e, 0x12, 0x27, 0x51, 0xba, 0x88, 0xfb, 0xbb, 0x25, - 0xf2, 0xcc, 0xca, 0xdd, 0xc6, 0x7a, 0xdb, 0x8b, 0x93, 0xa0, 0xb9, 0xda, 0x0e, 0x9b, 0xf7, 0x1a, - 0x49, 0x18, 0xf9, 0x77, 0xc2, 0x76, 0xef, 0xc0, 0x6f, 0xb0, 0xde, 0x38, 0x2f, 0x93, 0xa9, 0x43, - 0xf6, 0x7b, 0xb3, 0xb6, 0x58, 0x7a, 0xa6, 0xf4, 0x42, 0x75, 0x75, 0xe1, 0xbb, 0xdf, 0x7f, 0xfa, - 0x63, 0x7f, 0xf4, 0xfd, 0xa7, 0xa7, 0xee, 0x08, 0x38, 0x28, 0x0a, 0xe7, 0x79, 0x32, 0xb1, 0x1b, - 0x6f, 0x1f, 0x75, 0xfd, 0xc5, 0x32, 0xa3, 0x9d, 0x13, 0xb4, 0x13, 0x1b, 0x0d, 0x84, 0x82, 0xc0, - 0x3a, 0x97, 0x48, 0xb5, 0xeb, 0x45, 0x49, 0x90, 0xd0, 0xbe, 0x2f, 0x56, 0x28, 0xe9, 0xf8, 0xea, - 0x19, 0x41, 0x5a, 0xad, 0x4b, 0x04, 0x68, 0x1a, 0x6c, 0x46, 0xe4, 0x7b, 0xad, 0x5b, 0x9d, 0xf6, - 0xd1, 0xe2, 0x18, 0xa5, 0x9f, 0xd2, 0xcd, 0x00, 0x01, 0x07, 0x45, 0xe1, 0x7e, 0xab, 0x4c, 0xa6, - 0x56, 0x76, 0x77, 0x83, 0x4e, 0x90, 0x1c, 0x39, 0xef, 0x91, 0x99, 0x4e, 0xd8, 0xf2, 0xe5, 0x6f, - 0xd6, 0x8b, 0xe9, 0x2b, 0x17, 0x96, 0x8f, 0x9b, 0x17, 0xcb, 0x37, 0x8d, 0x12, 0xab, 0x0b, 0xb4, - 0x9a, 0x19, 0x13, 0x02, 0x16, 0x47, 0xe7, 0x5d, 0x32, 0xdd, 0x0d, 0x5b, 0xaa, 0x82, 0x32, 0xab, - 0xe0, 0xc5, 0xe3, 0x2b, 0xa8, 0xeb, 0x02, 0xab, 0xf3, 0x94, 0xff, 0xb4, 0x01, 0x00, 0x93, 0x9d, - 0xd3, 0x26, 0xf3, 0xf8, 0x93, 0x7e, 0x76, 0x55, 0x43, 0x85, 0xd5, 0x70, 0x31, 0xbf, 0x06, 0xa3, - 0xd0, 0xea, 0x59, 0x5a, 0xcb, 0x7c, 0x0a, 0x08, 0x69, 0xd6, 0xee, 0x07, 0x64, 0x6e, 0x25, 0x49, - 0xbc, 0xe6, 0xbe, 0xdf, 0xe2, 0xdf, 0xd7, 0x79, 0x8d, 0x8c, 0x75, 0xbc, 0x03, 0x5f, 0x7c, 0xfd, - 0x67, 0xc4, 0xb0, 0x8f, 0xdd, 0xa4, 0xb0, 0x0f, 0xbf, 0xff, 0xf4, 0xc2, 0xed, 0x4e, 0xf0, 0x7e, - 0x4f, 0xcc, 0x19, 0x84, 0x01, 0xa3, 0x76, 0xae, 0x10, 0xd2, 0xf2, 0x0f, 0x83, 0xa6, 0x5f, 0xf7, - 0x92, 0x7d, 0x31, 0x1b, 0x1c, 0x51, 0x96, 0xd4, 0x14, 0x06, 0x0c, 0x2a, 0xf7, 0x27, 0x4a, 0xa4, - 0xba, 0x72, 0x18, 0x06, 0x2d, 0xda, 0xca, 0xd8, 0xe9, 0xd1, 0x7e, 0x47, 0xfe, 0xae, 0x1f, 0x29, - 0x10, 0x6d, 0x42, 0x85, 0xf6, 0xfb, 0x4a, 0x4e, 0xbf, 0xed, 0x42, 0xeb, 0x9d, 0x24, 0x3a, 0x5a, - 0x7d, 0x5c, 0x54, 0x3d, 0x9f, 0xc2, 0x42, 0xba, 0x0e, 0xf7, 0xe7, 0xca, 0xe4, 0xb1, 0x95, 0x0f, - 0x7a, 0x91, 0x5f, 0x0b, 0xe2, 0x7b, 0xe9, 0xa5, 0xd0, 0xa2, 0xb0, 0x9b, 0x7a, 0x30, 0xd4, 0x1c, - 0xac, 0x09, 0x38, 0x28, 0x0a, 0xe7, 0x22, 0x99, 0xc4, 0xff, 0x6f, 0xc3, 0xa6, 0xe8, 0xfd, 0x59, - 0x41, 0x3c, 0x5d, 0xf3, 0x12, 0xaf, 0xc6, 0x51, 0x20, 0x69, 0x9c, 0x1b, 0x64, 0xba, 0x49, 0x47, - 0x3d, 0xe8, 0xec, 0xdd, 0xa0, 0x53, 0x8b, 0x7d, 0xe1, 0xea, 0xea, 0x4b, 0x48, 0xbe, 0xa6, 0xc1, - 0x74, 0xbc, 0x17, 0x79, 0xdb, 0x04, 0x0b, 0x03, 0x07, 0x66, 0x79, 0xc7, 0x55, 0x0b, 0x71, 0x8c, - 0x71, 0x22, 0x19, 0x8b, 0xf0, 0x05, 0x63, 0x4d, 0x8d, 0xb3, 0x35, 0x35, 0x33, 0x60, 0x3d, 0xfd, - 0xa3, 0x92, 0x18, 0x93, 0x8d, 0xa0, 0x6d, 0x8b, 0x07, 0xfa, 0x99, 0x63, 0xbf, 0x19, 0xf9, 0x89, - 0x31, 0x2a, 0xea, 0x33, 0x37, 0x14, 0x06, 0x0c, 0x2a, 0x5c, 0xfc, 0xf1, 0xbe, 0x17, 0xb1, 0xd9, - 0x22, 0xc6, 0x46, 0x2d, 0xfe, 0x86, 0x44, 0x80, 0xa6, 0xb1, 0x16, 0x7f, 0x25, 0x77, 0xf1, 0xff, - 0xf3, 0x12, 0x99, 0x5c, 0x0d, 0x3a, 0x2d, 0x3a, 0x14, 0xce, 0x17, 0xc9, 0xd4, 0x81, 0x9f, 0x78, - 0x2d, 0x3a, 0x5c, 0x62, 0xdd, 0xbf, 0x70, 0xfc, 0xe4, 0xb9, 0xb5, 0xf3, 0x55, 0xbf, 0x99, 0xdc, - 0xa0, 0x65, 0x74, 0x37, 0x34, 0x0c, 0x14, 0x37, 0xe7, 0x36, 0x99, 0x48, 0xbc, 0x68, 0xcf, 0x4f, - 0xc4, 0x72, 0xbf, 0x58, 0x84, 0x2f, 0xe0, 0x54, 0xf3, 0x3b, 0x4d, 0x5f, 0x0b, 0xc6, 0x6d, 0xc6, - 0x04, 0x04, 0x33, 0xb7, 0x49, 0x66, 0xd6, 0xbc, 0xae, 0xb7, 0x13, 0xb4, 0xa9, 0xdc, 0xf3, 0x63, - 0xe7, 0xd3, 0xa4, 0xe2, 0xb5, 0x5a, 0x6c, 0xe2, 0x57, 0x57, 0x1f, 0xa3, 0x05, 0x2a, 0x2b, 0xad, - 0x16, 0x9d, 0x06, 0x44, 0x51, 0x1d, 0x01, 0x52, 0x38, 0x17, 0xc8, 0x58, 0x2b, 0x0a, 0xbb, 0xb4, - 0x35, 0x48, 0x79, 0x1e, 0x57, 0x68, 0x8d, 0xfe, 0x4e, 0x91, 0x32, 0x1a, 0xf7, 0x5f, 0x97, 0x89, - 0xb3, 0xe6, 0x77, 0xf7, 0x37, 0x1a, 0xd6, 0xb7, 0xa4, 0xf3, 0xe1, 0x20, 0xa4, 0x42, 0x20, 0x8c, - 0x62, 0x51, 0x21, 0x9b, 0x0f, 0x37, 0x04, 0x0c, 0x14, 0xd6, 0x79, 0x86, 0x8c, 0x75, 0xf5, 0xb2, - 0x9e, 0x91, 0x22, 0x81, 0x2d, 0x68, 0x86, 0x41, 0x8a, 0x5e, 0xec, 0x47, 0x62, 0x1e, 0x2b, 0x8a, - 0xdb, 0x14, 0x06, 0x0c, 0xa3, 0x67, 0x0e, 0xce, 0x29, 0x31, 0x4b, 0x53, 0x33, 0x07, 0x31, 0x60, - 0x50, 0x39, 0x3f, 0x4a, 0x67, 0x0e, 0xfb, 0x45, 0x07, 0x92, 0x4d, 0xd9, 0x5c, 0x61, 0xb0, 0x15, - 0x36, 0xbd, 0x76, 0x7a, 0xf0, 0x67, 0xd9, 0x4c, 0x93, 0x8c, 0x40, 0xf3, 0xb4, 0x66, 0xda, 0x44, - 0xee, 0x4c, 0xfb, 0x1b, 0x25, 0x3a, 0x8e, 0x74, 0xa6, 0xf9, 0xd1, 0x29, 0x6c, 0x99, 0xc3, 0x2d, - 0x82, 0x3f, 0xc0, 0xa6, 0x85, 0x07, 0x5d, 0xaa, 0x5a, 0x74, 0x92, 0xb5, 0x90, 0xae, 0x06, 0xb6, - 0x8d, 0x7e, 0x86, 0x8c, 0x25, 0x58, 0x15, 0x6f, 0xd6, 0xf3, 0xf2, 0xb3, 0x60, 0x05, 0x74, 0xa6, - 0x9c, 0xef, 0x2f, 0xc1, 0x9a, 0xc0, 0xca, 0x38, 0x6f, 0x91, 0x89, 0x38, 0xf1, 0x92, 0x5e, 0x2c, - 0x1a, 0xfa, 0x49, 0xd9, 0xd0, 0x06, 0x83, 0xd2, 0xf2, 0xf3, 0xaa, 0x18, 0x07, 0x81, 0x28, 0xe0, - 0xbc, 0x48, 0x26, 0x0f, 0xfc, 0x38, 0xf6, 0xf6, 0xa4, 0x60, 0x9b, 0x17, 0x65, 0x27, 0x6f, 0x70, - 0x30, 0x48, 0xbc, 0xf3, 0x29, 0x32, 0xee, 0x47, 0x51, 0x18, 0x89, 0x19, 0x31, 0x2b, 0x08, 0xc7, - 0xd7, 0x11, 0x08, 0x1c, 0xe7, 0xfe, 0x4e, 0x89, 0xcc, 0xab, 0xb6, 0xf2, 0xba, 0x46, 0xb8, 0xd4, - 0x5b, 0x84, 0x34, 0x65, 0xc7, 0x62, 0xb6, 0xc0, 0xa6, 0xaf, 0xbc, 0x72, 0x3c, 0xef, 0xfe, 0x81, - 0xd4, 0x75, 0x28, 0x50, 0x0c, 0x06, 0x5f, 0xf7, 0xbb, 0x25, 0x72, 0x36, 0xd5, 0xa7, 0xad, 0x20, - 0x4e, 0x9c, 0x3f, 0xdf, 0xd7, 0xaf, 0x4b, 0xc7, 0xd4, 0x6d, 0x68, 0x94, 0xcb, 0x58, 0x9c, 0x75, - 0x4f, 0x4d, 0x14, 0x09, 0x31, 0x3a, 0x07, 0x64, 0x3c, 0x48, 0xfc, 0x03, 0xd9, 0xaf, 0x8b, 0x05, - 0xfb, 0xc5, 0x1b, 0xa8, 0x3f, 0xcf, 0x26, 0xf2, 0x00, 0xce, 0xca, 0xfd, 0x1f, 0x74, 0x1f, 0xa7, - 0xbd, 0xdc, 0x0d, 0xf6, 0x6e, 0x78, 0xdd, 0x11, 0x7e, 0x98, 0x06, 0x95, 0x79, 0xc8, 0x95, 0x37, - 0xfd, 0x72, 0x5e, 0xd3, 0x45, 0x83, 0x96, 0x71, 0xf3, 0xe4, 0x5a, 0x81, 0x92, 0x4b, 0x08, 0x02, - 0xc6, 0x6c, 0xe9, 0x0d, 0x52, 0x55, 0x04, 0xce, 0x02, 0xa9, 0xdc, 0xf3, 0xb9, 0xca, 0x58, 0x05, - 0xfc, 0xd7, 0x39, 0x47, 0xc6, 0x0f, 0xbd, 0x76, 0x4f, 0xac, 0x56, 0xe0, 0x3f, 0x3e, 0x53, 0x7e, - 0xb3, 0xe4, 0xfe, 0x46, 0x89, 0x9c, 0x53, 0x95, 0x5c, 0xf7, 0x8f, 0x1a, 0x7e, 0x9b, 0x36, 0x39, - 0x8c, 0x9c, 0x9f, 0xa4, 0x88, 0x76, 0x86, 0x1c, 0x12, 0xa3, 0x71, 0x12, 0x09, 0xf6, 0x09, 0xd1, - 0xf0, 0x73, 0x59, 0x58, 0xc8, 0xac, 0xcd, 0x79, 0x92, 0xf7, 0x85, 0x2f, 0xde, 0x69, 0xc1, 0xa0, - 0x42, 0x1b, 0xca, 0x3a, 0x86, 0xcd, 0x9f, 0x55, 0xcd, 0x3f, 0x8d, 0x99, 0xb7, 0x65, 0xcf, 0xbc, - 0x4f, 0x17, 0xfc, 0x7c, 0x03, 0xe6, 0xdc, 0xdf, 0xa1, 0x6a, 0x9b, 0xa2, 0xb1, 0xc4, 0xf1, 0x23, - 0x32, 0xfc, 0xc3, 0x75, 0x97, 0x7e, 0x96, 0xed, 0x10, 0xf7, 0xd3, 0xec, 0xee, 0x3a, 0x97, 0xc9, - 0x74, 0xcb, 0xdf, 0xf5, 0x7a, 0xed, 0x44, 0xa9, 0x8b, 0xe3, 0xdc, 0x8e, 0xa8, 0x69, 0x30, 0x98, - 0x34, 0xee, 0x6f, 0x57, 0xd9, 0xaa, 0x4c, 0xbc, 0x80, 0x9a, 0x81, 0xb8, 0x41, 0x1b, 0x5a, 0xfd, - 0x8c, 0xa9, 0xd5, 0x0b, 0x0d, 0x9e, 0x4a, 0xe2, 0xe0, 0x00, 0x45, 0x76, 0xd9, 0x96, 0xc4, 0x9b, - 0x08, 0x04, 0x8e, 0x73, 0x9e, 0x23, 0x93, 0xd4, 0x74, 0x3e, 0xf0, 0x3a, 0x2d, 0xda, 0x06, 0x54, - 0x19, 0xa6, 0x51, 0xaa, 0xaf, 0x71, 0x10, 0x48, 0x9c, 0xf3, 0x09, 0x32, 0x46, 0xf5, 0x9b, 0x98, - 0x0a, 0x75, 0xa4, 0x99, 0xc2, 0x9a, 0x56, 0xe8, 0x6f, 0x60, 0x50, 0x54, 0x05, 0xee, 0x87, 0xd1, - 0x3d, 0xaa, 0xb0, 0xd5, 0x82, 0x88, 0xed, 0xeb, 0x86, 0x2a, 0x70, 0x57, 0x61, 0xc0, 0xa0, 0x72, - 0xea, 0x64, 0xbc, 0x1b, 0x46, 0x49, 0x4c, 0xb7, 0x69, 0x1c, 0xce, 0x97, 0x72, 0x67, 0x0f, 0xef, - 0x77, 0x9d, 0x96, 0xd1, 0x5d, 0xc1, 0x5f, 0x74, 0x48, 0x19, 0x23, 0x67, 0x8d, 0x54, 0xfc, 0xce, - 0xe1, 0xe2, 0x24, 0xe3, 0xf7, 0xec, 0xf1, 0xfc, 0xd6, 0x3b, 0x87, 0x77, 0xbc, 0x48, 0xaf, 0x22, - 0xfa, 0x1b, 0xb0, 0xb4, 0xd3, 0x24, 0x55, 0xe9, 0x08, 0x88, 0x17, 0xa7, 0x8a, 0x4c, 0x30, 0x10, - 0xe4, 0xe0, 0xbf, 0xdf, 0x0b, 0x22, 0xff, 0x80, 0x0a, 0xd7, 0x58, 0xeb, 0xc3, 0x12, 0x1b, 0x83, - 0xe6, 0x4b, 0x2b, 0x99, 0xe1, 0xea, 0xc3, 0x8d, 0xb0, 0x47, 0xa9, 0x17, 0xab, 0xac, 0xc9, 0x39, - 0x06, 0xe7, 0x1d, 0x5d, 0x62, 0xf5, 0x9c, 0x60, 0x3f, 0x63, 0x00, 0x63, 0xb0, 0x98, 0x52, 0xa3, - 0x76, 0xb6, 0x1d, 0x1c, 0xfa, 0x1d, 0xba, 0x2f, 0xd7, 0xa3, 0x70, 0xc7, 0x5f, 0x24, 0xac, 0x37, - 0x9f, 0xca, 0x33, 0xbe, 0x28, 0xe9, 0xea, 0x19, 0xca, 0x7b, 0x76, 0xcb, 0x2c, 0x0d, 0x36, 0x33, - 0xaa, 0xc9, 0xcd, 0xa1, 0xae, 0x12, 0x68, 0xf6, 0xd3, 0xc5, 0xd9, 0x3b, 0x94, 0xfd, 0x1c, 0x58, - 0xc5, 0x21, 0xc5, 0xce, 0xd9, 0x26, 0xd5, 0x76, 0xb0, 0xeb, 0x37, 0x8f, 0x9a, 0x54, 0xbb, 0x9c, - 0x61, 0xbc, 0x73, 0x96, 0xdc, 0x96, 0x24, 0xe7, 0xfa, 0xa1, 0xfa, 0x09, 0x9a, 0x91, 0x73, 0x87, - 0x9c, 0x4f, 0xfc, 0xe8, 0x20, 0xe8, 0x78, 0xb8, 0x69, 0x0b, 0xe5, 0x85, 0x59, 0xb8, 0xb3, 0x6c, - 0xd6, 0x3e, 0x25, 0x06, 0xf6, 0xfc, 0x76, 0x26, 0x15, 0x0c, 0x28, 0xed, 0xdc, 0x22, 0xf3, 0x6c, - 0x3d, 0xd5, 0x7b, 0xed, 0x76, 0x3d, 0x6c, 0x07, 0xcd, 0xa3, 0xc5, 0x39, 0xc6, 0xf0, 0x39, 0x69, - 0xb7, 0x6e, 0xda, 0x68, 0xd4, 0xeb, 0xf5, 0x2f, 0x48, 0x97, 0x46, 0xa7, 0x01, 0xd5, 0x6a, 0x7b, - 0x11, 0x55, 0xfa, 0x71, 0xee, 0xfb, 0x0f, 0x92, 0xc5, 0xf9, 0x22, 0x76, 0x4a, 0xc3, 0x2e, 0xc4, - 0x9d, 0x06, 0x29, 0x20, 0xa4, 0x59, 0xa3, 0xa8, 0x88, 0x13, 0x3a, 0xfa, 0x8b, 0x0b, 0x4c, 0x31, - 0x55, 0xeb, 0xab, 0x81, 0x40, 0xe0, 0x38, 0x66, 0xf6, 0xe1, 0x3f, 0xb7, 0x50, 0xf6, 0x9e, 0x61, - 0x84, 0xda, 0xec, 0x93, 0x08, 0xd0, 0x34, 0xb8, 0x61, 0x25, 0xc9, 0xd1, 0xa2, 0xc3, 0x48, 0xd5, - 0x52, 0xdb, 0xde, 0xfe, 0x12, 0x20, 0xdc, 0xdd, 0x21, 0x73, 0x6a, 0x59, 0xb3, 0xd1, 0x71, 0x9e, - 0x26, 0xe3, 0x28, 0xb9, 0xa4, 0xf5, 0x52, 0xc5, 0x26, 0xa0, 0x40, 0xa3, 0x4b, 0x9c, 0xc1, 0x59, - 0x13, 0x82, 0x0f, 0xfc, 0xd5, 0x23, 0xda, 0x6b, 0x26, 0xd6, 0x2a, 0x46, 0x13, 0x24, 0x02, 0x34, - 0x8d, 0xfb, 0xbf, 0xf9, 0xa6, 0xa8, 0x65, 0x47, 0x01, 0xb9, 0x49, 0x15, 0xf5, 0xfd, 0x30, 0x4e, - 0x90, 0x9a, 0xd5, 0x31, 0xae, 0x77, 0xc1, 0x6b, 0x02, 0x0e, 0x8a, 0xc2, 0xf9, 0x2c, 0x99, 0x6d, - 0x9a, 0x15, 0x08, 0x51, 0xfe, 0x98, 0x28, 0x62, 0xd7, 0x0e, 0x36, 0xad, 0xf3, 0x26, 0x99, 0x62, - 0xae, 0xbc, 0x66, 0xd8, 0x16, 0xfa, 0xb2, 0xdc, 0x99, 0xa6, 0xea, 0x02, 0xfe, 0xa1, 0xf1, 0x3f, - 0x28, 0x6a, 0xb4, 0x3a, 0xb0, 0x09, 0x9b, 0x75, 0x21, 0x6e, 0x95, 0xd5, 0x71, 0x8d, 0x41, 0x41, - 0x60, 0xdd, 0x5f, 0x29, 0x1b, 0xa3, 0x8c, 0x4a, 0x9f, 0xef, 0xfc, 0x08, 0x99, 0xbc, 0xef, 0x51, - 0xa5, 0xb5, 0xb3, 0x27, 0x76, 0xd0, 0x57, 0x0b, 0xca, 0x5e, 0x56, 0xfc, 0x2e, 0x2f, 0xca, 0xf7, - 0x09, 0xf1, 0x03, 0x24, 0x43, 0xe4, 0x1d, 0xf5, 0x3a, 0x1d, 0xe4, 0x5d, 0x1e, 0x9e, 0x37, 0xf0, - 0xa2, 0x9c, 0xb7, 0xf8, 0x01, 0x92, 0xa1, 0xb3, 0x4b, 0x88, 0x5c, 0x7d, 0x7e, 0x4b, 0xb8, 0xd0, - 0x7e, 0x68, 0x18, 0xf6, 0xdb, 0xaa, 0xf4, 0xea, 0x1c, 0xee, 0x4c, 0xfa, 0x37, 0x18, 0x9c, 0xdd, - 0x1e, 0x53, 0x44, 0xfa, 0x9b, 0x45, 0x25, 0x2a, 0x9d, 0xdc, 0x5e, 0x44, 0x69, 0x56, 0x12, 0x31, - 0x74, 0x2f, 0x15, 0x54, 0xa8, 0xb6, 0x83, 0x03, 0xdf, 0x5c, 0x2d, 0x82, 0x0b, 0x68, 0x86, 0xee, - 0xb7, 0x2b, 0x64, 0x71, 0x50, 0x7b, 0x71, 0x4e, 0xfa, 0x0f, 0x02, 0x6a, 0x8d, 0xb4, 0xf8, 0xcc, - 0x35, 0xe6, 0xe4, 0xba, 0x80, 0x83, 0xa2, 0xc0, 0xc9, 0x11, 0x07, 0x7b, 0x1d, 0xaf, 0x2d, 0xe6, - 0xaf, 0x9a, 0x1c, 0x0d, 0x06, 0x05, 0x81, 0x45, 0x3a, 0x2a, 0x75, 0x63, 0xe1, 0xc2, 0x35, 0x26, - 0x11, 0x30, 0x28, 0x08, 0xac, 0x69, 0xfe, 0x8d, 0xe5, 0x98, 0x7f, 0xd6, 0x18, 0x8d, 0x3f, 0xe4, - 0x31, 0xa2, 0xbb, 0x0e, 0x41, 0x37, 0x67, 0xbc, 0xcf, 0xd8, 0x4f, 0x0c, 0xcf, 0x5e, 0x69, 0x25, - 0x1b, 0x8a, 0x0d, 0x18, 0x2c, 0x9d, 0xd7, 0xc9, 0xb4, 0x5a, 0xa1, 0xd4, 0xfa, 0x9f, 0xb4, 0x1d, - 0x7f, 0x5a, 0x5c, 0xd5, 0xc0, 0xa4, 0x73, 0xbf, 0x9a, 0x9e, 0x32, 0x62, 0x61, 0x18, 0x23, 0x5c, - 0x2a, 0x3a, 0xc2, 0xe5, 0xe3, 0x47, 0xd8, 0xfd, 0x4f, 0x15, 0xb4, 0x9d, 0x8d, 0xca, 0x7a, 0x71, - 0x01, 0xa1, 0xf6, 0x0e, 0x4a, 0x78, 0xda, 0x30, 0xb1, 0x2c, 0x5f, 0x1e, 0x66, 0xdd, 0x98, 0xfb, - 0x01, 0x2e, 0x07, 0xce, 0xc9, 0xd9, 0xa7, 0x3b, 0xb4, 0x17, 0x33, 0x4b, 0xd2, 0x17, 0xcb, 0x71, - 0x38, 0xb6, 0x5a, 0x0b, 0xa7, 0x6c, 0x8c, 0x0d, 0x97, 0xd7, 0xa2, 0x99, 0xe3, 0xf6, 0x84, 0xda, - 0x81, 0x3c, 0x39, 0x50, 0xcd, 0x41, 0x15, 0xe2, 0x08, 0x38, 0x8e, 0xca, 0xd2, 0x19, 0xaa, 0x61, - 0xe1, 0x54, 0x59, 0x43, 0x05, 0x88, 0x4d, 0xbe, 0x71, 0xad, 0x29, 0x81, 0x81, 0x03, 0x8b, 0x52, - 0x2b, 0xca, 0x13, 0xc7, 0x28, 0xca, 0xf4, 0x0b, 0xb1, 0x7f, 0xd4, 0xac, 0x50, 0x5f, 0x68, 0x93, - 0x83, 0x41, 0xe2, 0xd3, 0x93, 0x68, 0xaa, 0xe0, 0x24, 0xba, 0x40, 0xe6, 0x6a, 0x9e, 0x7f, 0x10, - 0x76, 0xd6, 0x3b, 0xad, 0x6e, 0x18, 0xd0, 0x86, 0x2d, 0x92, 0x31, 0xb6, 0xa5, 0xf0, 0x15, 0x3f, - 0x86, 0x1c, 0x60, 0x0c, 0x95, 0x5d, 0xf7, 0xff, 0xd0, 0x7d, 0xad, 0x46, 0xed, 0xd3, 0xc4, 0xbf, - 0xd5, 0x65, 0xee, 0x07, 0x67, 0x83, 0x38, 0x7b, 0x91, 0xd7, 0xf4, 0xeb, 0x7e, 0x14, 0x84, 0x2d, - 0xba, 0xe3, 0x87, 0x1d, 0xe6, 0x70, 0xc7, 0x3d, 0x12, 0xbd, 0x89, 0xce, 0xd5, 0x3e, 0x2c, 0x64, - 0x94, 0x70, 0x5a, 0x64, 0xb6, 0x1b, 0xf9, 0x96, 0xbf, 0xa4, 0x94, 0xaf, 0x9f, 0xd7, 0xcd, 0x22, - 0x5c, 0x7d, 0xb4, 0x40, 0x60, 0x33, 0x75, 0xde, 0x26, 0x0b, 0x61, 0xd4, 0xdd, 0xf7, 0x3a, 0x35, - 0xbf, 0xeb, 0x77, 0x5a, 0xa8, 0x33, 0x0b, 0xa7, 0xd8, 0x39, 0x5a, 0x76, 0xe1, 0x56, 0x0a, 0x07, - 0x7d, 0xd4, 0xee, 0x2f, 0x51, 0x7b, 0xb1, 0x16, 0xde, 0xef, 0xdc, 0xf7, 0xa2, 0xd6, 0x4a, 0x7d, - 0x93, 0x2b, 0xc2, 0xcc, 0xc9, 0x28, 0x9d, 0x9b, 0xa5, 0x81, 0xce, 0xcd, 0x2f, 0x93, 0xa9, 0xdd, - 0xc0, 0x6f, 0xb7, 0xd0, 0x0b, 0xc9, 0xbb, 0x77, 0xb9, 0x88, 0x47, 0x63, 0x03, 0xcb, 0x48, 0xaf, - 0x00, 0xf7, 0xad, 0x6e, 0x08, 0x36, 0xa0, 0x18, 0x3a, 0x3d, 0xb2, 0x20, 0x35, 0x7d, 0x89, 0x15, - 0xab, 0xe3, 0xd5, 0x62, 0x86, 0x84, 0x5d, 0x0d, 0x1b, 0x0f, 0x48, 0x31, 0x84, 0xbe, 0x2a, 0xd0, - 0x42, 0x3b, 0xc0, 0xdd, 0x61, 0x8c, 0xcd, 0x15, 0x66, 0xa1, 0x31, 0x13, 0x92, 0x41, 0xdd, 0x5f, - 0x2c, 0x91, 0xc7, 0xfb, 0x46, 0x4b, 0xd8, 0xd7, 0x5f, 0x94, 0x86, 0x2d, 0x3f, 0x9d, 0xc9, 0x69, - 0x65, 0xe6, 0x98, 0x17, 0x33, 0x72, 0xcb, 0x05, 0x8c, 0xdc, 0x5b, 0xe4, 0xdc, 0xfa, 0x41, 0x37, - 0x39, 0xa2, 0x26, 0xa2, 0xd5, 0xc8, 0x37, 0xc8, 0xc4, 0x81, 0xdf, 0x0a, 0x7a, 0x07, 0xe2, 0xb3, - 0x3e, 0x2d, 0x05, 0xe9, 0x0d, 0x06, 0xa5, 0x5a, 0xd2, 0x2c, 0x9e, 0x7d, 0xd2, 0x05, 0xc8, 0x01, - 0x20, 0xc8, 0xdd, 0x1f, 0x94, 0xc8, 0xbc, 0x5c, 0x50, 0x2b, 0xad, 0x16, 0x1d, 0xb7, 0xd8, 0x59, - 0x22, 0xe5, 0xa0, 0x2b, 0x18, 0x11, 0xc1, 0xa8, 0x4c, 0x95, 0x26, 0x0a, 0xa5, 0x1a, 0x4c, 0x95, - 0xbb, 0xf2, 0xf5, 0xe4, 0x18, 0xf2, 0x68, 0x80, 0x59, 0x1f, 0xdb, 0x92, 0x07, 0x68, 0x76, 0x52, - 0xb3, 0x64, 0xa2, 0xba, 0x62, 0x3b, 0x96, 0xaf, 0x09, 0x38, 0x28, 0x0a, 0x74, 0xe7, 0xe3, 0x29, - 0x25, 0x3b, 0x65, 0xe1, 0xdb, 0x2e, 0x9b, 0x72, 0x37, 0x05, 0x0c, 0x14, 0xd6, 0xfd, 0x99, 0x12, - 0x99, 0x91, 0x7d, 0x2c, 0xa8, 0xe4, 0xe2, 0x22, 0xd1, 0x0a, 0xae, 0x5e, 0x24, 0xa8, 0xa4, 0x32, - 0x8c, 0xa5, 0x9b, 0x56, 0x86, 0xd1, 0x4d, 0xdd, 0x6f, 0x53, 0x9d, 0x53, 0x36, 0xa7, 0xd1, 0xdb, - 0x89, 0xfd, 0xc4, 0xf9, 0x0a, 0xa9, 0x7a, 0x7c, 0xf0, 0x7d, 0x39, 0xcf, 0x2e, 0xe6, 0x59, 0xe8, - 0xd6, 0x37, 0xd3, 0x8a, 0xc1, 0x8a, 0xe4, 0x03, 0x9a, 0xa5, 0x73, 0x48, 0xce, 0x74, 0xc2, 0x84, - 0xed, 0x07, 0x0a, 0x5f, 0xcc, 0x23, 0x9a, 0xae, 0xe7, 0x09, 0x51, 0xcf, 0x99, 0x9b, 0x69, 0x7e, - 0xd0, 0x5f, 0x05, 0xb5, 0xfb, 0x84, 0x17, 0xa3, 0xc2, 0xea, 0xba, 0x50, 0xac, 0xae, 0xc1, 0x4e, - 0x0c, 0xf7, 0x37, 0x4b, 0xa4, 0x2a, 0xc9, 0x46, 0xe9, 0x13, 0xbf, 0x4b, 0x26, 0x63, 0xf6, 0x69, - 0xe4, 0x30, 0xbd, 0x5c, 0xac, 0xe9, 0xfc, 0x7b, 0xea, 0xcd, 0x8f, 0xff, 0x8e, 0x41, 0x72, 0x63, - 0x6e, 0x48, 0xd5, 0x81, 0x47, 0xcf, 0x0d, 0xa9, 0x9a, 0x36, 0xc0, 0x0d, 0xf9, 0x0f, 0x4a, 0x64, - 0x82, 0x3b, 0x87, 0x8a, 0x79, 0xd8, 0x0c, 0x5f, 0xb2, 0xe6, 0x78, 0x07, 0x81, 0xc2, 0xb5, 0x4c, - 0x47, 0xba, 0xca, 0xfe, 0xd9, 0x88, 0xc2, 0x03, 0xb1, 0x11, 0x5c, 0x28, 0xe2, 0x9c, 0xe2, 0x82, - 0x8f, 0x4b, 0x93, 0x3b, 0x92, 0x01, 0x68, 0x5e, 0xee, 0x6f, 0x54, 0x70, 0xd5, 0x6b, 0x52, 0x6b, - 0x5b, 0x2b, 0x9d, 0xc6, 0xb6, 0x56, 0x1e, 0xfd, 0xb6, 0xf6, 0x3e, 0x99, 0x6f, 0x1a, 0x3e, 0x79, - 0xbd, 0x99, 0x5e, 0x29, 0xe8, 0x6e, 0x36, 0x1c, 0xf9, 0xdc, 0x19, 0xb2, 0x66, 0xb3, 0x83, 0x34, - 0x7f, 0xc7, 0x27, 0x33, 0xfc, 0x40, 0x51, 0xd4, 0x37, 0x96, 0x3b, 0x67, 0xb9, 0xdf, 0x85, 0x97, - 0x50, 0x95, 0xb1, 0xa0, 0x93, 0x86, 0xc1, 0x08, 0x2c, 0xb6, 0xee, 0x5f, 0x1b, 0x27, 0xe3, 0xeb, - 0x87, 0x54, 0x97, 0x19, 0xe1, 0x2a, 0x3f, 0x20, 0x73, 0x41, 0xe7, 0x30, 0x6c, 0x1f, 0xfa, 0x2d, - 0x8e, 0x3f, 0xd9, 0x8e, 0x76, 0x5e, 0x54, 0x32, 0xb7, 0x69, 0x31, 0x83, 0x14, 0xf3, 0x51, 0xd8, - 0x93, 0xef, 0x50, 0x53, 0x96, 0xcd, 0x08, 0x61, 0x4c, 0xe6, 0x38, 0x49, 0xd9, 0x80, 0x8a, 0x95, - 0xa3, 0xad, 0x5e, 0xee, 0x9f, 0x15, 0x8c, 0x9c, 0x7b, 0x64, 0x6e, 0x37, 0x88, 0xa8, 0xc5, 0x41, - 0x0d, 0x42, 0x6a, 0x05, 0x1c, 0x74, 0x4f, 0x62, 0x48, 0xaa, 0x21, 0xd9, 0xb0, 0x58, 0x41, 0x8a, - 0x35, 0x35, 0x92, 0x66, 0xd1, 0x8e, 0xd1, 0x75, 0x4d, 0x0e, 0x5f, 0x97, 0xf2, 0x25, 0x6d, 0x99, - 0x9c, 0xc0, 0x66, 0x8c, 0xc2, 0xa8, 0xc9, 0x0c, 0x9f, 0x29, 0xb6, 0xa5, 0x2b, 0x61, 0xc4, 0x2d, - 0x1e, 0x8e, 0x43, 0x99, 0xc6, 0xce, 0x8f, 0xab, 0xb6, 0x4c, 0xd3, 0xa7, 0xc4, 0xee, 0x37, 0x71, - 0x03, 0xc2, 0x51, 0x3c, 0x0d, 0xd9, 0x7d, 0xcd, 0x96, 0xdd, 0x9f, 0x2a, 0xf0, 0x71, 0x07, 0xc8, - 0xed, 0xf7, 0xc8, 0xb4, 0xf1, 0xed, 0xd1, 0x51, 0xd8, 0x94, 0x47, 0x9d, 0x42, 0x80, 0x2b, 0x05, - 0x42, 0x9d, 0x81, 0x82, 0xa6, 0xc1, 0x81, 0x41, 0xc5, 0x2b, 0x1d, 0x11, 0x81, 0x6a, 0x19, 0x30, - 0x8c, 0xfb, 0x2a, 0x21, 0xeb, 0x0f, 0xfc, 0xe6, 0x4a, 0x93, 0x1d, 0xc4, 0x1b, 0xe7, 0x26, 0xa5, - 0xc1, 0xe7, 0x26, 0xee, 0xbb, 0x74, 0x33, 0x7c, 0x80, 0x3b, 0xbb, 0x34, 0xd3, 0xe8, 0x12, 0xf1, - 0x19, 0x80, 0xb5, 0x6a, 0x4a, 0x4f, 0x52, 0x4e, 0x06, 0x02, 0xcb, 0x8e, 0xd1, 0x1f, 0x78, 0x62, - 0xc1, 0x1a, 0x26, 0xef, 0x3a, 0x02, 0x81, 0xe3, 0xdc, 0x6f, 0x94, 0xc8, 0xdc, 0xc6, 0x9a, 0xa5, - 0x27, 0x2f, 0x13, 0xc2, 0xf5, 0xcd, 0xbb, 0x77, 0x6f, 0x4a, 0x3f, 0x2a, 0x77, 0x76, 0x29, 0x28, - 0x18, 0x14, 0xce, 0x13, 0xa4, 0xd2, 0xee, 0x75, 0x84, 0x1a, 0x38, 0x89, 0xfe, 0xd9, 0xad, 0x5e, - 0x07, 0x10, 0x66, 0x04, 0x36, 0x54, 0x0a, 0x07, 0x36, 0xe4, 0x87, 0xf6, 0xfd, 0x7c, 0x85, 0x2c, - 0x6c, 0xb4, 0xfd, 0x07, 0x56, 0xab, 0x69, 0x55, 0xad, 0x28, 0xa0, 0x93, 0x27, 0xed, 0x26, 0xa9, - 0x31, 0x28, 0x08, 0x6c, 0xe1, 0x58, 0x0b, 0x2b, 0xce, 0xa4, 0x32, 0xe2, 0x38, 0x93, 0xdc, 0x3e, - 0x3b, 0xbb, 0x64, 0x32, 0xe4, 0xdf, 0x9f, 0x4a, 0x31, 0x9c, 0xe8, 0x9f, 0x3d, 0xbe, 0x31, 0xe9, - 0xf1, 0x59, 0x16, 0xb3, 0x87, 0x1f, 0x7a, 0x2b, 0x61, 0x29, 0xa0, 0x20, 0x99, 0x2f, 0x7d, 0x86, - 0xcc, 0x98, 0x94, 0x43, 0x9d, 0x7e, 0x6f, 0x91, 0xb3, 0x1b, 0x18, 0x41, 0x9a, 0x8a, 0x85, 0x79, - 0x9d, 0x9a, 0x70, 0x74, 0xa5, 0xc6, 0x56, 0x80, 0x98, 0x15, 0x09, 0x27, 0x50, 0x60, 0xd2, 0xb9, - 0xff, 0xa1, 0x44, 0x9e, 0xbc, 0xba, 0xb6, 0x5e, 0x47, 0x71, 0x10, 0x27, 0x74, 0x81, 0xf5, 0x05, - 0xe3, 0xd1, 0x4f, 0xd9, 0x6d, 0x19, 0x3c, 0xd5, 0xa7, 0xac, 0xd7, 0x18, 0x3b, 0x81, 0x7d, 0x54, - 0x22, 0x52, 0xa9, 0x5e, 0x78, 0xf6, 0x6a, 0x40, 0xbf, 0x7d, 0x37, 0x4c, 0xc7, 0xcf, 0x45, 0x14, - 0x16, 0x63, 0x5c, 0xd5, 0x51, 0x3a, 0x7e, 0x0e, 0x14, 0x06, 0x0c, 0x2a, 0x5e, 0xf3, 0x61, 0x80, - 0x82, 0x52, 0x74, 0xca, 0xa8, 0x99, 0xc3, 0x41, 0x51, 0x60, 0xc7, 0x5a, 0x41, 0xc4, 0x74, 0x8a, - 0x23, 0xb1, 0x12, 0x55, 0xc7, 0x6a, 0x12, 0x01, 0x9a, 0xc6, 0xfd, 0x5b, 0x25, 0xf2, 0xd8, 0xd5, - 0x76, 0x8f, 0x0e, 0x7b, 0xb4, 0x1b, 0x5b, 0x8d, 0x7d, 0x95, 0x54, 0x7d, 0xa9, 0xff, 0x8a, 0xb6, - 0xaa, 0xbd, 0x45, 0x29, 0xc6, 0x3c, 0x78, 0x4f, 0xd1, 0x15, 0x88, 0x15, 0x1b, 0x2e, 0xb2, 0xe9, - 0x5f, 0x94, 0xc9, 0xec, 0xb5, 0xed, 0xed, 0xfa, 0x55, 0x3f, 0x11, 0xb2, 0x34, 0xdf, 0x61, 0x53, - 0x37, 0xac, 0xd5, 0xe9, 0x2b, 0xcb, 0x03, 0x56, 0x0f, 0xc6, 0x4a, 0x2f, 0xf3, 0x58, 0xe9, 0xe5, - 0xcd, 0x4e, 0x72, 0x2b, 0x6a, 0x24, 0x11, 0x1e, 0x27, 0x64, 0x59, 0xb7, 0x52, 0xde, 0x57, 0x06, - 0xc9, 0x7b, 0x3a, 0x58, 0x13, 0x71, 0x73, 0xdf, 0x57, 0xc6, 0xf7, 0xc7, 0x95, 0x3a, 0xc1, 0xa0, - 0xd4, 0xf6, 0xad, 0xde, 0x86, 0x4d, 0xfe, 0x03, 0x04, 0x29, 0x15, 0x3c, 0xd3, 0xfb, 0x49, 0xd2, - 0xbd, 0x46, 0x3b, 0x4b, 0xa7, 0xbe, 0x58, 0xed, 0x39, 0xda, 0x1c, 0x0e, 0x06, 0x2f, 0xa0, 0x17, - 0x96, 0x86, 0xc5, 0x60, 0x72, 0x74, 0x1b, 0x84, 0x68, 0xdc, 0x43, 0x32, 0x51, 0xdc, 0xbf, 0x58, - 0x26, 0x93, 0xd7, 0xe8, 0x76, 0xd5, 0xa6, 0x2c, 0x37, 0xc8, 0x98, 0x4f, 0xb7, 0xb9, 0x62, 0x8a, - 0xa8, 0xde, 0x10, 0xb9, 0xc7, 0x09, 0x7f, 0x03, 0x2b, 0xef, 0x00, 0x99, 0xc4, 0x76, 0x5f, 0x55, - 0x01, 0x96, 0x2f, 0xe5, 0x8f, 0x82, 0x9a, 0x12, 0x7c, 0x37, 0x15, 0x20, 0x90, 0x8c, 0x98, 0x6f, - 0xa6, 0xd9, 0x6d, 0xa0, 0x94, 0x4a, 0x8a, 0xc5, 0x50, 0x6f, 0xaf, 0xd5, 0x39, 0xb9, 0xe0, 0xcb, - 0x7d, 0x33, 0x12, 0x08, 0x9a, 0x9d, 0xfb, 0x26, 0x39, 0xc7, 0x4e, 0xf7, 0xe8, 0x74, 0xb3, 0xd6, - 0x4c, 0xee, 0xe4, 0x74, 0xff, 0x6e, 0x99, 0x9c, 0xd9, 0x6c, 0xac, 0x35, 0x6c, 0xaf, 0xda, 0x9b, - 0x64, 0x86, 0x6f, 0xb3, 0x38, 0xe9, 0xbc, 0xb6, 0x28, 0xaf, 0xdc, 0xd1, 0xdb, 0x06, 0x0e, 0x2c, - 0x4a, 0x3c, 0x36, 0x0d, 0xde, 0xef, 0xa4, 0xe3, 0x7c, 0x36, 0xdf, 0xb9, 0x09, 0x08, 0x47, 0x34, - 0xee, 0xd8, 0x5c, 0xc4, 0x29, 0xb4, 0xda, 0xb5, 0x3f, 0x4f, 0x55, 0xfe, 0xb8, 0x19, 0x07, 0x74, - 0x01, 0xd0, 0xf5, 0xef, 0x35, 0xe5, 0xf4, 0xd5, 0x3a, 0x3c, 0x36, 0x55, 0x61, 0x21, 0x45, 0x6d, - 0xc8, 0xdb, 0xf1, 0xc2, 0xbb, 0x7e, 0x7e, 0xa4, 0xe5, 0x57, 0x49, 0x55, 0x45, 0xc4, 0xc8, 0x40, - 0xa6, 0x52, 0x76, 0x20, 0x53, 0x01, 0x81, 0x23, 0x7d, 0x9d, 0x95, 0x4c, 0x5f, 0xe7, 0x3f, 0xa6, - 0x1a, 0xac, 0x3a, 0xfc, 0xa7, 0xf3, 0xb0, 0x4a, 0x05, 0x6f, 0xc2, 0x8e, 0x93, 0xc4, 0xa4, 0x7e, - 0x2e, 0x67, 0x26, 0xf2, 0x95, 0xc0, 0xe7, 0x4a, 0x5d, 0x96, 0x05, 0xcd, 0xc6, 0xd9, 0x22, 0x93, - 0xdd, 0xc8, 0x6f, 0x24, 0x2c, 0x5c, 0x77, 0x08, 0x8e, 0x6c, 0x56, 0xd7, 0x79, 0x49, 0x90, 0x2c, - 0xdc, 0x5f, 0x2b, 0x11, 0xb2, 0x15, 0x1c, 0xd0, 0xcd, 0xc5, 0xeb, 0xec, 0xf9, 0x23, 0xb4, 0x06, - 0x6f, 0x92, 0xb1, 0xb8, 0x4b, 0x97, 0x76, 0xa1, 0x23, 0x20, 0xdd, 0xa2, 0x06, 0x2d, 0xa3, 0x3f, - 0x03, 0xfe, 0x02, 0xc6, 0xc7, 0xfd, 0x65, 0x42, 0xe6, 0x34, 0x19, 0xaa, 0xe3, 0xce, 0x45, 0x2b, - 0x3e, 0xf5, 0x89, 0x54, 0x7c, 0x6a, 0x95, 0x51, 0x1b, 0x21, 0xa9, 0x09, 0xa9, 0x1c, 0x78, 0x0f, - 0x84, 0xf6, 0xff, 0x7a, 0xd1, 0x06, 0x61, 0x4d, 0xcb, 0x37, 0xbc, 0x07, 0x5c, 0x1d, 0x7a, 0x49, - 0x4e, 0x20, 0x0a, 0xf9, 0x90, 0x1f, 0xf4, 0xb0, 0x15, 0x88, 0xe6, 0xc6, 0x4f, 0xfc, 0x67, 0xfd, - 0x9b, 0x09, 0x45, 0xac, 0x8e, 0xd5, 0x1a, 0x74, 0x84, 0xcb, 0x6e, 0xc8, 0x5a, 0x83, 0x4e, 0xba, - 0xd6, 0xa0, 0x53, 0xa0, 0xd6, 0xa0, 0x83, 0x61, 0x6c, 0x93, 0xc2, 0xd3, 0xcd, 0xc2, 0xa8, 0xa6, - 0xaf, 0xbc, 0x35, 0x54, 0xd5, 0xc2, 0x65, 0xce, 0xab, 0xbf, 0x24, 0x75, 0x40, 0x01, 0xcd, 0x6d, - 0x82, 0xac, 0xda, 0xf9, 0x05, 0x6a, 0x33, 0x88, 0xff, 0x31, 0x62, 0x89, 0x1a, 0x8f, 0x62, 0x97, - 0x7a, 0xfb, 0x24, 0xad, 0x11, 0x2c, 0x78, 0xa3, 0x7e, 0x48, 0x8a, 0x18, 0x1b, 0x99, 0xdb, 0xb6, - 0x54, 0x7b, 0x9c, 0x6f, 0x95, 0xc8, 0x39, 0xfa, 0x9d, 0x78, 0x8d, 0x1c, 0x06, 0x78, 0x30, 0x28, - 0x42, 0xc5, 0x36, 0x86, 0x9d, 0x27, 0x7d, 0x8c, 0x78, 0x73, 0x3f, 0x27, 0x8f, 0x1f, 0xb3, 0x48, - 0x72, 0x1b, 0x9d, 0xd9, 0xc2, 0xa5, 0x16, 0x99, 0x92, 0x13, 0x33, 0x43, 0xfb, 0x5e, 0x35, 0x37, - 0xe3, 0xe3, 0x57, 0xa0, 0x74, 0x84, 0x2d, 0xbf, 0xd3, 0xf3, 0x3a, 0x09, 0x86, 0xfe, 0x6b, 0x5d, - 0x9d, 0xd5, 0x22, 0x26, 0xe2, 0x08, 0x6b, 0xd9, 0x27, 0x33, 0xe6, 0x9c, 0x1b, 0x61, 0x4d, 0x21, - 0x39, 0x9b, 0x31, 0x9f, 0x46, 0x58, 0x61, 0x8f, 0x3c, 0x31, 0x70, 0x5e, 0x8c, 0xae, 0x5a, 0x74, - 0xee, 0x1b, 0x02, 0xf3, 0x34, 0x1c, 0x2c, 0x37, 0x6c, 0x07, 0xcb, 0x0b, 0x45, 0x97, 0xce, 0x00, - 0x2f, 0xcb, 0xae, 0xd9, 0x7e, 0xdc, 0x09, 0x9c, 0x6d, 0x32, 0xd1, 0x46, 0x88, 0x3c, 0xd5, 0x79, - 0x79, 0x98, 0xc5, 0xa9, 0x95, 0x0b, 0x06, 0x8f, 0x41, 0xf0, 0x72, 0x7f, 0xbd, 0x44, 0xc6, 0x4e, - 0x63, 0x78, 0xea, 0xf6, 0xf0, 0x0c, 0x52, 0x51, 0xc5, 0x9d, 0xcd, 0x65, 0xf0, 0xee, 0xaf, 0x3f, - 0xa0, 0xd6, 0x6c, 0xcc, 0x54, 0xc9, 0xcc, 0x11, 0xfa, 0xa5, 0x32, 0x99, 0xc6, 0x8a, 0xa4, 0xbf, - 0xe7, 0xb3, 0xe8, 0xff, 0xdb, 0xf1, 0xdb, 0xd2, 0x2d, 0x9c, 0x36, 0xbb, 0xb6, 0x4c, 0x24, 0xd8, - 0xb4, 0x58, 0x78, 0xd7, 0xf4, 0x9a, 0x0b, 0x95, 0x48, 0x15, 0xb6, 0x5c, 0xea, 0x60, 0xd3, 0xa2, - 0xe6, 0x7f, 0xdf, 0x4b, 0x9a, 0xfb, 0xc2, 0x24, 0x53, 0xcd, 0xbd, 0x8b, 0x40, 0xe0, 0x38, 0x67, - 0x85, 0xcc, 0xcb, 0x19, 0x7b, 0x87, 0x0f, 0x9d, 0x50, 0x17, 0xd5, 0x7d, 0x3b, 0xb0, 0xd1, 0x90, - 0xa6, 0x77, 0x3e, 0x43, 0xe6, 0x70, 0x70, 0xc2, 0x5e, 0x22, 0x83, 0x0e, 0xc6, 0x59, 0xd0, 0x01, - 0x0b, 0xf2, 0xdc, 0xb6, 0x30, 0x90, 0xa2, 0x74, 0x7f, 0x94, 0x9c, 0xdd, 0x0a, 0xbd, 0xd6, 0xaa, - 0xd7, 0xf6, 0x3a, 0x4d, 0x3f, 0xda, 0xec, 0xec, 0xe5, 0x9e, 0xcf, 0x9a, 0x67, 0xa8, 0xe5, 0xbc, - 0x33, 0x54, 0x37, 0x22, 0x8e, 0x59, 0x81, 0x08, 0x97, 0x79, 0x97, 0x4c, 0x06, 0xbc, 0x2a, 0x31, - 0x6b, 0x2f, 0xe7, 0x39, 0x87, 0xfa, 0xda, 0x68, 0x84, 0x7f, 0x70, 0x00, 0x48, 0x96, 0x68, 0x49, - 0x64, 0x79, 0x93, 0xf2, 0x8d, 0x35, 0xf7, 0xaf, 0x94, 0xc8, 0xfc, 0xcd, 0xd4, 0xa5, 0x2e, 0x8c, - 0xe5, 0xf2, 0xa3, 0x0c, 0xd7, 0x58, 0x83, 0x41, 0x41, 0x60, 0x1f, 0xba, 0x99, 0xfe, 0xd3, 0x65, - 0x52, 0x65, 0xb1, 0x97, 0x5d, 0xaf, 0x39, 0x4a, 0xa5, 0xf4, 0x86, 0xa5, 0x94, 0xe6, 0x18, 0x89, - 0xaa, 0x41, 0x83, 0x74, 0x52, 0xbc, 0xd6, 0x27, 0x2e, 0x39, 0x15, 0xb2, 0x0f, 0x35, 0x43, 0x7e, - 0x1f, 0x66, 0xce, 0xbe, 0x13, 0x25, 0x2f, 0x40, 0xb1, 0x53, 0x4d, 0x45, 0xfb, 0xe8, 0x9d, 0x6a, - 0xaa, 0xa6, 0x0d, 0x90, 0x4a, 0x75, 0xa3, 0xf5, 0x4c, 0x6c, 0x7f, 0x81, 0x05, 0xd2, 0x79, 0xed, - 0xe0, 0x03, 0x5f, 0x5d, 0x16, 0x7c, 0x5a, 0xc4, 0xc5, 0x09, 0xe8, 0x87, 0x4c, 0xc0, 0x88, 0x5f, - 0xfc, 0x0e, 0xa8, 0x2e, 0xe2, 0x5e, 0xa3, 0x33, 0xd5, 0x1e, 0x3b, 0xe7, 0x75, 0x32, 0xde, 0xdd, - 0xf7, 0x62, 0x3f, 0x15, 0xa1, 0x31, 0x5e, 0x47, 0x20, 0xe5, 0x36, 0xa7, 0x0a, 0x30, 0x08, 0x70, - 0x6a, 0xf7, 0x4f, 0xa8, 0xac, 0xc7, 0x98, 0x86, 0x11, 0xce, 0xb1, 0x6b, 0xd6, 0x1c, 0x7b, 0x3e, - 0xff, 0xe6, 0xf8, 0xc0, 0xe9, 0x55, 0x4f, 0x4d, 0xaf, 0x17, 0x0a, 0xf0, 0x3a, 0x7e, 0x66, 0x1d, - 0x90, 0x69, 0x76, 0x33, 0x5d, 0x84, 0xa6, 0xbc, 0x6a, 0x19, 0x50, 0x4f, 0xa7, 0x0c, 0xa8, 0x79, - 0x83, 0xd4, 0x30, 0xa3, 0x5e, 0x24, 0x93, 0x22, 0x14, 0x22, 0x1d, 0x3d, 0x28, 0x68, 0x41, 0xe2, - 0xdd, 0x5f, 0xad, 0x10, 0xeb, 0x26, 0xbc, 0xf3, 0x9d, 0x12, 0xa1, 0x4a, 0x0b, 0xbb, 0xba, 0xd0, - 0xaa, 0xf5, 0xd0, 0x5f, 0x86, 0x2e, 0xad, 0x56, 0xaf, 0x4d, 0xff, 0xdb, 0xdc, 0xeb, 0x84, 0x0a, - 0x8c, 0xbe, 0x9d, 0x1e, 0xf3, 0xae, 0x16, 0xbe, 0x80, 0xaf, 0xce, 0x42, 0xaf, 0xd0, 0xb6, 0x2c, - 0xc3, 0x50, 0xb5, 0xc0, 0x90, 0xad, 0x72, 0x7e, 0xaf, 0x44, 0x2e, 0xf1, 0xbb, 0xe0, 0xc5, 0x7b, - 0x52, 0xc8, 0xf0, 0xac, 0x4b, 0xa6, 0x9a, 0x1d, 0x06, 0x2b, 0xae, 0xbe, 0x21, 0x06, 0xf9, 0x52, - 0x7d, 0xb8, 0x5a, 0x61, 0xd8, 0x66, 0xba, 0xff, 0xaa, 0x42, 0xd7, 0x2f, 0x1d, 0x4f, 0x7d, 0x0f, - 0xf4, 0x75, 0x6b, 0x9a, 0x7c, 0x32, 0x35, 0x4d, 0xce, 0x58, 0xc4, 0x0f, 0xe7, 0x0a, 0x68, 0x42, - 0xce, 0xe0, 0x79, 0xe3, 0x35, 0xdf, 0x8b, 0x92, 0x1d, 0xdf, 0x63, 0x07, 0x8f, 0x62, 0x11, 0x0c, - 0x75, 0x98, 0xa9, 0xe2, 0x6b, 0xb6, 0xd2, 0xdc, 0xa0, 0xbf, 0x02, 0xe7, 0x3e, 0x71, 0xd8, 0x29, - 0x67, 0xe4, 0x51, 0xa5, 0x8b, 0x75, 0x26, 0x10, 0x0e, 0xd9, 0x21, 0xab, 0x5d, 0x12, 0xd5, 0x3a, - 0x5b, 0x7d, 0xec, 0x20, 0xa3, 0x0a, 0xe3, 0x28, 0x7b, 0xbc, 0xe8, 0x51, 0xf6, 0x44, 0x4e, 0xe0, - 0xee, 0x4f, 0x95, 0xc8, 0x59, 0xfc, 0x30, 0x76, 0x90, 0x67, 0xec, 0x84, 0x64, 0x1e, 0x7b, 0xd0, - 0xf6, 0x13, 0x09, 0x13, 0x2b, 0x2c, 0x47, 0x97, 0xb6, 0xf9, 0x68, 0x8d, 0xed, 0xba, 0xcd, 0x0c, - 0xd2, 0xdc, 0xdd, 0x5f, 0x2d, 0x11, 0x16, 0x45, 0x76, 0x1a, 0xfb, 0xd8, 0x55, 0x7b, 0x1f, 0x73, - 0xf3, 0x85, 0xc6, 0x80, 0x2d, 0xec, 0x35, 0xb2, 0x80, 0xd8, 0x7a, 0x14, 0x3e, 0x38, 0x92, 0xca, - 0x75, 0xbe, 0x6f, 0xf6, 0x2f, 0x97, 0xb8, 0xb8, 0x53, 0x5a, 0xf1, 0x7d, 0x0c, 0x14, 0xd3, 0xbf, - 0x71, 0x21, 0x4b, 0x25, 0x70, 0xb9, 0xb8, 0x40, 0x63, 0xeb, 0xdf, 0x88, 0x14, 0x4b, 0x31, 0x84, - 0xfe, 0x3a, 0xdc, 0xbf, 0x57, 0x22, 0x8f, 0x9b, 0x84, 0xc6, 0x75, 0xb1, 0x3c, 0x87, 0x68, 0x8d, - 0x4c, 0x85, 0x5d, 0xcc, 0xfc, 0xa2, 0x2c, 0x80, 0x17, 0xe4, 0x88, 0xdf, 0x12, 0x70, 0xba, 0x72, - 0xcf, 0x99, 0xdc, 0x25, 0x1c, 0x54, 0x49, 0xcc, 0x28, 0xc1, 0x2c, 0xd1, 0x58, 0x5c, 0xf4, 0x63, - 0x19, 0x25, 0xd8, 0x31, 0x00, 0x5d, 0xe4, 0x1c, 0xe3, 0xfe, 0xd5, 0x12, 0x1f, 0x65, 0xb3, 0xe9, - 0xce, 0xd7, 0xc8, 0xc2, 0x01, 0x1a, 0x0b, 0xeb, 0x0f, 0xba, 0xb8, 0x85, 0xb0, 0x63, 0xcc, 0x52, - 0x11, 0xc1, 0x39, 0xa0, 0xbb, 0xab, 0x8b, 0xa2, 0xf5, 0x0b, 0x37, 0x52, 0x6c, 0xa1, 0xaf, 0x22, - 0xf7, 0xf7, 0xc5, 0x5c, 0x65, 0x5a, 0x0b, 0x5d, 0x6c, 0xdd, 0xb0, 0xb5, 0xb6, 0x59, 0x03, 0x31, - 0x56, 0x6a, 0xb1, 0xd5, 0x39, 0x18, 0x24, 0x1e, 0xcf, 0xe5, 0x7c, 0x6a, 0xaa, 0x45, 0x54, 0x61, - 0xd9, 0xac, 0xa5, 0xd3, 0x97, 0xac, 0x2b, 0x0c, 0x18, 0x54, 0x58, 0xa6, 0x1b, 0x85, 0x87, 0x41, - 0x8b, 0x85, 0x6d, 0x57, 0xec, 0x32, 0x75, 0x85, 0x01, 0x83, 0x0a, 0x4d, 0xb4, 0x5e, 0x27, 0xe6, - 0x02, 0xdc, 0xdb, 0x11, 0x89, 0x10, 0xa6, 0xb4, 0x89, 0x76, 0xdb, 0x44, 0x82, 0x4d, 0xeb, 0xfe, - 0x4e, 0x95, 0x10, 0xad, 0x22, 0xa0, 0x87, 0x70, 0xaa, 0xe9, 0x51, 0x05, 0x89, 0x67, 0xb9, 0xa9, - 0xe4, 0xdf, 0x6f, 0xd1, 0x85, 0x97, 0xd7, 0x44, 0x41, 0xee, 0xdb, 0x7a, 0x45, 0x4e, 0x10, 0x09, - 0xce, 0xf5, 0x67, 0xa9, 0x9a, 0x9d, 0xaf, 0x97, 0xc8, 0xb4, 0xd7, 0xc6, 0x3b, 0xb0, 0x09, 0xeb, - 0x51, 0xb9, 0x88, 0xb3, 0xd2, 0x68, 0xc9, 0x8a, 0x2e, 0xcb, 0x1b, 0xf3, 0xaa, 0x3c, 0xd5, 0x32, - 0x30, 0xb9, 0xed, 0x31, 0x9b, 0xe0, 0xbc, 0x22, 0x55, 0x4b, 0xfe, 0x51, 0x96, 0xd2, 0xaa, 0x65, - 0x95, 0x89, 0x06, 0x43, 0xab, 0xc4, 0x9b, 0x22, 0x46, 0x0c, 0xfb, 0x58, 0x91, 0x3b, 0xa6, 0xd6, - 0xa6, 0x99, 0x77, 0xdd, 0x1f, 0xcf, 0xa2, 0x74, 0x44, 0xeb, 0x78, 0x91, 0x0b, 0x9c, 0x86, 0xee, - 0x96, 0x13, 0xcd, 0x9a, 0x90, 0xf9, 0x96, 0xbd, 0x49, 0x88, 0x10, 0xa5, 0xcb, 0xf9, 0x35, 0xa4, - 0x76, 0x17, 0xbd, 0x2d, 0xa4, 0x10, 0x90, 0xae, 0x82, 0xf6, 0x88, 0x45, 0x14, 0x6f, 0x76, 0x76, - 0x43, 0x11, 0xa5, 0xf4, 0x72, 0x81, 0x6f, 0x7e, 0x14, 0x53, 0xf1, 0x8c, 0x65, 0xf4, 0x36, 0x70, - 0x53, 0x70, 0x01, 0xc5, 0x0f, 0xdd, 0x44, 0xec, 0x76, 0x04, 0xde, 0xa9, 0xad, 0x0c, 0x71, 0x51, - 0x84, 0xdd, 0xad, 0xd0, 0x9b, 0x2f, 0xfb, 0x49, 0xc5, 0x15, 0xe7, 0x45, 0xf5, 0x7a, 0x71, 0xe5, - 0x35, 0xde, 0xec, 0xdc, 0x8e, 0x7d, 0x76, 0x8f, 0xb6, 0xba, 0xfa, 0xac, 0xbe, 0x18, 0xcb, 0xe1, - 0x99, 0x59, 0x8e, 0xac, 0x92, 0xb8, 0x07, 0x8b, 0xdf, 0x32, 0x79, 0xd2, 0x22, 0x29, 0xd2, 0x50, - 0x3b, 0xd5, 0x92, 0x1e, 0xec, 0x3b, 0x36, 0x33, 0x48, 0x73, 0x5f, 0x0a, 0xc8, 0xac, 0xb5, 0x62, - 0x47, 0xe8, 0xec, 0x6c, 0x93, 0x85, 0xf4, 0x92, 0x1c, 0xa1, 0x8f, 0xf3, 0x8f, 0xc7, 0xc8, 0x9c, - 0x3d, 0x31, 0x30, 0x82, 0xe1, 0x80, 0xa5, 0x36, 0xd2, 0x09, 0x55, 0xd4, 0xfc, 0xbf, 0x21, 0x11, - 0xa0, 0x69, 0x58, 0x6a, 0x19, 0x56, 0xfc, 0xf6, 0xed, 0x7e, 0xe1, 0xdd, 0x50, 0x18, 0x30, 0xa8, - 0x50, 0x61, 0xdb, 0x09, 0xc3, 0x44, 0x09, 0x6e, 0x35, 0x67, 0x56, 0x19, 0x14, 0x04, 0x16, 0x05, - 0xf6, 0x3d, 0xec, 0x50, 0xdb, 0xf6, 0x77, 0x29, 0x81, 0x7d, 0xdd, 0x44, 0x82, 0x4d, 0x8b, 0x1b, - 0x50, 0x18, 0xb3, 0x49, 0x28, 0xd4, 0x42, 0x1d, 0x8b, 0xd3, 0xe0, 0xb7, 0x85, 0x24, 0xde, 0xf9, - 0x12, 0x79, 0x5c, 0x5d, 0xee, 0x01, 0xee, 0x3f, 0x94, 0x35, 0x4e, 0x58, 0xb6, 0xdd, 0xe3, 0x6b, - 0xd9, 0x64, 0x30, 0xa8, 0x3c, 0x1e, 0xf1, 0x0a, 0x95, 0x4e, 0x72, 0x9c, 0xb4, 0x8f, 0x78, 0xaf, - 0x5b, 0x58, 0x48, 0x51, 0x53, 0x7d, 0x62, 0x01, 0x21, 0x4c, 0x95, 0x92, 0x1c, 0xf8, 0x25, 0x25, - 0xb5, 0x33, 0x5f, 0x4f, 0xe1, 0xa1, 0xaf, 0x04, 0xba, 0x0e, 0xb9, 0x6e, 0x81, 0x16, 0x0c, 0xfb, - 0x0e, 0x22, 0xaa, 0x50, 0x2d, 0x82, 0x5b, 0x36, 0x1a, 0xd2, 0xf4, 0x78, 0x46, 0xee, 0x45, 0xf4, - 0xa3, 0x27, 0x54, 0x45, 0xe8, 0x45, 0xfc, 0x86, 0xba, 0x71, 0x46, 0xbe, 0x62, 0xe0, 0xc0, 0xa2, - 0x74, 0x3f, 0x20, 0x67, 0x33, 0x82, 0x97, 0x71, 0xe2, 0xd0, 0x09, 0x2a, 0xfb, 0x94, 0x8a, 0xc6, - 0xc1, 0x1b, 0x2b, 0xa2, 0x37, 0x06, 0x15, 0xce, 0x4e, 0xe6, 0x38, 0x35, 0xf2, 0x9c, 0xa9, 0xd9, - 0xb9, 0x21, 0x11, 0xa0, 0x69, 0xdc, 0xff, 0x46, 0x77, 0x6d, 0xed, 0x66, 0x28, 0x10, 0x83, 0x41, - 0xbb, 0x29, 0x53, 0xf7, 0x19, 0x29, 0xb3, 0x54, 0x37, 0xaf, 0x1a, 0x38, 0xb0, 0x28, 0xb1, 0x6d, - 0x1d, 0xe9, 0x34, 0x49, 0xc7, 0xfe, 0x28, 0x6f, 0x0a, 0x68, 0x1a, 0xf4, 0xf1, 0xc5, 0x7e, 0x7b, - 0x77, 0x2b, 0xe8, 0xdc, 0x13, 0x13, 0x5b, 0x49, 0xe5, 0x86, 0x80, 0x83, 0xa2, 0x70, 0xde, 0x26, - 0x95, 0x5e, 0xd0, 0x12, 0x53, 0x79, 0x59, 0xea, 0x9d, 0x74, 0x35, 0x51, 0x89, 0xf9, 0x74, 0x76, - 0x3e, 0x42, 0x34, 0x23, 0xe3, 0x65, 0x5c, 0x7c, 0x58, 0x34, 0xcb, 0x7f, 0x3c, 0x31, 0xa4, 0xff, - 0x98, 0x7e, 0x33, 0xd1, 0x67, 0x39, 0x93, 0x2b, 0xfa, 0x9b, 0x5d, 0x55, 0x18, 0x30, 0xa8, 0xd0, - 0x18, 0x6d, 0x52, 0x03, 0x4c, 0x5a, 0x6b, 0x3c, 0xb2, 0x76, 0xea, 0x23, 0x18, 0xa3, 0x6b, 0x69, - 0x6e, 0xd0, 0x5f, 0x81, 0xd3, 0x25, 0x67, 0x5a, 0xb8, 0x8e, 0xac, 0x5a, 0xab, 0x27, 0x88, 0xe7, - 0xc5, 0x1a, 0x6b, 0x69, 0x4e, 0xd0, 0xcf, 0xdc, 0xf9, 0x0a, 0x59, 0x92, 0xc0, 0xfe, 0xeb, 0x7b, - 0x6c, 0xb9, 0x54, 0x56, 0x9f, 0xa2, 0xdc, 0x96, 0x6a, 0x03, 0xa9, 0xe0, 0x18, 0x0e, 0xce, 0xbb, - 0x64, 0x82, 0x9d, 0x38, 0xc4, 0x8b, 0xd3, 0x6c, 0xb7, 0x7b, 0xad, 0xa8, 0xc3, 0x6d, 0x99, 0x9d, - 0x5b, 0x88, 0x80, 0x44, 0x7d, 0x8a, 0xc3, 0x80, 0x20, 0x78, 0xd2, 0xf1, 0x9a, 0xf6, 0x3a, 0x9d, - 0x30, 0xf1, 0xb8, 0x12, 0x36, 0x53, 0x44, 0x8f, 0x34, 0xaa, 0x58, 0xd1, 0x65, 0x79, 0x3d, 0x2a, - 0x3a, 0xca, 0xc0, 0x80, 0x59, 0x05, 0x6e, 0xe3, 0xe1, 0x7d, 0x14, 0x98, 0xd2, 0xe9, 0x1e, 0x2f, - 0xce, 0x16, 0xd9, 0xc6, 0x6f, 0x59, 0x85, 0x0c, 0x09, 0x66, 0x33, 0x83, 0x34, 0x77, 0x0c, 0xb7, - 0x35, 0xfc, 0xa8, 0x73, 0x3a, 0xdc, 0x56, 0xfb, 0x51, 0x4d, 0xb7, 0x29, 0xbb, 0x1a, 0xca, 0x43, - 0xf3, 0x98, 0x24, 0x98, 0x4f, 0x5d, 0x0d, 0xd5, 0x28, 0x30, 0xe9, 0x96, 0xde, 0x22, 0xd3, 0xc6, - 0x80, 0x0f, 0x13, 0xd7, 0xb9, 0xf4, 0x79, 0xba, 0xfb, 0xa7, 0x06, 0x72, 0xa8, 0xb8, 0xd0, 0xff, - 0x5e, 0x26, 0xf3, 0x19, 0x27, 0x19, 0xf7, 0x02, 0x16, 0xf9, 0x6c, 0x89, 0xbc, 0xeb, 0x14, 0x06, - 0x0c, 0x63, 0x0b, 0xae, 0x72, 0x01, 0xc1, 0x25, 0xa5, 0x68, 0x65, 0xa0, 0x14, 0x15, 0xc2, 0x6a, - 0xec, 0xe4, 0xc2, 0xca, 0xde, 0x1d, 0xc6, 0x0b, 0xed, 0x0e, 0x0f, 0x41, 0xc0, 0x59, 0x1b, 0xcc, - 0x64, 0x81, 0x0d, 0xe6, 0xc3, 0x12, 0x99, 0xb3, 0x67, 0x5e, 0x81, 0x11, 0x7f, 0x54, 0x07, 0x70, - 0x99, 0x19, 0x62, 0x49, 0x14, 0xb6, 0xdb, 0x7e, 0x24, 0x22, 0xc5, 0xe6, 0x84, 0x5d, 0x25, 0xa0, - 0x60, 0x50, 0xb8, 0xbf, 0x50, 0x26, 0x0b, 0x3a, 0x6c, 0x58, 0xa4, 0x30, 0x1d, 0xdd, 0xd1, 0xc0, - 0xb6, 0x75, 0x34, 0x90, 0x97, 0x99, 0x34, 0xd5, 0xae, 0x81, 0xc7, 0x04, 0xef, 0xa6, 0x8e, 0x09, - 0x5e, 0x1b, 0x92, 0xef, 0xf1, 0x47, 0x06, 0xff, 0xa4, 0x4c, 0x1e, 0x4b, 0x17, 0x59, 0x6b, 0x7b, - 0xc1, 0xc1, 0x08, 0xc7, 0xe9, 0x4b, 0xd6, 0x38, 0xbd, 0x31, 0x5c, 0x7f, 0x58, 0xe3, 0x06, 0x0e, - 0x96, 0x97, 0x1a, 0xac, 0xb7, 0x4e, 0xc2, 0xfc, 0xf8, 0x11, 0xfb, 0x8f, 0x25, 0xf2, 0x44, 0x66, - 0xb9, 0xd3, 0x70, 0x81, 0x7e, 0xd1, 0x76, 0x81, 0xbe, 0x7a, 0x82, 0xee, 0x0d, 0xf0, 0x89, 0xfe, - 0x97, 0xf2, 0x80, 0x6e, 0x31, 0x6f, 0xd9, 0x2d, 0xba, 0xfd, 0x36, 0xe9, 0x26, 0x15, 0x63, 0x6c, - 0xa4, 0x3c, 0xe4, 0xbb, 0xc8, 0xf6, 0x4f, 0x0d, 0xa6, 0x6b, 0x7f, 0x29, 0xcd, 0x42, 0xa3, 0xc1, - 0xe4, 0x60, 0xe7, 0xc6, 0x2a, 0x8f, 0x28, 0x37, 0x16, 0x95, 0x31, 0x87, 0xca, 0x4a, 0x4f, 0x3b, - 0xe1, 0x0c, 0xfb, 0xdd, 0xa0, 0xa2, 0x6a, 0x12, 0xea, 0xb4, 0x3c, 0x44, 0x62, 0x2c, 0x77, 0xc1, - 0x59, 0x1f, 0xd0, 0x8c, 0xb7, 0xe0, 0x77, 0x1f, 0x95, 0xc7, 0x52, 0xf1, 0x74, 0xbf, 0x59, 0x21, - 0x1f, 0x3f, 0x66, 0xda, 0xd1, 0x4d, 0xc2, 0x3a, 0xf9, 0x7c, 0x29, 0xed, 0x9e, 0x5a, 0xca, 0x2c, - 0x6c, 0xf9, 0xab, 0x52, 0x1f, 0xab, 0xfc, 0x91, 0x3f, 0xd6, 0xcf, 0x9b, 0xce, 0x44, 0x1e, 0xea, - 0x78, 0xf5, 0xc4, 0x0b, 0xeb, 0xe1, 0x79, 0x17, 0x4f, 0xd1, 0xf1, 0x81, 0xe9, 0xa8, 0x3f, 0x99, - 0xd9, 0x29, 0x2b, 0xc0, 0x02, 0xaf, 0x8a, 0x21, 0xd0, 0xb8, 0x8b, 0xa2, 0xaf, 0x8a, 0x49, 0x04, - 0x68, 0x1a, 0x2b, 0x8e, 0xa2, 0x9c, 0x1b, 0x47, 0xf1, 0x6f, 0x4b, 0xe4, 0x5c, 0xba, 0x11, 0xa7, - 0x21, 0x75, 0x1a, 0xb6, 0xd4, 0x59, 0x1e, 0xee, 0xdb, 0x0f, 0x10, 0x38, 0x3f, 0x37, 0x43, 0xce, - 0xf7, 0x6d, 0x56, 0x7c, 0x18, 0x7f, 0xbc, 0x44, 0xce, 0xec, 0x31, 0xfb, 0xc2, 0xb8, 0xf1, 0x23, - 0x3a, 0x96, 0x73, 0xdd, 0xe9, 0xd8, 0x8b, 0x42, 0xdc, 0x5a, 0xea, 0x23, 0x81, 0xfe, 0xca, 0x9c, - 0x9f, 0xa1, 0x43, 0xed, 0xdd, 0x8f, 0xfb, 0xf2, 0xe1, 0x8b, 0x79, 0xf4, 0xf9, 0x1c, 0x57, 0x5e, - 0x4e, 0x26, 0xfd, 0xd5, 0x45, 0x8c, 0x15, 0xcd, 0xa2, 0x82, 0xcc, 0x5a, 0xa9, 0x12, 0xc0, 0xb3, - 0x84, 0xa1, 0xda, 0x57, 0xe8, 0x0e, 0x5a, 0xd6, 0xfd, 0x03, 0x2e, 0x93, 0x24, 0x06, 0x14, 0x47, - 0xe7, 0x3d, 0x52, 0xdd, 0x93, 0x97, 0x7c, 0x84, 0xd0, 0xcb, 0xd9, 0x59, 0x32, 0xef, 0x04, 0xf1, - 0x28, 0x77, 0x85, 0x02, 0xcd, 0xd4, 0xb9, 0x46, 0x2a, 0x9d, 0xdd, 0x58, 0xdc, 0xbb, 0xcd, 0x8b, - 0xa3, 0xb1, 0xa3, 0x96, 0xf8, 0x4d, 0x42, 0x0a, 0x04, 0x64, 0x81, 0x9c, 0xa2, 0x9d, 0x96, 0xf0, - 0x61, 0xe7, 0x70, 0x82, 0xd5, 0x5a, 0x3f, 0x27, 0x0a, 0x04, 0x64, 0xc1, 0x02, 0xf6, 0xf0, 0xbe, - 0x82, 0x70, 0x50, 0xe7, 0x5c, 0xca, 0xee, 0xbb, 0x95, 0xc1, 0x53, 0xca, 0x31, 0x30, 0x70, 0x46, - 0xe8, 0x99, 0x6e, 0xb2, 0x14, 0xd0, 0xc2, 0x7f, 0x90, 0x97, 0x18, 0xb8, 0x2f, 0x5d, 0x34, 0x3f, - 0x48, 0xe3, 0x70, 0x10, 0xbc, 0x18, 0x57, 0xbf, 0xbb, 0xbf, 0x1b, 0x0b, 0xff, 0x40, 0x1e, 0xd7, - 0xbe, 0x64, 0xde, 0x82, 0x2b, 0x83, 0x83, 0xe0, 0xe5, 0xd4, 0x48, 0x79, 0xb7, 0x29, 0xf2, 0x38, - 0xe6, 0x58, 0xb4, 0xf6, 0xb5, 0xd0, 0xd5, 0x09, 0x8c, 0xa0, 0xdb, 0x58, 0x03, 0x5a, 0x9e, 0xea, - 0x23, 0x93, 0xbb, 0xfc, 0xa6, 0x9f, 0xc8, 0xd9, 0x78, 0x39, 0xef, 0x36, 0x62, 0xdf, 0xb5, 0x40, - 0x7e, 0x93, 0x41, 0x20, 0x40, 0xb2, 0xa3, 0xfb, 0x30, 0xd9, 0x55, 0x57, 0x17, 0x45, 0xd2, 0xc6, - 0xe5, 0xe1, 0xae, 0x3a, 0x0a, 0xeb, 0x59, 0x41, 0xc1, 0xe0, 0x88, 0x73, 0xde, 0x93, 0x59, 0xec, - 0x59, 0xc2, 0xc6, 0xdc, 0x39, 0x9f, 0x99, 0xf4, 0x9e, 0xcf, 0x79, 0x85, 0x02, 0xcd, 0xd4, 0xe9, - 0x91, 0xd9, 0xc3, 0xb8, 0xbb, 0xef, 0xcb, 0xa5, 0xcf, 0xb2, 0x38, 0x4e, 0x5f, 0xf9, 0x5c, 0x4e, - 0x6a, 0x4e, 0x51, 0x24, 0x88, 0x92, 0x9e, 0xd7, 0xee, 0x93, 0x60, 0x2c, 0x1d, 0xd2, 0x1d, 0x93, - 0x2d, 0xd8, 0xb5, 0xe0, 0x27, 0x79, 0xbf, 0x17, 0xee, 0x1c, 0x25, 0xbe, 0xc8, 0xf2, 0x98, 0xf3, - 0x49, 0xde, 0xe1, 0xc4, 0xfd, 0x9f, 0x44, 0x20, 0x40, 0xb2, 0x53, 0x43, 0xc6, 0xa4, 0xf1, 0x42, - 0xe1, 0x21, 0xeb, 0xeb, 0x83, 0x1e, 0x32, 0x26, 0x7d, 0x35, 0x53, 0xf7, 0xf7, 0xc7, 0xfb, 0x37, - 0x38, 0xa6, 0x7f, 0xfe, 0x6c, 0xff, 0x71, 0xe6, 0xdb, 0xc3, 0xdb, 0x57, 0x0f, 0xf1, 0x60, 0x93, - 0xee, 0x0f, 0xe7, 0xbb, 0x99, 0xbb, 0x97, 0xd8, 0x21, 0x86, 0x35, 0xd3, 0xf8, 0xd0, 0xa8, 0x9c, - 0xa1, 0xd9, 0x78, 0x18, 0x50, 0x67, 0x5a, 0xe5, 0xab, 0x7c, 0x64, 0x95, 0xef, 0x2e, 0x1d, 0x6f, - 0xd4, 0x52, 0x74, 0xd2, 0x8a, 0x21, 0xf3, 0x3c, 0xb0, 0xbd, 0x66, 0x4d, 0xb0, 0x00, 0xc5, 0x0c, - 0x07, 0xee, 0xc9, 0x74, 0x27, 0xc0, 0x67, 0x68, 0x91, 0xec, 0x94, 0xfb, 0x02, 0x36, 0xc4, 0x48, - 0x3c, 0x59, 0x3f, 0x8e, 0xf8, 0xc3, 0x3c, 0x02, 0x38, 0xbe, 0xb2, 0xd3, 0x54, 0x21, 0xff, 0x61, - 0x29, 0x43, 0xe1, 0xe1, 0x4a, 0xff, 0xe7, 0x6c, 0xa5, 0xff, 0xf9, 0xb4, 0xd2, 0xdf, 0x67, 0xa2, - 0x5b, 0xfa, 0x7e, 0xf1, 0x84, 0x7f, 0x45, 0xb3, 0x6a, 0xb8, 0xff, 0xab, 0x44, 0x2a, 0xf5, 0xb0, - 0x35, 0x42, 0x27, 0xc0, 0x55, 0xcb, 0x09, 0xf0, 0x5c, 0xee, 0xf3, 0x35, 0x03, 0x4d, 0xfe, 0x5b, - 0x29, 0x93, 0xff, 0xd3, 0xf9, 0xac, 0x8e, 0x37, 0xf0, 0xbf, 0x55, 0x21, 0xe6, 0x03, 0x3c, 0xce, - 0x6f, 0x9f, 0x24, 0xaa, 0xb1, 0x52, 0xec, 0x4d, 0x1e, 0x51, 0x07, 0x8b, 0x01, 0x92, 0x57, 0x9e, - 0xfe, 0xd4, 0x06, 0x37, 0xde, 0xf5, 0x83, 0xbd, 0xfd, 0xc4, 0x6f, 0xa5, 0x3b, 0x76, 0x7a, 0xc1, - 0x8d, 0xff, 0xb5, 0x44, 0xe6, 0x53, 0xb5, 0x3b, 0x07, 0x59, 0xb7, 0x26, 0x4e, 0x6a, 0xd5, 0x9f, - 0xc9, 0xbd, 0x67, 0xb1, 0x4c, 0x88, 0xf2, 0x44, 0x4b, 0xdb, 0x9b, 0xe9, 0x21, 0xca, 0x55, 0x1d, - 0x83, 0x41, 0x81, 0x5e, 0xfc, 0x24, 0xec, 0x86, 0xed, 0x70, 0xef, 0xe8, 0xba, 0x2f, 0x2f, 0xe5, - 0x2b, 0x2f, 0xfe, 0xb6, 0x46, 0x81, 0x49, 0x87, 0x09, 0x9b, 0xd2, 0xef, 0x37, 0xfd, 0xff, 0x89, - 0xfa, 0xa7, 0x67, 0xa2, 0xfe, 0x6e, 0x89, 0x2c, 0x60, 0xed, 0x2c, 0x84, 0x43, 0x86, 0x20, 0xaa, - 0xcc, 0xd9, 0xa5, 0x63, 0x32, 0x67, 0xe3, 0x1d, 0x8e, 0xa4, 0x15, 0xf6, 0x64, 0x36, 0x17, 0x43, - 0x8a, 0x21, 0x14, 0x04, 0x56, 0xd0, 0xd1, 0x36, 0x89, 0xfb, 0x19, 0x26, 0x1d, 0x85, 0x82, 0xc0, - 0xca, 0xc4, 0xda, 0x63, 0xd9, 0x89, 0xb5, 0x79, 0xf2, 0x1b, 0x11, 0x3a, 0x20, 0x76, 0x66, 0x23, - 0xf9, 0x8d, 0x8c, 0x29, 0xd0, 0x34, 0xee, 0x3f, 0xab, 0x90, 0x19, 0x8c, 0xa0, 0x53, 0xe1, 0xc5, - 0xaf, 0x59, 0xe1, 0xc5, 0xcf, 0xa4, 0xc2, 0x8b, 0x17, 0x4c, 0xda, 0x87, 0x13, 0x5d, 0x2c, 0xd2, - 0x24, 0xb1, 0xd4, 0xef, 0x27, 0x8d, 0x2c, 0xb6, 0xd2, 0x24, 0x29, 0x4e, 0x60, 0x33, 0xfe, 0x33, - 0x15, 0x51, 0xfc, 0x27, 0x25, 0x32, 0x47, 0xbf, 0x05, 0x4e, 0xd1, 0x3f, 0x4b, 0xf3, 0xd1, 0x4c, - 0xae, 0x34, 0x71, 0x4c, 0x72, 0xa5, 0x5f, 0x29, 0x11, 0x0c, 0xfc, 0x3c, 0x0d, 0x6f, 0xda, 0x86, - 0xed, 0x4d, 0xfb, 0x64, 0xae, 0xf0, 0x1d, 0xe0, 0x40, 0xfb, 0xf5, 0x0a, 0x99, 0xc5, 0x26, 0x87, - 0x7b, 0xf2, 0x83, 0x59, 0x83, 0x53, 0x2a, 0x30, 0x38, 0x98, 0xa0, 0x21, 0x6c, 0xb7, 0xc3, 0xfb, - 0xe9, 0x8f, 0xb7, 0xc1, 0xa0, 0x20, 0xb0, 0xe8, 0xa6, 0xec, 0x62, 0x12, 0x99, 0xb0, 0x17, 0xa7, - 0xaf, 0x7b, 0xd5, 0x05, 0x1c, 0x14, 0x05, 0x5d, 0xf1, 0x33, 0x71, 0x40, 0x6d, 0x00, 0x19, 0x5b, - 0x30, 0xc6, 0x62, 0x0b, 0x78, 0x0e, 0x3b, 0x03, 0x0e, 0x16, 0x15, 0x55, 0x35, 0xab, 0xec, 0x37, - 0x5b, 0x43, 0x27, 0xc8, 0xf6, 0xcd, 0x13, 0x2c, 0x49, 0x0e, 0xa0, 0x99, 0xe1, 0x31, 0x40, 0x22, - 0xc3, 0x20, 0x62, 0x71, 0x6c, 0xa8, 0x94, 0x53, 0x15, 0x20, 0x81, 0xb9, 0xac, 0xd4, 0xff, 0xce, - 0x4b, 0x98, 0xba, 0x35, 0x68, 0x6f, 0xe1, 0x2b, 0x12, 0x22, 0x90, 0x44, 0xe4, 0x62, 0x15, 0x40, - 0xd0, 0x78, 0xdc, 0xf3, 0xd9, 0x65, 0x53, 0xfe, 0x96, 0xc0, 0x14, 0xa3, 0x66, 0x7b, 0xfe, 0x96, - 0x82, 0x82, 0x41, 0xe1, 0xbe, 0xca, 0xf6, 0xee, 0x21, 0xc3, 0xcf, 0xbf, 0x57, 0x26, 0x4e, 0x9d, - 0x85, 0x5b, 0x58, 0xcf, 0x2d, 0xec, 0x93, 0xb9, 0x98, 0x1a, 0xab, 0x9d, 0xde, 0x03, 0xc1, 0xaa, - 0x58, 0xc0, 0x7f, 0x63, 0xdd, 0x2c, 0xc3, 0x2f, 0x58, 0xda, 0x30, 0x48, 0xf1, 0xc5, 0x21, 0x89, - 0x7a, 0x9d, 0x95, 0x18, 0xdf, 0x6d, 0x13, 0x0f, 0x26, 0xb0, 0x21, 0x01, 0x09, 0x04, 0x8d, 0xc7, - 0x39, 0xc0, 0x7e, 0xdc, 0xa4, 0xd2, 0x28, 0x0c, 0x13, 0x39, 0x6b, 0x58, 0xf6, 0x6c, 0x03, 0x0e, - 0x16, 0x15, 0x26, 0x9e, 0x8e, 0x7b, 0xdd, 0x6e, 0x9b, 0x9d, 0xee, 0x78, 0xed, 0xab, 0x51, 0xd8, - 0xeb, 0xf2, 0x88, 0x5b, 0x91, 0x78, 0xba, 0xd1, 0x87, 0x85, 0x8c, 0x12, 0xb8, 0xe8, 0x77, 0x63, - 0xf6, 0xbf, 0xb8, 0x40, 0xca, 0x7d, 0x4c, 0x0d, 0x06, 0x02, 0x89, 0x73, 0x7b, 0x6c, 0xab, 0x62, - 0x89, 0xec, 0x31, 0x12, 0xcc, 0xf1, 0xc9, 0x6c, 0x97, 0x6d, 0x47, 0xf2, 0x88, 0xb9, 0xd0, 0x50, - 0xa6, 0x02, 0x3e, 0x78, 0xc2, 0x6a, 0x93, 0x0d, 0xd8, 0x5c, 0xdd, 0x7f, 0x4f, 0x98, 0xac, 0x11, - 0x07, 0x6b, 0x93, 0x22, 0x9c, 0x53, 0xe8, 0x62, 0xcf, 0x16, 0x79, 0xb9, 0x45, 0xcb, 0x71, 0x11, - 0x1c, 0x0a, 0x92, 0x8b, 0xf3, 0x65, 0x7e, 0x46, 0xce, 0xd6, 0x77, 0xf1, 0xe7, 0x94, 0x38, 0xbd, - 0x15, 0xa8, 0x2c, 0x58, 0x80, 0xc1, 0xce, 0xd9, 0x22, 0xb3, 0x22, 0xdb, 0xb9, 0xb0, 0xd5, 0x2b, - 0x96, 0xbd, 0x3a, 0x0b, 0x26, 0xf2, 0xc3, 0x34, 0x00, 0xec, 0xc2, 0xce, 0x1e, 0x79, 0xd2, 0x78, - 0x02, 0x25, 0x23, 0x28, 0x89, 0x0b, 0x8e, 0x4f, 0xa2, 0x17, 0x60, 0xfb, 0x38, 0x42, 0x38, 0x9e, - 0x0f, 0x1d, 0xe4, 0xc7, 0xbc, 0x66, 0x12, 0x1c, 0xfa, 0x35, 0xdf, 0x6b, 0x51, 0xad, 0xcc, 0xb7, - 0x6f, 0x17, 0x3f, 0x41, 0x2b, 0x78, 0x6c, 0x25, 0x8b, 0x00, 0xb2, 0xcb, 0x51, 0x7b, 0xbd, 0xda, - 0xea, 0xc4, 0x62, 0x0c, 0x26, 0xac, 0xd7, 0x5e, 0xaa, 0xb5, 0x9b, 0x0d, 0xd5, 0x7f, 0xfd, 0x03, - 0x74, 0x01, 0xe7, 0x7d, 0xfe, 0x08, 0xad, 0x32, 0x48, 0xf8, 0x2b, 0x43, 0x6f, 0x14, 0x32, 0x81, - 0xad, 0x8b, 0x10, 0xdc, 0x8d, 0xa5, 0x82, 0xff, 0xac, 0x3b, 0x12, 0x56, 0x15, 0xce, 0x0f, 0xd3, - 0x85, 0xe5, 0x47, 0xf8, 0xb8, 0xea, 0x4a, 0x93, 0x65, 0x6f, 0x64, 0x27, 0x54, 0x53, 0x56, 0x04, - 0xbc, 0xd3, 0xe8, 0xa3, 0x80, 0x8c, 0x52, 0xce, 0x35, 0x94, 0x38, 0x26, 0x54, 0xc4, 0x6a, 0x4a, - 0xd5, 0x6e, 0xb1, 0xe6, 0x63, 0x82, 0x76, 0x7c, 0x6b, 0xc2, 0xe6, 0x08, 0xa9, 0x72, 0xb8, 0xad, - 0xa8, 0xac, 0xd4, 0xc4, 0x8e, 0x30, 0xec, 0xcf, 0x4c, 0x8d, 0x96, 0x12, 0x9e, 0x58, 0xdc, 0xf4, - 0x13, 0x7c, 0xfa, 0x89, 0xf9, 0x9b, 0xa7, 0x8c, 0x2c, 0x57, 0x1a, 0x05, 0x26, 0x1d, 0xea, 0x40, - 0xec, 0xa0, 0x63, 0xb3, 0xc6, 0xbc, 0xc8, 0x53, 0x7a, 0xed, 0x5c, 0xe3, 0x60, 0x90, 0x78, 0x49, - 0xba, 0x59, 0x5f, 0x63, 0x1e, 0xe1, 0x14, 0x29, 0x05, 0x83, 0xc4, 0x63, 0x74, 0x58, 0xfa, 0x4d, - 0x9d, 0xb9, 0x22, 0xde, 0xf9, 0x7e, 0x09, 0x5e, 0xf0, 0x59, 0x9d, 0x07, 0x64, 0x41, 0xbd, 0xeb, - 0xc3, 0xd3, 0x08, 0xc6, 0x8b, 0xf3, 0x45, 0x9e, 0xc0, 0xcd, 0xcc, 0x46, 0xa8, 0x82, 0x73, 0x37, - 0x53, 0x3c, 0xa1, 0xaf, 0x16, 0xeb, 0x96, 0xfc, 0x42, 0x6e, 0xa6, 0x71, 0x7c, 0x56, 0xa7, 0xb7, - 0xd3, 0x0a, 0x0f, 0xa8, 0xc8, 0x60, 0x2f, 0xfb, 0x98, 0x0f, 0xba, 0x4a, 0x04, 0x68, 0x9a, 0xa5, - 0x2f, 0x90, 0x33, 0x7d, 0x73, 0x7a, 0xa8, 0xa8, 0xb2, 0x9f, 0x1d, 0x23, 0x55, 0xe5, 0xd5, 0xa1, - 0xf5, 0x5b, 0xae, 0xb4, 0x27, 0xd2, 0xae, 0xb4, 0x29, 0xdc, 0x79, 0x4d, 0xef, 0xd9, 0x57, 0x32, - 0x5e, 0x74, 0xbc, 0x90, 0xfb, 0x11, 0x8b, 0x5f, 0xee, 0x18, 0xe2, 0xbd, 0x4b, 0xad, 0xd6, 0x8f, - 0x1d, 0xab, 0xd6, 0x17, 0x7c, 0xb0, 0x07, 0x15, 0x78, 0xba, 0xf3, 0x50, 0xb2, 0xd4, 0x63, 0x14, - 0x75, 0x04, 0x02, 0xc7, 0x31, 0xbd, 0x0b, 0x85, 0x32, 0xd3, 0xbb, 0x26, 0x4f, 0xaa, 0x77, 0x49, - 0x0e, 0xa0, 0x99, 0x61, 0x22, 0xf5, 0xa6, 0xfd, 0xb8, 0x88, 0xba, 0xb3, 0x71, 0x71, 0x88, 0xc7, - 0x3d, 0x7a, 0x46, 0x22, 0xf5, 0xb5, 0x34, 0x3f, 0xe8, 0xaf, 0x02, 0x2f, 0xd8, 0xcf, 0xab, 0x09, - 0x41, 0x77, 0x20, 0x4c, 0x55, 0x34, 0x3a, 0x47, 0xe6, 0x2d, 0xcb, 0x52, 0x7d, 0x08, 0xfe, 0xc7, - 0xdf, 0x2a, 0x31, 0xff, 0xe3, 0xb6, 0x7f, 0xd0, 0x6d, 0xe3, 0x8b, 0x25, 0xa3, 0x6b, 0xfa, 0x97, - 0xc9, 0x54, 0x22, 0x6a, 0x29, 0x96, 0xcc, 0xd9, 0x68, 0x16, 0xf3, 0xc7, 0x2a, 0x41, 0x20, 0xa1, - 0xa0, 0x18, 0xba, 0xff, 0x92, 0x7f, 0x05, 0x89, 0x39, 0x0d, 0xcb, 0xea, 0xa6, 0x6d, 0x59, 0xbd, - 0x58, 0xb8, 0x33, 0x03, 0x2c, 0xac, 0x6f, 0xda, 0x5d, 0x60, 0x0a, 0xdb, 0xa3, 0xef, 0x11, 0x77, - 0x6f, 0x10, 0xfb, 0xc1, 0x14, 0xaa, 0xae, 0xb0, 0x68, 0x4d, 0x2e, 0x11, 0x2f, 0x0c, 0x19, 0xa9, - 0xe9, 0xfe, 0x5a, 0x99, 0x9c, 0xcb, 0x7a, 0x47, 0xdd, 0x69, 0x91, 0x99, 0xae, 0xa1, 0x3e, 0x17, - 0xbb, 0xcb, 0x6f, 0x2a, 0xdc, 0x5a, 0x75, 0x31, 0xa1, 0x60, 0x71, 0xc5, 0x14, 0xea, 0xf8, 0x2a, - 0xbc, 0x72, 0xaf, 0x94, 0x87, 0x17, 0x51, 0xaa, 0x9a, 0x75, 0x83, 0x11, 0x58, 0x6c, 0x47, 0x90, - 0x6f, 0xdc, 0xfd, 0xfb, 0x25, 0xf2, 0xf8, 0x80, 0x0b, 0xff, 0x58, 0xdd, 0x7d, 0xe6, 0x85, 0x14, - 0x0f, 0xf2, 0xa8, 0xea, 0xb8, 0x6f, 0x12, 0x04, 0xd6, 0xd9, 0xc1, 0x7b, 0xa4, 0xea, 0x95, 0xd2, - 0x72, 0x91, 0x63, 0xf0, 0xbe, 0xcb, 0xc5, 0xc6, 0xbd, 0x53, 0xf5, 0x2e, 0xa9, 0xc1, 0xd5, 0xfd, - 0x46, 0x85, 0x8c, 0xf3, 0x87, 0x12, 0xeb, 0x54, 0x01, 0xe2, 0xf9, 0x05, 0x87, 0x4b, 0x6f, 0xa8, - 0xf5, 0x24, 0x0e, 0x00, 0xc9, 0xc6, 0xb9, 0x41, 0xce, 0xa2, 0x7f, 0x35, 0xf0, 0xda, 0x35, 0xbf, - 0xed, 0x1d, 0x49, 0xc5, 0x9b, 0xe7, 0x88, 0x96, 0x69, 0x50, 0xcf, 0x6e, 0xf6, 0x93, 0x40, 0x56, - 0x39, 0xbc, 0xae, 0x94, 0x4a, 0x10, 0xc4, 0xf3, 0x36, 0xaa, 0xeb, 0x4a, 0xc7, 0x27, 0x09, 0xc2, - 0x1b, 0x5b, 0xdd, 0x3e, 0x13, 0xc3, 0x78, 0x61, 0xcf, 0x36, 0x2b, 0x6c, 0x5a, 0xbc, 0xeb, 0x14, - 0xf7, 0xd8, 0x19, 0xe9, 0xf6, 0x3e, 0xb5, 0x64, 0xf6, 0xc3, 0x76, 0x4b, 0xbc, 0x0c, 0xa5, 0xd4, - 0xa9, 0x46, 0x0a, 0x0f, 0x7d, 0x25, 0x90, 0xcb, 0xae, 0x17, 0xb4, 0xe9, 0xd4, 0xd6, 0x5c, 0x26, - 0x6c, 0x2e, 0x1b, 0x29, 0x3c, 0xf4, 0x95, 0x70, 0xff, 0xb0, 0x44, 0xce, 0x66, 0x9c, 0xdc, 0xf3, - 0x80, 0xb2, 0x3d, 0x2a, 0x1a, 0x55, 0x06, 0x61, 0x23, 0xa0, 0x8c, 0xc3, 0x41, 0x51, 0xe0, 0x2c, - 0xe4, 0x76, 0x63, 0x3a, 0x21, 0xb2, 0x38, 0x2a, 0x15, 0xd8, 0xe1, 0xd2, 0xfd, 0xa8, 0xf7, 0xde, - 0xc7, 0x06, 0xbe, 0xf7, 0x4e, 0x15, 0x93, 0x3d, 0x65, 0x9d, 0x1b, 0x8a, 0x09, 0xb7, 0xcf, 0x39, - 0x0e, 0xb3, 0x7b, 0xcf, 0xa7, 0x22, 0x78, 0xb0, 0x21, 0xa9, 0x67, 0xe9, 0x99, 0x4b, 0x01, 0x63, - 0x5b, 0x32, 0x9e, 0xa6, 0x7f, 0xde, 0x7e, 0xb5, 0x56, 0xb7, 0x79, 0xb5, 0x66, 0xbd, 0xc7, 0x55, - 0x34, 0x3b, 0xf9, 0xa7, 0x30, 0x75, 0xb0, 0x7a, 0x5e, 0x51, 0x4d, 0x7a, 0xca, 0xae, 0x4e, 0xc1, - 0xc0, 0x90, 0xce, 0x73, 0xa2, 0xf7, 0x29, 0xe7, 0x24, 0x78, 0xad, 0x30, 0x36, 0x86, 0x80, 0xca, - 0x11, 0xaa, 0xd6, 0xe2, 0xa9, 0x40, 0xda, 0x35, 0x7b, 0x9d, 0x83, 0x41, 0xe2, 0xed, 0x0c, 0xe4, - 0x93, 0x23, 0xce, 0x40, 0x3e, 0x95, 0x1b, 0x85, 0xf8, 0xcb, 0x74, 0x57, 0x64, 0x69, 0xd7, 0xc4, - 0x4d, 0x50, 0x74, 0xf2, 0x8f, 0x6e, 0x57, 0xc4, 0xf7, 0xda, 0xb0, 0xb2, 0x74, 0xd2, 0x61, 0xd6, - 0x02, 0xe0, 0x38, 0x4c, 0xe2, 0xca, 0xaa, 0xc6, 0xcf, 0x37, 0xc3, 0x93, 0xb8, 0xea, 0x57, 0xbc, - 0x59, 0x8c, 0x3b, 0xf8, 0x5d, 0x6a, 0x7b, 0xb3, 0xc6, 0x6a, 0x4f, 0xcc, 0xa3, 0x12, 0xe3, 0x9e, - 0xd9, 0xb8, 0x87, 0x15, 0xe3, 0x9e, 0xcd, 0x3c, 0x3f, 0xc6, 0x3d, 0xb3, 0xdc, 0xa3, 0x17, 0xe3, - 0x9e, 0xd9, 0xcc, 0x01, 0xfa, 0xdc, 0xf7, 0xca, 0x03, 0xba, 0xc5, 0x34, 0xbb, 0x17, 0x70, 0x15, - 0x30, 0x64, 0x2c, 0x36, 0xe5, 0x19, 0xbe, 0x02, 0x38, 0x0c, 0x14, 0xd6, 0x89, 0x8d, 0x18, 0x71, - 0xde, 0xc8, 0xf5, 0x13, 0x7e, 0xe0, 0x65, 0xdb, 0x95, 0x63, 0x5e, 0xb0, 0x4c, 0x05, 0x8e, 0x63, - 0x44, 0x8e, 0x52, 0xd6, 0x2b, 0x27, 0x51, 0xd6, 0x67, 0xb2, 0x15, 0xf5, 0x25, 0xba, 0x27, 0x9e, - 0xdc, 0xf8, 0xfe, 0xc5, 0x32, 0xf9, 0xf8, 0x31, 0x33, 0x8c, 0x8b, 0x16, 0x6b, 0x50, 0x0d, 0xd1, - 0xd2, 0x37, 0xb0, 0x75, 0x72, 0x6e, 0xb7, 0xd7, 0x6e, 0x1f, 0xb1, 0x13, 0x76, 0xbf, 0x25, 0x29, - 0x84, 0xba, 0xa0, 0xde, 0x78, 0xdc, 0xc8, 0xa0, 0x81, 0xcc, 0x92, 0xe8, 0xf8, 0x0a, 0x77, 0x58, - 0x5a, 0xbb, 0x96, 0xbe, 0xff, 0xc9, 0xc6, 0xaf, 0xa2, 0x1d, 0x5f, 0xb7, 0xfa, 0x28, 0x20, 0xa3, - 0x14, 0x2a, 0x0f, 0xec, 0x79, 0x48, 0xd5, 0xac, 0x94, 0xf2, 0x00, 0x26, 0x12, 0x6c, 0x5a, 0xf7, - 0x0f, 0x4a, 0x28, 0x84, 0x32, 0x9e, 0x2f, 0xb2, 0x5e, 0xfd, 0x35, 0x02, 0xc7, 0xfb, 0x5f, 0xfd, - 0x65, 0xfe, 0x30, 0x9b, 0x96, 0x8f, 0x6f, 0xac, 0x03, 0xcf, 0xac, 0xfd, 0x5e, 0x5c, 0x98, 0x50, - 0x14, 0xf8, 0x52, 0x57, 0x2b, 0x38, 0x0c, 0xe2, 0x30, 0x2a, 0xf0, 0xc8, 0x66, 0x5f, 0x30, 0x93, - 0xde, 0xa2, 0x6a, 0x9c, 0x09, 0x48, 0x6e, 0xee, 0x5f, 0x2f, 0x93, 0x59, 0x59, 0x1f, 0x55, 0x4b, - 0xd8, 0x2a, 0x1e, 0x95, 0x68, 0x7d, 0xc7, 0x12, 0xad, 0x97, 0x8a, 0xdd, 0x1a, 0x61, 0x8d, 0x1a, - 0x28, 0x52, 0xbf, 0x94, 0x12, 0xa9, 0x97, 0x87, 0x61, 0x9a, 0x6b, 0xcd, 0x9f, 0xb1, 0xe8, 0x1f, - 0xa1, 0x5c, 0xa4, 0x59, 0xdd, 0x19, 0x20, 0x3a, 0xbf, 0x51, 0x4e, 0x75, 0x83, 0x89, 0xcc, 0xaf, - 0x91, 0xb1, 0x7d, 0x2f, 0x6a, 0x89, 0xa3, 0x8b, 0xb7, 0x86, 0xfc, 0x14, 0xd4, 0x7c, 0x88, 0x5a, - 0x5c, 0xf0, 0xbd, 0xac, 0x1e, 0x4d, 0xa0, 0xa0, 0xdc, 0x30, 0x4c, 0x56, 0xa9, 0xf3, 0x26, 0x3e, - 0xaa, 0x10, 0x76, 0x55, 0x94, 0xcd, 0x33, 0xfc, 0x41, 0x05, 0x84, 0x50, 0x0e, 0x8e, 0x5d, 0x1d, - 0x82, 0x41, 0xd0, 0x2f, 0xf9, 0xa4, 0xaa, 0xaa, 0x1e, 0x61, 0xc0, 0xdf, 0x0f, 0x2a, 0xe4, 0x6c, - 0xc6, 0x54, 0x71, 0x7e, 0xcc, 0x1a, 0xb5, 0xcf, 0x0e, 0x3d, 0xd7, 0x3e, 0xe2, 0xb8, 0xfd, 0x18, - 0x53, 0x50, 0x5b, 0x62, 0x6e, 0x9c, 0xa0, 0x7a, 0xaa, 0xc5, 0xa6, 0xab, 0x47, 0x50, 0x7e, 0xf5, - 0x58, 0xed, 0x29, 0x0d, 0x3e, 0x56, 0xa3, 0xda, 0x39, 0xc2, 0x6f, 0xfc, 0x93, 0x63, 0xe4, 0x5c, - 0xd6, 0xcd, 0x34, 0xe7, 0xa7, 0x4a, 0xa9, 0x6c, 0xc6, 0x9f, 0x1f, 0xfe, 0x7a, 0x1b, 0x4f, 0x71, - 0x2c, 0x6e, 0xac, 0x2f, 0xdb, 0xf9, 0x8d, 0x73, 0x47, 0x5b, 0xd4, 0xce, 0x42, 0xa7, 0x23, 0x9e, - 0x98, 0x5a, 0xca, 0x83, 0xb7, 0x4f, 0xd0, 0x14, 0x91, 0xdb, 0x3a, 0x4e, 0x85, 0x4e, 0x4b, 0x70, - 0x7e, 0xe8, 0xb4, 0x6c, 0xc3, 0xd2, 0x1e, 0x66, 0x35, 0x56, 0xfd, 0x1a, 0xe1, 0x14, 0x08, 0x70, - 0x4f, 0x32, 0x5a, 0x3d, 0xc2, 0x69, 0xf0, 0x37, 0x4b, 0x24, 0x75, 0x7c, 0xae, 0xac, 0xe0, 0xd2, - 0x40, 0x2b, 0x98, 0x52, 0x50, 0x5d, 0xc9, 0x4f, 0xa7, 0xd9, 0x05, 0x0a, 0x03, 0x86, 0x51, 0x4f, - 0xac, 0x55, 0x06, 0x3d, 0xb1, 0x86, 0xe6, 0x51, 0xdb, 0x3f, 0xf4, 0xa5, 0x4d, 0xaa, 0x84, 0xf7, - 0x16, 0x02, 0x81, 0xe3, 0xdc, 0xef, 0x54, 0xc8, 0x04, 0x37, 0xfc, 0x46, 0xb8, 0x2d, 0xd7, 0x85, - 0x0d, 0x56, 0xe8, 0x8e, 0x18, 0x6f, 0xcd, 0x32, 0x1a, 0x69, 0x7c, 0x42, 0xa9, 0xbe, 0x69, 0xbb, - 0xcd, 0x59, 0xb6, 0x7a, 0xbf, 0x94, 0x8a, 0x1c, 0x23, 0x9c, 0x87, 0x31, 0x16, 0xfb, 0x84, 0xc4, - 0xec, 0x95, 0x1e, 0xe4, 0x21, 0xf2, 0x74, 0xbd, 0x56, 0xa8, 0x1d, 0x0d, 0x55, 0x8c, 0xb7, 0x46, - 0x27, 0x08, 0x52, 0x08, 0x30, 0x78, 0x2f, 0xbd, 0x41, 0xaa, 0x8a, 0x38, 0x4f, 0x5d, 0x9e, 0x31, - 0xa7, 0xe4, 0x9f, 0x23, 0xf3, 0xa9, 0xba, 0x86, 0xd2, 0xb6, 0xbf, 0x4d, 0x95, 0x89, 0xbe, 0xd7, - 0x21, 0x31, 0xd7, 0xdb, 0xb9, 0x76, 0x86, 0xc5, 0x2f, 0x3e, 0xf0, 0x49, 0x7c, 0x05, 0xfa, 0x39, - 0xf5, 0x0c, 0x2c, 0x64, 0xd6, 0x26, 0x33, 0x0f, 0x96, 0xb3, 0x33, 0x0f, 0xb2, 0xa7, 0x49, 0x78, - 0xdb, 0x4f, 0x43, 0x03, 0xda, 0xb4, 0x35, 0xa0, 0x67, 0x8b, 0x4c, 0x83, 0x01, 0xaa, 0xcf, 0xbf, - 0x29, 0x11, 0x87, 0x13, 0xa4, 0x5f, 0xeb, 0xe2, 0x1e, 0x14, 0x43, 0x67, 0xd7, 0xf3, 0x46, 0x61, - 0xc0, 0xa0, 0x1a, 0x32, 0x13, 0xb3, 0x7a, 0xe5, 0xa6, 0xd8, 0x93, 0xd8, 0x95, 0x02, 0x4f, 0x62, - 0xff, 0x56, 0x85, 0xa4, 0x8f, 0x9a, 0x9d, 0xf7, 0xc8, 0x0c, 0x5e, 0x6b, 0xd9, 0x09, 0xda, 0x41, - 0x12, 0xf8, 0x71, 0x31, 0x37, 0xfe, 0x9a, 0x51, 0x42, 0xf8, 0xe0, 0x0c, 0x08, 0x58, 0x1c, 0x31, - 0x3e, 0xaa, 0x1b, 0x51, 0x4b, 0xa1, 0xed, 0xef, 0x31, 0xbd, 0x43, 0xe5, 0x6d, 0xa8, 0x2b, 0x28, - 0x18, 0x14, 0x19, 0x31, 0x4d, 0x95, 0xd3, 0x88, 0x69, 0x1a, 0x1b, 0x32, 0xa6, 0x69, 0xbc, 0x50, - 0x4c, 0x13, 0x90, 0xf3, 0xd2, 0x75, 0x86, 0xbf, 0xf1, 0x6a, 0x18, 0x4f, 0x35, 0x26, 0x22, 0xd1, - 0x96, 0xf0, 0xba, 0x0f, 0x64, 0x52, 0xc0, 0x80, 0x92, 0x6e, 0x8f, 0x9c, 0x6d, 0xf8, 0x51, 0xc0, - 0x32, 0xc1, 0xb4, 0xf4, 0x0a, 0xfc, 0x0a, 0x5e, 0xaa, 0xb7, 0x17, 0xff, 0x90, 0xb7, 0x76, 0x8c, - 0xfb, 0xf4, 0x72, 0xb1, 0x6b, 0x96, 0xee, 0x5f, 0x2a, 0x93, 0x49, 0x11, 0xd2, 0x31, 0xc2, 0x8d, - 0xe4, 0xba, 0x65, 0xdf, 0xbd, 0x98, 0xb7, 0x72, 0x59, 0x73, 0x06, 0x5a, 0x76, 0x8d, 0x94, 0x65, - 0xf7, 0x52, 0x31, 0x76, 0xc7, 0xdb, 0x74, 0xbf, 0x59, 0xa6, 0xbb, 0xbd, 0x1d, 0xca, 0x32, 0xba, - 0xe1, 0xf8, 0x22, 0x99, 0x8c, 0x45, 0xbc, 0x47, 0xa1, 0x47, 0xc8, 0xd3, 0x9f, 0x54, 0x3f, 0xaf, - 0x2d, 0x22, 0x3c, 0x24, 0xbb, 0xcc, 0x90, 0x92, 0xca, 0x69, 0x84, 0x94, 0xb8, 0xdf, 0x61, 0x22, - 0xd5, 0x1c, 0xc0, 0xd3, 0xd8, 0x13, 0xde, 0xb1, 0xa5, 0xef, 0xcb, 0x85, 0xa6, 0x82, 0x68, 0xdf, - 0x80, 0xbd, 0xe1, 0x5b, 0x25, 0x32, 0x2d, 0x08, 0x4f, 0xa3, 0x07, 0x3f, 0x6c, 0xf7, 0xe0, 0xb9, - 0x42, 0x3d, 0x18, 0xd0, 0xf4, 0xbf, 0x5d, 0x56, 0x4d, 0x2f, 0xf8, 0xce, 0xbf, 0xf9, 0x8a, 0x7f, - 0x79, 0x98, 0x57, 0xfc, 0x59, 0x74, 0x2b, 0xbe, 0xb9, 0xc8, 0xb7, 0xa8, 0xac, 0x37, 0x14, 0x77, - 0xe4, 0x5b, 0xb3, 0x08, 0x13, 0x21, 0xf4, 0xc3, 0xbe, 0xcd, 0xa8, 0x63, 0x7a, 0x15, 0x27, 0x30, - 0xb8, 0xca, 0x70, 0x33, 0x56, 0xc3, 0xb8, 0xed, 0x8b, 0xbc, 0x29, 0xe0, 0xa0, 0x28, 0xdc, 0x37, - 0x98, 0x8c, 0x65, 0xc3, 0x33, 0x5c, 0xa0, 0xee, 0x4f, 0x4f, 0xa8, 0x81, 0x65, 0x4e, 0x92, 0x9b, - 0xf2, 0x5d, 0xff, 0x52, 0x91, 0xa8, 0x04, 0xe3, 0x93, 0x64, 0x3f, 0xeb, 0xef, 0xf8, 0x7d, 0xde, - 0xe7, 0x37, 0x0a, 0xcb, 0xc8, 0x21, 0xfc, 0xcd, 0x2c, 0x97, 0x05, 0xbb, 0xbf, 0xbf, 0x59, 0x4f, - 0xe7, 0x0b, 0x5c, 0x93, 0x08, 0xd0, 0x34, 0xb4, 0x00, 0x57, 0xd7, 0xed, 0x27, 0x2e, 0xa5, 0xba, - 0x2e, 0x87, 0xc4, 0xd0, 0xd7, 0xa9, 0xfe, 0xa2, 0x32, 0x26, 0xd7, 0x79, 0xe2, 0xdb, 0x2a, 0xd7, - 0x5f, 0xd6, 0x35, 0x18, 0x4c, 0x1a, 0xaa, 0xd6, 0x9d, 0x6d, 0xa9, 0xe8, 0xc2, 0x7a, 0x6f, 0xa7, - 0x1d, 0x34, 0xb1, 0x28, 0x8f, 0xec, 0x7f, 0x1c, 0x8f, 0x92, 0x6b, 0xfd, 0x68, 0xc8, 0x2a, 0xe3, - 0x6c, 0x63, 0x04, 0x1f, 0xcb, 0x0c, 0x2d, 0xef, 0x00, 0x89, 0x84, 0x5a, 0x17, 0x64, 0x36, 0xae, - 0x86, 0x8d, 0xfe, 0x90, 0x81, 0xb8, 0x50, 0x10, 0x20, 0x48, 0xb3, 0xc0, 0x03, 0xea, 0xb6, 0xf9, - 0xc2, 0x4b, 0x5d, 0x04, 0x59, 0xaa, 0x03, 0x6a, 0xeb, 0xfd, 0x97, 0x3a, 0xa4, 0xa8, 0xa9, 0xb4, - 0x5f, 0x34, 0x21, 0xe2, 0xda, 0x2f, 0x1e, 0x72, 0xc5, 0x22, 0x25, 0xed, 0x27, 0x30, 0xc4, 0x72, - 0x6b, 0x00, 0x0d, 0x0c, 0x2c, 0x8d, 0x99, 0x23, 0xe5, 0x48, 0x1a, 0x01, 0x97, 0x3a, 0x34, 0xc2, - 0xc0, 0x81, 0x45, 0xf9, 0xd1, 0x0e, 0x08, 0xbe, 0x86, 0x85, 0x8d, 0x4d, 0xd5, 0xf9, 0x2a, 0x99, - 0x31, 0xdb, 0x28, 0xc4, 0xe4, 0x2b, 0xc5, 0x5f, 0xcd, 0x11, 0x9b, 0xb3, 0x6a, 0xb9, 0x89, 0x03, - 0x8b, 0xb7, 0xdb, 0x24, 0xf3, 0xa9, 0x57, 0x3b, 0xd5, 0xf3, 0xaf, 0xa5, 0x87, 0xf5, 0xfc, 0x2b, - 0xa6, 0x86, 0x19, 0xdf, 0xf6, 0x82, 0xfc, 0xdc, 0xeb, 0x45, 0xde, 0x4f, 0x75, 0x5e, 0x27, 0x13, - 0xfe, 0xee, 0x2e, 0x3e, 0xaf, 0xcf, 0xd7, 0xdc, 0x93, 0xea, 0x51, 0x6f, 0x06, 0xc5, 0x95, 0xc4, - 0x2a, 0xe3, 0x3f, 0x41, 0x10, 0xbb, 0xff, 0x8e, 0x5a, 0x57, 0xdb, 0x61, 0x5b, 0x1e, 0x55, 0xe4, - 0xb4, 0x64, 0xb5, 0x2f, 0x0b, 0xfc, 0xf3, 0x19, 0x59, 0xe0, 0x1d, 0xcd, 0x30, 0x23, 0x07, 0xbc, - 0xea, 0x4d, 0xa5, 0x50, 0x6f, 0xc6, 0x86, 0xe9, 0xcd, 0xd7, 0x4b, 0x44, 0x84, 0x20, 0x14, 0xd8, - 0x96, 0x5a, 0x32, 0x73, 0xb3, 0x75, 0xff, 0xfe, 0x42, 0x91, 0x38, 0x7a, 0x71, 0xeb, 0x5e, 0x4d, - 0x25, 0xeb, 0xae, 0xbd, 0xc5, 0x15, 0x4d, 0xef, 0x69, 0x8e, 0xbe, 0x21, 0x5f, 0xbf, 0xcf, 0x69, - 0xd7, 0x50, 0xb9, 0x7d, 0x58, 0x62, 0x63, 0x64, 0xac, 0x52, 0xbc, 0x98, 0x89, 0x8d, 0x25, 0x02, - 0x34, 0x0d, 0x06, 0x10, 0xc4, 0xbd, 0x1d, 0x46, 0x9e, 0x8a, 0x47, 0x68, 0x70, 0x30, 0x48, 0xbc, - 0xfb, 0x3f, 0x17, 0x88, 0xd5, 0x35, 0x2b, 0x9d, 0x4c, 0xe9, 0xa1, 0xa7, 0x93, 0xa1, 0xdc, 0xfd, - 0x83, 0x6e, 0x72, 0x54, 0x0b, 0xa2, 0x62, 0xa9, 0xbd, 0xd6, 0x05, 0x75, 0x3f, 0x77, 0x89, 0x01, - 0xc5, 0x71, 0x40, 0x72, 0xa0, 0xca, 0x23, 0x91, 0x1c, 0x68, 0xec, 0xff, 0x49, 0x72, 0x20, 0x6a, - 0x21, 0xec, 0xf1, 0xe7, 0xc4, 0xc5, 0xbd, 0xa9, 0x9c, 0xe3, 0xab, 0x8c, 0xb7, 0xc7, 0xf9, 0x05, - 0x19, 0x81, 0x00, 0xc9, 0x0e, 0x53, 0xcf, 0x70, 0x63, 0x41, 0xe4, 0xdb, 0x79, 0xa5, 0x88, 0x1b, - 0xa5, 0x3f, 0xf5, 0x8c, 0x08, 0x3a, 0x11, 0xbc, 0x64, 0x32, 0xa0, 0xc9, 0x8f, 0x9e, 0x0c, 0x48, - 0xa5, 0xf0, 0x99, 0x7a, 0x58, 0x29, 0x7c, 0xac, 0x54, 0x48, 0xd5, 0x51, 0xa4, 0x42, 0xa2, 0xb2, - 0xed, 0xb1, 0x6e, 0x56, 0x26, 0x31, 0x91, 0x8c, 0xe7, 0x0b, 0x27, 0xc8, 0xac, 0x66, 0x55, 0xcd, - 0xae, 0xb3, 0x64, 0x92, 0x41, 0x76, 0xc5, 0x32, 0xa7, 0xd2, 0xf4, 0x47, 0xcf, 0xa9, 0x34, 0xea, - 0xac, 0x3d, 0x3a, 0xc3, 0xd2, 0xec, 0x48, 0x32, 0x2c, 0xcd, 0x3d, 0xc4, 0x0c, 0x4b, 0x46, 0x6e, - 0xa4, 0xf9, 0x87, 0x9b, 0x1b, 0x69, 0x9f, 0x4c, 0xb7, 0xc2, 0xfb, 0x9d, 0xfb, 0x5e, 0xd4, 0x5a, - 0xa9, 0x6f, 0x8a, 0x54, 0x3c, 0x39, 0x77, 0xde, 0x6b, 0xba, 0x80, 0x55, 0x03, 0xf7, 0x17, 0x6a, - 0x24, 0x98, 0xac, 0x45, 0x96, 0xa8, 0x33, 0x1f, 0x31, 0x4b, 0x94, 0x95, 0x6b, 0xc9, 0x19, 0x45, - 0xae, 0xa5, 0xf7, 0xd8, 0xcd, 0xd7, 0xdd, 0x60, 0xef, 0x86, 0xd7, 0x5d, 0x3c, 0x5b, 0xa4, 0x86, - 0x35, 0x49, 0xde, 0x5f, 0x83, 0x42, 0x81, 0x66, 0xda, 0x9f, 0xcd, 0xe9, 0xdc, 0x69, 0x67, 0x73, - 0x7a, 0x6c, 0x84, 0xd9, 0x9c, 0xce, 0x8f, 0x22, 0x9b, 0xd3, 0x5f, 0x20, 0x4f, 0x1d, 0xdf, 0x7f, - 0x9d, 0xa0, 0xb3, 0xae, 0x4d, 0xea, 0x54, 0x82, 0x4e, 0xa6, 0x5b, 0x18, 0x54, 0x46, 0xb0, 0x66, - 0xf9, 0xb8, 0x60, 0x4d, 0xf7, 0x9f, 0x96, 0xc8, 0xe3, 0x03, 0x12, 0x3d, 0x14, 0x8e, 0xbe, 0xee, - 0x92, 0xf9, 0xae, 0x5d, 0xb4, 0xf0, 0x3d, 0x09, 0x2b, 0xb1, 0x84, 0x4a, 0xf0, 0x9c, 0x42, 0x40, - 0x9a, 0xfd, 0xea, 0xb3, 0xdf, 0xfd, 0xc1, 0x53, 0x1f, 0xfb, 0x1e, 0xfd, 0xfb, 0x3d, 0xfa, 0xf7, - 0xe3, 0x7f, 0xf4, 0x54, 0xe9, 0xbb, 0xf4, 0xef, 0x7b, 0xf4, 0xef, 0x0f, 0xe9, 0xdf, 0xd7, 0xff, - 0xf8, 0xa9, 0x8f, 0xfd, 0x48, 0xf9, 0xf0, 0xf2, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x77, - 0x02, 0x29, 0xf6, 0xb0, 0x00, 0x00, + // 11000 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0xbd, 0x7d, 0x70, 0x24, 0xc7, + 0x75, 0x18, 0xae, 0xd9, 0xc5, 0xd7, 0x3e, 0x7c, 0x37, 0x70, 0x47, 0x10, 0x22, 0x0f, 0xc7, 0xa1, + 0x48, 0x1d, 0xc9, 0x23, 0x20, 0x1e, 0x49, 0xf1, 0x24, 0xea, 0x47, 0x09, 0xc0, 0x02, 0x77, 0xd0, + 0x7d, 0x2d, 0x7b, 0x71, 0x77, 0x14, 0xc5, 0x9f, 0xc8, 0xb9, 0x9d, 0x06, 0x30, 0xbc, 0xc1, 0xcc, + 0x72, 0x66, 0x16, 0x77, 0x90, 0xa2, 0x2a, 0x5b, 0x51, 0xc9, 0x49, 0x59, 0x49, 0xe4, 0x72, 0x54, + 0x95, 0x72, 0x52, 0xa5, 0x94, 0xab, 0xe2, 0x28, 0x9f, 0x8e, 0xa2, 0xb2, 0x24, 0x97, 0xe5, 0xa4, + 0xe2, 0x58, 0x8e, 0x5c, 0x95, 0x38, 0xaa, 0x72, 0x25, 0x76, 0xca, 0x15, 0xd8, 0x82, 0x2a, 0xfe, + 0x23, 0x7f, 0xe4, 0x8f, 0xf8, 0x3f, 0x24, 0x95, 0x4a, 0xf5, 0xe7, 0x74, 0xcf, 0xee, 0x62, 0x66, + 0xc1, 0x03, 0x7c, 0x52, 0xe5, 0xbf, 0xdd, 0x7e, 0xaf, 0x5f, 0x7f, 0x4c, 0xf7, 0xeb, 0xf7, 0x5e, + 0xbf, 0xf7, 0x1a, 0xce, 0xdf, 0xbd, 0x18, 0xcf, 0x7b, 0xe1, 0xc2, 0xdd, 0xd6, 0x1d, 0x12, 0x05, + 0x24, 0x21, 0xf1, 0x42, 0xf3, 0xee, 0xe6, 0x82, 0xd3, 0xf4, 0x16, 0x76, 0x5e, 0x58, 0xd8, 0x24, + 0x01, 0x89, 0x9c, 0x84, 0xb8, 0xf3, 0xcd, 0x28, 0x4c, 0x42, 0xf4, 0x18, 0xc7, 0x9e, 0x4f, 0xb1, + 0xe7, 0x9b, 0x77, 0x37, 0xe7, 0x9d, 0xa6, 0x37, 0xbf, 0xf3, 0xc2, 0xec, 0xf3, 0x9b, 0x5e, 0xb2, + 0xd5, 0xba, 0x33, 0xdf, 0x08, 0xb7, 0x17, 0x36, 0xc3, 0xcd, 0x70, 0x81, 0x55, 0xba, 0xd3, 0xda, + 0x60, 0xff, 0xd8, 0x1f, 0xf6, 0x8b, 0x13, 0x9b, 0x7d, 0x49, 0x34, 0xed, 0x34, 0xbd, 0x6d, 0xa7, + 0xb1, 0xe5, 0x05, 0x24, 0xda, 0x55, 0x8d, 0x47, 0x24, 0x0e, 0x5b, 0x51, 0x83, 0x64, 0xbb, 0x70, + 0x68, 0xad, 0x78, 0x61, 0x9b, 0x24, 0x4e, 0x87, 0x8e, 0xcf, 0x2e, 0x74, 0xab, 0x15, 0xb5, 0x82, + 0xc4, 0xdb, 0x6e, 0x6f, 0xe6, 0xa3, 0x79, 0x15, 0xe2, 0xc6, 0x16, 0xd9, 0x76, 0xda, 0xea, 0xbd, + 0xd8, 0xad, 0x5e, 0x2b, 0xf1, 0xfc, 0x05, 0x2f, 0x48, 0xe2, 0x24, 0x3a, 0x6c, 0x4c, 0x31, 0x89, + 0x76, 0x48, 0x94, 0x0e, 0x88, 0xdc, 0x77, 0xb6, 0x9b, 0x3e, 0xe9, 0x30, 0x26, 0xfb, 0x8f, 0x2c, + 0x38, 0xbb, 0x78, 0xbb, 0xbe, 0xe2, 0x3b, 0x71, 0xe2, 0x35, 0x96, 0xfc, 0xb0, 0x71, 0xb7, 0x9e, + 0x84, 0x11, 0xb9, 0x15, 0xfa, 0xad, 0x6d, 0x52, 0x67, 0xd3, 0x87, 0xce, 0xc3, 0xd0, 0x0e, 0xfb, + 0xbf, 0x56, 0x9d, 0xb1, 0xce, 0x5a, 0xe7, 0x2a, 0x4b, 0x13, 0x3f, 0xdc, 0x9b, 0xfb, 0xc0, 0xfe, + 0xde, 0xdc, 0xd0, 0x2d, 0x51, 0x8e, 0x15, 0x06, 0x7a, 0x1a, 0x06, 0x36, 0xe2, 0xf5, 0xdd, 0x26, + 0x99, 0x29, 0x31, 0xdc, 0x31, 0x81, 0x3b, 0xb0, 0x5a, 0xa7, 0xa5, 0x58, 0x40, 0xd1, 0x02, 0x54, + 0x9a, 0x4e, 0x94, 0x78, 0x89, 0x17, 0x06, 0x33, 0xe5, 0xb3, 0xd6, 0xb9, 0xfe, 0xa5, 0x49, 0x81, + 0x5a, 0xa9, 0x49, 0x00, 0x4e, 0x71, 0x68, 0x37, 0x22, 0xe2, 0xb8, 0x37, 0x02, 0x7f, 0x77, 0xa6, + 0xef, 0xac, 0x75, 0x6e, 0x28, 0xed, 0x06, 0x16, 0xe5, 0x58, 0x61, 0xd8, 0xdf, 0x2b, 0xc1, 0xd0, + 0xe2, 0xc6, 0x86, 0x17, 0x78, 0xc9, 0x2e, 0x7a, 0x07, 0x46, 0x82, 0xd0, 0x25, 0xf2, 0x3f, 0x1b, + 0xc5, 0xf0, 0x85, 0x67, 0xe7, 0x0f, 0x5b, 0x8a, 0xf3, 0xd7, 0xb5, 0x1a, 0x4b, 0x13, 0xfb, 0x7b, + 0x73, 0x23, 0x7a, 0x09, 0x36, 0x28, 0xa2, 0xb7, 0x60, 0xb8, 0x19, 0xba, 0xaa, 0x81, 0x12, 0x6b, + 0xe0, 0x99, 0xc3, 0x1b, 0xa8, 0xa5, 0x15, 0x96, 0xc6, 0xf7, 0xf7, 0xe6, 0x86, 0xb5, 0x02, 0xac, + 0x93, 0x43, 0x3e, 0x8c, 0xd3, 0xbf, 0x41, 0xe2, 0xa9, 0x16, 0xca, 0xac, 0x85, 0xe7, 0xf3, 0x5b, + 0xd0, 0x2a, 0x2d, 0x4d, 0xed, 0xef, 0xcd, 0x8d, 0x67, 0x0a, 0x71, 0x96, 0xb4, 0xfd, 0x79, 0x18, + 0x5b, 0x4c, 0x12, 0xa7, 0xb1, 0x45, 0x5c, 0xfe, 0x7d, 0xd1, 0x4b, 0xd0, 0x17, 0x38, 0xdb, 0x44, + 0x7c, 0xfd, 0xb3, 0x62, 0xda, 0xfb, 0xae, 0x3b, 0xdb, 0xe4, 0x60, 0x6f, 0x6e, 0xe2, 0x66, 0xe0, + 0xbd, 0xd7, 0x12, 0x6b, 0x86, 0x96, 0x61, 0x86, 0x8d, 0x2e, 0x00, 0xb8, 0x64, 0xc7, 0x6b, 0x90, + 0x9a, 0x93, 0x6c, 0x89, 0xd5, 0x80, 0x44, 0x5d, 0xa8, 0x2a, 0x08, 0xd6, 0xb0, 0xec, 0x2f, 0x59, + 0x50, 0x59, 0xdc, 0x09, 0x3d, 0xb7, 0x16, 0xba, 0x31, 0x6a, 0xc1, 0x78, 0x33, 0x22, 0x1b, 0x24, + 0x52, 0x45, 0x33, 0xd6, 0xd9, 0xf2, 0xb9, 0xe1, 0x0b, 0x17, 0x72, 0xc6, 0x6d, 0x56, 0x5a, 0x09, + 0x92, 0x68, 0x77, 0xe9, 0x11, 0xd1, 0xf4, 0x78, 0x06, 0x8a, 0xb3, 0x6d, 0xd8, 0xbf, 0x54, 0x82, + 0x53, 0x8b, 0x9f, 0x6f, 0x45, 0xa4, 0xea, 0xc5, 0x77, 0xb3, 0x5b, 0xc1, 0xf5, 0xe2, 0xbb, 0xd7, + 0xd3, 0xc9, 0x50, 0x6b, 0xb0, 0x2a, 0xca, 0xb1, 0xc2, 0x40, 0xcf, 0xc3, 0x20, 0xfd, 0x7d, 0x13, + 0xaf, 0x89, 0xd1, 0x4f, 0x09, 0xe4, 0xe1, 0xaa, 0x93, 0x38, 0x55, 0x0e, 0xc2, 0x12, 0x07, 0x5d, + 0x83, 0xe1, 0x06, 0xdb, 0xef, 0x9b, 0xd7, 0x42, 0x97, 0xb0, 0x2f, 0x5c, 0x59, 0x7a, 0x8e, 0xa2, + 0x2f, 0xa7, 0xc5, 0x07, 0x7b, 0x73, 0x33, 0xbc, 0x6f, 0x82, 0x84, 0x06, 0xc3, 0x7a, 0x7d, 0x64, + 0xab, 0x8d, 0xd8, 0xc7, 0x28, 0x41, 0x87, 0x4d, 0x78, 0x4e, 0xdb, 0x53, 0xfd, 0x6c, 0x4f, 0x8d, + 0x74, 0xd9, 0x4f, 0xff, 0xd8, 0x12, 0x73, 0xb2, 0xea, 0xf9, 0x26, 0x7b, 0xb8, 0x00, 0x10, 0x93, + 0x46, 0x44, 0x12, 0x6d, 0x56, 0xd4, 0x67, 0xae, 0x2b, 0x08, 0xd6, 0xb0, 0xe8, 0xe6, 0x8f, 0xb7, + 0x9c, 0x88, 0xad, 0x16, 0x31, 0x37, 0x6a, 0xf3, 0xd7, 0x25, 0x00, 0xa7, 0x38, 0xc6, 0xe6, 0x2f, + 0xe7, 0x6e, 0xfe, 0xdf, 0xb1, 0x60, 0x70, 0xc9, 0x0b, 0x5c, 0x2f, 0xd8, 0x44, 0xef, 0xc0, 0x10, + 0xe5, 0xe8, 0xae, 0x93, 0x38, 0x62, 0xdf, 0x7f, 0x44, 0x2e, 0x1e, 0x9d, 0xc1, 0xca, 0xe5, 0x13, + 0xcf, 0x53, 0x6c, 0xba, 0x88, 0x6e, 0xdc, 0x79, 0x97, 0x34, 0x92, 0x6b, 0x24, 0x71, 0xd2, 0xe1, + 0xa4, 0x65, 0x58, 0x51, 0x45, 0x37, 0x61, 0x20, 0x71, 0xa2, 0x4d, 0x92, 0x88, 0x6d, 0x9f, 0xb3, + 0x29, 0x39, 0x0d, 0x4c, 0x97, 0x1c, 0x09, 0x1a, 0x24, 0x65, 0x90, 0xeb, 0x8c, 0x08, 0x16, 0xc4, + 0xec, 0x06, 0x8c, 0x2c, 0x3b, 0x4d, 0xe7, 0x8e, 0xe7, 0x7b, 0x89, 0x47, 0x62, 0xf4, 0x61, 0x28, + 0x3b, 0xae, 0xcb, 0x36, 0x40, 0x65, 0xe9, 0xd4, 0xfe, 0xde, 0x5c, 0x79, 0xd1, 0x75, 0x0f, 0xf6, + 0xe6, 0x40, 0x61, 0xed, 0x62, 0x8a, 0x81, 0x9e, 0x85, 0x3e, 0x37, 0x0a, 0x9b, 0x33, 0x25, 0x86, + 0x79, 0x9a, 0xee, 0xd4, 0x6a, 0x14, 0x36, 0x33, 0xa8, 0x0c, 0xc7, 0xfe, 0x41, 0x09, 0xd0, 0x32, + 0x69, 0x6e, 0xad, 0xd6, 0x8d, 0x6f, 0x7a, 0x0e, 0x86, 0xb6, 0xc3, 0xc0, 0x4b, 0xc2, 0x28, 0x16, + 0x0d, 0xb2, 0x75, 0x71, 0x4d, 0x94, 0x61, 0x05, 0x45, 0x67, 0xa1, 0xaf, 0x99, 0x6e, 0xef, 0x11, + 0xc9, 0x1a, 0xd8, 0xc6, 0x66, 0x10, 0x8a, 0xd1, 0x8a, 0x49, 0x24, 0xd6, 0xb3, 0xc2, 0xb8, 0x19, + 0x93, 0x08, 0x33, 0x48, 0xba, 0x82, 0xe8, 0xda, 0x12, 0xab, 0x35, 0xb3, 0x82, 0x28, 0x04, 0x6b, + 0x58, 0xe8, 0x6d, 0xa8, 0xf0, 0x7f, 0x98, 0x6c, 0xb0, 0xa5, 0x9b, 0xcb, 0x14, 0xae, 0x86, 0x0d, + 0xc7, 0xcf, 0x4e, 0xfe, 0x28, 0x5b, 0x71, 0x92, 0x10, 0x4e, 0x69, 0x1a, 0x2b, 0x6e, 0x20, 0x77, + 0xc5, 0xfd, 0x1d, 0x0b, 0xd0, 0xb2, 0x17, 0xb8, 0x24, 0x3a, 0x81, 0xa3, 0xb3, 0xb7, 0xcd, 0xf0, + 0x27, 0xb4, 0x6b, 0xe1, 0x76, 0x33, 0x0c, 0x48, 0x90, 0x2c, 0x87, 0x81, 0xcb, 0x8f, 0xd3, 0x8f, + 0x43, 0x5f, 0x42, 0x9b, 0xe2, 0xdd, 0x7a, 0x5a, 0x7e, 0x16, 0xda, 0xc0, 0xc1, 0xde, 0xdc, 0xe9, + 0xf6, 0x1a, 0xac, 0x0b, 0xac, 0x0e, 0xfa, 0x18, 0x0c, 0xc4, 0x89, 0x93, 0xb4, 0x62, 0xd1, 0xd1, + 0x27, 0x64, 0x47, 0xeb, 0xac, 0xf4, 0x60, 0x6f, 0x6e, 0x5c, 0x55, 0xe3, 0x45, 0x58, 0x54, 0x40, + 0xcf, 0xc0, 0xe0, 0x36, 0x89, 0x63, 0x67, 0x53, 0x32, 0xb8, 0x71, 0x51, 0x77, 0xf0, 0x1a, 0x2f, + 0xc6, 0x12, 0x8e, 0x9e, 0x84, 0x7e, 0x12, 0x45, 0x61, 0x24, 0x56, 0xc4, 0xa8, 0x40, 0xec, 0x5f, + 0xa1, 0x85, 0x98, 0xc3, 0xec, 0xff, 0x62, 0xc1, 0xb8, 0xea, 0x2b, 0x6f, 0xeb, 0x04, 0xb6, 0xbc, + 0x0b, 0xd0, 0x90, 0x03, 0x8c, 0xd9, 0x46, 0xd3, 0xda, 0xe8, 0xbc, 0xfc, 0xda, 0x27, 0x34, 0x6d, + 0x43, 0x15, 0xc5, 0x58, 0xa3, 0x6b, 0xff, 0x3b, 0x0b, 0xa6, 0x32, 0x63, 0xbb, 0xea, 0xc5, 0x09, + 0x7a, 0xab, 0x6d, 0x7c, 0xf3, 0xc5, 0xc6, 0x47, 0x6b, 0xb3, 0xd1, 0xa9, 0xf5, 0x22, 0x4b, 0xb4, + 0xb1, 0x61, 0xe8, 0xf7, 0x12, 0xb2, 0x2d, 0x87, 0xf5, 0x7c, 0xc1, 0x61, 0xf1, 0xfe, 0xa5, 0x5f, + 0x69, 0x8d, 0xd2, 0xc0, 0x9c, 0x94, 0xfd, 0xbf, 0x2c, 0xa8, 0x2c, 0x87, 0xc1, 0x86, 0xb7, 0x79, + 0xcd, 0x69, 0x9e, 0xc0, 0xf7, 0xa9, 0x43, 0x1f, 0xa3, 0xce, 0x87, 0xf0, 0x42, 0xde, 0x10, 0x44, + 0xc7, 0xe6, 0xe9, 0x99, 0xca, 0x85, 0x05, 0xc5, 0xa6, 0x68, 0x11, 0x66, 0xc4, 0x66, 0x5f, 0x81, + 0x8a, 0x42, 0x40, 0x13, 0x50, 0xbe, 0x4b, 0xb8, 0x24, 0x59, 0xc1, 0xf4, 0x27, 0x9a, 0x86, 0xfe, + 0x1d, 0xc7, 0x6f, 0x89, 0xcd, 0x8b, 0xf9, 0x9f, 0x8f, 0x97, 0x2e, 0x5a, 0xf6, 0x0f, 0xd8, 0x0e, + 0x14, 0x8d, 0xac, 0x04, 0x3b, 0x82, 0x39, 0x7c, 0xd9, 0x82, 0x69, 0xbf, 0x03, 0x53, 0x12, 0x73, + 0x72, 0x14, 0x76, 0xf6, 0x98, 0xe8, 0xf6, 0x74, 0x27, 0x28, 0xee, 0xd8, 0x1a, 0xe5, 0xf5, 0x61, + 0x93, 0x2e, 0x38, 0xc7, 0x67, 0x5d, 0x17, 0x32, 0xc0, 0x0d, 0x51, 0x86, 0x15, 0xd4, 0xfe, 0x73, + 0x0b, 0xa6, 0xd5, 0x38, 0xae, 0x90, 0xdd, 0x3a, 0xf1, 0x49, 0x23, 0x09, 0xa3, 0x87, 0x65, 0x24, + 0x8f, 0xf3, 0x6f, 0xc2, 0x79, 0xd2, 0xb0, 0x20, 0x50, 0xbe, 0x42, 0x76, 0xf9, 0x07, 0xd2, 0x07, + 0x5a, 0x3e, 0x74, 0xa0, 0xbf, 0x65, 0xc1, 0xa8, 0x1a, 0xe8, 0x09, 0x6c, 0xb9, 0xab, 0xe6, 0x96, + 0xfb, 0x70, 0xc1, 0xf5, 0xda, 0x65, 0xb3, 0xfd, 0xed, 0x12, 0x65, 0x1b, 0x02, 0xa7, 0x16, 0x85, + 0x74, 0x92, 0x28, 0xc7, 0x7f, 0x48, 0xbe, 0x52, 0x6f, 0x83, 0xbd, 0x42, 0x76, 0xd7, 0x43, 0x2a, + 0x4d, 0x74, 0x1e, 0xac, 0xf1, 0x51, 0xfb, 0x0e, 0xfd, 0xa8, 0xbf, 0x5f, 0x82, 0x53, 0x6a, 0x5a, + 0x8c, 0x53, 0xfa, 0x67, 0x72, 0x62, 0x5e, 0x80, 0x61, 0x97, 0x6c, 0x38, 0x2d, 0x3f, 0x51, 0xda, + 0x44, 0x3f, 0x57, 0x33, 0xab, 0x69, 0x31, 0xd6, 0x71, 0x7a, 0x98, 0xcb, 0x6f, 0x0c, 0x33, 0x7e, + 0x9e, 0x38, 0x74, 0xd5, 0x53, 0x09, 0x4f, 0x53, 0x0f, 0x47, 0x74, 0xf5, 0x50, 0xa8, 0x82, 0x4f, + 0x42, 0xbf, 0xb7, 0x4d, 0xcf, 0xfc, 0x92, 0x79, 0x94, 0xaf, 0xd1, 0x42, 0xcc, 0x61, 0xe8, 0x29, + 0x18, 0x6c, 0x84, 0xdb, 0xdb, 0x4e, 0xe0, 0xce, 0x94, 0x99, 0xcc, 0x39, 0x4c, 0xc5, 0x82, 0x65, + 0x5e, 0x84, 0x25, 0x0c, 0x3d, 0x06, 0x7d, 0x4e, 0xb4, 0x19, 0xcf, 0xf4, 0x31, 0x9c, 0x21, 0xda, + 0xd2, 0x62, 0xb4, 0x19, 0x63, 0x56, 0x4a, 0x65, 0xc9, 0x7b, 0x61, 0x74, 0xd7, 0x0b, 0x36, 0xab, + 0x5e, 0xc4, 0x04, 0x43, 0x4d, 0x96, 0xbc, 0xad, 0x20, 0x58, 0xc3, 0x42, 0x35, 0xe8, 0x6f, 0x86, + 0x51, 0x12, 0xcf, 0x0c, 0xb0, 0x89, 0x7f, 0x2e, 0x77, 0xfb, 0xf1, 0x71, 0xd7, 0xc2, 0x28, 0x49, + 0x87, 0x42, 0xff, 0xc5, 0x98, 0x13, 0x42, 0xcb, 0x50, 0x26, 0xc1, 0xce, 0xcc, 0x20, 0xa3, 0xf7, + 0xa1, 0xc3, 0xe9, 0xad, 0x04, 0x3b, 0xb7, 0x9c, 0x28, 0xe5, 0x57, 0x2b, 0xc1, 0x0e, 0xa6, 0xb5, + 0x51, 0x03, 0x2a, 0xd2, 0x84, 0x15, 0xcf, 0x0c, 0x15, 0x59, 0x8a, 0x58, 0xa0, 0x63, 0xf2, 0x5e, + 0xcb, 0x8b, 0xc8, 0x36, 0x09, 0x92, 0x38, 0x55, 0xac, 0x24, 0x34, 0xc6, 0x29, 0x5d, 0xd4, 0x80, + 0x11, 0x2e, 0x7f, 0x5e, 0x0b, 0x5b, 0x41, 0x12, 0xcf, 0x54, 0x58, 0x97, 0x73, 0x2c, 0x17, 0xb7, + 0xd2, 0x1a, 0x4b, 0xd3, 0x82, 0xfc, 0x88, 0x56, 0x18, 0x63, 0x83, 0x28, 0x7a, 0x0b, 0x46, 0x7d, + 0x6f, 0x87, 0x04, 0x24, 0x8e, 0x6b, 0x51, 0x78, 0x87, 0xcc, 0x00, 0x1b, 0xcd, 0x93, 0x79, 0x5a, + 0x7c, 0x78, 0x87, 0x2c, 0x4d, 0xee, 0xef, 0xcd, 0x8d, 0x5e, 0xd5, 0x6b, 0x63, 0x93, 0x18, 0x7a, + 0x1b, 0xc6, 0xa8, 0xb0, 0xeb, 0xa5, 0xe4, 0x87, 0x8b, 0x93, 0x47, 0xfb, 0x7b, 0x73, 0x63, 0xd8, + 0xa8, 0x8e, 0x33, 0xe4, 0xd0, 0x3a, 0x54, 0x7c, 0x6f, 0x83, 0x34, 0x76, 0x1b, 0x3e, 0x99, 0x19, + 0x61, 0xb4, 0x73, 0x36, 0xe7, 0x55, 0x89, 0xce, 0x15, 0x0c, 0xf5, 0x17, 0xa7, 0x84, 0xd0, 0x2d, + 0x38, 0x9d, 0x90, 0x68, 0xdb, 0x0b, 0x1c, 0xba, 0xa9, 0x84, 0xf4, 0xcb, 0x4c, 0x25, 0xa3, 0x6c, + 0xd5, 0x9e, 0x11, 0x13, 0x7b, 0x7a, 0xbd, 0x23, 0x16, 0xee, 0x52, 0x1b, 0xdd, 0x80, 0x71, 0xb6, + 0x9f, 0x6a, 0x2d, 0xdf, 0xaf, 0x85, 0xbe, 0xd7, 0xd8, 0x9d, 0x19, 0x63, 0x04, 0x9f, 0x92, 0x06, + 0x90, 0x35, 0x13, 0x4c, 0x15, 0xc3, 0xf4, 0x1f, 0xce, 0xd6, 0x46, 0x3e, 0x8c, 0xc7, 0xa4, 0xd1, + 0x8a, 0xbc, 0x64, 0x97, 0xae, 0x7d, 0x72, 0x3f, 0x99, 0x19, 0x2f, 0xa2, 0xe8, 0xd6, 0xcd, 0x4a, + 0xdc, 0xfa, 0x94, 0x29, 0xc4, 0x59, 0xd2, 0x94, 0x55, 0xc4, 0x89, 0xeb, 0x05, 0x33, 0x13, 0x8c, + 0x03, 0xa9, 0xfd, 0x55, 0xa7, 0x85, 0x98, 0xc3, 0x98, 0xfd, 0x80, 0xfe, 0xb8, 0x41, 0xb9, 0xf4, + 0x24, 0x43, 0x4c, 0xed, 0x07, 0x12, 0x80, 0x53, 0x1c, 0x2a, 0x1a, 0x24, 0xc9, 0xee, 0x0c, 0x62, + 0xa8, 0x6a, 0xab, 0xad, 0xaf, 0x7f, 0x06, 0xd3, 0x72, 0x74, 0x0b, 0x06, 0x49, 0xb0, 0xb3, 0x1a, + 0x85, 0xdb, 0x33, 0x53, 0x45, 0x78, 0xc0, 0x0a, 0x47, 0xe6, 0xe7, 0x47, 0xaa, 0xc2, 0x88, 0x62, + 0x2c, 0x89, 0xa1, 0xfb, 0x30, 0xd3, 0xe1, 0x2b, 0xf1, 0x8f, 0x32, 0xcd, 0x3e, 0xca, 0x27, 0x44, + 0xdd, 0x99, 0xf5, 0x2e, 0x78, 0x07, 0x87, 0xc0, 0x70, 0x57, 0xea, 0xf6, 0x1d, 0x18, 0x53, 0x8c, + 0x8a, 0x7d, 0x6f, 0x34, 0x07, 0xfd, 0x94, 0x17, 0x4b, 0x85, 0xbe, 0x42, 0x27, 0x95, 0xb2, 0xe8, + 0x18, 0xf3, 0x72, 0x36, 0xa9, 0xde, 0xe7, 0xc9, 0xd2, 0x6e, 0x42, 0xb8, 0x62, 0x57, 0xd6, 0x26, + 0x55, 0x02, 0x70, 0x8a, 0x63, 0xff, 0x1f, 0x2e, 0x26, 0xa5, 0xdc, 0xb0, 0xc0, 0x49, 0x70, 0x1e, + 0x86, 0xb6, 0xc2, 0x38, 0xa1, 0xd8, 0xac, 0x8d, 0xfe, 0x54, 0x30, 0xba, 0x2c, 0xca, 0xb1, 0xc2, + 0x40, 0xaf, 0xc2, 0x68, 0x43, 0x6f, 0x40, 0x1c, 0x63, 0xa7, 0x44, 0x15, 0xb3, 0x75, 0x6c, 0xe2, + 0xa2, 0x8b, 0x30, 0xc4, 0xac, 0xdc, 0x8d, 0xd0, 0x17, 0x2a, 0xa4, 0x3c, 0x95, 0x87, 0x6a, 0xa2, + 0xfc, 0x40, 0xfb, 0x8d, 0x15, 0x36, 0x55, 0xc4, 0x69, 0x17, 0xd6, 0x6a, 0xe2, 0x00, 0x51, 0x8a, + 0xf8, 0x65, 0x56, 0x8a, 0x05, 0xd4, 0xfe, 0x17, 0x25, 0x6d, 0x96, 0xa9, 0x02, 0x44, 0xd0, 0x9b, + 0x30, 0x78, 0xcf, 0xf1, 0x12, 0x2f, 0xd8, 0x14, 0xd2, 0xc3, 0x8b, 0x05, 0x4f, 0x13, 0x56, 0xfd, + 0x36, 0xaf, 0xca, 0x4f, 0x3e, 0xf1, 0x07, 0x4b, 0x82, 0x94, 0x76, 0xd4, 0x0a, 0x02, 0x4a, 0xbb, + 0xd4, 0x3b, 0x6d, 0xcc, 0xab, 0x72, 0xda, 0xe2, 0x0f, 0x96, 0x04, 0xd1, 0x06, 0x80, 0x5c, 0x4b, + 0xc4, 0x15, 0xd6, 0xe5, 0x8f, 0xf6, 0x42, 0x7e, 0x5d, 0xd5, 0x5e, 0x1a, 0xa3, 0x67, 0x6d, 0xfa, + 0x1f, 0x6b, 0x94, 0xed, 0x84, 0x09, 0x61, 0xed, 0xdd, 0x42, 0x9f, 0xa5, 0x5b, 0xda, 0x89, 0x12, + 0xe2, 0x2e, 0x26, 0x59, 0x03, 0xfd, 0xe1, 0x22, 0xf6, 0xba, 0xb7, 0x4d, 0xf4, 0xed, 0x2f, 0x88, + 0xe0, 0x94, 0x9e, 0xfd, 0xdd, 0x32, 0xcc, 0x74, 0xeb, 0x2e, 0x5d, 0x92, 0xe4, 0xbe, 0x97, 0x2c, + 0x53, 0x31, 0xc9, 0x32, 0x97, 0xe4, 0x8a, 0x28, 0xc7, 0x0a, 0x83, 0xae, 0x8d, 0xd8, 0xdb, 0x94, + 0xca, 0x52, 0x7f, 0xba, 0x36, 0xea, 0xac, 0x14, 0x0b, 0x28, 0xc5, 0x8b, 0x88, 0x13, 0x8b, 0xcb, + 0x0d, 0x6d, 0x0d, 0x61, 0x56, 0x8a, 0x05, 0x54, 0x37, 0x88, 0xf4, 0xe5, 0x18, 0x44, 0x8c, 0x29, + 0xea, 0x7f, 0xb0, 0x53, 0x84, 0x3e, 0x07, 0xb0, 0xe1, 0x05, 0x5e, 0xbc, 0xc5, 0xa8, 0x0f, 0xf4, + 0x4c, 0x5d, 0x09, 0x59, 0xab, 0x8a, 0x0a, 0xd6, 0x28, 0xa2, 0x97, 0x61, 0x58, 0x6d, 0xcf, 0xb5, + 0xea, 0xcc, 0xa0, 0x69, 0x10, 0x4f, 0x79, 0x55, 0x15, 0xeb, 0x78, 0xf6, 0xbb, 0xd9, 0xf5, 0x22, + 0x76, 0x85, 0x36, 0xbf, 0x56, 0xd1, 0xf9, 0x2d, 0x1d, 0x3e, 0xbf, 0xf6, 0x7f, 0x2e, 0xc3, 0xb8, + 0xd1, 0x58, 0x2b, 0x2e, 0xc0, 0xd1, 0x5e, 0xa7, 0x07, 0x96, 0x93, 0x10, 0xb1, 0x27, 0xcf, 0xf7, + 0xb2, 0x69, 0xf4, 0xe3, 0x8d, 0xee, 0x05, 0x4e, 0x09, 0x6d, 0x41, 0xc5, 0x77, 0x62, 0x66, 0x52, + 0x21, 0x62, 0x2f, 0xf6, 0x46, 0x36, 0x55, 0x3f, 0x9c, 0x38, 0xd1, 0x4e, 0x0f, 0xde, 0x4a, 0x4a, + 0x9c, 0x9e, 0xb6, 0x54, 0xd8, 0x91, 0x37, 0x6a, 0xaa, 0x3b, 0x54, 0x22, 0xda, 0xc5, 0x1c, 0x86, + 0x2e, 0xc2, 0x48, 0x44, 0xd8, 0x4a, 0x59, 0xa6, 0xf2, 0x1c, 0x5b, 0x7a, 0xfd, 0xa9, 0xe0, 0x87, + 0x35, 0x18, 0x36, 0x30, 0x53, 0xb9, 0x7f, 0xe0, 0x10, 0xb9, 0xff, 0x19, 0x18, 0x64, 0x3f, 0xd4, + 0xaa, 0x50, 0x5f, 0x68, 0x8d, 0x17, 0x63, 0x09, 0xcf, 0x2e, 0xa2, 0xa1, 0x82, 0x8b, 0xe8, 0x59, + 0x18, 0xab, 0x3a, 0x64, 0x3b, 0x0c, 0x56, 0x02, 0xb7, 0x19, 0x7a, 0x41, 0x82, 0x66, 0xa0, 0x8f, + 0x9d, 0x27, 0x7c, 0xbf, 0xf7, 0x51, 0x0a, 0xb8, 0x8f, 0xca, 0xee, 0xf6, 0x9f, 0x94, 0x60, 0xb4, + 0x4a, 0x7c, 0x92, 0x10, 0xae, 0xf7, 0xc4, 0x68, 0x15, 0xd0, 0x66, 0xe4, 0x34, 0x48, 0x8d, 0x44, + 0x5e, 0xe8, 0xd6, 0x49, 0x23, 0x0c, 0xd8, 0x45, 0x14, 0x3d, 0x20, 0x4f, 0xef, 0xef, 0xcd, 0xa1, + 0x4b, 0x6d, 0x50, 0xdc, 0xa1, 0x06, 0x72, 0x61, 0xb4, 0x19, 0x11, 0xc3, 0x6e, 0x68, 0xe5, 0x8b, + 0x1a, 0x35, 0xbd, 0x0a, 0x97, 0x86, 0x8d, 0x22, 0x6c, 0x12, 0x45, 0x9f, 0x82, 0x89, 0x30, 0x6a, + 0x6e, 0x39, 0x41, 0x95, 0x34, 0x49, 0xe0, 0x52, 0x15, 0x40, 0x58, 0x3b, 0xa6, 0xf7, 0xf7, 0xe6, + 0x26, 0x6e, 0x64, 0x60, 0xb8, 0x0d, 0x1b, 0xbd, 0x09, 0x93, 0xcd, 0x28, 0x6c, 0x3a, 0x9b, 0x6c, + 0xc9, 0x08, 0x69, 0x85, 0xf3, 0xa6, 0xf3, 0xfb, 0x7b, 0x73, 0x93, 0xb5, 0x2c, 0xf0, 0x60, 0x6f, + 0x6e, 0x8a, 0x4d, 0x19, 0x2d, 0x49, 0x81, 0xb8, 0x9d, 0x8c, 0xfd, 0x1e, 0x9c, 0xaa, 0x86, 0xf7, + 0x82, 0x7b, 0x4e, 0xe4, 0x2e, 0xd6, 0xd6, 0x34, 0xe3, 0xc4, 0x1b, 0x52, 0xf9, 0xe5, 0x17, 0x7c, + 0x39, 0x27, 0x9b, 0x46, 0x83, 0xab, 0x1d, 0xab, 0x9e, 0x4f, 0xba, 0x98, 0x43, 0xfe, 0x49, 0xc9, + 0x68, 0x33, 0xc5, 0x57, 0x77, 0x17, 0x56, 0xd7, 0xbb, 0x8b, 0xcf, 0xc2, 0xd0, 0x86, 0x47, 0x7c, + 0x17, 0x93, 0x0d, 0xf1, 0xb5, 0x5e, 0x28, 0x72, 0xb9, 0xb3, 0x4a, 0xeb, 0x48, 0xeb, 0x18, 0x57, + 0xa2, 0x57, 0x05, 0x19, 0xac, 0x08, 0xa2, 0x16, 0x4c, 0x48, 0x3d, 0x4c, 0x42, 0xc5, 0x66, 0x7f, + 0xb1, 0x98, 0x9a, 0x67, 0x36, 0xc3, 0x3e, 0x2f, 0xce, 0x10, 0xc4, 0x6d, 0x4d, 0x50, 0xfd, 0x79, + 0x9b, 0x1e, 0x75, 0x7d, 0x6c, 0xe9, 0x33, 0xfd, 0x99, 0x99, 0x02, 0x58, 0xa9, 0xfd, 0x6b, 0x16, + 0x3c, 0xd2, 0x36, 0x5b, 0xc2, 0x4e, 0x72, 0x6c, 0xdf, 0x28, 0x6b, 0xac, 0x28, 0xe5, 0x1b, 0x2b, + 0xec, 0x1b, 0x30, 0xbd, 0xb2, 0xdd, 0x4c, 0x76, 0xab, 0x9e, 0x79, 0xe5, 0xf2, 0x0a, 0x0c, 0x6c, + 0x13, 0xd7, 0x6b, 0x6d, 0x8b, 0xcf, 0x3a, 0x27, 0xcf, 0x85, 0x6b, 0xac, 0xf4, 0x60, 0x6f, 0x6e, + 0xb4, 0x9e, 0x84, 0x91, 0xb3, 0x49, 0x78, 0x01, 0x16, 0xe8, 0xf6, 0x8f, 0x2d, 0x18, 0x97, 0xfc, + 0x61, 0xd1, 0x75, 0x23, 0x12, 0xc7, 0x68, 0x16, 0x4a, 0x5e, 0x53, 0x10, 0x02, 0x41, 0xa8, 0xb4, + 0x56, 0xc3, 0x25, 0xaf, 0x89, 0xde, 0x84, 0x0a, 0xbf, 0xa9, 0x4b, 0x17, 0x47, 0x8f, 0x37, 0x7f, + 0x4c, 0x37, 0x5c, 0x97, 0x34, 0x70, 0x4a, 0x4e, 0x4a, 0xc9, 0xec, 0xe4, 0x29, 0x9b, 0xf7, 0x46, + 0x97, 0x45, 0x39, 0x56, 0x18, 0xe8, 0x1c, 0x0c, 0x05, 0xa1, 0xcb, 0x2f, 0x53, 0xf9, 0x3e, 0x65, + 0x4b, 0xee, 0xba, 0x28, 0xc3, 0x0a, 0x6a, 0x7f, 0xd5, 0x82, 0x11, 0x39, 0xc6, 0x82, 0x02, 0x3b, + 0xdd, 0x24, 0xa9, 0xb0, 0x9e, 0x6e, 0x12, 0x2a, 0x70, 0x33, 0x88, 0x21, 0x67, 0x97, 0x7b, 0x91, + 0xb3, 0xed, 0xdf, 0x2c, 0xc1, 0x98, 0xec, 0x4e, 0xbd, 0x75, 0x27, 0x26, 0x54, 0x0c, 0xa9, 0x38, + 0x7c, 0xf2, 0x89, 0x5c, 0x67, 0xcf, 0xe7, 0xe9, 0x62, 0xc6, 0x37, 0x4b, 0xc5, 0x9c, 0x45, 0x49, + 0x07, 0xa7, 0x24, 0xd1, 0x0e, 0x4c, 0x06, 0x61, 0xc2, 0x8e, 0x37, 0x05, 0x2f, 0x76, 0xd3, 0x91, + 0x6d, 0xe7, 0x51, 0xd1, 0xce, 0xe4, 0xf5, 0x2c, 0x3d, 0xdc, 0xde, 0x04, 0xba, 0x21, 0x6d, 0x4c, + 0x65, 0xd6, 0xd6, 0xb3, 0xc5, 0xda, 0xea, 0x6e, 0x62, 0xb2, 0x7f, 0xcf, 0x82, 0x8a, 0x44, 0x3b, + 0x89, 0x2b, 0xaf, 0xdb, 0x30, 0x18, 0xb3, 0x4f, 0x24, 0xa7, 0xeb, 0x7c, 0xb1, 0x21, 0xf0, 0xef, + 0x9a, 0x9e, 0xe9, 0xfc, 0x7f, 0x8c, 0x25, 0x35, 0x66, 0x6c, 0x57, 0x03, 0x79, 0xe8, 0x8c, 0xed, + 0xaa, 0x67, 0xdd, 0x6f, 0xb6, 0x46, 0x0d, 0x6b, 0x00, 0x15, 0x4c, 0x9b, 0x11, 0xd9, 0xf0, 0xee, + 0x67, 0x05, 0xd3, 0x1a, 0x2b, 0xc5, 0x02, 0x8a, 0x36, 0x60, 0xa4, 0x21, 0xcd, 0xd1, 0x29, 0x0b, + 0xf9, 0x48, 0x41, 0xdb, 0xbf, 0xba, 0x46, 0xe2, 0xae, 0x49, 0xcb, 0x1a, 0x25, 0x6c, 0xd0, 0xa5, + 0x7c, 0x2a, 0xbd, 0x29, 0x2f, 0x17, 0x34, 0xdc, 0x44, 0x24, 0x49, 0x5b, 0xe8, 0x7a, 0x49, 0x6e, + 0x7f, 0xd3, 0x82, 0x01, 0x6e, 0xbf, 0x2c, 0x66, 0x04, 0xd6, 0x2e, 0xc8, 0xd2, 0xf9, 0xbc, 0x45, + 0x0b, 0xc5, 0x7d, 0x19, 0xba, 0x0d, 0x15, 0xf6, 0x83, 0xd9, 0x62, 0xca, 0x45, 0xfc, 0xb4, 0x78, + 0xfb, 0x7a, 0x57, 0x6f, 0x49, 0x02, 0x38, 0xa5, 0x65, 0x7f, 0xbf, 0x4c, 0x59, 0x5f, 0x8a, 0x6a, + 0x9c, 0xed, 0xd6, 0x49, 0x9c, 0xed, 0xa5, 0xe3, 0x3f, 0xdb, 0xdf, 0x83, 0xf1, 0x86, 0x76, 0x41, + 0x97, 0x7e, 0xf1, 0x0b, 0x05, 0x97, 0x95, 0x76, 0xab, 0xc7, 0xed, 0x75, 0xcb, 0x26, 0x39, 0x9c, + 0xa5, 0x8f, 0x08, 0x8c, 0xf0, 0xf5, 0x20, 0xda, 0xeb, 0x63, 0xed, 0x2d, 0x14, 0x59, 0x61, 0x7a, + 0x63, 0x6c, 0x15, 0xd7, 0x35, 0x42, 0xd8, 0x20, 0x6b, 0xff, 0x4a, 0x3f, 0xf4, 0xaf, 0xec, 0x90, + 0x20, 0x39, 0x01, 0x56, 0xb7, 0x0d, 0x63, 0x5e, 0xb0, 0x13, 0xfa, 0x3b, 0xc4, 0xe5, 0xf0, 0xa3, + 0x1d, 0xef, 0xa7, 0x45, 0x23, 0x63, 0x6b, 0x06, 0x31, 0x9c, 0x21, 0x7e, 0x1c, 0x96, 0x82, 0xd7, + 0x61, 0x80, 0xaf, 0x0c, 0x61, 0x26, 0xc8, 0xb1, 0xe7, 0xb3, 0x89, 0x15, 0x3b, 0x28, 0xb5, 0x67, + 0xf0, 0xab, 0x04, 0x41, 0x08, 0xbd, 0x0b, 0x63, 0x1b, 0x5e, 0x14, 0x27, 0x54, 0xd9, 0x8f, 0x13, + 0x67, 0xbb, 0x79, 0x04, 0x1b, 0x81, 0x9a, 0x91, 0x55, 0x83, 0x12, 0xce, 0x50, 0x46, 0x9b, 0x30, + 0x4a, 0x55, 0xd4, 0xb4, 0xa9, 0xc1, 0x9e, 0x9b, 0x52, 0x26, 0xc2, 0xab, 0x3a, 0x21, 0x6c, 0xd2, + 0xa5, 0x2c, 0xa9, 0xc1, 0x54, 0xda, 0x21, 0x26, 0xdd, 0x28, 0x96, 0xc4, 0x75, 0x59, 0x0e, 0xa3, + 0x9c, 0x8d, 0x79, 0xca, 0x54, 0x4c, 0xce, 0x96, 0xfa, 0xc3, 0xd8, 0xdf, 0xa6, 0x67, 0x31, 0x9d, + 0xc3, 0x13, 0x38, 0xbe, 0x2e, 0x9b, 0xc7, 0xd7, 0x93, 0x05, 0xbe, 0x6c, 0x97, 0xa3, 0xeb, 0x1d, + 0x18, 0xd6, 0x3e, 0x3c, 0x5a, 0x80, 0x4a, 0x43, 0x3a, 0x73, 0x08, 0x2e, 0xae, 0x44, 0x29, 0xe5, + 0xe5, 0x81, 0x53, 0x1c, 0x3a, 0x2f, 0x54, 0x04, 0xcd, 0xba, 0x7e, 0x51, 0x01, 0x15, 0x33, 0x88, + 0xfd, 0x22, 0xc0, 0xca, 0x7d, 0xd2, 0x58, 0xe4, 0x2a, 0x9e, 0x76, 0xbf, 0x67, 0x75, 0xbf, 0xdf, + 0xb3, 0xbf, 0x65, 0xc1, 0xd8, 0xea, 0xb2, 0x21, 0xd3, 0xcf, 0x03, 0x70, 0xd9, 0xf8, 0xf6, 0xed, + 0xeb, 0xd2, 0x7e, 0xcd, 0x8d, 0x8c, 0xaa, 0x14, 0x6b, 0x18, 0xe8, 0x51, 0x28, 0xfb, 0xad, 0x40, + 0x88, 0xac, 0x83, 0xfb, 0x7b, 0x73, 0xe5, 0xab, 0xad, 0x00, 0xd3, 0x32, 0xcd, 0xc7, 0xaa, 0x5c, + 0xd8, 0xc7, 0x2a, 0xdf, 0xdb, 0xf8, 0xeb, 0x65, 0x98, 0x58, 0xf5, 0xc9, 0x7d, 0xa3, 0xd7, 0x4f, + 0xc3, 0x80, 0x1b, 0x79, 0x3b, 0x24, 0xca, 0x0a, 0x02, 0x55, 0x56, 0x8a, 0x05, 0xb4, 0xb0, 0xdb, + 0xd7, 0xdb, 0xed, 0x07, 0xf9, 0xf1, 0xb9, 0xbc, 0xe5, 0x8e, 0x19, 0x6d, 0xc0, 0x20, 0xbf, 0x0f, + 0x8e, 0x67, 0xfa, 0xd9, 0x52, 0x7c, 0xf5, 0xf0, 0xce, 0x64, 0xe7, 0x67, 0x5e, 0xd8, 0x57, 0xb8, + 0xc3, 0x8d, 0xe2, 0x65, 0xa2, 0x14, 0x4b, 0xe2, 0xb3, 0x1f, 0x87, 0x11, 0x1d, 0xb3, 0x27, 0xcf, + 0x9b, 0xbf, 0x6a, 0xc1, 0xd4, 0xaa, 0x1f, 0x36, 0xee, 0x66, 0xfc, 0xf2, 0x5e, 0x86, 0x61, 0xba, + 0x99, 0x62, 0xc3, 0x69, 0xd5, 0xf0, 0xce, 0x15, 0x20, 0xac, 0xe3, 0x69, 0xd5, 0x6e, 0xde, 0x5c, + 0xab, 0x76, 0x72, 0xea, 0x15, 0x20, 0xac, 0xe3, 0xd9, 0x7f, 0x60, 0xc1, 0xe3, 0x97, 0x96, 0x57, + 0x6a, 0x24, 0x8a, 0xbd, 0x38, 0x21, 0x41, 0xd2, 0xe6, 0x57, 0x4c, 0x65, 0x46, 0x57, 0xeb, 0x4a, + 0x2a, 0x33, 0x56, 0x59, 0x2f, 0x04, 0xf4, 0x61, 0x71, 0xae, 0xff, 0xa6, 0x05, 0x53, 0x97, 0xbc, + 0x04, 0x93, 0x66, 0x98, 0x75, 0x05, 0x8e, 0x48, 0x33, 0x8c, 0xbd, 0x24, 0x8c, 0x76, 0xb3, 0xae, + 0xc0, 0x58, 0x41, 0xb0, 0x86, 0xc5, 0x5b, 0xde, 0xf1, 0x62, 0xda, 0xd3, 0x92, 0xa9, 0xea, 0x62, + 0x51, 0x8e, 0x15, 0x06, 0x1d, 0x98, 0xeb, 0x45, 0x4c, 0x64, 0xd8, 0x15, 0x3b, 0x58, 0x0d, 0xac, + 0x2a, 0x01, 0x38, 0xc5, 0xb1, 0xff, 0x9e, 0x05, 0xa7, 0x2e, 0xf9, 0xad, 0x38, 0x21, 0xd1, 0x46, + 0x6c, 0x74, 0xf6, 0x45, 0xa8, 0x10, 0x29, 0xdc, 0x8b, 0xbe, 0xaa, 0x43, 0x43, 0x49, 0xfd, 0xdc, + 0x0f, 0x59, 0xe1, 0x15, 0x70, 0x77, 0xed, 0xcd, 0x39, 0xf3, 0xb7, 0x4b, 0x30, 0x7a, 0x79, 0x7d, + 0xbd, 0x76, 0x89, 0x24, 0x82, 0x4b, 0xe6, 0x1b, 0xa5, 0xb0, 0xa6, 0x91, 0x1f, 0x26, 0xfc, 0xb4, + 0x12, 0xcf, 0x9f, 0xe7, 0xe1, 0x22, 0xf3, 0x6b, 0x41, 0x72, 0x23, 0xaa, 0x27, 0x91, 0x17, 0x6c, + 0x76, 0xd4, 0xe1, 0x25, 0x2f, 0x2f, 0x77, 0xe3, 0xe5, 0xe8, 0x45, 0x18, 0x60, 0xf1, 0x2a, 0x52, + 0xf8, 0xf8, 0xa0, 0x92, 0x13, 0x58, 0xe9, 0xc1, 0xde, 0x5c, 0xe5, 0x26, 0x5e, 0xe3, 0x7f, 0xb0, + 0x40, 0x45, 0x6f, 0xc3, 0xf0, 0x56, 0x92, 0x34, 0x2f, 0x13, 0xc7, 0x25, 0x91, 0xe4, 0x13, 0xe7, + 0x0e, 0xe7, 0x13, 0x74, 0x3a, 0x78, 0x85, 0x74, 0x6b, 0xa5, 0x65, 0x31, 0xd6, 0x29, 0xda, 0x75, + 0x80, 0x14, 0xf6, 0x80, 0x74, 0x10, 0xfb, 0xe7, 0x4b, 0x30, 0x78, 0xd9, 0x09, 0x5c, 0x9f, 0x44, + 0x68, 0x15, 0xfa, 0xc8, 0x7d, 0xd2, 0x10, 0x07, 0x79, 0x4e, 0xd7, 0xd3, 0xc3, 0x8e, 0xdb, 0xd5, + 0xe8, 0x7f, 0xcc, 0xea, 0x23, 0x0c, 0x83, 0xb4, 0xdf, 0x97, 0x94, 0x97, 0xf8, 0x73, 0xf9, 0xb3, + 0xa0, 0x16, 0x05, 0x3f, 0x29, 0x45, 0x11, 0x96, 0x84, 0x98, 0x05, 0xaa, 0xd1, 0xac, 0x53, 0xf6, + 0x96, 0x14, 0xd3, 0xec, 0xd6, 0x97, 0x6b, 0x1c, 0x5d, 0xd0, 0xe5, 0x16, 0x28, 0x59, 0x88, 0x53, + 0x72, 0xf6, 0x45, 0x98, 0x66, 0xf7, 0xb1, 0x4e, 0xb2, 0x65, 0xec, 0x9a, 0xdc, 0xe5, 0x69, 0xff, + 0xb0, 0x04, 0x93, 0x6b, 0xf5, 0xe5, 0xba, 0x69, 0x3b, 0xbc, 0x08, 0x23, 0xfc, 0x80, 0xa6, 0x8b, + 0xce, 0xf1, 0x45, 0x7d, 0x75, 0x87, 0xb0, 0xae, 0xc1, 0xb0, 0x81, 0x89, 0x1e, 0x87, 0xb2, 0xf7, + 0x5e, 0x90, 0xf5, 0xea, 0x5b, 0x7b, 0xfd, 0x3a, 0xa6, 0xe5, 0x14, 0x4c, 0xcf, 0x7a, 0xce, 0xe4, + 0x14, 0x58, 0x9d, 0xf7, 0xaf, 0xc1, 0x98, 0x17, 0x37, 0x62, 0x6f, 0x2d, 0xa0, 0x1c, 0xc0, 0x69, + 0xc8, 0xe5, 0x9b, 0x0a, 0xe7, 0xb4, 0xab, 0x0a, 0x8a, 0x33, 0xd8, 0x1a, 0xc7, 0xed, 0x2f, 0x2c, + 0x2f, 0xe4, 0xba, 0x8b, 0x53, 0x51, 0xa8, 0xc9, 0x46, 0x17, 0x33, 0x1f, 0x21, 0x21, 0x0a, 0xf1, + 0x01, 0xc7, 0x58, 0xc2, 0xec, 0x77, 0xa1, 0xa2, 0xdc, 0xbc, 0xa4, 0x77, 0xa3, 0xd5, 0xc5, 0xbb, + 0x31, 0x9f, 0x33, 0x49, 0xc3, 0x6f, 0xb9, 0xa3, 0xe1, 0xf7, 0x9f, 0x59, 0x90, 0xfa, 0xa9, 0x20, + 0x0c, 0x95, 0x66, 0xc8, 0x2e, 0x89, 0x22, 0x79, 0x1b, 0xfb, 0x54, 0xce, 0x82, 0xe5, 0x1b, 0x86, + 0x2f, 0xa9, 0x9a, 0xac, 0x8b, 0x53, 0x32, 0xe8, 0x2a, 0x0c, 0x36, 0x23, 0x52, 0x4f, 0x58, 0x68, + 0x42, 0x0f, 0x14, 0xf9, 0xdc, 0xf0, 0x9a, 0x58, 0x92, 0xb0, 0xff, 0x95, 0x05, 0x70, 0xd5, 0xdb, + 0xf6, 0x12, 0xec, 0x04, 0x9b, 0xe4, 0x04, 0xb4, 0xc2, 0xeb, 0xd0, 0x17, 0x37, 0x49, 0xa3, 0xd8, + 0x35, 0x5f, 0xda, 0xb3, 0x7a, 0x93, 0x34, 0xd2, 0xcf, 0x41, 0xff, 0x61, 0x46, 0xc7, 0xfe, 0x1e, + 0xc0, 0x58, 0x8a, 0x46, 0x25, 0x73, 0xf4, 0xbc, 0xe1, 0x93, 0xff, 0x68, 0xc6, 0x27, 0xbf, 0xc2, + 0xb0, 0x35, 0x37, 0xfc, 0x04, 0xca, 0xdb, 0xce, 0x7d, 0xa1, 0x08, 0xbc, 0x5c, 0xb4, 0x43, 0xb4, + 0xa5, 0xf9, 0x6b, 0xce, 0x7d, 0x2e, 0x77, 0x3d, 0x27, 0x17, 0xd2, 0x35, 0xe7, 0xfe, 0x01, 0xbf, + 0xcc, 0x63, 0x1b, 0x96, 0x6a, 0x1e, 0x5f, 0xfa, 0xd3, 0xf4, 0x3f, 0xe3, 0xa1, 0xb4, 0x39, 0xd6, + 0xaa, 0x17, 0x08, 0x3b, 0x66, 0x8f, 0xad, 0x7a, 0x41, 0xb6, 0x55, 0x2f, 0x28, 0xd0, 0xaa, 0xc7, + 0x9c, 0x57, 0x07, 0x85, 0xf9, 0x9f, 0x79, 0xfe, 0x0d, 0x5f, 0xf8, 0x58, 0x4f, 0x4d, 0x8b, 0x7b, + 0x04, 0xde, 0xfc, 0x82, 0x14, 0x36, 0x45, 0x69, 0x6e, 0x17, 0x64, 0xd3, 0xe8, 0xef, 0x5b, 0x30, + 0x26, 0x7e, 0x63, 0xf2, 0x5e, 0x8b, 0xc4, 0x89, 0x38, 0xd4, 0x3e, 0x75, 0x94, 0xde, 0x08, 0x12, + 0xbc, 0x53, 0x1f, 0x95, 0x1c, 0xc9, 0x04, 0xe6, 0xf6, 0x2d, 0xd3, 0x1f, 0xf4, 0x3d, 0x0b, 0xa6, + 0xb7, 0x9d, 0xfb, 0xbc, 0x45, 0x5e, 0x86, 0x9d, 0xc4, 0x0b, 0x85, 0x77, 0xe3, 0x6a, 0xaf, 0xeb, + 0xa4, 0x8d, 0x10, 0xef, 0xae, 0x74, 0x5c, 0x9a, 0xee, 0x84, 0x92, 0xdb, 0xe9, 0x8e, 0x3d, 0x9c, + 0xdd, 0x80, 0x21, 0xb9, 0x30, 0x3b, 0x88, 0xf9, 0x55, 0xfd, 0xec, 0xce, 0x51, 0xaa, 0xe7, 0xa5, + 0x69, 0x6c, 0xfe, 0xf5, 0x96, 0x13, 0x24, 0x5e, 0xb2, 0xab, 0xa9, 0x05, 0xac, 0x1d, 0xb1, 0x14, + 0x8f, 0xb5, 0x9d, 0x77, 0x61, 0x44, 0x5f, 0x77, 0xc7, 0xda, 0xd6, 0x7b, 0x30, 0xd5, 0x61, 0x55, + 0x1d, 0x6b, 0x93, 0xf7, 0xe0, 0xd1, 0xae, 0xeb, 0xe3, 0x38, 0x1b, 0xb6, 0x7f, 0xdb, 0xd2, 0x59, + 0xe7, 0x09, 0x18, 0x5d, 0xae, 0x99, 0x46, 0x97, 0x73, 0x45, 0xf7, 0x50, 0x17, 0xcb, 0xcb, 0x86, + 0xde, 0x7d, 0x7a, 0x24, 0xa0, 0x75, 0x18, 0xf0, 0x69, 0x89, 0xbc, 0xf3, 0x3a, 0xdf, 0xcb, 0x2e, + 0x4d, 0x85, 0x12, 0x56, 0x1e, 0x63, 0x41, 0xcb, 0xfe, 0x9e, 0x05, 0x7d, 0x7f, 0x89, 0x11, 0x43, + 0x6d, 0xa4, 0x45, 0xe0, 0xfb, 0x3c, 0x76, 0xee, 0xad, 0xdc, 0x4f, 0x48, 0x10, 0x33, 0x19, 0xb4, + 0xdb, 0xad, 0xfd, 0x30, 0x6d, 0x4a, 0x3a, 0x61, 0xbc, 0x0a, 0xa3, 0xbe, 0x73, 0x87, 0xf8, 0xd2, + 0x60, 0x9c, 0xd5, 0xd8, 0xae, 0xea, 0x40, 0x6c, 0xe2, 0xd2, 0xca, 0x1b, 0xba, 0x3d, 0x5d, 0x08, + 0x49, 0xaa, 0xb2, 0x61, 0x6c, 0xc7, 0x26, 0x2e, 0x55, 0x19, 0xee, 0x39, 0x49, 0x63, 0x4b, 0x68, + 0x73, 0xaa, 0xbb, 0xb7, 0x69, 0x21, 0xe6, 0x30, 0xb4, 0x08, 0xe3, 0x72, 0xc5, 0xde, 0xa2, 0x6a, + 0x7e, 0x18, 0x08, 0x39, 0x53, 0x45, 0x1d, 0x63, 0x13, 0x8c, 0xb3, 0xf8, 0xe8, 0xe3, 0x30, 0x46, + 0x27, 0x27, 0x6c, 0x25, 0xd2, 0xc5, 0xa4, 0x9f, 0xb9, 0x98, 0x30, 0x0f, 0xe5, 0x75, 0x03, 0x82, + 0x33, 0x98, 0xf6, 0xdb, 0x30, 0x75, 0x35, 0x74, 0xdc, 0x25, 0xc7, 0x77, 0x82, 0x06, 0x89, 0xd6, + 0x82, 0xcd, 0xdc, 0xeb, 0x6b, 0xfd, 0x8a, 0xb9, 0x94, 0x77, 0xc5, 0x6c, 0x47, 0x80, 0xf4, 0x06, + 0x84, 0x73, 0xd4, 0x5b, 0x30, 0xe8, 0xf1, 0xa6, 0xc4, 0xb2, 0x7d, 0x21, 0xcf, 0x1e, 0xd5, 0xd6, + 0x47, 0xcd, 0xd9, 0x87, 0x17, 0x60, 0x49, 0x92, 0xaa, 0x20, 0x9d, 0x0c, 0x58, 0xf9, 0x5a, 0x9e, + 0xfd, 0xd7, 0x2d, 0x18, 0xbf, 0x9e, 0x09, 0x69, 0x7d, 0x1a, 0x06, 0x78, 0x62, 0x84, 0xac, 0x89, + 0xa5, 0xce, 0x4a, 0xb1, 0x80, 0x3e, 0x70, 0x0d, 0xff, 0x97, 0x4b, 0x50, 0x61, 0x6e, 0xb6, 0x4d, + 0xaa, 0x4e, 0x1c, 0xbf, 0x98, 0x7a, 0xcd, 0x10, 0x53, 0x73, 0xb4, 0x4c, 0xd5, 0xb1, 0x6e, 0x52, + 0x2a, 0xba, 0xa9, 0x42, 0x3d, 0x0b, 0x29, 0x98, 0x29, 0x41, 0x1e, 0x0e, 0x38, 0x66, 0x46, 0x86, + 0xca, 0x30, 0x50, 0x76, 0xe9, 0xab, 0x70, 0x1f, 0xba, 0x4b, 0x5f, 0xd5, 0xb3, 0x2e, 0xcc, 0xa9, + 0xa6, 0x75, 0x9e, 0xb1, 0xef, 0x4f, 0x32, 0xe7, 0x49, 0xc7, 0xf7, 0x3e, 0x4f, 0x54, 0xc4, 0xf4, + 0x9c, 0x70, 0x86, 0x14, 0xa5, 0x07, 0x8c, 0xcf, 0x88, 0x7f, 0x3c, 0x20, 0x3e, 0xad, 0x62, 0x5f, + 0x86, 0xf1, 0xcc, 0xd4, 0xa1, 0x97, 0xa1, 0xbf, 0xb9, 0xe5, 0xc4, 0x24, 0xe3, 0xc7, 0xd2, 0x5f, + 0xa3, 0x85, 0x07, 0x7b, 0x73, 0x63, 0xaa, 0x02, 0x2b, 0xc1, 0x1c, 0xdb, 0xfe, 0x72, 0x09, 0xfa, + 0xae, 0x87, 0xee, 0x49, 0x2c, 0xb5, 0xcb, 0xc6, 0x52, 0x7b, 0x3a, 0x3f, 0x9d, 0x46, 0xd7, 0x55, + 0x56, 0xcb, 0xac, 0xb2, 0x73, 0x05, 0x68, 0x1d, 0xbe, 0xc0, 0xb6, 0x61, 0x98, 0xa5, 0xeb, 0x10, + 0x8e, 0x3c, 0x2f, 0x1a, 0x9a, 0xd5, 0x5c, 0x46, 0xb3, 0x1a, 0xd7, 0x50, 0x35, 0xfd, 0xea, 0x19, + 0x18, 0x14, 0x8e, 0x23, 0x59, 0xd7, 0x51, 0x81, 0x8b, 0x25, 0xdc, 0xfe, 0x97, 0x65, 0x30, 0xd2, + 0x83, 0xa0, 0xdf, 0xb3, 0x60, 0x3e, 0xe2, 0x61, 0x38, 0x6e, 0xb5, 0x15, 0x79, 0xc1, 0x66, 0xbd, + 0xb1, 0x45, 0xdc, 0x96, 0xef, 0x05, 0x9b, 0x6b, 0x9b, 0x41, 0xa8, 0x8a, 0x57, 0xee, 0x93, 0x46, + 0x8b, 0xd9, 0x69, 0x0b, 0x67, 0x25, 0x51, 0x97, 0xa6, 0x17, 0xf6, 0xf7, 0xe6, 0xe6, 0x71, 0x4f, + 0xad, 0xe0, 0x1e, 0x7b, 0x85, 0xfe, 0xd8, 0x82, 0x05, 0x9e, 0x20, 0xa3, 0xf8, 0x48, 0x0a, 0x69, + 0xa4, 0x35, 0x49, 0x34, 0x25, 0xb7, 0x4e, 0xa2, 0xed, 0xa5, 0x57, 0xc4, 0x24, 0x2f, 0xd4, 0x7a, + 0x6b, 0x15, 0xf7, 0xda, 0x4d, 0xfb, 0xdf, 0x94, 0x61, 0x94, 0xce, 0x67, 0x1a, 0x14, 0xff, 0xb2, + 0xb1, 0x4c, 0x9e, 0xc8, 0x2c, 0x93, 0x49, 0x03, 0xf9, 0xc1, 0xc4, 0xc3, 0xc7, 0x30, 0xe9, 0x3b, + 0x71, 0x72, 0x99, 0x38, 0x51, 0x72, 0x87, 0x38, 0xec, 0x6e, 0x32, 0xeb, 0xf7, 0x50, 0xe0, 0xba, + 0x53, 0x39, 0x23, 0x5d, 0xcd, 0x12, 0xc3, 0xed, 0xf4, 0xd1, 0x0e, 0x20, 0x76, 0x0f, 0x1a, 0x39, + 0x41, 0xcc, 0xc7, 0xe2, 0x09, 0xbb, 0x6e, 0x6f, 0xad, 0xce, 0x8a, 0x56, 0xd1, 0xd5, 0x36, 0x6a, + 0xb8, 0x43, 0x0b, 0xda, 0x4d, 0x77, 0x7f, 0xd1, 0x9b, 0xee, 0x81, 0x1c, 0x9f, 0xed, 0xaf, 0x58, + 0x30, 0x45, 0x3f, 0x8b, 0xe9, 0xdf, 0x1b, 0xa3, 0x10, 0xc6, 0xe9, 0xb2, 0xf3, 0x49, 0x22, 0xcb, + 0xc4, 0xfe, 0xca, 0x91, 0xac, 0x4d, 0x3a, 0xa9, 0xf8, 0x76, 0xc5, 0x24, 0x86, 0xb3, 0xd4, 0xed, + 0x6f, 0x59, 0xc0, 0x3c, 0xee, 0x4e, 0xe0, 0x30, 0xbb, 0x64, 0x1e, 0x66, 0x76, 0x3e, 0xc7, 0xe8, + 0x72, 0x8e, 0xbd, 0x04, 0x13, 0x14, 0x5a, 0x8b, 0xc2, 0xfb, 0xbb, 0x52, 0xd0, 0xce, 0x37, 0xf0, + 0x7e, 0xa5, 0xc4, 0xb7, 0x8d, 0x8a, 0x27, 0x44, 0xbf, 0x60, 0xc1, 0x50, 0xc3, 0x69, 0x3a, 0x0d, + 0x9e, 0x5c, 0xa9, 0x80, 0x75, 0xc6, 0xa8, 0x3f, 0xbf, 0x2c, 0xea, 0x72, 0xcb, 0xc2, 0x47, 0xe4, + 0xd0, 0x65, 0x71, 0xae, 0x35, 0x41, 0x35, 0x3e, 0x7b, 0x17, 0x46, 0x0d, 0x62, 0xc7, 0xaa, 0x86, + 0xfe, 0x82, 0xc5, 0x99, 0xbe, 0x52, 0x15, 0xee, 0xc1, 0x64, 0xa0, 0xfd, 0xa7, 0xec, 0x4c, 0x4a, + 0xc6, 0xf3, 0xc5, 0xd9, 0x3a, 0xe3, 0x82, 0x9a, 0x77, 0x61, 0x86, 0x20, 0x6e, 0x6f, 0xc3, 0xfe, + 0x55, 0x0b, 0x1e, 0xd1, 0x11, 0xb5, 0x00, 0xd0, 0x3c, 0xbb, 0x71, 0x15, 0x86, 0xc2, 0x26, 0x89, + 0x9c, 0x54, 0x2d, 0x3a, 0x27, 0xe7, 0xff, 0x86, 0x28, 0x3f, 0xd8, 0x9b, 0x9b, 0xd6, 0xa9, 0xcb, + 0x72, 0xac, 0x6a, 0x22, 0x1b, 0x06, 0xd8, 0xbc, 0xc4, 0x22, 0x74, 0x97, 0x25, 0x1b, 0x62, 0x97, + 0x2a, 0x31, 0x16, 0x10, 0xfb, 0x6f, 0x59, 0x7c, 0xb9, 0xe9, 0x5d, 0x47, 0x5f, 0x80, 0x89, 0x6d, + 0xaa, 0x41, 0xad, 0xdc, 0x6f, 0xd2, 0x83, 0x94, 0x5d, 0x27, 0x5b, 0x45, 0x8e, 0x8f, 0x2e, 0xc3, + 0x5d, 0x9a, 0x11, 0xbd, 0x9f, 0xb8, 0x96, 0x21, 0x8b, 0xdb, 0x1a, 0xb2, 0xff, 0x61, 0x89, 0xef, + 0x59, 0x26, 0xc3, 0x3d, 0x03, 0x83, 0xcd, 0xd0, 0x5d, 0x5e, 0xab, 0x62, 0x31, 0x57, 0x8a, 0xe9, + 0xd4, 0x78, 0x31, 0x96, 0x70, 0x74, 0x01, 0x80, 0xdc, 0x4f, 0x48, 0x14, 0x38, 0xbe, 0xba, 0x06, + 0x56, 0xa2, 0xd2, 0x8a, 0x82, 0x60, 0x0d, 0x8b, 0xd6, 0x69, 0x46, 0xe1, 0x8e, 0xe7, 0xb2, 0xc8, + 0x85, 0xb2, 0x59, 0xa7, 0xa6, 0x20, 0x58, 0xc3, 0xa2, 0x7a, 0x6b, 0x2b, 0x88, 0xf9, 0x31, 0xe6, + 0xdc, 0x11, 0xb9, 0x71, 0x86, 0x52, 0xbd, 0xf5, 0xa6, 0x0e, 0xc4, 0x26, 0x2e, 0xba, 0x02, 0x03, + 0x89, 0xc3, 0x2e, 0x37, 0xfb, 0x8b, 0x78, 0x8a, 0xac, 0x53, 0x5c, 0x3d, 0x19, 0x11, 0xad, 0x8a, + 0x05, 0x09, 0xfb, 0x3f, 0x55, 0x00, 0x52, 0xa9, 0x0b, 0x7d, 0xb9, 0x7d, 0xc3, 0x7f, 0xb4, 0xa8, + 0xc8, 0xf6, 0xe0, 0x76, 0x3b, 0xfa, 0x9a, 0x05, 0xc3, 0x8e, 0xef, 0x87, 0x0d, 0x27, 0x61, 0xd3, + 0x53, 0x2a, 0xca, 0x7a, 0x44, 0x4f, 0x16, 0xd3, 0xba, 0xbc, 0x33, 0x2f, 0xca, 0x0b, 0x47, 0x0d, + 0x92, 0xdb, 0x1f, 0xbd, 0x0b, 0xe8, 0x23, 0x52, 0x6a, 0xe7, 0x5f, 0x78, 0x36, 0x2b, 0xb5, 0x57, + 0x18, 0xc3, 0xd5, 0x04, 0x76, 0xf4, 0xb6, 0x91, 0x4b, 0xa6, 0xaf, 0x48, 0xf8, 0xa9, 0x21, 0x87, + 0xe4, 0xa5, 0x91, 0x41, 0x6f, 0xea, 0x2e, 0xd5, 0xfd, 0x45, 0xe2, 0xbb, 0x35, 0x71, 0x38, 0xc7, + 0x9d, 0x3a, 0x81, 0x71, 0xd7, 0x3c, 0x79, 0x85, 0x5b, 0xd8, 0x0b, 0xf9, 0x2d, 0x64, 0x8e, 0xec, + 0xf4, 0xac, 0xcd, 0x00, 0x70, 0xb6, 0x09, 0xf4, 0x26, 0x77, 0x78, 0x5f, 0x0b, 0x36, 0x42, 0xe1, + 0x1a, 0x76, 0xbe, 0xc0, 0x37, 0xdf, 0x8d, 0x13, 0xb2, 0x4d, 0xeb, 0xa4, 0x87, 0xeb, 0x75, 0x41, + 0x05, 0x2b, 0x7a, 0x68, 0x1d, 0x06, 0x58, 0xb4, 0x51, 0x3c, 0x33, 0x54, 0xc4, 0x12, 0x67, 0x06, + 0xd9, 0xa6, 0xfb, 0x87, 0xfd, 0x8d, 0xb1, 0xa0, 0x85, 0x2e, 0xcb, 0x30, 0xfb, 0x78, 0x2d, 0xb8, + 0x19, 0x13, 0x16, 0x66, 0x5f, 0x59, 0xfa, 0x50, 0x1a, 0x37, 0xcf, 0xcb, 0x3b, 0x66, 0xd3, 0x33, + 0x6a, 0x52, 0xc1, 0x46, 0xfc, 0x97, 0x49, 0xfa, 0x66, 0xa0, 0x48, 0x47, 0xcd, 0x94, 0x7e, 0xe9, + 0x64, 0xdf, 0x32, 0x89, 0xe1, 0x2c, 0xf5, 0x13, 0x3d, 0x52, 0x67, 0x03, 0x98, 0xc8, 0x6e, 0xca, + 0x63, 0x3d, 0xc2, 0x7f, 0xd2, 0x07, 0x63, 0xe6, 0xe2, 0x40, 0x0b, 0x50, 0x11, 0x44, 0x54, 0xd2, + 0x2e, 0xb5, 0x07, 0xae, 0x49, 0x00, 0x4e, 0x71, 0x58, 0xfa, 0x32, 0x56, 0x5d, 0x73, 0x0a, 0x4a, + 0xd3, 0x97, 0x29, 0x08, 0xd6, 0xb0, 0xa8, 0x24, 0x7c, 0x27, 0x0c, 0x13, 0x75, 0x12, 0xa8, 0x75, + 0xb3, 0xc4, 0x4a, 0xb1, 0x80, 0xd2, 0x13, 0xe0, 0x2e, 0xfd, 0x98, 0xbe, 0x69, 0x55, 0x54, 0x27, + 0xc0, 0x15, 0x1d, 0x88, 0x4d, 0x5c, 0x7a, 0xa2, 0x85, 0x31, 0x5b, 0x88, 0x42, 0xde, 0x4e, 0x9d, + 0xac, 0xea, 0x3c, 0x02, 0x4f, 0xc2, 0xd1, 0x67, 0xe0, 0x11, 0x15, 0x30, 0x87, 0xb9, 0x95, 0x56, + 0xb6, 0x38, 0x60, 0xa8, 0xcc, 0x8f, 0x2c, 0x77, 0x46, 0xc3, 0xdd, 0xea, 0xa3, 0xd7, 0x60, 0x4c, + 0xc8, 0xca, 0x92, 0xe2, 0xa0, 0x79, 0x03, 0x7f, 0xc5, 0x80, 0xe2, 0x0c, 0x36, 0xaa, 0xc2, 0x04, + 0x2d, 0x61, 0x42, 0xaa, 0xa4, 0xc0, 0x03, 0xff, 0xd4, 0x51, 0x7f, 0x25, 0x03, 0xc7, 0x6d, 0x35, + 0xd0, 0x22, 0x8c, 0x73, 0x61, 0x85, 0x2a, 0x86, 0xec, 0x3b, 0x08, 0x7f, 0x4e, 0xb5, 0x11, 0x6e, + 0x98, 0x60, 0x9c, 0xc5, 0x47, 0x17, 0x61, 0xc4, 0x89, 0x1a, 0x5b, 0x5e, 0x42, 0x1a, 0x49, 0x2b, + 0xe2, 0x49, 0x2c, 0x34, 0x17, 0x86, 0x45, 0x0d, 0x86, 0x0d, 0x4c, 0xfb, 0xf3, 0x30, 0xd5, 0xc1, + 0x79, 0x9c, 0x2e, 0x1c, 0xa7, 0xe9, 0xc9, 0x31, 0x65, 0xdc, 0xa5, 0x16, 0x6b, 0x6b, 0x72, 0x34, + 0x1a, 0x16, 0x5d, 0x9d, 0xcc, 0x3c, 0xad, 0xe5, 0xd4, 0x54, 0xab, 0x73, 0x55, 0x02, 0x70, 0x8a, + 0x63, 0xff, 0x45, 0x05, 0x34, 0xeb, 0x4d, 0x01, 0x17, 0x99, 0x8b, 0x30, 0x22, 0xd3, 0xc4, 0x6a, + 0xe9, 0x19, 0xd5, 0x30, 0x2f, 0x69, 0x30, 0x6c, 0x60, 0xd2, 0xbe, 0x05, 0xd2, 0x26, 0x95, 0x75, + 0xce, 0x52, 0xc6, 0x2a, 0x9c, 0xe2, 0xa0, 0xf3, 0x30, 0x14, 0x13, 0x7f, 0xe3, 0xaa, 0x17, 0xdc, + 0x15, 0x0b, 0x5b, 0x71, 0xe6, 0xba, 0x28, 0xc7, 0x0a, 0x03, 0x2d, 0x41, 0xb9, 0xe5, 0xb9, 0x62, + 0x29, 0x4b, 0xb1, 0xa1, 0x7c, 0x73, 0xad, 0x7a, 0xb0, 0x37, 0xf7, 0x44, 0xb7, 0x9c, 0xb9, 0x54, + 0x3f, 0x8f, 0xe7, 0xe9, 0xf6, 0xa3, 0x95, 0x3b, 0xd9, 0xe9, 0x07, 0x7a, 0xb4, 0xd3, 0x5f, 0x00, + 0x10, 0xa3, 0x96, 0x6b, 0xb9, 0x9c, 0x7e, 0xb5, 0x4b, 0x0a, 0x82, 0x35, 0x2c, 0xaa, 0xe5, 0x37, + 0x22, 0xe2, 0x48, 0x45, 0x98, 0x3b, 0x35, 0x0f, 0x1d, 0x5d, 0xcb, 0x5f, 0xce, 0x12, 0xc3, 0xed, + 0xf4, 0x51, 0x08, 0x93, 0xae, 0x88, 0xca, 0x4c, 0x1b, 0xad, 0xf4, 0xee, 0x49, 0x4d, 0x1b, 0xac, + 0x66, 0x09, 0xe1, 0x76, 0xda, 0xe8, 0x73, 0x30, 0x2b, 0x0b, 0xdb, 0x43, 0x62, 0xd9, 0x76, 0x29, + 0x2f, 0x9d, 0xd9, 0xdf, 0x9b, 0x9b, 0xad, 0x76, 0xc5, 0xc2, 0x87, 0x50, 0x40, 0x6f, 0xc1, 0x00, + 0xbb, 0xd7, 0x89, 0x67, 0x86, 0xd9, 0x89, 0xf7, 0x52, 0x11, 0x7f, 0x7c, 0xba, 0xea, 0xe7, 0xd9, + 0xed, 0x90, 0xf0, 0x34, 0x4d, 0x2f, 0xcb, 0x58, 0x21, 0x16, 0x34, 0x51, 0x13, 0x86, 0x9d, 0x20, + 0x08, 0x13, 0x87, 0x0b, 0x62, 0x23, 0x45, 0x64, 0x49, 0xad, 0x89, 0xc5, 0xb4, 0x2e, 0x6f, 0x47, + 0x39, 0xaf, 0x69, 0x10, 0xac, 0x37, 0x81, 0xee, 0xc1, 0x78, 0x78, 0x8f, 0x32, 0x4c, 0x79, 0xb5, + 0x11, 0xcf, 0x8c, 0x9a, 0x03, 0xcb, 0x31, 0xd4, 0x1a, 0x95, 0x35, 0x4e, 0x66, 0x12, 0xc5, 0xd9, + 0x56, 0xd0, 0xbc, 0x61, 0xae, 0x1e, 0x4b, 0xfd, 0xa9, 0x53, 0x73, 0xb5, 0x6e, 0x9d, 0x66, 0x61, + 0xd7, 0xdc, 0x87, 0x92, 0x71, 0x84, 0xf1, 0x4c, 0xd8, 0x75, 0x0a, 0xc2, 0x3a, 0xde, 0xec, 0xc7, + 0x60, 0x58, 0x9b, 0xf8, 0x5e, 0x1c, 0x77, 0x67, 0x5f, 0x83, 0x89, 0xec, 0x84, 0xf6, 0xe4, 0xf8, + 0xfb, 0x3f, 0x4b, 0x30, 0xde, 0xe1, 0xde, 0xe8, 0xae, 0xc7, 0x9c, 0xcf, 0x0d, 0xd6, 0x77, 0xc5, + 0x0b, 0x5c, 0xcc, 0x20, 0x26, 0x03, 0x2b, 0x15, 0x60, 0x60, 0x92, 0x9b, 0x96, 0xbb, 0x72, 0x53, + 0xc1, 0xb4, 0xfa, 0xde, 0x0f, 0xd3, 0x32, 0xcf, 0x89, 0xfe, 0x42, 0xe7, 0xc4, 0x03, 0x60, 0x74, + 0xc6, 0x51, 0x33, 0x58, 0xe0, 0xa8, 0xf9, 0x66, 0x09, 0x26, 0x52, 0x27, 0x67, 0x91, 0x3b, 0xfa, + 0xf8, 0xaf, 0x21, 0xd6, 0x8d, 0x6b, 0x88, 0xbc, 0xd4, 0xd0, 0x99, 0xfe, 0x75, 0xbd, 0x92, 0x78, + 0x2b, 0x73, 0x25, 0xf1, 0x52, 0x8f, 0x74, 0x0f, 0xbf, 0x9e, 0xf8, 0x6e, 0x09, 0x4e, 0x65, 0xab, + 0x2c, 0xfb, 0x8e, 0xb7, 0x7d, 0x02, 0xf3, 0xf5, 0x19, 0x63, 0xbe, 0x5e, 0xe9, 0x6d, 0x5c, 0xac, + 0x93, 0x5d, 0x27, 0xcd, 0xc9, 0x4c, 0xda, 0xc7, 0x8e, 0x42, 0xfc, 0xf0, 0x99, 0xfb, 0x43, 0x0b, + 0x1e, 0xed, 0x58, 0xef, 0x04, 0x0c, 0xaf, 0x6f, 0x98, 0x86, 0xd7, 0x17, 0x8f, 0x30, 0xba, 0x2e, + 0x96, 0xd8, 0x5f, 0x2b, 0x77, 0x19, 0x15, 0x33, 0x4d, 0xdd, 0x80, 0x61, 0xa7, 0xd1, 0x20, 0x71, + 0x7c, 0x2d, 0x74, 0x55, 0x02, 0xa7, 0xe7, 0xd9, 0xd9, 0x92, 0x16, 0x1f, 0xec, 0xcd, 0xcd, 0x66, + 0x49, 0xa4, 0x60, 0xac, 0x53, 0x30, 0x53, 0xcb, 0x95, 0x8e, 0x29, 0xb5, 0xdc, 0x05, 0x80, 0x1d, + 0xa5, 0xc5, 0x66, 0x2d, 0x5e, 0x9a, 0x7e, 0xab, 0x61, 0xa1, 0xff, 0x9f, 0x49, 0x84, 0xdc, 0x49, + 0xa3, 0xcf, 0x8c, 0x97, 0xcc, 0xf9, 0x7e, 0xba, 0xc3, 0x07, 0x0f, 0xcb, 0x54, 0xd6, 0x41, 0x45, + 0x12, 0x7d, 0x0a, 0x26, 0x62, 0x1e, 0xfc, 0xbf, 0xec, 0x3b, 0x31, 0xf3, 0xee, 0x17, 0xfc, 0x94, + 0x45, 0x58, 0xd6, 0x33, 0x30, 0xdc, 0x86, 0x6d, 0x7f, 0xa7, 0x0c, 0x1f, 0x3c, 0x64, 0xd9, 0xa2, + 0x45, 0xf3, 0xd6, 0xf6, 0xb9, 0xac, 0xfd, 0x67, 0xb6, 0x63, 0x65, 0xc3, 0x20, 0x94, 0xf9, 0xda, + 0xa5, 0xf7, 0xfd, 0xb5, 0xbf, 0xae, 0x5b, 0xeb, 0xb8, 0xdf, 0xe6, 0xa5, 0x23, 0x6f, 0xcc, 0x9f, + 0x56, 0x63, 0xfd, 0x97, 0x2c, 0x78, 0xa2, 0xe3, 0xb0, 0x0c, 0x2f, 0x91, 0x05, 0xa8, 0x34, 0x68, + 0xa1, 0x16, 0x8b, 0x93, 0x06, 0xc1, 0x49, 0x00, 0x4e, 0x71, 0x0c, 0x67, 0x90, 0x52, 0xae, 0x33, + 0xc8, 0xef, 0x5b, 0x30, 0x9d, 0xed, 0xc4, 0x09, 0xf0, 0xad, 0xba, 0xc9, 0xb7, 0xe6, 0x7b, 0xfb, + 0xf8, 0x5d, 0x58, 0xd6, 0x7f, 0x1f, 0x83, 0xd3, 0x6d, 0xa7, 0x1e, 0x9f, 0xc5, 0x9f, 0xb3, 0x60, + 0x72, 0x93, 0x49, 0xef, 0x5a, 0xc0, 0x93, 0x18, 0x57, 0x4e, 0x94, 0xd8, 0xa1, 0x71, 0x52, 0x5c, + 0x17, 0x69, 0x43, 0xc1, 0xed, 0x8d, 0xa1, 0xaf, 0x5a, 0x30, 0xed, 0xdc, 0x8b, 0xdb, 0x5e, 0x36, + 0x11, 0x0b, 0xe9, 0xb5, 0x1c, 0x63, 0x59, 0xce, 0x9b, 0x28, 0x4b, 0x33, 0xfb, 0x7b, 0x73, 0xd3, + 0x9d, 0xb0, 0x70, 0xc7, 0x56, 0xe9, 0xf7, 0xdd, 0x12, 0xe1, 0x14, 0xc5, 0x42, 0xf7, 0x3a, 0x05, + 0x5f, 0x70, 0xb6, 0x26, 0x21, 0x58, 0x51, 0x44, 0xef, 0x40, 0x65, 0x53, 0xc6, 0x38, 0x65, 0xd9, + 0x66, 0x97, 0x69, 0xee, 0x14, 0x12, 0xc5, 0x7d, 0xf7, 0x15, 0x08, 0xa7, 0x44, 0xd1, 0x65, 0x28, + 0x07, 0x1b, 0xb1, 0x88, 0x26, 0xce, 0xf3, 0x01, 0x32, 0x3d, 0xaf, 0x78, 0x00, 0xe6, 0xf5, 0xd5, + 0x3a, 0xa6, 0x24, 0x28, 0xa5, 0xe8, 0x8e, 0x2b, 0xac, 0xc4, 0x39, 0x94, 0xf0, 0x52, 0xb5, 0x9d, + 0x12, 0x5e, 0xaa, 0x62, 0x4a, 0x02, 0xd5, 0xa0, 0x9f, 0x05, 0x6b, 0x08, 0x13, 0x70, 0x4e, 0xc8, + 0x79, 0x5b, 0x48, 0x0a, 0xcf, 0x80, 0xc8, 0x8a, 0x31, 0x27, 0x84, 0xd6, 0x61, 0xa0, 0xc1, 0x92, + 0xf8, 0x0b, 0xdd, 0x3c, 0x2f, 0x19, 0x43, 0x5b, 0xc2, 0x7f, 0x7e, 0xef, 0xc5, 0xcb, 0xb1, 0xa0, + 0xc5, 0xa8, 0x92, 0xe6, 0xd6, 0x46, 0x2c, 0x94, 0xef, 0x3c, 0xaa, 0x6d, 0xcf, 0x31, 0x08, 0xaa, + 0xac, 0x1c, 0x0b, 0x5a, 0xa8, 0x0a, 0xa5, 0x8d, 0x86, 0x48, 0xa4, 0x9a, 0x63, 0xfa, 0x35, 0xa3, + 0x69, 0x97, 0x06, 0xf6, 0xf7, 0xe6, 0x4a, 0xab, 0xcb, 0xb8, 0xb4, 0xd1, 0x40, 0x6f, 0xc0, 0xe0, + 0x06, 0x8f, 0x8f, 0x14, 0x49, 0x53, 0x5f, 0xc8, 0x0b, 0xe2, 0x6c, 0x0b, 0xa6, 0xe4, 0xf1, 0x19, + 0x02, 0x80, 0x25, 0x39, 0x96, 0x4f, 0x4e, 0x45, 0x7c, 0x8a, 0xac, 0xa9, 0xf3, 0xbd, 0x45, 0x88, + 0x0a, 0x9d, 0x54, 0x95, 0x62, 0x8d, 0x22, 0x5d, 0xf3, 0x8e, 0x7c, 0x8f, 0x84, 0x65, 0x4c, 0xcd, + 0x5d, 0xf3, 0x1d, 0x9f, 0x2f, 0xe1, 0x6b, 0x5e, 0x81, 0x70, 0x4a, 0x14, 0xb5, 0x60, 0x74, 0x27, + 0x6e, 0x6e, 0x11, 0xb9, 0xf5, 0x59, 0x1a, 0xd5, 0xe1, 0x0b, 0x9f, 0xc8, 0xc9, 0x8d, 0x2b, 0xaa, + 0x78, 0x51, 0xd2, 0x72, 0xfc, 0x36, 0x0e, 0xc6, 0x12, 0x78, 0xdd, 0xd2, 0xc9, 0x62, 0xb3, 0x15, + 0xfa, 0x49, 0xde, 0x6b, 0x85, 0x77, 0x76, 0x13, 0x22, 0xd2, 0xac, 0xe6, 0x7c, 0x92, 0xd7, 0x39, + 0x72, 0xfb, 0x27, 0x11, 0x00, 0x2c, 0xc9, 0xa9, 0x29, 0x63, 0xdc, 0x78, 0xa2, 0xf0, 0x94, 0xb5, + 0x8d, 0x21, 0x9d, 0x32, 0xc6, 0x7d, 0x53, 0xa2, 0x8c, 0xeb, 0x36, 0xb7, 0xc2, 0x24, 0x0c, 0x32, + 0xbc, 0x7f, 0xb2, 0x08, 0xd7, 0xad, 0x75, 0xa8, 0xd9, 0xce, 0x75, 0x3b, 0x61, 0xe1, 0x8e, 0xad, + 0xa2, 0x00, 0xc6, 0x9a, 0x61, 0x94, 0xdc, 0x0b, 0x23, 0xb9, 0x0e, 0x51, 0x21, 0x1d, 0xd1, 0xa8, + 0x23, 0xda, 0x66, 0x6e, 0xb8, 0x26, 0x04, 0x67, 0xa8, 0xd3, 0x4f, 0x17, 0x37, 0x1c, 0x9f, 0xac, + 0xdd, 0x98, 0x99, 0x2a, 0xf2, 0xe9, 0xea, 0x1c, 0xb9, 0xfd, 0xd3, 0x09, 0x00, 0x96, 0xe4, 0xec, + 0x5f, 0x1d, 0x68, 0x17, 0x1c, 0x98, 0x6a, 0xf0, 0x37, 0xdb, 0x6f, 0x62, 0x3f, 0xd5, 0xbb, 0x06, + 0xfc, 0x00, 0xef, 0x64, 0xbf, 0x6a, 0xc1, 0xe9, 0x66, 0x47, 0xb1, 0x40, 0x1c, 0xbd, 0xbd, 0x2a, + 0xd2, 0x7c, 0x5a, 0x54, 0x36, 0xe4, 0xce, 0x70, 0xdc, 0xa5, 0xcd, 0xac, 0x30, 0x5d, 0x7e, 0xdf, + 0xc2, 0xf4, 0x6d, 0x18, 0x62, 0xd2, 0x5f, 0x9a, 0xeb, 0xa4, 0xc7, 0xb4, 0x20, 0xec, 0x10, 0x5f, + 0x16, 0x24, 0xb0, 0x22, 0x46, 0x27, 0xee, 0xf1, 0xec, 0x20, 0x30, 0x61, 0x60, 0x91, 0x83, 0x8f, + 0x6b, 0x2a, 0xab, 0x62, 0x26, 0x1e, 0xaf, 0x1d, 0x86, 0x7c, 0x90, 0x87, 0x80, 0x0f, 0x6f, 0x0c, + 0x55, 0x3b, 0xa8, 0x4a, 0x03, 0xe6, 0xb5, 0x4b, 0xbe, 0xba, 0x74, 0xb2, 0x22, 0xfe, 0x3f, 0xb2, + 0x3a, 0x48, 0xa4, 0x5c, 0x2d, 0xfb, 0x84, 0xa9, 0x96, 0x3d, 0x9d, 0x55, 0xcb, 0xda, 0x8c, 0x31, + 0x86, 0x46, 0x56, 0x3c, 0x87, 0x68, 0xd1, 0x64, 0x2e, 0xb6, 0x0f, 0x67, 0xf3, 0xd8, 0x1d, 0x73, + 0xc5, 0x72, 0xd5, 0x25, 0x64, 0xea, 0x8a, 0xe5, 0xae, 0x55, 0x31, 0x83, 0x14, 0xcd, 0x07, 0x60, + 0xff, 0x7c, 0x09, 0xca, 0xb5, 0xd0, 0x3d, 0x01, 0xe3, 0xd2, 0x25, 0xc3, 0xb8, 0xf4, 0x54, 0xee, + 0xfb, 0x74, 0x5d, 0x4d, 0x49, 0x37, 0x32, 0xa6, 0xa4, 0x0f, 0xe7, 0x93, 0x3a, 0xdc, 0x70, 0xf4, + 0xbd, 0x32, 0xe8, 0x2f, 0xec, 0xa1, 0xff, 0x70, 0x14, 0x0f, 0xdd, 0x72, 0xb1, 0x47, 0xf7, 0x44, + 0x1b, 0xcc, 0x93, 0x4b, 0xc6, 0xf5, 0xfd, 0xd4, 0x3a, 0xea, 0xde, 0x26, 0xde, 0xe6, 0x56, 0x42, + 0xdc, 0xec, 0xc0, 0x4e, 0xce, 0x51, 0xf7, 0xcf, 0x2d, 0x18, 0xcf, 0xb4, 0x8e, 0xfc, 0x4e, 0x01, + 0x41, 0x47, 0x34, 0x17, 0x4d, 0xe6, 0x46, 0x10, 0xcd, 0x03, 0x28, 0xab, 0xbf, 0x34, 0xc9, 0x30, + 0xe9, 0x54, 0x5d, 0x0b, 0xc4, 0x58, 0xc3, 0x40, 0x2f, 0xc3, 0x70, 0x12, 0x36, 0x43, 0x3f, 0xdc, + 0xdc, 0xbd, 0x42, 0x64, 0xa6, 0x0a, 0x75, 0x63, 0xb2, 0x9e, 0x82, 0xb0, 0x8e, 0x67, 0x7f, 0xbf, + 0x0c, 0xd9, 0xf7, 0x19, 0xff, 0xdf, 0x3a, 0xfd, 0xe9, 0x59, 0xa7, 0x7f, 0x64, 0xc1, 0x04, 0x6d, + 0x9d, 0xb9, 0xce, 0x48, 0x87, 0x5a, 0xf5, 0xa0, 0x81, 0x75, 0xc8, 0x83, 0x06, 0x4f, 0x53, 0x6e, + 0xe7, 0x86, 0xad, 0x44, 0x18, 0x91, 0x34, 0x26, 0x46, 0x4b, 0xb1, 0x80, 0x0a, 0x3c, 0x12, 0x45, + 0x22, 0xf2, 0x48, 0xc7, 0x23, 0x51, 0x84, 0x05, 0x54, 0xbe, 0x77, 0xd0, 0xd7, 0xe5, 0xbd, 0x03, + 0x96, 0xeb, 0x49, 0xb8, 0x6b, 0x08, 0xb1, 0x42, 0xcb, 0xf5, 0x24, 0xfd, 0x38, 0x52, 0x1c, 0xfb, + 0xdb, 0x65, 0x18, 0xa9, 0x85, 0x6e, 0xea, 0x29, 0xff, 0x92, 0xe1, 0x29, 0x7f, 0x36, 0xe3, 0x29, + 0x3f, 0xa1, 0xe3, 0x3e, 0x18, 0x47, 0x79, 0x91, 0x13, 0x8c, 0xbd, 0xc8, 0x71, 0x44, 0x27, 0x79, + 0x23, 0x27, 0x98, 0x22, 0x84, 0x4d, 0xba, 0x3f, 0x4b, 0xce, 0xf1, 0xff, 0xdb, 0x82, 0xb1, 0x5a, + 0xe8, 0xd2, 0x05, 0xfa, 0xb3, 0xb4, 0x1a, 0xf5, 0x4c, 0x62, 0x03, 0x87, 0x64, 0x12, 0xfb, 0x75, + 0x0b, 0x06, 0x6b, 0xa1, 0x7b, 0x02, 0x06, 0xd6, 0x55, 0xd3, 0xc0, 0xfa, 0x44, 0x2e, 0xe7, 0xed, + 0x62, 0x53, 0xfd, 0x4e, 0x19, 0x46, 0x69, 0x8f, 0xc3, 0x4d, 0xf9, 0xbd, 0x8c, 0xb9, 0xb1, 0x0a, + 0xcc, 0x0d, 0x15, 0x09, 0x43, 0xdf, 0x0f, 0xef, 0x65, 0xbf, 0xdd, 0x2a, 0x2b, 0xc5, 0x02, 0x8a, + 0xce, 0xc3, 0x50, 0x33, 0x22, 0x3b, 0x5e, 0xd8, 0x8a, 0xb3, 0x51, 0x8c, 0x35, 0x51, 0x8e, 0x15, + 0x06, 0x7a, 0x09, 0x46, 0x62, 0x2f, 0x68, 0x10, 0xe9, 0xcc, 0xd1, 0xc7, 0x9c, 0x39, 0x78, 0xd2, + 0x46, 0xad, 0x1c, 0x1b, 0x58, 0xe8, 0x36, 0x54, 0xd8, 0x7f, 0xb6, 0x83, 0x7a, 0x7f, 0xb0, 0x80, + 0x67, 0x2a, 0x93, 0x04, 0x70, 0x4a, 0x0b, 0x5d, 0x00, 0x48, 0xa4, 0xdb, 0x49, 0x2c, 0xf2, 0xad, + 0x28, 0xb9, 0x54, 0x39, 0xa4, 0xc4, 0x58, 0xc3, 0x42, 0xcf, 0x41, 0x25, 0x71, 0x3c, 0xff, 0xaa, + 0x17, 0x90, 0x58, 0xb8, 0xed, 0x88, 0x04, 0xcc, 0xa2, 0x10, 0xa7, 0x70, 0x7a, 0xde, 0xb3, 0x18, + 0x6a, 0xfe, 0x18, 0xca, 0x10, 0xc3, 0x66, 0xe7, 0xfd, 0x55, 0x55, 0x8a, 0x35, 0x0c, 0xfb, 0x22, + 0x9c, 0xaa, 0x85, 0x6e, 0x2d, 0x8c, 0x92, 0xd5, 0x30, 0xba, 0xe7, 0x44, 0xae, 0xfc, 0x7e, 0x73, + 0x32, 0xef, 0x2f, 0x3d, 0x93, 0xfb, 0xb9, 0xcd, 0xd1, 0xc8, 0xe3, 0xfb, 0x22, 0x3b, 0xf1, 0x7b, + 0x0c, 0xc1, 0xf8, 0x51, 0x09, 0x50, 0x8d, 0x39, 0xc6, 0x18, 0x6f, 0xe7, 0x6c, 0xc1, 0x58, 0x4c, + 0xae, 0x7a, 0x41, 0xeb, 0xbe, 0x20, 0x55, 0x2c, 0xe6, 0xa5, 0xbe, 0xa2, 0xd7, 0xe1, 0x96, 0x0e, + 0xb3, 0x0c, 0x67, 0xe8, 0xd2, 0xc9, 0x8c, 0x5a, 0xc1, 0x62, 0x7c, 0x33, 0x26, 0x91, 0x78, 0x2b, + 0x86, 0x4d, 0x26, 0x96, 0x85, 0x38, 0x85, 0xd3, 0xc5, 0xc3, 0xfe, 0x5c, 0x0f, 0x03, 0x1c, 0x86, + 0x89, 0x5c, 0x6e, 0xec, 0xed, 0x00, 0xad, 0x1c, 0x1b, 0x58, 0x68, 0x15, 0x50, 0xdc, 0x6a, 0x36, + 0x7d, 0x76, 0xd7, 0xe8, 0xf8, 0x97, 0xa2, 0xb0, 0xd5, 0xe4, 0xfe, 0xd1, 0x22, 0xed, 0x7e, 0xbd, + 0x0d, 0x8a, 0x3b, 0xd4, 0xa0, 0xcc, 0x62, 0x23, 0x66, 0xbf, 0x45, 0x40, 0x35, 0xb7, 0x57, 0xd6, + 0x59, 0x11, 0x96, 0x30, 0xfb, 0x8b, 0xec, 0x80, 0x63, 0x8f, 0x78, 0x24, 0xad, 0x88, 0xa0, 0x6d, + 0x18, 0x6d, 0xb2, 0x43, 0x2c, 0x89, 0x42, 0xdf, 0x27, 0x52, 0xbe, 0x3c, 0x9a, 0x6b, 0x0e, 0x4f, + 0xdb, 0xaf, 0x93, 0xc3, 0x26, 0x75, 0xfb, 0x17, 0xc7, 0x18, 0xaf, 0x12, 0xd7, 0xbd, 0x83, 0xc2, + 0x09, 0x57, 0x48, 0x72, 0x1f, 0x2a, 0xf2, 0x1c, 0x57, 0x7a, 0x0e, 0x08, 0x97, 0x5e, 0x2c, 0xa9, + 0xa0, 0xcf, 0x32, 0x17, 0x73, 0xce, 0x20, 0x8a, 0x3f, 0x32, 0xc8, 0xf1, 0x0d, 0xf7, 0x72, 0x41, + 0x02, 0x6b, 0xe4, 0xd0, 0x55, 0x18, 0x15, 0x6f, 0x3e, 0x08, 0x33, 0x45, 0xd9, 0x50, 0xb1, 0x47, + 0xb1, 0x0e, 0x3c, 0xc8, 0x16, 0x60, 0xb3, 0x32, 0xda, 0x84, 0xc7, 0xb5, 0x37, 0x8d, 0x3a, 0xb8, + 0x91, 0x71, 0xce, 0xf3, 0xc4, 0xfe, 0xde, 0xdc, 0xe3, 0xeb, 0x87, 0x21, 0xe2, 0xc3, 0xe9, 0xa0, + 0x1b, 0x70, 0xca, 0x69, 0x24, 0xde, 0x0e, 0xa9, 0x12, 0xc7, 0xf5, 0xbd, 0x80, 0x98, 0x51, 0xf7, + 0x8f, 0xee, 0xef, 0xcd, 0x9d, 0x5a, 0xec, 0x84, 0x80, 0x3b, 0xd7, 0x43, 0x9f, 0x80, 0x8a, 0x1b, + 0xc4, 0x62, 0x0e, 0x06, 0x8c, 0x27, 0xbc, 0x2a, 0xd5, 0xeb, 0x75, 0x35, 0xfe, 0xf4, 0x0f, 0x4e, + 0x2b, 0xa0, 0xf7, 0xf8, 0x13, 0xf5, 0x4a, 0x9b, 0xe1, 0x4f, 0xc7, 0xbd, 0x52, 0x48, 0x7f, 0x36, + 0x62, 0x61, 0xb8, 0x05, 0x4f, 0xb9, 0x6b, 0x1a, 0x61, 0x32, 0x46, 0x13, 0xe8, 0xd3, 0x80, 0x62, + 0x12, 0xed, 0x78, 0x0d, 0xb2, 0xd8, 0x60, 0x99, 0x4e, 0x99, 0x8d, 0x67, 0xc8, 0x88, 0x5b, 0x40, + 0xf5, 0x36, 0x0c, 0xdc, 0xa1, 0x16, 0xba, 0x4c, 0x39, 0x8f, 0x5e, 0x2a, 0xbc, 0x6b, 0xa5, 0x60, + 0x38, 0x53, 0x25, 0xcd, 0x88, 0x34, 0x9c, 0x84, 0xb8, 0x26, 0x45, 0x9c, 0xa9, 0x47, 0xcf, 0x25, + 0x95, 0xcc, 0x1e, 0x4c, 0x9f, 0xd0, 0xf6, 0x84, 0xf6, 0x54, 0xcf, 0xda, 0x0a, 0xe3, 0xe4, 0x3a, + 0x49, 0xee, 0x85, 0xd1, 0x5d, 0x76, 0x87, 0x31, 0xa4, 0xa5, 0x8d, 0x4b, 0x41, 0x58, 0xc7, 0xa3, + 0x32, 0x14, 0xbb, 0x3c, 0x5b, 0xab, 0xb2, 0x9b, 0x89, 0xa1, 0x74, 0xef, 0x5c, 0xe6, 0xc5, 0x58, + 0xc2, 0x25, 0xea, 0x5a, 0x6d, 0x99, 0xdd, 0x32, 0x64, 0x50, 0xd7, 0x6a, 0xcb, 0x58, 0xc2, 0x51, + 0xd8, 0xfe, 0x50, 0xda, 0x58, 0x91, 0x1b, 0x9f, 0x76, 0x4e, 0x5e, 0xf0, 0xad, 0xb4, 0xfb, 0x30, + 0xa1, 0x1e, 0x6b, 0xe3, 0x19, 0x3d, 0xe3, 0x99, 0xf1, 0x22, 0x0f, 0xe4, 0x77, 0x4c, 0x0c, 0xaa, + 0xec, 0x7a, 0x6b, 0x19, 0x9a, 0xb8, 0xad, 0x15, 0x23, 0x7b, 0xc4, 0x44, 0xee, 0x03, 0x05, 0x0b, + 0x50, 0x89, 0x5b, 0x77, 0xdc, 0x70, 0xdb, 0xf1, 0x02, 0x76, 0x15, 0xa0, 0x3f, 0xf7, 0x2e, 0x01, + 0x38, 0xc5, 0x41, 0x35, 0x18, 0x72, 0x84, 0x0a, 0x27, 0x4c, 0xf6, 0x39, 0xd1, 0xe5, 0x52, 0xe1, + 0xe3, 0xd6, 0x55, 0xf9, 0x0f, 0x2b, 0x2a, 0xe8, 0x55, 0x18, 0x15, 0xc1, 0x51, 0xc2, 0x89, 0x71, + 0xca, 0x74, 0xa4, 0xaf, 0xeb, 0x40, 0x6c, 0xe2, 0xa2, 0x4d, 0x18, 0xa3, 0x54, 0x52, 0x06, 0x38, + 0x33, 0xdd, 0x1b, 0x0f, 0xd5, 0x52, 0x41, 0xeb, 0x64, 0x70, 0x86, 0x2c, 0x72, 0xe1, 0x31, 0xa7, + 0x95, 0x84, 0xdb, 0x74, 0x27, 0x98, 0xfb, 0x64, 0x3d, 0xbc, 0x4b, 0x82, 0x99, 0x53, 0x6c, 0x05, + 0x9e, 0xdd, 0xdf, 0x9b, 0x7b, 0x6c, 0xf1, 0x10, 0x3c, 0x7c, 0x28, 0x15, 0xf4, 0x36, 0x0c, 0x27, + 0xa1, 0x2f, 0x7c, 0x93, 0xe3, 0x99, 0xd3, 0x45, 0x72, 0xda, 0xac, 0xab, 0x0a, 0xba, 0x19, 0x43, + 0x11, 0xc1, 0x3a, 0xc5, 0xd9, 0x4f, 0xc2, 0x64, 0x1b, 0x4b, 0xea, 0xc9, 0x7d, 0xf3, 0x3f, 0xf6, + 0x43, 0x45, 0x59, 0xf4, 0xd0, 0x82, 0x69, 0xbc, 0x7d, 0x34, 0x6b, 0xbc, 0x1d, 0xa2, 0x02, 0x94, + 0x6e, 0xaf, 0xfd, 0x5c, 0x87, 0xe7, 0xb9, 0x9f, 0xcd, 0xdd, 0x83, 0xc5, 0x23, 0xaa, 0x7a, 0x78, + 0xc4, 0x3c, 0xd5, 0xea, 0xfa, 0x0e, 0xd5, 0xea, 0x0a, 0x3e, 0x39, 0x47, 0xf5, 0xb7, 0x66, 0xe8, + 0xae, 0xd5, 0xb2, 0x2f, 0x2a, 0xd5, 0x68, 0x21, 0xe6, 0x30, 0x26, 0x77, 0xd3, 0x33, 0x95, 0xc9, + 0xdd, 0x83, 0x47, 0x94, 0xbb, 0x25, 0x01, 0x9c, 0xd2, 0x42, 0x3b, 0x30, 0xd9, 0x30, 0x1f, 0xc8, + 0x52, 0x71, 0x52, 0xcf, 0xf7, 0xf0, 0x40, 0x55, 0x4b, 0x7b, 0x3d, 0x63, 0x39, 0x4b, 0x0f, 0xb7, + 0x37, 0x81, 0x5e, 0x85, 0xa1, 0xf7, 0xc2, 0x98, 0x5d, 0x2b, 0x88, 0x83, 0x45, 0xc6, 0xa3, 0x0c, + 0xbd, 0x7e, 0xa3, 0xce, 0xca, 0x0f, 0xf6, 0xe6, 0x86, 0x6b, 0xa1, 0x2b, 0xff, 0x62, 0x55, 0x01, + 0x7d, 0xc9, 0x82, 0x53, 0xc6, 0x3e, 0x53, 0x3d, 0x87, 0xa3, 0xf4, 0xfc, 0x71, 0xd1, 0xf2, 0xa9, + 0xb5, 0x4e, 0x34, 0x71, 0xe7, 0xa6, 0xec, 0xdf, 0xe5, 0x26, 0x4c, 0x61, 0xd4, 0x20, 0x71, 0xcb, + 0x3f, 0x89, 0x4c, 0xf6, 0x37, 0x0c, 0x7b, 0xcb, 0x03, 0x30, 0xa2, 0xff, 0x7b, 0x8b, 0x19, 0xd1, + 0xd7, 0xc9, 0x76, 0xd3, 0x77, 0x92, 0x93, 0xf0, 0xee, 0xfd, 0x2c, 0x0c, 0x25, 0xa2, 0xb5, 0x62, + 0x69, 0xf8, 0xb5, 0xee, 0xb1, 0xcb, 0x05, 0x75, 0x30, 0xc9, 0x52, 0xac, 0x08, 0xda, 0xff, 0x9a, + 0x7f, 0x15, 0x09, 0x39, 0x01, 0x4b, 0xc1, 0x75, 0xd3, 0x52, 0xf0, 0x4c, 0xe1, 0xb1, 0x74, 0xb1, + 0x18, 0x7c, 0xdf, 0x1c, 0x01, 0xd3, 0x1f, 0x7e, 0x7a, 0x6e, 0x79, 0xec, 0x5f, 0xb1, 0x60, 0xba, + 0xd3, 0x75, 0x3b, 0x15, 0x30, 0xb8, 0xf6, 0xa2, 0xee, 0xbf, 0xd4, 0xac, 0xde, 0x12, 0xe5, 0x58, + 0x61, 0x14, 0xce, 0x8b, 0xdd, 0x5b, 0xea, 0xa6, 0x1b, 0x60, 0x3e, 0xb5, 0x86, 0x5e, 0xe3, 0xce, + 0xfc, 0x96, 0x7a, 0x0b, 0xad, 0x37, 0x47, 0x7e, 0xfb, 0x37, 0x4a, 0x30, 0xcd, 0x8d, 0xd0, 0x8b, + 0x3b, 0xa1, 0xe7, 0xd6, 0x42, 0x57, 0x84, 0x36, 0xb8, 0x30, 0xd2, 0xd4, 0x94, 0xcf, 0x62, 0xa9, + 0x60, 0x74, 0x75, 0x35, 0x15, 0xf8, 0xf5, 0x52, 0x6c, 0x50, 0xa5, 0xad, 0x90, 0x1d, 0xaf, 0xa1, + 0x6c, 0x9a, 0xa5, 0x9e, 0x4f, 0x06, 0xd5, 0xca, 0x8a, 0x46, 0x07, 0x1b, 0x54, 0x8f, 0xe1, 0x39, + 0x0b, 0xfb, 0x1f, 0x58, 0xf0, 0x48, 0x97, 0x74, 0x31, 0xb4, 0xb9, 0x7b, 0xcc, 0xf0, 0x2f, 0xde, + 0xf2, 0x53, 0xcd, 0xf1, 0xeb, 0x00, 0x2c, 0xa0, 0xe8, 0x0e, 0x00, 0x37, 0xe7, 0xb3, 0x97, 0xdd, + 0x4b, 0x45, 0xfc, 0x91, 0xda, 0x92, 0x32, 0x68, 0xf1, 0xfa, 0xea, 0x2d, 0x77, 0x8d, 0xaa, 0xfd, + 0xad, 0x32, 0xf4, 0xf3, 0x27, 0xa3, 0x6b, 0x30, 0xb8, 0xc5, 0xd3, 0xd7, 0xf6, 0x96, 0x3d, 0x37, + 0x55, 0x2e, 0x78, 0x01, 0x96, 0x64, 0xd0, 0x35, 0x98, 0xa2, 0x27, 0x8b, 0xe7, 0xf8, 0x55, 0xe2, + 0x3b, 0xbb, 0x52, 0x5b, 0xe5, 0x6f, 0x1c, 0xc8, 0x64, 0xdc, 0x53, 0x6b, 0xed, 0x28, 0xb8, 0x53, + 0x3d, 0xf4, 0x5a, 0x5b, 0xb6, 0x39, 0x9e, 0x16, 0x58, 0x49, 0xaa, 0x87, 0x67, 0x9c, 0xa3, 0xf2, + 0x74, 0xb3, 0x4d, 0x2f, 0xd7, 0x5e, 0xe6, 0x35, 0x75, 0x71, 0x13, 0x97, 0xf9, 0x16, 0xb4, 0x98, + 0x4f, 0xc5, 0xfa, 0x56, 0x44, 0xe2, 0xad, 0xd0, 0x77, 0xc5, 0xa3, 0x92, 0xa9, 0x6f, 0x41, 0x06, + 0x8e, 0xdb, 0x6a, 0x50, 0x2a, 0x1b, 0x8e, 0xe7, 0xb7, 0x22, 0x92, 0x52, 0x19, 0x30, 0xa9, 0xac, + 0x66, 0xe0, 0xb8, 0xad, 0x06, 0x5d, 0x5b, 0xa7, 0xc4, 0x3b, 0x84, 0x32, 0x38, 0x5a, 0xb0, 0xa0, + 0xcf, 0xc0, 0xa0, 0x74, 0x91, 0x2f, 0x94, 0xc3, 0x43, 0x38, 0x0e, 0xa8, 0x37, 0x0d, 0xb5, 0x37, + 0xaf, 0x84, 0x73, 0xbc, 0xa4, 0x77, 0x94, 0xf7, 0xee, 0xfe, 0xcc, 0x82, 0xa9, 0x0e, 0xae, 0x5e, + 0x9c, 0xa5, 0x6d, 0x7a, 0x71, 0xa2, 0x32, 0xee, 0x6b, 0x2c, 0x8d, 0x97, 0x63, 0x85, 0x41, 0x77, + 0x0b, 0x67, 0x9a, 0x59, 0x46, 0x29, 0x5c, 0x40, 0x04, 0xb4, 0x37, 0x46, 0x89, 0xce, 0x42, 0x5f, + 0x2b, 0x26, 0x91, 0x7c, 0x7c, 0x4e, 0xf2, 0x79, 0x66, 0x07, 0x64, 0x10, 0x2a, 0xb6, 0x6e, 0x2a, + 0x13, 0x9c, 0x26, 0xb6, 0x72, 0x23, 0x1c, 0x87, 0xd9, 0x5f, 0x2f, 0xc3, 0x78, 0xc6, 0xe5, 0x93, + 0x76, 0x64, 0x3b, 0x0c, 0xbc, 0x24, 0x54, 0x79, 0xd5, 0xf8, 0x7b, 0x57, 0xa4, 0xb9, 0x75, 0x4d, + 0x94, 0x63, 0x85, 0x81, 0x9e, 0x96, 0xef, 0x8d, 0x66, 0x5f, 0x12, 0x58, 0xaa, 0x1a, 0x4f, 0x8e, + 0x16, 0x7d, 0x05, 0xe4, 0x49, 0xe8, 0x6b, 0x86, 0xea, 0xf9, 0x68, 0xf5, 0x3d, 0xf1, 0x52, 0xb5, + 0x16, 0x86, 0x3e, 0x66, 0x40, 0xf4, 0x94, 0x18, 0x7d, 0xe6, 0xe6, 0x02, 0x3b, 0x6e, 0x18, 0x6b, + 0x53, 0xf0, 0x0c, 0x0c, 0xde, 0x25, 0xbb, 0x91, 0x17, 0x6c, 0x66, 0xef, 0x6d, 0xae, 0xf0, 0x62, + 0x2c, 0xe1, 0xe6, 0x4b, 0x1f, 0x83, 0xc7, 0xfc, 0xd2, 0xc7, 0x50, 0xee, 0x39, 0xf8, 0x1d, 0x0b, + 0xc6, 0x59, 0xb2, 0x51, 0x11, 0x9a, 0xef, 0x85, 0xc1, 0x09, 0xc8, 0x18, 0x4f, 0x42, 0x7f, 0x44, + 0x1b, 0xcd, 0xa6, 0xea, 0x67, 0x3d, 0xc1, 0x1c, 0x86, 0x1e, 0x83, 0x3e, 0xd6, 0x05, 0xfa, 0x19, + 0x47, 0x78, 0x4e, 0xf3, 0xaa, 0x93, 0x38, 0x98, 0x95, 0xb2, 0x28, 0x2b, 0x4c, 0x9a, 0xbe, 0xc7, + 0x3b, 0x9d, 0x9a, 0x5b, 0x1f, 0xb6, 0x28, 0xab, 0x8e, 0x9d, 0x7c, 0x50, 0x51, 0x56, 0x9d, 0x89, + 0x1f, 0x2e, 0xe7, 0xff, 0x8f, 0x12, 0x9c, 0xe9, 0x58, 0x2f, 0xbd, 0x01, 0x5e, 0x35, 0x6e, 0x80, + 0x2f, 0x64, 0x6e, 0x80, 0xed, 0xc3, 0x6b, 0x3f, 0x98, 0x3b, 0xe1, 0xce, 0x57, 0xb5, 0xe5, 0x13, + 0xbc, 0xaa, 0xed, 0x2b, 0x2a, 0xe2, 0xf4, 0xe7, 0x88, 0x38, 0x7f, 0x68, 0xc1, 0xa3, 0x1d, 0xa7, + 0xec, 0xa1, 0x0b, 0x6b, 0xeb, 0xd8, 0xcb, 0x2e, 0xda, 0xc9, 0x2f, 0x97, 0xbb, 0x8c, 0x8a, 0xe9, + 0x29, 0xe7, 0x28, 0x17, 0x62, 0xc0, 0x58, 0x08, 0x6f, 0x23, 0x9c, 0x03, 0xf1, 0x32, 0xac, 0xa0, + 0x28, 0xd6, 0xc2, 0xc2, 0x78, 0x27, 0x57, 0x8e, 0xb8, 0xa1, 0xe6, 0x4d, 0x3b, 0xb9, 0x9e, 0x6f, + 0x20, 0x1b, 0x2c, 0x76, 0x5b, 0xd3, 0x3c, 0xcb, 0x47, 0xd1, 0x3c, 0x47, 0x3a, 0x6b, 0x9d, 0x68, + 0x11, 0xc6, 0xb7, 0xbd, 0x80, 0x3d, 0x10, 0x6a, 0x4a, 0x4f, 0x2a, 0x36, 0xf7, 0x9a, 0x09, 0xc6, + 0x59, 0xfc, 0xd9, 0x57, 0x61, 0xf4, 0xe8, 0xd6, 0xb5, 0x1f, 0x97, 0xe1, 0x83, 0x87, 0x30, 0x05, + 0x7e, 0x3a, 0x18, 0xdf, 0x45, 0x3b, 0x1d, 0xda, 0xbe, 0x4d, 0x0d, 0xa6, 0x37, 0x5a, 0xbe, 0xbf, + 0xcb, 0xfc, 0xa7, 0x88, 0x2b, 0x31, 0x84, 0x50, 0xa3, 0x5e, 0x22, 0x5f, 0xed, 0x80, 0x83, 0x3b, + 0xd6, 0x44, 0x9f, 0x06, 0x14, 0xde, 0x61, 0xe9, 0x78, 0xdd, 0x34, 0x9f, 0x02, 0xfb, 0x04, 0xe5, + 0x74, 0xab, 0xde, 0x68, 0xc3, 0xc0, 0x1d, 0x6a, 0x51, 0x39, 0x95, 0x3d, 0x62, 0xae, 0xba, 0x95, + 0x91, 0x53, 0xb1, 0x0e, 0xc4, 0x26, 0x2e, 0xba, 0x04, 0x93, 0xce, 0x8e, 0xe3, 0xf1, 0xf4, 0x5a, + 0x92, 0x00, 0x17, 0x54, 0x95, 0xfd, 0x6a, 0x31, 0x8b, 0x80, 0xdb, 0xeb, 0xa0, 0xa6, 0x61, 0x90, + 0xe4, 0x89, 0xf8, 0x3f, 0x71, 0x84, 0x15, 0x5c, 0xd8, 0x44, 0x69, 0xff, 0x57, 0x8b, 0x1e, 0x7d, + 0x1d, 0xde, 0x92, 0xa4, 0x33, 0xa2, 0x0c, 0x6c, 0x5a, 0x98, 0x9b, 0x9a, 0x91, 0x65, 0x1d, 0x88, + 0x4d, 0x5c, 0xbe, 0x34, 0xe2, 0xd4, 0x9d, 0xdb, 0x90, 0x36, 0x45, 0x84, 0xa8, 0xc2, 0xa0, 0x12, + 0xb4, 0xeb, 0xed, 0x78, 0x71, 0x18, 0x89, 0x0d, 0xd4, 0xa3, 0x73, 0x6f, 0xca, 0x2f, 0xab, 0x9c, + 0x0c, 0x96, 0xf4, 0xec, 0x6f, 0x94, 0x60, 0x54, 0xb6, 0xf8, 0x7a, 0x2b, 0x4c, 0x9c, 0x13, 0x38, + 0xd2, 0x5f, 0x37, 0x8e, 0xf4, 0x85, 0x62, 0x01, 0xb3, 0xac, 0x73, 0x5d, 0x8f, 0xf2, 0xcf, 0x64, + 0x8e, 0xf2, 0x17, 0x7a, 0x21, 0x7a, 0xf8, 0x11, 0xfe, 0x6f, 0x2d, 0x98, 0x34, 0xf0, 0x4f, 0xe0, + 0x24, 0xa9, 0x99, 0x27, 0xc9, 0x73, 0x3d, 0x8c, 0xa6, 0xcb, 0x09, 0xf2, 0xed, 0x52, 0x66, 0x14, + 0xec, 0xe4, 0xf8, 0x02, 0xf4, 0x6d, 0x39, 0x91, 0x5b, 0x2c, 0xd7, 0x64, 0x5b, 0xf5, 0xf9, 0xcb, + 0x4e, 0xe4, 0x72, 0xfe, 0x7f, 0x5e, 0xbd, 0x74, 0xe5, 0x44, 0x6e, 0x6e, 0x94, 0x03, 0x6b, 0x14, + 0x5d, 0x84, 0x81, 0xb8, 0x11, 0x36, 0x95, 0x1f, 0xe8, 0x59, 0xfe, 0x0a, 0x16, 0x2d, 0x39, 0xd8, + 0x9b, 0x43, 0x66, 0x73, 0xb4, 0x18, 0x0b, 0xfc, 0xd9, 0x4d, 0xa8, 0xa8, 0xa6, 0x8f, 0xd5, 0x13, + 0xfe, 0xbf, 0x95, 0x61, 0xaa, 0xc3, 0x5a, 0x41, 0x5f, 0x34, 0xe6, 0xed, 0xd5, 0x9e, 0x17, 0xdb, + 0xfb, 0x9c, 0xb9, 0x2f, 0x32, 0x4d, 0xc9, 0x15, 0xab, 0xe3, 0x08, 0xcd, 0xdf, 0x8c, 0x49, 0xb6, + 0x79, 0x5a, 0x94, 0xdf, 0x3c, 0x6d, 0xf6, 0xc4, 0xa6, 0x9f, 0x36, 0xa4, 0x7a, 0x7a, 0xac, 0xdf, + 0xf9, 0xaf, 0xf5, 0xc1, 0x74, 0xa7, 0xc8, 0x7c, 0xf4, 0x15, 0x2b, 0xf3, 0xa0, 0xc4, 0x6b, 0xbd, + 0x87, 0xf7, 0xf3, 0x57, 0x26, 0x44, 0x36, 0x9b, 0x79, 0xf3, 0x89, 0x89, 0xdc, 0x19, 0x17, 0xad, + 0xb3, 0xf8, 0xa4, 0x88, 0x3f, 0x0e, 0x22, 0xb9, 0xc2, 0xa7, 0x8e, 0xd0, 0x15, 0xf1, 0xbe, 0x48, + 0x9c, 0x89, 0x4f, 0x92, 0xc5, 0xf9, 0xf1, 0x49, 0xb2, 0x0f, 0xb3, 0x1e, 0x0c, 0x6b, 0xe3, 0x3a, + 0xd6, 0x65, 0x70, 0x97, 0x1e, 0x51, 0x5a, 0xbf, 0x8f, 0x75, 0x29, 0xfc, 0x5d, 0x0b, 0x32, 0x4e, + 0x5b, 0xca, 0x2c, 0x63, 0x75, 0x35, 0xcb, 0x9c, 0x85, 0xbe, 0x28, 0xf4, 0x49, 0xf6, 0xb1, 0x03, + 0x1c, 0xfa, 0x04, 0x33, 0x88, 0x7a, 0xfc, 0xb6, 0xdc, 0xed, 0xf1, 0x5b, 0xaa, 0xa7, 0xfb, 0x64, + 0x87, 0x48, 0x23, 0x89, 0x62, 0xe3, 0x57, 0x69, 0x21, 0xe6, 0x30, 0xfb, 0xb7, 0xfa, 0x60, 0xaa, + 0x43, 0xb4, 0x1b, 0xd5, 0x90, 0x36, 0x9d, 0x84, 0xdc, 0x73, 0x76, 0xb3, 0x49, 0x57, 0x2f, 0xf1, + 0x62, 0x2c, 0xe1, 0xcc, 0xd9, 0x94, 0x27, 0x6e, 0xcb, 0x98, 0xae, 0x44, 0xbe, 0x36, 0x01, 0x3d, + 0xfe, 0x67, 0x52, 0x2f, 0x00, 0xc4, 0xb1, 0xbf, 0x12, 0x50, 0x09, 0xcf, 0x15, 0x4e, 0xad, 0x69, + 0xbe, 0xbf, 0xfa, 0x55, 0x01, 0xc1, 0x1a, 0x16, 0xaa, 0xc2, 0x44, 0x33, 0x0a, 0x13, 0x6e, 0x18, + 0xac, 0x72, 0x47, 0x88, 0x7e, 0x33, 0x9a, 0xaa, 0x96, 0x81, 0xe3, 0xb6, 0x1a, 0xe8, 0x65, 0x18, + 0x16, 0x11, 0x56, 0xb5, 0x30, 0xf4, 0x85, 0x19, 0x49, 0x5d, 0xc7, 0xd7, 0x53, 0x10, 0xd6, 0xf1, + 0xb4, 0x6a, 0xcc, 0xda, 0x38, 0xd8, 0xb1, 0x1a, 0xb7, 0x38, 0x6a, 0x78, 0x99, 0xfc, 0x1d, 0x43, + 0x85, 0xf2, 0x77, 0xa4, 0x86, 0xb5, 0x4a, 0xe1, 0x8b, 0x18, 0xc8, 0x35, 0x40, 0xfd, 0x41, 0x19, + 0x06, 0xf8, 0xa7, 0x38, 0x01, 0x29, 0xaf, 0x26, 0x4c, 0x4a, 0x85, 0x72, 0x25, 0xf0, 0x5e, 0xcd, + 0x57, 0x9d, 0xc4, 0xe1, 0xac, 0x49, 0xed, 0x90, 0xd4, 0x0c, 0x85, 0xe6, 0x8d, 0x3d, 0x34, 0x9b, + 0xb1, 0x94, 0x00, 0xa7, 0xa1, 0xed, 0xa8, 0x2d, 0x80, 0x98, 0x3d, 0xd5, 0x49, 0x69, 0x88, 0x8c, + 0xb0, 0x2f, 0x15, 0xea, 0x47, 0x5d, 0x55, 0xe3, 0xbd, 0x49, 0x97, 0xa5, 0x02, 0x60, 0x8d, 0xf6, + 0xec, 0x2b, 0x50, 0x51, 0xc8, 0x79, 0x2a, 0xe4, 0x88, 0xce, 0xda, 0xfe, 0x3f, 0x18, 0xcf, 0xb4, + 0xd5, 0x93, 0x06, 0xfa, 0x3b, 0x16, 0x8c, 0xf3, 0x2e, 0xaf, 0x04, 0x3b, 0x82, 0x15, 0x7c, 0xd9, + 0x82, 0x69, 0xbf, 0xc3, 0x4e, 0x14, 0x9f, 0xf9, 0x28, 0x7b, 0x58, 0x29, 0x9f, 0x9d, 0xa0, 0xb8, + 0x63, 0x6b, 0xe8, 0x1c, 0x0c, 0xf1, 0x97, 0x87, 0x1d, 0x5f, 0x78, 0x50, 0x8f, 0xf0, 0x5c, 0xd8, + 0xbc, 0x0c, 0x2b, 0xa8, 0xfd, 0x13, 0x0b, 0x26, 0xdb, 0x1e, 0xb2, 0x7f, 0x58, 0x86, 0x21, 0xb2, + 0x7e, 0x97, 0xba, 0x64, 0xfd, 0xd6, 0x47, 0x59, 0x3e, 0x74, 0x94, 0xbf, 0x61, 0x81, 0x58, 0xa1, + 0x27, 0xa0, 0x3f, 0xac, 0x99, 0xfa, 0xc3, 0x87, 0x8a, 0x2c, 0xfa, 0x2e, 0x8a, 0xc3, 0x2f, 0x95, + 0x60, 0x82, 0x23, 0xa4, 0x37, 0x32, 0x0f, 0xcb, 0xc7, 0xe9, 0xed, 0x35, 0x1a, 0xf5, 0x04, 0x68, + 0xe7, 0x91, 0x1a, 0xdf, 0xb2, 0xef, 0xd0, 0x6f, 0xf9, 0x17, 0x16, 0x20, 0x3e, 0x27, 0xd9, 0x67, + 0x9b, 0xf9, 0xe9, 0xa6, 0x99, 0x03, 0x52, 0xce, 0xa1, 0x20, 0x58, 0xc3, 0x7a, 0xc0, 0x43, 0xc8, + 0xdc, 0x87, 0x95, 0xf3, 0xef, 0xc3, 0x7a, 0x18, 0xf5, 0xef, 0x96, 0x21, 0xeb, 0x4a, 0x89, 0xde, + 0x81, 0x91, 0x86, 0xd3, 0x74, 0xee, 0x78, 0xbe, 0x97, 0x78, 0x24, 0x2e, 0x76, 0xe1, 0xbe, 0xac, + 0xd5, 0x10, 0xd7, 0x50, 0x5a, 0x09, 0x36, 0x28, 0xa2, 0x79, 0x80, 0x66, 0xe4, 0xed, 0x78, 0x3e, + 0xd9, 0x64, 0x1a, 0x0f, 0x8b, 0xc5, 0xe0, 0x77, 0xc7, 0xb2, 0x14, 0x6b, 0x18, 0x1d, 0x7c, 0xf7, + 0xcb, 0x27, 0xe1, 0xbb, 0xdf, 0xd7, 0xa3, 0xef, 0x7e, 0x7f, 0x21, 0xdf, 0x7d, 0x0c, 0xa7, 0xe5, + 0xe1, 0x4d, 0xff, 0xaf, 0x7a, 0x3e, 0x11, 0xb2, 0x1b, 0x8f, 0xd5, 0x98, 0xdd, 0xdf, 0x9b, 0x3b, + 0x8d, 0x3b, 0x62, 0xe0, 0x2e, 0x35, 0xed, 0x16, 0x4c, 0xd5, 0x49, 0xe4, 0xb1, 0x9c, 0x94, 0x6e, + 0xba, 0x97, 0x3e, 0x07, 0x95, 0x28, 0xb3, 0x8d, 0x7b, 0x0c, 0xc8, 0xd7, 0xb2, 0x98, 0xc9, 0x6d, + 0x9b, 0x92, 0xb4, 0xff, 0x46, 0x09, 0x06, 0x85, 0x13, 0xe5, 0x09, 0x08, 0x1f, 0x57, 0x0c, 0x13, + 0xd3, 0x33, 0x79, 0xfc, 0x8f, 0x75, 0xab, 0xab, 0x71, 0xa9, 0x9e, 0x31, 0x2e, 0x3d, 0x57, 0x8c, + 0xdc, 0xe1, 0x66, 0xa5, 0x7f, 0x5a, 0x86, 0x31, 0xd3, 0xa9, 0xf4, 0x04, 0xa6, 0xe5, 0x0d, 0x18, + 0x8c, 0x85, 0x7f, 0x73, 0xa9, 0x88, 0xcf, 0x5e, 0xf6, 0x13, 0xa7, 0x37, 0xf1, 0xc2, 0xa3, 0x59, + 0x92, 0xeb, 0xe8, 0x42, 0x5d, 0x3e, 0x11, 0x17, 0xea, 0x3c, 0x5f, 0xdf, 0xbe, 0x07, 0xe1, 0xeb, + 0x6b, 0xff, 0x80, 0xb1, 0x7c, 0xbd, 0xfc, 0x04, 0x8e, 0xf1, 0xd7, 0xcd, 0xc3, 0xe1, 0x7c, 0xa1, + 0x75, 0x27, 0xba, 0xd7, 0xe5, 0x38, 0xff, 0xae, 0x05, 0xc3, 0x02, 0xf1, 0x04, 0x06, 0xf0, 0x69, + 0x73, 0x00, 0x4f, 0x15, 0x1a, 0x40, 0x97, 0x9e, 0x7f, 0xa3, 0xa4, 0x7a, 0x5e, 0x13, 0x4f, 0xed, + 0xe7, 0x66, 0xe0, 0x1e, 0xa2, 0xaa, 0x5f, 0xd8, 0x08, 0x7d, 0x21, 0xc0, 0x3d, 0x96, 0x86, 0xe6, + 0xf1, 0xf2, 0x03, 0xed, 0x37, 0x56, 0xd8, 0x2c, 0x72, 0x2c, 0x8c, 0x12, 0x71, 0x80, 0x76, 0x7a, + 0xe8, 0xdf, 0x05, 0x48, 0x5f, 0x57, 0x17, 0x51, 0xad, 0xdd, 0x77, 0x6b, 0x2b, 0xf1, 0xfc, 0x79, + 0x2f, 0x48, 0xe2, 0x24, 0x9a, 0x5f, 0x0b, 0x92, 0x1b, 0x11, 0x17, 0xfa, 0xb5, 0x58, 0x3b, 0x45, + 0x0b, 0x6b, 0x74, 0x65, 0x10, 0x07, 0x6b, 0xa3, 0xdf, 0xbc, 0x41, 0xba, 0x2e, 0xca, 0xb1, 0xc2, + 0xb0, 0x5f, 0x61, 0x9c, 0x9d, 0x4d, 0x50, 0x6f, 0x61, 0x70, 0xbf, 0x38, 0xa0, 0xa6, 0x96, 0x99, + 0x85, 0xaf, 0xeb, 0xc1, 0x76, 0x45, 0xd9, 0x27, 0xed, 0x82, 0xee, 0x47, 0x9d, 0xc6, 0xe6, 0x21, + 0xd2, 0x76, 0xed, 0xf8, 0x4a, 0x61, 0x8e, 0xdc, 0xc3, 0x45, 0x23, 0x4b, 0x3a, 0xc8, 0x32, 0xad, + 0xad, 0xd5, 0xb2, 0x79, 0xd3, 0x97, 0x25, 0x00, 0xa7, 0x38, 0x68, 0x41, 0x28, 0x94, 0xdc, 0xe2, + 0xf2, 0xc1, 0x8c, 0x42, 0x29, 0xa7, 0x44, 0xd3, 0x28, 0x5f, 0x80, 0x61, 0xf5, 0x14, 0x4d, 0x8d, + 0x3f, 0x02, 0x52, 0xe1, 0xf2, 0xd5, 0x4a, 0x5a, 0x8c, 0x75, 0x1c, 0xb4, 0x06, 0x53, 0xae, 0x8a, + 0xd9, 0xa9, 0xb5, 0xee, 0xf8, 0x5e, 0x83, 0x56, 0xe5, 0xf1, 0xb6, 0x8f, 0xec, 0xef, 0xcd, 0x4d, + 0x55, 0xdb, 0xc1, 0xb8, 0x53, 0x1d, 0xb4, 0x0e, 0xe3, 0x31, 0x7f, 0x72, 0x47, 0x06, 0x66, 0x08, + 0x1b, 0xc4, 0xb3, 0xf2, 0xbe, 0xb3, 0x6e, 0x82, 0x0f, 0x58, 0x11, 0xe7, 0x0a, 0x32, 0x94, 0x23, + 0x4b, 0x02, 0xbd, 0x06, 0x63, 0xbe, 0xfe, 0x9e, 0x68, 0x4d, 0x98, 0x28, 0x94, 0x07, 0x9b, 0xf1, + 0xda, 0x68, 0x0d, 0x67, 0xb0, 0xd1, 0x1b, 0x30, 0xa3, 0x97, 0x88, 0x3c, 0x42, 0x4e, 0xb0, 0x49, + 0x62, 0xf1, 0x3c, 0xc7, 0x63, 0xfb, 0x7b, 0x73, 0x33, 0x57, 0xbb, 0xe0, 0xe0, 0xae, 0xb5, 0xd1, + 0x45, 0x18, 0x91, 0x33, 0xa9, 0x85, 0x31, 0xa5, 0xbe, 0x93, 0x1a, 0x0c, 0x1b, 0x98, 0xef, 0xef, + 0x5a, 0xf7, 0x0b, 0xb4, 0xb2, 0x76, 0x84, 0xa3, 0x77, 0x61, 0x44, 0xef, 0x63, 0xf6, 0x6c, 0xce, + 0x7f, 0xa3, 0x55, 0x88, 0x02, 0xaa, 0xe7, 0x3a, 0x0c, 0x1b, 0xb4, 0xed, 0x1b, 0x30, 0x50, 0xdf, + 0x8d, 0x1b, 0x89, 0x5f, 0x80, 0xbf, 0x3d, 0x69, 0x0c, 0x21, 0xdd, 0x7b, 0xec, 0xbd, 0x28, 0x31, + 0x22, 0x9b, 0xc0, 0xf8, 0xfa, 0x72, 0xad, 0x1e, 0x36, 0xee, 0x92, 0x64, 0x91, 0x6b, 0x6f, 0x58, + 0x70, 0x37, 0xeb, 0x88, 0x5c, 0xab, 0x03, 0x3f, 0xb4, 0xff, 0xd4, 0x82, 0x7e, 0xf6, 0xd6, 0x51, + 0xde, 0x3b, 0x59, 0x45, 0x3a, 0x8d, 0x5e, 0x86, 0x01, 0xb2, 0xb1, 0x41, 0x1a, 0x89, 0xd8, 0xc6, + 0x32, 0x56, 0x60, 0x60, 0x85, 0x95, 0xd2, 0xcd, 0xc9, 0x1a, 0xe3, 0x7f, 0xb1, 0x40, 0x46, 0x9f, + 0x85, 0x4a, 0xe2, 0x6d, 0x93, 0x45, 0xd7, 0x15, 0x06, 0xc5, 0xde, 0xdc, 0x57, 0x14, 0xb3, 0x58, + 0x97, 0x44, 0x70, 0x4a, 0xcf, 0xfe, 0x5a, 0x09, 0x20, 0x8d, 0xd4, 0xc9, 0x1b, 0xe6, 0x52, 0xdb, + 0x73, 0x60, 0x4f, 0x77, 0x78, 0x0e, 0x0c, 0xa5, 0x04, 0x3b, 0x3c, 0x06, 0xa6, 0xa6, 0xaa, 0x5c, + 0x68, 0xaa, 0xfa, 0x7a, 0x99, 0xaa, 0x65, 0x98, 0x4c, 0x23, 0x8d, 0xcc, 0x90, 0x4d, 0x96, 0x1c, + 0x74, 0x3d, 0x0b, 0xc4, 0xed, 0xf8, 0xf6, 0xd7, 0x2c, 0x10, 0x0e, 0x8f, 0x05, 0x56, 0xab, 0x2b, + 0x9f, 0xee, 0x31, 0xb2, 0x98, 0x3d, 0x5b, 0xc4, 0x17, 0x54, 0xe4, 0x2e, 0x53, 0xfb, 0xc7, 0xc8, + 0x58, 0x66, 0x50, 0xb5, 0x7f, 0xd3, 0x82, 0x61, 0x0e, 0xbe, 0xc6, 0x64, 0xea, 0xfc, 0x7e, 0xf5, + 0x94, 0x79, 0x96, 0xbd, 0x6a, 0x43, 0x09, 0xab, 0x0c, 0xa4, 0xfa, 0xab, 0x36, 0x12, 0x80, 0x53, + 0x1c, 0xf4, 0x0c, 0x0c, 0xc6, 0xad, 0x3b, 0x0c, 0x3d, 0xe3, 0xfd, 0x58, 0xe7, 0xc5, 0x58, 0xc2, + 0xed, 0x7f, 0x5e, 0x82, 0x89, 0xac, 0xf3, 0x2b, 0xc2, 0x30, 0xc0, 0x65, 0xec, 0xac, 0x78, 0x76, + 0x98, 0x2d, 0x47, 0x73, 0x9e, 0x05, 0xfe, 0x36, 0x33, 0x33, 0xba, 0x0b, 0x4a, 0x68, 0x03, 0x86, + 0xdd, 0xf0, 0x5e, 0x70, 0xcf, 0x89, 0xdc, 0xc5, 0xda, 0x9a, 0xf8, 0x12, 0x39, 0xee, 0x4a, 0xd5, + 0xb4, 0x82, 0xee, 0x9a, 0xcb, 0x6c, 0x0b, 0x29, 0x08, 0xeb, 0x84, 0xa9, 0x4e, 0xd9, 0x08, 0x83, + 0x0d, 0x6f, 0xf3, 0x9a, 0xd3, 0x2c, 0x76, 0x31, 0xbf, 0x2c, 0xd1, 0xb5, 0x36, 0x46, 0x45, 0x8e, + 0x06, 0x0e, 0xc0, 0x29, 0x49, 0xfb, 0xd7, 0xa7, 0xc1, 0x58, 0x0b, 0x46, 0x7a, 0x58, 0xeb, 0x81, + 0xa7, 0x87, 0x7d, 0x0b, 0x86, 0xc8, 0x76, 0x33, 0xd9, 0xad, 0x7a, 0x51, 0xb1, 0x64, 0xdf, 0x2b, + 0x02, 0xbb, 0x9d, 0xba, 0x84, 0x60, 0x45, 0xb1, 0x4b, 0xb2, 0xdf, 0xf2, 0x43, 0x91, 0xec, 0xb7, + 0xef, 0x2f, 0x25, 0xd9, 0xef, 0x1b, 0x30, 0xb8, 0xe9, 0x25, 0x98, 0x34, 0x43, 0x91, 0xf4, 0x22, + 0x67, 0xf1, 0x5c, 0xe2, 0xc8, 0xed, 0x69, 0x20, 0x05, 0x00, 0x4b, 0x72, 0x68, 0x5d, 0x6d, 0xaa, + 0x81, 0x22, 0x67, 0x79, 0xbb, 0xad, 0xaf, 0xe3, 0xb6, 0x12, 0xc9, 0x7d, 0x07, 0xdf, 0x7f, 0x72, + 0x5f, 0x95, 0x92, 0x77, 0xe8, 0x41, 0xa5, 0xe4, 0x35, 0x52, 0x1b, 0x57, 0x8e, 0x23, 0xb5, 0xf1, + 0xd7, 0x2c, 0x38, 0xd5, 0xec, 0x94, 0x18, 0x5c, 0x24, 0xd7, 0xfd, 0xe4, 0x11, 0x52, 0xa5, 0x1b, + 0x4d, 0xb3, 0x54, 0x02, 0x1d, 0xd1, 0x70, 0xe7, 0x86, 0x65, 0x8e, 0xe4, 0xe1, 0xf7, 0x9f, 0x23, + 0xf9, 0xb8, 0xb3, 0xf0, 0xa6, 0x19, 0x93, 0x47, 0x8f, 0x25, 0x63, 0xf2, 0xd8, 0x03, 0xcc, 0x98, + 0xac, 0xe5, 0x3a, 0x1e, 0x7f, 0xb0, 0xb9, 0x8e, 0xb7, 0xcc, 0x73, 0x89, 0xa7, 0xd6, 0x7d, 0xb9, + 0xf0, 0xb9, 0x64, 0xb4, 0x70, 0xf8, 0xc9, 0xc4, 0xb3, 0x3e, 0x4f, 0xbe, 0xcf, 0xac, 0xcf, 0x46, + 0xee, 0x64, 0x74, 0x1c, 0xb9, 0x93, 0xdf, 0xd1, 0x4f, 0xd0, 0xa9, 0x22, 0x2d, 0xa8, 0x83, 0xb2, + 0xbd, 0x85, 0x4e, 0x67, 0x68, 0x7b, 0x76, 0xe6, 0xe9, 0x93, 0xce, 0xce, 0x7c, 0xea, 0x18, 0xb3, + 0x33, 0x9f, 0x3e, 0xd1, 0xec, 0xcc, 0x8f, 0x3c, 0x24, 0xd9, 0x99, 0x67, 0x4e, 0x2a, 0x3b, 0xf3, + 0xa3, 0x0f, 0x34, 0x3b, 0x33, 0xfd, 0x74, 0x4d, 0x19, 0x42, 0x36, 0x33, 0x5b, 0xe4, 0xd3, 0x75, + 0x8c, 0x38, 0xe3, 0x9f, 0x4e, 0x81, 0x70, 0x4a, 0xd4, 0xfe, 0x2b, 0x70, 0xe6, 0xf0, 0xa5, 0x9b, + 0x7a, 0x6b, 0xd4, 0x52, 0x9b, 0x59, 0xc6, 0x5b, 0x83, 0x89, 0x85, 0x1a, 0x56, 0xe1, 0xf4, 0xb1, + 0xdf, 0xb6, 0xe0, 0x91, 0x2e, 0xd9, 0x15, 0x0b, 0xc7, 0x5f, 0x36, 0x61, 0xbc, 0x69, 0x56, 0x2d, + 0x1c, 0xce, 0x6d, 0x64, 0x73, 0x54, 0x3e, 0xf2, 0x19, 0x00, 0xce, 0x92, 0x5f, 0xfa, 0xd0, 0x0f, + 0x7f, 0x7c, 0xe6, 0x03, 0x3f, 0xfa, 0xf1, 0x99, 0x0f, 0xfc, 0xf1, 0x8f, 0xcf, 0x7c, 0xe0, 0xe7, + 0xf6, 0xcf, 0x58, 0x3f, 0xdc, 0x3f, 0x63, 0xfd, 0x68, 0xff, 0x8c, 0xf5, 0x67, 0xfb, 0x67, 0xac, + 0xaf, 0xfd, 0xe4, 0xcc, 0x07, 0xde, 0x2c, 0xed, 0xbc, 0xf0, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, + 0x5f, 0x32, 0x87, 0xa4, 0xbe, 0xc8, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/v1/generated.proto b/vendor/k8s.io/client-go/pkg/api/v1/generated.proto similarity index 75% rename from vendor/k8s.io/client-go/1.5/pkg/api/v1/generated.proto rename to vendor/k8s.io/client-go/pkg/api/v1/generated.proto index e4c85c8c9..9c48148aa 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/v1/generated.proto +++ b/vendor/k8s.io/client-go/pkg/api/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,10 +21,12 @@ 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"; +import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1"; @@ -37,37 +39,43 @@ option go_package = "v1"; // 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore optional string volumeID = 1; // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore + // More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional optional string fsType = 2; // The partition in the volume that you want to mount. // If omitted, the default is to mount by volume name. // Examples: For volume /dev/sda1, you specify the partition as "1". // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + // +optional optional int32 partition = 3; // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". // If omitted, the default is "false". - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore + // More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + // +optional optional bool readOnly = 4; } // Affinity is a group of affinity scheduling rules. message Affinity { // Describes node affinity scheduling rules for the pod. + // +optional optional NodeAffinity nodeAffinity = 1; // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + // +optional optional PodAffinity podAffinity = 2; // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). + // +optional optional PodAntiAffinity podAntiAffinity = 3; } @@ -76,7 +84,7 @@ message AttachedVolume { // Name of the attached volume optional string name = 1; - // DevicePath represents the device path where the volume should be avilable + // DevicePath represents the device path where the volume should be available optional string devicePath = 2; } @@ -86,6 +94,7 @@ message AttachedVolume { message AvoidPods { // Bounded-sized list of signatures of pods that should avoid this node, sorted // in timestamp order from oldest to newest. Size of the slice is unspecified. + // +optional repeated PreferAvoidPodsEntry preferAvoidPods = 1; } @@ -98,15 +107,18 @@ message AzureDiskVolumeSource { optional string diskURI = 2; // Host Caching mode: None, Read Only, Read Write. + // +optional optional string cachingMode = 3; // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // +optional optional string fsType = 4; // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. + // +optional optional bool readOnly = 5; } @@ -120,6 +132,7 @@ message AzureFileVolumeSource { // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. + // +optional optional bool readOnly = 3; } @@ -128,7 +141,8 @@ message AzureFileVolumeSource { message Binding { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The target object that you want to bind to the standard object. optional ObjectReference target = 2; @@ -137,9 +151,11 @@ message Binding { // Adds and removes POSIX capabilities from running containers. message Capabilities { // Added capabilities + // +optional repeated string add = 1; // Removed capabilities + // +optional repeated string drop = 2; } @@ -151,23 +167,28 @@ message CephFSVolumeSource { repeated string monitors = 1; // Optional: Used as the mounted root, rather than the full Ceph tree, default is / + // +optional optional string path = 2; // Optional: User is the rados user name, default is admin // More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + // +optional optional string user = 3; // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret // More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + // +optional optional string secretFile = 4; // Optional: SecretRef is reference to the authentication secret for User, default is empty. // More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + // +optional optional LocalObjectReference secretRef = 5; // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + // +optional optional bool readOnly = 6; } @@ -184,11 +205,13 @@ message CinderVolumeSource { // 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 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 optional bool readOnly = 3; } @@ -204,10 +227,12 @@ message ComponentCondition { // Message about the condition for a component. // For example, information about a health check. + // +optional optional string message = 3; // Condition error code for a component. // For example, a health check error code. + // +optional optional string error = 4; } @@ -215,9 +240,11 @@ message ComponentCondition { message ComponentStatus { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // List of component conditions observed + // +optional repeated ComponentCondition conditions = 2; } @@ -225,7 +252,8 @@ message ComponentStatus { 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of ComponentStatus objects. repeated ComponentStatus items = 2; @@ -235,13 +263,29 @@ message ComponentStatusList { message ConfigMap { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Data contains the configuration data. // Each key must be a valid DNS_SUBDOMAIN with an optional leading dot. + // +optional map data = 2; } +// ConfigMapEnvSource selects a ConfigMap to populate the environment +// variables with. +// +// The contents of the target ConfigMap's Data field will represent the +// key-value pairs as environment variables. +message ConfigMapEnvSource { + // The ConfigMap to select from. + optional LocalObjectReference localObjectReference = 1; + + // Specify whether the ConfigMap must be defined + // +optional + optional bool optional = 2; +} + // Selects a key from a ConfigMap. message ConfigMapKeySelector { // The ConfigMap to select from. @@ -249,17 +293,47 @@ message ConfigMapKeySelector { // The key to select. optional string key = 2; + + // Specify whether the ConfigMap or it's key must be defined + // +optional + optional bool optional = 3; } // ConfigMapList is a resource containing a list of ConfigMap objects. message ConfigMapList { // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is the list of ConfigMaps. repeated ConfigMap items = 2; } +// Adapts a ConfigMap into a projected volume. +// +// The contents of the target ConfigMap's Data field will be presented in a +// projected volume as files using the keys in the Data field as the file names, +// unless the items element is populated with specific mappings of keys to paths. +// Note that this is identical to a configmap volume source without the default +// mode. +message ConfigMapProjection { + optional LocalObjectReference localObjectReference = 1; + + // If unspecified, each key-value pair in the Data field of the referenced + // ConfigMap will be projected into the volume as a file whose name is the + // key and content is the value. If specified, the listed keys will be + // projected into the specified paths, and unlisted keys will not be + // present. If a key is specified which is not present in the ConfigMap, + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional + repeated KeyToPath items = 2; + + // Specify whether the ConfigMap or it's keys must be defined + // +optional + optional bool optional = 4; +} + // Adapts a ConfigMap into a volume. // // The contents of the target ConfigMap's Data field will be presented in a @@ -274,8 +348,9 @@ message ConfigMapVolumeSource { // 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 '..'. + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional repeated KeyToPath items = 2; // Optional: mode bits to use on created files by default. Must be a @@ -283,7 +358,12 @@ message ConfigMapVolumeSource { // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. + // +optional optional int32 defaultMode = 3; + + // Specify whether the ConfigMap or it's keys must be defined + // +optional + optional bool optional = 4; } // A single application container that you want to run within a pod. @@ -294,7 +374,8 @@ message Container { optional string name = 1; // Docker image name. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/images.md + // More info: http://kubernetes.io/docs/user-guide/images + // +optional optional string image = 2; // Entrypoint array. Not executed within a shell. @@ -304,7 +385,8 @@ message Container { // 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 + // More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands + // +optional repeated string command = 3; // Arguments to the entrypoint. @@ -314,13 +396,15 @@ message Container { // 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 + // More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands + // +optional repeated string args = 4; // Container's working directory. // If not specified, the container runtime's default will be used, which // might be configured in the container image. // Cannot be updated. + // +optional optional string workingDir = 5; // List of ports to expose from the container. Exposing a port here gives @@ -330,58 +414,90 @@ message Container { // listening on the default "0.0.0.0" address inside a container will be // accessible from the network. // Cannot be updated. + // +optional repeated ContainerPort ports = 6; + // List of sources to populate environment variables in the container. + // The keys defined within a source must be a C_IDENTIFIER. All invalid keys + // will be reported as an event when the container is starting. When a key exists in multiple + // sources, the value associated with the last source will take precedence. + // Values defined by an Env with a duplicate key will take precedence. + // Cannot be updated. + // +optional + repeated EnvFromSource envFrom = 19; + // List of environment variables to set in the container. // Cannot be updated. + // +optional 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 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources + // +optional optional ResourceRequirements resources = 8; // Pod volumes to mount into the container's filesystem. // Cannot be updated. + // +optional 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 + // More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes + // +optional optional Probe livenessProbe = 10; // Periodic probe of container service readiness. // Container will be removed from service endpoints if the probe fails. // Cannot be updated. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes + // More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes + // +optional optional Probe readinessProbe = 11; // Actions that the management system should take in response to container lifecycle events. // Cannot be updated. + // +optional optional Lifecycle lifecycle = 12; // Optional: Path at which the file to which the container's termination message // will be written is mounted into the container's filesystem. // Message written is intended to be brief final status, such as an assertion failure message. + // Will be truncated by the node if greater than 4096 bytes. The total message length across + // all containers will be limited to 12kb. // Defaults to /dev/termination-log. // Cannot be updated. + // +optional optional string terminationMessagePath = 13; + // Indicate how the termination message should be populated. File will use the contents of + // terminationMessagePath to populate the container status message on both success and failure. + // FallbackToLogsOnError will use the last chunk of container log output if the termination + // message file is empty and the container exited with an error. + // The log output is limited to 2048 bytes or 80 lines, whichever is smaller. + // Defaults to File. + // Cannot be updated. + // +optional + optional string terminationMessagePolicy = 20; + // Image pull policy. // One of Always, Never, IfNotPresent. // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. // Cannot be updated. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/images.md#updating-images + // More info: http://kubernetes.io/docs/user-guide/images#updating-images + // +optional optional string imagePullPolicy = 14; // Security options the pod should run with. // More info: http://releases.k8s.io/HEAD/docs/design/security_context.md + // +optional optional SecurityContext securityContext = 15; // Whether this container should allocate a buffer for stdin in the container runtime. If this // is not set, reads from stdin in the container will always result in EOF. // Default is false. + // +optional optional bool stdin = 16; // Whether the container runtime should close the stdin channel after it has been opened by @@ -391,10 +507,12 @@ message Container { // at which time stdin is closed and remains closed until the container is restarted. If this // flag is false, a container processes that reads from stdin will never receive an EOF. // Default is false + // +optional optional bool stdinOnce = 17; // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. // Default is false. + // +optional optional bool tty = 18; } @@ -405,6 +523,7 @@ message ContainerImage { repeated string names = 1; // The size of the image in bytes. + // +optional optional int64 sizeBytes = 2; } @@ -413,12 +532,14 @@ message ContainerPort { // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each // named port in a pod must have a unique name. Name for the port that can be // referred to by services. + // +optional optional string name = 1; // Number of port to expose on the host. // If specified, this must be a valid port number, 0 < x < 65536. // If HostNetwork is specified, this must match ContainerPort. // Most containers do not need this. + // +optional optional int32 hostPort = 2; // Number of port to expose on the pod's IP address. @@ -427,9 +548,11 @@ message ContainerPort { // Protocol for port. Must be UDP or TCP. // Defaults to "TCP". + // +optional optional string protocol = 4; // What host IP to bind the external port to. + // +optional optional string hostIP = 5; } @@ -438,19 +561,23 @@ message ContainerPort { // If none of them is specified, the default one is ContainerStateWaiting. message ContainerState { // Details about a waiting container + // +optional optional ContainerStateWaiting waiting = 1; // Details about a running container + // +optional optional ContainerStateRunning running = 2; // Details about a terminated container + // +optional optional ContainerStateTerminated terminated = 3; } // ContainerStateRunning is a running state of a container. message ContainerStateRunning { // Time at which the container was last (re-)started - optional k8s.io.kubernetes.pkg.api.unversioned.Time startedAt = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 1; } // ContainerStateTerminated is a terminated state of a container. @@ -459,30 +586,38 @@ message ContainerStateTerminated { optional int32 exitCode = 1; // Signal from the last termination of the container + // +optional optional int32 signal = 2; // (brief) reason from the last termination of the container + // +optional optional string reason = 3; // Message regarding the last termination of the container + // +optional optional string message = 4; // Time at which previous execution of the container started - optional k8s.io.kubernetes.pkg.api.unversioned.Time startedAt = 5; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 5; // Time at which the container last terminated - optional k8s.io.kubernetes.pkg.api.unversioned.Time finishedAt = 6; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 6; // Container's ID in the format 'docker://' + // +optional optional string containerID = 7; } // ContainerStateWaiting is a waiting state of a container. message ContainerStateWaiting { // (brief) reason the container is not yet running. + // +optional optional string reason = 1; // Message regarding why the container is not yet running. + // +optional optional string message = 2; } @@ -493,9 +628,11 @@ message ContainerStatus { optional string name = 1; // Details about the container's current condition. + // +optional optional ContainerState state = 2; // Details about the container's last termination condition. + // +optional optional ContainerState lastState = 3; // Specifies whether the container has passed its readiness probe. @@ -508,7 +645,7 @@ message ContainerStatus { optional int32 restartCount = 5; // The image the container is running. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/images.md + // More info: http://kubernetes.io/docs/user-guide/images // TODO(dchen1107): Which image the container is running with? optional string image = 6; @@ -516,7 +653,8 @@ message ContainerStatus { optional string imageID = 7; // Container's ID in the format 'docker://'. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#container-information + // More info: http://kubernetes.io/docs/user-guide/container-environment#container-information + // +optional optional string containerID = 8; } @@ -527,20 +665,43 @@ message DaemonEndpoint { } // DeleteOptions may be provided when deleting an API object +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. +// +k8s:openapi-gen=false message DeleteOptions { // The duration in seconds before the object should be deleted. Value must be non-negative integer. // The value zero indicates delete immediately. If this value is nil, the default grace period for the // specified type will be used. // Defaults to a per object value if not specified. zero means delete immediately. + // +optional optional int64 gracePeriodSeconds = 1; // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be // returned. + // +optional optional Preconditions preconditions = 2; + // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. // Should the dependent objects be orphaned. If true/false, the "orphan" // finalizer will be added to/removed from the object's finalizers list. + // Either this field or PropagationPolicy may be set, but not both. + // +optional optional bool orphanDependents = 3; + + // Whether and how garbage collection will be performed. + // Either this field or OrphanDependents may be set, but not both. + // The default policy is decided by the existing finalizer set in the + // metadata.finalizers and the resource-specific default policy. + // +optional + optional string propagationPolicy = 4; +} + +// Represents downward API info for projecting into a projected volume. +// Note that this is identical to a downwardAPI volume source without the default +// mode. +message DownwardAPIProjection { + // Items is a list of DownwardAPIVolume file + // +optional + repeated DownwardAPIVolumeFile items = 1; } // DownwardAPIVolumeFile represents information to create the file containing the pod field @@ -549,16 +710,19 @@ message DownwardAPIVolumeFile { optional string path = 1; // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + // +optional optional ObjectFieldSelector fieldRef = 2; // Selects a resource of the container: only resources limits and requests // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + // +optional optional ResourceFieldSelector resourceFieldRef = 3; // Optional: mode bits to use on this file, must be a value between 0 // and 0777. If not specified, the volume defaultMode will be used. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. + // +optional optional int32 mode = 4; } @@ -566,6 +730,7 @@ message DownwardAPIVolumeFile { // Downward API volumes support ownership management and SELinux relabeling. message DownwardAPIVolumeSource { // Items is a list of downward API volume file + // +optional repeated DownwardAPIVolumeFile items = 1; // Optional: mode bits to use on created files by default. Must be a @@ -573,6 +738,7 @@ message DownwardAPIVolumeSource { // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. + // +optional optional int32 defaultMode = 2; } @@ -582,7 +748,8 @@ 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir + // +optional optional string medium = 1; } @@ -597,12 +764,15 @@ message EndpointAddress { optional string ip = 1; // The Hostname of this endpoint + // +optional optional string hostname = 3; // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. + // +optional optional string nodeName = 4; // Reference to object providing the endpoint. + // +optional optional ObjectReference targetRef = 2; } @@ -611,6 +781,7 @@ message EndpointPort { // The name of this port (corresponds to ServicePort.Name). // Must be a DNS_LABEL. // Optional only if one port is defined. + // +optional optional string name = 1; // The port number of the endpoint. @@ -619,6 +790,7 @@ message EndpointPort { // The IP protocol for this port. // Must be UDP or TCP. // Default is TCP. + // +optional optional string protocol = 3; } @@ -635,14 +807,17 @@ message EndpointPort { message EndpointSubset { // IP addresses which offer the related ports that are marked as ready. These endpoints // should be considered safe for load balancers and clients to utilize. + // +optional repeated EndpointAddress addresses = 1; // IP addresses which offer the related ports but are not currently marked as ready // because they have not yet finished starting, have recently failed a readiness check, // or have recently failed a liveness check. + // +optional repeated EndpointAddress notReadyAddresses = 2; // Port numbers available on the related IP addresses. + // +optional repeated EndpointPort ports = 3; } @@ -661,7 +836,8 @@ message EndpointSubset { message Endpoints { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The set of all endpoints is the union of all subsets. Addresses are placed into // subsets according to the IPs they share. A single address with multiple ports, @@ -677,12 +853,28 @@ message 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of endpoints. repeated Endpoints items = 2; } +// EnvFromSource represents the source of a set of ConfigMaps +message EnvFromSource { + // An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + // +optional + optional string prefix = 1; + + // The ConfigMap to select from + // +optional + optional ConfigMapEnvSource configMapRef = 2; + + // The Secret to select from + // +optional + optional SecretEnvSource secretRef = 3; +} + // EnvVar represents an environment variable present in a Container. message EnvVar { // Name of the environment variable. Must be a C_IDENTIFIER. @@ -696,9 +888,11 @@ message EnvVar { // references will never be expanded, regardless of whether the variable // exists or not. // Defaults to "". + // +optional optional string value = 2; // Source for the environment variable's value. Cannot be used if value is not empty. + // +optional optional EnvVarSource valueFrom = 3; } @@ -706,16 +900,20 @@ message EnvVar { message EnvVarSource { // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, // spec.nodeName, spec.serviceAccountName, status.podIP. + // +optional optional ObjectFieldSelector fieldRef = 1; // Selects a resource of the container: only resources limits and requests // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + // +optional optional ResourceFieldSelector resourceFieldRef = 2; // Selects a key of a ConfigMap. + // +optional optional ConfigMapKeySelector configMapKeyRef = 3; // Selects a key of a secret in the pod's namespace + // +optional optional SecretKeySelector secretKeyRef = 4; } @@ -724,7 +922,7 @@ message EnvVarSource { message Event { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The object that this event is about. optional ObjectReference involvedObject = 2; @@ -732,25 +930,32 @@ message Event { // This should be a short, machine understandable string that gives the reason // for the transition into the object's current status. // TODO: provide exact specification for format. + // +optional optional string reason = 3; // A human-readable description of the status of this operation. // TODO: decide on maximum length. + // +optional optional string message = 4; // The component reporting this event. Should be a short machine understandable string. + // +optional optional EventSource source = 5; // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) - optional k8s.io.kubernetes.pkg.api.unversioned.Time firstTimestamp = 6; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time firstTimestamp = 6; // The time at which the most recent occurrence of this event was recorded. - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTimestamp = 7; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTimestamp = 7; // The number of times this event has occurred. + // +optional optional int32 count = 8; // Type of this event (Normal, Warning), new types could be added in the future + // +optional optional string type = 9; } @@ -758,7 +963,8 @@ message Event { 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of events repeated Event items = 2; @@ -767,9 +973,11 @@ message EventList { // EventSource contains information for an event. message EventSource { // Component from which the event is generated. + // +optional optional string component = 1; // Node name on which the event is generated. + // +optional optional string host = 2; } @@ -780,18 +988,10 @@ message ExecAction { // not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use // a shell, you need to explicitly call out to that shell. // Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + // +optional repeated string command = 1; } -// 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. @@ -806,10 +1006,12 @@ message FCVolumeSource { // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional optional string fsType = 3; // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. + // +optional optional bool readOnly = 4; } @@ -822,6 +1024,7 @@ message FlexVolumeSource { // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + // +optional optional string fsType = 2; // Optional: SecretRef is reference to the secret object containing @@ -829,21 +1032,31 @@ message FlexVolumeSource { // empty if no secret object is specified. If the secret object // contains more than one secret, all secrets are passed to the plugin // scripts. + // +optional optional LocalObjectReference secretRef = 3; // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. + // +optional optional bool readOnly = 4; // Optional: Extra command options if any. + // +optional map options = 5; } // Represents a Flocker volume mounted by the Flocker agent. +// One and only one of datasetName and datasetUUID should be set. // Flocker volumes do not support ownership management or SELinux relabeling. message FlockerVolumeSource { - // Required: the volume name. This is going to be store on metadata -> name on the payload for Flocker + // Name of the dataset stored as metadata -> name on the dataset for Flocker + // should be considered as deprecated + // +optional optional string datasetName = 1; + + // UUID of the dataset. This is unique identifier of a Flocker dataset + // +optional + optional string datasetUUID = 2; } // Represents a Persistent Disk resource in Google Compute Engine. @@ -854,26 +1067,29 @@ message FlockerVolumeSource { // 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk optional string pdName = 1; // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk + // More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional optional string fsType = 2; // The partition in the volume that you want to mount. // If omitted, the default is to mount by volume name. // Examples: For volume /dev/sda1, you specify the partition as "1". // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk + // More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + // +optional 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + // +optional optional bool readOnly = 4; } @@ -885,12 +1101,14 @@ message GitRepoVolumeSource { optional string repository = 1; // Commit hash for the specified revision. + // +optional optional string revision = 2; // Target directory name. // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the // git repository. Otherwise, if specified, the volume will contain the git repository in // the subdirectory with the given name. + // +optional optional string directory = 3; } @@ -908,28 +1126,33 @@ message GlusterfsVolumeSource { // 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 optional bool readOnly = 3; } // HTTPGetAction describes an action based on HTTP Get requests. message HTTPGetAction { // Path to access on the HTTP server. + // +optional optional string path = 1; // Name or number of the port to access on the container. // Number must be in the range 1 to 65535. // Name must be an IANA_SVC_NAME. - optional k8s.io.kubernetes.pkg.util.intstr.IntOrString port = 2; + optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2; // Host name to connect to, defaults to the pod IP. You probably want to set // "Host" in httpHeaders instead. + // +optional optional string host = 3; // Scheme to use for connecting to the host. // Defaults to HTTP. + // +optional optional string scheme = 4; // Custom headers to set in the request. HTTP allows repeated headers. + // +optional repeated HTTPHeader httpHeaders = 5; } @@ -947,14 +1170,17 @@ message HTTPHeader { message Handler { // One and only one of the following should be specified. // Exec specifies the action to take. + // +optional optional ExecAction exec = 1; // HTTPGet specifies the http request to perform. + // +optional optional HTTPGetAction httpGet = 2; // TCPSocket specifies an action involving a TCP port. // TCP hooks not yet supported // TODO: implement a realistic TCP lifecycle hook + // +optional optional TCPSocketAction tcpSocket = 3; } @@ -962,7 +1188,7 @@ message Handler { // 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#hostpath optional string path = 1; } @@ -981,18 +1207,26 @@ message ISCSIVolumeSource { optional int32 lun = 3; // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. + // +optional optional string iscsiInterface = 4; // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#iscsi + // More info: http://kubernetes.io/docs/user-guide/volumes#iscsi // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional optional string fsType = 5; // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. + // +optional optional bool readOnly = 6; + + // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port + // is other than default (typically TCP ports 860 and 3260). + // +optional + repeated string portals = 7; } // Maps a string key to a path within a volume. @@ -1010,6 +1244,7 @@ message KeyToPath { // and 0777. If not specified, the volume defaultMode will be used. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. + // +optional optional int32 mode = 3; } @@ -1020,7 +1255,8 @@ 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 + // More info: http://kubernetes.io/docs/user-guide/container-environment#hook-details + // +optional optional Handler postStart = 1; // PreStop is called immediately before a container is terminated. @@ -1028,7 +1264,8 @@ message Lifecycle { // 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 + // More info: http://kubernetes.io/docs/user-guide/container-environment#hook-details + // +optional optional Handler preStop = 2; } @@ -1036,39 +1273,48 @@ message Lifecycle { message LimitRange { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the limits enforced. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional LimitRangeSpec spec = 2; } // LimitRangeItem defines a min/max usage limit for any resource that matches on kind. message LimitRangeItem { // Type of resource that this limit applies to. + // +optional optional string type = 1; // Max usage constraints on this kind by resource name. - map max = 2; + // +optional + map max = 2; // Min usage constraints on this kind by resource name. - map min = 3; + // +optional + map min = 3; // Default resource requirement limit value by resource name if resource limit is omitted. - map default = 4; + // +optional + map default = 4; // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. - map defaultRequest = 5; + // +optional + map 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 maxLimitRequestRatio = 6; + // +optional + map 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is a list of LimitRange objects. // More info: http://releases.k8s.io/HEAD/docs/design/admission_control_limit_range.md @@ -1085,31 +1331,43 @@ message LimitRangeSpec { 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of objects - repeated k8s.io.kubernetes.pkg.runtime.RawExtension items = 2; + repeated k8s.io.apimachinery.pkg.runtime.RawExtension items = 2; } // ListOptions is the query options to a standard REST list call. +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. +// +k8s:openapi-gen=false message ListOptions { // A selector to restrict the list of returned objects by their labels. // Defaults to everything. + // +optional optional string labelSelector = 1; // A selector to restrict the list of returned objects by their fields. // Defaults to everything. + // +optional optional string fieldSelector = 2; // Watch for changes to the described resources and return them as a stream of // add, update, and remove notifications. Specify resourceVersion. + // +optional optional bool watch = 3; // When specified with a watch call, shows changes that occur after that particular version of a resource. // Defaults to changes from the beginning of history. + // When specified for list: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + // +optional optional string resourceVersion = 4; // Timeout for the list/watch call. + // +optional optional int64 timeoutSeconds = 5; } @@ -1118,10 +1376,12 @@ message ListOptions { message LoadBalancerIngress { // IP is set for load-balancer ingress points that are IP based // (typically GCE or OpenStack load-balancers) + // +optional optional string ip = 1; // Hostname is set for load-balancer ingress points that are DNS based // (typically AWS load-balancers) + // +optional optional string hostname = 2; } @@ -1129,6 +1389,7 @@ message LoadBalancerIngress { message LoadBalancerStatus { // Ingress is a list containing ingress points for the load-balancer. // Traffic intended for the service should be sent to these ingress points. + // +optional repeated LoadBalancerIngress ingress = 1; } @@ -1136,8 +1397,9 @@ message LoadBalancerStatus { // 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 + // More info: http://kubernetes.io/docs/user-guide/identifiers#names // TODO: Add other useful fields. apiVersion, kind, uid? + // +optional optional string name = 1; } @@ -1145,17 +1407,18 @@ message LocalObjectReference { // 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#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 + // More info: http://kubernetes.io/docs/user-guide/volumes#nfs optional string path = 2; // ReadOnly here will force // the NFS export to be mounted with read-only permissions. // Defaults to false. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs + // More info: http://kubernetes.io/docs/user-guide/volumes#nfs + // +optional optional bool readOnly = 3; } @@ -1164,14 +1427,17 @@ message NFSVolumeSource { message Namespace { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.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 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 optional NamespaceStatus status = 3; } @@ -1179,10 +1445,11 @@ message Namespace { 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.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 + // More info: http://kubernetes.io/docs/user-guide/namespaces repeated Namespace items = 2; } @@ -1190,6 +1457,7 @@ message NamespaceList { 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 + // +optional repeated string finalizers = 1; } @@ -1197,6 +1465,7 @@ message NamespaceSpec { message NamespaceStatus { // Phase is the current lifecycle phase of the namespace. // More info: http://releases.k8s.io/HEAD/docs/design/namespaces.md#phases + // +optional optional string phase = 1; } @@ -1205,16 +1474,19 @@ message NamespaceStatus { message Node { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of a node. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional NodeSpec spec = 2; // Most recently observed status of the node. // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional NodeStatus status = 3; } @@ -1234,6 +1506,7 @@ message NodeAffinity { // If the affinity requirements specified by this field cease to be met // at some point during pod execution (e.g. due to an update), the system // may or may not try to eventually evict the pod from its node. + // +optional optional NodeSelector requiredDuringSchedulingIgnoredDuringExecution = 1; // The scheduler will prefer to schedule pods to nodes that satisfy @@ -1245,6 +1518,7 @@ message NodeAffinity { // compute a sum by iterating through the elements of this field and adding // "weight" to the sum if the node matches the corresponding matchExpressions; the // node(s) with the highest sum are the most preferred. + // +optional repeated PreferredSchedulingTerm preferredDuringSchedulingIgnoredDuringExecution = 2; } @@ -1257,21 +1531,26 @@ message NodeCondition { optional string status = 2; // Last time we got an update on a given condition. - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastHeartbeatTime = 3; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastHeartbeatTime = 3; // Last time the condition transit from one status to another. - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; // (brief) reason for the condition's last transition. + // +optional optional string reason = 5; // Human readable message indicating details about last transition. + // +optional optional string message = 6; } // NodeDaemonEndpoints lists ports opened by daemons running on the Node. message NodeDaemonEndpoints { // Endpoint on which Kubelet is listening. + // +optional optional DaemonEndpoint kubeletEndpoint = 1; } @@ -1279,7 +1558,8 @@ message NodeDaemonEndpoints { 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of nodes repeated Node items = 2; @@ -1288,9 +1568,17 @@ message NodeList { // NodeProxyOptions is the query options to a Node's proxy call. message NodeProxyOptions { // Path is the URL path to use for the current proxy request to node. + // +optional optional string path = 1; } +// NodeResources is an object for conveying resource information about a node. +// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details. +message NodeResources { + // Capacity represents the available resources of a node + map capacity = 1; +} + // A node selector represents the union of the results of one or more label queries // over a set of nodes; that is, it represents the OR of the selectors represented // by the node selector terms. @@ -1314,6 +1602,7 @@ message NodeSelectorRequirement { // the values array must be empty. If the operator is Gt or Lt, the values // array must have a single element, which will be interpreted as an integer. // This array is replaced during a strategic merge patch. + // +optional repeated string values = 3; } @@ -1326,58 +1615,76 @@ message NodeSelectorTerm { // NodeSpec describes the attributes that a node is created with. message NodeSpec { // PodCIDR represents the pod IP range assigned to the node. + // +optional optional string podCIDR = 1; // External ID of the node assigned by some machine database (e.g. a cloud provider). // Deprecated. + // +optional optional string externalID = 2; // ID of the node assigned by the cloud provider in the format: :// + // +optional 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"` + // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration + // +optional optional bool unschedulable = 4; + + // If specified, the node's taints. + // +optional + repeated Taint taints = 5; } // NodeStatus is information about the current status of a node. message NodeStatus { // Capacity represents the total resources of a node. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#capacity for more details. - map capacity = 1; + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#capacity for more details. + // +optional + map capacity = 1; // Allocatable represents the resources of a node that are available for scheduling. // Defaults to Capacity. - map allocatable = 2; + // +optional + map 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 // The field is never populated, and now is deprecated. + // +optional optional string phase = 3; // Conditions is an array of current observed node conditions. // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition + // +optional 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 + // +optional repeated NodeAddress addresses = 5; // Endpoints of daemons running on the Node. + // +optional optional NodeDaemonEndpoints daemonEndpoints = 6; // Set of ids/uuids to uniquely identify the node. // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-info + // +optional optional NodeSystemInfo nodeInfo = 7; // List of container images on this node + // +optional repeated ContainerImage images = 8; // List of attachable volumes in use (mounted) by the node. + // +optional repeated string volumesInUse = 9; // List of volumes that are attached to the node. + // +optional repeated AttachedVolume volumesAttached = 10; } @@ -1421,6 +1728,7 @@ message NodeSystemInfo { // ObjectFieldSelector selects an APIVersioned field of an object. message ObjectFieldSelector { // Version of the schema the FieldPath is written in terms of, defaults to "v1". + // +optional optional string apiVersion = 1; // Path of the field to select in the specified API version. @@ -1429,13 +1737,16 @@ message ObjectFieldSelector { // ObjectMeta is metadata that all persisted resources must have, which includes all objects // users must create. +// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon. +// +k8s:openapi-gen=false message ObjectMeta { // Name must be unique within a namespace. Is required when creating resources, although // some resources may allow a client to request the generation of an appropriate name // automatically. Name is primarily intended for creation idempotence and configuration // definition. // Cannot be updated. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + // +optional optional string name = 1; // GenerateName is an optional prefix, used by the server, to generate a unique @@ -1453,6 +1764,7 @@ message ObjectMeta { // // Applied only if Name is not specified. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency + // +optional optional string generateName = 2; // Namespace defines the space within each name must be unique. An empty namespace is @@ -1462,12 +1774,14 @@ message ObjectMeta { // // Must be a DNS_LABEL. // Cannot be updated. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md + // More info: http://kubernetes.io/docs/user-guide/namespaces + // +optional optional string namespace = 3; // SelfLink is a URL representing this object. // Populated by the system. // Read-only. + // +optional optional string selfLink = 4; // UID is the unique in time and space value for this object. It is typically generated by @@ -1476,7 +1790,8 @@ message ObjectMeta { // // Populated by the system. // Read-only. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional optional string uid = 5; // An opaque value that represents the internal version of this object that can @@ -1489,10 +1804,12 @@ message ObjectMeta { // 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 optional string resourceVersion = 6; // A sequence number representing a specific generation of the desired state. // Populated by the system. Read-only. + // +optional optional int64 generation = 7; // CreationTimestamp is a timestamp representing the server time when this object was @@ -1503,57 +1820,68 @@ message ObjectMeta { // 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time creationTimestamp = 8; // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This // field is set by the server when a graceful deletion is requested by the user, and is not - // directly settable by a client. The resource 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 + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field. Once set, + // this value may not be unset or be set further into the future, although it may be shortened // or the resource may be deleted prior to this time. For example, a user may request that // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination - // signal to the containers in the pod. Once the resource is deleted in the API, the Kubelet - // will send a hard termination signal to the container. + // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard + // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the + // API. In the presence of network partitions, this object may still exist after this + // timestamp, until an administrator or automated process can determine the resource is + // fully terminated. // If not set, graceful deletion of the object has not been requested. // // Populated by the system when a graceful deletion is requested. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.unversioned.Time deletionTimestamp = 9; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deletionTimestamp = 9; // Number of seconds allowed for this object to gracefully terminate before // it will be removed from the system. Only set when deletionTimestamp is also set. // May only be shortened. // Read-only. + // +optional optional int64 deletionGracePeriodSeconds = 10; // Map of string keys and values that can be used to organize and categorize // (scope and select) objects. May match selectors of replication controllers // and services. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md + // More info: http://kubernetes.io/docs/user-guide/labels + // +optional map 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 + // More info: http://kubernetes.io/docs/user-guide/annotations + // +optional map 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; + // +optional + repeated k8s.io.apimachinery.pkg.apis.meta.v1.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. + // +optional repeated string finalizers = 14; // The name of the cluster which the object belongs to. // This is used to distinguish resources with same name and namespace in different clusters. // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + // +optional optional string clusterName = 15; } @@ -1561,25 +1889,31 @@ message ObjectMeta { message ObjectReference { // Kind of the referent. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + // +optional optional string kind = 1; // Namespace of the referent. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md + // More info: http://kubernetes.io/docs/user-guide/namespaces + // +optional optional string namespace = 2; // Name of the referent. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + // +optional optional string name = 3; // UID of the referent. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional optional string uid = 4; // API version of the referent. + // +optional optional string apiVersion = 5; // Specific resourceVersion to which this reference is made, if any. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + // +optional optional string resourceVersion = 6; // If referring to a piece of an object instead of an entire object, this string @@ -1590,49 +1924,30 @@ message ObjectReference { // index 2 in this pod). This syntax is chosen only to have some well-defined way of // referencing a part of an object. // TODO: this design is not final and this field is subject to change in the future. + // +optional optional string fieldPath = 7; } -// 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 +// More info: http://kubernetes.io/docs/user-guide/persistent-volumes message PersistentVolume { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines a specification of a persistent volume owned by the cluster. // Provisioned by an administrator. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistent-volumes + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistent-volumes + // +optional optional PersistentVolumeSpec spec = 2; // Status represents the current information/status for the persistent volume. // Populated by the system. // Read-only. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistent-volumes + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistent-volumes + // +optional optional PersistentVolumeStatus status = 3; } @@ -1640,15 +1955,18 @@ message PersistentVolume { message PersistentVolumeClaim { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired characteristics of a volume requested by a pod author. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + // +optional 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 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + // +optional optional PersistentVolumeClaimStatus status = 3; } @@ -1656,10 +1974,11 @@ message PersistentVolumeClaim { 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // A list of persistent volume claims. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims repeated PersistentVolumeClaim items = 2; } @@ -1667,31 +1986,43 @@ message PersistentVolumeClaimList { // 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 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1 + // +optional repeated string accessModes = 1; // A label query over volumes to consider for binding. - optional k8s.io.kubernetes.pkg.api.unversioned.LabelSelector selector = 4; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.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 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources + // +optional optional ResourceRequirements resources = 2; // VolumeName is the binding reference to the PersistentVolume backing this claim. + // +optional optional string volumeName = 3; + + // Name of the StorageClass required by the claim. + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1 + // +optional + optional string storageClassName = 5; } // PersistentVolumeClaimStatus is the current status of a persistent volume claim. message PersistentVolumeClaimStatus { // Phase represents the current phase of PersistentVolumeClaim. + // +optional optional string phase = 1; // AccessModes contains the actual access modes the volume backing the PVC has. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1 + // +optional repeated string accessModes = 2; // Represents the actual resources of the underlying volume. - map capacity = 3; + // +optional + map capacity = 3; } // PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. @@ -1700,11 +2031,12 @@ message PersistentVolumeClaimStatus { // 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 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims optional string claimName = 1; // Will force the ReadOnly setting in VolumeMounts. // Default false. + // +optional optional bool readOnly = 2; } @@ -1712,10 +2044,11 @@ message PersistentVolumeClaimVolumeSource { 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of persistent volumes. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes repeated PersistentVolume items = 2; } @@ -1724,118 +2057,170 @@ message PersistentVolumeList { 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + // +optional optional GCEPersistentDiskVolumeSource gcePersistentDisk = 1; // AWSElasticBlockStore represents an AWS Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore + // More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + // +optional optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 2; // HostPath represents a directory on the host. // Provisioned by a developer or tester. // This is useful for single-node development and testing only! // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#hostpath + // More info: http://kubernetes.io/docs/user-guide/volumes#hostpath + // +optional optional HostPathVolumeSource hostPath = 3; // Glusterfs represents a Glusterfs volume that is attached to a host and // exposed to the pod. Provisioned by an admin. // More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md + // +optional optional GlusterfsVolumeSource glusterfs = 4; // NFS represents an NFS mount on the host. Provisioned by an admin. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs + // More info: http://kubernetes.io/docs/user-guide/volumes#nfs + // +optional optional NFSVolumeSource nfs = 5; // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md + // +optional optional RBDVolumeSource rbd = 6; // ISCSI represents an ISCSI Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. Provisioned by an admin. + // +optional optional ISCSIVolumeSource iscsi = 7; // Cinder represents a cinder volume attached and mounted on kubelets host machine // More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + // +optional optional CinderVolumeSource cinder = 8; // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + // +optional optional CephFSVolumeSource cephfs = 9; // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + // +optional optional FCVolumeSource fc = 10; // Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running + // +optional optional FlockerVolumeSource flocker = 11; // FlexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. This is an // alpha feature and may change in future. + // +optional optional FlexVolumeSource flexVolume = 12; // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + // +optional optional AzureFileVolumeSource azureFile = 13; // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + // +optional optional VsphereVirtualDiskVolumeSource vsphereVolume = 14; // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + // +optional optional QuobyteVolumeSource quobyte = 15; // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + // +optional optional AzureDiskVolumeSource azureDisk = 16; + + // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 17; + + // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + // +optional + optional PortworxVolumeSource portworxVolume = 18; + + // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // +optional + optional ScaleIOVolumeSource scaleIO = 19; } // 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 capacity = 1; + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#capacity + // +optional + map 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 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes + // +optional repeated string accessModes = 3; // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. // Expected to be non-nil when bound. // claim.VolumeName is the authoritative bind between PV and PVC. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#binding + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#binding + // +optional optional ObjectReference claimRef = 4; // What happens to a persistent volume when released from its claim. // Valid options are Retain (default) and Recycle. // Recycling must be supported by the volume plugin underlying this persistent volume. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#recycling-policy + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy + // +optional optional string persistentVolumeReclaimPolicy = 5; + + // Name of StorageClass to which this persistent volume belongs. Empty value + // means that this volume does not belong to any StorageClass. + // +optional + optional string storageClassName = 6; } // PersistentVolumeStatus is the current status of a persistent volume. message PersistentVolumeStatus { // Phase indicates if a volume is available, bound to a claim, or released by a claim. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#phase + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#phase + // +optional optional string phase = 1; // A human-readable message indicating details about why the volume is in this state. + // +optional optional string message = 2; // Reason is a brief CamelCase string that describes any failure and is meant // for machine parsing and tidy display in the CLI. + // +optional optional string reason = 3; } +// Represents a Photon Controller persistent disk resource. +message PhotonPersistentDiskVolumeSource { + // ID that identifies Photon Controller persistent disk + optional string pdID = 1; + + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + optional string fsType = 2; +} + // Pod is a collection of containers that can run on a host. This resource is created // by clients and scheduled onto hosts. message Pod { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.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 optional PodSpec spec = 2; // Most recently observed status of the pod. @@ -1843,6 +2228,7 @@ message Pod { // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional PodStatus status = 3; } @@ -1856,6 +2242,7 @@ message PodAffinity { // system will try to eventually evict the pod from its node. // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. + // +optional // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` // If the affinity requirements specified by this field are not met at // scheduling time, the pod will not be scheduled onto the node. @@ -1864,6 +2251,7 @@ message PodAffinity { // system may or may not try to eventually evict the pod from its node. // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. + // +optional repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1; // The scheduler will prefer to schedule pods to nodes that satisfy @@ -1875,6 +2263,7 @@ message PodAffinity { // compute a sum by iterating through the elements of this field and adding // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the // node(s) with the highest sum are the most preferred. + // +optional repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2; } @@ -1886,12 +2275,11 @@ message PodAffinity { // 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.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. + // null or empty list means "this pod's namespace" repeated string namespaces = 2; // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching @@ -1901,6 +2289,7 @@ message PodAffinityTerm { // For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" // ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); // for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed. + // +optional optional string topologyKey = 3; } @@ -1914,6 +2303,7 @@ message PodAntiAffinity { // system will try to eventually evict the pod from its node. // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. + // +optional // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` // If the anti-affinity requirements specified by this field are not met at // scheduling time, the pod will not be scheduled onto the node. @@ -1922,6 +2312,7 @@ message PodAntiAffinity { // system may or may not try to eventually evict the pod from its node. // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. + // +optional repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1; // The scheduler will prefer to schedule pods to nodes that satisfy @@ -1933,6 +2324,7 @@ message PodAntiAffinity { // compute a sum by iterating through the elements of this field and adding // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the // node(s) with the highest sum are the most preferred. + // +optional repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2; } @@ -1943,24 +2335,29 @@ message PodAntiAffinity { message PodAttachOptions { // Stdin if true, redirects the standard input stream of the pod for this call. // Defaults to false. + // +optional optional bool stdin = 1; // Stdout if true indicates that stdout is to be redirected for the attach call. // Defaults to true. + // +optional optional bool stdout = 2; // Stderr if true indicates that stderr is to be redirected for the attach call. // Defaults to true. + // +optional optional bool stderr = 3; // TTY if true indicates that a tty will be allocated for the attach call. // This is passed through the container runtime so the tty // is allocated on the worker node by the container runtime. // Defaults to false. + // +optional optional bool tty = 4; // The container in which to execute the command. // Defaults to only container if there is only one container in the pod. + // +optional optional string container = 5; } @@ -1968,24 +2365,28 @@ message PodAttachOptions { 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 + // More info: http://kubernetes.io/docs/user-guide/pod-states#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 + // More info: http://kubernetes.io/docs/user-guide/pod-states#pod-conditions optional string status = 2; // Last time we probed the condition. - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastProbeTime = 3; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3; // Last time the condition transitioned from one status to another. - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; // Unique, one-word, CamelCase reason for the condition's last transition. + // +optional optional string reason = 5; // Human-readable message indicating details about last transition. + // +optional optional string message = 6; } @@ -1996,22 +2397,27 @@ message PodCondition { message PodExecOptions { // Redirect the standard input stream of the pod for this call. // Defaults to false. + // +optional optional bool stdin = 1; // Redirect the standard output stream of the pod for this call. // Defaults to true. + // +optional optional bool stdout = 2; // Redirect the standard error stream of the pod for this call. // Defaults to true. + // +optional optional bool stderr = 3; // TTY if true indicates that a tty will be allocated for the exec call. // Defaults to false. + // +optional optional bool tty = 4; // Container in which to execute the command. // Defaults to only container if there is only one container in the pod. + // +optional optional string container = 5; // Command is the remote command to execute. argv array. Not executed within a shell. @@ -2022,53 +2428,76 @@ message PodExecOptions { 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of pods. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/pods.md + // More info: http://kubernetes.io/docs/user-guide/pods repeated Pod items = 2; } // PodLogOptions is the query options for a Pod's logs REST call. message PodLogOptions { // The container for which to stream logs. Defaults to only container if there is one container in the pod. + // +optional optional string container = 1; // Follow the log stream of the pod. Defaults to false. + // +optional optional bool follow = 2; // Return previous terminated container logs. Defaults to false. + // +optional optional bool previous = 3; // A relative time in seconds before the current time from which to show logs. If this value // precedes the time a pod was started, only logs since the pod start will be returned. // If this value is in the future, no logs will be returned. // Only one of sinceSeconds or sinceTime may be specified. + // +optional optional int64 sinceSeconds = 4; // An RFC3339 timestamp from which to show logs. If this value // precedes the time a pod was started, only logs since the pod start will be returned. // If this value is in the future, no logs will be returned. // Only one of sinceSeconds or sinceTime may be specified. - optional k8s.io.kubernetes.pkg.api.unversioned.Time sinceTime = 5; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 5; // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line // of log output. Defaults to false. + // +optional optional bool timestamps = 6; // If set, the number of lines from the end of the logs to show. If not specified, // logs are shown from the creation of the container or sinceSeconds or sinceTime + // +optional optional int64 tailLines = 7; // If set, the number of bytes to read from the server before terminating the // log output. This may not display a complete final line of logging, and may return // slightly more or slightly less than the specified limit. + // +optional optional int64 limitBytes = 8; } +// PodPortForwardOptions is the query options to a Pod's port forward call +// when using WebSockets. +// The `port` query parameter must specify the port or +// ports (comma separated) to forward over. +// Port forwarding over SPDY does not use these options. It requires the port +// to be passed in the `port` header as part of request. +message PodPortForwardOptions { + // List of ports to forward + // Required when using WebSockets + // +optional + repeated int32 ports = 1; +} + // PodProxyOptions is the query options to a Pod's proxy call. message PodProxyOptions { // Path is the URL path to use for the current proxy request to pod. + // +optional optional string path = 1; } @@ -2081,6 +2510,7 @@ message PodSecurityContext { // container. May also be set in SecurityContext. If set in // both SecurityContext and PodSecurityContext, the value specified in SecurityContext // takes precedence for that container. + // +optional optional SELinuxOptions seLinuxOptions = 1; // The UID to run the entrypoint of the container process. @@ -2088,6 +2518,7 @@ message PodSecurityContext { // May also be set in SecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence // for that container. + // +optional optional int64 runAsUser = 2; // Indicates that the container must run as a non-root user. @@ -2096,11 +2527,13 @@ message PodSecurityContext { // If unset or false, no such validation will be performed. // May also be set in SecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional optional bool runAsNonRoot = 3; // A list of groups applied to the first process run in each container, in addition // to the container's primary GID. If unspecified, no groups will be added to // any container. + // +optional repeated int64 supplementalGroups = 4; // A special supplemental group that applies to all containers in a pod. @@ -2112,6 +2545,7 @@ message PodSecurityContext { // 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. + // +optional optional int64 fsGroup = 5; } @@ -2119,26 +2553,44 @@ message PodSecurityContext { // Exactly one field should be set. message PodSignature { // Reference to controller whose pods should avoid this node. - optional OwnerReference podController = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference podController = 1; } // PodSpec is a description of a pod. message PodSpec { // List of volumes that can be mounted by containers belonging to the pod. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md + // More info: http://kubernetes.io/docs/user-guide/volumes + // +optional repeated Volume volumes = 1; + // List of initialization containers belonging to the pod. + // Init containers are executed in order prior to containers being started. If any + // init container fails, the pod is considered to have failed and is handled according + // to its restartPolicy. The name for an init container or normal container must be + // unique among all containers. + // Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. + // The resourceRequirements of an init container are taken into account during scheduling + // by finding the highest request/limit for each resource type, and then using the max of + // of that value or the sum of the normal containers. Limits are applied to init containers + // in a similar fashion. + // Init containers cannot currently be added or removed. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/containers + repeated Container initContainers = 20; + // List of containers belonging to the pod. // Containers cannot currently be added or removed. // There must be at least one container in a Pod. // Cannot be updated. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/containers.md + // More info: http://kubernetes.io/docs/user-guide/containers 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 + // More info: http://kubernetes.io/docs/user-guide/pod-states#restartpolicy + // +optional optional string restartPolicy = 3; // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. @@ -2148,118 +2600,172 @@ message PodSpec { // a termination signal and the time when the processes are forcibly halted with a kill signal. // Set this value longer than the expected cleanup time for your process. // Defaults to 30 seconds. + // +optional optional int64 terminationGracePeriodSeconds = 4; // Optional duration in seconds the pod may be active on the node relative to // StartTime before the system will actively try to mark it failed and kill associated containers. // Value must be a positive integer. + // +optional optional int64 activeDeadlineSeconds = 5; // Set DNS policy for containers within the pod. - // One of 'ClusterFirst' or 'Default'. + // One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. // Defaults to "ClusterFirst". + // To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. + // +optional optional string dnsPolicy = 6; // NodeSelector is a selector which must be true for the pod to fit on a node. // Selector which must match a node's labels for the pod to be scheduled on that node. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/node-selection/README.md + // More info: http://kubernetes.io/docs/user-guide/node-selection/README + // +optional map 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 optional string serviceAccountName = 8; // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. // Deprecated: Use serviceAccountName instead. // +k8s:conversion-gen=false + // +optional optional string serviceAccount = 9; + // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. + // +optional + optional bool automountServiceAccountToken = 21; + // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, // the scheduler simply schedules this pod onto that node, assuming that it fits resource // requirements. + // +optional optional string nodeName = 10; // Host networking requested for this pod. Use the host's network namespace. // If this option is set, the ports that will be used must be specified. // Default to false. // +k8s:conversion-gen=false + // +optional optional bool hostNetwork = 11; // Use the host's pid namespace. // Optional: Default to false. // +k8s:conversion-gen=false + // +optional optional bool hostPID = 12; // Use the host's ipc namespace. // Optional: Default to false. // +k8s:conversion-gen=false + // +optional optional bool hostIPC = 13; // SecurityContext holds pod-level security attributes and common container settings. // Optional: Defaults to empty. See type description for default values of each field. + // +optional optional PodSecurityContext securityContext = 14; // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. // If specified, these secrets will be passed to individual puller implementations for them to use. For example, // in the case of docker, only DockerConfig type secrets are honored. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/images.md#specifying-imagepullsecrets-on-a-pod + // More info: http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod + // +optional repeated LocalObjectReference imagePullSecrets = 15; // Specifies the hostname of the Pod // If not specified, the pod's hostname will be set to a system-defined value. + // +optional optional string hostname = 16; // If specified, the fully qualified Pod hostname will be "...svc.". // If not specified, the pod will not have a domainname at all. + // +optional optional string subdomain = 17; + + // If specified, the pod's scheduling constraints + // +optional + optional Affinity affinity = 18; + + // If specified, the pod will be dispatched by specified scheduler. + // If not specified, the pod will be dispatched by default scheduler. + // +optional + optional string schedulerName = 19; + + // If specified, the pod's tolerations. + // +optional + repeated Toleration tolerations = 22; } // 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 + // More info: http://kubernetes.io/docs/user-guide/pod-states#pod-phase + // +optional optional string phase = 1; // Current service state of pod. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-conditions + // More info: http://kubernetes.io/docs/user-guide/pod-states#pod-conditions + // +optional repeated PodCondition conditions = 2; // A human readable message indicating details about why the pod is in this condition. + // +optional optional string message = 3; // A brief CamelCase message indicating details about why the pod is in this state. // e.g. 'OutOfDisk' + // +optional optional string reason = 4; // IP address of the host to which the pod is assigned. Empty if not yet scheduled. + // +optional optional string hostIP = 5; // IP address allocated to the pod. Routable at least within the cluster. // Empty if not yet allocated. + // +optional optional string podIP = 6; // RFC 3339 date and time at which the object was acknowledged by the Kubelet. // This is before the Kubelet pulled the container image(s) for the pod. - optional k8s.io.kubernetes.pkg.api.unversioned.Time startTime = 7; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 7; + + // The list has one entry per init container in the manifest. The most recent successful + // init container will have ready = true, the most recently started container will have + // startTime set. + // More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses + repeated ContainerStatus initContainerStatuses = 10; // The list has one entry per container in the manifest. Each entry is currently the output // of `docker inspect`. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-statuses + // More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses + // +optional repeated ContainerStatus containerStatuses = 8; + + // The Quality of Service (QOS) classification assigned to the pod based on resource requirements + // See PodQOSClass type for available QOS classes + // More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md + // +optional + optional string qosClass = 9; } // PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded message PodStatusResult { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Most recently observed status of the pod. // This data may not be up to date. // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional PodStatus status = 2; } @@ -2267,10 +2773,12 @@ message PodStatusResult { message PodTemplate { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.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 optional PodTemplateSpec template = 2; } @@ -2278,7 +2786,8 @@ message PodTemplate { 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of pod templates repeated PodTemplate items = 2; @@ -2288,16 +2797,36 @@ message PodTemplateList { message PodTemplateSpec { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.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 optional PodSpec spec = 2; } +// PortworxVolumeSource represents a Portworx volume resource. +message PortworxVolumeSource { + // VolumeID uniquely identifies a Portworx volume + optional string volumeID = 1; + + // FSType represents the filesystem type to mount + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + optional string fsType = 2; + + // Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // +optional + optional bool readOnly = 3; +} + // Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. +// +k8s:openapi-gen=false message Preconditions { // Specifies the target UID. + // +optional optional string uid = 1; } @@ -2307,12 +2836,15 @@ message PreferAvoidPodsEntry { optional PodSignature podSignature = 1; // Time at which this entry was added to the list. - optional k8s.io.kubernetes.pkg.api.unversioned.Time evictionTime = 2; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time evictionTime = 2; // (brief) reason why this entry was added to the list. + // +optional optional string reason = 3; // Human readable message indicating why this entry was added to the list. + // +optional optional string message = 4; } @@ -2333,27 +2865,46 @@ message Probe { 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 + // More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes + // +optional optional int32 initialDelaySeconds = 2; // Number of seconds after which the probe times out. // Defaults to 1 second. Minimum value is 1. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes + // More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes + // +optional optional int32 timeoutSeconds = 3; // How often (in seconds) to perform the probe. // Default to 10 seconds. Minimum value is 1. + // +optional optional int32 periodSeconds = 4; // Minimum consecutive successes for the probe to be considered successful after having failed. // Defaults to 1. Must be 1 for liveness. Minimum value is 1. + // +optional optional int32 successThreshold = 5; // Minimum consecutive failures for the probe to be considered failed after having succeeded. // Defaults to 3. Minimum value is 1. + // +optional optional int32 failureThreshold = 6; } +// Represents a projected volume source +message ProjectedVolumeSource { + // list of volume projections + repeated VolumeProjection sources = 1; + + // Mode bits to use on created files by default. Must be a value between + // 0 and 0777. + // Directories within the path are not affected by this setting. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + // +optional + optional int32 defaultMode = 2; +} + // Represents a Quobyte mount that lasts the lifetime of a pod. // Quobyte volumes do not support ownership management or SELinux relabeling. message QuobyteVolumeSource { @@ -2367,14 +2918,17 @@ message QuobyteVolumeSource { // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. // Defaults to false. + // +optional optional bool readOnly = 3; // User to map volume access to // Defaults to serivceaccount user + // +optional optional string user = 4; // Group to map volume access to // Default is no group + // +optional optional string group = 5; } @@ -2392,34 +2946,40 @@ message RBDVolumeSource { // 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#rbd // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional optional string fsType = 3; // The rados pool name. // Default is rbd. // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it. + // +optional optional string pool = 4; // The rados user name. // Default is admin. // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + // +optional optional string user = 5; // Keyring is the path to key ring for RBDUser. // Default is /etc/ceph/keyring. // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + // +optional optional string keyring = 6; // SecretRef is name of the authentication secret for RBDUser. If provided // overrides keyring. // Default is nil. // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + // +optional optional LocalObjectReference secretRef = 7; // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + // +optional optional bool readOnly = 8; } @@ -2427,7 +2987,8 @@ message RBDVolumeSource { message RangeAllocation { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Range is string that identifies the range represented by 'data'. optional string range = 2; @@ -2441,10 +3002,12 @@ 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the specification of the desired behavior of the replication controller. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional ReplicationControllerSpec spec = 2; // Status is the most recently observed status of the replication controller. @@ -2452,17 +3015,40 @@ message ReplicationController { // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional ReplicationControllerStatus status = 3; } +// ReplicationControllerCondition describes the state of a replication controller at a certain point. +message ReplicationControllerCondition { + // Type of replication controller condition. + optional string type = 1; + + // Status of the condition, one of True, False, Unknown. + optional string status = 2; + + // The last time the condition transitioned from one status to another. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; + + // The reason for the condition's last transition. + // +optional + optional string reason = 4; + + // A human readable message indicating details about the transition. + // +optional + optional string message = 5; +} + // ReplicationControllerList is a collection of replication controllers. message ReplicationControllerList { // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of replication controllers. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md + // More info: http://kubernetes.io/docs/user-guide/replication-controller repeated ReplicationController items = 2; } @@ -2471,19 +3057,28 @@ 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 + // More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller + // +optional optional int32 replicas = 1; + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + // +optional + optional int32 minReadySeconds = 4; + // Selector is a label query over pods that should match the Replicas count. // If Selector is empty, it is defaulted to the labels present on the Pod template. // Label keys and values that must match in order to be controlled by this replication // controller, if empty defaulted to labels on Pod template. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional map 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 + // More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template + // +optional optional PodTemplateSpec template = 3; } @@ -2491,43 +3086,59 @@ message ReplicationControllerSpec { // 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 + // More info: http://kubernetes.io/docs/user-guide/replication-controller#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 optional int32 fullyLabeledReplicas = 2; // The number of ready replicas for this replication controller. + // +optional optional int32 readyReplicas = 4; + // The number of available replicas (ready for at least minReadySeconds) for this replication controller. + // +optional + optional int32 availableReplicas = 5; + // ObservedGeneration reflects the generation of the most recently observed replication controller. + // +optional optional int64 observedGeneration = 3; + + // Represents the latest available observations of a replication controller's current state. + // +optional + repeated ReplicationControllerCondition conditions = 6; } // ResourceFieldSelector represents container resources (cpu, memory) and their output format message ResourceFieldSelector { // Container name: required for volumes, optional for env vars + // +optional optional string containerName = 1; // Required: resource to select optional string resource = 2; // Specifies the output format of the exposed resources, defaults to "1" - optional k8s.io.kubernetes.pkg.api.resource.Quantity divisor = 3; + // +optional + optional k8s.io.apimachinery.pkg.api.resource.Quantity divisor = 3; } // ResourceQuota sets aggregate quota restrictions enforced per namespace message ResourceQuota { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired quota. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional 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 optional ResourceQuotaStatus status = 3; } @@ -2535,7 +3146,8 @@ message ResourceQuota { 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.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 @@ -2546,10 +3158,12 @@ message ResourceQuotaList { 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 hard = 1; + // +optional + map hard = 1; // A collection of filters that must match each object tracked by a quota. // If not specified, the quota matches all objects. + // +optional repeated string scopes = 2; } @@ -2557,52 +3171,106 @@ message ResourceQuotaSpec { 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 hard = 1; + // +optional + map hard = 1; // Used is the current observed total usage of the resource in the namespace. - map used = 2; + // +optional + map used = 2; } // ResourceRequirements describes the compute resource requirements. message ResourceRequirements { // Limits describes the maximum amount of compute resources allowed. // More info: http://kubernetes.io/docs/user-guide/compute-resources/ - map limits = 1; + // +optional + map 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://kubernetes.io/docs/user-guide/compute-resources/ - map requests = 2; + // +optional + map requests = 2; } // SELinuxOptions are the labels to be applied to the container message SELinuxOptions { // User is a SELinux user label that applies to the container. + // +optional optional string user = 1; // Role is a SELinux role label that applies to the container. + // +optional optional string role = 2; // Type is a SELinux type label that applies to the container. + // +optional optional string type = 3; // Level is SELinux level label that applies to the container. + // +optional optional string level = 4; } +// ScaleIOVolumeSource represents a persistent ScaleIO volume +message ScaleIOVolumeSource { + // The host address of the ScaleIO API Gateway. + optional string gateway = 1; + + // The name of the storage system as configured in ScaleIO. + optional string system = 2; + + // SecretRef references to the secret for ScaleIO user and other + // sensitive information. If this is not provided, Login operation will fail. + optional LocalObjectReference secretRef = 3; + + // Flag to enable/disable SSL communication with Gateway, default false + // +optional + optional bool sslEnabled = 4; + + // The name of the Protection Domain for the configured storage (defaults to "default"). + // +optional + optional string protectionDomain = 5; + + // The Storage Pool associated with the protection domain (defaults to "default"). + // +optional + optional string storagePool = 6; + + // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). + // +optional + optional string storageMode = 7; + + // The name of a volume already created in the ScaleIO system + // that is associated with this volume source. + optional string volumeName = 8; + + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // +optional + optional string fsType = 9; + + // Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // +optional + optional bool readOnly = 10; +} + // Secret holds secret data of a certain type. The total bytes of the values in // the Data field must be less than MaxSecretSize bytes. message Secret { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.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 + // +optional map data = 2; // stringData allows specifying non-binary secret data in string form. @@ -2610,12 +3278,28 @@ message Secret { // All keys and values are merged into the data field on write, overwriting any existing values. // It is never output when reading from the API. // +k8s:conversion-gen=false + // +optional map stringData = 4; // Used to facilitate programmatic handling of secret data. + // +optional optional string type = 3; } +// SecretEnvSource selects a Secret to populate the environment +// variables with. +// +// The contents of the target Secret's Data field will represent the +// key-value pairs as environment variables. +message SecretEnvSource { + // The Secret to select from. + optional LocalObjectReference localObjectReference = 1; + + // Specify whether the Secret must be defined + // +optional + optional bool optional = 2; +} + // SecretKeySelector selects a key of a Secret. message SecretKeySelector { // The name of the secret in the pod's namespace to select from. @@ -2623,19 +3307,48 @@ message SecretKeySelector { // The key of the secret to select from. Must be a valid secret key. optional string key = 2; + + // Specify whether the Secret or it's key must be defined + // +optional + optional bool optional = 3; } // SecretList is a list of Secret. message SecretList { // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is a list of secret objects. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/secrets.md + // More info: http://kubernetes.io/docs/user-guide/secrets repeated Secret items = 2; } +// Adapts a secret into a projected volume. +// +// The contents of the target Secret's Data field will be presented in a +// projected volume as files using the keys in the Data field as the file names. +// Note that this is identical to a secret volume source without the default +// mode. +message SecretProjection { + optional LocalObjectReference localObjectReference = 1; + + // If unspecified, each key-value pair in the Data field of the referenced + // Secret will be projected into the volume as a file whose name is the + // key and content is the value. If specified, the listed keys will be + // projected into the specified paths, and unlisted keys will not be + // present. If a key is specified which is not present in the Secret, + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional + repeated KeyToPath items = 2; + + // Specify whether the Secret or its key must be defined + // +optional + optional bool optional = 4; +} + // Adapts a Secret into a volume. // // The contents of the target Secret's Data field will be presented in a volume @@ -2643,7 +3356,8 @@ message SecretList { // 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#secrets + // +optional optional string secretName = 1; // If unspecified, each key-value pair in the Data field of the referenced @@ -2651,8 +3365,9 @@ message SecretVolumeSource { // 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 '..'. + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional repeated KeyToPath items = 2; // Optional: mode bits to use on created files by default. Must be a @@ -2660,7 +3375,12 @@ message SecretVolumeSource { // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. + // +optional optional int32 defaultMode = 3; + + // Specify whether the Secret or it's keys must be defined + // +optional + optional bool optional = 4; } // SecurityContext holds security configuration that will be applied to a container. @@ -2669,23 +3389,27 @@ message SecretVolumeSource { message SecurityContext { // The capabilities to add/drop when running containers. // Defaults to the default set of capabilities granted by the container runtime. + // +optional optional Capabilities capabilities = 1; // Run container in privileged mode. // Processes in privileged containers are essentially equivalent to root on the host. // Defaults to false. + // +optional optional bool privileged = 2; // The SELinux context to be applied to the container. // If unspecified, the container runtime will allocate a random SELinux context for each // container. May also be set in PodSecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional optional SELinuxOptions seLinuxOptions = 3; // The UID to run the entrypoint of the container process. // Defaults to user specified in image metadata if unspecified. // May also be set in PodSecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional optional int64 runAsUser = 4; // Indicates that the container must run as a non-root user. @@ -2694,16 +3418,19 @@ message SecurityContext { // If unset or false, no such validation will be performed. // May also be set in PodSecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional optional bool runAsNonRoot = 5; // Whether this container has a read-only root filesystem. // Default is false. + // +optional optional bool readOnlyRootFilesystem = 6; } // SerializedReference is a reference to serialized object. message SerializedReference { // The reference to an object in the system. + // +optional optional ObjectReference reference = 1; } @@ -2713,16 +3440,19 @@ message SerializedReference { message Service { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of a service. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional ServiceSpec spec = 2; // Most recently observed status of the service. // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional ServiceStatus status = 3; } @@ -2733,24 +3463,33 @@ message Service { message ServiceAccount { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/secrets.md + // More info: http://kubernetes.io/docs/user-guide/secrets + // +optional 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 + // More info: http://kubernetes.io/docs/user-guide/secrets#manually-specifying-an-imagepullsecret + // +optional repeated LocalObjectReference imagePullSecrets = 3; + + // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. + // Can be overridden at the pod level. + // +optional + optional bool automountServiceAccountToken = 4; } // ServiceAccountList is a list of ServiceAccount objects message ServiceAccountList { // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of ServiceAccounts. // More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md#service-accounts @@ -2761,7 +3500,8 @@ message ServiceAccountList { 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; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of services repeated Service items = 2; @@ -2773,10 +3513,12 @@ message ServicePort { // All ports within a ServiceSpec must have unique names. This maps to // the 'Name' field in EndpointPort objects. // Optional if only one ServicePort is defined on this service. + // +optional optional string name = 1; // The IP protocol for this port. Supports "TCP" and "UDP". // Default is TCP. + // +optional optional string protocol = 2; // The port that will be exposed by this service. @@ -2789,14 +3531,16 @@ message ServicePort { // 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; + // More info: http://kubernetes.io/docs/user-guide/services#defining-a-service + // +optional + optional k8s.io.apimachinery.pkg.util.intstr.IntOrString targetPort = 4; // The port on each node on which this service is exposed when type=NodePort or LoadBalancer. // Usually assigned by the system. If specified, it will be allocated to the service // if unused or else creation of the service will fail. // Default is to auto-allocate a port if the ServiceType of this Service requires one. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#type--nodeport + // More info: http://kubernetes.io/docs/user-guide/services#type--nodeport + // +optional optional int32 nodePort = 5; } @@ -2807,13 +3551,14 @@ message ServiceProxyOptions { // For example, the whole request URL is // http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. // Path is _search?q=user:kimchy. + // +optional optional string path = 1; } // ServiceSpec describes the attributes that a user creates on a service. message ServiceSpec { // The list of ports that are exposed by this service. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies + // More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies repeated ServicePort ports = 1; // Route service traffic to pods with label keys and values matching this @@ -2821,7 +3566,8 @@ message ServiceSpec { // external process managing its endpoints, which Kubernetes will not // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. // Ignored if type is ExternalName. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview + // More info: http://kubernetes.io/docs/user-guide/services#overview + // +optional map selector = 2; // clusterIP is the IP address of the service and is usually assigned @@ -2832,7 +3578,8 @@ message ServiceSpec { // can be specified for headless services when proxying is not required. // Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if // type is ExternalName. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies + // More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies + // +optional optional string clusterIP = 3; // type determines how the Service is exposed. Defaults to ClusterIP. Valid @@ -2848,7 +3595,8 @@ message ServiceSpec { // "LoadBalancer" builds on NodePort and creates an // external load-balancer (if supported in the current cloud) which routes // to the clusterIP. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview + // More info: http://kubernetes.io/docs/user-guide/services#overview + // +optional optional string type = 4; // externalIPs is a list of IP addresses for which nodes in the cluster @@ -2858,6 +3606,7 @@ message ServiceSpec { // 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. + // +optional repeated string externalIPs = 5; // deprecatedPublicIPs is deprecated and replaced by the externalIPs field @@ -2866,13 +3615,15 @@ message ServiceSpec { // any new API revisions. If both deprecatedPublicIPs *and* externalIPs are // set, deprecatedPublicIPs is used. // +k8s:conversion-gen=false + // +optional 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 + // More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies + // +optional optional string sessionAffinity = 7; // Only applies to Service Type: LoadBalancer @@ -2880,17 +3631,20 @@ message ServiceSpec { // This feature depends on whether the underlying cloud-provider supports specifying // the loadBalancerIP when a load balancer is created. // This field will be ignored if the cloud-provider does not support the feature. + // +optional optional string loadBalancerIP = 8; // If specified and supported by the platform, this will restrict traffic through the cloud-provider // load-balancer will be restricted to the specified client IPs. This field will be ignored if the // cloud-provider does not support the feature." - // More info: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md + // More info: http://kubernetes.io/docs/user-guide/services-firewalls + // +optional repeated string loadBalancerSourceRanges = 9; // externalName is the external reference that kubedns or equivalent will // return as a CNAME record for this service. No proxying will be involved. // Must be a valid DNS name and requires Type to be ExternalName. + // +optional optional string externalName = 10; } @@ -2898,15 +3652,22 @@ message ServiceSpec { message ServiceStatus { // LoadBalancer contains the current status of the load-balancer, // if one is present. + // +optional optional LoadBalancerStatus loadBalancer = 1; } +message Sysctl { + optional string name = 1; + + optional string value = 2; +} + // TCPSocketAction describes an action based on opening a socket message TCPSocketAction { // Number or name of the port to access on the container. // Number must be in the range 1 to 65535. // Name must be an IANA_SVC_NAME. - optional k8s.io.kubernetes.pkg.util.intstr.IntOrString port = 1; + optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 1; } // The node this Taint is attached to has the effect "effect" on @@ -2916,40 +3677,58 @@ message Taint { optional string key = 1; // Required. The taint value corresponding to the taint key. + // +optional optional string value = 2; // Required. The effect of the taint on pods // that do not tolerate the taint. - // Valid effects are NoSchedule and PreferNoSchedule. + // Valid effects are NoSchedule, PreferNoSchedule and NoExecute. optional string effect = 3; + + // TimeAdded represents the time at which the taint was added. + // It is only written for NoExecute taints. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time timeAdded = 4; } // The pod this Toleration is attached to tolerates any taint that matches // the triple using the matching operator . message Toleration { - // Required. Key is the taint key that the toleration applies to. + // Key is the taint key that the toleration applies to. Empty means match all taint keys. + // If the key is empty, operator must be Exists; this combination means to match all values and all keys. + // +optional optional string key = 1; - // operator represents a key's relationship to the value. + // Operator represents a key's relationship to the value. // Valid operators are Exists and Equal. Defaults to Equal. // Exists is equivalent to wildcard for value, so that a pod can // tolerate all taints of a particular category. + // +optional optional string operator = 2; // Value is the taint value the toleration matches to. // If the operator is Exists, the value should be empty, otherwise just a regular string. + // +optional optional string value = 3; // Effect indicates the taint effect to match. Empty means match all taint effects. - // When specified, allowed values are NoSchedule and PreferNoSchedule. + // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + // +optional optional string effect = 4; + + // TolerationSeconds represents the period of time the toleration (which must be + // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + // it is not set, which means tolerate the taint forever (do not evict). Zero and + // negative values will be treated as 0 (evict immediately) by the system. + // +optional + optional int64 tolerationSeconds = 5; } // Volume represents a named volume in a pod that may be accessed by any container in the pod. message Volume { // Volume's name. // Must be a DNS_LABEL and unique within the pod. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names + // More info: http://kubernetes.io/docs/user-guide/identifiers#names optional string name = 1; // VolumeSource represents the location and type of the mounted volume. @@ -2965,6 +3744,7 @@ message VolumeMount { // Mounted read-only if true, read-write otherwise (false or unspecified). // Defaults to false. + // +optional optional bool readOnly = 2; // Path within the container at which the volume should be mounted. Must @@ -2973,9 +3753,22 @@ message VolumeMount { // Path within the volume from which the container's volume should be mounted. // Defaults to "" (volume's root). + // +optional optional string subPath = 4; } +// Projection that may be projected along with other supported volume types +message VolumeProjection { + // information about the secret data to project + optional SecretProjection secret = 1; + + // information about the downwardAPI data to project + optional DownwardAPIProjection downwardAPI = 2; + + // information about the configMap data to project + optional ConfigMapProjection configMap = 3; +} + // Represents the source of a volume to mount. // Only one of its members may be specified. message VolumeSource { @@ -2983,90 +3776,126 @@ message VolumeSource { // 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#hostpath // --- // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not // mount host directories as read/write. + // +optional optional HostPathVolumeSource hostPath = 1; // EmptyDir represents a temporary directory that shares a pod's lifetime. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#emptydir + // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir + // +optional optional EmptyDirVolumeSource emptyDir = 2; // GCEPersistentDisk represents a GCE Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk + // More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + // +optional optional GCEPersistentDiskVolumeSource gcePersistentDisk = 3; // AWSElasticBlockStore represents an AWS Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore + // More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + // +optional optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 4; // GitRepo represents a git repository at a particular revision. + // +optional optional GitRepoVolumeSource gitRepo = 5; // Secret represents a secret that should populate this volume. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets + // More info: http://kubernetes.io/docs/user-guide/volumes#secrets + // +optional 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#nfs + // +optional optional NFSVolumeSource nfs = 7; // ISCSI represents an ISCSI Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. // More info: http://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md + // +optional optional ISCSIVolumeSource iscsi = 8; // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. // More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md + // +optional optional GlusterfsVolumeSource glusterfs = 9; // PersistentVolumeClaimVolumeSource represents a reference to a // PersistentVolumeClaim in the same namespace. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + // +optional optional PersistentVolumeClaimVolumeSource persistentVolumeClaim = 10; // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md + // +optional optional RBDVolumeSource rbd = 11; // FlexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. This is an // alpha feature and may change in future. + // +optional optional FlexVolumeSource flexVolume = 12; // Cinder represents a cinder volume attached and mounted on kubelets host machine // More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + // +optional optional CinderVolumeSource cinder = 13; // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + // +optional optional CephFSVolumeSource cephfs = 14; // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + // +optional optional FlockerVolumeSource flocker = 15; // DownwardAPI represents downward API about the pod that should populate this volume + // +optional optional DownwardAPIVolumeSource downwardAPI = 16; // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + // +optional optional FCVolumeSource fc = 17; // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + // +optional optional AzureFileVolumeSource azureFile = 18; // ConfigMap represents a configMap that should populate this volume + // +optional optional ConfigMapVolumeSource configMap = 19; // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + // +optional optional VsphereVirtualDiskVolumeSource vsphereVolume = 20; // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + // +optional optional QuobyteVolumeSource quobyte = 21; // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + // +optional optional AzureDiskVolumeSource azureDisk = 22; + + // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 23; + + // Items for all in one resources secrets, configmaps, and downward API + optional ProjectedVolumeSource projected = 26; + + // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + // +optional + optional PortworxVolumeSource portworxVolume = 24; + + // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // +optional + optional ScaleIOVolumeSource scaleIO = 25; } // Represents a vSphere volume resource. @@ -3077,6 +3906,7 @@ message VsphereVirtualDiskVolumeSource { // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // +optional optional string fsType = 2; } diff --git a/vendor/k8s.io/client-go/pkg/api/v1/helpers.go b/vendor/k8s.io/client-go/pkg/api/v1/helpers.go new file mode 100644 index 000000000..01f4ef470 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/api/v1/helpers.go @@ -0,0 +1,632 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "encoding/json" + "fmt" + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/selection" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/sets" + + "k8s.io/client-go/pkg/api" +) + +// IsOpaqueIntResourceName returns true if the resource name has the opaque +// integer resource prefix. +func IsOpaqueIntResourceName(name ResourceName) bool { + return strings.HasPrefix(string(name), ResourceOpaqueIntPrefix) +} + +// OpaqueIntResourceName returns a ResourceName with the canonical opaque +// integer prefix prepended. If the argument already has the prefix, it is +// returned unmodified. +func OpaqueIntResourceName(name string) ResourceName { + if IsOpaqueIntResourceName(ResourceName(name)) { + return ResourceName(name) + } + return ResourceName(fmt.Sprintf("%s%s", api.ResourceOpaqueIntPrefix, name)) +} + +// NewDeleteOptions returns a DeleteOptions indicating the resource should +// be deleted within the specified grace period. Use zero to indicate +// immediate deletion. If you would prefer to use the default grace period, +// use &metav1.DeleteOptions{} directly. +func NewDeleteOptions(grace int64) *DeleteOptions { + return &DeleteOptions{GracePeriodSeconds: &grace} +} + +// NewPreconditionDeleteOptions returns a DeleteOptions with a UID precondition set. +func NewPreconditionDeleteOptions(uid string) *DeleteOptions { + u := types.UID(uid) + p := Preconditions{UID: &u} + return &DeleteOptions{Preconditions: &p} +} + +// NewUIDPreconditions returns a Preconditions with UID set. +func NewUIDPreconditions(uid string) *Preconditions { + u := types.UID(uid) + return &Preconditions{UID: &u} +} + +// 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 { + // ExternalName services are CNAME aliases to external ones. Ignore the IP. + if service.Spec.Type == ServiceTypeExternalName { + return false + } + return service.Spec.ClusterIP == "" +} + +var standardFinalizers = sets.NewString( + string(FinalizerKubernetes), + metav1.FinalizerOrphanDependents, +) + +func IsStandardFinalizerName(str string) bool { + return standardFinalizers.Has(str) +} + +// AddToNodeAddresses appends the NodeAddresses to the passed-by-pointer slice, +// only if they do not already exist +func AddToNodeAddresses(addresses *[]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) + } + } +} + +// 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 +} + +// 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 selection.Operator + switch expr.Operator { + case NodeSelectorOpIn: + op = selection.In + case NodeSelectorOpNotIn: + op = selection.NotIn + case NodeSelectorOpExists: + op = selection.Exists + case NodeSelectorOpDoesNotExist: + op = selection.DoesNotExist + case NodeSelectorOpGt: + op = selection.GreaterThan + case NodeSelectorOpLt: + op = selection.LessThan + default: + return nil, fmt.Errorf("%q is not a valid node selector operator", expr.Operator) + } + r, err := labels.NewRequirement(expr.Key, op, expr.Values) + if err != nil { + return nil, err + } + selector = selector.Add(*r) + } + return selector, nil +} + +const ( + // SeccompPodAnnotationKey represents the key of a seccomp profile applied + // to all containers of a pod. + SeccompPodAnnotationKey string = "seccomp.security.alpha.kubernetes.io/pod" + + // SeccompContainerAnnotationKeyPrefix represents the key of a seccomp profile applied + // to one container of a pod. + SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/" + + // CreatedByAnnotation represents the key used to store the spec(json) + // used to create the resource. + CreatedByAnnotation = "kubernetes.io/created-by" + + // PreferAvoidPodsAnnotationKey represents the key of preferAvoidPods data (json serialized) + // in the Annotations of a Node. + PreferAvoidPodsAnnotationKey string = "scheduler.alpha.kubernetes.io/preferAvoidPods" + + // SysctlsPodAnnotationKey represents the key of sysctls which are set for the infrastructure + // container of a pod. The annotation value is a comma separated list of sysctl_name=value + // key-value pairs. Only a limited set of whitelisted and isolated sysctls is supported by + // the kubelet. Pods with other sysctls will fail to launch. + SysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/sysctls" + + // UnsafeSysctlsPodAnnotationKey represents the key of sysctls which are set for the infrastructure + // container of a pod. The annotation value is a comma separated list of sysctl_name=value + // key-value pairs. Unsafe sysctls must be explicitly enabled for a kubelet. They are properly + // namespaced to a pod or a container, but their isolation is usually unclear or weak. Their use + // is at-your-own-risk. Pods that attempt to set an unsafe sysctl that is not enabled for a kubelet + // will fail to launch. + UnsafeSysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/unsafe-sysctls" + + // ObjectTTLAnnotations represents a suggestion for kubelet for how long it can cache + // an object (e.g. secret, config map) before fetching it again from apiserver. + // This annotation can be attached to node. + ObjectTTLAnnotationKey string = "node.alpha.kubernetes.io/ttl" + + // AffinityAnnotationKey represents the key of affinity data (json serialized) + // in the Annotations of a Pod. + // TODO: remove when alpha support for affinity is removed + AffinityAnnotationKey string = "scheduler.alpha.kubernetes.io/affinity" +) + +// Tries to add a toleration to annotations list. Returns true if something was updated +// false otherwise. +func AddOrUpdateTolerationInPod(pod *Pod, toleration *Toleration) (bool, error) { + podTolerations := pod.Spec.Tolerations + + var newTolerations []Toleration + updated := false + for i := range podTolerations { + if toleration.MatchToleration(&podTolerations[i]) { + if api.Semantic.DeepEqual(toleration, podTolerations[i]) { + return false, nil + } + newTolerations = append(newTolerations, *toleration) + updated = true + continue + } + + newTolerations = append(newTolerations, podTolerations[i]) + } + + if !updated { + newTolerations = append(newTolerations, *toleration) + } + + pod.Spec.Tolerations = newTolerations + return true, nil +} + +// MatchToleration checks if the toleration matches tolerationToMatch. Tolerations are unique by , +// if the two tolerations have same combination, regard as they match. +// TODO: uniqueness check for tolerations in api validations. +func (t *Toleration) MatchToleration(tolerationToMatch *Toleration) bool { + return t.Key == tolerationToMatch.Key && + t.Effect == tolerationToMatch.Effect && + t.Operator == tolerationToMatch.Operator && + t.Value == tolerationToMatch.Value +} + +// ToleratesTaint checks if the toleration tolerates the taint. +// The matching follows the rules below: +// (1) Empty toleration.effect means to match all taint effects, +// otherwise taint effect must equal to toleration.effect. +// (2) If toleration.operator is 'Exists', it means to match all taint values. +// (3) Empty toleration.key means to match all taint keys. +// If toleration.key is empty, toleration.operator must be 'Exists'; +// this combination means to match all taint values and all taint keys. +func (t *Toleration) ToleratesTaint(taint *Taint) bool { + if len(t.Effect) > 0 && t.Effect != taint.Effect { + return false + } + + if len(t.Key) > 0 && t.Key != taint.Key { + return false + } + + // TODO: Use proper defaulting when Toleration becomes a field of PodSpec + switch t.Operator { + // empty operator means Equal + case "", TolerationOpEqual: + return t.Value == taint.Value + case TolerationOpExists: + return true + default: + return false + } +} + +// TolerationsTolerateTaint checks if taint is tolerated by any of the tolerations. +func TolerationsTolerateTaint(tolerations []Toleration, taint *Taint) bool { + for i := range tolerations { + if tolerations[i].ToleratesTaint(taint) { + return true + } + } + return false +} + +type taintsFilterFunc func(*Taint) bool + +// TolerationsTolerateTaintsWithFilter checks if given tolerations tolerates +// all the taints that apply to the filter in given taint list. +func TolerationsTolerateTaintsWithFilter(tolerations []Toleration, taints []Taint, applyFilter taintsFilterFunc) bool { + if len(taints) == 0 { + return true + } + + for i := range taints { + if applyFilter != nil && !applyFilter(&taints[i]) { + continue + } + + if !TolerationsTolerateTaint(tolerations, &taints[i]) { + return false + } + } + + return true +} + +// DeleteTaintsByKey removes all the taints that have the same key to given taintKey +func DeleteTaintsByKey(taints []Taint, taintKey string) ([]Taint, bool) { + newTaints := []Taint{} + deleted := false + for i := range taints { + if taintKey == taints[i].Key { + deleted = true + continue + } + newTaints = append(newTaints, taints[i]) + } + return newTaints, deleted +} + +// DeleteTaint removes all the the taints that have the same key and effect to given taintToDelete. +func DeleteTaint(taints []Taint, taintToDelete *Taint) ([]Taint, bool) { + newTaints := []Taint{} + deleted := false + for i := range taints { + if taintToDelete.MatchTaint(&taints[i]) { + deleted = true + continue + } + newTaints = append(newTaints, taints[i]) + } + return newTaints, deleted +} + +// Returns true and list of Tolerations matching all Taints if all are tolerated, or false otherwise. +func GetMatchingTolerations(taints []Taint, tolerations []Toleration) (bool, []Toleration) { + if len(taints) == 0 { + return true, []Toleration{} + } + if len(tolerations) == 0 && len(taints) > 0 { + return false, []Toleration{} + } + result := []Toleration{} + for i := range taints { + tolerated := false + for j := range tolerations { + if tolerations[j].ToleratesTaint(&taints[i]) { + result = append(result, tolerations[j]) + tolerated = true + break + } + } + if !tolerated { + return false, []Toleration{} + } + } + return true, result +} + +// MatchTaint checks if the taint matches taintToMatch. Taints are unique by key:effect, +// if the two taints have same key:effect, regard as they match. +func (t *Taint) MatchTaint(taintToMatch *Taint) bool { + return t.Key == taintToMatch.Key && t.Effect == taintToMatch.Effect +} + +// taint.ToString() converts taint struct to string in format key=value:effect or key:effect. +func (t *Taint) ToString() string { + if len(t.Value) == 0 { + return fmt.Sprintf("%v:%v", t.Key, t.Effect) + } + return fmt.Sprintf("%v=%v:%v", t.Key, t.Value, t.Effect) +} + +func GetAvoidPodsFromNodeAnnotations(annotations map[string]string) (AvoidPods, error) { + var avoidPods AvoidPods + if len(annotations) > 0 && annotations[PreferAvoidPodsAnnotationKey] != "" { + err := json.Unmarshal([]byte(annotations[PreferAvoidPodsAnnotationKey]), &avoidPods) + if err != nil { + return avoidPods, err + } + } + return avoidPods, nil +} + +// SysctlsFromPodAnnotations parses the sysctl annotations into a slice of safe Sysctls +// and a slice of unsafe Sysctls. This is only a convenience wrapper around +// SysctlsFromPodAnnotation. +func SysctlsFromPodAnnotations(a map[string]string) ([]Sysctl, []Sysctl, error) { + safe, err := SysctlsFromPodAnnotation(a[SysctlsPodAnnotationKey]) + if err != nil { + return nil, nil, err + } + unsafe, err := SysctlsFromPodAnnotation(a[UnsafeSysctlsPodAnnotationKey]) + if err != nil { + return nil, nil, err + } + + return safe, unsafe, nil +} + +// SysctlsFromPodAnnotation parses an annotation value into a slice of Sysctls. +func SysctlsFromPodAnnotation(annotation string) ([]Sysctl, error) { + if len(annotation) == 0 { + return nil, nil + } + + kvs := strings.Split(annotation, ",") + sysctls := make([]Sysctl, len(kvs)) + for i, kv := range kvs { + cs := strings.Split(kv, "=") + if len(cs) != 2 || len(cs[0]) == 0 { + return nil, fmt.Errorf("sysctl %q not of the format sysctl_name=value", kv) + } + sysctls[i].Name = cs[0] + sysctls[i].Value = cs[1] + } + return sysctls, nil +} + +// PodAnnotationsFromSysctls creates an annotation value for a slice of Sysctls. +func PodAnnotationsFromSysctls(sysctls []Sysctl) string { + if len(sysctls) == 0 { + return "" + } + + kvs := make([]string, len(sysctls)) + for i := range sysctls { + kvs[i] = fmt.Sprintf("%s=%s", sysctls[i].Name, sysctls[i].Value) + } + return strings.Join(kvs, ",") +} + +type Sysctl struct { + Name string `protobuf:"bytes,1,opt,name=name"` + Value string `protobuf:"bytes,2,opt,name=value"` +} + +// NodeResources is an object for conveying resource information about a node. +// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details. +type NodeResources struct { + // Capacity represents the available resources of a node + Capacity ResourceList `protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` +} + +// Tries to add a taint to annotations list. Returns a new copy of updated Node and true if something was updated +// false otherwise. +func AddOrUpdateTaint(node *Node, taint *Taint) (*Node, bool, error) { + objCopy, err := api.Scheme.DeepCopy(node) + if err != nil { + return nil, false, err + } + newNode := objCopy.(*Node) + nodeTaints := newNode.Spec.Taints + + var newTaints []Taint + updated := false + for i := range nodeTaints { + if taint.MatchTaint(&nodeTaints[i]) { + if api.Semantic.DeepEqual(taint, nodeTaints[i]) { + return newNode, false, nil + } + newTaints = append(newTaints, *taint) + updated = true + continue + } + + newTaints = append(newTaints, nodeTaints[i]) + } + + if !updated { + newTaints = append(newTaints, *taint) + } + + newNode.Spec.Taints = newTaints + return newNode, true, nil +} + +func TaintExists(taints []Taint, taintToFind *Taint) bool { + for _, taint := range taints { + if taint.MatchTaint(taintToFind) { + return true + } + } + return false +} + +// Tries to remove a taint from annotations list. Returns a new copy of updated Node and true if something was updated +// false otherwise. +func RemoveTaint(node *Node, taint *Taint) (*Node, bool, error) { + objCopy, err := api.Scheme.DeepCopy(node) + if err != nil { + return nil, false, err + } + newNode := objCopy.(*Node) + nodeTaints := newNode.Spec.Taints + if len(nodeTaints) == 0 { + return newNode, false, nil + } + + if !TaintExists(nodeTaints, taint) { + return newNode, false, nil + } + + newTaints, _ := DeleteTaint(nodeTaints, taint) + newNode.Spec.Taints = newTaints + return newNode, true, nil +} + +// GetAffinityFromPodAnnotations gets the json serialized affinity data from Pod.Annotations +// and converts it to the Affinity type in api. +// TODO: remove when alpha support for affinity is removed +func GetAffinityFromPodAnnotations(annotations map[string]string) (*Affinity, error) { + if len(annotations) > 0 && annotations[AffinityAnnotationKey] != "" { + var affinity Affinity + err := json.Unmarshal([]byte(annotations[AffinityAnnotationKey]), &affinity) + if err != nil { + return nil, err + } + return &affinity, nil + } + return nil, nil +} + +// GetPersistentVolumeClass returns StorageClassName. +func GetPersistentVolumeClass(volume *PersistentVolume) string { + // Use beta annotation first + if class, found := volume.Annotations[BetaStorageClassAnnotation]; found { + return class + } + + return volume.Spec.StorageClassName +} + +// GetPersistentVolumeClaimClass returns StorageClassName. If no storage class was +// requested, it returns "". +func GetPersistentVolumeClaimClass(claim *PersistentVolumeClaim) string { + // Use beta annotation first + if class, found := claim.Annotations[BetaStorageClassAnnotation]; found { + return class + } + + if claim.Spec.StorageClassName != nil { + return *claim.Spec.StorageClassName + } + + return "" +} + +// PersistentVolumeClaimHasClass returns true if given claim has set StorageClassName field. +func PersistentVolumeClaimHasClass(claim *PersistentVolumeClaim) bool { + // Use beta annotation first + if _, found := claim.Annotations[BetaStorageClassAnnotation]; found { + return true + } + + if claim.Spec.StorageClassName != nil { + return true + } + + return false +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/v1/meta.go b/vendor/k8s.io/client-go/pkg/api/v1/meta.go similarity index 52% rename from vendor/k8s.io/client-go/1.5/pkg/api/v1/meta.go rename to vendor/k8s.io/client-go/pkg/api/v1/meta.go index 3bde633b5..bb1ae2ff7 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/v1/meta.go +++ b/vendor/k8s.io/client-go/pkg/api/v1/meta.go @@ -17,34 +17,32 @@ limitations under the License. package v1 import ( - "k8s.io/client-go/1.5/pkg/api/meta" - "k8s.io/client-go/1.5/pkg/api/meta/metatypes" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/types" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" ) -func (obj *ObjectMeta) GetObjectMeta() meta.Object { return obj } +func (obj *ObjectMeta) GetObjectMeta() metav1.Object { return obj } -// Namespace implements meta.Object for any object with an ObjectMeta typed field. Allows +// Namespace implements metav1.Object for any object with an ObjectMeta typed field. Allows // fast, direct access to metadata fields for API objects. -func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } -func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } -func (meta *ObjectMeta) GetName() string { return meta.Name } -func (meta *ObjectMeta) SetName(name string) { meta.Name = name } -func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName } -func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName } -func (meta *ObjectMeta) GetUID() types.UID { return meta.UID } -func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid } -func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion } -func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } -func (meta *ObjectMeta) 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) { +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() metav1.Time { return meta.CreationTimestamp } +func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp metav1.Time) { meta.CreationTimestamp = creationTimestamp } -func (meta *ObjectMeta) GetDeletionTimestamp() *unversioned.Time { return meta.DeletionTimestamp } -func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *unversioned.Time) { +func (meta *ObjectMeta) GetDeletionTimestamp() *metav1.Time { return meta.DeletionTimestamp } +func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *metav1.Time) { meta.DeletionTimestamp = deletionTimestamp } func (meta *ObjectMeta) GetLabels() map[string]string { return meta.Labels } @@ -54,8 +52,8 @@ func (meta *ObjectMeta) SetAnnotations(annotations map[string]string) { meta.Ann 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)) +func (meta *ObjectMeta) GetOwnerReferences() []metav1.OwnerReference { + ret := make([]metav1.OwnerReference, len(meta.OwnerReferences)) for i := 0; i < len(meta.OwnerReferences); i++ { ret[i].Kind = meta.OwnerReferences[i].Kind ret[i].Name = meta.OwnerReferences[i].Name @@ -65,12 +63,16 @@ func (meta *ObjectMeta) GetOwnerReferences() []metatypes.OwnerReference { value := *meta.OwnerReferences[i].Controller ret[i].Controller = &value } + if meta.OwnerReferences[i].BlockOwnerDeletion != nil { + value := *meta.OwnerReferences[i].BlockOwnerDeletion + ret[i].BlockOwnerDeletion = &value + } } return ret } -func (meta *ObjectMeta) SetOwnerReferences(references []metatypes.OwnerReference) { - newReferences := make([]OwnerReference, len(references)) +func (meta *ObjectMeta) SetOwnerReferences(references []metav1.OwnerReference) { + newReferences := make([]metav1.OwnerReference, len(references)) for i := 0; i < len(references); i++ { newReferences[i].Kind = references[i].Kind newReferences[i].Name = references[i].Name @@ -80,6 +82,10 @@ func (meta *ObjectMeta) SetOwnerReferences(references []metatypes.OwnerReference value := *references[i].Controller newReferences[i].Controller = &value } + if references[i].BlockOwnerDeletion != nil { + value := *references[i].BlockOwnerDeletion + newReferences[i].BlockOwnerDeletion = &value + } } meta.OwnerReferences = newReferences } diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/v1/ref.go b/vendor/k8s.io/client-go/pkg/api/v1/ref.go similarity index 82% rename from vendor/k8s.io/client-go/1.5/pkg/api/v1/ref.go rename to vendor/k8s.io/client-go/pkg/api/v1/ref.go index 93007e8ca..5d33719fe 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/v1/ref.go +++ b/vendor/k8s.io/client-go/pkg/api/v1/ref.go @@ -19,13 +19,13 @@ package v1 import ( "errors" "fmt" - "k8s.io/client-go/1.5/pkg/api" "net/url" "strings" - "k8s.io/client-go/1.5/pkg/api/meta" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" ) var ( @@ -38,7 +38,7 @@ var ( // 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) { +func GetReference(scheme *runtime.Scheme, obj runtime.Object) (*ObjectReference, error) { if obj == nil { return nil, ErrNilObject } @@ -54,7 +54,7 @@ func GetReference(obj runtime.Object) (*ObjectReference, error) { kind := gvk.Kind if len(kind) == 0 { // TODO: this is wrong - gvks, _, err := api.Scheme.ObjectKinds(obj) + gvks, _, err := scheme.ObjectKinds(obj) if err != nil { return nil, err } @@ -112,8 +112,8 @@ func GetReference(obj runtime.Object) (*ObjectReference, error) { } // 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) +func GetPartialReference(scheme *runtime.Scheme, obj runtime.Object, fieldPath string) (*ObjectReference, error) { + ref, err := GetReference(scheme, obj) if err != nil { return nil, err } @@ -123,11 +123,11 @@ func GetPartialReference(obj runtime.Object, fieldPath string) (*ObjectReference // 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) { +func (obj *ObjectReference) SetGroupVersionKind(gvk schema.GroupVersionKind) { obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() } -func (obj *ObjectReference) GroupVersionKind() unversioned.GroupVersionKind { - return unversioned.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) +func (obj *ObjectReference) GroupVersionKind() schema.GroupVersionKind { + return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) } -func (obj *ObjectReference) GetObjectKind() unversioned.ObjectKind { return obj } +func (obj *ObjectReference) GetObjectKind() schema.ObjectKind { return obj } diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/v1/register.go b/vendor/k8s.io/client-go/pkg/api/v1/register.go similarity index 78% rename from vendor/k8s.io/client-go/1.5/pkg/api/v1/register.go rename to vendor/k8s.io/client-go/pkg/api/v1/register.go index 67a23345d..5c2dfddd1 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/v1/register.go +++ b/vendor/k8s.io/client-go/pkg/api/v1/register.go @@ -17,16 +17,21 @@ limitations under the License. package v1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" - versionedwatch "k8s.io/client-go/1.5/pkg/watch/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs, addFastPathConversionFuncs) @@ -69,12 +74,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PersistentVolumeList{}, &PersistentVolumeClaim{}, &PersistentVolumeClaimList{}, - &DeleteOptions{}, - &ExportOptions{}, - &ListOptions{}, &PodAttachOptions{}, &PodLogOptions{}, &PodExecOptions{}, + &PodPortForwardOptions{}, &PodProxyOptions{}, &ComponentStatus{}, &ComponentStatusList{}, @@ -85,9 +88,9 @@ func addKnownTypes(scheme *runtime.Scheme) error { ) // Add common types - scheme.AddKnownTypes(SchemeGroupVersion, &unversioned.Status{}) + scheme.AddKnownTypes(SchemeGroupVersion, &metav1.Status{}) // Add the watch version that applies - versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/client-go/pkg/api/v1/resource_helpers.go b/vendor/k8s.io/client-go/pkg/api/v1/resource_helpers.go new file mode 100644 index 000000000..ec8423276 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/api/v1/resource_helpers.go @@ -0,0 +1,257 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "time" + + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// 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{} +} + +// IsPodAvailable returns true if a pod is available; false otherwise. +// Precondition for an available pod is that it must be ready. On top +// of that, there are two cases when a pod can be considered available: +// 1. minReadySeconds == 0, or +// 2. LastTransitionTime (is set) + minReadySeconds < current time +func IsPodAvailable(pod *Pod, minReadySeconds int32, now metav1.Time) bool { + if !IsPodReady(pod) { + return false + } + + c := GetPodReadyCondition(pod.Status) + minReadySecondsDuration := time.Duration(minReadySeconds) * time.Second + if minReadySeconds == 0 || !c.LastTransitionTime.IsZero() && c.LastTransitionTime.Add(minReadySecondsDuration).Before(now.Time) { + return true + } + return false +} + +// IsPodReady returns true if a pod is ready; false otherwise. +func IsPodReady(pod *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 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 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 = metav1.Now() + // Try to find this pod condition. + conditionIndex, oldCondition := GetPodCondition(status, condition.Type) + + if oldCondition == nil { + // We are adding new pod condition. + status.Conditions = append(status.Conditions, *condition) + return true + } else { + // We are updating an existing condition, so we need to check if it has changed. + if condition.Status == oldCondition.Status { + condition.LastTransitionTime = oldCondition.LastTransitionTime + } + + isEqual := condition.Status == oldCondition.Status && + condition.Reason == oldCondition.Reason && + condition.Message == oldCondition.Message && + condition.LastProbeTime.Equal(oldCondition.LastProbeTime) && + condition.LastTransitionTime.Equal(oldCondition.LastTransitionTime) + + status.Conditions[conditionIndex] = *condition + // Return true if one of the fields have changed. + return !isEqual + } +} + +// 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 +} + +// finds and returns the request for a specific resource. +func GetResourceRequest(pod *Pod, resource ResourceName) int64 { + if resource == ResourcePods { + return 1 + } + totalResources := int64(0) + for _, container := range pod.Spec.Containers { + if rQuantity, ok := container.Resources.Requests[resource]; ok { + if resource == ResourceCPU { + totalResources += rQuantity.MilliValue() + } else { + totalResources += rQuantity.Value() + } + } + } + // take max_resource(sum_pod, any_init_container) + for _, container := range pod.Spec.InitContainers { + if rQuantity, ok := container.Resources.Requests[resource]; ok { + if resource == ResourceCPU && rQuantity.MilliValue() > totalResources { + totalResources = rQuantity.MilliValue() + } else if rQuantity.Value() > totalResources { + totalResources = rQuantity.Value() + } + } + } + return totalResources +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/types.generated.go b/vendor/k8s.io/client-go/pkg/api/v1/types.generated.go similarity index 55% rename from vendor/k8s.io/client-go/1.5/pkg/api/types.generated.go rename to vendor/k8s.io/client-go/pkg/api/v1/types.generated.go index bb4c8e573..c6fd805aa 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/types.generated.go +++ b/vendor/k8s.io/client-go/pkg/api/v1/types.generated.go @@ -19,19 +19,17 @@ limitations under the License. // THIS FILE IS AUTO-GENERATED BY codecgen. // ************************************************************ -package api +package v1 import ( "errors" "fmt" codec1978 "github.com/ugorji/go/codec" - pkg3_resource "k8s.io/client-go/1.5/pkg/api/resource" - pkg2_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg6_fields "k8s.io/client-go/1.5/pkg/fields" - pkg5_labels "k8s.io/client-go/1.5/pkg/labels" - pkg7_runtime "k8s.io/client-go/1.5/pkg/runtime" - pkg1_types "k8s.io/client-go/1.5/pkg/types" - pkg4_intstr "k8s.io/client-go/1.5/pkg/util/intstr" + pkg3_resource "k8s.io/apimachinery/pkg/api/resource" + pkg2_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg5_runtime "k8s.io/apimachinery/pkg/runtime" + pkg1_types "k8s.io/apimachinery/pkg/types" + pkg4_intstr "k8s.io/apimachinery/pkg/util/intstr" "reflect" "runtime" time "time" @@ -68,14 +66,12 @@ func init() { } 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 + var v1 pkg2_v1.Time + var v2 pkg5_runtime.RawExtension + var v3 pkg1_types.UID + var v4 pkg4_intstr.IntOrString + var v5 time.Time + _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 } } @@ -492,7 +488,7 @@ func (x *ObjectMeta) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym44 if false { } else { - h.encSliceOwnerReference(([]OwnerReference)(x.OwnerReferences), e) + h.encSlicev1_OwnerReference(([]pkg2_v1.OwnerReference)(x.OwnerReferences), e) } } } else { @@ -510,7 +506,7 @@ func (x *ObjectMeta) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym45 if false { } else { - h.encSliceOwnerReference(([]OwnerReference)(x.OwnerReferences), e) + h.encSlicev1_OwnerReference(([]pkg2_v1.OwnerReference)(x.OwnerReferences), e) } } } @@ -586,25 +582,25 @@ func (x *ObjectMeta) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym52 := z.DecBinary() - _ = yym52 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct53 := r.ContainerType() - if yyct53 == codecSelferValueTypeMap1234 { - yyl53 := r.ReadMapStart() - if yyl53 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl53, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct53 == codecSelferValueTypeArray1234 { - yyl53 := r.ReadArrayStart() - if yyl53 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl53, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -616,12 +612,12 @@ func (x *ObjectMeta) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys54Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys54Slc - var yyhl54 bool = l >= 0 - for yyj54 := 0; ; yyj54++ { - if yyhl54 { - if yyj54 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -630,67 +626,110 @@ func (x *ObjectMeta) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys54Slc = r.DecodeBytes(yys54Slc, true, true) - yys54 := string(yys54Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys54 { + switch yys3 { case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "generateName": if r.TryDecodeAsNil() { x.GenerateName = "" } else { - x.GenerateName = string(r.DecodeString()) + yyv6 := &x.GenerateName + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "namespace": if r.TryDecodeAsNil() { x.Namespace = "" } else { - x.Namespace = string(r.DecodeString()) + yyv8 := &x.Namespace + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } case "selfLink": if r.TryDecodeAsNil() { x.SelfLink = "" } else { - x.SelfLink = string(r.DecodeString()) + yyv10 := &x.SelfLink + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } case "uid": if r.TryDecodeAsNil() { x.UID = "" } else { - x.UID = pkg1_types.UID(r.DecodeString()) + yyv12 := &x.UID + yym13 := z.DecBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.DecExt(yyv12) { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } case "resourceVersion": if r.TryDecodeAsNil() { x.ResourceVersion = "" } else { - x.ResourceVersion = string(r.DecodeString()) + yyv14 := &x.ResourceVersion + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } case "generation": if r.TryDecodeAsNil() { x.Generation = 0 } else { - x.Generation = int64(r.DecodeInt(64)) + yyv16 := &x.Generation + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*int64)(yyv16)) = int64(r.DecodeInt(64)) + } } case "creationTimestamp": if r.TryDecodeAsNil() { - x.CreationTimestamp = pkg2_unversioned.Time{} + x.CreationTimestamp = pkg2_v1.Time{} } else { - yyv62 := &x.CreationTimestamp - yym63 := z.DecBinary() - _ = yym63 + yyv18 := &x.CreationTimestamp + yym19 := z.DecBinary() + _ = yym19 if false { - } else if z.HasExtensions() && z.DecExt(yyv62) { - } else if yym63 { - z.DecBinaryUnmarshal(yyv62) - } else if !yym63 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv62) + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else if yym19 { + z.DecBinaryUnmarshal(yyv18) + } else if !yym19 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv18) } else { - z.DecFallback(yyv62, false) + z.DecFallback(yyv18, false) } } case "deletionTimestamp": @@ -700,15 +739,15 @@ func (x *ObjectMeta) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } else { if x.DeletionTimestamp == nil { - x.DeletionTimestamp = new(pkg2_unversioned.Time) + x.DeletionTimestamp = new(pkg2_v1.Time) } - yym65 := z.DecBinary() - _ = yym65 + yym21 := z.DecBinary() + _ = yym21 if false { } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) { - } else if yym65 { + } else if yym21 { z.DecBinaryUnmarshal(x.DeletionTimestamp) - } else if !yym65 && z.IsJSONHandle() { + } else if !yym21 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.DeletionTimestamp) } else { z.DecFallback(x.DeletionTimestamp, false) @@ -723,8 +762,8 @@ func (x *ObjectMeta) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.DeletionGracePeriodSeconds == nil { x.DeletionGracePeriodSeconds = new(int64) } - yym67 := z.DecBinary() - _ = yym67 + yym23 := z.DecBinary() + _ = yym23 if false { } else { *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64)) @@ -734,60 +773,66 @@ func (x *ObjectMeta) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Labels = nil } else { - yyv68 := &x.Labels - yym69 := z.DecBinary() - _ = yym69 + yyv24 := &x.Labels + yym25 := z.DecBinary() + _ = yym25 if false { } else { - z.F.DecMapStringStringX(yyv68, false, d) + z.F.DecMapStringStringX(yyv24, false, d) } } case "annotations": if r.TryDecodeAsNil() { x.Annotations = nil } else { - yyv70 := &x.Annotations - yym71 := z.DecBinary() - _ = yym71 + yyv26 := &x.Annotations + yym27 := z.DecBinary() + _ = yym27 if false { } else { - z.F.DecMapStringStringX(yyv70, false, d) + z.F.DecMapStringStringX(yyv26, false, d) } } case "ownerReferences": if r.TryDecodeAsNil() { x.OwnerReferences = nil } else { - yyv72 := &x.OwnerReferences - yym73 := z.DecBinary() - _ = yym73 + yyv28 := &x.OwnerReferences + yym29 := z.DecBinary() + _ = yym29 if false { } else { - h.decSliceOwnerReference((*[]OwnerReference)(yyv72), d) + h.decSlicev1_OwnerReference((*[]pkg2_v1.OwnerReference)(yyv28), d) } } case "finalizers": if r.TryDecodeAsNil() { x.Finalizers = nil } else { - yyv74 := &x.Finalizers - yym75 := z.DecBinary() - _ = yym75 + yyv30 := &x.Finalizers + yym31 := z.DecBinary() + _ = yym31 if false { } else { - z.F.DecSliceStringX(yyv74, false, d) + z.F.DecSliceStringX(yyv30, false, d) } } case "clusterName": if r.TryDecodeAsNil() { x.ClusterName = "" } else { - x.ClusterName = string(r.DecodeString()) + yyv32 := &x.ClusterName + yym33 := z.DecBinary() + _ = yym33 + if false { + } else { + *((*string)(yyv32)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys54) - } // end switch yys54 - } // end for yyj54 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -795,16 +840,16 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj77 int - var yyb77 bool - var yyhl77 bool = l >= 0 - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + var yyj34 int + var yyb34 bool + var yyhl34 bool = l >= 0 + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -812,15 +857,21 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv35 := &x.Name + yym36 := z.DecBinary() + _ = yym36 + if false { + } else { + *((*string)(yyv35)) = r.DecodeString() + } } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -828,15 +879,21 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.GenerateName = "" } else { - x.GenerateName = string(r.DecodeString()) + yyv37 := &x.GenerateName + yym38 := z.DecBinary() + _ = yym38 + if false { + } else { + *((*string)(yyv37)) = r.DecodeString() + } } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -844,15 +901,21 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Namespace = "" } else { - x.Namespace = string(r.DecodeString()) + yyv39 := &x.Namespace + yym40 := z.DecBinary() + _ = yym40 + if false { + } else { + *((*string)(yyv39)) = r.DecodeString() + } } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -860,15 +923,21 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.SelfLink = "" } else { - x.SelfLink = string(r.DecodeString()) + yyv41 := &x.SelfLink + yym42 := z.DecBinary() + _ = yym42 + if false { + } else { + *((*string)(yyv41)) = r.DecodeString() + } } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -876,15 +945,22 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.UID = "" } else { - x.UID = pkg1_types.UID(r.DecodeString()) + yyv43 := &x.UID + yym44 := z.DecBinary() + _ = yym44 + if false { + } else if z.HasExtensions() && z.DecExt(yyv43) { + } else { + *((*string)(yyv43)) = r.DecodeString() + } } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -892,15 +968,21 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ResourceVersion = "" } else { - x.ResourceVersion = string(r.DecodeString()) + yyv45 := &x.ResourceVersion + yym46 := z.DecBinary() + _ = yym46 + if false { + } else { + *((*string)(yyv45)) = r.DecodeString() + } } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -908,42 +990,48 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Generation = 0 } else { - x.Generation = int64(r.DecodeInt(64)) + yyv47 := &x.Generation + yym48 := z.DecBinary() + _ = yym48 + if false { + } else { + *((*int64)(yyv47)) = int64(r.DecodeInt(64)) + } } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.CreationTimestamp = pkg2_unversioned.Time{} + x.CreationTimestamp = pkg2_v1.Time{} } else { - yyv85 := &x.CreationTimestamp - yym86 := z.DecBinary() - _ = yym86 + yyv49 := &x.CreationTimestamp + yym50 := z.DecBinary() + _ = yym50 if false { - } else if z.HasExtensions() && z.DecExt(yyv85) { - } else if yym86 { - z.DecBinaryUnmarshal(yyv85) - } else if !yym86 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv85) + } else if z.HasExtensions() && z.DecExt(yyv49) { + } else if yym50 { + z.DecBinaryUnmarshal(yyv49) + } else if !yym50 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv49) } else { - z.DecFallback(yyv85, false) + z.DecFallback(yyv49, false) } } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -954,27 +1042,27 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } } else { if x.DeletionTimestamp == nil { - x.DeletionTimestamp = new(pkg2_unversioned.Time) + x.DeletionTimestamp = new(pkg2_v1.Time) } - yym88 := z.DecBinary() - _ = yym88 + yym52 := z.DecBinary() + _ = yym52 if false { } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) { - } else if yym88 { + } else if yym52 { z.DecBinaryUnmarshal(x.DeletionTimestamp) - } else if !yym88 && z.IsJSONHandle() { + } else if !yym52 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.DeletionTimestamp) } else { z.DecFallback(x.DeletionTimestamp, false) } } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -987,20 +1075,20 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.DeletionGracePeriodSeconds == nil { x.DeletionGracePeriodSeconds = new(int64) } - yym90 := z.DecBinary() - _ = yym90 + yym54 := z.DecBinary() + _ = yym54 if false { } else { *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64)) } } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1008,21 +1096,21 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Labels = nil } else { - yyv91 := &x.Labels - yym92 := z.DecBinary() - _ = yym92 + yyv55 := &x.Labels + yym56 := z.DecBinary() + _ = yym56 if false { } else { - z.F.DecMapStringStringX(yyv91, false, d) + z.F.DecMapStringStringX(yyv55, false, d) } } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1030,21 +1118,21 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Annotations = nil } else { - yyv93 := &x.Annotations - yym94 := z.DecBinary() - _ = yym94 + yyv57 := &x.Annotations + yym58 := z.DecBinary() + _ = yym58 if false { } else { - z.F.DecMapStringStringX(yyv93, false, d) + z.F.DecMapStringStringX(yyv57, false, d) } } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1052,21 +1140,21 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.OwnerReferences = nil } else { - yyv95 := &x.OwnerReferences - yym96 := z.DecBinary() - _ = yym96 + yyv59 := &x.OwnerReferences + yym60 := z.DecBinary() + _ = yym60 if false { } else { - h.decSliceOwnerReference((*[]OwnerReference)(yyv95), d) + h.decSlicev1_OwnerReference((*[]pkg2_v1.OwnerReference)(yyv59), d) } } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1074,21 +1162,21 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Finalizers = nil } else { - yyv97 := &x.Finalizers - yym98 := z.DecBinary() - _ = yym98 + yyv61 := &x.Finalizers + yym62 := z.DecBinary() + _ = yym62 if false { } else { - z.F.DecSliceStringX(yyv97, false, d) + z.F.DecSliceStringX(yyv61, false, d) } } - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1096,20 +1184,26 @@ func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ClusterName = "" } else { - x.ClusterName = string(r.DecodeString()) + yyv63 := &x.ClusterName + yym64 := z.DecBinary() + _ = yym64 + if false { + } else { + *((*string)(yyv63)) = r.DecodeString() + } } for { - yyj77++ - if yyhl77 { - yyb77 = yyj77 > l + yyj34++ + if yyhl34 { + yyb34 = yyj34 > l } else { - yyb77 = r.CheckBreak() + yyb34 = r.CheckBreak() } - if yyb77 { + if yyb34 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj77-1, "") + z.DecStructFieldNotFound(yyj34-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1121,55 +1215,59 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym100 := z.EncBinary() - _ = yym100 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep101 := !z.EncBinary() - yy2arr101 := z.EncBasicHandle().StructToArray - var yyq101 [23]bool - _, _, _ = yysep101, yyq101, yy2arr101 - const yyr101 bool = false - yyq101[1] = x.VolumeSource.HostPath != nil && x.HostPath != nil - yyq101[2] = x.VolumeSource.EmptyDir != nil && x.EmptyDir != nil - yyq101[3] = x.VolumeSource.GCEPersistentDisk != nil && x.GCEPersistentDisk != nil - yyq101[4] = x.VolumeSource.AWSElasticBlockStore != nil && x.AWSElasticBlockStore != nil - yyq101[5] = x.VolumeSource.GitRepo != nil && x.GitRepo != nil - yyq101[6] = x.VolumeSource.Secret != nil && x.Secret != nil - yyq101[7] = x.VolumeSource.NFS != nil && x.NFS != nil - yyq101[8] = x.VolumeSource.ISCSI != nil && x.ISCSI != nil - yyq101[9] = x.VolumeSource.Glusterfs != nil && x.Glusterfs != nil - yyq101[10] = x.VolumeSource.PersistentVolumeClaim != nil && x.PersistentVolumeClaim != nil - yyq101[11] = x.VolumeSource.RBD != nil && x.RBD != nil - yyq101[12] = x.VolumeSource.Quobyte != nil && x.Quobyte != nil - yyq101[13] = x.VolumeSource.FlexVolume != nil && x.FlexVolume != nil - yyq101[14] = x.VolumeSource.Cinder != nil && x.Cinder != nil - yyq101[15] = x.VolumeSource.CephFS != nil && x.CephFS != nil - yyq101[16] = x.VolumeSource.Flocker != nil && x.Flocker != nil - yyq101[17] = x.VolumeSource.DownwardAPI != nil && x.DownwardAPI != nil - yyq101[18] = x.VolumeSource.FC != nil && x.FC != nil - yyq101[19] = x.VolumeSource.AzureFile != nil && x.AzureFile != nil - yyq101[20] = x.VolumeSource.ConfigMap != nil && x.ConfigMap != nil - yyq101[21] = x.VolumeSource.VsphereVolume != nil && x.VsphereVolume != nil - yyq101[22] = x.VolumeSource.AzureDisk != nil && x.AzureDisk != nil - var yynn101 int - if yyr101 || yy2arr101 { - r.EncodeArrayStart(23) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [27]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.VolumeSource.HostPath != nil && x.HostPath != nil + yyq2[2] = x.VolumeSource.EmptyDir != nil && x.EmptyDir != nil + yyq2[3] = x.VolumeSource.GCEPersistentDisk != nil && x.GCEPersistentDisk != nil + yyq2[4] = x.VolumeSource.AWSElasticBlockStore != nil && x.AWSElasticBlockStore != nil + yyq2[5] = x.VolumeSource.GitRepo != nil && x.GitRepo != nil + yyq2[6] = x.VolumeSource.Secret != nil && x.Secret != nil + yyq2[7] = x.VolumeSource.NFS != nil && x.NFS != nil + yyq2[8] = x.VolumeSource.ISCSI != nil && x.ISCSI != nil + yyq2[9] = x.VolumeSource.Glusterfs != nil && x.Glusterfs != nil + yyq2[10] = x.VolumeSource.PersistentVolumeClaim != nil && x.PersistentVolumeClaim != nil + yyq2[11] = x.VolumeSource.RBD != nil && x.RBD != nil + yyq2[12] = x.VolumeSource.FlexVolume != nil && x.FlexVolume != nil + yyq2[13] = x.VolumeSource.Cinder != nil && x.Cinder != nil + yyq2[14] = x.VolumeSource.CephFS != nil && x.CephFS != nil + yyq2[15] = x.VolumeSource.Flocker != nil && x.Flocker != nil + yyq2[16] = x.VolumeSource.DownwardAPI != nil && x.DownwardAPI != nil + yyq2[17] = x.VolumeSource.FC != nil && x.FC != nil + yyq2[18] = x.VolumeSource.AzureFile != nil && x.AzureFile != nil + yyq2[19] = x.VolumeSource.ConfigMap != nil && x.ConfigMap != nil + yyq2[20] = x.VolumeSource.VsphereVolume != nil && x.VsphereVolume != nil + yyq2[21] = x.VolumeSource.Quobyte != nil && x.Quobyte != nil + yyq2[22] = x.VolumeSource.AzureDisk != nil && x.AzureDisk != nil + yyq2[23] = x.VolumeSource.PhotonPersistentDisk != nil && x.PhotonPersistentDisk != nil + yyq2[24] = x.VolumeSource.Projected != nil && x.Projected != nil + yyq2[25] = x.VolumeSource.PortworxVolume != nil && x.PortworxVolume != nil + yyq2[26] = x.VolumeSource.ScaleIO != nil && x.ScaleIO != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(27) } else { - yynn101 = 1 - for _, b := range yyq101 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn101++ + yynn2++ } } - r.EncodeMapStart(yynn101) - yynn101 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr101 || yy2arr101 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym103 := z.EncBinary() - _ = yym103 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -1178,25 +1276,25 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym104 := z.EncBinary() - _ = yym104 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - var yyn105 bool + var yyn6 bool if x.VolumeSource.HostPath == nil { - yyn105 = true - goto LABEL105 + yyn6 = true + goto LABEL6 } - LABEL105: - if yyr101 || yy2arr101 { - if yyn105 { + LABEL6: + if yyr2 || yy2arr2 { + if yyn6 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[1] { + if yyq2[1] { if x.HostPath == nil { r.EncodeNil() } else { @@ -1207,11 +1305,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn105 { + if yyn6 { r.EncodeNil() } else { if x.HostPath == nil { @@ -1222,18 +1320,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn106 bool + var yyn9 bool if x.VolumeSource.EmptyDir == nil { - yyn106 = true - goto LABEL106 + yyn9 = true + goto LABEL9 } - LABEL106: - if yyr101 || yy2arr101 { - if yyn106 { + LABEL9: + if yyr2 || yy2arr2 { + if yyn9 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[2] { + if yyq2[2] { if x.EmptyDir == nil { r.EncodeNil() } else { @@ -1244,11 +1342,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("emptyDir")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn106 { + if yyn9 { r.EncodeNil() } else { if x.EmptyDir == nil { @@ -1259,18 +1357,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn107 bool + var yyn12 bool if x.VolumeSource.GCEPersistentDisk == nil { - yyn107 = true - goto LABEL107 + yyn12 = true + goto LABEL12 } - LABEL107: - if yyr101 || yy2arr101 { - if yyn107 { + LABEL12: + if yyr2 || yy2arr2 { + if yyn12 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[3] { + if yyq2[3] { if x.GCEPersistentDisk == nil { r.EncodeNil() } else { @@ -1281,11 +1379,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("gcePersistentDisk")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn107 { + if yyn12 { r.EncodeNil() } else { if x.GCEPersistentDisk == nil { @@ -1296,18 +1394,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn108 bool + var yyn15 bool if x.VolumeSource.AWSElasticBlockStore == nil { - yyn108 = true - goto LABEL108 + yyn15 = true + goto LABEL15 } - LABEL108: - if yyr101 || yy2arr101 { - if yyn108 { + LABEL15: + if yyr2 || yy2arr2 { + if yyn15 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[4] { + if yyq2[4] { if x.AWSElasticBlockStore == nil { r.EncodeNil() } else { @@ -1318,11 +1416,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("awsElasticBlockStore")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn108 { + if yyn15 { r.EncodeNil() } else { if x.AWSElasticBlockStore == nil { @@ -1333,18 +1431,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn109 bool + var yyn18 bool if x.VolumeSource.GitRepo == nil { - yyn109 = true - goto LABEL109 + yyn18 = true + goto LABEL18 } - LABEL109: - if yyr101 || yy2arr101 { - if yyn109 { + LABEL18: + if yyr2 || yy2arr2 { + if yyn18 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[5] { + if yyq2[5] { if x.GitRepo == nil { r.EncodeNil() } else { @@ -1355,11 +1453,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("gitRepo")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn109 { + if yyn18 { r.EncodeNil() } else { if x.GitRepo == nil { @@ -1370,18 +1468,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn110 bool + var yyn21 bool if x.VolumeSource.Secret == nil { - yyn110 = true - goto LABEL110 + yyn21 = true + goto LABEL21 } - LABEL110: - if yyr101 || yy2arr101 { - if yyn110 { + LABEL21: + if yyr2 || yy2arr2 { + if yyn21 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[6] { + if yyq2[6] { if x.Secret == nil { r.EncodeNil() } else { @@ -1392,11 +1490,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[6] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("secret")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn110 { + if yyn21 { r.EncodeNil() } else { if x.Secret == nil { @@ -1407,18 +1505,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn111 bool + var yyn24 bool if x.VolumeSource.NFS == nil { - yyn111 = true - goto LABEL111 + yyn24 = true + goto LABEL24 } - LABEL111: - if yyr101 || yy2arr101 { - if yyn111 { + LABEL24: + if yyr2 || yy2arr2 { + if yyn24 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[7] { + if yyq2[7] { if x.NFS == nil { r.EncodeNil() } else { @@ -1429,11 +1527,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[7] { + if yyq2[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nfs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn111 { + if yyn24 { r.EncodeNil() } else { if x.NFS == nil { @@ -1444,18 +1542,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn112 bool + var yyn27 bool if x.VolumeSource.ISCSI == nil { - yyn112 = true - goto LABEL112 + yyn27 = true + goto LABEL27 } - LABEL112: - if yyr101 || yy2arr101 { - if yyn112 { + LABEL27: + if yyr2 || yy2arr2 { + if yyn27 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[8] { + if yyq2[8] { if x.ISCSI == nil { r.EncodeNil() } else { @@ -1466,11 +1564,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[8] { + if yyq2[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("iscsi")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn112 { + if yyn27 { r.EncodeNil() } else { if x.ISCSI == nil { @@ -1481,18 +1579,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn113 bool + var yyn30 bool if x.VolumeSource.Glusterfs == nil { - yyn113 = true - goto LABEL113 + yyn30 = true + goto LABEL30 } - LABEL113: - if yyr101 || yy2arr101 { - if yyn113 { + LABEL30: + if yyr2 || yy2arr2 { + if yyn30 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[9] { + if yyq2[9] { if x.Glusterfs == nil { r.EncodeNil() } else { @@ -1503,11 +1601,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[9] { + if yyq2[9] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("glusterfs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn113 { + if yyn30 { r.EncodeNil() } else { if x.Glusterfs == nil { @@ -1518,18 +1616,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn114 bool + var yyn33 bool if x.VolumeSource.PersistentVolumeClaim == nil { - yyn114 = true - goto LABEL114 + yyn33 = true + goto LABEL33 } - LABEL114: - if yyr101 || yy2arr101 { - if yyn114 { + LABEL33: + if yyr2 || yy2arr2 { + if yyn33 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[10] { + if yyq2[10] { if x.PersistentVolumeClaim == nil { r.EncodeNil() } else { @@ -1540,11 +1638,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[10] { + if yyq2[10] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("persistentVolumeClaim")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn114 { + if yyn33 { r.EncodeNil() } else { if x.PersistentVolumeClaim == nil { @@ -1555,18 +1653,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn115 bool + var yyn36 bool if x.VolumeSource.RBD == nil { - yyn115 = true - goto LABEL115 + yyn36 = true + goto LABEL36 } - LABEL115: - if yyr101 || yy2arr101 { - if yyn115 { + LABEL36: + if yyr2 || yy2arr2 { + if yyn36 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[11] { + if yyq2[11] { if x.RBD == nil { r.EncodeNil() } else { @@ -1577,11 +1675,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[11] { + if yyq2[11] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rbd")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn115 { + if yyn36 { r.EncodeNil() } else { if x.RBD == nil { @@ -1592,55 +1690,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn116 bool - if x.VolumeSource.Quobyte == nil { - yyn116 = true - goto LABEL116 - } - LABEL116: - if yyr101 || yy2arr101 { - if yyn116 { - r.EncodeNil() - } else { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[12] { - if x.Quobyte == nil { - r.EncodeNil() - } else { - x.Quobyte.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq101[12] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("quobyte")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn116 { - r.EncodeNil() - } else { - if x.Quobyte == nil { - r.EncodeNil() - } else { - x.Quobyte.CodecEncodeSelf(e) - } - } - } - } - var yyn117 bool + var yyn39 bool if x.VolumeSource.FlexVolume == nil { - yyn117 = true - goto LABEL117 + yyn39 = true + goto LABEL39 } - LABEL117: - if yyr101 || yy2arr101 { - if yyn117 { + LABEL39: + if yyr2 || yy2arr2 { + if yyn39 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[13] { + if yyq2[12] { if x.FlexVolume == nil { r.EncodeNil() } else { @@ -1651,11 +1712,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[13] { + if yyq2[12] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("flexVolume")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn117 { + if yyn39 { r.EncodeNil() } else { if x.FlexVolume == nil { @@ -1666,18 +1727,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn118 bool + var yyn42 bool if x.VolumeSource.Cinder == nil { - yyn118 = true - goto LABEL118 + yyn42 = true + goto LABEL42 } - LABEL118: - if yyr101 || yy2arr101 { - if yyn118 { + LABEL42: + if yyr2 || yy2arr2 { + if yyn42 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[14] { + if yyq2[13] { if x.Cinder == nil { r.EncodeNil() } else { @@ -1688,11 +1749,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[14] { + if yyq2[13] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cinder")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn118 { + if yyn42 { r.EncodeNil() } else { if x.Cinder == nil { @@ -1703,18 +1764,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn119 bool + var yyn45 bool if x.VolumeSource.CephFS == nil { - yyn119 = true - goto LABEL119 + yyn45 = true + goto LABEL45 } - LABEL119: - if yyr101 || yy2arr101 { - if yyn119 { + LABEL45: + if yyr2 || yy2arr2 { + if yyn45 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[15] { + if yyq2[14] { if x.CephFS == nil { r.EncodeNil() } else { @@ -1725,11 +1786,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[15] { + if yyq2[14] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cephfs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn119 { + if yyn45 { r.EncodeNil() } else { if x.CephFS == nil { @@ -1740,18 +1801,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn120 bool + var yyn48 bool if x.VolumeSource.Flocker == nil { - yyn120 = true - goto LABEL120 + yyn48 = true + goto LABEL48 } - LABEL120: - if yyr101 || yy2arr101 { - if yyn120 { + LABEL48: + if yyr2 || yy2arr2 { + if yyn48 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[16] { + if yyq2[15] { if x.Flocker == nil { r.EncodeNil() } else { @@ -1762,11 +1823,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[16] { + if yyq2[15] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("flocker")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn120 { + if yyn48 { r.EncodeNil() } else { if x.Flocker == nil { @@ -1777,18 +1838,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn121 bool + var yyn51 bool if x.VolumeSource.DownwardAPI == nil { - yyn121 = true - goto LABEL121 + yyn51 = true + goto LABEL51 } - LABEL121: - if yyr101 || yy2arr101 { - if yyn121 { + LABEL51: + if yyr2 || yy2arr2 { + if yyn51 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[17] { + if yyq2[16] { if x.DownwardAPI == nil { r.EncodeNil() } else { @@ -1799,11 +1860,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[17] { + if yyq2[16] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("downwardAPI")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn121 { + if yyn51 { r.EncodeNil() } else { if x.DownwardAPI == nil { @@ -1814,18 +1875,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn122 bool + var yyn54 bool if x.VolumeSource.FC == nil { - yyn122 = true - goto LABEL122 + yyn54 = true + goto LABEL54 } - LABEL122: - if yyr101 || yy2arr101 { - if yyn122 { + LABEL54: + if yyr2 || yy2arr2 { + if yyn54 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[18] { + if yyq2[17] { if x.FC == nil { r.EncodeNil() } else { @@ -1836,11 +1897,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[18] { + if yyq2[17] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fc")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn122 { + if yyn54 { r.EncodeNil() } else { if x.FC == nil { @@ -1851,18 +1912,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn123 bool + var yyn57 bool if x.VolumeSource.AzureFile == nil { - yyn123 = true - goto LABEL123 + yyn57 = true + goto LABEL57 } - LABEL123: - if yyr101 || yy2arr101 { - if yyn123 { + LABEL57: + if yyr2 || yy2arr2 { + if yyn57 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[19] { + if yyq2[18] { if x.AzureFile == nil { r.EncodeNil() } else { @@ -1873,11 +1934,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[19] { + if yyq2[18] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("azureFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn123 { + if yyn57 { r.EncodeNil() } else { if x.AzureFile == nil { @@ -1888,18 +1949,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn124 bool + var yyn60 bool if x.VolumeSource.ConfigMap == nil { - yyn124 = true - goto LABEL124 + yyn60 = true + goto LABEL60 } - LABEL124: - if yyr101 || yy2arr101 { - if yyn124 { + LABEL60: + if yyr2 || yy2arr2 { + if yyn60 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[20] { + if yyq2[19] { if x.ConfigMap == nil { r.EncodeNil() } else { @@ -1910,11 +1971,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[20] { + if yyq2[19] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("configMap")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn124 { + if yyn60 { r.EncodeNil() } else { if x.ConfigMap == nil { @@ -1925,18 +1986,18 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn125 bool + var yyn63 bool if x.VolumeSource.VsphereVolume == nil { - yyn125 = true - goto LABEL125 + yyn63 = true + goto LABEL63 } - LABEL125: - if yyr101 || yy2arr101 { - if yyn125 { + LABEL63: + if yyr2 || yy2arr2 { + if yyn63 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[21] { + if yyq2[20] { if x.VsphereVolume == nil { r.EncodeNil() } else { @@ -1947,11 +2008,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[21] { + if yyq2[20] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("vsphereVolume")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn125 { + if yyn63 { r.EncodeNil() } else { if x.VsphereVolume == nil { @@ -1962,18 +2023,55 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn126 bool - if x.VolumeSource.AzureDisk == nil { - yyn126 = true - goto LABEL126 + var yyn66 bool + if x.VolumeSource.Quobyte == nil { + yyn66 = true + goto LABEL66 } - LABEL126: - if yyr101 || yy2arr101 { - if yyn126 { + LABEL66: + if yyr2 || yy2arr2 { + if yyn66 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq101[22] { + if yyq2[21] { + if x.Quobyte == nil { + r.EncodeNil() + } else { + x.Quobyte.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[21] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("quobyte")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyn66 { + r.EncodeNil() + } else { + if x.Quobyte == nil { + r.EncodeNil() + } else { + x.Quobyte.CodecEncodeSelf(e) + } + } + } + } + var yyn69 bool + if x.VolumeSource.AzureDisk == nil { + yyn69 = true + goto LABEL69 + } + LABEL69: + if yyr2 || yy2arr2 { + if yyn69 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[22] { if x.AzureDisk == nil { r.EncodeNil() } else { @@ -1984,11 +2082,11 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq101[22] { + if yyq2[22] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("azureDisk")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn126 { + if yyn69 { r.EncodeNil() } else { if x.AzureDisk == nil { @@ -1999,7 +2097,155 @@ func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr101 || yy2arr101 { + var yyn72 bool + if x.VolumeSource.PhotonPersistentDisk == nil { + yyn72 = true + goto LABEL72 + } + LABEL72: + if yyr2 || yy2arr2 { + if yyn72 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[23] { + if x.PhotonPersistentDisk == nil { + r.EncodeNil() + } else { + x.PhotonPersistentDisk.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[23] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("photonPersistentDisk")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyn72 { + r.EncodeNil() + } else { + if x.PhotonPersistentDisk == nil { + r.EncodeNil() + } else { + x.PhotonPersistentDisk.CodecEncodeSelf(e) + } + } + } + } + var yyn75 bool + if x.VolumeSource.Projected == nil { + yyn75 = true + goto LABEL75 + } + LABEL75: + if yyr2 || yy2arr2 { + if yyn75 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[24] { + if x.Projected == nil { + r.EncodeNil() + } else { + x.Projected.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[24] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("projected")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyn75 { + r.EncodeNil() + } else { + if x.Projected == nil { + r.EncodeNil() + } else { + x.Projected.CodecEncodeSelf(e) + } + } + } + } + var yyn78 bool + if x.VolumeSource.PortworxVolume == nil { + yyn78 = true + goto LABEL78 + } + LABEL78: + if yyr2 || yy2arr2 { + if yyn78 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[25] { + if x.PortworxVolume == nil { + r.EncodeNil() + } else { + x.PortworxVolume.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[25] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("portworxVolume")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyn78 { + r.EncodeNil() + } else { + if x.PortworxVolume == nil { + r.EncodeNil() + } else { + x.PortworxVolume.CodecEncodeSelf(e) + } + } + } + } + var yyn81 bool + if x.VolumeSource.ScaleIO == nil { + yyn81 = true + goto LABEL81 + } + LABEL81: + if yyr2 || yy2arr2 { + if yyn81 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[26] { + if x.ScaleIO == nil { + r.EncodeNil() + } else { + x.ScaleIO.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[26] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("scaleIO")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyn81 { + r.EncodeNil() + } else { + if x.ScaleIO == nil { + r.EncodeNil() + } else { + x.ScaleIO.CodecEncodeSelf(e) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -2012,25 +2258,25 @@ func (x *Volume) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym127 := z.DecBinary() - _ = yym127 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct128 := r.ContainerType() - if yyct128 == codecSelferValueTypeMap1234 { - yyl128 := r.ReadMapStart() - if yyl128 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl128, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct128 == codecSelferValueTypeArray1234 { - yyl128 := r.ReadArrayStart() - if yyl128 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl128, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -2042,12 +2288,12 @@ func (x *Volume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys129Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys129Slc - var yyhl129 bool = l >= 0 - for yyj129 := 0; ; yyj129++ { - if yyhl129 { - if yyj129 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -2056,15 +2302,21 @@ func (x *Volume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys129Slc = r.DecodeBytes(yys129Slc, true, true) - yys129 := string(yys129Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys129 { + switch yys3 { case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "hostPath": if x.VolumeSource.HostPath == nil { @@ -2220,20 +2472,6 @@ func (x *Volume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } x.RBD.CodecDecodeSelf(d) } - case "quobyte": - if x.VolumeSource.Quobyte == nil { - x.VolumeSource.Quobyte = new(QuobyteVolumeSource) - } - if r.TryDecodeAsNil() { - if x.Quobyte != nil { - x.Quobyte = nil - } - } else { - if x.Quobyte == nil { - x.Quobyte = new(QuobyteVolumeSource) - } - x.Quobyte.CodecDecodeSelf(d) - } case "flexVolume": if x.VolumeSource.FlexVolume == nil { x.VolumeSource.FlexVolume = new(FlexVolumeSource) @@ -2360,6 +2598,20 @@ func (x *Volume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } x.VsphereVolume.CodecDecodeSelf(d) } + case "quobyte": + if x.VolumeSource.Quobyte == nil { + x.VolumeSource.Quobyte = new(QuobyteVolumeSource) + } + if r.TryDecodeAsNil() { + if x.Quobyte != nil { + x.Quobyte = nil + } + } else { + if x.Quobyte == nil { + x.Quobyte = new(QuobyteVolumeSource) + } + x.Quobyte.CodecDecodeSelf(d) + } case "azureDisk": if x.VolumeSource.AzureDisk == nil { x.VolumeSource.AzureDisk = new(AzureDiskVolumeSource) @@ -2374,10 +2626,66 @@ func (x *Volume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } x.AzureDisk.CodecDecodeSelf(d) } + case "photonPersistentDisk": + if x.VolumeSource.PhotonPersistentDisk == nil { + x.VolumeSource.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource) + } + if r.TryDecodeAsNil() { + if x.PhotonPersistentDisk != nil { + x.PhotonPersistentDisk = nil + } + } else { + if x.PhotonPersistentDisk == nil { + x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource) + } + x.PhotonPersistentDisk.CodecDecodeSelf(d) + } + case "projected": + if x.VolumeSource.Projected == nil { + x.VolumeSource.Projected = new(ProjectedVolumeSource) + } + if r.TryDecodeAsNil() { + if x.Projected != nil { + x.Projected = nil + } + } else { + if x.Projected == nil { + x.Projected = new(ProjectedVolumeSource) + } + x.Projected.CodecDecodeSelf(d) + } + case "portworxVolume": + if x.VolumeSource.PortworxVolume == nil { + x.VolumeSource.PortworxVolume = new(PortworxVolumeSource) + } + if r.TryDecodeAsNil() { + if x.PortworxVolume != nil { + x.PortworxVolume = nil + } + } else { + if x.PortworxVolume == nil { + x.PortworxVolume = new(PortworxVolumeSource) + } + x.PortworxVolume.CodecDecodeSelf(d) + } + case "scaleIO": + if x.VolumeSource.ScaleIO == nil { + x.VolumeSource.ScaleIO = new(ScaleIOVolumeSource) + } + if r.TryDecodeAsNil() { + if x.ScaleIO != nil { + x.ScaleIO = nil + } + } else { + if x.ScaleIO == nil { + x.ScaleIO = new(ScaleIOVolumeSource) + } + x.ScaleIO.CodecDecodeSelf(d) + } default: - z.DecStructFieldNotFound(-1, yys129) - } // end switch yys129 - } // end for yyj129 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -2385,16 +2693,16 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj153 int - var yyb153 bool - var yyhl153 bool = l >= 0 - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + var yyj32 int + var yyb32 bool + var yyhl32 bool = l >= 0 + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2402,18 +2710,24 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv33 := &x.Name + yym34 := z.DecBinary() + _ = yym34 + if false { + } else { + *((*string)(yyv33)) = r.DecodeString() + } } if x.VolumeSource.HostPath == nil { x.VolumeSource.HostPath = new(HostPathVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2431,13 +2745,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.EmptyDir == nil { x.VolumeSource.EmptyDir = new(EmptyDirVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2455,13 +2769,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.GCEPersistentDisk == nil { x.VolumeSource.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2479,13 +2793,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.AWSElasticBlockStore == nil { x.VolumeSource.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2503,13 +2817,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.GitRepo == nil { x.VolumeSource.GitRepo = new(GitRepoVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2527,13 +2841,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.Secret == nil { x.VolumeSource.Secret = new(SecretVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2551,13 +2865,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.NFS == nil { x.VolumeSource.NFS = new(NFSVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2575,13 +2889,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.ISCSI == nil { x.VolumeSource.ISCSI = new(ISCSIVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2599,13 +2913,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.Glusterfs == nil { x.VolumeSource.Glusterfs = new(GlusterfsVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2623,13 +2937,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.PersistentVolumeClaim == nil { x.VolumeSource.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2647,13 +2961,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.RBD == nil { x.VolumeSource.RBD = new(RBDVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2668,40 +2982,16 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.RBD.CodecDecodeSelf(d) } - if x.VolumeSource.Quobyte == nil { - x.VolumeSource.Quobyte = new(QuobyteVolumeSource) - } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l - } else { - yyb153 = r.CheckBreak() - } - if yyb153 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Quobyte != nil { - x.Quobyte = nil - } - } else { - if x.Quobyte == nil { - x.Quobyte = new(QuobyteVolumeSource) - } - x.Quobyte.CodecDecodeSelf(d) - } if x.VolumeSource.FlexVolume == nil { x.VolumeSource.FlexVolume = new(FlexVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2719,13 +3009,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.Cinder == nil { x.VolumeSource.Cinder = new(CinderVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2743,13 +3033,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.CephFS == nil { x.VolumeSource.CephFS = new(CephFSVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2767,13 +3057,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.Flocker == nil { x.VolumeSource.Flocker = new(FlockerVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2791,13 +3081,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.DownwardAPI == nil { x.VolumeSource.DownwardAPI = new(DownwardAPIVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2815,13 +3105,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.FC == nil { x.VolumeSource.FC = new(FCVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2839,13 +3129,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.AzureFile == nil { x.VolumeSource.AzureFile = new(AzureFileVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2863,13 +3153,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.ConfigMap == nil { x.VolumeSource.ConfigMap = new(ConfigMapVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2887,13 +3177,13 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.VolumeSource.VsphereVolume == nil { x.VolumeSource.VsphereVolume = new(VsphereVirtualDiskVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2908,16 +3198,40 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.VsphereVolume.CodecDecodeSelf(d) } + if x.VolumeSource.Quobyte == nil { + x.VolumeSource.Quobyte = new(QuobyteVolumeSource) + } + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l + } else { + yyb32 = r.CheckBreak() + } + if yyb32 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Quobyte != nil { + x.Quobyte = nil + } + } else { + if x.Quobyte == nil { + x.Quobyte = new(QuobyteVolumeSource) + } + x.Quobyte.CodecDecodeSelf(d) + } if x.VolumeSource.AzureDisk == nil { x.VolumeSource.AzureDisk = new(AzureDiskVolumeSource) } - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l } else { - yyb153 = r.CheckBreak() + yyb32 = r.CheckBreak() } - if yyb153 { + if yyb32 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2932,18 +3246,114 @@ func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.AzureDisk.CodecDecodeSelf(d) } - for { - yyj153++ - if yyhl153 { - yyb153 = yyj153 > l - } else { - yyb153 = r.CheckBreak() + if x.VolumeSource.PhotonPersistentDisk == nil { + x.VolumeSource.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource) + } + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l + } else { + yyb32 = r.CheckBreak() + } + if yyb32 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.PhotonPersistentDisk != nil { + x.PhotonPersistentDisk = nil } - if yyb153 { + } else { + if x.PhotonPersistentDisk == nil { + x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource) + } + x.PhotonPersistentDisk.CodecDecodeSelf(d) + } + if x.VolumeSource.Projected == nil { + x.VolumeSource.Projected = new(ProjectedVolumeSource) + } + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l + } else { + yyb32 = r.CheckBreak() + } + if yyb32 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Projected != nil { + x.Projected = nil + } + } else { + if x.Projected == nil { + x.Projected = new(ProjectedVolumeSource) + } + x.Projected.CodecDecodeSelf(d) + } + if x.VolumeSource.PortworxVolume == nil { + x.VolumeSource.PortworxVolume = new(PortworxVolumeSource) + } + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l + } else { + yyb32 = r.CheckBreak() + } + if yyb32 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.PortworxVolume != nil { + x.PortworxVolume = nil + } + } else { + if x.PortworxVolume == nil { + x.PortworxVolume = new(PortworxVolumeSource) + } + x.PortworxVolume.CodecDecodeSelf(d) + } + if x.VolumeSource.ScaleIO == nil { + x.VolumeSource.ScaleIO = new(ScaleIOVolumeSource) + } + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l + } else { + yyb32 = r.CheckBreak() + } + if yyb32 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ScaleIO != nil { + x.ScaleIO = nil + } + } else { + if x.ScaleIO == nil { + x.ScaleIO = new(ScaleIOVolumeSource) + } + x.ScaleIO.CodecDecodeSelf(d) + } + for { + yyj32++ + if yyhl32 { + yyb32 = yyj32 > l + } else { + yyb32 = r.CheckBreak() + } + if yyb32 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj153-1, "") + z.DecStructFieldNotFound(yyj32-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2955,54 +3365,58 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym177 := z.EncBinary() - _ = yym177 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep178 := !z.EncBinary() - yy2arr178 := z.EncBasicHandle().StructToArray - var yyq178 [22]bool - _, _, _ = yysep178, yyq178, yy2arr178 - const yyr178 bool = false - yyq178[0] = x.HostPath != nil - yyq178[1] = x.EmptyDir != nil - yyq178[2] = x.GCEPersistentDisk != nil - yyq178[3] = x.AWSElasticBlockStore != nil - yyq178[4] = x.GitRepo != nil - yyq178[5] = x.Secret != nil - yyq178[6] = x.NFS != nil - yyq178[7] = x.ISCSI != nil - yyq178[8] = x.Glusterfs != nil - yyq178[9] = x.PersistentVolumeClaim != nil - yyq178[10] = x.RBD != nil - yyq178[11] = x.Quobyte != nil - yyq178[12] = x.FlexVolume != nil - yyq178[13] = x.Cinder != nil - yyq178[14] = x.CephFS != nil - yyq178[15] = x.Flocker != nil - yyq178[16] = x.DownwardAPI != nil - yyq178[17] = x.FC != nil - yyq178[18] = x.AzureFile != nil - yyq178[19] = x.ConfigMap != nil - yyq178[20] = x.VsphereVolume != nil - yyq178[21] = x.AzureDisk != nil - var yynn178 int - if yyr178 || yy2arr178 { - r.EncodeArrayStart(22) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [26]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.HostPath != nil + yyq2[1] = x.EmptyDir != nil + yyq2[2] = x.GCEPersistentDisk != nil + yyq2[3] = x.AWSElasticBlockStore != nil + yyq2[4] = x.GitRepo != nil + yyq2[5] = x.Secret != nil + yyq2[6] = x.NFS != nil + yyq2[7] = x.ISCSI != nil + yyq2[8] = x.Glusterfs != nil + yyq2[9] = x.PersistentVolumeClaim != nil + yyq2[10] = x.RBD != nil + yyq2[11] = x.FlexVolume != nil + yyq2[12] = x.Cinder != nil + yyq2[13] = x.CephFS != nil + yyq2[14] = x.Flocker != nil + yyq2[15] = x.DownwardAPI != nil + yyq2[16] = x.FC != nil + yyq2[17] = x.AzureFile != nil + yyq2[18] = x.ConfigMap != nil + yyq2[19] = x.VsphereVolume != nil + yyq2[20] = x.Quobyte != nil + yyq2[21] = x.AzureDisk != nil + yyq2[22] = x.PhotonPersistentDisk != nil + yyq2[23] = x.Projected != nil + yyq2[24] = x.PortworxVolume != nil + yyq2[25] = x.ScaleIO != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(26) } else { - yynn178 = 0 - for _, b := range yyq178 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn178++ + yynn2++ } } - r.EncodeMapStart(yynn178) - yynn178 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[0] { + if yyq2[0] { if x.HostPath == nil { r.EncodeNil() } else { @@ -3012,7 +3426,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3023,9 +3437,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[1] { + if yyq2[1] { if x.EmptyDir == nil { r.EncodeNil() } else { @@ -3035,7 +3449,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("emptyDir")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3046,9 +3460,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[2] { + if yyq2[2] { if x.GCEPersistentDisk == nil { r.EncodeNil() } else { @@ -3058,7 +3472,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("gcePersistentDisk")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3069,9 +3483,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[3] { + if yyq2[3] { if x.AWSElasticBlockStore == nil { r.EncodeNil() } else { @@ -3081,7 +3495,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("awsElasticBlockStore")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3092,9 +3506,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[4] { + if yyq2[4] { if x.GitRepo == nil { r.EncodeNil() } else { @@ -3104,7 +3518,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("gitRepo")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3115,9 +3529,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[5] { + if yyq2[5] { if x.Secret == nil { r.EncodeNil() } else { @@ -3127,7 +3541,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("secret")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3138,9 +3552,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[6] { + if yyq2[6] { if x.NFS == nil { r.EncodeNil() } else { @@ -3150,7 +3564,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[6] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nfs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3161,9 +3575,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[7] { + if yyq2[7] { if x.ISCSI == nil { r.EncodeNil() } else { @@ -3173,7 +3587,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[7] { + if yyq2[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("iscsi")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3184,9 +3598,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[8] { + if yyq2[8] { if x.Glusterfs == nil { r.EncodeNil() } else { @@ -3196,7 +3610,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[8] { + if yyq2[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("glusterfs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3207,9 +3621,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[9] { + if yyq2[9] { if x.PersistentVolumeClaim == nil { r.EncodeNil() } else { @@ -3219,7 +3633,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[9] { + if yyq2[9] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("persistentVolumeClaim")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3230,9 +3644,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[10] { + if yyq2[10] { if x.RBD == nil { r.EncodeNil() } else { @@ -3242,7 +3656,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[10] { + if yyq2[10] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rbd")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3253,32 +3667,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[11] { - if x.Quobyte == nil { - r.EncodeNil() - } else { - x.Quobyte.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq178[11] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("quobyte")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Quobyte == nil { - r.EncodeNil() - } else { - x.Quobyte.CodecEncodeSelf(e) - } - } - } - if yyr178 || yy2arr178 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[12] { + if yyq2[11] { if x.FlexVolume == nil { r.EncodeNil() } else { @@ -3288,7 +3679,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[12] { + if yyq2[11] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("flexVolume")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3299,9 +3690,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[13] { + if yyq2[12] { if x.Cinder == nil { r.EncodeNil() } else { @@ -3311,7 +3702,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[13] { + if yyq2[12] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cinder")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3322,9 +3713,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[14] { + if yyq2[13] { if x.CephFS == nil { r.EncodeNil() } else { @@ -3334,7 +3725,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[14] { + if yyq2[13] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cephfs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3345,9 +3736,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[15] { + if yyq2[14] { if x.Flocker == nil { r.EncodeNil() } else { @@ -3357,7 +3748,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[15] { + if yyq2[14] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("flocker")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3368,9 +3759,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[16] { + if yyq2[15] { if x.DownwardAPI == nil { r.EncodeNil() } else { @@ -3380,7 +3771,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[16] { + if yyq2[15] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("downwardAPI")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3391,9 +3782,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[17] { + if yyq2[16] { if x.FC == nil { r.EncodeNil() } else { @@ -3403,7 +3794,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[17] { + if yyq2[16] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fc")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3414,9 +3805,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[18] { + if yyq2[17] { if x.AzureFile == nil { r.EncodeNil() } else { @@ -3426,7 +3817,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[18] { + if yyq2[17] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("azureFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3437,9 +3828,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[19] { + if yyq2[18] { if x.ConfigMap == nil { r.EncodeNil() } else { @@ -3449,7 +3840,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[19] { + if yyq2[18] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("configMap")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3460,9 +3851,9 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[20] { + if yyq2[19] { if x.VsphereVolume == nil { r.EncodeNil() } else { @@ -3472,7 +3863,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[20] { + if yyq2[19] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("vsphereVolume")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3483,9 +3874,32 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq178[21] { + if yyq2[20] { + if x.Quobyte == nil { + r.EncodeNil() + } else { + x.Quobyte.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[20] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("quobyte")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Quobyte == nil { + r.EncodeNil() + } else { + x.Quobyte.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[21] { if x.AzureDisk == nil { r.EncodeNil() } else { @@ -3495,7 +3909,7 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq178[21] { + if yyq2[21] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("azureDisk")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3506,7 +3920,99 @@ func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr178 || yy2arr178 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[22] { + if x.PhotonPersistentDisk == nil { + r.EncodeNil() + } else { + x.PhotonPersistentDisk.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[22] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("photonPersistentDisk")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.PhotonPersistentDisk == nil { + r.EncodeNil() + } else { + x.PhotonPersistentDisk.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[23] { + if x.Projected == nil { + r.EncodeNil() + } else { + x.Projected.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[23] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("projected")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Projected == nil { + r.EncodeNil() + } else { + x.Projected.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[24] { + if x.PortworxVolume == nil { + r.EncodeNil() + } else { + x.PortworxVolume.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[24] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("portworxVolume")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.PortworxVolume == nil { + r.EncodeNil() + } else { + x.PortworxVolume.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[25] { + if x.ScaleIO == nil { + r.EncodeNil() + } else { + x.ScaleIO.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[25] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("scaleIO")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ScaleIO == nil { + r.EncodeNil() + } else { + x.ScaleIO.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -3519,25 +4025,25 @@ func (x *VolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym201 := z.DecBinary() - _ = yym201 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct202 := r.ContainerType() - if yyct202 == codecSelferValueTypeMap1234 { - yyl202 := r.ReadMapStart() - if yyl202 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl202, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct202 == codecSelferValueTypeArray1234 { - yyl202 := r.ReadArrayStart() - if yyl202 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl202, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -3549,12 +4055,12 @@ func (x *VolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys203Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys203Slc - var yyhl203 bool = l >= 0 - for yyj203 := 0; ; yyj203++ { - if yyhl203 { - if yyj203 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -3563,10 +4069,10 @@ func (x *VolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys203Slc = r.DecodeBytes(yys203Slc, true, true) - yys203 := string(yys203Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys203 { + switch yys3 { case "hostPath": if r.TryDecodeAsNil() { if x.HostPath != nil { @@ -3688,17 +4194,6 @@ func (x *VolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } x.RBD.CodecDecodeSelf(d) } - case "quobyte": - if r.TryDecodeAsNil() { - if x.Quobyte != nil { - x.Quobyte = nil - } - } else { - if x.Quobyte == nil { - x.Quobyte = new(QuobyteVolumeSource) - } - x.Quobyte.CodecDecodeSelf(d) - } case "flexVolume": if r.TryDecodeAsNil() { if x.FlexVolume != nil { @@ -3798,6 +4293,17 @@ func (x *VolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } x.VsphereVolume.CodecDecodeSelf(d) } + case "quobyte": + if r.TryDecodeAsNil() { + if x.Quobyte != nil { + x.Quobyte = nil + } + } else { + if x.Quobyte == nil { + x.Quobyte = new(QuobyteVolumeSource) + } + x.Quobyte.CodecDecodeSelf(d) + } case "azureDisk": if r.TryDecodeAsNil() { if x.AzureDisk != nil { @@ -3809,10 +4315,54 @@ func (x *VolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } x.AzureDisk.CodecDecodeSelf(d) } + case "photonPersistentDisk": + if r.TryDecodeAsNil() { + if x.PhotonPersistentDisk != nil { + x.PhotonPersistentDisk = nil + } + } else { + if x.PhotonPersistentDisk == nil { + x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource) + } + x.PhotonPersistentDisk.CodecDecodeSelf(d) + } + case "projected": + if r.TryDecodeAsNil() { + if x.Projected != nil { + x.Projected = nil + } + } else { + if x.Projected == nil { + x.Projected = new(ProjectedVolumeSource) + } + x.Projected.CodecDecodeSelf(d) + } + case "portworxVolume": + if r.TryDecodeAsNil() { + if x.PortworxVolume != nil { + x.PortworxVolume = nil + } + } else { + if x.PortworxVolume == nil { + x.PortworxVolume = new(PortworxVolumeSource) + } + x.PortworxVolume.CodecDecodeSelf(d) + } + case "scaleIO": + if r.TryDecodeAsNil() { + if x.ScaleIO != nil { + x.ScaleIO = nil + } + } else { + if x.ScaleIO == nil { + x.ScaleIO = new(ScaleIOVolumeSource) + } + x.ScaleIO.CodecDecodeSelf(d) + } default: - z.DecStructFieldNotFound(-1, yys203) - } // end switch yys203 - } // end for yyj203 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -3820,16 +4370,16 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj226 int - var yyb226 bool - var yyhl226 bool = l >= 0 - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + var yyj30 int + var yyb30 bool + var yyhl30 bool = l >= 0 + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3844,13 +4394,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.HostPath.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3865,13 +4415,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.EmptyDir.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3886,13 +4436,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.GCEPersistentDisk.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3907,13 +4457,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.AWSElasticBlockStore.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3928,13 +4478,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.GitRepo.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3949,13 +4499,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Secret.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3970,13 +4520,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.NFS.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3991,13 +4541,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.ISCSI.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4012,13 +4562,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Glusterfs.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4033,13 +4583,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.PersistentVolumeClaim.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4054,34 +4604,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.RBD.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Quobyte != nil { - x.Quobyte = nil - } - } else { - if x.Quobyte == nil { - x.Quobyte = new(QuobyteVolumeSource) - } - x.Quobyte.CodecDecodeSelf(d) - } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l - } else { - yyb226 = r.CheckBreak() - } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4096,13 +4625,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.FlexVolume.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4117,13 +4646,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Cinder.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4138,13 +4667,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.CephFS.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4159,13 +4688,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Flocker.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4180,13 +4709,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.DownwardAPI.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4201,13 +4730,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.FC.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4222,13 +4751,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.AzureFile.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4243,13 +4772,13 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.ConfigMap.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4264,13 +4793,34 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.VsphereVolume.CodecDecodeSelf(d) } - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb226 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb226 { + if yyb30 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Quobyte != nil { + x.Quobyte = nil + } + } else { + if x.Quobyte == nil { + x.Quobyte = new(QuobyteVolumeSource) + } + x.Quobyte.CodecDecodeSelf(d) + } + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l + } else { + yyb30 = r.CheckBreak() + } + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4285,18 +4835,336 @@ func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.AzureDisk.CodecDecodeSelf(d) } - for { - yyj226++ - if yyhl226 { - yyb226 = yyj226 > l - } else { - yyb226 = r.CheckBreak() + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l + } else { + yyb30 = r.CheckBreak() + } + if yyb30 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.PhotonPersistentDisk != nil { + x.PhotonPersistentDisk = nil } - if yyb226 { + } else { + if x.PhotonPersistentDisk == nil { + x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource) + } + x.PhotonPersistentDisk.CodecDecodeSelf(d) + } + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l + } else { + yyb30 = r.CheckBreak() + } + if yyb30 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Projected != nil { + x.Projected = nil + } + } else { + if x.Projected == nil { + x.Projected = new(ProjectedVolumeSource) + } + x.Projected.CodecDecodeSelf(d) + } + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l + } else { + yyb30 = r.CheckBreak() + } + if yyb30 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.PortworxVolume != nil { + x.PortworxVolume = nil + } + } else { + if x.PortworxVolume == nil { + x.PortworxVolume = new(PortworxVolumeSource) + } + x.PortworxVolume.CodecDecodeSelf(d) + } + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l + } else { + yyb30 = r.CheckBreak() + } + if yyb30 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ScaleIO != nil { + x.ScaleIO = nil + } + } else { + if x.ScaleIO == nil { + x.ScaleIO = new(ScaleIOVolumeSource) + } + x.ScaleIO.CodecDecodeSelf(d) + } + for { + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l + } else { + yyb30 = r.CheckBreak() + } + if yyb30 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj226-1, "") + z.DecStructFieldNotFound(yyj30-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PersistentVolumeClaimVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.ReadOnly != false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ClaimName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("claimName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ClaimName)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("readOnly")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PersistentVolumeClaimVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PersistentVolumeClaimVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "claimName": + if r.TryDecodeAsNil() { + x.ClaimName = "" + } else { + yyv4 := &x.ClaimName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "readOnly": + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv6 := &x.ReadOnly + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*bool)(yyv6)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PersistentVolumeClaimVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ClaimName = "" + } else { + yyv9 := &x.ClaimName + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv11 := &x.ReadOnly + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*bool)(yyv11)) = r.DecodeBool() + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4308,48 +5176,51 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym249 := z.EncBinary() - _ = yym249 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep250 := !z.EncBinary() - yy2arr250 := z.EncBasicHandle().StructToArray - var yyq250 [16]bool - _, _, _ = yysep250, yyq250, yy2arr250 - const yyr250 bool = false - yyq250[0] = x.GCEPersistentDisk != nil - yyq250[1] = x.AWSElasticBlockStore != nil - yyq250[2] = x.HostPath != nil - yyq250[3] = x.Glusterfs != nil - yyq250[4] = x.NFS != nil - yyq250[5] = x.RBD != nil - yyq250[6] = x.Quobyte != nil - yyq250[7] = x.ISCSI != nil - yyq250[8] = x.FlexVolume != nil - yyq250[9] = x.Cinder != nil - yyq250[10] = x.CephFS != nil - yyq250[11] = x.FC != nil - yyq250[12] = x.Flocker != nil - yyq250[13] = x.AzureFile != nil - yyq250[14] = x.VsphereVolume != nil - yyq250[15] = x.AzureDisk != nil - var yynn250 int - if yyr250 || yy2arr250 { - r.EncodeArrayStart(16) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [19]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.GCEPersistentDisk != nil + yyq2[1] = x.AWSElasticBlockStore != nil + yyq2[2] = x.HostPath != nil + yyq2[3] = x.Glusterfs != nil + yyq2[4] = x.NFS != nil + yyq2[5] = x.RBD != nil + yyq2[6] = x.ISCSI != nil + yyq2[7] = x.Cinder != nil + yyq2[8] = x.CephFS != nil + yyq2[9] = x.FC != nil + yyq2[10] = x.Flocker != nil + yyq2[11] = x.FlexVolume != nil + yyq2[12] = x.AzureFile != nil + yyq2[13] = x.VsphereVolume != nil + yyq2[14] = x.Quobyte != nil + yyq2[15] = x.AzureDisk != nil + yyq2[16] = x.PhotonPersistentDisk != nil + yyq2[17] = x.PortworxVolume != nil + yyq2[18] = x.ScaleIO != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(19) } else { - yynn250 = 0 - for _, b := range yyq250 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn250++ + yynn2++ } } - r.EncodeMapStart(yynn250) - yynn250 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[0] { + if yyq2[0] { if x.GCEPersistentDisk == nil { r.EncodeNil() } else { @@ -4359,7 +5230,7 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq250[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("gcePersistentDisk")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4370,9 +5241,9 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[1] { + if yyq2[1] { if x.AWSElasticBlockStore == nil { r.EncodeNil() } else { @@ -4382,7 +5253,7 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq250[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("awsElasticBlockStore")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4393,9 +5264,9 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[2] { + if yyq2[2] { if x.HostPath == nil { r.EncodeNil() } else { @@ -4405,7 +5276,7 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq250[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4416,9 +5287,9 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[3] { + if yyq2[3] { if x.Glusterfs == nil { r.EncodeNil() } else { @@ -4428,7 +5299,7 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq250[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("glusterfs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4439,9 +5310,9 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[4] { + if yyq2[4] { if x.NFS == nil { r.EncodeNil() } else { @@ -4451,7 +5322,7 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq250[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nfs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4462,9 +5333,9 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[5] { + if yyq2[5] { if x.RBD == nil { r.EncodeNil() } else { @@ -4474,7 +5345,7 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq250[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rbd")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4485,32 +5356,9 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[6] { - if x.Quobyte == nil { - r.EncodeNil() - } else { - x.Quobyte.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq250[6] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("quobyte")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Quobyte == nil { - r.EncodeNil() - } else { - x.Quobyte.CodecEncodeSelf(e) - } - } - } - if yyr250 || yy2arr250 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[7] { + if yyq2[6] { if x.ISCSI == nil { r.EncodeNil() } else { @@ -4520,7 +5368,7 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq250[7] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("iscsi")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4531,32 +5379,9 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[8] { - if x.FlexVolume == nil { - r.EncodeNil() - } else { - x.FlexVolume.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq250[8] { - 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 yyr250 || yy2arr250 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[9] { + if yyq2[7] { if x.Cinder == nil { r.EncodeNil() } else { @@ -4566,7 +5391,7 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq250[9] { + if yyq2[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cinder")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4577,9 +5402,9 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[10] { + if yyq2[8] { if x.CephFS == nil { r.EncodeNil() } else { @@ -4589,7 +5414,7 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq250[10] { + if yyq2[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cephfs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4600,9 +5425,9 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[11] { + if yyq2[9] { if x.FC == nil { r.EncodeNil() } else { @@ -4612,7 +5437,7 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq250[11] { + if yyq2[9] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fc")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4623,9 +5448,9 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[12] { + if yyq2[10] { if x.Flocker == nil { r.EncodeNil() } else { @@ -4635,7 +5460,7 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq250[12] { + if yyq2[10] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("flocker")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4646,9 +5471,32 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[13] { + 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 { @@ -4658,7 +5506,7 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq250[13] { + if yyq2[12] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("azureFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4669,9 +5517,9 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[14] { + if yyq2[13] { if x.VsphereVolume == nil { r.EncodeNil() } else { @@ -4681,7 +5529,7 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq250[14] { + if yyq2[13] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("vsphereVolume")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4692,9 +5540,32 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq250[15] { + if yyq2[14] { + if x.Quobyte == nil { + r.EncodeNil() + } else { + x.Quobyte.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[14] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("quobyte")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Quobyte == nil { + r.EncodeNil() + } else { + x.Quobyte.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[15] { if x.AzureDisk == nil { r.EncodeNil() } else { @@ -4704,7 +5575,7 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq250[15] { + if yyq2[15] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("azureDisk")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4715,7 +5586,76 @@ func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr250 || yy2arr250 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[16] { + if x.PhotonPersistentDisk == nil { + r.EncodeNil() + } else { + x.PhotonPersistentDisk.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[16] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("photonPersistentDisk")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.PhotonPersistentDisk == nil { + r.EncodeNil() + } else { + x.PhotonPersistentDisk.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[17] { + if x.PortworxVolume == nil { + r.EncodeNil() + } else { + x.PortworxVolume.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[17] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("portworxVolume")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.PortworxVolume == nil { + r.EncodeNil() + } else { + x.PortworxVolume.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[18] { + if x.ScaleIO == nil { + r.EncodeNil() + } else { + x.ScaleIO.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[18] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("scaleIO")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ScaleIO == nil { + r.EncodeNil() + } else { + x.ScaleIO.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -4728,25 +5668,25 @@ func (x *PersistentVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym267 := z.DecBinary() - _ = yym267 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct268 := r.ContainerType() - if yyct268 == codecSelferValueTypeMap1234 { - yyl268 := r.ReadMapStart() - if yyl268 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl268, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct268 == codecSelferValueTypeArray1234 { - yyl268 := r.ReadArrayStart() - if yyl268 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl268, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -4758,12 +5698,12 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys269Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys269Slc - var yyhl269 bool = l >= 0 - for yyj269 := 0; ; yyj269++ { - if yyhl269 { - if yyj269 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -4772,10 +5712,10 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Deco } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys269Slc = r.DecodeBytes(yys269Slc, true, true) - yys269 := string(yys269Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys269 { + switch yys3 { case "gcePersistentDisk": if r.TryDecodeAsNil() { if x.GCEPersistentDisk != nil { @@ -4842,17 +5782,6 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Deco } x.RBD.CodecDecodeSelf(d) } - case "quobyte": - if r.TryDecodeAsNil() { - if x.Quobyte != nil { - x.Quobyte = nil - } - } else { - if x.Quobyte == nil { - x.Quobyte = new(QuobyteVolumeSource) - } - x.Quobyte.CodecDecodeSelf(d) - } case "iscsi": if r.TryDecodeAsNil() { if x.ISCSI != nil { @@ -4864,17 +5793,6 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Deco } 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 { @@ -4919,6 +5837,17 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Deco } 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 { @@ -4941,6 +5870,17 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Deco } x.VsphereVolume.CodecDecodeSelf(d) } + case "quobyte": + if r.TryDecodeAsNil() { + if x.Quobyte != nil { + x.Quobyte = nil + } + } else { + if x.Quobyte == nil { + x.Quobyte = new(QuobyteVolumeSource) + } + x.Quobyte.CodecDecodeSelf(d) + } case "azureDisk": if r.TryDecodeAsNil() { if x.AzureDisk != nil { @@ -4952,10 +5892,43 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Deco } x.AzureDisk.CodecDecodeSelf(d) } + case "photonPersistentDisk": + if r.TryDecodeAsNil() { + if x.PhotonPersistentDisk != nil { + x.PhotonPersistentDisk = nil + } + } else { + if x.PhotonPersistentDisk == nil { + x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource) + } + x.PhotonPersistentDisk.CodecDecodeSelf(d) + } + case "portworxVolume": + if r.TryDecodeAsNil() { + if x.PortworxVolume != nil { + x.PortworxVolume = nil + } + } else { + if x.PortworxVolume == nil { + x.PortworxVolume = new(PortworxVolumeSource) + } + x.PortworxVolume.CodecDecodeSelf(d) + } + case "scaleIO": + if r.TryDecodeAsNil() { + if x.ScaleIO != nil { + x.ScaleIO = nil + } + } else { + if x.ScaleIO == nil { + x.ScaleIO = new(ScaleIOVolumeSource) + } + x.ScaleIO.CodecDecodeSelf(d) + } default: - z.DecStructFieldNotFound(-1, yys269) - } // end switch yys269 - } // end for yyj269 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -4963,16 +5936,16 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj286 int - var yyb286 bool - var yyhl286 bool = l >= 0 - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l + var yyj23 int + var yyb23 bool + var yyhl23 bool = l >= 0 + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb286 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb286 { + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4987,13 +5960,13 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De } x.GCEPersistentDisk.CodecDecodeSelf(d) } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb286 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb286 { + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5008,13 +5981,13 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De } x.AWSElasticBlockStore.CodecDecodeSelf(d) } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb286 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb286 { + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5029,13 +6002,13 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De } x.HostPath.CodecDecodeSelf(d) } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb286 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb286 { + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5050,13 +6023,13 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De } x.Glusterfs.CodecDecodeSelf(d) } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb286 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb286 { + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5071,13 +6044,13 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De } x.NFS.CodecDecodeSelf(d) } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb286 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb286 { + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5092,34 +6065,13 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De } x.RBD.CodecDecodeSelf(d) } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb286 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb286 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Quobyte != nil { - x.Quobyte = nil - } - } else { - if x.Quobyte == nil { - x.Quobyte = new(QuobyteVolumeSource) - } - x.Quobyte.CodecDecodeSelf(d) - } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l - } else { - yyb286 = r.CheckBreak() - } - if yyb286 { + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5134,34 +6086,13 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De } x.ISCSI.CodecDecodeSelf(d) } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb286 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb286 { - 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) - } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l - } else { - yyb286 = r.CheckBreak() - } - if yyb286 { + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5176,13 +6107,13 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De } x.Cinder.CodecDecodeSelf(d) } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb286 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb286 { + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5197,13 +6128,13 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De } x.CephFS.CodecDecodeSelf(d) } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb286 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb286 { + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5218,13 +6149,13 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De } x.FC.CodecDecodeSelf(d) } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb286 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb286 { + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5239,13 +6170,34 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De } x.Flocker.CodecDecodeSelf(d) } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb286 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb286 { + 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) + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5260,13 +6212,13 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De } x.AzureFile.CodecDecodeSelf(d) } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb286 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb286 { + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5281,13 +6233,34 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De } x.VsphereVolume.CodecDecodeSelf(d) } - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb286 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb286 { + if yyb23 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Quobyte != nil { + x.Quobyte = nil + } + } else { + if x.Quobyte == nil { + x.Quobyte = new(QuobyteVolumeSource) + } + x.Quobyte.CodecDecodeSelf(d) + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5302,228 +6275,81 @@ func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.De } x.AzureDisk.CodecDecodeSelf(d) } - for { - yyj286++ - if yyhl286 { - yyb286 = yyj286 > l - } else { - yyb286 = r.CheckBreak() - } - if yyb286 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj286-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() + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yym303 := z.EncBinary() - _ = yym303 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep304 := !z.EncBinary() - yy2arr304 := z.EncBasicHandle().StructToArray - var yyq304 [2]bool - _, _, _ = yysep304, yyq304, yy2arr304 - const yyr304 bool = false - yyq304[1] = x.ReadOnly != false - var yynn304 int - if yyr304 || yy2arr304 { - r.EncodeArrayStart(2) - } else { - yynn304 = 1 - for _, b := range yyq304 { - if b { - yynn304++ - } - } - r.EncodeMapStart(yynn304) - yynn304 = 0 - } - if yyr304 || yy2arr304 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym306 := z.EncBinary() - _ = yym306 - 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) - yym307 := z.EncBinary() - _ = yym307 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClaimName)) - } - } - if yyr304 || yy2arr304 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq304[1] { - yym309 := z.EncBinary() - _ = yym309 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq304[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("readOnly")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym310 := z.EncBinary() - _ = yym310 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } - } - if yyr304 || yy2arr304 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } + yyb23 = r.CheckBreak() } -} - -func (x *PersistentVolumeClaimVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym311 := z.DecBinary() - _ = yym311 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct312 := r.ContainerType() - if yyct312 == codecSelferValueTypeMap1234 { - yyl312 := r.ReadMapStart() - if yyl312 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl312, d) - } - } else if yyct312 == codecSelferValueTypeArray1234 { - yyl312 := r.ReadArrayStart() - if yyl312 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl312, 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 yys313Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys313Slc - var yyhl313 bool = l >= 0 - for yyj313 := 0; ; yyj313++ { - if yyhl313 { - if yyj313 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys313Slc = r.DecodeBytes(yys313Slc, true, true) - yys313 := string(yys313Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys313 { - 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, yys313) - } // end switch yys313 - } // end for yyj313 - 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 yyj316 int - var yyb316 bool - var yyhl316 bool = l >= 0 - yyj316++ - if yyhl316 { - yyb316 = yyj316 > l - } else { - yyb316 = r.CheckBreak() - } - if yyb316 { + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ClaimName = "" + if x.PhotonPersistentDisk != nil { + x.PhotonPersistentDisk = nil + } } else { - x.ClaimName = string(r.DecodeString()) + if x.PhotonPersistentDisk == nil { + x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource) + } + x.PhotonPersistentDisk.CodecDecodeSelf(d) } - yyj316++ - if yyhl316 { - yyb316 = yyj316 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb316 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb316 { + if yyb23 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ReadOnly = false + if x.PortworxVolume != nil { + x.PortworxVolume = nil + } } else { - x.ReadOnly = bool(r.DecodeBool()) + if x.PortworxVolume == nil { + x.PortworxVolume = new(PortworxVolumeSource) + } + x.PortworxVolume.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() { + if x.ScaleIO != nil { + x.ScaleIO = nil + } + } else { + if x.ScaleIO == nil { + x.ScaleIO = new(ScaleIOVolumeSource) + } + x.ScaleIO.CodecDecodeSelf(d) } for { - yyj316++ - if yyhl316 { - yyb316 = yyj316 > l + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l } else { - yyb316 = r.CheckBreak() + yyb23 = r.CheckBreak() } - if yyb316 { + if yyb23 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj316-1, "") + z.DecStructFieldNotFound(yyj23-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -5535,39 +6361,39 @@ func (x *PersistentVolume) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym319 := z.EncBinary() - _ = yym319 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep320 := !z.EncBinary() - yy2arr320 := z.EncBasicHandle().StructToArray - var yyq320 [5]bool - _, _, _ = yysep320, yyq320, yy2arr320 - const yyr320 bool = false - yyq320[0] = x.Kind != "" - yyq320[1] = x.APIVersion != "" - yyq320[2] = true - yyq320[3] = true - yyq320[4] = true - var yynn320 int - if yyr320 || yy2arr320 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn320 = 0 - for _, b := range yyq320 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn320++ + yynn2++ } } - r.EncodeMapStart(yynn320) - yynn320 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr320 || yy2arr320 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq320[0] { - yym322 := z.EncBinary() - _ = yym322 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -5576,23 +6402,23 @@ func (x *PersistentVolume) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq320[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym323 := z.EncBinary() - _ = yym323 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr320 || yy2arr320 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq320[1] { - yym325 := z.EncBinary() - _ = yym325 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -5601,70 +6427,82 @@ func (x *PersistentVolume) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq320[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym326 := z.EncBinary() - _ = yym326 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr320 || yy2arr320 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq320[2] { - yy328 := &x.ObjectMeta - yy328.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq320[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy329 := &x.ObjectMeta - yy329.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr320 || yy2arr320 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq320[3] { - yy331 := &x.Spec - yy331.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq320[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy332 := &x.Spec - yy332.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr320 || yy2arr320 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq320[4] { - yy334 := &x.Status - yy334.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq320[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy335 := &x.Status - yy335.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr320 || yy2arr320 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -5677,25 +6515,25 @@ func (x *PersistentVolume) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym336 := z.DecBinary() - _ = yym336 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct337 := r.ContainerType() - if yyct337 == codecSelferValueTypeMap1234 { - yyl337 := r.ReadMapStart() - if yyl337 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl337, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct337 == codecSelferValueTypeArray1234 { - yyl337 := r.ReadArrayStart() - if yyl337 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl337, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -5707,12 +6545,12 @@ func (x *PersistentVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys338Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys338Slc - var yyhl338 bool = l >= 0 - for yyj338 := 0; ; yyj338++ { - if yyhl338 { - if yyj338 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -5721,47 +6559,65 @@ func (x *PersistentVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys338Slc = r.DecodeBytes(yys338Slc, true, true) - yys338 := string(yys338Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys338 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv341 := &x.ObjectMeta - yyv341.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PersistentVolumeSpec{} } else { - yyv342 := &x.Spec - yyv342.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PersistentVolumeStatus{} } else { - yyv343 := &x.Status - yyv343.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys338) - } // end switch yys338 - } // end for yyj338 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -5769,16 +6625,16 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj344 int - var yyb344 bool - var yyhl344 bool = l >= 0 - yyj344++ - if yyhl344 { - yyb344 = yyj344 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb344 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb344 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5786,15 +6642,21 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj344++ - if yyhl344 { - yyb344 = yyj344 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb344 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb344 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5802,32 +6664,44 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj344++ - if yyhl344 { - yyb344 = yyj344 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb344 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb344 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv347 := &x.ObjectMeta - yyv347.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj344++ - if yyhl344 { - yyb344 = yyj344 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb344 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb344 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5835,16 +6709,16 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Spec = PersistentVolumeSpec{} } else { - yyv348 := &x.Spec - yyv348.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj344++ - if yyhl344 { - yyb344 = yyj344 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb344 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb344 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5852,21 +6726,21 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Status = PersistentVolumeStatus{} } else { - yyv349 := &x.Status - yyv349.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj344++ - if yyhl344 { - yyb344 = yyj344 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb344 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb344 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj344-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -5878,77 +6752,88 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym350 := z.EncBinary() - _ = yym350 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep351 := !z.EncBinary() - yy2arr351 := z.EncBasicHandle().StructToArray - var yyq351 [20]bool - _, _, _ = yysep351, yyq351, yy2arr351 - const yyr351 bool = false - yyq351[1] = x.PersistentVolumeSource.GCEPersistentDisk != nil && x.GCEPersistentDisk != nil - yyq351[2] = x.PersistentVolumeSource.AWSElasticBlockStore != nil && x.AWSElasticBlockStore != nil - yyq351[3] = x.PersistentVolumeSource.HostPath != nil && x.HostPath != nil - yyq351[4] = x.PersistentVolumeSource.Glusterfs != nil && x.Glusterfs != nil - yyq351[5] = x.PersistentVolumeSource.NFS != nil && x.NFS != nil - yyq351[6] = x.PersistentVolumeSource.RBD != nil && x.RBD != nil - yyq351[7] = x.PersistentVolumeSource.Quobyte != nil && x.Quobyte != nil - yyq351[8] = x.PersistentVolumeSource.ISCSI != nil && x.ISCSI != nil - yyq351[9] = x.PersistentVolumeSource.FlexVolume != nil && x.FlexVolume != nil - yyq351[10] = x.PersistentVolumeSource.Cinder != nil && x.Cinder != nil - yyq351[11] = x.PersistentVolumeSource.CephFS != nil && x.CephFS != nil - yyq351[12] = x.PersistentVolumeSource.FC != nil && x.FC != nil - yyq351[13] = x.PersistentVolumeSource.Flocker != nil && x.Flocker != nil - yyq351[14] = x.PersistentVolumeSource.AzureFile != nil && x.AzureFile != nil - yyq351[15] = x.PersistentVolumeSource.VsphereVolume != nil && x.VsphereVolume != nil - yyq351[16] = x.PersistentVolumeSource.AzureDisk != nil && x.AzureDisk != nil - yyq351[17] = len(x.AccessModes) != 0 - yyq351[18] = x.ClaimRef != nil - yyq351[19] = x.PersistentVolumeReclaimPolicy != "" - var yynn351 int - if yyr351 || yy2arr351 { - r.EncodeArrayStart(20) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [24]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = len(x.Capacity) != 0 + yyq2[1] = x.PersistentVolumeSource.GCEPersistentDisk != nil && x.GCEPersistentDisk != nil + yyq2[2] = x.PersistentVolumeSource.AWSElasticBlockStore != nil && x.AWSElasticBlockStore != nil + yyq2[3] = x.PersistentVolumeSource.HostPath != nil && x.HostPath != nil + yyq2[4] = x.PersistentVolumeSource.Glusterfs != nil && x.Glusterfs != nil + yyq2[5] = x.PersistentVolumeSource.NFS != nil && x.NFS != nil + yyq2[6] = x.PersistentVolumeSource.RBD != nil && x.RBD != nil + yyq2[7] = x.PersistentVolumeSource.ISCSI != nil && x.ISCSI != nil + yyq2[8] = x.PersistentVolumeSource.Cinder != nil && x.Cinder != nil + yyq2[9] = x.PersistentVolumeSource.CephFS != nil && x.CephFS != nil + yyq2[10] = x.PersistentVolumeSource.FC != nil && x.FC != nil + yyq2[11] = x.PersistentVolumeSource.Flocker != nil && x.Flocker != nil + yyq2[12] = x.PersistentVolumeSource.FlexVolume != nil && x.FlexVolume != nil + yyq2[13] = x.PersistentVolumeSource.AzureFile != nil && x.AzureFile != nil + yyq2[14] = x.PersistentVolumeSource.VsphereVolume != nil && x.VsphereVolume != nil + yyq2[15] = x.PersistentVolumeSource.Quobyte != nil && x.Quobyte != nil + yyq2[16] = x.PersistentVolumeSource.AzureDisk != nil && x.AzureDisk != nil + yyq2[17] = x.PersistentVolumeSource.PhotonPersistentDisk != nil && x.PhotonPersistentDisk != nil + yyq2[18] = x.PersistentVolumeSource.PortworxVolume != nil && x.PortworxVolume != nil + yyq2[19] = x.PersistentVolumeSource.ScaleIO != nil && x.ScaleIO != nil + yyq2[20] = len(x.AccessModes) != 0 + yyq2[21] = x.ClaimRef != nil + yyq2[22] = x.PersistentVolumeReclaimPolicy != "" + yyq2[23] = x.StorageClassName != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(24) } else { - yynn351 = 1 - for _, b := range yyq351 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn351++ + yynn2++ } } - r.EncodeMapStart(yynn351) - yynn351 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr351 || yy2arr351 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Capacity == nil { - r.EncodeNil() + if yyq2[0] { + if x.Capacity == nil { + r.EncodeNil() + } else { + x.Capacity.CodecEncodeSelf(e) + } } else { - x.Capacity.CodecEncodeSelf(e) + r.EncodeNil() } } 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 yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("capacity")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Capacity == nil { + r.EncodeNil() + } else { + x.Capacity.CodecEncodeSelf(e) + } } } - var yyn353 bool + var yyn6 bool if x.PersistentVolumeSource.GCEPersistentDisk == nil { - yyn353 = true - goto LABEL353 + yyn6 = true + goto LABEL6 } - LABEL353: - if yyr351 || yy2arr351 { - if yyn353 { + LABEL6: + if yyr2 || yy2arr2 { + if yyn6 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[1] { + if yyq2[1] { if x.GCEPersistentDisk == nil { r.EncodeNil() } else { @@ -5959,11 +6844,11 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq351[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("gcePersistentDisk")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn353 { + if yyn6 { r.EncodeNil() } else { if x.GCEPersistentDisk == nil { @@ -5974,18 +6859,18 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn354 bool + var yyn9 bool if x.PersistentVolumeSource.AWSElasticBlockStore == nil { - yyn354 = true - goto LABEL354 + yyn9 = true + goto LABEL9 } - LABEL354: - if yyr351 || yy2arr351 { - if yyn354 { + LABEL9: + if yyr2 || yy2arr2 { + if yyn9 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[2] { + if yyq2[2] { if x.AWSElasticBlockStore == nil { r.EncodeNil() } else { @@ -5996,11 +6881,11 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq351[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("awsElasticBlockStore")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn354 { + if yyn9 { r.EncodeNil() } else { if x.AWSElasticBlockStore == nil { @@ -6011,18 +6896,18 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn355 bool + var yyn12 bool if x.PersistentVolumeSource.HostPath == nil { - yyn355 = true - goto LABEL355 + yyn12 = true + goto LABEL12 } - LABEL355: - if yyr351 || yy2arr351 { - if yyn355 { + LABEL12: + if yyr2 || yy2arr2 { + if yyn12 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[3] { + if yyq2[3] { if x.HostPath == nil { r.EncodeNil() } else { @@ -6033,11 +6918,11 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq351[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn355 { + if yyn12 { r.EncodeNil() } else { if x.HostPath == nil { @@ -6048,18 +6933,18 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn356 bool + var yyn15 bool if x.PersistentVolumeSource.Glusterfs == nil { - yyn356 = true - goto LABEL356 + yyn15 = true + goto LABEL15 } - LABEL356: - if yyr351 || yy2arr351 { - if yyn356 { + LABEL15: + if yyr2 || yy2arr2 { + if yyn15 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[4] { + if yyq2[4] { if x.Glusterfs == nil { r.EncodeNil() } else { @@ -6070,11 +6955,11 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq351[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("glusterfs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn356 { + if yyn15 { r.EncodeNil() } else { if x.Glusterfs == nil { @@ -6085,18 +6970,18 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn357 bool + var yyn18 bool if x.PersistentVolumeSource.NFS == nil { - yyn357 = true - goto LABEL357 + yyn18 = true + goto LABEL18 } - LABEL357: - if yyr351 || yy2arr351 { - if yyn357 { + LABEL18: + if yyr2 || yy2arr2 { + if yyn18 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[5] { + if yyq2[5] { if x.NFS == nil { r.EncodeNil() } else { @@ -6107,11 +6992,11 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq351[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nfs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn357 { + if yyn18 { r.EncodeNil() } else { if x.NFS == nil { @@ -6122,18 +7007,18 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn358 bool + var yyn21 bool if x.PersistentVolumeSource.RBD == nil { - yyn358 = true - goto LABEL358 + yyn21 = true + goto LABEL21 } - LABEL358: - if yyr351 || yy2arr351 { - if yyn358 { + LABEL21: + if yyr2 || yy2arr2 { + if yyn21 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[6] { + if yyq2[6] { if x.RBD == nil { r.EncodeNil() } else { @@ -6144,11 +7029,11 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq351[6] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rbd")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn358 { + if yyn21 { r.EncodeNil() } else { if x.RBD == nil { @@ -6159,55 +7044,18 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn359 bool - if x.PersistentVolumeSource.Quobyte == nil { - yyn359 = true - goto LABEL359 - } - LABEL359: - if yyr351 || yy2arr351 { - if yyn359 { - r.EncodeNil() - } else { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[7] { - if x.Quobyte == nil { - r.EncodeNil() - } else { - x.Quobyte.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq351[7] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("quobyte")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn359 { - r.EncodeNil() - } else { - if x.Quobyte == nil { - r.EncodeNil() - } else { - x.Quobyte.CodecEncodeSelf(e) - } - } - } - } - var yyn360 bool + var yyn24 bool if x.PersistentVolumeSource.ISCSI == nil { - yyn360 = true - goto LABEL360 + yyn24 = true + goto LABEL24 } - LABEL360: - if yyr351 || yy2arr351 { - if yyn360 { + LABEL24: + if yyr2 || yy2arr2 { + if yyn24 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[8] { + if yyq2[7] { if x.ISCSI == nil { r.EncodeNil() } else { @@ -6218,11 +7066,11 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq351[8] { + if yyq2[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("iscsi")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn360 { + if yyn24 { r.EncodeNil() } else { if x.ISCSI == nil { @@ -6233,55 +7081,18 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn361 bool - if x.PersistentVolumeSource.FlexVolume == nil { - yyn361 = true - goto LABEL361 - } - LABEL361: - if yyr351 || yy2arr351 { - if yyn361 { - r.EncodeNil() - } else { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[9] { - if x.FlexVolume == nil { - r.EncodeNil() - } else { - x.FlexVolume.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq351[9] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("flexVolume")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn361 { - r.EncodeNil() - } else { - if x.FlexVolume == nil { - r.EncodeNil() - } else { - x.FlexVolume.CodecEncodeSelf(e) - } - } - } - } - var yyn362 bool + var yyn27 bool if x.PersistentVolumeSource.Cinder == nil { - yyn362 = true - goto LABEL362 + yyn27 = true + goto LABEL27 } - LABEL362: - if yyr351 || yy2arr351 { - if yyn362 { + LABEL27: + if yyr2 || yy2arr2 { + if yyn27 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[10] { + if yyq2[8] { if x.Cinder == nil { r.EncodeNil() } else { @@ -6292,11 +7103,11 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq351[10] { + if yyq2[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cinder")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn362 { + if yyn27 { r.EncodeNil() } else { if x.Cinder == nil { @@ -6307,18 +7118,18 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn363 bool + var yyn30 bool if x.PersistentVolumeSource.CephFS == nil { - yyn363 = true - goto LABEL363 + yyn30 = true + goto LABEL30 } - LABEL363: - if yyr351 || yy2arr351 { - if yyn363 { + LABEL30: + if yyr2 || yy2arr2 { + if yyn30 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[11] { + if yyq2[9] { if x.CephFS == nil { r.EncodeNil() } else { @@ -6329,11 +7140,11 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq351[11] { + if yyq2[9] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cephfs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn363 { + if yyn30 { r.EncodeNil() } else { if x.CephFS == nil { @@ -6344,18 +7155,18 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn364 bool + var yyn33 bool if x.PersistentVolumeSource.FC == nil { - yyn364 = true - goto LABEL364 + yyn33 = true + goto LABEL33 } - LABEL364: - if yyr351 || yy2arr351 { - if yyn364 { + LABEL33: + if yyr2 || yy2arr2 { + if yyn33 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[12] { + if yyq2[10] { if x.FC == nil { r.EncodeNil() } else { @@ -6366,11 +7177,11 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq351[12] { + if yyq2[10] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fc")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn364 { + if yyn33 { r.EncodeNil() } else { if x.FC == nil { @@ -6381,18 +7192,18 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn365 bool + var yyn36 bool if x.PersistentVolumeSource.Flocker == nil { - yyn365 = true - goto LABEL365 + yyn36 = true + goto LABEL36 } - LABEL365: - if yyr351 || yy2arr351 { - if yyn365 { + LABEL36: + if yyr2 || yy2arr2 { + if yyn36 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[13] { + if yyq2[11] { if x.Flocker == nil { r.EncodeNil() } else { @@ -6403,11 +7214,11 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq351[13] { + if yyq2[11] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("flocker")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn365 { + if yyn36 { r.EncodeNil() } else { if x.Flocker == nil { @@ -6418,18 +7229,55 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn366 bool - if x.PersistentVolumeSource.AzureFile == nil { - yyn366 = true - goto LABEL366 + var yyn39 bool + if x.PersistentVolumeSource.FlexVolume == nil { + yyn39 = true + goto LABEL39 } - LABEL366: - if yyr351 || yy2arr351 { - if yyn366 { + LABEL39: + if yyr2 || yy2arr2 { + if yyn39 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[14] { + if yyq2[12] { + if x.FlexVolume == nil { + r.EncodeNil() + } else { + x.FlexVolume.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[12] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("flexVolume")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyn39 { + r.EncodeNil() + } else { + if x.FlexVolume == nil { + r.EncodeNil() + } else { + x.FlexVolume.CodecEncodeSelf(e) + } + } + } + } + var yyn42 bool + if x.PersistentVolumeSource.AzureFile == nil { + yyn42 = true + goto LABEL42 + } + LABEL42: + if yyr2 || yy2arr2 { + if yyn42 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[13] { if x.AzureFile == nil { r.EncodeNil() } else { @@ -6440,11 +7288,11 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq351[14] { + if yyq2[13] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("azureFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn366 { + if yyn42 { r.EncodeNil() } else { if x.AzureFile == nil { @@ -6455,18 +7303,18 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn367 bool + var yyn45 bool if x.PersistentVolumeSource.VsphereVolume == nil { - yyn367 = true - goto LABEL367 + yyn45 = true + goto LABEL45 } - LABEL367: - if yyr351 || yy2arr351 { - if yyn367 { + LABEL45: + if yyr2 || yy2arr2 { + if yyn45 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[15] { + if yyq2[14] { if x.VsphereVolume == nil { r.EncodeNil() } else { @@ -6477,11 +7325,11 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq351[15] { + if yyq2[14] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("vsphereVolume")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn367 { + if yyn45 { r.EncodeNil() } else { if x.VsphereVolume == nil { @@ -6492,18 +7340,55 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn368 bool - if x.PersistentVolumeSource.AzureDisk == nil { - yyn368 = true - goto LABEL368 + var yyn48 bool + if x.PersistentVolumeSource.Quobyte == nil { + yyn48 = true + goto LABEL48 } - LABEL368: - if yyr351 || yy2arr351 { - if yyn368 { + LABEL48: + if yyr2 || yy2arr2 { + if yyn48 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[16] { + if yyq2[15] { + if x.Quobyte == nil { + r.EncodeNil() + } else { + x.Quobyte.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[15] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("quobyte")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyn48 { + r.EncodeNil() + } else { + if x.Quobyte == nil { + r.EncodeNil() + } else { + x.Quobyte.CodecEncodeSelf(e) + } + } + } + } + var yyn51 bool + if x.PersistentVolumeSource.AzureDisk == nil { + yyn51 = true + goto LABEL51 + } + LABEL51: + if yyr2 || yy2arr2 { + if yyn51 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[16] { if x.AzureDisk == nil { r.EncodeNil() } else { @@ -6514,11 +7399,11 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq351[16] { + if yyq2[16] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("azureDisk")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn368 { + if yyn51 { r.EncodeNil() } else { if x.AzureDisk == nil { @@ -6529,14 +7414,125 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr351 || yy2arr351 { + var yyn54 bool + if x.PersistentVolumeSource.PhotonPersistentDisk == nil { + yyn54 = true + goto LABEL54 + } + LABEL54: + if yyr2 || yy2arr2 { + if yyn54 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[17] { + if x.PhotonPersistentDisk == nil { + r.EncodeNil() + } else { + x.PhotonPersistentDisk.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[17] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("photonPersistentDisk")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyn54 { + r.EncodeNil() + } else { + if x.PhotonPersistentDisk == nil { + r.EncodeNil() + } else { + x.PhotonPersistentDisk.CodecEncodeSelf(e) + } + } + } + } + var yyn57 bool + if x.PersistentVolumeSource.PortworxVolume == nil { + yyn57 = true + goto LABEL57 + } + LABEL57: + if yyr2 || yy2arr2 { + if yyn57 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[18] { + if x.PortworxVolume == nil { + r.EncodeNil() + } else { + x.PortworxVolume.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[18] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("portworxVolume")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyn57 { + r.EncodeNil() + } else { + if x.PortworxVolume == nil { + r.EncodeNil() + } else { + x.PortworxVolume.CodecEncodeSelf(e) + } + } + } + } + var yyn60 bool + if x.PersistentVolumeSource.ScaleIO == nil { + yyn60 = true + goto LABEL60 + } + LABEL60: + if yyr2 || yy2arr2 { + if yyn60 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[19] { + if x.ScaleIO == nil { + r.EncodeNil() + } else { + x.ScaleIO.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[19] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("scaleIO")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyn60 { + r.EncodeNil() + } else { + if x.ScaleIO == nil { + r.EncodeNil() + } else { + x.ScaleIO.CodecEncodeSelf(e) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[17] { + if yyq2[20] { if x.AccessModes == nil { r.EncodeNil() } else { - yym370 := z.EncBinary() - _ = yym370 + yym64 := z.EncBinary() + _ = yym64 if false { } else { h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e) @@ -6546,15 +7542,15 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq351[17] { + if yyq2[20] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("accessModes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.AccessModes == nil { r.EncodeNil() } else { - yym371 := z.EncBinary() - _ = yym371 + yym65 := z.EncBinary() + _ = yym65 if false { } else { h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e) @@ -6562,9 +7558,9 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr351 || yy2arr351 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[18] { + if yyq2[21] { if x.ClaimRef == nil { r.EncodeNil() } else { @@ -6574,7 +7570,7 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq351[18] { + if yyq2[21] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("claimRef")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -6585,22 +7581,47 @@ func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr351 || yy2arr351 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq351[19] { + if yyq2[22] { x.PersistentVolumeReclaimPolicy.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq351[19] { + if yyq2[22] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("persistentVolumeReclaimPolicy")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.PersistentVolumeReclaimPolicy.CodecEncodeSelf(e) } } - if yyr351 || yy2arr351 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[23] { + yym73 := z.EncBinary() + _ = yym73 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.StorageClassName)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[23] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("storageClassName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym74 := z.EncBinary() + _ = yym74 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.StorageClassName)) + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6613,25 +7634,25 @@ func (x *PersistentVolumeSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym374 := z.DecBinary() - _ = yym374 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct375 := r.ContainerType() - if yyct375 == codecSelferValueTypeMap1234 { - yyl375 := r.ReadMapStart() - if yyl375 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl375, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct375 == codecSelferValueTypeArray1234 { - yyl375 := r.ReadArrayStart() - if yyl375 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl375, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6643,12 +7664,12 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys376Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys376Slc - var yyhl376 bool = l >= 0 - for yyj376 := 0; ; yyj376++ { - if yyhl376 { - if yyj376 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -6657,16 +7678,16 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys376Slc = r.DecodeBytes(yys376Slc, true, true) - yys376 := string(yys376Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys376 { + switch yys3 { case "capacity": if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv377 := &x.Capacity - yyv377.CodecDecodeSelf(d) + yyv4 := &x.Capacity + yyv4.CodecDecodeSelf(d) } case "gcePersistentDisk": if x.PersistentVolumeSource.GCEPersistentDisk == nil { @@ -6752,20 +7773,6 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decode } x.RBD.CodecDecodeSelf(d) } - case "quobyte": - if x.PersistentVolumeSource.Quobyte == nil { - x.PersistentVolumeSource.Quobyte = new(QuobyteVolumeSource) - } - if r.TryDecodeAsNil() { - if x.Quobyte != nil { - x.Quobyte = nil - } - } else { - if x.Quobyte == nil { - x.Quobyte = new(QuobyteVolumeSource) - } - x.Quobyte.CodecDecodeSelf(d) - } case "iscsi": if x.PersistentVolumeSource.ISCSI == nil { x.PersistentVolumeSource.ISCSI = new(ISCSIVolumeSource) @@ -6780,20 +7787,6 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decode } 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) @@ -6850,6 +7843,20 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decode } 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) @@ -6878,6 +7885,20 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decode } x.VsphereVolume.CodecDecodeSelf(d) } + case "quobyte": + if x.PersistentVolumeSource.Quobyte == nil { + x.PersistentVolumeSource.Quobyte = new(QuobyteVolumeSource) + } + if r.TryDecodeAsNil() { + if x.Quobyte != nil { + x.Quobyte = nil + } + } else { + if x.Quobyte == nil { + x.Quobyte = new(QuobyteVolumeSource) + } + x.Quobyte.CodecDecodeSelf(d) + } case "azureDisk": if x.PersistentVolumeSource.AzureDisk == nil { x.PersistentVolumeSource.AzureDisk = new(AzureDiskVolumeSource) @@ -6892,16 +7913,58 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decode } x.AzureDisk.CodecDecodeSelf(d) } + case "photonPersistentDisk": + if x.PersistentVolumeSource.PhotonPersistentDisk == nil { + x.PersistentVolumeSource.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource) + } + if r.TryDecodeAsNil() { + if x.PhotonPersistentDisk != nil { + x.PhotonPersistentDisk = nil + } + } else { + if x.PhotonPersistentDisk == nil { + x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource) + } + x.PhotonPersistentDisk.CodecDecodeSelf(d) + } + case "portworxVolume": + if x.PersistentVolumeSource.PortworxVolume == nil { + x.PersistentVolumeSource.PortworxVolume = new(PortworxVolumeSource) + } + if r.TryDecodeAsNil() { + if x.PortworxVolume != nil { + x.PortworxVolume = nil + } + } else { + if x.PortworxVolume == nil { + x.PortworxVolume = new(PortworxVolumeSource) + } + x.PortworxVolume.CodecDecodeSelf(d) + } + case "scaleIO": + if x.PersistentVolumeSource.ScaleIO == nil { + x.PersistentVolumeSource.ScaleIO = new(ScaleIOVolumeSource) + } + if r.TryDecodeAsNil() { + if x.ScaleIO != nil { + x.ScaleIO = nil + } + } else { + if x.ScaleIO == nil { + x.ScaleIO = new(ScaleIOVolumeSource) + } + x.ScaleIO.CodecDecodeSelf(d) + } case "accessModes": if r.TryDecodeAsNil() { x.AccessModes = nil } else { - yyv394 := &x.AccessModes - yym395 := z.DecBinary() - _ = yym395 + yyv24 := &x.AccessModes + yym25 := z.DecBinary() + _ = yym25 if false { } else { - h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv394), d) + h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv24), d) } } case "claimRef": @@ -6919,12 +7982,25 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.PersistentVolumeReclaimPolicy = "" } else { - x.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(r.DecodeString()) + yyv27 := &x.PersistentVolumeReclaimPolicy + yyv27.CodecDecodeSelf(d) + } + case "storageClassName": + if r.TryDecodeAsNil() { + x.StorageClassName = "" + } else { + yyv28 := &x.StorageClassName + yym29 := z.DecBinary() + _ = yym29 + if false { + } else { + *((*string)(yyv28)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys376) - } // end switch yys376 - } // end for yyj376 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -6932,16 +8008,16 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj398 int - var yyb398 bool - var yyhl398 bool = l >= 0 - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + var yyj30 int + var yyb30 bool + var yyhl30 bool = l >= 0 + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6949,19 +8025,19 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv399 := &x.Capacity - yyv399.CodecDecodeSelf(d) + yyv31 := &x.Capacity + yyv31.CodecDecodeSelf(d) } if x.PersistentVolumeSource.GCEPersistentDisk == nil { x.PersistentVolumeSource.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6979,13 +8055,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco if x.PersistentVolumeSource.AWSElasticBlockStore == nil { x.PersistentVolumeSource.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7003,13 +8079,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco if x.PersistentVolumeSource.HostPath == nil { x.PersistentVolumeSource.HostPath = new(HostPathVolumeSource) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7027,13 +8103,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco if x.PersistentVolumeSource.Glusterfs == nil { x.PersistentVolumeSource.Glusterfs = new(GlusterfsVolumeSource) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7051,13 +8127,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco if x.PersistentVolumeSource.NFS == nil { x.PersistentVolumeSource.NFS = new(NFSVolumeSource) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7075,13 +8151,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco if x.PersistentVolumeSource.RBD == nil { x.PersistentVolumeSource.RBD = new(RBDVolumeSource) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7096,40 +8172,16 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco } x.RBD.CodecDecodeSelf(d) } - if x.PersistentVolumeSource.Quobyte == nil { - x.PersistentVolumeSource.Quobyte = new(QuobyteVolumeSource) - } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l - } else { - yyb398 = r.CheckBreak() - } - if yyb398 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Quobyte != nil { - x.Quobyte = nil - } - } else { - if x.Quobyte == nil { - x.Quobyte = new(QuobyteVolumeSource) - } - x.Quobyte.CodecDecodeSelf(d) - } if x.PersistentVolumeSource.ISCSI == nil { x.PersistentVolumeSource.ISCSI = new(ISCSIVolumeSource) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7144,40 +8196,16 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco } x.ISCSI.CodecDecodeSelf(d) } - if x.PersistentVolumeSource.FlexVolume == nil { - x.PersistentVolumeSource.FlexVolume = new(FlexVolumeSource) - } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l - } else { - yyb398 = r.CheckBreak() - } - if yyb398 { - 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) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7195,13 +8223,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco if x.PersistentVolumeSource.CephFS == nil { x.PersistentVolumeSource.CephFS = new(CephFSVolumeSource) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7219,13 +8247,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco if x.PersistentVolumeSource.FC == nil { x.PersistentVolumeSource.FC = new(FCVolumeSource) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7243,13 +8271,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco if x.PersistentVolumeSource.Flocker == nil { x.PersistentVolumeSource.Flocker = new(FlockerVolumeSource) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7264,16 +8292,40 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco } x.Flocker.CodecDecodeSelf(d) } + if x.PersistentVolumeSource.FlexVolume == nil { + x.PersistentVolumeSource.FlexVolume = new(FlexVolumeSource) + } + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l + } else { + yyb30 = r.CheckBreak() + } + if yyb30 { + 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) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7291,13 +8343,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco if x.PersistentVolumeSource.VsphereVolume == nil { x.PersistentVolumeSource.VsphereVolume = new(VsphereVirtualDiskVolumeSource) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7312,16 +8364,40 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco } x.VsphereVolume.CodecDecodeSelf(d) } + if x.PersistentVolumeSource.Quobyte == nil { + x.PersistentVolumeSource.Quobyte = new(QuobyteVolumeSource) + } + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l + } else { + yyb30 = r.CheckBreak() + } + if yyb30 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Quobyte != nil { + x.Quobyte = nil + } + } else { + if x.Quobyte == nil { + x.Quobyte = new(QuobyteVolumeSource) + } + x.Quobyte.CodecDecodeSelf(d) + } if x.PersistentVolumeSource.AzureDisk == nil { x.PersistentVolumeSource.AzureDisk = new(AzureDiskVolumeSource) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7336,13 +8412,85 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco } x.AzureDisk.CodecDecodeSelf(d) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l - } else { - yyb398 = r.CheckBreak() + if x.PersistentVolumeSource.PhotonPersistentDisk == nil { + x.PersistentVolumeSource.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource) } - if yyb398 { + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l + } else { + yyb30 = r.CheckBreak() + } + if yyb30 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.PhotonPersistentDisk != nil { + x.PhotonPersistentDisk = nil + } + } else { + if x.PhotonPersistentDisk == nil { + x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource) + } + x.PhotonPersistentDisk.CodecDecodeSelf(d) + } + if x.PersistentVolumeSource.PortworxVolume == nil { + x.PersistentVolumeSource.PortworxVolume = new(PortworxVolumeSource) + } + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l + } else { + yyb30 = r.CheckBreak() + } + if yyb30 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.PortworxVolume != nil { + x.PortworxVolume = nil + } + } else { + if x.PortworxVolume == nil { + x.PortworxVolume = new(PortworxVolumeSource) + } + x.PortworxVolume.CodecDecodeSelf(d) + } + if x.PersistentVolumeSource.ScaleIO == nil { + x.PersistentVolumeSource.ScaleIO = new(ScaleIOVolumeSource) + } + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l + } else { + yyb30 = r.CheckBreak() + } + if yyb30 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ScaleIO != nil { + x.ScaleIO = nil + } + } else { + if x.ScaleIO == nil { + x.ScaleIO = new(ScaleIOVolumeSource) + } + x.ScaleIO.CodecDecodeSelf(d) + } + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l + } else { + yyb30 = r.CheckBreak() + } + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7350,21 +8498,21 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.AccessModes = nil } else { - yyv416 := &x.AccessModes - yym417 := z.DecBinary() - _ = yym417 + yyv51 := &x.AccessModes + yym52 := z.DecBinary() + _ = yym52 if false { } else { - h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv416), d) + h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv51), d) } } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7379,13 +8527,13 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco } x.ClaimRef.CodecDecodeSelf(d) } - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7393,20 +8541,43 @@ func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.PersistentVolumeReclaimPolicy = "" } else { - x.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(r.DecodeString()) + yyv54 := &x.PersistentVolumeReclaimPolicy + yyv54.CodecDecodeSelf(d) + } + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l + } else { + yyb30 = r.CheckBreak() + } + if yyb30 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.StorageClassName = "" + } else { + yyv55 := &x.StorageClassName + yym56 := z.DecBinary() + _ = yym56 + if false { + } else { + *((*string)(yyv55)) = r.DecodeString() + } } for { - yyj398++ - if yyhl398 { - yyb398 = yyj398 > l + yyj30++ + if yyhl30 { + yyb30 = yyj30 > l } else { - yyb398 = r.CheckBreak() + yyb30 = r.CheckBreak() } - if yyb398 { + if yyb30 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj398-1, "") + z.DecStructFieldNotFound(yyj30-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -7415,8 +8586,8 @@ func (x PersistentVolumeReclaimPolicy) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym420 := z.EncBinary() - _ = yym420 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -7428,8 +8599,8 @@ func (x *PersistentVolumeReclaimPolicy) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym421 := z.DecBinary() - _ = yym421 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -7444,52 +8615,52 @@ func (x *PersistentVolumeStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym422 := z.EncBinary() - _ = yym422 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep423 := !z.EncBinary() - yy2arr423 := z.EncBasicHandle().StructToArray - var yyq423 [3]bool - _, _, _ = yysep423, yyq423, yy2arr423 - const yyr423 bool = false - yyq423[0] = x.Phase != "" - yyq423[1] = x.Message != "" - yyq423[2] = x.Reason != "" - var yynn423 int - if yyr423 || yy2arr423 { + 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 { - yynn423 = 0 - for _, b := range yyq423 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn423++ + yynn2++ } } - r.EncodeMapStart(yynn423) - yynn423 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr423 || yy2arr423 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq423[0] { + if yyq2[0] { x.Phase.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq423[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("phase")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Phase.CodecEncodeSelf(e) } } - if yyr423 || yy2arr423 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq423[1] { - yym426 := z.EncBinary() - _ = yym426 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -7498,23 +8669,23 @@ func (x *PersistentVolumeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq423[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym427 := z.EncBinary() - _ = yym427 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr423 || yy2arr423 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq423[2] { - yym429 := z.EncBinary() - _ = yym429 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -7523,19 +8694,19 @@ func (x *PersistentVolumeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq423[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym430 := z.EncBinary() - _ = yym430 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr423 || yy2arr423 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -7548,25 +8719,25 @@ func (x *PersistentVolumeStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym431 := z.DecBinary() - _ = yym431 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct432 := r.ContainerType() - if yyct432 == codecSelferValueTypeMap1234 { - yyl432 := r.ReadMapStart() - if yyl432 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl432, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct432 == codecSelferValueTypeArray1234 { - yyl432 := r.ReadArrayStart() - if yyl432 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl432, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -7578,12 +8749,12 @@ func (x *PersistentVolumeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys433Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys433Slc - var yyhl433 bool = l >= 0 - for yyj433 := 0; ; yyj433++ { - if yyhl433 { - if yyj433 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -7592,32 +8763,45 @@ func (x *PersistentVolumeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Deco } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys433Slc = r.DecodeBytes(yys433Slc, true, true) - yys433 := string(yys433Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys433 { + switch yys3 { case "phase": if r.TryDecodeAsNil() { x.Phase = "" } else { - x.Phase = PersistentVolumePhase(r.DecodeString()) + yyv4 := &x.Phase + yyv4.CodecDecodeSelf(d) } case "message": if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv5 := &x.Message + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } } case "reason": if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv7 := &x.Reason + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*string)(yyv7)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys433) - } // end switch yys433 - } // end for yyj433 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -7625,16 +8809,16 @@ func (x *PersistentVolumeStatus) codecDecodeSelfFromArray(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj437 int - var yyb437 bool - var yyhl437 bool = l >= 0 - yyj437++ - if yyhl437 { - yyb437 = yyj437 > l + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb437 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb437 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7642,15 +8826,16 @@ func (x *PersistentVolumeStatus) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Phase = "" } else { - x.Phase = PersistentVolumePhase(r.DecodeString()) + yyv10 := &x.Phase + yyv10.CodecDecodeSelf(d) } - yyj437++ - if yyhl437 { - yyb437 = yyj437 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb437 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb437 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7658,15 +8843,21 @@ func (x *PersistentVolumeStatus) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv11 := &x.Message + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } - yyj437++ - if yyhl437 { - yyb437 = yyj437 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb437 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb437 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7674,20 +8865,26 @@ func (x *PersistentVolumeStatus) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv13 := &x.Reason + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } for { - yyj437++ - if yyhl437 { - yyb437 = yyj437 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb437 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb437 { + if yyb9 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj437-1, "") + z.DecStructFieldNotFound(yyj9-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -7699,37 +8896,37 @@ func (x *PersistentVolumeList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym441 := z.EncBinary() - _ = yym441 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep442 := !z.EncBinary() - yy2arr442 := z.EncBasicHandle().StructToArray - var yyq442 [4]bool - _, _, _ = yysep442, yyq442, yy2arr442 - const yyr442 bool = false - yyq442[0] = x.Kind != "" - yyq442[1] = x.APIVersion != "" - yyq442[2] = true - var yynn442 int - if yyr442 || yy2arr442 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn442 = 1 - for _, b := range yyq442 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn442++ + yynn2++ } } - r.EncodeMapStart(yynn442) - yynn442 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr442 || yy2arr442 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq442[0] { - yym444 := z.EncBinary() - _ = yym444 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -7738,23 +8935,23 @@ func (x *PersistentVolumeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq442[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym445 := z.EncBinary() - _ = yym445 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr442 || yy2arr442 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq442[1] { - yym447 := z.EncBinary() - _ = yym447 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -7763,54 +8960,54 @@ func (x *PersistentVolumeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq442[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym448 := z.EncBinary() - _ = yym448 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr442 || yy2arr442 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq442[2] { - yy450 := &x.ListMeta - yym451 := z.EncBinary() - _ = yym451 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy450) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy450) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq442[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy452 := &x.ListMeta - yym453 := z.EncBinary() - _ = yym453 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy452) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy452) + z.EncFallback(yy12) } } } - if yyr442 || yy2arr442 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym455 := z.EncBinary() - _ = yym455 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSlicePersistentVolume(([]PersistentVolume)(x.Items), e) @@ -7823,15 +9020,15 @@ func (x *PersistentVolumeList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym456 := z.EncBinary() - _ = yym456 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSlicePersistentVolume(([]PersistentVolume)(x.Items), e) } } } - if yyr442 || yy2arr442 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -7844,25 +9041,25 @@ func (x *PersistentVolumeList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym457 := z.DecBinary() - _ = yym457 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct458 := r.ContainerType() - if yyct458 == codecSelferValueTypeMap1234 { - yyl458 := r.ReadMapStart() - if yyl458 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl458, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct458 == codecSelferValueTypeArray1234 { - yyl458 := r.ReadArrayStart() - if yyl458 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl458, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -7874,12 +9071,12 @@ func (x *PersistentVolumeList) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys459Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys459Slc - var yyhl459 bool = l >= 0 - for yyj459 := 0; ; yyj459++ { - if yyhl459 { - if yyj459 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -7888,51 +9085,63 @@ func (x *PersistentVolumeList) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys459Slc = r.DecodeBytes(yys459Slc, true, true) - yys459 := string(yys459Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys459 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv462 := &x.ListMeta - yym463 := z.DecBinary() - _ = yym463 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv462) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv462, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv464 := &x.Items - yym465 := z.DecBinary() - _ = yym465 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSlicePersistentVolume((*[]PersistentVolume)(yyv464), d) + h.decSlicePersistentVolume((*[]PersistentVolume)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys459) - } // end switch yys459 - } // end for yyj459 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -7940,16 +9149,16 @@ func (x *PersistentVolumeList) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj466 int - var yyb466 bool - var yyhl466 bool = l >= 0 - yyj466++ - if yyhl466 { - yyb466 = yyj466 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb466 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb466 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7957,15 +9166,21 @@ func (x *PersistentVolumeList) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj466++ - if yyhl466 { - yyb466 = yyj466 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb466 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb466 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7973,38 +9188,44 @@ func (x *PersistentVolumeList) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj466++ - if yyhl466 { - yyb466 = yyj466 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb466 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb466 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv469 := &x.ListMeta - yym470 := z.DecBinary() - _ = yym470 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv469) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv469, false) + z.DecFallback(yyv17, false) } } - yyj466++ - if yyhl466 { - yyb466 = yyj466 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb466 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb466 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8012,26 +9233,26 @@ func (x *PersistentVolumeList) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Items = nil } else { - yyv471 := &x.Items - yym472 := z.DecBinary() - _ = yym472 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSlicePersistentVolume((*[]PersistentVolume)(yyv471), d) + h.decSlicePersistentVolume((*[]PersistentVolume)(yyv19), d) } } for { - yyj466++ - if yyhl466 { - yyb466 = yyj466 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb466 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb466 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj466-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -8043,39 +9264,39 @@ func (x *PersistentVolumeClaim) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym473 := z.EncBinary() - _ = yym473 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep474 := !z.EncBinary() - yy2arr474 := z.EncBasicHandle().StructToArray - var yyq474 [5]bool - _, _, _ = yysep474, yyq474, yy2arr474 - const yyr474 bool = false - yyq474[0] = x.Kind != "" - yyq474[1] = x.APIVersion != "" - yyq474[2] = true - yyq474[3] = true - yyq474[4] = true - var yynn474 int - if yyr474 || yy2arr474 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn474 = 0 - for _, b := range yyq474 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn474++ + yynn2++ } } - r.EncodeMapStart(yynn474) - yynn474 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr474 || yy2arr474 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq474[0] { - yym476 := z.EncBinary() - _ = yym476 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -8084,23 +9305,23 @@ func (x *PersistentVolumeClaim) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq474[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym477 := z.EncBinary() - _ = yym477 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr474 || yy2arr474 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq474[1] { - yym479 := z.EncBinary() - _ = yym479 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -8109,70 +9330,82 @@ func (x *PersistentVolumeClaim) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq474[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym480 := z.EncBinary() - _ = yym480 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr474 || yy2arr474 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq474[2] { - yy482 := &x.ObjectMeta - yy482.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq474[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy483 := &x.ObjectMeta - yy483.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr474 || yy2arr474 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq474[3] { - yy485 := &x.Spec - yy485.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq474[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy486 := &x.Spec - yy486.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr474 || yy2arr474 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq474[4] { - yy488 := &x.Status - yy488.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq474[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy489 := &x.Status - yy489.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr474 || yy2arr474 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -8185,25 +9418,25 @@ func (x *PersistentVolumeClaim) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym490 := z.DecBinary() - _ = yym490 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct491 := r.ContainerType() - if yyct491 == codecSelferValueTypeMap1234 { - yyl491 := r.ReadMapStart() - if yyl491 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl491, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct491 == codecSelferValueTypeArray1234 { - yyl491 := r.ReadArrayStart() - if yyl491 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl491, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -8215,12 +9448,12 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys492Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys492Slc - var yyhl492 bool = l >= 0 - for yyj492 := 0; ; yyj492++ { - if yyhl492 { - if yyj492 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -8229,47 +9462,65 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys492Slc = r.DecodeBytes(yys492Slc, true, true) - yys492 := string(yys492Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys492 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv495 := &x.ObjectMeta - yyv495.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PersistentVolumeClaimSpec{} } else { - yyv496 := &x.Spec - yyv496.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PersistentVolumeClaimStatus{} } else { - yyv497 := &x.Status - yyv497.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys492) - } // end switch yys492 - } // end for yyj492 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -8277,16 +9528,16 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj498 int - var yyb498 bool - var yyhl498 bool = l >= 0 - yyj498++ - if yyhl498 { - yyb498 = yyj498 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb498 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb498 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8294,15 +9545,21 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj498++ - if yyhl498 { - yyb498 = yyj498 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb498 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb498 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8310,32 +9567,44 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj498++ - if yyhl498 { - yyb498 = yyj498 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb498 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb498 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv501 := &x.ObjectMeta - yyv501.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj498++ - if yyhl498 { - yyb498 = yyj498 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb498 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb498 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8343,16 +9612,16 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Spec = PersistentVolumeClaimSpec{} } else { - yyv502 := &x.Spec - yyv502.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj498++ - if yyhl498 { - yyb498 = yyj498 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb498 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb498 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8360,21 +9629,21 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Status = PersistentVolumeClaimStatus{} } else { - yyv503 := &x.Status - yyv503.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj498++ - if yyhl498 { - yyb498 = yyj498 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb498 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb498 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj498-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -8386,37 +9655,37 @@ func (x *PersistentVolumeClaimList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym504 := z.EncBinary() - _ = yym504 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep505 := !z.EncBinary() - yy2arr505 := z.EncBasicHandle().StructToArray - var yyq505 [4]bool - _, _, _ = yysep505, yyq505, yy2arr505 - const yyr505 bool = false - yyq505[0] = x.Kind != "" - yyq505[1] = x.APIVersion != "" - yyq505[2] = true - var yynn505 int - if yyr505 || yy2arr505 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn505 = 1 - for _, b := range yyq505 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn505++ + yynn2++ } } - r.EncodeMapStart(yynn505) - yynn505 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr505 || yy2arr505 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq505[0] { - yym507 := z.EncBinary() - _ = yym507 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -8425,23 +9694,23 @@ func (x *PersistentVolumeClaimList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq505[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym508 := z.EncBinary() - _ = yym508 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr505 || yy2arr505 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq505[1] { - yym510 := z.EncBinary() - _ = yym510 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -8450,54 +9719,54 @@ func (x *PersistentVolumeClaimList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq505[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym511 := z.EncBinary() - _ = yym511 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr505 || yy2arr505 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq505[2] { - yy513 := &x.ListMeta - yym514 := z.EncBinary() - _ = yym514 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy513) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy513) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq505[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy515 := &x.ListMeta - yym516 := z.EncBinary() - _ = yym516 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy515) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy515) + z.EncFallback(yy12) } } } - if yyr505 || yy2arr505 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym518 := z.EncBinary() - _ = yym518 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSlicePersistentVolumeClaim(([]PersistentVolumeClaim)(x.Items), e) @@ -8510,15 +9779,15 @@ func (x *PersistentVolumeClaimList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym519 := z.EncBinary() - _ = yym519 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSlicePersistentVolumeClaim(([]PersistentVolumeClaim)(x.Items), e) } } } - if yyr505 || yy2arr505 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -8531,25 +9800,25 @@ func (x *PersistentVolumeClaimList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym520 := z.DecBinary() - _ = yym520 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct521 := r.ContainerType() - if yyct521 == codecSelferValueTypeMap1234 { - yyl521 := r.ReadMapStart() - if yyl521 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl521, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct521 == codecSelferValueTypeArray1234 { - yyl521 := r.ReadArrayStart() - if yyl521 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl521, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -8561,12 +9830,12 @@ func (x *PersistentVolumeClaimList) codecDecodeSelfFromMap(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys522Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys522Slc - var yyhl522 bool = l >= 0 - for yyj522 := 0; ; yyj522++ { - if yyhl522 { - if yyj522 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -8575,51 +9844,63 @@ func (x *PersistentVolumeClaimList) codecDecodeSelfFromMap(l int, d *codec1978.D } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys522Slc = r.DecodeBytes(yys522Slc, true, true) - yys522 := string(yys522Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys522 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv525 := &x.ListMeta - yym526 := z.DecBinary() - _ = yym526 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv525) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv525, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv527 := &x.Items - yym528 := z.DecBinary() - _ = yym528 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSlicePersistentVolumeClaim((*[]PersistentVolumeClaim)(yyv527), d) + h.decSlicePersistentVolumeClaim((*[]PersistentVolumeClaim)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys522) - } // end switch yys522 - } // end for yyj522 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -8627,16 +9908,16 @@ func (x *PersistentVolumeClaimList) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj529 int - var yyb529 bool - var yyhl529 bool = l >= 0 - yyj529++ - if yyhl529 { - yyb529 = yyj529 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb529 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb529 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8644,15 +9925,21 @@ func (x *PersistentVolumeClaimList) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj529++ - if yyhl529 { - yyb529 = yyj529 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb529 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb529 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8660,38 +9947,44 @@ func (x *PersistentVolumeClaimList) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj529++ - if yyhl529 { - yyb529 = yyj529 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb529 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb529 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv532 := &x.ListMeta - yym533 := z.DecBinary() - _ = yym533 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv532) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv532, false) + z.DecFallback(yyv17, false) } } - yyj529++ - if yyhl529 { - yyb529 = yyj529 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb529 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb529 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8699,26 +9992,26 @@ func (x *PersistentVolumeClaimList) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Items = nil } else { - yyv534 := &x.Items - yym535 := z.DecBinary() - _ = yym535 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSlicePersistentVolumeClaim((*[]PersistentVolumeClaim)(yyv534), d) + h.decSlicePersistentVolumeClaim((*[]PersistentVolumeClaim)(yyv19), d) } } for { - yyj529++ - if yyhl529 { - yyb529 = yyj529 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb529 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb529 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj529-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -8730,41 +10023,42 @@ func (x *PersistentVolumeClaimSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym536 := z.EncBinary() - _ = yym536 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep537 := !z.EncBinary() - yy2arr537 := z.EncBasicHandle().StructToArray - var yyq537 [4]bool - _, _, _ = yysep537, yyq537, yy2arr537 - const yyr537 bool = false - yyq537[0] = len(x.AccessModes) != 0 - yyq537[1] = x.Selector != nil - yyq537[2] = true - yyq537[3] = x.VolumeName != "" - var yynn537 int - if yyr537 || yy2arr537 { - r.EncodeArrayStart(4) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = len(x.AccessModes) != 0 + yyq2[1] = x.Selector != nil + yyq2[2] = true + yyq2[3] = x.VolumeName != "" + yyq2[4] = x.StorageClassName != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) } else { - yynn537 = 0 - for _, b := range yyq537 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn537++ + yynn2++ } } - r.EncodeMapStart(yynn537) - yynn537 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr537 || yy2arr537 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq537[0] { + if yyq2[0] { if x.AccessModes == nil { r.EncodeNil() } else { - yym539 := z.EncBinary() - _ = yym539 + yym4 := z.EncBinary() + _ = yym4 if false { } else { h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e) @@ -8774,15 +10068,15 @@ func (x *PersistentVolumeClaimSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq537[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("accessModes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.AccessModes == nil { r.EncodeNil() } else { - yym540 := z.EncBinary() - _ = yym540 + yym5 := z.EncBinary() + _ = yym5 if false { } else { h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e) @@ -8790,14 +10084,14 @@ func (x *PersistentVolumeClaimSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr537 || yy2arr537 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq537[1] { + if yyq2[1] { if x.Selector == nil { r.EncodeNil() } else { - yym542 := z.EncBinary() - _ = yym542 + yym7 := z.EncBinary() + _ = yym7 if false { } else if z.HasExtensions() && z.EncExt(x.Selector) { } else { @@ -8808,15 +10102,15 @@ func (x *PersistentVolumeClaimSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq537[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("selector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Selector == nil { r.EncodeNil() } else { - yym543 := z.EncBinary() - _ = yym543 + yym8 := z.EncBinary() + _ = yym8 if false { } else if z.HasExtensions() && z.EncExt(x.Selector) { } else { @@ -8825,28 +10119,28 @@ func (x *PersistentVolumeClaimSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr537 || yy2arr537 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq537[2] { - yy545 := &x.Resources - yy545.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.Resources + yy10.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq537[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resources")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy546 := &x.Resources - yy546.CodecEncodeSelf(e) + yy12 := &x.Resources + yy12.CodecEncodeSelf(e) } } - if yyr537 || yy2arr537 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq537[3] { - yym548 := z.EncBinary() - _ = yym548 + if yyq2[3] { + yym15 := z.EncBinary() + _ = yym15 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName)) @@ -8855,19 +10149,54 @@ func (x *PersistentVolumeClaimSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq537[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumeName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym549 := z.EncBinary() - _ = yym549 + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName)) } } } - if yyr537 || yy2arr537 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + if x.StorageClassName == nil { + r.EncodeNil() + } else { + yy18 := *x.StorageClassName + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yy18)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("storageClassName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.StorageClassName == nil { + r.EncodeNil() + } else { + yy20 := *x.StorageClassName + yym21 := z.EncBinary() + _ = yym21 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yy20)) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -8880,25 +10209,25 @@ func (x *PersistentVolumeClaimSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym550 := z.DecBinary() - _ = yym550 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct551 := r.ContainerType() - if yyct551 == codecSelferValueTypeMap1234 { - yyl551 := r.ReadMapStart() - if yyl551 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl551, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct551 == codecSelferValueTypeArray1234 { - yyl551 := r.ReadArrayStart() - if yyl551 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl551, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -8910,12 +10239,12 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromMap(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys552Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys552Slc - var yyhl552 bool = l >= 0 - for yyj552 := 0; ; yyj552++ { - if yyhl552 { - if yyj552 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -8924,20 +10253,20 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromMap(l int, d *codec1978.D } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys552Slc = r.DecodeBytes(yys552Slc, true, true) - yys552 := string(yys552Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys552 { + switch yys3 { case "accessModes": if r.TryDecodeAsNil() { x.AccessModes = nil } else { - yyv553 := &x.AccessModes - yym554 := z.DecBinary() - _ = yym554 + yyv4 := &x.AccessModes + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv553), d) + h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv4), d) } } case "selector": @@ -8947,10 +10276,10 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromMap(l int, d *codec1978.D } } else { if x.Selector == nil { - x.Selector = new(pkg2_unversioned.LabelSelector) + x.Selector = new(pkg2_v1.LabelSelector) } - yym556 := z.DecBinary() - _ = yym556 + yym7 := z.DecBinary() + _ = yym7 if false { } else if z.HasExtensions() && z.DecExt(x.Selector) { } else { @@ -8961,19 +10290,41 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromMap(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Resources = ResourceRequirements{} } else { - yyv557 := &x.Resources - yyv557.CodecDecodeSelf(d) + yyv8 := &x.Resources + yyv8.CodecDecodeSelf(d) } case "volumeName": if r.TryDecodeAsNil() { x.VolumeName = "" } else { - x.VolumeName = string(r.DecodeString()) + yyv9 := &x.VolumeName + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + case "storageClassName": + if r.TryDecodeAsNil() { + if x.StorageClassName != nil { + x.StorageClassName = nil + } + } else { + if x.StorageClassName == nil { + x.StorageClassName = new(string) + } + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(x.StorageClassName)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys552) - } // end switch yys552 - } // end for yyj552 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -8981,16 +10332,16 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj559 int - var yyb559 bool - var yyhl559 bool = l >= 0 - yyj559++ - if yyhl559 { - yyb559 = yyj559 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb559 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb559 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8998,21 +10349,21 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.AccessModes = nil } else { - yyv560 := &x.AccessModes - yym561 := z.DecBinary() - _ = yym561 + yyv14 := &x.AccessModes + yym15 := z.DecBinary() + _ = yym15 if false { } else { - h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv560), d) + h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv14), d) } } - yyj559++ - if yyhl559 { - yyb559 = yyj559 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb559 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb559 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9023,23 +10374,23 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromArray(l int, d *codec1978 } } else { if x.Selector == nil { - x.Selector = new(pkg2_unversioned.LabelSelector) + x.Selector = new(pkg2_v1.LabelSelector) } - yym563 := z.DecBinary() - _ = yym563 + yym17 := z.DecBinary() + _ = yym17 if false { } else if z.HasExtensions() && z.DecExt(x.Selector) { } else { z.DecFallback(x.Selector, false) } } - yyj559++ - if yyhl559 { - yyb559 = yyj559 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb559 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb559 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9047,16 +10398,16 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Resources = ResourceRequirements{} } else { - yyv564 := &x.Resources - yyv564.CodecDecodeSelf(d) + yyv18 := &x.Resources + yyv18.CodecDecodeSelf(d) } - yyj559++ - if yyhl559 { - yyb559 = yyj559 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb559 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb559 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9064,20 +10415,52 @@ func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.VolumeName = "" } else { - x.VolumeName = string(r.DecodeString()) + yyv19 := &x.VolumeName + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.StorageClassName != nil { + x.StorageClassName = nil + } + } else { + if x.StorageClassName == nil { + x.StorageClassName = new(string) + } + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(x.StorageClassName)) = r.DecodeString() + } } for { - yyj559++ - if yyhl559 { - yyb559 = yyj559 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb559 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb559 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj559-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -9089,55 +10472,55 @@ func (x *PersistentVolumeClaimStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym566 := z.EncBinary() - _ = yym566 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep567 := !z.EncBinary() - yy2arr567 := z.EncBasicHandle().StructToArray - var yyq567 [3]bool - _, _, _ = yysep567, yyq567, yy2arr567 - const yyr567 bool = false - yyq567[0] = x.Phase != "" - yyq567[1] = len(x.AccessModes) != 0 - yyq567[2] = len(x.Capacity) != 0 - var yynn567 int - if yyr567 || yy2arr567 { + 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 { - yynn567 = 0 - for _, b := range yyq567 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn567++ + yynn2++ } } - r.EncodeMapStart(yynn567) - yynn567 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr567 || yy2arr567 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq567[0] { + if yyq2[0] { x.Phase.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq567[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("phase")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Phase.CodecEncodeSelf(e) } } - if yyr567 || yy2arr567 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq567[1] { + if yyq2[1] { if x.AccessModes == nil { r.EncodeNil() } else { - yym570 := z.EncBinary() - _ = yym570 + yym7 := z.EncBinary() + _ = yym7 if false { } else { h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e) @@ -9147,15 +10530,15 @@ func (x *PersistentVolumeClaimStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq567[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("accessModes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.AccessModes == nil { r.EncodeNil() } else { - yym571 := z.EncBinary() - _ = yym571 + yym8 := z.EncBinary() + _ = yym8 if false { } else { h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e) @@ -9163,9 +10546,9 @@ func (x *PersistentVolumeClaimStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr567 || yy2arr567 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq567[2] { + if yyq2[2] { if x.Capacity == nil { r.EncodeNil() } else { @@ -9175,7 +10558,7 @@ func (x *PersistentVolumeClaimStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq567[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("capacity")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -9186,7 +10569,7 @@ func (x *PersistentVolumeClaimStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr567 || yy2arr567 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -9199,25 +10582,25 @@ func (x *PersistentVolumeClaimStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym573 := z.DecBinary() - _ = yym573 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct574 := r.ContainerType() - if yyct574 == codecSelferValueTypeMap1234 { - yyl574 := r.ReadMapStart() - if yyl574 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl574, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct574 == codecSelferValueTypeArray1234 { - yyl574 := r.ReadArrayStart() - if yyl574 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl574, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -9229,12 +10612,12 @@ func (x *PersistentVolumeClaimStatus) codecDecodeSelfFromMap(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys575Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys575Slc - var yyhl575 bool = l >= 0 - for yyj575 := 0; ; yyj575++ { - if yyhl575 { - if yyj575 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -9243,39 +10626,40 @@ func (x *PersistentVolumeClaimStatus) codecDecodeSelfFromMap(l int, d *codec1978 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys575Slc = r.DecodeBytes(yys575Slc, true, true) - yys575 := string(yys575Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys575 { + switch yys3 { case "phase": if r.TryDecodeAsNil() { x.Phase = "" } else { - x.Phase = PersistentVolumeClaimPhase(r.DecodeString()) + yyv4 := &x.Phase + yyv4.CodecDecodeSelf(d) } case "accessModes": if r.TryDecodeAsNil() { x.AccessModes = nil } else { - yyv577 := &x.AccessModes - yym578 := z.DecBinary() - _ = yym578 + yyv5 := &x.AccessModes + yym6 := z.DecBinary() + _ = yym6 if false { } else { - h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv577), d) + h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv5), d) } } case "capacity": if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv579 := &x.Capacity - yyv579.CodecDecodeSelf(d) + yyv7 := &x.Capacity + yyv7.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys575) - } // end switch yys575 - } // end for yyj575 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -9283,16 +10667,16 @@ func (x *PersistentVolumeClaimStatus) codecDecodeSelfFromArray(l int, d *codec19 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj580 int - var yyb580 bool - var yyhl580 bool = l >= 0 - yyj580++ - if yyhl580 { - yyb580 = yyj580 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb580 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb580 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9300,15 +10684,16 @@ func (x *PersistentVolumeClaimStatus) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.Phase = "" } else { - x.Phase = PersistentVolumeClaimPhase(r.DecodeString()) + yyv9 := &x.Phase + yyv9.CodecDecodeSelf(d) } - yyj580++ - if yyhl580 { - yyb580 = yyj580 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb580 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb580 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9316,21 +10701,21 @@ func (x *PersistentVolumeClaimStatus) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.AccessModes = nil } else { - yyv582 := &x.AccessModes - yym583 := z.DecBinary() - _ = yym583 + yyv10 := &x.AccessModes + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv582), d) + h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv10), d) } } - yyj580++ - if yyhl580 { - yyb580 = yyj580 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb580 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb580 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9338,21 +10723,21 @@ func (x *PersistentVolumeClaimStatus) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv584 := &x.Capacity - yyv584.CodecDecodeSelf(d) + yyv12 := &x.Capacity + yyv12.CodecDecodeSelf(d) } for { - yyj580++ - if yyhl580 { - yyb580 = yyj580 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb580 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb580 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj580-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -9361,8 +10746,8 @@ func (x PersistentVolumeAccessMode) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym585 := z.EncBinary() - _ = yym585 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -9374,8 +10759,8 @@ func (x *PersistentVolumeAccessMode) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym586 := z.DecBinary() - _ = yym586 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -9387,8 +10772,8 @@ func (x PersistentVolumePhase) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym587 := z.EncBinary() - _ = yym587 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -9400,8 +10785,8 @@ func (x *PersistentVolumePhase) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym588 := z.DecBinary() - _ = yym588 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -9413,8 +10798,8 @@ func (x PersistentVolumeClaimPhase) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym589 := z.EncBinary() - _ = yym589 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -9426,8 +10811,8 @@ func (x *PersistentVolumeClaimPhase) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym590 := z.DecBinary() - _ = yym590 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -9442,33 +10827,33 @@ func (x *HostPathVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym591 := z.EncBinary() - _ = yym591 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep592 := !z.EncBinary() - yy2arr592 := z.EncBasicHandle().StructToArray - var yyq592 [1]bool - _, _, _ = yysep592, yyq592, yy2arr592 - const yyr592 bool = false - var yynn592 int - if yyr592 || yy2arr592 { + 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 { - yynn592 = 1 - for _, b := range yyq592 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn592++ + yynn2++ } } - r.EncodeMapStart(yynn592) - yynn592 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr592 || yy2arr592 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym594 := z.EncBinary() - _ = yym594 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) @@ -9477,14 +10862,14 @@ func (x *HostPathVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("path")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym595 := z.EncBinary() - _ = yym595 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) } } - if yyr592 || yy2arr592 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -9497,25 +10882,25 @@ func (x *HostPathVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym596 := z.DecBinary() - _ = yym596 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct597 := r.ContainerType() - if yyct597 == codecSelferValueTypeMap1234 { - yyl597 := r.ReadMapStart() - if yyl597 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl597, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct597 == codecSelferValueTypeArray1234 { - yyl597 := r.ReadArrayStart() - if yyl597 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl597, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -9527,12 +10912,12 @@ func (x *HostPathVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys598Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys598Slc - var yyhl598 bool = l >= 0 - for yyj598 := 0; ; yyj598++ { - if yyhl598 { - if yyj598 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -9541,20 +10926,26 @@ func (x *HostPathVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys598Slc = r.DecodeBytes(yys598Slc, true, true) - yys598 := string(yys598Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys598 { + switch yys3 { case "path": if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv4 := &x.Path + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys598) - } // end switch yys598 - } // end for yyj598 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -9562,16 +10953,16 @@ func (x *HostPathVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj600 int - var yyb600 bool - var yyhl600 bool = l >= 0 - yyj600++ - if yyhl600 { - yyb600 = yyj600 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb600 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb600 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9579,20 +10970,26 @@ func (x *HostPathVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv7 := &x.Path + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*string)(yyv7)) = r.DecodeString() + } } for { - yyj600++ - if yyhl600 { - yyb600 = yyj600 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb600 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb600 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj600-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -9604,46 +11001,46 @@ func (x *EmptyDirVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym602 := z.EncBinary() - _ = yym602 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep603 := !z.EncBinary() - yy2arr603 := z.EncBasicHandle().StructToArray - var yyq603 [1]bool - _, _, _ = yysep603, yyq603, yy2arr603 - const yyr603 bool = false - yyq603[0] = x.Medium != "" - var yynn603 int - if yyr603 || yy2arr603 { + 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 { - yynn603 = 0 - for _, b := range yyq603 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn603++ + yynn2++ } } - r.EncodeMapStart(yynn603) - yynn603 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr603 || yy2arr603 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq603[0] { + if yyq2[0] { x.Medium.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq603[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("medium")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Medium.CodecEncodeSelf(e) } } - if yyr603 || yy2arr603 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -9656,25 +11053,25 @@ func (x *EmptyDirVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym605 := z.DecBinary() - _ = yym605 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct606 := r.ContainerType() - if yyct606 == codecSelferValueTypeMap1234 { - yyl606 := r.ReadMapStart() - if yyl606 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl606, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct606 == codecSelferValueTypeArray1234 { - yyl606 := r.ReadArrayStart() - if yyl606 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl606, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -9686,12 +11083,12 @@ func (x *EmptyDirVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys607Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys607Slc - var yyhl607 bool = l >= 0 - for yyj607 := 0; ; yyj607++ { - if yyhl607 { - if yyj607 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -9700,20 +11097,21 @@ func (x *EmptyDirVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys607Slc = r.DecodeBytes(yys607Slc, true, true) - yys607 := string(yys607Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys607 { + switch yys3 { case "medium": if r.TryDecodeAsNil() { x.Medium = "" } else { - x.Medium = StorageMedium(r.DecodeString()) + yyv4 := &x.Medium + yyv4.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys607) - } // end switch yys607 - } // end for yyj607 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -9721,16 +11119,16 @@ func (x *EmptyDirVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj609 int - var yyb609 bool - var yyhl609 bool = l >= 0 - yyj609++ - if yyhl609 { - yyb609 = yyj609 > l + var yyj5 int + var yyb5 bool + var yyhl5 bool = l >= 0 + yyj5++ + if yyhl5 { + yyb5 = yyj5 > l } else { - yyb609 = r.CheckBreak() + yyb5 = r.CheckBreak() } - if yyb609 { + if yyb5 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9738,20 +11136,1912 @@ func (x *EmptyDirVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Medium = "" } else { - x.Medium = StorageMedium(r.DecodeString()) + yyv6 := &x.Medium + yyv6.CodecDecodeSelf(d) } for { - yyj609++ - if yyhl609 { - yyb609 = yyj609 > l + yyj5++ + if yyhl5 { + yyb5 = yyj5 > l } else { - yyb609 = r.CheckBreak() + yyb5 = r.CheckBreak() } - if yyb609 { + if yyb5 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj609-1, "") + 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 { + yyv4 := &x.EndpointsName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "path": + if r.TryDecodeAsNil() { + x.Path = "" + } else { + yyv6 := &x.Path + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "readOnly": + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv8 := &x.ReadOnly + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(yyv8)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *GlusterfsVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.EndpointsName = "" + } else { + yyv11 := &x.EndpointsName + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Path = "" + } else { + yyv13 := &x.Path + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv15 := &x.ReadOnly + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*bool)(yyv15)) = r.DecodeBool() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *RBDVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [8]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[2] = x.FSType != "" + yyq2[3] = x.RBDPool != "" + yyq2[4] = x.RadosUser != "" + yyq2[5] = x.Keyring != "" + yyq2[6] = x.SecretRef != nil + yyq2[7] = x.ReadOnly != false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(8) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.CephMonitors == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + z.F.EncSliceStringV(x.CephMonitors, false, e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("monitors")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.CephMonitors == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + z.F.EncSliceStringV(x.CephMonitors, false, e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.RBDImage)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("image")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.RBDImage)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("fsType")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.RBDPool)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("pool")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.RBDPool)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.RadosUser)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("user")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.RadosUser)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Keyring)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("keyring")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Keyring)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[6] { + if x.SecretRef == nil { + r.EncodeNil() + } else { + x.SecretRef.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("secretRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SecretRef == nil { + r.EncodeNil() + } else { + x.SecretRef.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[7] { + yym25 := z.EncBinary() + _ = yym25 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[7] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("readOnly")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym26 := z.EncBinary() + _ = yym26 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RBDVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RBDVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "monitors": + if r.TryDecodeAsNil() { + x.CephMonitors = nil + } else { + yyv4 := &x.CephMonitors + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + z.F.DecSliceStringX(yyv4, false, d) + } + } + case "image": + if r.TryDecodeAsNil() { + x.RBDImage = "" + } else { + yyv6 := &x.RBDImage + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "fsType": + if r.TryDecodeAsNil() { + x.FSType = "" + } else { + yyv8 := &x.FSType + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "pool": + if r.TryDecodeAsNil() { + x.RBDPool = "" + } else { + yyv10 := &x.RBDPool + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + case "user": + if r.TryDecodeAsNil() { + x.RadosUser = "" + } else { + yyv12 := &x.RadosUser + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } + } + case "keyring": + if r.TryDecodeAsNil() { + x.Keyring = "" + } else { + yyv14 := &x.Keyring + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } + } + case "secretRef": + if r.TryDecodeAsNil() { + if x.SecretRef != nil { + x.SecretRef = nil + } + } else { + if x.SecretRef == nil { + x.SecretRef = new(LocalObjectReference) + } + x.SecretRef.CodecDecodeSelf(d) + } + case "readOnly": + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv17 := &x.ReadOnly + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*bool)(yyv17)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RBDVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj19 int + var yyb19 bool + var yyhl19 bool = l >= 0 + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CephMonitors = nil + } else { + yyv20 := &x.CephMonitors + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + z.F.DecSliceStringX(yyv20, false, d) + } + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RBDImage = "" + } else { + yyv22 := &x.RBDImage + yym23 := z.DecBinary() + _ = yym23 + if false { + } else { + *((*string)(yyv22)) = r.DecodeString() + } + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.FSType = "" + } else { + yyv24 := &x.FSType + yym25 := z.DecBinary() + _ = yym25 + if false { + } else { + *((*string)(yyv24)) = r.DecodeString() + } + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RBDPool = "" + } else { + yyv26 := &x.RBDPool + yym27 := z.DecBinary() + _ = yym27 + if false { + } else { + *((*string)(yyv26)) = r.DecodeString() + } + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RadosUser = "" + } else { + yyv28 := &x.RadosUser + yym29 := z.DecBinary() + _ = yym29 + if false { + } else { + *((*string)(yyv28)) = r.DecodeString() + } + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Keyring = "" + } else { + yyv30 := &x.Keyring + yym31 := z.DecBinary() + _ = yym31 + if false { + } else { + *((*string)(yyv30)) = r.DecodeString() + } + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.SecretRef != nil { + x.SecretRef = nil + } + } else { + if x.SecretRef == nil { + x.SecretRef = new(LocalObjectReference) + } + x.SecretRef.CodecDecodeSelf(d) + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv33 := &x.ReadOnly + yym34 := z.DecBinary() + _ = yym34 + if false { + } else { + *((*bool)(yyv33)) = r.DecodeBool() + } + } + for { + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj19-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *CinderVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.FSType != "" + yyq2[2] = x.ReadOnly != false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("volumeID")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("fsType")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("readOnly")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CinderVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CinderVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "volumeID": + if r.TryDecodeAsNil() { + x.VolumeID = "" + } else { + yyv4 := &x.VolumeID + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "fsType": + if r.TryDecodeAsNil() { + x.FSType = "" + } else { + yyv6 := &x.FSType + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "readOnly": + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv8 := &x.ReadOnly + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(yyv8)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CinderVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.VolumeID = "" + } else { + yyv11 := &x.VolumeID + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.FSType = "" + } else { + yyv13 := &x.FSType + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv15 := &x.ReadOnly + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*bool)(yyv15)) = r.DecodeBool() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *CephFSVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [6]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Path != "" + yyq2[2] = x.User != "" + yyq2[3] = x.SecretFile != "" + yyq2[4] = x.SecretRef != nil + yyq2[5] = x.ReadOnly != false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(6) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Monitors == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + z.F.EncSliceStringV(x.Monitors, false, e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("monitors")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Monitors == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + z.F.EncSliceStringV(x.Monitors, false, e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("path")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.User)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("user")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.User)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.SecretFile)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("secretFile")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.SecretFile)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + if x.SecretRef == nil { + r.EncodeNil() + } else { + x.SecretRef.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("secretRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SecretRef == nil { + r.EncodeNil() + } else { + x.SecretRef.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("readOnly")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CephFSVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CephFSVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "monitors": + if r.TryDecodeAsNil() { + x.Monitors = nil + } else { + yyv4 := &x.Monitors + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + z.F.DecSliceStringX(yyv4, false, d) + } + } + case "path": + if r.TryDecodeAsNil() { + x.Path = "" + } else { + yyv6 := &x.Path + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "user": + if r.TryDecodeAsNil() { + x.User = "" + } else { + yyv8 := &x.User + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "secretFile": + if r.TryDecodeAsNil() { + x.SecretFile = "" + } else { + yyv10 := &x.SecretFile + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + case "secretRef": + if r.TryDecodeAsNil() { + if x.SecretRef != nil { + x.SecretRef = nil + } + } else { + if x.SecretRef == nil { + x.SecretRef = new(LocalObjectReference) + } + x.SecretRef.CodecDecodeSelf(d) + } + case "readOnly": + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv13 := &x.ReadOnly + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*bool)(yyv13)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CephFSVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj15 int + var yyb15 bool + var yyhl15 bool = l >= 0 + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Monitors = nil + } else { + yyv16 := &x.Monitors + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + z.F.DecSliceStringX(yyv16, false, d) + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Path = "" + } else { + yyv18 := &x.Path + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *((*string)(yyv18)) = r.DecodeString() + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.User = "" + } else { + yyv20 := &x.User + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + *((*string)(yyv20)) = r.DecodeString() + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.SecretFile = "" + } else { + yyv22 := &x.SecretFile + yym23 := z.DecBinary() + _ = yym23 + if false { + } else { + *((*string)(yyv22)) = r.DecodeString() + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.SecretRef != nil { + x.SecretRef = nil + } + } else { + if x.SecretRef == nil { + x.SecretRef = new(LocalObjectReference) + } + x.SecretRef.CodecDecodeSelf(d) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv25 := &x.ReadOnly + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*bool)(yyv25)) = r.DecodeBool() + } + } + for { + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj15-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *FlockerVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.DatasetName != "" + yyq2[1] = x.DatasetUUID != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.DatasetName)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("datasetName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.DatasetName)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.DatasetUUID)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("datasetUUID")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.DatasetUUID)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *FlockerVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *FlockerVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "datasetName": + if r.TryDecodeAsNil() { + x.DatasetName = "" + } else { + yyv4 := &x.DatasetName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "datasetUUID": + if r.TryDecodeAsNil() { + x.DatasetUUID = "" + } else { + yyv6 := &x.DatasetUUID + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *FlockerVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.DatasetName = "" + } else { + yyv9 := &x.DatasetName + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.DatasetUUID = "" + } else { + yyv11 := &x.DatasetUUID + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -9760,8 +13050,8 @@ func (x StorageMedium) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym611 := z.EncBinary() - _ = yym611 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -9773,8 +13063,8 @@ func (x *StorageMedium) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym612 := z.DecBinary() - _ = yym612 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -9786,8 +13076,8 @@ func (x Protocol) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym613 := z.EncBinary() - _ = yym613 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -9799,8 +13089,8 @@ func (x *Protocol) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym614 := z.DecBinary() - _ = yym614 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -9815,36 +13105,36 @@ func (x *GCEPersistentDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym615 := z.EncBinary() - _ = yym615 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep616 := !z.EncBinary() - yy2arr616 := z.EncBasicHandle().StructToArray - var yyq616 [4]bool - _, _, _ = yysep616, yyq616, yy2arr616 - const yyr616 bool = false - yyq616[1] = x.FSType != "" - yyq616[2] = x.Partition != 0 - yyq616[3] = x.ReadOnly != false - var yynn616 int - if yyr616 || yy2arr616 { + 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 { - yynn616 = 1 - for _, b := range yyq616 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn616++ + yynn2++ } } - r.EncodeMapStart(yynn616) - yynn616 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr616 || yy2arr616 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym618 := z.EncBinary() - _ = yym618 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PDName)) @@ -9853,18 +13143,18 @@ func (x *GCEPersistentDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("pdName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym619 := z.EncBinary() - _ = yym619 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PDName)) } } - if yyr616 || yy2arr616 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq616[1] { - yym621 := z.EncBinary() - _ = yym621 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) @@ -9873,23 +13163,23 @@ func (x *GCEPersistentDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq616[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fsType")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym622 := z.EncBinary() - _ = yym622 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) } } } - if yyr616 || yy2arr616 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq616[2] { - yym624 := z.EncBinary() - _ = yym624 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeInt(int64(x.Partition)) @@ -9898,23 +13188,23 @@ func (x *GCEPersistentDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq616[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("partition")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym625 := z.EncBinary() - _ = yym625 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeInt(int64(x.Partition)) } } } - if yyr616 || yy2arr616 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq616[3] { - yym627 := z.EncBinary() - _ = yym627 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeBool(bool(x.ReadOnly)) @@ -9923,19 +13213,19 @@ func (x *GCEPersistentDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq616[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("readOnly")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym628 := z.EncBinary() - _ = yym628 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeBool(bool(x.ReadOnly)) } } } - if yyr616 || yy2arr616 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -9948,25 +13238,25 @@ func (x *GCEPersistentDiskVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym629 := z.DecBinary() - _ = yym629 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct630 := r.ContainerType() - if yyct630 == codecSelferValueTypeMap1234 { - yyl630 := r.ReadMapStart() - if yyl630 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl630, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct630 == codecSelferValueTypeArray1234 { - yyl630 := r.ReadArrayStart() - if yyl630 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl630, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -9978,12 +13268,12 @@ func (x *GCEPersistentDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec19 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys631Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys631Slc - var yyhl631 bool = l >= 0 - for yyj631 := 0; ; yyj631++ { - if yyhl631 { - if yyj631 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -9992,38 +13282,62 @@ func (x *GCEPersistentDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec19 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys631Slc = r.DecodeBytes(yys631Slc, true, true) - yys631 := string(yys631Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys631 { + switch yys3 { case "pdName": if r.TryDecodeAsNil() { x.PDName = "" } else { - x.PDName = string(r.DecodeString()) + yyv4 := &x.PDName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "fsType": if r.TryDecodeAsNil() { x.FSType = "" } else { - x.FSType = string(r.DecodeString()) + yyv6 := &x.FSType + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "partition": if r.TryDecodeAsNil() { x.Partition = 0 } else { - x.Partition = int32(r.DecodeInt(32)) + yyv8 := &x.Partition + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } } case "readOnly": if r.TryDecodeAsNil() { x.ReadOnly = false } else { - x.ReadOnly = bool(r.DecodeBool()) + yyv10 := &x.ReadOnly + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(yyv10)) = r.DecodeBool() + } } default: - z.DecStructFieldNotFound(-1, yys631) - } // end switch yys631 - } // end for yyj631 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -10031,16 +13345,16 @@ func (x *GCEPersistentDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj636 int - var yyb636 bool - var yyhl636 bool = l >= 0 - yyj636++ - if yyhl636 { - yyb636 = yyj636 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb636 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb636 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10048,15 +13362,21 @@ func (x *GCEPersistentDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec if r.TryDecodeAsNil() { x.PDName = "" } else { - x.PDName = string(r.DecodeString()) + yyv13 := &x.PDName + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj636++ - if yyhl636 { - yyb636 = yyj636 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb636 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb636 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10064,15 +13384,21 @@ func (x *GCEPersistentDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec if r.TryDecodeAsNil() { x.FSType = "" } else { - x.FSType = string(r.DecodeString()) + yyv15 := &x.FSType + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj636++ - if yyhl636 { - yyb636 = yyj636 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb636 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb636 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10080,15 +13406,21 @@ func (x *GCEPersistentDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec if r.TryDecodeAsNil() { x.Partition = 0 } else { - x.Partition = int32(r.DecodeInt(32)) + yyv17 := &x.Partition + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*int32)(yyv17)) = int32(r.DecodeInt(32)) + } } - yyj636++ - if yyhl636 { - yyb636 = yyj636 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb636 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb636 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10096,2290 +13428,26 @@ func (x *GCEPersistentDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec if r.TryDecodeAsNil() { x.ReadOnly = false } else { - x.ReadOnly = bool(r.DecodeBool()) - } - for { - yyj636++ - if yyhl636 { - yyb636 = yyj636 > l - } else { - yyb636 = r.CheckBreak() - } - if yyb636 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj636-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 { - yym641 := z.EncBinary() - _ = yym641 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep642 := !z.EncBinary() - yy2arr642 := z.EncBasicHandle().StructToArray - var yyq642 [6]bool - _, _, _ = yysep642, yyq642, yy2arr642 - const yyr642 bool = false - yyq642[0] = x.TargetPortal != "" - yyq642[1] = x.IQN != "" - yyq642[2] = x.Lun != 0 - yyq642[3] = x.ISCSIInterface != "" - yyq642[4] = x.FSType != "" - yyq642[5] = x.ReadOnly != false - var yynn642 int - if yyr642 || yy2arr642 { - r.EncodeArrayStart(6) - } else { - yynn642 = 0 - for _, b := range yyq642 { - if b { - yynn642++ - } - } - r.EncodeMapStart(yynn642) - yynn642 = 0 - } - if yyr642 || yy2arr642 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq642[0] { - yym644 := z.EncBinary() - _ = yym644 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.TargetPortal)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq642[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("targetPortal")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym645 := z.EncBinary() - _ = yym645 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.TargetPortal)) - } - } - } - if yyr642 || yy2arr642 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq642[1] { - yym647 := z.EncBinary() - _ = yym647 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.IQN)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq642[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("iqn")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym648 := z.EncBinary() - _ = yym648 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.IQN)) - } - } - } - if yyr642 || yy2arr642 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq642[2] { - yym650 := z.EncBinary() - _ = yym650 - if false { - } else { - r.EncodeInt(int64(x.Lun)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq642[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lun")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym651 := z.EncBinary() - _ = yym651 - if false { - } else { - r.EncodeInt(int64(x.Lun)) - } - } - } - if yyr642 || yy2arr642 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq642[3] { - yym653 := z.EncBinary() - _ = yym653 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ISCSIInterface)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq642[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("iscsiInterface")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym654 := z.EncBinary() - _ = yym654 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ISCSIInterface)) - } - } - } - if yyr642 || yy2arr642 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq642[4] { - yym656 := z.EncBinary() - _ = yym656 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq642[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("fsType")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym657 := z.EncBinary() - _ = yym657 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) - } - } - } - if yyr642 || yy2arr642 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq642[5] { - yym659 := z.EncBinary() - _ = yym659 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq642[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("readOnly")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym660 := z.EncBinary() - _ = yym660 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } - } - if yyr642 || yy2arr642 { - 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 - yym661 := z.DecBinary() - _ = yym661 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct662 := r.ContainerType() - if yyct662 == codecSelferValueTypeMap1234 { - yyl662 := r.ReadMapStart() - if yyl662 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl662, d) - } - } else if yyct662 == codecSelferValueTypeArray1234 { - yyl662 := r.ReadArrayStart() - if yyl662 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl662, 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 yys663Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys663Slc - var yyhl663 bool = l >= 0 - for yyj663 := 0; ; yyj663++ { - if yyhl663 { - if yyj663 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys663Slc = r.DecodeBytes(yys663Slc, true, true) - yys663 := string(yys663Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys663 { - 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, yys663) - } // end switch yys663 - } // end for yyj663 - 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 yyj670 int - var yyb670 bool - var yyhl670 bool = l >= 0 - yyj670++ - if yyhl670 { - yyb670 = yyj670 > l - } else { - yyb670 = r.CheckBreak() - } - if yyb670 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.TargetPortal = "" - } else { - x.TargetPortal = string(r.DecodeString()) - } - yyj670++ - if yyhl670 { - yyb670 = yyj670 > l - } else { - yyb670 = r.CheckBreak() - } - if yyb670 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.IQN = "" - } else { - x.IQN = string(r.DecodeString()) - } - yyj670++ - if yyhl670 { - yyb670 = yyj670 > l - } else { - yyb670 = r.CheckBreak() - } - if yyb670 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Lun = 0 - } else { - x.Lun = int32(r.DecodeInt(32)) - } - yyj670++ - if yyhl670 { - yyb670 = yyj670 > l - } else { - yyb670 = r.CheckBreak() - } - if yyb670 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ISCSIInterface = "" - } else { - x.ISCSIInterface = string(r.DecodeString()) - } - yyj670++ - if yyhl670 { - yyb670 = yyj670 > l - } else { - yyb670 = r.CheckBreak() - } - if yyb670 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.FSType = "" - } else { - x.FSType = string(r.DecodeString()) - } - yyj670++ - if yyhl670 { - yyb670 = yyj670 > l - } else { - yyb670 = r.CheckBreak() - } - if yyb670 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ReadOnly = false - } else { - x.ReadOnly = bool(r.DecodeBool()) - } - for { - yyj670++ - if yyhl670 { - yyb670 = yyj670 > l - } else { - yyb670 = r.CheckBreak() - } - if yyb670 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj670-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 { - yym677 := z.EncBinary() - _ = yym677 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep678 := !z.EncBinary() - yy2arr678 := z.EncBasicHandle().StructToArray - var yyq678 [4]bool - _, _, _ = yysep678, yyq678, yy2arr678 - const yyr678 bool = false - yyq678[2] = x.FSType != "" - yyq678[3] = x.ReadOnly != false - var yynn678 int - if yyr678 || yy2arr678 { - r.EncodeArrayStart(4) - } else { - yynn678 = 2 - for _, b := range yyq678 { - if b { - yynn678++ - } - } - r.EncodeMapStart(yynn678) - yynn678 = 0 - } - if yyr678 || yy2arr678 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.TargetWWNs == nil { - r.EncodeNil() - } else { - yym680 := z.EncBinary() - _ = yym680 - 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 { - yym681 := z.EncBinary() - _ = yym681 - if false { - } else { - z.F.EncSliceStringV(x.TargetWWNs, false, e) - } - } - } - if yyr678 || yy2arr678 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Lun == nil { - r.EncodeNil() - } else { - yy683 := *x.Lun - yym684 := z.EncBinary() - _ = yym684 - if false { - } else { - r.EncodeInt(int64(yy683)) - } - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lun")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Lun == nil { - r.EncodeNil() - } else { - yy685 := *x.Lun - yym686 := z.EncBinary() - _ = yym686 - if false { - } else { - r.EncodeInt(int64(yy685)) - } - } - } - if yyr678 || yy2arr678 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq678[2] { - yym688 := z.EncBinary() - _ = yym688 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq678[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("fsType")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym689 := z.EncBinary() - _ = yym689 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) - } - } - } - if yyr678 || yy2arr678 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq678[3] { - yym691 := z.EncBinary() - _ = yym691 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq678[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("readOnly")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym692 := z.EncBinary() - _ = yym692 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } - } - if yyr678 || yy2arr678 { - 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 - yym693 := z.DecBinary() - _ = yym693 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct694 := r.ContainerType() - if yyct694 == codecSelferValueTypeMap1234 { - yyl694 := r.ReadMapStart() - if yyl694 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl694, d) - } - } else if yyct694 == codecSelferValueTypeArray1234 { - yyl694 := r.ReadArrayStart() - if yyl694 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl694, 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 yys695Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys695Slc - var yyhl695 bool = l >= 0 - for yyj695 := 0; ; yyj695++ { - if yyhl695 { - if yyj695 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys695Slc = r.DecodeBytes(yys695Slc, true, true) - yys695 := string(yys695Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys695 { - case "targetWWNs": - if r.TryDecodeAsNil() { - x.TargetWWNs = nil - } else { - yyv696 := &x.TargetWWNs - yym697 := z.DecBinary() - _ = yym697 - if false { - } else { - z.F.DecSliceStringX(yyv696, false, d) - } - } - case "lun": - if r.TryDecodeAsNil() { - if x.Lun != nil { - x.Lun = nil - } - } else { - if x.Lun == nil { - x.Lun = new(int32) - } - yym699 := z.DecBinary() - _ = yym699 - 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, yys695) - } // end switch yys695 - } // end for yyj695 - 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 yyj702 int - var yyb702 bool - var yyhl702 bool = l >= 0 - yyj702++ - if yyhl702 { - yyb702 = yyj702 > l - } else { - yyb702 = r.CheckBreak() - } - if yyb702 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.TargetWWNs = nil - } else { - yyv703 := &x.TargetWWNs - yym704 := z.DecBinary() - _ = yym704 + yyv19 := &x.ReadOnly + yym20 := z.DecBinary() + _ = yym20 if false { } else { - z.F.DecSliceStringX(yyv703, false, d) - } - } - yyj702++ - if yyhl702 { - yyb702 = yyj702 > l - } else { - yyb702 = r.CheckBreak() - } - if yyb702 { - 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) - } - yym706 := z.DecBinary() - _ = yym706 - if false { - } else { - *((*int32)(x.Lun)) = int32(r.DecodeInt(32)) - } - } - yyj702++ - if yyhl702 { - yyb702 = yyj702 > l - } else { - yyb702 = r.CheckBreak() - } - if yyb702 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.FSType = "" - } else { - x.FSType = string(r.DecodeString()) - } - yyj702++ - if yyhl702 { - yyb702 = yyj702 > l - } else { - yyb702 = r.CheckBreak() - } - if yyb702 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ReadOnly = false - } else { - x.ReadOnly = bool(r.DecodeBool()) - } - for { - yyj702++ - if yyhl702 { - yyb702 = yyj702 > l - } else { - yyb702 = r.CheckBreak() - } - if yyb702 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj702-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 { - yym709 := z.EncBinary() - _ = yym709 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep710 := !z.EncBinary() - yy2arr710 := z.EncBasicHandle().StructToArray - var yyq710 [5]bool - _, _, _ = yysep710, yyq710, yy2arr710 - const yyr710 bool = false - yyq710[1] = x.FSType != "" - yyq710[2] = x.SecretRef != nil - yyq710[3] = x.ReadOnly != false - yyq710[4] = len(x.Options) != 0 - var yynn710 int - if yyr710 || yy2arr710 { - r.EncodeArrayStart(5) - } else { - yynn710 = 1 - for _, b := range yyq710 { - if b { - yynn710++ - } - } - r.EncodeMapStart(yynn710) - yynn710 = 0 - } - if yyr710 || yy2arr710 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym712 := z.EncBinary() - _ = yym712 - 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) - yym713 := z.EncBinary() - _ = yym713 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Driver)) - } - } - if yyr710 || yy2arr710 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq710[1] { - yym715 := z.EncBinary() - _ = yym715 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq710[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("fsType")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym716 := z.EncBinary() - _ = yym716 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) - } - } - } - if yyr710 || yy2arr710 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq710[2] { - if x.SecretRef == nil { - r.EncodeNil() - } else { - x.SecretRef.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq710[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 yyr710 || yy2arr710 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq710[3] { - yym719 := z.EncBinary() - _ = yym719 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq710[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("readOnly")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym720 := z.EncBinary() - _ = yym720 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } - } - if yyr710 || yy2arr710 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq710[4] { - if x.Options == nil { - r.EncodeNil() - } else { - yym722 := z.EncBinary() - _ = yym722 - if false { - } else { - z.F.EncMapStringStringV(x.Options, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq710[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("options")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Options == nil { - r.EncodeNil() - } else { - yym723 := z.EncBinary() - _ = yym723 - if false { - } else { - z.F.EncMapStringStringV(x.Options, false, e) - } - } - } - } - if yyr710 || yy2arr710 { - 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 - yym724 := z.DecBinary() - _ = yym724 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct725 := r.ContainerType() - if yyct725 == codecSelferValueTypeMap1234 { - yyl725 := r.ReadMapStart() - if yyl725 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl725, d) - } - } else if yyct725 == codecSelferValueTypeArray1234 { - yyl725 := r.ReadArrayStart() - if yyl725 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl725, 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 yys726Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys726Slc - var yyhl726 bool = l >= 0 - for yyj726 := 0; ; yyj726++ { - if yyhl726 { - if yyj726 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys726Slc = r.DecodeBytes(yys726Slc, true, true) - yys726 := string(yys726Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys726 { - 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 { - yyv731 := &x.Options - yym732 := z.DecBinary() - _ = yym732 - if false { - } else { - z.F.DecMapStringStringX(yyv731, false, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys726) - } // end switch yys726 - } // end for yyj726 - 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 yyj733 int - var yyb733 bool - var yyhl733 bool = l >= 0 - yyj733++ - if yyhl733 { - yyb733 = yyj733 > l - } else { - yyb733 = r.CheckBreak() - } - if yyb733 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Driver = "" - } else { - x.Driver = string(r.DecodeString()) - } - yyj733++ - if yyhl733 { - yyb733 = yyj733 > l - } else { - yyb733 = r.CheckBreak() - } - if yyb733 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.FSType = "" - } else { - x.FSType = string(r.DecodeString()) - } - yyj733++ - if yyhl733 { - yyb733 = yyj733 > l - } else { - yyb733 = r.CheckBreak() - } - if yyb733 { - 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) - } - yyj733++ - if yyhl733 { - yyb733 = yyj733 > l - } else { - yyb733 = r.CheckBreak() - } - if yyb733 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ReadOnly = false - } else { - x.ReadOnly = bool(r.DecodeBool()) - } - yyj733++ - if yyhl733 { - yyb733 = yyj733 > l - } else { - yyb733 = r.CheckBreak() - } - if yyb733 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Options = nil - } else { - yyv738 := &x.Options - yym739 := z.DecBinary() - _ = yym739 - if false { - } else { - z.F.DecMapStringStringX(yyv738, false, d) + *((*bool)(yyv19)) = r.DecodeBool() } } for { - yyj733++ - if yyhl733 { - yyb733 = yyj733 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb733 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb733 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj733-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 { - yym740 := z.EncBinary() - _ = yym740 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep741 := !z.EncBinary() - yy2arr741 := z.EncBasicHandle().StructToArray - var yyq741 [4]bool - _, _, _ = yysep741, yyq741, yy2arr741 - const yyr741 bool = false - yyq741[1] = x.FSType != "" - yyq741[2] = x.Partition != 0 - yyq741[3] = x.ReadOnly != false - var yynn741 int - if yyr741 || yy2arr741 { - r.EncodeArrayStart(4) - } else { - yynn741 = 1 - for _, b := range yyq741 { - if b { - yynn741++ - } - } - r.EncodeMapStart(yynn741) - yynn741 = 0 - } - if yyr741 || yy2arr741 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym743 := z.EncBinary() - _ = yym743 - 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) - yym744 := z.EncBinary() - _ = yym744 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID)) - } - } - if yyr741 || yy2arr741 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq741[1] { - yym746 := z.EncBinary() - _ = yym746 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq741[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("fsType")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym747 := z.EncBinary() - _ = yym747 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) - } - } - } - if yyr741 || yy2arr741 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq741[2] { - yym749 := z.EncBinary() - _ = yym749 - if false { - } else { - r.EncodeInt(int64(x.Partition)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq741[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("partition")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym750 := z.EncBinary() - _ = yym750 - if false { - } else { - r.EncodeInt(int64(x.Partition)) - } - } - } - if yyr741 || yy2arr741 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq741[3] { - yym752 := z.EncBinary() - _ = yym752 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq741[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("readOnly")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym753 := z.EncBinary() - _ = yym753 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } - } - if yyr741 || yy2arr741 { - 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 - yym754 := z.DecBinary() - _ = yym754 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct755 := r.ContainerType() - if yyct755 == codecSelferValueTypeMap1234 { - yyl755 := r.ReadMapStart() - if yyl755 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl755, d) - } - } else if yyct755 == codecSelferValueTypeArray1234 { - yyl755 := r.ReadArrayStart() - if yyl755 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl755, 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 yys756Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys756Slc - var yyhl756 bool = l >= 0 - for yyj756 := 0; ; yyj756++ { - if yyhl756 { - if yyj756 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys756Slc = r.DecodeBytes(yys756Slc, true, true) - yys756 := string(yys756Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys756 { - 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, yys756) - } // end switch yys756 - } // end for yyj756 - 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 yyj761 int - var yyb761 bool - var yyhl761 bool = l >= 0 - yyj761++ - if yyhl761 { - yyb761 = yyj761 > l - } else { - yyb761 = r.CheckBreak() - } - if yyb761 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.VolumeID = "" - } else { - x.VolumeID = string(r.DecodeString()) - } - yyj761++ - if yyhl761 { - yyb761 = yyj761 > l - } else { - yyb761 = r.CheckBreak() - } - if yyb761 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.FSType = "" - } else { - x.FSType = string(r.DecodeString()) - } - yyj761++ - if yyhl761 { - yyb761 = yyj761 > l - } else { - yyb761 = r.CheckBreak() - } - if yyb761 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Partition = 0 - } else { - x.Partition = int32(r.DecodeInt(32)) - } - yyj761++ - if yyhl761 { - yyb761 = yyj761 > l - } else { - yyb761 = r.CheckBreak() - } - if yyb761 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ReadOnly = false - } else { - x.ReadOnly = bool(r.DecodeBool()) - } - for { - yyj761++ - if yyhl761 { - yyb761 = yyj761 > l - } else { - yyb761 = r.CheckBreak() - } - if yyb761 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj761-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 { - yym766 := z.EncBinary() - _ = yym766 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep767 := !z.EncBinary() - yy2arr767 := z.EncBasicHandle().StructToArray - var yyq767 [3]bool - _, _, _ = yysep767, yyq767, yy2arr767 - const yyr767 bool = false - yyq767[1] = x.Revision != "" - yyq767[2] = x.Directory != "" - var yynn767 int - if yyr767 || yy2arr767 { - r.EncodeArrayStart(3) - } else { - yynn767 = 1 - for _, b := range yyq767 { - if b { - yynn767++ - } - } - r.EncodeMapStart(yynn767) - yynn767 = 0 - } - if yyr767 || yy2arr767 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym769 := z.EncBinary() - _ = yym769 - 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) - yym770 := z.EncBinary() - _ = yym770 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Repository)) - } - } - if yyr767 || yy2arr767 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq767[1] { - yym772 := z.EncBinary() - _ = yym772 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Revision)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq767[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("revision")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym773 := z.EncBinary() - _ = yym773 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Revision)) - } - } - } - if yyr767 || yy2arr767 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq767[2] { - yym775 := z.EncBinary() - _ = yym775 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Directory)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq767[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("directory")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym776 := z.EncBinary() - _ = yym776 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Directory)) - } - } - } - if yyr767 || yy2arr767 { - 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 - yym777 := z.DecBinary() - _ = yym777 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct778 := r.ContainerType() - if yyct778 == codecSelferValueTypeMap1234 { - yyl778 := r.ReadMapStart() - if yyl778 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl778, d) - } - } else if yyct778 == codecSelferValueTypeArray1234 { - yyl778 := r.ReadArrayStart() - if yyl778 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl778, 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 yys779Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys779Slc - var yyhl779 bool = l >= 0 - for yyj779 := 0; ; yyj779++ { - if yyhl779 { - if yyj779 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys779Slc = r.DecodeBytes(yys779Slc, true, true) - yys779 := string(yys779Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys779 { - 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, yys779) - } // end switch yys779 - } // end for yyj779 - 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 yyj783 int - var yyb783 bool - var yyhl783 bool = l >= 0 - yyj783++ - if yyhl783 { - yyb783 = yyj783 > l - } else { - yyb783 = r.CheckBreak() - } - if yyb783 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Repository = "" - } else { - x.Repository = string(r.DecodeString()) - } - yyj783++ - if yyhl783 { - yyb783 = yyj783 > l - } else { - yyb783 = r.CheckBreak() - } - if yyb783 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Revision = "" - } else { - x.Revision = string(r.DecodeString()) - } - yyj783++ - if yyhl783 { - yyb783 = yyj783 > l - } else { - yyb783 = r.CheckBreak() - } - if yyb783 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Directory = "" - } else { - x.Directory = string(r.DecodeString()) - } - for { - yyj783++ - if yyhl783 { - yyb783 = yyj783 > l - } else { - yyb783 = r.CheckBreak() - } - if yyb783 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj783-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 { - yym787 := z.EncBinary() - _ = yym787 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep788 := !z.EncBinary() - yy2arr788 := z.EncBasicHandle().StructToArray - var yyq788 [3]bool - _, _, _ = yysep788, yyq788, yy2arr788 - const yyr788 bool = false - yyq788[0] = x.SecretName != "" - yyq788[1] = len(x.Items) != 0 - yyq788[2] = x.DefaultMode != nil - var yynn788 int - if yyr788 || yy2arr788 { - r.EncodeArrayStart(3) - } else { - yynn788 = 0 - for _, b := range yyq788 { - if b { - yynn788++ - } - } - r.EncodeMapStart(yynn788) - yynn788 = 0 - } - if yyr788 || yy2arr788 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq788[0] { - yym790 := z.EncBinary() - _ = yym790 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SecretName)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq788[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("secretName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym791 := z.EncBinary() - _ = yym791 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SecretName)) - } - } - } - if yyr788 || yy2arr788 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq788[1] { - if x.Items == nil { - r.EncodeNil() - } else { - yym793 := z.EncBinary() - _ = yym793 - if false { - } else { - h.encSliceKeyToPath(([]KeyToPath)(x.Items), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq788[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("items")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym794 := z.EncBinary() - _ = yym794 - if false { - } else { - h.encSliceKeyToPath(([]KeyToPath)(x.Items), e) - } - } - } - } - if yyr788 || yy2arr788 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq788[2] { - if x.DefaultMode == nil { - r.EncodeNil() - } else { - yy796 := *x.DefaultMode - yym797 := z.EncBinary() - _ = yym797 - if false { - } else { - r.EncodeInt(int64(yy796)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq788[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("defaultMode")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.DefaultMode == nil { - r.EncodeNil() - } else { - yy798 := *x.DefaultMode - yym799 := z.EncBinary() - _ = yym799 - if false { - } else { - r.EncodeInt(int64(yy798)) - } - } - } - } - if yyr788 || yy2arr788 { - 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 - yym800 := z.DecBinary() - _ = yym800 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct801 := r.ContainerType() - if yyct801 == codecSelferValueTypeMap1234 { - yyl801 := r.ReadMapStart() - if yyl801 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl801, d) - } - } else if yyct801 == codecSelferValueTypeArray1234 { - yyl801 := r.ReadArrayStart() - if yyl801 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl801, 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 yys802Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys802Slc - var yyhl802 bool = l >= 0 - for yyj802 := 0; ; yyj802++ { - if yyhl802 { - if yyj802 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys802Slc = r.DecodeBytes(yys802Slc, true, true) - yys802 := string(yys802Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys802 { - case "secretName": - if r.TryDecodeAsNil() { - x.SecretName = "" - } else { - x.SecretName = string(r.DecodeString()) - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv804 := &x.Items - yym805 := z.DecBinary() - _ = yym805 - if false { - } else { - h.decSliceKeyToPath((*[]KeyToPath)(yyv804), d) - } - } - case "defaultMode": - if r.TryDecodeAsNil() { - if x.DefaultMode != nil { - x.DefaultMode = nil - } - } else { - if x.DefaultMode == nil { - x.DefaultMode = new(int32) - } - yym807 := z.DecBinary() - _ = yym807 - if false { - } else { - *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32)) - } - } - default: - z.DecStructFieldNotFound(-1, yys802) - } // end switch yys802 - } // end for yyj802 - 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 yyj808 int - var yyb808 bool - var yyhl808 bool = l >= 0 - yyj808++ - if yyhl808 { - yyb808 = yyj808 > l - } else { - yyb808 = r.CheckBreak() - } - if yyb808 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.SecretName = "" - } else { - x.SecretName = string(r.DecodeString()) - } - yyj808++ - if yyhl808 { - yyb808 = yyj808 > l - } else { - yyb808 = r.CheckBreak() - } - if yyb808 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv810 := &x.Items - yym811 := z.DecBinary() - _ = yym811 - if false { - } else { - h.decSliceKeyToPath((*[]KeyToPath)(yyv810), d) - } - } - yyj808++ - if yyhl808 { - yyb808 = yyj808 > l - } else { - yyb808 = r.CheckBreak() - } - if yyb808 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.DefaultMode != nil { - x.DefaultMode = nil - } - } else { - if x.DefaultMode == nil { - x.DefaultMode = new(int32) - } - yym813 := z.DecBinary() - _ = yym813 - if false { - } else { - *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32)) - } - } - for { - yyj808++ - if yyhl808 { - yyb808 = yyj808 > l - } else { - yyb808 = r.CheckBreak() - } - if yyb808 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj808-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 { - yym814 := z.EncBinary() - _ = yym814 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep815 := !z.EncBinary() - yy2arr815 := z.EncBasicHandle().StructToArray - var yyq815 [3]bool - _, _, _ = yysep815, yyq815, yy2arr815 - const yyr815 bool = false - yyq815[2] = x.ReadOnly != false - var yynn815 int - if yyr815 || yy2arr815 { - r.EncodeArrayStart(3) - } else { - yynn815 = 2 - for _, b := range yyq815 { - if b { - yynn815++ - } - } - r.EncodeMapStart(yynn815) - yynn815 = 0 - } - if yyr815 || yy2arr815 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym817 := z.EncBinary() - _ = yym817 - 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) - yym818 := z.EncBinary() - _ = yym818 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Server)) - } - } - if yyr815 || yy2arr815 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym820 := z.EncBinary() - _ = yym820 - 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) - yym821 := z.EncBinary() - _ = yym821 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) - } - } - if yyr815 || yy2arr815 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq815[2] { - yym823 := z.EncBinary() - _ = yym823 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq815[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("readOnly")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym824 := z.EncBinary() - _ = yym824 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } - } - if yyr815 || yy2arr815 { - 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 - yym825 := z.DecBinary() - _ = yym825 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct826 := r.ContainerType() - if yyct826 == codecSelferValueTypeMap1234 { - yyl826 := r.ReadMapStart() - if yyl826 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl826, d) - } - } else if yyct826 == codecSelferValueTypeArray1234 { - yyl826 := r.ReadArrayStart() - if yyl826 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl826, 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 yys827Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys827Slc - var yyhl827 bool = l >= 0 - for yyj827 := 0; ; yyj827++ { - if yyhl827 { - if yyj827 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys827Slc = r.DecodeBytes(yys827Slc, true, true) - yys827 := string(yys827Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys827 { - 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, yys827) - } // end switch yys827 - } // end for yyj827 - 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 yyj831 int - var yyb831 bool - var yyhl831 bool = l >= 0 - yyj831++ - if yyhl831 { - yyb831 = yyj831 > l - } else { - yyb831 = r.CheckBreak() - } - if yyb831 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Server = "" - } else { - x.Server = string(r.DecodeString()) - } - yyj831++ - if yyhl831 { - yyb831 = yyj831 > l - } else { - yyb831 = r.CheckBreak() - } - if yyb831 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = string(r.DecodeString()) - } - yyj831++ - if yyhl831 { - yyb831 = yyj831 > l - } else { - yyb831 = r.CheckBreak() - } - if yyb831 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ReadOnly = false - } else { - x.ReadOnly = bool(r.DecodeBool()) - } - for { - yyj831++ - if yyhl831 { - yyb831 = yyj831 > l - } else { - yyb831 = r.CheckBreak() - } - if yyb831 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj831-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -12391,36 +13459,36 @@ func (x *QuobyteVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym835 := z.EncBinary() - _ = yym835 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep836 := !z.EncBinary() - yy2arr836 := z.EncBasicHandle().StructToArray - var yyq836 [5]bool - _, _, _ = yysep836, yyq836, yy2arr836 - const yyr836 bool = false - yyq836[2] = x.ReadOnly != false - yyq836[3] = x.User != "" - yyq836[4] = x.Group != "" - var yynn836 int - if yyr836 || yy2arr836 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[2] = x.ReadOnly != false + yyq2[3] = x.User != "" + yyq2[4] = x.Group != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn836 = 2 - for _, b := range yyq836 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn836++ + yynn2++ } } - r.EncodeMapStart(yynn836) - yynn836 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr836 || yy2arr836 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym838 := z.EncBinary() - _ = yym838 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Registry)) @@ -12429,17 +13497,17 @@ func (x *QuobyteVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("registry")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym839 := z.EncBinary() - _ = yym839 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Registry)) } } - if yyr836 || yy2arr836 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym841 := z.EncBinary() - _ = yym841 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Volume)) @@ -12448,18 +13516,18 @@ func (x *QuobyteVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volume")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym842 := z.EncBinary() - _ = yym842 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Volume)) } } - if yyr836 || yy2arr836 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq836[2] { - yym844 := z.EncBinary() - _ = yym844 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeBool(bool(x.ReadOnly)) @@ -12468,23 +13536,23 @@ func (x *QuobyteVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq836[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("readOnly")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym845 := z.EncBinary() - _ = yym845 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeBool(bool(x.ReadOnly)) } } } - if yyr836 || yy2arr836 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq836[3] { - yym847 := z.EncBinary() - _ = yym847 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.User)) @@ -12493,23 +13561,23 @@ func (x *QuobyteVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq836[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("user")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym848 := z.EncBinary() - _ = yym848 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.User)) } } } - if yyr836 || yy2arr836 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq836[4] { - yym850 := z.EncBinary() - _ = yym850 + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Group)) @@ -12518,19 +13586,19 @@ func (x *QuobyteVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq836[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("group")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym851 := z.EncBinary() - _ = yym851 + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Group)) } } } - if yyr836 || yy2arr836 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -12543,25 +13611,25 @@ func (x *QuobyteVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym852 := z.DecBinary() - _ = yym852 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct853 := r.ContainerType() - if yyct853 == codecSelferValueTypeMap1234 { - yyl853 := r.ReadMapStart() - if yyl853 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl853, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct853 == codecSelferValueTypeArray1234 { - yyl853 := r.ReadArrayStart() - if yyl853 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl853, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -12573,12 +13641,12 @@ func (x *QuobyteVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys854Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys854Slc - var yyhl854 bool = l >= 0 - for yyj854 := 0; ; yyj854++ { - if yyhl854 { - if yyj854 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -12587,44 +13655,74 @@ func (x *QuobyteVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys854Slc = r.DecodeBytes(yys854Slc, true, true) - yys854 := string(yys854Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys854 { + switch yys3 { case "registry": if r.TryDecodeAsNil() { x.Registry = "" } else { - x.Registry = string(r.DecodeString()) + yyv4 := &x.Registry + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "volume": if r.TryDecodeAsNil() { x.Volume = "" } else { - x.Volume = string(r.DecodeString()) + yyv6 := &x.Volume + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "readOnly": if r.TryDecodeAsNil() { x.ReadOnly = false } else { - x.ReadOnly = bool(r.DecodeBool()) + yyv8 := &x.ReadOnly + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(yyv8)) = r.DecodeBool() + } } case "user": if r.TryDecodeAsNil() { x.User = "" } else { - x.User = string(r.DecodeString()) + yyv10 := &x.User + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } case "group": if r.TryDecodeAsNil() { x.Group = "" } else { - x.Group = string(r.DecodeString()) + yyv12 := &x.Group + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys854) - } // end switch yys854 - } // end for yyj854 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -12632,16 +13730,16 @@ func (x *QuobyteVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj860 int - var yyb860 bool - var yyhl860 bool = l >= 0 - yyj860++ - if yyhl860 { - yyb860 = yyj860 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb860 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb860 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12649,15 +13747,21 @@ func (x *QuobyteVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Registry = "" } else { - x.Registry = string(r.DecodeString()) + yyv15 := &x.Registry + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj860++ - if yyhl860 { - yyb860 = yyj860 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb860 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb860 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12665,15 +13769,21 @@ func (x *QuobyteVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Volume = "" } else { - x.Volume = string(r.DecodeString()) + yyv17 := &x.Volume + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } } - yyj860++ - if yyhl860 { - yyb860 = yyj860 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb860 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb860 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12681,15 +13791,21 @@ func (x *QuobyteVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.ReadOnly = false } else { - x.ReadOnly = bool(r.DecodeBool()) + yyv19 := &x.ReadOnly + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*bool)(yyv19)) = r.DecodeBool() + } } - yyj860++ - if yyhl860 { - yyb860 = yyj860 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb860 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb860 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12697,15 +13813,21 @@ func (x *QuobyteVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.User = "" } else { - x.User = string(r.DecodeString()) + yyv21 := &x.User + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } } - yyj860++ - if yyhl860 { - yyb860 = yyj860 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb860 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb860 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12713,362 +13835,88 @@ func (x *QuobyteVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Group = "" } else { - x.Group = string(r.DecodeString()) + yyv23 := &x.Group + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*string)(yyv23)) = r.DecodeString() + } } for { - yyj860++ - if yyhl860 { - yyb860 = yyj860 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb860 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb860 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj860-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *GlusterfsVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { +func (x *FlexVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { r.EncodeNil() } else { - yym866 := z.EncBinary() - _ = yym866 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep867 := !z.EncBinary() - yy2arr867 := z.EncBasicHandle().StructToArray - var yyq867 [3]bool - _, _, _ = yysep867, yyq867, yy2arr867 - const yyr867 bool = false - yyq867[2] = x.ReadOnly != false - var yynn867 int - if yyr867 || yy2arr867 { - r.EncodeArrayStart(3) + 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 { - yynn867 = 2 - for _, b := range yyq867 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn867++ + yynn2++ } } - r.EncodeMapStart(yynn867) - yynn867 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr867 || yy2arr867 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym869 := z.EncBinary() - _ = yym869 + yym4 := z.EncBinary() + _ = yym4 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.EndpointsName)) + r.EncodeString(codecSelferC_UTF81234, string(x.Driver)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("endpoints")) + r.EncodeString(codecSelferC_UTF81234, string("driver")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym870 := z.EncBinary() - _ = yym870 + yym5 := z.EncBinary() + _ = yym5 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.EndpointsName)) + r.EncodeString(codecSelferC_UTF81234, string(x.Driver)) } } - if yyr867 || yy2arr867 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym872 := z.EncBinary() - _ = yym872 - 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) - yym873 := z.EncBinary() - _ = yym873 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) - } - } - if yyr867 || yy2arr867 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq867[2] { - yym875 := z.EncBinary() - _ = yym875 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq867[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("readOnly")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym876 := z.EncBinary() - _ = yym876 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } - } - if yyr867 || yy2arr867 { - 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 - yym877 := z.DecBinary() - _ = yym877 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct878 := r.ContainerType() - if yyct878 == codecSelferValueTypeMap1234 { - yyl878 := r.ReadMapStart() - if yyl878 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl878, d) - } - } else if yyct878 == codecSelferValueTypeArray1234 { - yyl878 := r.ReadArrayStart() - if yyl878 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl878, 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 yys879Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys879Slc - var yyhl879 bool = l >= 0 - for yyj879 := 0; ; yyj879++ { - if yyhl879 { - if yyj879 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys879Slc = r.DecodeBytes(yys879Slc, true, true) - yys879 := string(yys879Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys879 { - 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, yys879) - } // end switch yys879 - } // end for yyj879 - 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 yyj883 int - var yyb883 bool - var yyhl883 bool = l >= 0 - yyj883++ - if yyhl883 { - yyb883 = yyj883 > l - } else { - yyb883 = r.CheckBreak() - } - if yyb883 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.EndpointsName = "" - } else { - x.EndpointsName = string(r.DecodeString()) - } - yyj883++ - if yyhl883 { - yyb883 = yyj883 > l - } else { - yyb883 = r.CheckBreak() - } - if yyb883 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = string(r.DecodeString()) - } - yyj883++ - if yyhl883 { - yyb883 = yyj883 > l - } else { - yyb883 = r.CheckBreak() - } - if yyb883 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ReadOnly = false - } else { - x.ReadOnly = bool(r.DecodeBool()) - } - for { - yyj883++ - if yyhl883 { - yyb883 = yyj883 > l - } else { - yyb883 = r.CheckBreak() - } - if yyb883 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj883-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 { - yym887 := z.EncBinary() - _ = yym887 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep888 := !z.EncBinary() - yy2arr888 := z.EncBasicHandle().StructToArray - var yyq888 [8]bool - _, _, _ = yysep888, yyq888, yy2arr888 - const yyr888 bool = false - yyq888[2] = x.FSType != "" - yyq888[3] = x.RBDPool != "" - yyq888[4] = x.RadosUser != "" - yyq888[5] = x.Keyring != "" - yyq888[6] = x.SecretRef != nil - yyq888[7] = x.ReadOnly != false - var yynn888 int - if yyr888 || yy2arr888 { - r.EncodeArrayStart(8) - } else { - yynn888 = 2 - for _, b := range yyq888 { - if b { - yynn888++ - } - } - r.EncodeMapStart(yynn888) - yynn888 = 0 - } - if yyr888 || yy2arr888 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.CephMonitors == nil { - r.EncodeNil() - } else { - yym890 := z.EncBinary() - _ = yym890 - 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 { - yym891 := z.EncBinary() - _ = yym891 - if false { - } else { - z.F.EncSliceStringV(x.CephMonitors, false, e) - } - } - } - if yyr888 || yy2arr888 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym893 := z.EncBinary() - _ = yym893 - 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) - yym894 := z.EncBinary() - _ = yym894 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.RBDImage)) - } - } - if yyr888 || yy2arr888 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq888[2] { - yym896 := z.EncBinary() - _ = yym896 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) @@ -13077,96 +13925,21 @@ func (x *RBDVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq888[2] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fsType")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym897 := z.EncBinary() - _ = yym897 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) } } } - if yyr888 || yy2arr888 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq888[3] { - yym899 := z.EncBinary() - _ = yym899 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.RBDPool)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq888[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("pool")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym900 := z.EncBinary() - _ = yym900 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.RBDPool)) - } - } - } - if yyr888 || yy2arr888 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq888[4] { - yym902 := z.EncBinary() - _ = yym902 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.RadosUser)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq888[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("user")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym903 := z.EncBinary() - _ = yym903 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.RadosUser)) - } - } - } - if yyr888 || yy2arr888 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq888[5] { - yym905 := z.EncBinary() - _ = yym905 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Keyring)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq888[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("keyring")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym906 := z.EncBinary() - _ = yym906 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Keyring)) - } - } - } - if yyr888 || yy2arr888 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq888[6] { + if yyq2[2] { if x.SecretRef == nil { r.EncodeNil() } else { @@ -13176,7 +13949,7 @@ func (x *RBDVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq888[6] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("secretRef")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -13187,11 +13960,11 @@ func (x *RBDVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr888 || yy2arr888 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq888[7] { - yym909 := z.EncBinary() - _ = yym909 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeBool(bool(x.ReadOnly)) @@ -13200,19 +13973,52 @@ func (x *RBDVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq888[7] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("readOnly")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym910 := z.EncBinary() - _ = yym910 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeBool(bool(x.ReadOnly)) } } } - if yyr888 || yy2arr888 { + 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) @@ -13221,29 +14027,29 @@ func (x *RBDVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *RBDVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *FlexVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym911 := z.DecBinary() - _ = yym911 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct912 := r.ContainerType() - if yyct912 == codecSelferValueTypeMap1234 { - yyl912 := r.ReadMapStart() - if yyl912 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl912, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct912 == codecSelferValueTypeArray1234 { - yyl912 := r.ReadArrayStart() - if yyl912 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl912, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -13251,16 +14057,16 @@ func (x *RBDVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *RBDVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *FlexVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys913Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys913Slc - var yyhl913 bool = l >= 0 - for yyj913 := 0; ; yyj913++ { - if yyhl913 { - if yyj913 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -13269,51 +14075,33 @@ func (x *RBDVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys913Slc = r.DecodeBytes(yys913Slc, true, true) - yys913 := string(yys913Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys913 { - case "monitors": + switch yys3 { + case "driver": if r.TryDecodeAsNil() { - x.CephMonitors = nil + x.Driver = "" } else { - yyv914 := &x.CephMonitors - yym915 := z.DecBinary() - _ = yym915 + yyv4 := &x.Driver + yym5 := z.DecBinary() + _ = yym5 if false { } else { - z.F.DecSliceStringX(yyv914, false, d) + *((*string)(yyv4)) = r.DecodeString() } } - 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()) + yyv6 := &x.FSType + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "secretRef": if r.TryDecodeAsNil() { @@ -13330,67 +14118,69 @@ func (x *RBDVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ReadOnly = false } else { - x.ReadOnly = bool(r.DecodeBool()) + yyv9 := &x.ReadOnly + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*bool)(yyv9)) = r.DecodeBool() + } + } + case "options": + if r.TryDecodeAsNil() { + x.Options = nil + } else { + yyv11 := &x.Options + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + z.F.DecMapStringStringX(yyv11, false, d) + } } default: - z.DecStructFieldNotFound(-1, yys913) - } // end switch yys913 - } // end for yyj913 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } -func (x *RBDVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { +func (x *FlexVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj923 int - var yyb923 bool - var yyhl923 bool = l >= 0 - yyj923++ - if yyhl923 { - yyb923 = yyj923 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb923 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb923 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.CephMonitors = nil + x.Driver = "" } else { - yyv924 := &x.CephMonitors - yym925 := z.DecBinary() - _ = yym925 + yyv14 := &x.Driver + yym15 := z.DecBinary() + _ = yym15 if false { } else { - z.F.DecSliceStringX(yyv924, false, d) + *((*string)(yyv14)) = r.DecodeString() } } - yyj923++ - if yyhl923 { - yyb923 = yyj923 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb923 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb923 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RBDImage = "" - } else { - x.RBDImage = string(r.DecodeString()) - } - yyj923++ - if yyhl923 { - yyb923 = yyj923 > l - } else { - yyb923 = r.CheckBreak() - } - if yyb923 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13398,63 +14188,21 @@ func (x *RBDVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.FSType = "" } else { - x.FSType = string(r.DecodeString()) + yyv16 := &x.FSType + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } - yyj923++ - if yyhl923 { - yyb923 = yyj923 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb923 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb923 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RBDPool = "" - } else { - x.RBDPool = string(r.DecodeString()) - } - yyj923++ - if yyhl923 { - yyb923 = yyj923 > l - } else { - yyb923 = r.CheckBreak() - } - if yyb923 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.RadosUser = "" - } else { - x.RadosUser = string(r.DecodeString()) - } - yyj923++ - if yyhl923 { - yyb923 = yyj923 > l - } else { - yyb923 = r.CheckBreak() - } - if yyb923 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Keyring = "" - } else { - x.Keyring = string(r.DecodeString()) - } - yyj923++ - if yyhl923 { - yyb923 = yyj923 > l - } else { - yyb923 = r.CheckBreak() - } - if yyb923 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13469,13 +14217,13 @@ func (x *RBDVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } x.SecretRef.CodecDecodeSelf(d) } - yyj923++ - if yyhl923 { - yyb923 = yyj923 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb923 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb923 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13483,60 +14231,89 @@ func (x *RBDVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ReadOnly = false } else { - x.ReadOnly = bool(r.DecodeBool()) + yyv19 := &x.ReadOnly + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*bool)(yyv19)) = r.DecodeBool() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Options = nil + } else { + yyv21 := &x.Options + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + z.F.DecMapStringStringX(yyv21, false, d) + } } for { - yyj923++ - if yyhl923 { - yyb923 = yyj923 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb923 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb923 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj923-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *CinderVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { +func (x *AWSElasticBlockStoreVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { r.EncodeNil() } else { - yym933 := z.EncBinary() - _ = yym933 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep934 := !z.EncBinary() - yy2arr934 := z.EncBasicHandle().StructToArray - var yyq934 [3]bool - _, _, _ = yysep934, yyq934, yy2arr934 - const yyr934 bool = false - yyq934[1] = x.FSType != "" - yyq934[2] = x.ReadOnly != false - var yynn934 int - if yyr934 || yy2arr934 { - r.EncodeArrayStart(3) + 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 { - yynn934 = 1 - for _, b := range yyq934 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn934++ + yynn2++ } } - r.EncodeMapStart(yynn934) - yynn934 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr934 || yy2arr934 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym936 := z.EncBinary() - _ = yym936 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID)) @@ -13545,18 +14322,18 @@ func (x *CinderVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumeID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym937 := z.EncBinary() - _ = yym937 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID)) } } - if yyr934 || yy2arr934 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq934[1] { - yym939 := z.EncBinary() - _ = yym939 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) @@ -13565,23 +14342,48 @@ func (x *CinderVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq934[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fsType")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym940 := z.EncBinary() - _ = yym940 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) } } } - if yyr934 || yy2arr934 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq934[2] { - yym942 := z.EncBinary() - _ = yym942 + 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)) @@ -13590,19 +14392,19 @@ func (x *CinderVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq934[2] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("readOnly")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym943 := z.EncBinary() - _ = yym943 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeBool(bool(x.ReadOnly)) } } } - if yyr934 || yy2arr934 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -13611,29 +14413,29 @@ func (x *CinderVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *CinderVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *AWSElasticBlockStoreVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym944 := z.DecBinary() - _ = yym944 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct945 := r.ContainerType() - if yyct945 == codecSelferValueTypeMap1234 { - yyl945 := r.ReadMapStart() - if yyl945 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl945, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct945 == codecSelferValueTypeArray1234 { - yyl945 := r.ReadArrayStart() - if yyl945 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl945, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -13641,16 +14443,16 @@ func (x *CinderVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *CinderVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *AWSElasticBlockStoreVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys946Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys946Slc - var yyhl946 bool = l >= 0 - for yyj946 := 0; ; yyj946++ { - if yyhl946 { - if yyj946 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -13659,49 +14461,79 @@ func (x *CinderVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys946Slc = r.DecodeBytes(yys946Slc, true, true) - yys946 := string(yys946Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys946 { + switch yys3 { case "volumeID": if r.TryDecodeAsNil() { x.VolumeID = "" } else { - x.VolumeID = string(r.DecodeString()) + yyv4 := &x.VolumeID + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "fsType": if r.TryDecodeAsNil() { x.FSType = "" } else { - x.FSType = string(r.DecodeString()) + yyv6 := &x.FSType + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "partition": + if r.TryDecodeAsNil() { + x.Partition = 0 + } else { + yyv8 := &x.Partition + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } } case "readOnly": if r.TryDecodeAsNil() { x.ReadOnly = false } else { - x.ReadOnly = bool(r.DecodeBool()) + yyv10 := &x.ReadOnly + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(yyv10)) = r.DecodeBool() + } } default: - z.DecStructFieldNotFound(-1, yys946) - } // end switch yys946 - } // end for yyj946 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } -func (x *CinderVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { +func (x *AWSElasticBlockStoreVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj950 int - var yyb950 bool - var yyhl950 bool = l >= 0 - yyj950++ - if yyhl950 { - yyb950 = yyj950 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb950 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb950 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13709,15 +14541,21 @@ func (x *CinderVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.VolumeID = "" } else { - x.VolumeID = string(r.DecodeString()) + yyv13 := &x.VolumeID + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj950++ - if yyhl950 { - yyb950 = yyj950 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb950 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb950 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13725,15 +14563,43 @@ func (x *CinderVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.FSType = "" } else { - x.FSType = string(r.DecodeString()) + yyv15 := &x.FSType + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj950++ - if yyhl950 { - yyb950 = yyj950 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb950 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb950 { + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Partition = 0 + } else { + yyv17 := &x.Partition + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*int32)(yyv17)) = int32(r.DecodeInt(32)) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13741,210 +14607,132 @@ func (x *CinderVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.ReadOnly = false } else { - x.ReadOnly = bool(r.DecodeBool()) + yyv19 := &x.ReadOnly + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*bool)(yyv19)) = r.DecodeBool() + } } for { - yyj950++ - if yyhl950 { - yyb950 = yyj950 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb950 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb950 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj950-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *CephFSVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { +func (x *GitRepoVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { r.EncodeNil() } else { - yym954 := z.EncBinary() - _ = yym954 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep955 := !z.EncBinary() - yy2arr955 := z.EncBasicHandle().StructToArray - var yyq955 [6]bool - _, _, _ = yysep955, yyq955, yy2arr955 - const yyr955 bool = false - yyq955[1] = x.Path != "" - yyq955[2] = x.User != "" - yyq955[3] = x.SecretFile != "" - yyq955[4] = x.SecretRef != nil - yyq955[5] = x.ReadOnly != false - var yynn955 int - if yyr955 || yy2arr955 { - r.EncodeArrayStart(6) + 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 { - yynn955 = 1 - for _, b := range yyq955 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn955++ + yynn2++ } } - r.EncodeMapStart(yynn955) - yynn955 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr955 || yy2arr955 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Monitors == nil { - r.EncodeNil() + yym4 := z.EncBinary() + _ = yym4 + if false { } else { - yym957 := z.EncBinary() - _ = yym957 - if false { - } else { - z.F.EncSliceStringV(x.Monitors, false, e) - } + r.EncodeString(codecSelferC_UTF81234, string(x.Repository)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("monitors")) + r.EncodeString(codecSelferC_UTF81234, string("repository")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Monitors == nil { - r.EncodeNil() + yym5 := z.EncBinary() + _ = yym5 + if false { } else { - yym958 := z.EncBinary() - _ = yym958 - if false { - } else { - z.F.EncSliceStringV(x.Monitors, false, e) - } + r.EncodeString(codecSelferC_UTF81234, string(x.Repository)) } } - if yyr955 || yy2arr955 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq955[1] { - yym960 := z.EncBinary() - _ = yym960 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + r.EncodeString(codecSelferC_UTF81234, string(x.Revision)) } } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq955[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("path")) + r.EncodeString(codecSelferC_UTF81234, string("revision")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym961 := z.EncBinary() - _ = yym961 + yym8 := z.EncBinary() + _ = yym8 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + r.EncodeString(codecSelferC_UTF81234, string(x.Revision)) } } } - if yyr955 || yy2arr955 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq955[2] { - yym963 := z.EncBinary() - _ = yym963 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.User)) + r.EncodeString(codecSelferC_UTF81234, string(x.Directory)) } } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq955[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("user")) + r.EncodeString(codecSelferC_UTF81234, string("directory")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym964 := z.EncBinary() - _ = yym964 + yym11 := z.EncBinary() + _ = yym11 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.User)) + r.EncodeString(codecSelferC_UTF81234, string(x.Directory)) } } } - if yyr955 || yy2arr955 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq955[3] { - yym966 := z.EncBinary() - _ = yym966 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SecretFile)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq955[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("secretFile")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym967 := z.EncBinary() - _ = yym967 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.SecretFile)) - } - } - } - if yyr955 || yy2arr955 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq955[4] { - if x.SecretRef == nil { - r.EncodeNil() - } else { - x.SecretRef.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq955[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 yyr955 || yy2arr955 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq955[5] { - yym970 := z.EncBinary() - _ = yym970 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq955[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("readOnly")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym971 := z.EncBinary() - _ = yym971 - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } - } - if yyr955 || yy2arr955 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -13953,29 +14741,29 @@ func (x *CephFSVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *CephFSVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *GitRepoVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym972 := z.DecBinary() - _ = yym972 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct973 := r.ContainerType() - if yyct973 == codecSelferValueTypeMap1234 { - yyl973 := r.ReadMapStart() - if yyl973 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl973, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct973 == codecSelferValueTypeArray1234 { - yyl973 := r.ReadArrayStart() - if yyl973 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl973, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -13983,16 +14771,16 @@ func (x *CephFSVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *CephFSVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *GitRepoVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys974Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys974Slc - var yyhl974 bool = l >= 0 - for yyj974 := 0; ; yyj974++ { - if yyhl974 { - if yyj974 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -14001,457 +14789,305 @@ func (x *CephFSVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys974Slc = r.DecodeBytes(yys974Slc, true, true) - yys974 := string(yys974Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys974 { - case "monitors": + switch yys3 { + case "repository": if r.TryDecodeAsNil() { - x.Monitors = nil + x.Repository = "" } else { - yyv975 := &x.Monitors - yym976 := z.DecBinary() - _ = yym976 + yyv4 := &x.Repository + yym5 := z.DecBinary() + _ = yym5 if false { } else { - z.F.DecSliceStringX(yyv975, false, d) + *((*string)(yyv4)) = r.DecodeString() } } - case "path": + case "revision": if r.TryDecodeAsNil() { - x.Path = "" + x.Revision = "" } 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 + yyv6 := &x.Revision + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() } - } else { - if x.SecretRef == nil { - x.SecretRef = new(LocalObjectReference) - } - x.SecretRef.CodecDecodeSelf(d) } - case "readOnly": + case "directory": if r.TryDecodeAsNil() { - x.ReadOnly = false + x.Directory = "" } else { - x.ReadOnly = bool(r.DecodeBool()) + yyv8 := &x.Directory + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys974) - } // end switch yys974 - } // end for yyj974 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } -func (x *CephFSVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { +func (x *GitRepoVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj982 int - var yyb982 bool - var yyhl982 bool = l >= 0 - yyj982++ - if yyhl982 { - yyb982 = yyj982 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb982 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb982 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Monitors = nil + x.Repository = "" } else { - yyv983 := &x.Monitors - yym984 := z.DecBinary() - _ = yym984 + yyv11 := &x.Repository + yym12 := z.DecBinary() + _ = yym12 if false { } else { - z.F.DecSliceStringX(yyv983, false, d) + *((*string)(yyv11)) = r.DecodeString() } } - yyj982++ - if yyhl982 { - yyb982 = yyj982 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb982 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb982 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Path = "" + x.Revision = "" } else { - x.Path = string(r.DecodeString()) - } - yyj982++ - if yyhl982 { - yyb982 = yyj982 > l - } else { - yyb982 = r.CheckBreak() - } - if yyb982 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.User = "" - } else { - x.User = string(r.DecodeString()) - } - yyj982++ - if yyhl982 { - yyb982 = yyj982 > l - } else { - yyb982 = r.CheckBreak() - } - if yyb982 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.SecretFile = "" - } else { - x.SecretFile = string(r.DecodeString()) - } - yyj982++ - if yyhl982 { - yyb982 = yyj982 > l - } else { - yyb982 = r.CheckBreak() - } - if yyb982 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.SecretRef != nil { - x.SecretRef = nil + yyv13 := &x.Revision + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() } - } else { - if x.SecretRef == nil { - x.SecretRef = new(LocalObjectReference) - } - x.SecretRef.CodecDecodeSelf(d) } - yyj982++ - if yyhl982 { - yyb982 = yyj982 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb982 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb982 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ReadOnly = false + x.Directory = "" } else { - x.ReadOnly = bool(r.DecodeBool()) + yyv15 := &x.Directory + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } for { - yyj982++ - if yyhl982 { - yyb982 = yyj982 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb982 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb982 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj982-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *FlockerVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { +func (x *SecretVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { r.EncodeNil() } else { - yym990 := z.EncBinary() - _ = yym990 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep991 := !z.EncBinary() - yy2arr991 := z.EncBasicHandle().StructToArray - var yyq991 [1]bool - _, _, _ = yysep991, yyq991, yy2arr991 - const yyr991 bool = false - var yynn991 int - if yyr991 || yy2arr991 { - r.EncodeArrayStart(1) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.SecretName != "" + yyq2[1] = len(x.Items) != 0 + yyq2[2] = x.DefaultMode != nil + yyq2[3] = x.Optional != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) } else { - yynn991 = 1 - for _, b := range yyq991 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn991++ + yynn2++ } } - r.EncodeMapStart(yynn991) - yynn991 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr991 || yy2arr991 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym993 := z.EncBinary() - _ = yym993 - if false { + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.SecretName)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.DatasetName)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("datasetName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym994 := z.EncBinary() - _ = yym994 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.DatasetName)) - } - } - if yyr991 || yy2arr991 { - 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 - yym995 := z.DecBinary() - _ = yym995 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct996 := r.ContainerType() - if yyct996 == codecSelferValueTypeMap1234 { - yyl996 := r.ReadMapStart() - if yyl996 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl996, d) - } - } else if yyct996 == codecSelferValueTypeArray1234 { - yyl996 := r.ReadArrayStart() - if yyl996 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl996, 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 yys997Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys997Slc - var yyhl997 bool = l >= 0 - for yyj997 := 0; ; yyj997++ { - if yyhl997 { - if yyj997 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys997Slc = r.DecodeBytes(yys997Slc, true, true) - yys997 := string(yys997Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys997 { - case "datasetName": - if r.TryDecodeAsNil() { - x.DatasetName = "" - } else { - x.DatasetName = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys997) - } // end switch yys997 - } // end for yyj997 - 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 yyj999 int - var yyb999 bool - var yyhl999 bool = l >= 0 - yyj999++ - if yyhl999 { - yyb999 = yyj999 > l - } else { - yyb999 = r.CheckBreak() - } - if yyb999 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.DatasetName = "" - } else { - x.DatasetName = string(r.DecodeString()) - } - for { - yyj999++ - if yyhl999 { - yyb999 = yyj999 > l - } else { - yyb999 = r.CheckBreak() - } - if yyb999 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj999-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 { - yym1001 := z.EncBinary() - _ = yym1001 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1002 := !z.EncBinary() - yy2arr1002 := z.EncBasicHandle().StructToArray - var yyq1002 [2]bool - _, _, _ = yysep1002, yyq1002, yy2arr1002 - const yyr1002 bool = false - yyq1002[0] = len(x.Items) != 0 - yyq1002[1] = x.DefaultMode != nil - var yynn1002 int - if yyr1002 || yy2arr1002 { - r.EncodeArrayStart(2) - } else { - yynn1002 = 0 - for _, b := range yyq1002 { - if b { - yynn1002++ + 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)) } } - r.EncodeMapStart(yynn1002) - yynn1002 = 0 } - if yyr1002 || yy2arr1002 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1002[0] { + if yyq2[1] { if x.Items == nil { r.EncodeNil() } else { - yym1004 := z.EncBinary() - _ = yym1004 + yym7 := z.EncBinary() + _ = yym7 if false { } else { - h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e) + h.encSliceKeyToPath(([]KeyToPath)(x.Items), e) } } } else { r.EncodeNil() } } else { - if yyq1002[0] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("items")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Items == nil { r.EncodeNil() } else { - yym1005 := z.EncBinary() - _ = yym1005 + yym8 := z.EncBinary() + _ = yym8 if false { } else { - h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e) + h.encSliceKeyToPath(([]KeyToPath)(x.Items), e) } } } } - if yyr1002 || yy2arr1002 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1002[1] { + if yyq2[2] { if x.DefaultMode == nil { r.EncodeNil() } else { - yy1007 := *x.DefaultMode - yym1008 := z.EncBinary() - _ = yym1008 + yy10 := *x.DefaultMode + yym11 := z.EncBinary() + _ = yym11 if false { } else { - r.EncodeInt(int64(yy1007)) + r.EncodeInt(int64(yy10)) } } } else { r.EncodeNil() } } else { - if yyq1002[1] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("defaultMode")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.DefaultMode == nil { r.EncodeNil() } else { - yy1009 := *x.DefaultMode - yym1010 := z.EncBinary() - _ = yym1010 + yy12 := *x.DefaultMode + yym13 := z.EncBinary() + _ = yym13 if false { } else { - r.EncodeInt(int64(yy1009)) + r.EncodeInt(int64(yy12)) } } } } - if yyr1002 || yy2arr1002 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Optional == nil { + r.EncodeNil() + } else { + yy15 := *x.Optional + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeBool(bool(yy15)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("optional")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Optional == nil { + r.EncodeNil() + } else { + yy17 := *x.Optional + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + r.EncodeBool(bool(yy17)) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -14460,29 +15096,29 @@ func (x *DownwardAPIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *DownwardAPIVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *SecretVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1011 := z.DecBinary() - _ = yym1011 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1012 := r.ContainerType() - if yyct1012 == codecSelferValueTypeMap1234 { - yyl1012 := r.ReadMapStart() - if yyl1012 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1012, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1012 == codecSelferValueTypeArray1234 { - yyl1012 := r.ReadArrayStart() - if yyl1012 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1012, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -14490,16 +15126,16 @@ func (x *DownwardAPIVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *DownwardAPIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *SecretVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1013Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1013Slc - var yyhl1013 bool = l >= 0 - for yyj1013 := 0; ; yyj1013++ { - if yyhl1013 { - if yyj1013 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -14508,20 +15144,32 @@ func (x *DownwardAPIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1013Slc = r.DecodeBytes(yys1013Slc, true, true) - yys1013 := string(yys1013Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1013 { + switch yys3 { + case "secretName": + if r.TryDecodeAsNil() { + x.SecretName = "" + } else { + yyv4 := &x.SecretName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1014 := &x.Items - yym1015 := z.DecBinary() - _ = yym1015 + yyv6 := &x.Items + yym7 := z.DecBinary() + _ = yym7 if false { } else { - h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv1014), d) + h.decSliceKeyToPath((*[]KeyToPath)(yyv6), d) } } case "defaultMode": @@ -14533,34 +15181,72 @@ func (x *DownwardAPIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Dec if x.DefaultMode == nil { x.DefaultMode = new(int32) } - yym1017 := z.DecBinary() - _ = yym1017 + yym9 := z.DecBinary() + _ = yym9 if false { } else { *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32)) } } + case "optional": + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } default: - z.DecStructFieldNotFound(-1, yys1013) - } // end switch yys1013 - } // end for yyj1013 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } -func (x *DownwardAPIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { +func (x *SecretVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1018 int - var yyb1018 bool - var yyhl1018 bool = l >= 0 - yyj1018++ - if yyhl1018 { - yyb1018 = yyj1018 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1018 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1018 { + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.SecretName = "" + } else { + yyv13 := &x.SecretName + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -14568,21 +15254,21 @@ func (x *DownwardAPIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1019 := &x.Items - yym1020 := z.DecBinary() - _ = yym1020 + yyv15 := &x.Items + yym16 := z.DecBinary() + _ = yym16 if false { } else { - h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv1019), d) + h.decSliceKeyToPath((*[]KeyToPath)(yyv15), d) } } - yyj1018++ - if yyhl1018 { - yyb1018 = yyj1018 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1018 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1018 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -14595,163 +15281,182 @@ func (x *DownwardAPIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.D if x.DefaultMode == nil { x.DefaultMode = new(int32) } - yym1022 := z.DecBinary() - _ = yym1022 + yym18 := z.DecBinary() + _ = yym18 if false { } else { *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32)) } } - for { - yyj1018++ - if yyhl1018 { - yyb1018 = yyj1018 > l - } else { - yyb1018 = r.CheckBreak() + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil } - if yyb1018 { + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1018-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *DownwardAPIVolumeFile) CodecEncodeSelf(e *codec1978.Encoder) { +func (x *SecretProjection) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r if x == nil { r.EncodeNil() } else { - yym1023 := z.EncBinary() - _ = yym1023 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1024 := !z.EncBinary() - yy2arr1024 := z.EncBasicHandle().StructToArray - var yyq1024 [4]bool - _, _, _ = yysep1024, yyq1024, yy2arr1024 - const yyr1024 bool = false - yyq1024[1] = x.FieldRef != nil - yyq1024[2] = x.ResourceFieldRef != nil - yyq1024[3] = x.Mode != nil - var yynn1024 int - if yyr1024 || yy2arr1024 { - r.EncodeArrayStart(4) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Name != "" + yyq2[1] = len(x.Items) != 0 + yyq2[2] = x.Optional != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) } else { - yynn1024 = 1 - for _, b := range yyq1024 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1024++ + yynn2++ } } - r.EncodeMapStart(yynn1024) - yynn1024 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1024 || yy2arr1024 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1026 := z.EncBinary() - _ = yym1026 - 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) - yym1027 := z.EncBinary() - _ = yym1027 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) - } - } - if yyr1024 || yy2arr1024 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1024[1] { - if x.FieldRef == nil { - r.EncodeNil() + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { } else { - x.FieldRef.CodecEncodeSelf(e) + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } else { - r.EncodeNil() + r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1024[1] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("fieldRef")) + r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.FieldRef == nil { - r.EncodeNil() + yym5 := z.EncBinary() + _ = yym5 + if false { } else { - x.FieldRef.CodecEncodeSelf(e) + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } } - if yyr1024 || yy2arr1024 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1024[2] { - if x.ResourceFieldRef == nil { + if yyq2[1] { + if x.Items == nil { r.EncodeNil() } else { - x.ResourceFieldRef.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq1024[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 yyr1024 || yy2arr1024 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1024[3] { - if x.Mode == nil { - r.EncodeNil() - } else { - yy1031 := *x.Mode - yym1032 := z.EncBinary() - _ = yym1032 + yym7 := z.EncBinary() + _ = yym7 if false { } else { - r.EncodeInt(int64(yy1031)) + h.encSliceKeyToPath(([]KeyToPath)(x.Items), e) } } } else { r.EncodeNil() } } else { - if yyq1024[3] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("mode")) + r.EncodeString(codecSelferC_UTF81234, string("items")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Mode == nil { + if x.Items == nil { r.EncodeNil() } else { - yy1033 := *x.Mode - yym1034 := z.EncBinary() - _ = yym1034 + yym8 := z.EncBinary() + _ = yym8 if false { } else { - r.EncodeInt(int64(yy1033)) + h.encSliceKeyToPath(([]KeyToPath)(x.Items), e) } } } } - if yyr1024 || yy2arr1024 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Optional == nil { + r.EncodeNil() + } else { + yy10 := *x.Optional + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeBool(bool(yy10)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("optional")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Optional == nil { + r.EncodeNil() + } else { + yy12 := *x.Optional + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeBool(bool(yy12)) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -14760,29 +15465,29 @@ func (x *DownwardAPIVolumeFile) CodecEncodeSelf(e *codec1978.Encoder) { } } -func (x *DownwardAPIVolumeFile) CodecDecodeSelf(d *codec1978.Decoder) { +func (x *SecretProjection) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1035 := z.DecBinary() - _ = yym1035 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1036 := r.ContainerType() - if yyct1036 == codecSelferValueTypeMap1234 { - yyl1036 := r.ReadMapStart() - if yyl1036 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1036, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1036 == codecSelferValueTypeArray1234 { - yyl1036 := r.ReadArrayStart() - if yyl1036 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1036, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -14790,16 +15495,16 @@ func (x *DownwardAPIVolumeFile) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *DownwardAPIVolumeFile) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { +func (x *SecretProjection) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1037Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1037Slc - var yyhl1037 bool = l >= 0 - for yyj1037 := 0; ; yyj1037++ { - if yyhl1037 { - if yyj1037 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -14808,75 +15513,384 @@ func (x *DownwardAPIVolumeFile) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1037Slc = r.DecodeBytes(yys1037Slc, true, true) - yys1037 := string(yys1037Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1037 { + switch yys3 { + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv6 := &x.Items + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + h.decSliceKeyToPath((*[]KeyToPath)(yyv6), d) + } + } + case "optional": + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *SecretProjection) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv11 := &x.Name + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv13 := &x.Items + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + h.decSliceKeyToPath((*[]KeyToPath)(yyv13), d) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *NFSVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[2] = x.ReadOnly != false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Server)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("server")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Server)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("path")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("readOnly")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *NFSVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *NFSVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "server": + if r.TryDecodeAsNil() { + x.Server = "" + } else { + yyv4 := &x.Server + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } case "path": if r.TryDecodeAsNil() { x.Path = "" } else { - 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) - } - case "mode": - if r.TryDecodeAsNil() { - if x.Mode != nil { - x.Mode = nil - } - } else { - if x.Mode == nil { - x.Mode = new(int32) - } - yym1042 := z.DecBinary() - _ = yym1042 + yyv6 := &x.Path + yym7 := z.DecBinary() + _ = yym7 if false { } else { - *((*int32)(x.Mode)) = int32(r.DecodeInt(32)) + *((*string)(yyv6)) = r.DecodeString() + } + } + case "readOnly": + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv8 := &x.ReadOnly + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(yyv8)) = r.DecodeBool() } } default: - z.DecStructFieldNotFound(-1, yys1037) - } // end switch yys1037 - } // end for yyj1037 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } -func (x *DownwardAPIVolumeFile) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { +func (x *NFSVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1043 int - var yyb1043 bool - var yyhl1043 bool = l >= 0 - yyj1043++ - if yyhl1043 { - yyb1043 = yyj1043 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1043 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1043 { + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Server = "" + } else { + yyv11 := &x.Server + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -14884,88 +15898,949 @@ func (x *DownwardAPIVolumeFile) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) - } - yyj1043++ - if yyhl1043 { - yyb1043 = yyj1043 > l - } else { - yyb1043 = r.CheckBreak() - } - if yyb1043 { - 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) - } - yyj1043++ - if yyhl1043 { - yyb1043 = yyj1043 > l - } else { - yyb1043 = r.CheckBreak() - } - if yyb1043 { - 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) - } - yyj1043++ - if yyhl1043 { - yyb1043 = yyj1043 > l - } else { - yyb1043 = r.CheckBreak() - } - if yyb1043 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Mode != nil { - x.Mode = nil - } - } else { - if x.Mode == nil { - x.Mode = new(int32) - } - yym1048 := z.DecBinary() - _ = yym1048 + yyv13 := &x.Path + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*int32)(x.Mode)) = int32(r.DecodeInt(32)) + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv15 := &x.ReadOnly + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*bool)(yyv15)) = r.DecodeBool() } } for { - yyj1043++ - if yyhl1043 { - yyb1043 = yyj1043 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1043 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1043 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1043-1, "") + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ISCSIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [7]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[3] = x.ISCSIInterface != "" + yyq2[4] = x.FSType != "" + yyq2[5] = x.ReadOnly != false + yyq2[6] = len(x.Portals) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(7) + } else { + yynn2 = 3 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.TargetPortal)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("targetPortal")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.TargetPortal)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.IQN)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("iqn")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.IQN)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(x.Lun)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lun")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeInt(int64(x.Lun)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ISCSIInterface)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("iscsiInterface")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ISCSIInterface)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("fsType")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("readOnly")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[6] { + if x.Portals == nil { + r.EncodeNil() + } else { + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + z.F.EncSliceStringV(x.Portals, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("portals")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Portals == nil { + r.EncodeNil() + } else { + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + z.F.EncSliceStringV(x.Portals, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ISCSIVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ISCSIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "targetPortal": + if r.TryDecodeAsNil() { + x.TargetPortal = "" + } else { + yyv4 := &x.TargetPortal + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "iqn": + if r.TryDecodeAsNil() { + x.IQN = "" + } else { + yyv6 := &x.IQN + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "lun": + if r.TryDecodeAsNil() { + x.Lun = 0 + } else { + yyv8 := &x.Lun + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } + } + case "iscsiInterface": + if r.TryDecodeAsNil() { + x.ISCSIInterface = "" + } else { + yyv10 := &x.ISCSIInterface + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + case "fsType": + if r.TryDecodeAsNil() { + x.FSType = "" + } else { + yyv12 := &x.FSType + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } + } + case "readOnly": + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv14 := &x.ReadOnly + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*bool)(yyv14)) = r.DecodeBool() + } + } + case "portals": + if r.TryDecodeAsNil() { + x.Portals = nil + } else { + yyv16 := &x.Portals + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + z.F.DecSliceStringX(yyv16, false, d) + } + } + 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 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.TargetPortal = "" + } else { + yyv19 := &x.TargetPortal + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.IQN = "" + } else { + yyv21 := &x.IQN + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Lun = 0 + } else { + yyv23 := &x.Lun + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*int32)(yyv23)) = int32(r.DecodeInt(32)) + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ISCSIInterface = "" + } else { + yyv25 := &x.ISCSIInterface + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*string)(yyv25)) = r.DecodeString() + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.FSType = "" + } else { + yyv27 := &x.FSType + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*string)(yyv27)) = r.DecodeString() + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv29 := &x.ReadOnly + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*bool)(yyv29)) = r.DecodeBool() + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Portals = nil + } else { + yyv31 := &x.Portals + 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 *FCVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[2] = x.FSType != "" + yyq2[3] = x.ReadOnly != false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.TargetWWNs == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + z.F.EncSliceStringV(x.TargetWWNs, false, e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("targetWWNs")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.TargetWWNs == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + z.F.EncSliceStringV(x.TargetWWNs, false, e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Lun == nil { + r.EncodeNil() + } else { + yy7 := *x.Lun + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeInt(int64(yy7)) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lun")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Lun == nil { + r.EncodeNil() + } else { + yy9 := *x.Lun + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(yy9)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym12 := z.EncBinary() + _ = yym12 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("fsType")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("readOnly")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *FCVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *FCVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "targetWWNs": + if r.TryDecodeAsNil() { + x.TargetWWNs = nil + } else { + yyv4 := &x.TargetWWNs + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + z.F.DecSliceStringX(yyv4, false, d) + } + } + case "lun": + if r.TryDecodeAsNil() { + if x.Lun != nil { + x.Lun = nil + } + } else { + if x.Lun == nil { + x.Lun = new(int32) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(x.Lun)) = int32(r.DecodeInt(32)) + } + } + case "fsType": + if r.TryDecodeAsNil() { + x.FSType = "" + } else { + yyv8 := &x.FSType + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "readOnly": + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv10 := &x.ReadOnly + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(yyv10)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *FCVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TargetWWNs = nil + } else { + yyv13 := &x.TargetWWNs + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + z.F.DecSliceStringX(yyv13, false, d) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Lun != nil { + x.Lun = nil + } + } else { + if x.Lun == nil { + x.Lun = new(int32) + } + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*int32)(x.Lun)) = int32(r.DecodeInt(32)) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.FSType = "" + } else { + yyv17 := &x.FSType + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv19 := &x.ReadOnly + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*bool)(yyv19)) = r.DecodeBool() + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -14977,34 +16852,34 @@ func (x *AzureFileVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1049 := z.EncBinary() - _ = yym1049 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1050 := !z.EncBinary() - yy2arr1050 := z.EncBasicHandle().StructToArray - var yyq1050 [3]bool - _, _, _ = yysep1050, yyq1050, yy2arr1050 - const yyr1050 bool = false - yyq1050[2] = x.ReadOnly != false - var yynn1050 int - if yyr1050 || yy2arr1050 { + 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 { - yynn1050 = 2 - for _, b := range yyq1050 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn1050++ + yynn2++ } } - r.EncodeMapStart(yynn1050) - yynn1050 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1050 || yy2arr1050 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1052 := z.EncBinary() - _ = yym1052 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SecretName)) @@ -15013,17 +16888,17 @@ func (x *AzureFileVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("secretName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1053 := z.EncBinary() - _ = yym1053 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SecretName)) } } - if yyr1050 || yy2arr1050 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1055 := z.EncBinary() - _ = yym1055 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ShareName)) @@ -15032,18 +16907,18 @@ func (x *AzureFileVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("shareName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1056 := z.EncBinary() - _ = yym1056 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ShareName)) } } - if yyr1050 || yy2arr1050 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1050[2] { - yym1058 := z.EncBinary() - _ = yym1058 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeBool(bool(x.ReadOnly)) @@ -15052,19 +16927,19 @@ func (x *AzureFileVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq1050[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("readOnly")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1059 := z.EncBinary() - _ = yym1059 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeBool(bool(x.ReadOnly)) } } } - if yyr1050 || yy2arr1050 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -15077,25 +16952,25 @@ func (x *AzureFileVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1060 := z.DecBinary() - _ = yym1060 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1061 := r.ContainerType() - if yyct1061 == codecSelferValueTypeMap1234 { - yyl1061 := r.ReadMapStart() - if yyl1061 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1061, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1061 == codecSelferValueTypeArray1234 { - yyl1061 := r.ReadArrayStart() - if yyl1061 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1061, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -15107,12 +16982,12 @@ func (x *AzureFileVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1062Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1062Slc - var yyhl1062 bool = l >= 0 - for yyj1062 := 0; ; yyj1062++ { - if yyhl1062 { - if yyj1062 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -15121,32 +16996,50 @@ func (x *AzureFileVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1062Slc = r.DecodeBytes(yys1062Slc, true, true) - yys1062 := string(yys1062Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1062 { + switch yys3 { case "secretName": if r.TryDecodeAsNil() { x.SecretName = "" } else { - x.SecretName = string(r.DecodeString()) + yyv4 := &x.SecretName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "shareName": if r.TryDecodeAsNil() { x.ShareName = "" } else { - x.ShareName = string(r.DecodeString()) + yyv6 := &x.ShareName + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "readOnly": if r.TryDecodeAsNil() { x.ReadOnly = false } else { - x.ReadOnly = bool(r.DecodeBool()) + yyv8 := &x.ReadOnly + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(yyv8)) = r.DecodeBool() + } } default: - z.DecStructFieldNotFound(-1, yys1062) - } // end switch yys1062 - } // end for yyj1062 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -15154,16 +17047,16 @@ func (x *AzureFileVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1066 int - var yyb1066 bool - var yyhl1066 bool = l >= 0 - yyj1066++ - if yyhl1066 { - yyb1066 = yyj1066 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1066 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1066 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15171,15 +17064,21 @@ func (x *AzureFileVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.SecretName = "" } else { - x.SecretName = string(r.DecodeString()) + yyv11 := &x.SecretName + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } - yyj1066++ - if yyhl1066 { - yyb1066 = yyj1066 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1066 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1066 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15187,15 +17086,21 @@ func (x *AzureFileVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.ShareName = "" } else { - x.ShareName = string(r.DecodeString()) + yyv13 := &x.ShareName + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj1066++ - if yyhl1066 { - yyb1066 = yyj1066 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1066 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1066 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15203,20 +17108,26 @@ func (x *AzureFileVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.ReadOnly = false } else { - x.ReadOnly = bool(r.DecodeBool()) + yyv15 := &x.ReadOnly + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*bool)(yyv15)) = r.DecodeBool() + } } for { - yyj1066++ - if yyhl1066 { - yyb1066 = yyj1066 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1066 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1066 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1066-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15228,34 +17139,34 @@ func (x *VsphereVirtualDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1070 := z.EncBinary() - _ = yym1070 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1071 := !z.EncBinary() - yy2arr1071 := z.EncBasicHandle().StructToArray - var yyq1071 [2]bool - _, _, _ = yysep1071, yyq1071, yy2arr1071 - const yyr1071 bool = false - yyq1071[1] = x.FSType != "" - var yynn1071 int - if yyr1071 || yy2arr1071 { + 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 { - yynn1071 = 1 - for _, b := range yyq1071 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1071++ + yynn2++ } } - r.EncodeMapStart(yynn1071) - yynn1071 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1071 || yy2arr1071 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1073 := z.EncBinary() - _ = yym1073 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.VolumePath)) @@ -15264,18 +17175,18 @@ func (x *VsphereVirtualDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumePath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1074 := z.EncBinary() - _ = yym1074 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.VolumePath)) } } - if yyr1071 || yy2arr1071 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1071[1] { - yym1076 := z.EncBinary() - _ = yym1076 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) @@ -15284,19 +17195,19 @@ func (x *VsphereVirtualDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1071[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fsType")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1077 := z.EncBinary() - _ = yym1077 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) } } } - if yyr1071 || yy2arr1071 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -15309,25 +17220,25 @@ func (x *VsphereVirtualDiskVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1078 := z.DecBinary() - _ = yym1078 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1079 := r.ContainerType() - if yyct1079 == codecSelferValueTypeMap1234 { - yyl1079 := r.ReadMapStart() - if yyl1079 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1079, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1079 == codecSelferValueTypeArray1234 { - yyl1079 := r.ReadArrayStart() - if yyl1079 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1079, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -15339,12 +17250,12 @@ func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1080Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1080Slc - var yyhl1080 bool = l >= 0 - for yyj1080 := 0; ; yyj1080++ { - if yyhl1080 { - if yyj1080 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -15353,26 +17264,38 @@ func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1080Slc = r.DecodeBytes(yys1080Slc, true, true) - yys1080 := string(yys1080Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1080 { + switch yys3 { case "volumePath": if r.TryDecodeAsNil() { x.VolumePath = "" } else { - x.VolumePath = string(r.DecodeString()) + yyv4 := &x.VolumePath + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "fsType": if r.TryDecodeAsNil() { x.FSType = "" } else { - x.FSType = string(r.DecodeString()) + yyv6 := &x.FSType + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys1080) - } // end switch yys1080 - } // end for yyj1080 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -15380,16 +17303,16 @@ func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromArray(l int, d *code var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1083 int - var yyb1083 bool - var yyhl1083 bool = l >= 0 - yyj1083++ - if yyhl1083 { - yyb1083 = yyj1083 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1083 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1083 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15397,15 +17320,21 @@ func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromArray(l int, d *code if r.TryDecodeAsNil() { x.VolumePath = "" } else { - x.VolumePath = string(r.DecodeString()) + yyv9 := &x.VolumePath + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } } - yyj1083++ - if yyhl1083 { - yyb1083 = yyj1083 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1083 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1083 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15413,20 +17342,260 @@ func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromArray(l int, d *code if r.TryDecodeAsNil() { x.FSType = "" } else { - x.FSType = string(r.DecodeString()) + yyv11 := &x.FSType + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } for { - yyj1083++ - if yyhl1083 { - yyb1083 = yyj1083 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1083 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1083 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1083-1, "") + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PhotonPersistentDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.FSType != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.PdID)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("pdID")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.PdID)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("fsType")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PhotonPersistentDiskVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PhotonPersistentDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "pdID": + if r.TryDecodeAsNil() { + x.PdID = "" + } else { + yyv4 := &x.PdID + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "fsType": + if r.TryDecodeAsNil() { + x.FSType = "" + } else { + yyv6 := &x.FSType + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PhotonPersistentDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.PdID = "" + } else { + yyv9 := &x.PdID + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.FSType = "" + } else { + yyv11 := &x.FSType + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15435,8 +17604,8 @@ func (x AzureDataDiskCachingMode) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1086 := z.EncBinary() - _ = yym1086 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -15448,8 +17617,8 @@ func (x *AzureDataDiskCachingMode) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1087 := z.DecBinary() - _ = yym1087 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -15464,36 +17633,36 @@ func (x *AzureDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1088 := z.EncBinary() - _ = yym1088 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1089 := !z.EncBinary() - yy2arr1089 := z.EncBasicHandle().StructToArray - var yyq1089 [5]bool - _, _, _ = yysep1089, yyq1089, yy2arr1089 - const yyr1089 bool = false - yyq1089[2] = x.CachingMode != nil - yyq1089[3] = x.FSType != nil - yyq1089[4] = x.ReadOnly != nil - var yynn1089 int - if yyr1089 || yy2arr1089 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[2] = x.CachingMode != nil + yyq2[3] = x.FSType != nil + yyq2[4] = x.ReadOnly != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn1089 = 2 - for _, b := range yyq1089 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn1089++ + yynn2++ } } - r.EncodeMapStart(yynn1089) - yynn1089 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1089 || yy2arr1089 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1091 := z.EncBinary() - _ = yym1091 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.DiskName)) @@ -15502,17 +17671,17 @@ func (x *AzureDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("diskName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1092 := z.EncBinary() - _ = yym1092 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.DiskName)) } } - if yyr1089 || yy2arr1089 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1094 := z.EncBinary() - _ = yym1094 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.DataDiskURI)) @@ -15521,109 +17690,109 @@ func (x *AzureDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("diskURI")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1095 := z.EncBinary() - _ = yym1095 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.DataDiskURI)) } } - if yyr1089 || yy2arr1089 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1089[2] { + if yyq2[2] { if x.CachingMode == nil { r.EncodeNil() } else { - yy1097 := *x.CachingMode - yy1097.CodecEncodeSelf(e) + yy10 := *x.CachingMode + yy10.CodecEncodeSelf(e) } } else { r.EncodeNil() } } else { - if yyq1089[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cachingMode")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.CachingMode == nil { r.EncodeNil() } else { - yy1098 := *x.CachingMode - yy1098.CodecEncodeSelf(e) + yy12 := *x.CachingMode + yy12.CodecEncodeSelf(e) } } } - if yyr1089 || yy2arr1089 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1089[3] { + if yyq2[3] { if x.FSType == nil { r.EncodeNil() } else { - yy1100 := *x.FSType - yym1101 := z.EncBinary() - _ = yym1101 + yy15 := *x.FSType + yym16 := z.EncBinary() + _ = yym16 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yy1100)) + r.EncodeString(codecSelferC_UTF81234, string(yy15)) } } } else { r.EncodeNil() } } else { - if yyq1089[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fsType")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.FSType == nil { r.EncodeNil() } else { - yy1102 := *x.FSType - yym1103 := z.EncBinary() - _ = yym1103 + yy17 := *x.FSType + yym18 := z.EncBinary() + _ = yym18 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yy1102)) + r.EncodeString(codecSelferC_UTF81234, string(yy17)) } } } } - if yyr1089 || yy2arr1089 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1089[4] { + if yyq2[4] { if x.ReadOnly == nil { r.EncodeNil() } else { - yy1105 := *x.ReadOnly - yym1106 := z.EncBinary() - _ = yym1106 + yy20 := *x.ReadOnly + yym21 := z.EncBinary() + _ = yym21 if false { } else { - r.EncodeBool(bool(yy1105)) + r.EncodeBool(bool(yy20)) } } } else { r.EncodeNil() } } else { - if yyq1089[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("readOnly")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ReadOnly == nil { r.EncodeNil() } else { - yy1107 := *x.ReadOnly - yym1108 := z.EncBinary() - _ = yym1108 + yy22 := *x.ReadOnly + yym23 := z.EncBinary() + _ = yym23 if false { } else { - r.EncodeBool(bool(yy1107)) + r.EncodeBool(bool(yy22)) } } } } - if yyr1089 || yy2arr1089 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -15636,25 +17805,25 @@ func (x *AzureDiskVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1109 := z.DecBinary() - _ = yym1109 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1110 := r.ContainerType() - if yyct1110 == codecSelferValueTypeMap1234 { - yyl1110 := r.ReadMapStart() - if yyl1110 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1110, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1110 == codecSelferValueTypeArray1234 { - yyl1110 := r.ReadArrayStart() - if yyl1110 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1110, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -15666,12 +17835,12 @@ func (x *AzureDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1111Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1111Slc - var yyhl1111 bool = l >= 0 - for yyj1111 := 0; ; yyj1111++ { - if yyhl1111 { - if yyj1111 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -15680,21 +17849,33 @@ func (x *AzureDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1111Slc = r.DecodeBytes(yys1111Slc, true, true) - yys1111 := string(yys1111Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1111 { + switch yys3 { case "diskName": if r.TryDecodeAsNil() { x.DiskName = "" } else { - x.DiskName = string(r.DecodeString()) + yyv4 := &x.DiskName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "diskURI": if r.TryDecodeAsNil() { x.DataDiskURI = "" } else { - x.DataDiskURI = string(r.DecodeString()) + yyv6 := &x.DataDiskURI + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "cachingMode": if r.TryDecodeAsNil() { @@ -15716,8 +17897,8 @@ func (x *AzureDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decod if x.FSType == nil { x.FSType = new(string) } - yym1116 := z.DecBinary() - _ = yym1116 + yym10 := z.DecBinary() + _ = yym10 if false { } else { *((*string)(x.FSType)) = r.DecodeString() @@ -15732,17 +17913,17 @@ func (x *AzureDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decod if x.ReadOnly == nil { x.ReadOnly = new(bool) } - yym1118 := z.DecBinary() - _ = yym1118 + yym12 := z.DecBinary() + _ = yym12 if false { } else { *((*bool)(x.ReadOnly)) = r.DecodeBool() } } default: - z.DecStructFieldNotFound(-1, yys1111) - } // end switch yys1111 - } // end for yyj1111 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -15750,16 +17931,16 @@ func (x *AzureDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1119 int - var yyb1119 bool - var yyhl1119 bool = l >= 0 - yyj1119++ - if yyhl1119 { - yyb1119 = yyj1119 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1119 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1119 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15767,15 +17948,21 @@ func (x *AzureDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.DiskName = "" } else { - x.DiskName = string(r.DecodeString()) + yyv14 := &x.DiskName + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj1119++ - if yyhl1119 { - yyb1119 = yyj1119 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1119 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1119 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15783,15 +17970,21 @@ func (x *AzureDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.DataDiskURI = "" } else { - x.DataDiskURI = string(r.DecodeString()) + yyv16 := &x.DataDiskURI + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } - yyj1119++ - if yyhl1119 { - yyb1119 = yyj1119 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1119 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1119 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15806,13 +17999,13 @@ func (x *AzureDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec } x.CachingMode.CodecDecodeSelf(d) } - yyj1119++ - if yyhl1119 { - yyb1119 = yyj1119 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1119 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1119 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15825,20 +18018,20 @@ func (x *AzureDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec if x.FSType == nil { x.FSType = new(string) } - yym1124 := z.DecBinary() - _ = yym1124 + yym20 := z.DecBinary() + _ = yym20 if false { } else { *((*string)(x.FSType)) = r.DecodeString() } } - yyj1119++ - if yyhl1119 { - yyb1119 = yyj1119 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1119 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1119 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15851,25 +18044,1015 @@ func (x *AzureDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec if x.ReadOnly == nil { x.ReadOnly = new(bool) } - yym1126 := z.DecBinary() - _ = yym1126 + yym22 := z.DecBinary() + _ = yym22 if false { } else { *((*bool)(x.ReadOnly)) = r.DecodeBool() } } for { - yyj1119++ - if yyhl1119 { - yyb1119 = yyj1119 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1119 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1119 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1119-1, "") + z.DecStructFieldNotFound(yyj13-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PortworxVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.FSType != "" + yyq2[2] = x.ReadOnly != false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("volumeID")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("fsType")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("readOnly")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PortworxVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PortworxVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "volumeID": + if r.TryDecodeAsNil() { + x.VolumeID = "" + } else { + yyv4 := &x.VolumeID + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "fsType": + if r.TryDecodeAsNil() { + x.FSType = "" + } else { + yyv6 := &x.FSType + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "readOnly": + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv8 := &x.ReadOnly + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(yyv8)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PortworxVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.VolumeID = "" + } else { + yyv11 := &x.VolumeID + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.FSType = "" + } else { + yyv13 := &x.FSType + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv15 := &x.ReadOnly + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*bool)(yyv15)) = r.DecodeBool() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ScaleIOVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [10]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[3] = x.SSLEnabled != false + yyq2[4] = x.ProtectionDomain != "" + yyq2[5] = x.StoragePool != "" + yyq2[6] = x.StorageMode != "" + yyq2[7] = x.VolumeName != "" + yyq2[8] = x.FSType != "" + yyq2[9] = x.ReadOnly != false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(10) + } else { + yynn2 = 3 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Gateway)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("gateway")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Gateway)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.System)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("system")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.System)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.SecretRef == nil { + r.EncodeNil() + } else { + x.SecretRef.CodecEncodeSelf(e) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("secretRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SecretRef == nil { + r.EncodeNil() + } else { + x.SecretRef.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeBool(bool(x.SSLEnabled)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("sslEnabled")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeBool(bool(x.SSLEnabled)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ProtectionDomain)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("protectionDomain")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ProtectionDomain)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.StoragePool)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("storagePool")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.StoragePool)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[6] { + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.StorageMode)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("storageMode")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.StorageMode)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[7] { + yym25 := z.EncBinary() + _ = yym25 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[7] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("volumeName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym26 := z.EncBinary() + _ = yym26 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[8] { + yym28 := z.EncBinary() + _ = yym28 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[8] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("fsType")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym29 := z.EncBinary() + _ = yym29 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.FSType)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[9] { + yym31 := z.EncBinary() + _ = yym31 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[9] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("readOnly")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym32 := z.EncBinary() + _ = yym32 + if false { + } else { + r.EncodeBool(bool(x.ReadOnly)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ScaleIOVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ScaleIOVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "gateway": + if r.TryDecodeAsNil() { + x.Gateway = "" + } else { + yyv4 := &x.Gateway + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "system": + if r.TryDecodeAsNil() { + x.System = "" + } else { + yyv6 := &x.System + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "secretRef": + if r.TryDecodeAsNil() { + if x.SecretRef != nil { + x.SecretRef = nil + } + } else { + if x.SecretRef == nil { + x.SecretRef = new(LocalObjectReference) + } + x.SecretRef.CodecDecodeSelf(d) + } + case "sslEnabled": + if r.TryDecodeAsNil() { + x.SSLEnabled = false + } else { + yyv9 := &x.SSLEnabled + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*bool)(yyv9)) = r.DecodeBool() + } + } + case "protectionDomain": + if r.TryDecodeAsNil() { + x.ProtectionDomain = "" + } else { + yyv11 := &x.ProtectionDomain + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + case "storagePool": + if r.TryDecodeAsNil() { + x.StoragePool = "" + } else { + yyv13 := &x.StoragePool + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + case "storageMode": + if r.TryDecodeAsNil() { + x.StorageMode = "" + } else { + yyv15 := &x.StorageMode + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + case "volumeName": + if r.TryDecodeAsNil() { + x.VolumeName = "" + } else { + yyv17 := &x.VolumeName + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + case "fsType": + if r.TryDecodeAsNil() { + x.FSType = "" + } else { + yyv19 := &x.FSType + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } + } + case "readOnly": + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv21 := &x.ReadOnly + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*bool)(yyv21)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ScaleIOVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj23 int + var yyb23 bool + var yyhl23 bool = l >= 0 + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Gateway = "" + } else { + yyv24 := &x.Gateway + yym25 := z.DecBinary() + _ = yym25 + if false { + } else { + *((*string)(yyv24)) = r.DecodeString() + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.System = "" + } else { + yyv26 := &x.System + yym27 := z.DecBinary() + _ = yym27 + if false { + } else { + *((*string)(yyv26)) = r.DecodeString() + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.SecretRef != nil { + x.SecretRef = nil + } + } else { + if x.SecretRef == nil { + x.SecretRef = new(LocalObjectReference) + } + x.SecretRef.CodecDecodeSelf(d) + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.SSLEnabled = false + } else { + yyv29 := &x.SSLEnabled + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*bool)(yyv29)) = r.DecodeBool() + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ProtectionDomain = "" + } else { + yyv31 := &x.ProtectionDomain + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + *((*string)(yyv31)) = r.DecodeString() + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.StoragePool = "" + } else { + yyv33 := &x.StoragePool + yym34 := z.DecBinary() + _ = yym34 + if false { + } else { + *((*string)(yyv33)) = r.DecodeString() + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.StorageMode = "" + } else { + yyv35 := &x.StorageMode + yym36 := z.DecBinary() + _ = yym36 + if false { + } else { + *((*string)(yyv35)) = r.DecodeString() + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.VolumeName = "" + } else { + yyv37 := &x.VolumeName + yym38 := z.DecBinary() + _ = yym38 + if false { + } else { + *((*string)(yyv37)) = r.DecodeString() + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.FSType = "" + } else { + yyv39 := &x.FSType + yym40 := z.DecBinary() + _ = yym40 + if false { + } else { + *((*string)(yyv39)) = r.DecodeString() + } + } + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReadOnly = false + } else { + yyv41 := &x.ReadOnly + yym42 := z.DecBinary() + _ = yym42 + if false { + } else { + *((*bool)(yyv41)) = r.DecodeBool() + } + } + for { + yyj23++ + if yyhl23 { + yyb23 = yyj23 > l + } else { + yyb23 = r.CheckBreak() + } + if yyb23 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj23-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15881,58 +19064,66 @@ func (x *ConfigMapVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1127 := z.EncBinary() - _ = yym1127 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1128 := !z.EncBinary() - yy2arr1128 := z.EncBasicHandle().StructToArray - var yyq1128 [3]bool - _, _, _ = yysep1128, yyq1128, yy2arr1128 - const yyr1128 bool = false - yyq1128[1] = len(x.Items) != 0 - yyq1128[2] = x.DefaultMode != nil - var yynn1128 int - if yyr1128 || yy2arr1128 { - r.EncodeArrayStart(3) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Name != "" + yyq2[1] = len(x.Items) != 0 + yyq2[2] = x.DefaultMode != nil + yyq2[3] = x.Optional != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) } else { - yynn1128 = 1 - for _, b := range yyq1128 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1128++ + yynn2++ } } - r.EncodeMapStart(yynn1128) - yynn1128 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1128 || yy2arr1128 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1130 := z.EncBinary() - _ = yym1130 - if false { + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Name")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1131 := z.EncBinary() - _ = yym1131 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + 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 yyr1128 || yy2arr1128 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1128[1] { + if yyq2[1] { if x.Items == nil { r.EncodeNil() } else { - yym1133 := z.EncBinary() - _ = yym1133 + yym7 := z.EncBinary() + _ = yym7 if false { } else { h.encSliceKeyToPath(([]KeyToPath)(x.Items), e) @@ -15942,15 +19133,15 @@ func (x *ConfigMapVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1128[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("items")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Items == nil { r.EncodeNil() } else { - yym1134 := z.EncBinary() - _ = yym1134 + yym8 := z.EncBinary() + _ = yym8 if false { } else { h.encSliceKeyToPath(([]KeyToPath)(x.Items), e) @@ -15958,42 +19149,77 @@ func (x *ConfigMapVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1128 || yy2arr1128 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1128[2] { + if yyq2[2] { if x.DefaultMode == nil { r.EncodeNil() } else { - yy1136 := *x.DefaultMode - yym1137 := z.EncBinary() - _ = yym1137 + yy10 := *x.DefaultMode + yym11 := z.EncBinary() + _ = yym11 if false { } else { - r.EncodeInt(int64(yy1136)) + r.EncodeInt(int64(yy10)) } } } else { r.EncodeNil() } } else { - if yyq1128[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("defaultMode")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.DefaultMode == nil { r.EncodeNil() } else { - yy1138 := *x.DefaultMode - yym1139 := z.EncBinary() - _ = yym1139 + yy12 := *x.DefaultMode + yym13 := z.EncBinary() + _ = yym13 if false { } else { - r.EncodeInt(int64(yy1138)) + r.EncodeInt(int64(yy12)) } } } } - if yyr1128 || yy2arr1128 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Optional == nil { + r.EncodeNil() + } else { + yy15 := *x.Optional + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeBool(bool(yy15)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("optional")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Optional == nil { + r.EncodeNil() + } else { + yy17 := *x.Optional + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + r.EncodeBool(bool(yy17)) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -16006,25 +19232,25 @@ func (x *ConfigMapVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1140 := z.DecBinary() - _ = yym1140 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1141 := r.ContainerType() - if yyct1141 == codecSelferValueTypeMap1234 { - yyl1141 := r.ReadMapStart() - if yyl1141 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1141, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1141 == codecSelferValueTypeArray1234 { - yyl1141 := r.ReadArrayStart() - if yyl1141 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1141, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -16036,12 +19262,12 @@ func (x *ConfigMapVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1142Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1142Slc - var yyhl1142 bool = l >= 0 - for yyj1142 := 0; ; yyj1142++ { - if yyhl1142 { - if yyj1142 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -16050,26 +19276,32 @@ func (x *ConfigMapVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1142Slc = r.DecodeBytes(yys1142Slc, true, true) - yys1142 := string(yys1142Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1142 { - case "Name": + switch yys3 { + case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1144 := &x.Items - yym1145 := z.DecBinary() - _ = yym1145 + yyv6 := &x.Items + yym7 := z.DecBinary() + _ = yym7 if false { } else { - h.decSliceKeyToPath((*[]KeyToPath)(yyv1144), d) + h.decSliceKeyToPath((*[]KeyToPath)(yyv6), d) } } case "defaultMode": @@ -16081,17 +19313,33 @@ func (x *ConfigMapVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decod if x.DefaultMode == nil { x.DefaultMode = new(int32) } - yym1147 := z.DecBinary() - _ = yym1147 + yym9 := z.DecBinary() + _ = yym9 if false { } else { *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32)) } } + case "optional": + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } default: - z.DecStructFieldNotFound(-1, yys1142) - } // end switch yys1142 - } // end for yyj1142 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -16099,16 +19347,16 @@ func (x *ConfigMapVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1148 int - var yyb1148 bool - var yyhl1148 bool = l >= 0 - yyj1148++ - if yyhl1148 { - yyb1148 = yyj1148 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1148 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1148 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -16116,15 +19364,21 @@ func (x *ConfigMapVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv13 := &x.Name + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj1148++ - if yyhl1148 { - yyb1148 = yyj1148 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1148 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1148 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -16132,21 +19386,21 @@ func (x *ConfigMapVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1150 := &x.Items - yym1151 := z.DecBinary() - _ = yym1151 + yyv15 := &x.Items + yym16 := z.DecBinary() + _ = yym16 if false { } else { - h.decSliceKeyToPath((*[]KeyToPath)(yyv1150), d) + h.decSliceKeyToPath((*[]KeyToPath)(yyv15), d) } } - yyj1148++ - if yyhl1148 { - yyb1148 = yyj1148 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1148 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1148 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -16159,25 +19413,927 @@ func (x *ConfigMapVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec if x.DefaultMode == nil { x.DefaultMode = new(int32) } - yym1153 := z.DecBinary() - _ = yym1153 + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32)) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ConfigMapProjection) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Name != "" + yyq2[1] = len(x.Items) != 0 + yyq2[2] = x.Optional != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Items == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + h.encSliceKeyToPath(([]KeyToPath)(x.Items), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + h.encSliceKeyToPath(([]KeyToPath)(x.Items), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Optional == nil { + r.EncodeNil() + } else { + yy10 := *x.Optional + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeBool(bool(yy10)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("optional")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Optional == nil { + r.EncodeNil() + } else { + yy12 := *x.Optional + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeBool(bool(yy12)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ConfigMapProjection) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ConfigMapProjection) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv6 := &x.Items + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + h.decSliceKeyToPath((*[]KeyToPath)(yyv6), d) + } + } + case "optional": + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ConfigMapProjection) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv11 := &x.Name + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv13 := &x.Items + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + h.decSliceKeyToPath((*[]KeyToPath)(yyv13), d) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ProjectedVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.DefaultMode != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Sources == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + h.encSliceVolumeProjection(([]VolumeProjection)(x.Sources), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("sources")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Sources == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + h.encSliceVolumeProjection(([]VolumeProjection)(x.Sources), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.DefaultMode == nil { + r.EncodeNil() + } else { + yy7 := *x.DefaultMode + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeInt(int64(yy7)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("defaultMode")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.DefaultMode == nil { + r.EncodeNil() + } else { + yy9 := *x.DefaultMode + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(yy9)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ProjectedVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ProjectedVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "sources": + if r.TryDecodeAsNil() { + x.Sources = nil + } else { + yyv4 := &x.Sources + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + h.decSliceVolumeProjection((*[]VolumeProjection)(yyv4), d) + } + } + case "defaultMode": + if r.TryDecodeAsNil() { + if x.DefaultMode != nil { + x.DefaultMode = nil + } + } else { + if x.DefaultMode == nil { + x.DefaultMode = new(int32) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ProjectedVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Sources = nil + } else { + yyv9 := &x.Sources + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + h.decSliceVolumeProjection((*[]VolumeProjection)(yyv9), d) + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.DefaultMode != nil { + x.DefaultMode = nil + } + } else { + if x.DefaultMode == nil { + x.DefaultMode = new(int32) + } + yym12 := z.DecBinary() + _ = yym12 if false { } else { *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32)) } } for { - yyj1148++ - if yyhl1148 { - yyb1148 = yyj1148 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1148 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1148 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1148-1, "") + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *VolumeProjection) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Secret != nil + yyq2[1] = x.DownwardAPI != nil + yyq2[2] = x.ConfigMap != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.Secret == nil { + r.EncodeNil() + } else { + x.Secret.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("secret")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Secret == nil { + r.EncodeNil() + } else { + x.Secret.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.DownwardAPI == nil { + r.EncodeNil() + } else { + x.DownwardAPI.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("downwardAPI")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.DownwardAPI == nil { + r.EncodeNil() + } else { + x.DownwardAPI.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.ConfigMap == nil { + r.EncodeNil() + } else { + x.ConfigMap.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("configMap")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ConfigMap == nil { + r.EncodeNil() + } else { + x.ConfigMap.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *VolumeProjection) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *VolumeProjection) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "secret": + if r.TryDecodeAsNil() { + if x.Secret != nil { + x.Secret = nil + } + } else { + if x.Secret == nil { + x.Secret = new(SecretProjection) + } + x.Secret.CodecDecodeSelf(d) + } + case "downwardAPI": + if r.TryDecodeAsNil() { + if x.DownwardAPI != nil { + x.DownwardAPI = nil + } + } else { + if x.DownwardAPI == nil { + x.DownwardAPI = new(DownwardAPIProjection) + } + x.DownwardAPI.CodecDecodeSelf(d) + } + case "configMap": + if r.TryDecodeAsNil() { + if x.ConfigMap != nil { + x.ConfigMap = nil + } + } else { + if x.ConfigMap == nil { + x.ConfigMap = new(ConfigMapProjection) + } + x.ConfigMap.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *VolumeProjection) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Secret != nil { + x.Secret = nil + } + } else { + if x.Secret == nil { + x.Secret = new(SecretProjection) + } + x.Secret.CodecDecodeSelf(d) + } + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.DownwardAPI != nil { + x.DownwardAPI = nil + } + } else { + if x.DownwardAPI == nil { + x.DownwardAPI = new(DownwardAPIProjection) + } + x.DownwardAPI.CodecDecodeSelf(d) + } + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ConfigMap != nil { + x.ConfigMap = nil + } + } else { + if x.ConfigMap == nil { + x.ConfigMap = new(ConfigMapProjection) + } + x.ConfigMap.CodecDecodeSelf(d) + } + for { + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16189,34 +20345,34 @@ func (x *KeyToPath) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1154 := z.EncBinary() - _ = yym1154 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1155 := !z.EncBinary() - yy2arr1155 := z.EncBasicHandle().StructToArray - var yyq1155 [3]bool - _, _, _ = yysep1155, yyq1155, yy2arr1155 - const yyr1155 bool = false - yyq1155[2] = x.Mode != nil - var yynn1155 int - if yyr1155 || yy2arr1155 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[2] = x.Mode != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(3) } else { - yynn1155 = 2 - for _, b := range yyq1155 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn1155++ + yynn2++ } } - r.EncodeMapStart(yynn1155) - yynn1155 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1155 || yy2arr1155 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1157 := z.EncBinary() - _ = yym1157 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Key)) @@ -16225,17 +20381,17 @@ func (x *KeyToPath) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("key")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1158 := z.EncBinary() - _ = yym1158 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Key)) } } - if yyr1155 || yy2arr1155 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1160 := z.EncBinary() - _ = yym1160 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) @@ -16244,49 +20400,49 @@ func (x *KeyToPath) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("path")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1161 := z.EncBinary() - _ = yym1161 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) } } - if yyr1155 || yy2arr1155 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1155[2] { + if yyq2[2] { if x.Mode == nil { r.EncodeNil() } else { - yy1163 := *x.Mode - yym1164 := z.EncBinary() - _ = yym1164 + yy10 := *x.Mode + yym11 := z.EncBinary() + _ = yym11 if false { } else { - r.EncodeInt(int64(yy1163)) + r.EncodeInt(int64(yy10)) } } } else { r.EncodeNil() } } else { - if yyq1155[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("mode")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Mode == nil { r.EncodeNil() } else { - yy1165 := *x.Mode - yym1166 := z.EncBinary() - _ = yym1166 + yy12 := *x.Mode + yym13 := z.EncBinary() + _ = yym13 if false { } else { - r.EncodeInt(int64(yy1165)) + r.EncodeInt(int64(yy12)) } } } } - if yyr1155 || yy2arr1155 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -16299,25 +20455,25 @@ func (x *KeyToPath) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1167 := z.DecBinary() - _ = yym1167 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1168 := r.ContainerType() - if yyct1168 == codecSelferValueTypeMap1234 { - yyl1168 := r.ReadMapStart() - if yyl1168 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1168, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1168 == codecSelferValueTypeArray1234 { - yyl1168 := r.ReadArrayStart() - if yyl1168 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1168, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -16329,12 +20485,12 @@ func (x *KeyToPath) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1169Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1169Slc - var yyhl1169 bool = l >= 0 - for yyj1169 := 0; ; yyj1169++ { - if yyhl1169 { - if yyj1169 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -16343,21 +20499,33 @@ func (x *KeyToPath) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1169Slc = r.DecodeBytes(yys1169Slc, true, true) - yys1169 := string(yys1169Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1169 { + switch yys3 { case "key": if r.TryDecodeAsNil() { x.Key = "" } else { - x.Key = string(r.DecodeString()) + yyv4 := &x.Key + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "path": if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv6 := &x.Path + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "mode": if r.TryDecodeAsNil() { @@ -16368,17 +20536,17 @@ func (x *KeyToPath) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.Mode == nil { x.Mode = new(int32) } - yym1173 := z.DecBinary() - _ = yym1173 + yym9 := z.DecBinary() + _ = yym9 if false { } else { *((*int32)(x.Mode)) = int32(r.DecodeInt(32)) } } default: - z.DecStructFieldNotFound(-1, yys1169) - } // end switch yys1169 - } // end for yyj1169 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -16386,16 +20554,16 @@ func (x *KeyToPath) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1174 int - var yyb1174 bool - var yyhl1174 bool = l >= 0 - yyj1174++ - if yyhl1174 { - yyb1174 = yyj1174 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1174 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1174 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -16403,15 +20571,21 @@ func (x *KeyToPath) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Key = "" } else { - x.Key = string(r.DecodeString()) + yyv11 := &x.Key + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } - yyj1174++ - if yyhl1174 { - yyb1174 = yyj1174 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1174 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1174 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -16419,15 +20593,21 @@ func (x *KeyToPath) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv13 := &x.Path + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj1174++ - if yyhl1174 { - yyb1174 = yyj1174 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1174 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1174 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -16440,25 +20620,25 @@ func (x *KeyToPath) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.Mode == nil { x.Mode = new(int32) } - yym1178 := z.DecBinary() - _ = yym1178 + yym16 := z.DecBinary() + _ = yym16 if false { } else { *((*int32)(x.Mode)) = int32(r.DecodeInt(32)) } } for { - yyj1174++ - if yyhl1174 { - yyb1174 = yyj1174 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1174 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1174 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1174-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16470,38 +20650,38 @@ func (x *ContainerPort) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1179 := z.EncBinary() - _ = yym1179 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1180 := !z.EncBinary() - yy2arr1180 := z.EncBasicHandle().StructToArray - var yyq1180 [5]bool - _, _, _ = yysep1180, yyq1180, yy2arr1180 - const yyr1180 bool = false - yyq1180[0] = x.Name != "" - yyq1180[1] = x.HostPort != 0 - yyq1180[3] = x.Protocol != "" - yyq1180[4] = x.HostIP != "" - var yynn1180 int - if yyr1180 || yy2arr1180 { + 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 { - yynn1180 = 1 - for _, b := range yyq1180 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1180++ + yynn2++ } } - r.EncodeMapStart(yynn1180) - yynn1180 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1180 || yy2arr1180 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1180[0] { - yym1182 := z.EncBinary() - _ = yym1182 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -16510,23 +20690,23 @@ func (x *ContainerPort) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1180[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1183 := z.EncBinary() - _ = yym1183 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } } - if yyr1180 || yy2arr1180 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1180[1] { - yym1185 := z.EncBinary() - _ = yym1185 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeInt(int64(x.HostPort)) @@ -16535,22 +20715,22 @@ func (x *ContainerPort) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq1180[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostPort")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1186 := z.EncBinary() - _ = yym1186 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeInt(int64(x.HostPort)) } } } - if yyr1180 || yy2arr1180 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1188 := z.EncBinary() - _ = yym1188 + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeInt(int64(x.ContainerPort)) @@ -16559,33 +20739,33 @@ func (x *ContainerPort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerPort")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1189 := z.EncBinary() - _ = yym1189 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeInt(int64(x.ContainerPort)) } } - if yyr1180 || yy2arr1180 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1180[3] { + if yyq2[3] { x.Protocol.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1180[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("protocol")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Protocol.CodecEncodeSelf(e) } } - if yyr1180 || yy2arr1180 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1180[4] { - yym1192 := z.EncBinary() - _ = yym1192 + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.HostIP)) @@ -16594,19 +20774,19 @@ func (x *ContainerPort) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1180[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostIP")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1193 := z.EncBinary() - _ = yym1193 + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.HostIP)) } } } - if yyr1180 || yy2arr1180 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -16619,25 +20799,25 @@ func (x *ContainerPort) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1194 := z.DecBinary() - _ = yym1194 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1195 := r.ContainerType() - if yyct1195 == codecSelferValueTypeMap1234 { - yyl1195 := r.ReadMapStart() - if yyl1195 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1195, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1195 == codecSelferValueTypeArray1234 { - yyl1195 := r.ReadArrayStart() - if yyl1195 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1195, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -16649,12 +20829,12 @@ func (x *ContainerPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1196Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1196Slc - var yyhl1196 bool = l >= 0 - for yyj1196 := 0; ; yyj1196++ { - if yyhl1196 { - if yyj1196 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -16663,44 +20843,69 @@ func (x *ContainerPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1196Slc = r.DecodeBytes(yys1196Slc, true, true) - yys1196 := string(yys1196Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1196 { + switch yys3 { case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "hostPort": if r.TryDecodeAsNil() { x.HostPort = 0 } else { - x.HostPort = int32(r.DecodeInt(32)) + yyv6 := &x.HostPort + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(yyv6)) = int32(r.DecodeInt(32)) + } } case "containerPort": if r.TryDecodeAsNil() { x.ContainerPort = 0 } else { - x.ContainerPort = int32(r.DecodeInt(32)) + yyv8 := &x.ContainerPort + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } } case "protocol": if r.TryDecodeAsNil() { x.Protocol = "" } else { - x.Protocol = Protocol(r.DecodeString()) + yyv10 := &x.Protocol + yyv10.CodecDecodeSelf(d) } case "hostIP": if r.TryDecodeAsNil() { x.HostIP = "" } else { - x.HostIP = string(r.DecodeString()) + yyv11 := &x.HostIP + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys1196) - } // end switch yys1196 - } // end for yyj1196 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -16708,16 +20913,16 @@ func (x *ContainerPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1202 int - var yyb1202 bool - var yyhl1202 bool = l >= 0 - yyj1202++ - if yyhl1202 { - yyb1202 = yyj1202 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1202 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1202 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -16725,15 +20930,21 @@ func (x *ContainerPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv14 := &x.Name + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj1202++ - if yyhl1202 { - yyb1202 = yyj1202 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1202 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1202 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -16741,15 +20952,21 @@ func (x *ContainerPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.HostPort = 0 } else { - x.HostPort = int32(r.DecodeInt(32)) + yyv16 := &x.HostPort + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*int32)(yyv16)) = int32(r.DecodeInt(32)) + } } - yyj1202++ - if yyhl1202 { - yyb1202 = yyj1202 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1202 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1202 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -16757,15 +20974,21 @@ func (x *ContainerPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ContainerPort = 0 } else { - x.ContainerPort = int32(r.DecodeInt(32)) + yyv18 := &x.ContainerPort + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *((*int32)(yyv18)) = int32(r.DecodeInt(32)) + } } - yyj1202++ - if yyhl1202 { - yyb1202 = yyj1202 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1202 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1202 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -16773,15 +20996,16 @@ func (x *ContainerPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Protocol = "" } else { - x.Protocol = Protocol(r.DecodeString()) + yyv20 := &x.Protocol + yyv20.CodecDecodeSelf(d) } - yyj1202++ - if yyhl1202 { - yyb1202 = yyj1202 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1202 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1202 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -16789,20 +21013,26 @@ func (x *ContainerPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.HostIP = "" } else { - x.HostIP = string(r.DecodeString()) + yyv21 := &x.HostIP + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } } for { - yyj1202++ - if yyhl1202 { - yyb1202 = yyj1202 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1202 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1202 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1202-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16814,35 +21044,35 @@ func (x *VolumeMount) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1208 := z.EncBinary() - _ = yym1208 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1209 := !z.EncBinary() - yy2arr1209 := z.EncBasicHandle().StructToArray - var yyq1209 [4]bool - _, _, _ = yysep1209, yyq1209, yy2arr1209 - const yyr1209 bool = false - yyq1209[1] = x.ReadOnly != false - yyq1209[3] = x.SubPath != "" - var yynn1209 int - if yyr1209 || yy2arr1209 { + 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 { - yynn1209 = 2 - for _, b := range yyq1209 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn1209++ + yynn2++ } } - r.EncodeMapStart(yynn1209) - yynn1209 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1209 || yy2arr1209 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1211 := z.EncBinary() - _ = yym1211 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -16851,18 +21081,18 @@ func (x *VolumeMount) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1212 := z.EncBinary() - _ = yym1212 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr1209 || yy2arr1209 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1209[1] { - yym1214 := z.EncBinary() - _ = yym1214 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeBool(bool(x.ReadOnly)) @@ -16871,22 +21101,22 @@ func (x *VolumeMount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq1209[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("readOnly")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1215 := z.EncBinary() - _ = yym1215 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeBool(bool(x.ReadOnly)) } } } - if yyr1209 || yy2arr1209 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1217 := z.EncBinary() - _ = yym1217 + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.MountPath)) @@ -16895,18 +21125,18 @@ func (x *VolumeMount) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("mountPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1218 := z.EncBinary() - _ = yym1218 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.MountPath)) } } - if yyr1209 || yy2arr1209 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1209[3] { - yym1220 := z.EncBinary() - _ = yym1220 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SubPath)) @@ -16915,19 +21145,19 @@ func (x *VolumeMount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1209[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("subPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1221 := z.EncBinary() - _ = yym1221 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SubPath)) } } } - if yyr1209 || yy2arr1209 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -16940,25 +21170,25 @@ func (x *VolumeMount) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1222 := z.DecBinary() - _ = yym1222 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1223 := r.ContainerType() - if yyct1223 == codecSelferValueTypeMap1234 { - yyl1223 := r.ReadMapStart() - if yyl1223 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1223, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1223 == codecSelferValueTypeArray1234 { - yyl1223 := r.ReadArrayStart() - if yyl1223 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1223, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -16970,12 +21200,12 @@ func (x *VolumeMount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1224Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1224Slc - var yyhl1224 bool = l >= 0 - for yyj1224 := 0; ; yyj1224++ { - if yyhl1224 { - if yyj1224 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -16984,38 +21214,62 @@ func (x *VolumeMount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1224Slc = r.DecodeBytes(yys1224Slc, true, true) - yys1224 := string(yys1224Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1224 { + switch yys3 { case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "readOnly": if r.TryDecodeAsNil() { x.ReadOnly = false } else { - x.ReadOnly = bool(r.DecodeBool()) + yyv6 := &x.ReadOnly + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*bool)(yyv6)) = r.DecodeBool() + } } case "mountPath": if r.TryDecodeAsNil() { x.MountPath = "" } else { - x.MountPath = string(r.DecodeString()) + yyv8 := &x.MountPath + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } case "subPath": if r.TryDecodeAsNil() { x.SubPath = "" } else { - x.SubPath = string(r.DecodeString()) + yyv10 := &x.SubPath + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys1224) - } // end switch yys1224 - } // end for yyj1224 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -17023,16 +21277,16 @@ func (x *VolumeMount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1229 int - var yyb1229 bool - var yyhl1229 bool = l >= 0 - yyj1229++ - if yyhl1229 { - yyb1229 = yyj1229 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1229 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1229 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17040,15 +21294,21 @@ func (x *VolumeMount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv13 := &x.Name + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj1229++ - if yyhl1229 { - yyb1229 = yyj1229 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1229 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1229 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17056,15 +21316,21 @@ func (x *VolumeMount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ReadOnly = false } else { - x.ReadOnly = bool(r.DecodeBool()) + yyv15 := &x.ReadOnly + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*bool)(yyv15)) = r.DecodeBool() + } } - yyj1229++ - if yyhl1229 { - yyb1229 = yyj1229 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1229 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1229 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17072,15 +21338,21 @@ func (x *VolumeMount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.MountPath = "" } else { - x.MountPath = string(r.DecodeString()) + yyv17 := &x.MountPath + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } } - yyj1229++ - if yyhl1229 { - yyb1229 = yyj1229 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1229 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1229 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17088,20 +21360,26 @@ func (x *VolumeMount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.SubPath = "" } else { - x.SubPath = string(r.DecodeString()) + yyv19 := &x.SubPath + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } } for { - yyj1229++ - if yyhl1229 { - yyb1229 = yyj1229 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1229 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1229 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1229-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17113,35 +21391,35 @@ func (x *EnvVar) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1234 := z.EncBinary() - _ = yym1234 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1235 := !z.EncBinary() - yy2arr1235 := z.EncBasicHandle().StructToArray - var yyq1235 [3]bool - _, _, _ = yysep1235, yyq1235, yy2arr1235 - const yyr1235 bool = false - yyq1235[1] = x.Value != "" - yyq1235[2] = x.ValueFrom != nil - var yynn1235 int - if yyr1235 || yy2arr1235 { + 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 { - yynn1235 = 1 - for _, b := range yyq1235 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1235++ + yynn2++ } } - r.EncodeMapStart(yynn1235) - yynn1235 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1235 || yy2arr1235 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1237 := z.EncBinary() - _ = yym1237 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -17150,18 +21428,18 @@ func (x *EnvVar) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1238 := z.EncBinary() - _ = yym1238 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr1235 || yy2arr1235 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1235[1] { - yym1240 := z.EncBinary() - _ = yym1240 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Value)) @@ -17170,21 +21448,21 @@ func (x *EnvVar) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1235[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("value")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1241 := z.EncBinary() - _ = yym1241 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Value)) } } } - if yyr1235 || yy2arr1235 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1235[2] { + if yyq2[2] { if x.ValueFrom == nil { r.EncodeNil() } else { @@ -17194,7 +21472,7 @@ func (x *EnvVar) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1235[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("valueFrom")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -17205,7 +21483,7 @@ func (x *EnvVar) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1235 || yy2arr1235 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -17218,25 +21496,25 @@ func (x *EnvVar) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1243 := z.DecBinary() - _ = yym1243 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1244 := r.ContainerType() - if yyct1244 == codecSelferValueTypeMap1234 { - yyl1244 := r.ReadMapStart() - if yyl1244 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1244, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1244 == codecSelferValueTypeArray1234 { - yyl1244 := r.ReadArrayStart() - if yyl1244 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1244, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -17248,12 +21526,12 @@ func (x *EnvVar) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1245Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1245Slc - var yyhl1245 bool = l >= 0 - for yyj1245 := 0; ; yyj1245++ { - if yyhl1245 { - if yyj1245 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -17262,21 +21540,33 @@ func (x *EnvVar) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1245Slc = r.DecodeBytes(yys1245Slc, true, true) - yys1245 := string(yys1245Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1245 { + switch yys3 { case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "value": if r.TryDecodeAsNil() { x.Value = "" } else { - x.Value = string(r.DecodeString()) + yyv6 := &x.Value + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "valueFrom": if r.TryDecodeAsNil() { @@ -17290,9 +21580,9 @@ func (x *EnvVar) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.ValueFrom.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1245) - } // end switch yys1245 - } // end for yyj1245 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -17300,16 +21590,16 @@ func (x *EnvVar) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1249 int - var yyb1249 bool - var yyhl1249 bool = l >= 0 - yyj1249++ - if yyhl1249 { - yyb1249 = yyj1249 > l + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb1249 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb1249 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17317,15 +21607,21 @@ func (x *EnvVar) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv10 := &x.Name + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } - yyj1249++ - if yyhl1249 { - yyb1249 = yyj1249 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb1249 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb1249 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17333,15 +21629,21 @@ func (x *EnvVar) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Value = "" } else { - x.Value = string(r.DecodeString()) + yyv12 := &x.Value + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } - yyj1249++ - if yyhl1249 { - yyb1249 = yyj1249 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb1249 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb1249 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17357,17 +21659,17 @@ func (x *EnvVar) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.ValueFrom.CodecDecodeSelf(d) } for { - yyj1249++ - if yyhl1249 { - yyb1249 = yyj1249 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb1249 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb1249 { + if yyb9 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1249-1, "") + z.DecStructFieldNotFound(yyj9-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17379,36 +21681,36 @@ func (x *EnvVarSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1253 := z.EncBinary() - _ = yym1253 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1254 := !z.EncBinary() - yy2arr1254 := z.EncBasicHandle().StructToArray - var yyq1254 [4]bool - _, _, _ = yysep1254, yyq1254, yy2arr1254 - const yyr1254 bool = false - yyq1254[0] = x.FieldRef != nil - yyq1254[1] = x.ResourceFieldRef != nil - yyq1254[2] = x.ConfigMapKeyRef != nil - yyq1254[3] = x.SecretKeyRef != nil - var yynn1254 int - if yyr1254 || yy2arr1254 { + 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 { - yynn1254 = 0 - for _, b := range yyq1254 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1254++ + yynn2++ } } - r.EncodeMapStart(yynn1254) - yynn1254 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1254 || yy2arr1254 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1254[0] { + if yyq2[0] { if x.FieldRef == nil { r.EncodeNil() } else { @@ -17418,7 +21720,7 @@ func (x *EnvVarSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1254[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fieldRef")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -17429,9 +21731,9 @@ func (x *EnvVarSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1254 || yy2arr1254 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1254[1] { + if yyq2[1] { if x.ResourceFieldRef == nil { r.EncodeNil() } else { @@ -17441,7 +21743,7 @@ func (x *EnvVarSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1254[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceFieldRef")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -17452,9 +21754,9 @@ func (x *EnvVarSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1254 || yy2arr1254 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1254[2] { + if yyq2[2] { if x.ConfigMapKeyRef == nil { r.EncodeNil() } else { @@ -17464,7 +21766,7 @@ func (x *EnvVarSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1254[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("configMapKeyRef")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -17475,9 +21777,9 @@ func (x *EnvVarSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1254 || yy2arr1254 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1254[3] { + if yyq2[3] { if x.SecretKeyRef == nil { r.EncodeNil() } else { @@ -17487,7 +21789,7 @@ func (x *EnvVarSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1254[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("secretKeyRef")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -17498,7 +21800,7 @@ func (x *EnvVarSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1254 || yy2arr1254 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -17511,25 +21813,25 @@ func (x *EnvVarSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1259 := z.DecBinary() - _ = yym1259 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1260 := r.ContainerType() - if yyct1260 == codecSelferValueTypeMap1234 { - yyl1260 := r.ReadMapStart() - if yyl1260 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1260, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1260 == codecSelferValueTypeArray1234 { - yyl1260 := r.ReadArrayStart() - if yyl1260 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1260, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -17541,12 +21843,12 @@ func (x *EnvVarSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1261Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1261Slc - var yyhl1261 bool = l >= 0 - for yyj1261 := 0; ; yyj1261++ { - if yyhl1261 { - if yyj1261 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -17555,10 +21857,10 @@ func (x *EnvVarSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1261Slc = r.DecodeBytes(yys1261Slc, true, true) - yys1261 := string(yys1261Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1261 { + switch yys3 { case "fieldRef": if r.TryDecodeAsNil() { if x.FieldRef != nil { @@ -17604,9 +21906,9 @@ func (x *EnvVarSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.SecretKeyRef.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1261) - } // end switch yys1261 - } // end for yyj1261 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -17614,16 +21916,16 @@ func (x *EnvVarSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1266 int - var yyb1266 bool - var yyhl1266 bool = l >= 0 - yyj1266++ - if yyhl1266 { - yyb1266 = yyj1266 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1266 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1266 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17638,13 +21940,13 @@ func (x *EnvVarSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.FieldRef.CodecDecodeSelf(d) } - yyj1266++ - if yyhl1266 { - yyb1266 = yyj1266 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1266 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1266 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17659,13 +21961,13 @@ func (x *EnvVarSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.ResourceFieldRef.CodecDecodeSelf(d) } - yyj1266++ - if yyhl1266 { - yyb1266 = yyj1266 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1266 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1266 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17680,13 +21982,13 @@ func (x *EnvVarSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.ConfigMapKeyRef.CodecDecodeSelf(d) } - yyj1266++ - if yyhl1266 { - yyb1266 = yyj1266 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1266 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1266 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17702,17 +22004,17 @@ func (x *EnvVarSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.SecretKeyRef.CodecDecodeSelf(d) } for { - yyj1266++ - if yyhl1266 { - yyb1266 = yyj1266 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1266 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1266 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1266-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17724,52 +22026,59 @@ func (x *ObjectFieldSelector) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1271 := z.EncBinary() - _ = yym1271 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1272 := !z.EncBinary() - yy2arr1272 := z.EncBasicHandle().StructToArray - var yyq1272 [2]bool - _, _, _ = yysep1272, yyq1272, yy2arr1272 - const yyr1272 bool = false - var yynn1272 int - if yyr1272 || yy2arr1272 { + 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 { - yynn1272 = 2 - for _, b := range yyq1272 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1272++ + yynn2++ } } - r.EncodeMapStart(yynn1272) - yynn1272 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1272 || yy2arr1272 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1274 := z.EncBinary() - _ = yym1274 - if false { + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1275 := z.EncBinary() - _ = yym1275 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + 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 yyr1272 || yy2arr1272 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1277 := z.EncBinary() - _ = yym1277 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath)) @@ -17778,14 +22087,14 @@ func (x *ObjectFieldSelector) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fieldPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1278 := z.EncBinary() - _ = yym1278 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath)) } } - if yyr1272 || yy2arr1272 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -17798,25 +22107,25 @@ func (x *ObjectFieldSelector) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1279 := z.DecBinary() - _ = yym1279 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1280 := r.ContainerType() - if yyct1280 == codecSelferValueTypeMap1234 { - yyl1280 := r.ReadMapStart() - if yyl1280 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1280, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1280 == codecSelferValueTypeArray1234 { - yyl1280 := r.ReadArrayStart() - if yyl1280 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1280, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -17828,12 +22137,12 @@ func (x *ObjectFieldSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1281Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1281Slc - var yyhl1281 bool = l >= 0 - for yyj1281 := 0; ; yyj1281++ { - if yyhl1281 { - if yyj1281 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -17842,26 +22151,38 @@ func (x *ObjectFieldSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1281Slc = r.DecodeBytes(yys1281Slc, true, true) - yys1281 := string(yys1281Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1281 { + switch yys3 { case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv4 := &x.APIVersion + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "fieldPath": if r.TryDecodeAsNil() { x.FieldPath = "" } else { - x.FieldPath = string(r.DecodeString()) + yyv6 := &x.FieldPath + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys1281) - } // end switch yys1281 - } // end for yyj1281 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -17869,16 +22190,16 @@ func (x *ObjectFieldSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1284 int - var yyb1284 bool - var yyhl1284 bool = l >= 0 - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1284 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1284 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17886,15 +22207,21 @@ func (x *ObjectFieldSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv9 := &x.APIVersion + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } } - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1284 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1284 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17902,20 +22229,26 @@ func (x *ObjectFieldSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.FieldPath = "" } else { - x.FieldPath = string(r.DecodeString()) + yyv11 := &x.FieldPath + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } for { - yyj1284++ - if yyhl1284 { - yyb1284 = yyj1284 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1284 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1284 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1284-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17927,36 +22260,36 @@ func (x *ResourceFieldSelector) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1287 := z.EncBinary() - _ = yym1287 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1288 := !z.EncBinary() - yy2arr1288 := z.EncBasicHandle().StructToArray - var yyq1288 [3]bool - _, _, _ = yysep1288, yyq1288, yy2arr1288 - const yyr1288 bool = false - yyq1288[0] = x.ContainerName != "" - yyq1288[2] = true - var yynn1288 int - if yyr1288 || yy2arr1288 { + 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 { - yynn1288 = 1 - for _, b := range yyq1288 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1288++ + yynn2++ } } - r.EncodeMapStart(yynn1288) - yynn1288 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1288 || yy2arr1288 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1288[0] { - yym1290 := z.EncBinary() - _ = yym1290 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerName)) @@ -17965,22 +22298,22 @@ func (x *ResourceFieldSelector) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1288[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1291 := z.EncBinary() - _ = yym1291 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerName)) } } } - if yyr1288 || yy2arr1288 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1293 := z.EncBinary() - _ = yym1293 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Resource)) @@ -17989,47 +22322,47 @@ func (x *ResourceFieldSelector) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resource")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1294 := z.EncBinary() - _ = yym1294 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Resource)) } } - if yyr1288 || yy2arr1288 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1288[2] { - yy1296 := &x.Divisor - yym1297 := z.EncBinary() - _ = yym1297 + if yyq2[2] { + yy10 := &x.Divisor + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy1296) { - } else if !yym1297 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1296) + } else if z.HasExtensions() && z.EncExt(yy10) { + } else if !yym11 && z.IsJSONHandle() { + z.EncJSONMarshal(yy10) } else { - z.EncFallback(yy1296) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq1288[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("divisor")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1298 := &x.Divisor - yym1299 := z.EncBinary() - _ = yym1299 + yy12 := &x.Divisor + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy1298) { - } else if !yym1299 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1298) + } else if z.HasExtensions() && z.EncExt(yy12) { + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(yy12) } else { - z.EncFallback(yy1298) + z.EncFallback(yy12) } } } - if yyr1288 || yy2arr1288 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -18042,25 +22375,25 @@ func (x *ResourceFieldSelector) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1300 := z.DecBinary() - _ = yym1300 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1301 := r.ContainerType() - if yyct1301 == codecSelferValueTypeMap1234 { - yyl1301 := r.ReadMapStart() - if yyl1301 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1301, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1301 == codecSelferValueTypeArray1234 { - yyl1301 := r.ReadArrayStart() - if yyl1301 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1301, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -18072,12 +22405,12 @@ func (x *ResourceFieldSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1302Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1302Slc - var yyhl1302 bool = l >= 0 - for yyj1302 := 0; ; yyj1302++ { - if yyhl1302 { - if yyj1302 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -18086,41 +22419,53 @@ func (x *ResourceFieldSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1302Slc = r.DecodeBytes(yys1302Slc, true, true) - yys1302 := string(yys1302Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1302 { + switch yys3 { case "containerName": if r.TryDecodeAsNil() { x.ContainerName = "" } else { - x.ContainerName = string(r.DecodeString()) + yyv4 := &x.ContainerName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "resource": if r.TryDecodeAsNil() { x.Resource = "" } else { - x.Resource = string(r.DecodeString()) + yyv6 := &x.Resource + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "divisor": if r.TryDecodeAsNil() { x.Divisor = pkg3_resource.Quantity{} } else { - yyv1305 := &x.Divisor - yym1306 := z.DecBinary() - _ = yym1306 + yyv8 := &x.Divisor + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv1305) { - } else if !yym1306 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1305) + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else if !yym9 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv8) } else { - z.DecFallback(yyv1305, false) + z.DecFallback(yyv8, false) } } default: - z.DecStructFieldNotFound(-1, yys1302) - } // end switch yys1302 - } // end for yyj1302 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -18128,16 +22473,16 @@ func (x *ResourceFieldSelector) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1307 int - var yyb1307 bool - var yyhl1307 bool = l >= 0 - yyj1307++ - if yyhl1307 { - yyb1307 = yyj1307 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1307 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1307 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18145,15 +22490,21 @@ func (x *ResourceFieldSelector) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.ContainerName = "" } else { - x.ContainerName = string(r.DecodeString()) + yyv11 := &x.ContainerName + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } - yyj1307++ - if yyhl1307 { - yyb1307 = yyj1307 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1307 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1307 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18161,15 +22512,21 @@ func (x *ResourceFieldSelector) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Resource = "" } else { - x.Resource = string(r.DecodeString()) + yyv13 := &x.Resource + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj1307++ - if yyhl1307 { - yyb1307 = yyj1307 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1307 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1307 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18177,29 +22534,29 @@ func (x *ResourceFieldSelector) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Divisor = pkg3_resource.Quantity{} } else { - yyv1310 := &x.Divisor - yym1311 := z.DecBinary() - _ = yym1311 + yyv15 := &x.Divisor + yym16 := z.DecBinary() + _ = yym16 if false { - } else if z.HasExtensions() && z.DecExt(yyv1310) { - } else if !yym1311 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1310) + } else if z.HasExtensions() && z.DecExt(yyv15) { + } else if !yym16 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv15) } else { - z.DecFallback(yyv1310, false) + z.DecFallback(yyv15, false) } } for { - yyj1307++ - if yyhl1307 { - yyb1307 = yyj1307 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1307 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1307 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1307-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18211,52 +22568,60 @@ func (x *ConfigMapKeySelector) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1312 := z.EncBinary() - _ = yym1312 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1313 := !z.EncBinary() - yy2arr1313 := z.EncBasicHandle().StructToArray - var yyq1313 [2]bool - _, _, _ = yysep1313, yyq1313, yy2arr1313 - const yyr1313 bool = false - var yynn1313 int - if yyr1313 || yy2arr1313 { - r.EncodeArrayStart(2) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Name != "" + yyq2[2] = x.Optional != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) } else { - yynn1313 = 2 - for _, b := range yyq1313 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1313++ + yynn2++ } } - r.EncodeMapStart(yynn1313) - yynn1313 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1313 || yy2arr1313 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1315 := z.EncBinary() - _ = yym1315 - if false { + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Name")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1316 := z.EncBinary() - _ = yym1316 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + 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 yyr1313 || yy2arr1313 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1318 := z.EncBinary() - _ = yym1318 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Key)) @@ -18265,14 +22630,49 @@ func (x *ConfigMapKeySelector) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("key")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1319 := z.EncBinary() - _ = yym1319 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Key)) } } - if yyr1313 || yy2arr1313 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Optional == nil { + r.EncodeNil() + } else { + yy10 := *x.Optional + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeBool(bool(yy10)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("optional")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Optional == nil { + r.EncodeNil() + } else { + yy12 := *x.Optional + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeBool(bool(yy12)) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -18285,25 +22685,25 @@ func (x *ConfigMapKeySelector) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1320 := z.DecBinary() - _ = yym1320 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1321 := r.ContainerType() - if yyct1321 == codecSelferValueTypeMap1234 { - yyl1321 := r.ReadMapStart() - if yyl1321 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1321, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1321 == codecSelferValueTypeArray1234 { - yyl1321 := r.ReadArrayStart() - if yyl1321 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1321, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -18315,12 +22715,12 @@ func (x *ConfigMapKeySelector) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1322Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1322Slc - var yyhl1322 bool = l >= 0 - for yyj1322 := 0; ; yyj1322++ { - if yyhl1322 { - if yyj1322 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -18329,26 +22729,54 @@ func (x *ConfigMapKeySelector) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1322Slc = r.DecodeBytes(yys1322Slc, true, true) - yys1322 := string(yys1322Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1322 { - case "Name": + switch yys3 { + case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "key": if r.TryDecodeAsNil() { x.Key = "" } else { - x.Key = string(r.DecodeString()) + yyv6 := &x.Key + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "optional": + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } } default: - z.DecStructFieldNotFound(-1, yys1322) - } // end switch yys1322 - } // end for yyj1322 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -18356,16 +22784,16 @@ func (x *ConfigMapKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1325 int - var yyb1325 bool - var yyhl1325 bool = l >= 0 - yyj1325++ - if yyhl1325 { - yyb1325 = yyj1325 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1325 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1325 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18373,15 +22801,21 @@ func (x *ConfigMapKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv11 := &x.Name + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } - yyj1325++ - if yyhl1325 { - yyb1325 = yyj1325 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1325 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1325 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18389,20 +22823,52 @@ func (x *ConfigMapKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Key = "" } else { - x.Key = string(r.DecodeString()) + yyv13 := &x.Key + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } } for { - yyj1325++ - if yyhl1325 { - yyb1325 = yyj1325 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1325 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1325 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1325-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18414,52 +22880,60 @@ func (x *SecretKeySelector) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1328 := z.EncBinary() - _ = yym1328 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1329 := !z.EncBinary() - yy2arr1329 := z.EncBasicHandle().StructToArray - var yyq1329 [2]bool - _, _, _ = yysep1329, yyq1329, yy2arr1329 - const yyr1329 bool = false - var yynn1329 int - if yyr1329 || yy2arr1329 { - r.EncodeArrayStart(2) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Name != "" + yyq2[2] = x.Optional != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) } else { - yynn1329 = 2 - for _, b := range yyq1329 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1329++ + yynn2++ } } - r.EncodeMapStart(yynn1329) - yynn1329 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1329 || yy2arr1329 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1331 := z.EncBinary() - _ = yym1331 - if false { + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Name")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1332 := z.EncBinary() - _ = yym1332 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + 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 yyr1329 || yy2arr1329 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1334 := z.EncBinary() - _ = yym1334 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Key)) @@ -18468,14 +22942,49 @@ func (x *SecretKeySelector) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("key")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1335 := z.EncBinary() - _ = yym1335 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Key)) } } - if yyr1329 || yy2arr1329 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Optional == nil { + r.EncodeNil() + } else { + yy10 := *x.Optional + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeBool(bool(yy10)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("optional")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Optional == nil { + r.EncodeNil() + } else { + yy12 := *x.Optional + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeBool(bool(yy12)) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -18488,25 +22997,25 @@ func (x *SecretKeySelector) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1336 := z.DecBinary() - _ = yym1336 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1337 := r.ContainerType() - if yyct1337 == codecSelferValueTypeMap1234 { - yyl1337 := r.ReadMapStart() - if yyl1337 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1337, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1337 == codecSelferValueTypeArray1234 { - yyl1337 := r.ReadArrayStart() - if yyl1337 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1337, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -18518,12 +23027,12 @@ func (x *SecretKeySelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1338Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1338Slc - var yyhl1338 bool = l >= 0 - for yyj1338 := 0; ; yyj1338++ { - if yyhl1338 { - if yyj1338 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -18532,26 +23041,54 @@ func (x *SecretKeySelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1338Slc = r.DecodeBytes(yys1338Slc, true, true) - yys1338 := string(yys1338Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1338 { - case "Name": + switch yys3 { + case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "key": if r.TryDecodeAsNil() { x.Key = "" } else { - x.Key = string(r.DecodeString()) + yyv6 := &x.Key + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "optional": + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } } default: - z.DecStructFieldNotFound(-1, yys1338) - } // end switch yys1338 - } // end for yyj1338 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -18559,16 +23096,16 @@ func (x *SecretKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1341 int - var yyb1341 bool - var yyhl1341 bool = l >= 0 - yyj1341++ - if yyhl1341 { - yyb1341 = yyj1341 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1341 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1341 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18576,15 +23113,21 @@ func (x *SecretKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv11 := &x.Name + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } - yyj1341++ - if yyhl1341 { - yyb1341 = yyj1341 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1341 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1341 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18592,20 +23135,863 @@ func (x *SecretKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Key = "" } else { - x.Key = string(r.DecodeString()) + yyv13 := &x.Key + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } } for { - yyj1341++ - if yyhl1341 { - yyb1341 = yyj1341 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1341 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1341 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1341-1, "") + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *EnvFromSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Prefix != "" + yyq2[1] = x.ConfigMapRef != nil + yyq2[2] = x.SecretRef != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Prefix)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("prefix")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Prefix)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.ConfigMapRef == nil { + r.EncodeNil() + } else { + x.ConfigMapRef.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("configMapRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ConfigMapRef == nil { + r.EncodeNil() + } else { + x.ConfigMapRef.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.SecretRef == nil { + r.EncodeNil() + } else { + x.SecretRef.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("secretRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SecretRef == nil { + r.EncodeNil() + } else { + x.SecretRef.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *EnvFromSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *EnvFromSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "prefix": + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv4 := &x.Prefix + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "configMapRef": + if r.TryDecodeAsNil() { + if x.ConfigMapRef != nil { + x.ConfigMapRef = nil + } + } else { + if x.ConfigMapRef == nil { + x.ConfigMapRef = new(ConfigMapEnvSource) + } + x.ConfigMapRef.CodecDecodeSelf(d) + } + case "secretRef": + if r.TryDecodeAsNil() { + if x.SecretRef != nil { + x.SecretRef = nil + } + } else { + if x.SecretRef == nil { + x.SecretRef = new(SecretEnvSource) + } + x.SecretRef.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *EnvFromSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv9 := &x.Prefix + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ConfigMapRef != nil { + x.ConfigMapRef = nil + } + } else { + if x.ConfigMapRef == nil { + x.ConfigMapRef = new(ConfigMapEnvSource) + } + x.ConfigMapRef.CodecDecodeSelf(d) + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.SecretRef != nil { + x.SecretRef = nil + } + } else { + if x.SecretRef == nil { + x.SecretRef = new(SecretEnvSource) + } + x.SecretRef.CodecDecodeSelf(d) + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ConfigMapEnvSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Name != "" + yyq2[1] = x.Optional != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Optional == nil { + r.EncodeNil() + } else { + yy7 := *x.Optional + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeBool(bool(yy7)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("optional")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Optional == nil { + r.EncodeNil() + } else { + yy9 := *x.Optional + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeBool(bool(yy9)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ConfigMapEnvSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ConfigMapEnvSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "optional": + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ConfigMapEnvSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv9 := &x.Name + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *SecretEnvSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Name != "" + yyq2[1] = x.Optional != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Optional == nil { + r.EncodeNil() + } else { + yy7 := *x.Optional + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeBool(bool(yy7)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("optional")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Optional == nil { + r.EncodeNil() + } else { + yy9 := *x.Optional + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeBool(bool(yy9)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *SecretEnvSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *SecretEnvSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "optional": + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *SecretEnvSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv9 := &x.Name + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18617,33 +24003,33 @@ func (x *HTTPHeader) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1344 := z.EncBinary() - _ = yym1344 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1345 := !z.EncBinary() - yy2arr1345 := z.EncBasicHandle().StructToArray - var yyq1345 [2]bool - _, _, _ = yysep1345, yyq1345, yy2arr1345 - const yyr1345 bool = false - var yynn1345 int - if yyr1345 || yy2arr1345 { + 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 { - yynn1345 = 2 - for _, b := range yyq1345 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn1345++ + yynn2++ } } - r.EncodeMapStart(yynn1345) - yynn1345 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1345 || yy2arr1345 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1347 := z.EncBinary() - _ = yym1347 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -18652,17 +24038,17 @@ func (x *HTTPHeader) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1348 := z.EncBinary() - _ = yym1348 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr1345 || yy2arr1345 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1350 := z.EncBinary() - _ = yym1350 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Value)) @@ -18671,14 +24057,14 @@ func (x *HTTPHeader) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("value")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1351 := z.EncBinary() - _ = yym1351 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Value)) } } - if yyr1345 || yy2arr1345 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -18691,25 +24077,25 @@ func (x *HTTPHeader) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1352 := z.DecBinary() - _ = yym1352 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1353 := r.ContainerType() - if yyct1353 == codecSelferValueTypeMap1234 { - yyl1353 := r.ReadMapStart() - if yyl1353 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1353, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1353 == codecSelferValueTypeArray1234 { - yyl1353 := r.ReadArrayStart() - if yyl1353 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1353, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -18721,12 +24107,12 @@ func (x *HTTPHeader) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1354Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1354Slc - var yyhl1354 bool = l >= 0 - for yyj1354 := 0; ; yyj1354++ { - if yyhl1354 { - if yyj1354 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -18735,26 +24121,38 @@ func (x *HTTPHeader) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1354Slc = r.DecodeBytes(yys1354Slc, true, true) - yys1354 := string(yys1354Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1354 { + switch yys3 { case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "value": if r.TryDecodeAsNil() { x.Value = "" } else { - x.Value = string(r.DecodeString()) + yyv6 := &x.Value + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys1354) - } // end switch yys1354 - } // end for yyj1354 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -18762,16 +24160,16 @@ func (x *HTTPHeader) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1357 int - var yyb1357 bool - var yyhl1357 bool = l >= 0 - yyj1357++ - if yyhl1357 { - yyb1357 = yyj1357 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1357 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1357 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18779,15 +24177,21 @@ func (x *HTTPHeader) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv9 := &x.Name + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } } - yyj1357++ - if yyhl1357 { - yyb1357 = yyj1357 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1357 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1357 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18795,20 +24199,26 @@ func (x *HTTPHeader) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Value = "" } else { - x.Value = string(r.DecodeString()) + yyv11 := &x.Value + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } for { - yyj1357++ - if yyhl1357 { - yyb1357 = yyj1357 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1357 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1357 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1357-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -18820,39 +24230,38 @@ func (x *HTTPGetAction) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1360 := z.EncBinary() - _ = yym1360 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1361 := !z.EncBinary() - yy2arr1361 := z.EncBasicHandle().StructToArray - var yyq1361 [5]bool - _, _, _ = yysep1361, yyq1361, yy2arr1361 - const yyr1361 bool = false - yyq1361[0] = x.Path != "" - yyq1361[1] = true - yyq1361[2] = x.Host != "" - yyq1361[3] = x.Scheme != "" - yyq1361[4] = len(x.HTTPHeaders) != 0 - var yynn1361 int - if yyr1361 || yy2arr1361 { + 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 { - yynn1361 = 0 - for _, b := range yyq1361 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1361++ + yynn2++ } } - r.EncodeMapStart(yynn1361) - yynn1361 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1361 || yy2arr1361 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1361[0] { - yym1363 := z.EncBinary() - _ = yym1363 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) @@ -18861,56 +24270,50 @@ func (x *HTTPGetAction) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1361[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("path")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1364 := z.EncBinary() - _ = yym1364 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) } } } - if yyr1361 || yy2arr1361 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1361[1] { - yy1366 := &x.Port - yym1367 := z.EncBinary() - _ = yym1367 - if false { - } else if z.HasExtensions() && z.EncExt(yy1366) { - } else if !yym1367 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1366) - } else { - z.EncFallback(yy1366) - } + 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 { - r.EncodeNil() + z.EncFallback(yy7) } } else { - if yyq1361[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("port")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1368 := &x.Port - yym1369 := z.EncBinary() - _ = yym1369 - if false { - } else if z.HasExtensions() && z.EncExt(yy1368) { - } else if !yym1369 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1368) - } else { - z.EncFallback(yy1368) - } + 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 yyr1361 || yy2arr1361 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1361[2] { - yym1371 := z.EncBinary() - _ = yym1371 + if yyq2[2] { + yym12 := z.EncBinary() + _ = yym12 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Host)) @@ -18919,41 +24322,41 @@ func (x *HTTPGetAction) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1361[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("host")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1372 := z.EncBinary() - _ = yym1372 + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Host)) } } } - if yyr1361 || yy2arr1361 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1361[3] { + if yyq2[3] { x.Scheme.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1361[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("scheme")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Scheme.CodecEncodeSelf(e) } } - if yyr1361 || yy2arr1361 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1361[4] { + if yyq2[4] { if x.HTTPHeaders == nil { r.EncodeNil() } else { - yym1375 := z.EncBinary() - _ = yym1375 + yym18 := z.EncBinary() + _ = yym18 if false { } else { h.encSliceHTTPHeader(([]HTTPHeader)(x.HTTPHeaders), e) @@ -18963,15 +24366,15 @@ func (x *HTTPGetAction) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1361[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("httpHeaders")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.HTTPHeaders == nil { r.EncodeNil() } else { - yym1376 := z.EncBinary() - _ = yym1376 + yym19 := z.EncBinary() + _ = yym19 if false { } else { h.encSliceHTTPHeader(([]HTTPHeader)(x.HTTPHeaders), e) @@ -18979,7 +24382,7 @@ func (x *HTTPGetAction) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1361 || yy2arr1361 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -18992,25 +24395,25 @@ func (x *HTTPGetAction) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1377 := z.DecBinary() - _ = yym1377 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1378 := r.ContainerType() - if yyct1378 == codecSelferValueTypeMap1234 { - yyl1378 := r.ReadMapStart() - if yyl1378 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1378, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1378 == codecSelferValueTypeArray1234 { - yyl1378 := r.ReadArrayStart() - if yyl1378 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1378, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -19022,12 +24425,12 @@ func (x *HTTPGetAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1379Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1379Slc - var yyhl1379 bool = l >= 0 - for yyj1379 := 0; ; yyj1379++ { - if yyhl1379 { - if yyj1379 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -19036,59 +24439,72 @@ func (x *HTTPGetAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1379Slc = r.DecodeBytes(yys1379Slc, true, true) - yys1379 := string(yys1379Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1379 { + switch yys3 { case "path": if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv4 := &x.Path + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "port": if r.TryDecodeAsNil() { x.Port = pkg4_intstr.IntOrString{} } else { - yyv1381 := &x.Port - yym1382 := z.DecBinary() - _ = yym1382 + yyv6 := &x.Port + yym7 := z.DecBinary() + _ = yym7 if false { - } else if z.HasExtensions() && z.DecExt(yyv1381) { - } else if !yym1382 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1381) + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) } else { - z.DecFallback(yyv1381, false) + z.DecFallback(yyv6, false) } } case "host": if r.TryDecodeAsNil() { x.Host = "" } else { - x.Host = string(r.DecodeString()) + yyv8 := &x.Host + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } case "scheme": if r.TryDecodeAsNil() { x.Scheme = "" } else { - x.Scheme = URIScheme(r.DecodeString()) + yyv10 := &x.Scheme + yyv10.CodecDecodeSelf(d) } case "httpHeaders": if r.TryDecodeAsNil() { x.HTTPHeaders = nil } else { - yyv1385 := &x.HTTPHeaders - yym1386 := z.DecBinary() - _ = yym1386 + yyv11 := &x.HTTPHeaders + yym12 := z.DecBinary() + _ = yym12 if false { } else { - h.decSliceHTTPHeader((*[]HTTPHeader)(yyv1385), d) + h.decSliceHTTPHeader((*[]HTTPHeader)(yyv11), d) } } default: - z.DecStructFieldNotFound(-1, yys1379) - } // end switch yys1379 - } // end for yyj1379 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -19096,16 +24512,16 @@ func (x *HTTPGetAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1387 int - var yyb1387 bool - var yyhl1387 bool = l >= 0 - yyj1387++ - if yyhl1387 { - yyb1387 = yyj1387 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1387 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1387 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -19113,15 +24529,21 @@ func (x *HTTPGetAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv14 := &x.Path + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj1387++ - if yyhl1387 { - yyb1387 = yyj1387 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1387 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1387 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -19129,24 +24551,24 @@ func (x *HTTPGetAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Port = pkg4_intstr.IntOrString{} } else { - yyv1389 := &x.Port - yym1390 := z.DecBinary() - _ = yym1390 + yyv16 := &x.Port + yym17 := z.DecBinary() + _ = yym17 if false { - } else if z.HasExtensions() && z.DecExt(yyv1389) { - } else if !yym1390 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1389) + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else if !yym17 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv16) } else { - z.DecFallback(yyv1389, false) + z.DecFallback(yyv16, false) } } - yyj1387++ - if yyhl1387 { - yyb1387 = yyj1387 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1387 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1387 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -19154,15 +24576,21 @@ func (x *HTTPGetAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Host = "" } else { - x.Host = string(r.DecodeString()) + yyv18 := &x.Host + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *((*string)(yyv18)) = r.DecodeString() + } } - yyj1387++ - if yyhl1387 { - yyb1387 = yyj1387 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1387 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1387 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -19170,15 +24598,16 @@ func (x *HTTPGetAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Scheme = "" } else { - x.Scheme = URIScheme(r.DecodeString()) + yyv20 := &x.Scheme + yyv20.CodecDecodeSelf(d) } - yyj1387++ - if yyhl1387 { - yyb1387 = yyj1387 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1387 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1387 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -19186,26 +24615,26 @@ func (x *HTTPGetAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.HTTPHeaders = nil } else { - yyv1393 := &x.HTTPHeaders - yym1394 := z.DecBinary() - _ = yym1394 + yyv21 := &x.HTTPHeaders + yym22 := z.DecBinary() + _ = yym22 if false { } else { - h.decSliceHTTPHeader((*[]HTTPHeader)(yyv1393), d) + h.decSliceHTTPHeader((*[]HTTPHeader)(yyv21), d) } } for { - yyj1387++ - if yyhl1387 { - yyb1387 = yyj1387 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb1387 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb1387 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1387-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19214,8 +24643,8 @@ func (x URIScheme) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1395 := z.EncBinary() - _ = yym1395 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -19227,8 +24656,8 @@ func (x *URIScheme) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1396 := z.DecBinary() - _ = yym1396 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -19243,64 +24672,57 @@ func (x *TCPSocketAction) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1397 := z.EncBinary() - _ = yym1397 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1398 := !z.EncBinary() - yy2arr1398 := z.EncBasicHandle().StructToArray - var yyq1398 [1]bool - _, _, _ = yysep1398, yyq1398, yy2arr1398 - const yyr1398 bool = false - yyq1398[0] = true - var yynn1398 int - if yyr1398 || yy2arr1398 { + 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 { - yynn1398 = 0 - for _, b := range yyq1398 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1398++ + yynn2++ } } - r.EncodeMapStart(yynn1398) - yynn1398 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1398 || yy2arr1398 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1398[0] { - yy1400 := &x.Port - yym1401 := z.EncBinary() - _ = yym1401 - if false { - } else if z.HasExtensions() && z.EncExt(yy1400) { - } else if !yym1401 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1400) - } else { - z.EncFallback(yy1400) - } + 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 { - r.EncodeNil() + z.EncFallback(yy4) } } else { - if yyq1398[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("port")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1402 := &x.Port - yym1403 := z.EncBinary() - _ = yym1403 - if false { - } else if z.HasExtensions() && z.EncExt(yy1402) { - } else if !yym1403 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1402) - } else { - z.EncFallback(yy1402) - } + 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 yyr1398 || yy2arr1398 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -19313,25 +24735,25 @@ func (x *TCPSocketAction) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1404 := z.DecBinary() - _ = yym1404 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1405 := r.ContainerType() - if yyct1405 == codecSelferValueTypeMap1234 { - yyl1405 := r.ReadMapStart() - if yyl1405 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1405, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1405 == codecSelferValueTypeArray1234 { - yyl1405 := r.ReadArrayStart() - if yyl1405 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1405, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -19343,12 +24765,12 @@ func (x *TCPSocketAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1406Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1406Slc - var yyhl1406 bool = l >= 0 - for yyj1406 := 0; ; yyj1406++ { - if yyhl1406 { - if yyj1406 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -19357,29 +24779,29 @@ func (x *TCPSocketAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1406Slc = r.DecodeBytes(yys1406Slc, true, true) - yys1406 := string(yys1406Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1406 { + switch yys3 { case "port": if r.TryDecodeAsNil() { x.Port = pkg4_intstr.IntOrString{} } else { - yyv1407 := &x.Port - yym1408 := z.DecBinary() - _ = yym1408 + yyv4 := &x.Port + yym5 := z.DecBinary() + _ = yym5 if false { - } else if z.HasExtensions() && z.DecExt(yyv1407) { - } else if !yym1408 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1407) + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else if !yym5 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4) } else { - z.DecFallback(yyv1407, false) + z.DecFallback(yyv4, false) } } default: - z.DecStructFieldNotFound(-1, yys1406) - } // end switch yys1406 - } // end for yyj1406 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -19387,16 +24809,16 @@ func (x *TCPSocketAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1409 int - var yyb1409 bool - var yyhl1409 bool = l >= 0 - yyj1409++ - if yyhl1409 { - yyb1409 = yyj1409 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1409 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1409 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -19404,29 +24826,29 @@ func (x *TCPSocketAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Port = pkg4_intstr.IntOrString{} } else { - yyv1410 := &x.Port - yym1411 := z.DecBinary() - _ = yym1411 + yyv7 := &x.Port + yym8 := z.DecBinary() + _ = yym8 if false { - } else if z.HasExtensions() && z.DecExt(yyv1410) { - } else if !yym1411 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1410) + } else if z.HasExtensions() && z.DecExt(yyv7) { + } else if !yym8 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv7) } else { - z.DecFallback(yyv1410, false) + z.DecFallback(yyv7, false) } } for { - yyj1409++ - if yyhl1409 { - yyb1409 = yyj1409 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1409 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1409 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1409-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19438,38 +24860,38 @@ func (x *ExecAction) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1412 := z.EncBinary() - _ = yym1412 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1413 := !z.EncBinary() - yy2arr1413 := z.EncBasicHandle().StructToArray - var yyq1413 [1]bool - _, _, _ = yysep1413, yyq1413, yy2arr1413 - const yyr1413 bool = false - yyq1413[0] = len(x.Command) != 0 - var yynn1413 int - if yyr1413 || yy2arr1413 { + 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 { - yynn1413 = 0 - for _, b := range yyq1413 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1413++ + yynn2++ } } - r.EncodeMapStart(yynn1413) - yynn1413 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1413 || yy2arr1413 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1413[0] { + if yyq2[0] { if x.Command == nil { r.EncodeNil() } else { - yym1415 := z.EncBinary() - _ = yym1415 + yym4 := z.EncBinary() + _ = yym4 if false { } else { z.F.EncSliceStringV(x.Command, false, e) @@ -19479,15 +24901,15 @@ func (x *ExecAction) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1413[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("command")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Command == nil { r.EncodeNil() } else { - yym1416 := z.EncBinary() - _ = yym1416 + yym5 := z.EncBinary() + _ = yym5 if false { } else { z.F.EncSliceStringV(x.Command, false, e) @@ -19495,7 +24917,7 @@ func (x *ExecAction) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1413 || yy2arr1413 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -19508,25 +24930,25 @@ func (x *ExecAction) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1417 := z.DecBinary() - _ = yym1417 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1418 := r.ContainerType() - if yyct1418 == codecSelferValueTypeMap1234 { - yyl1418 := r.ReadMapStart() - if yyl1418 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1418, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1418 == codecSelferValueTypeArray1234 { - yyl1418 := r.ReadArrayStart() - if yyl1418 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1418, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -19538,12 +24960,12 @@ func (x *ExecAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1419Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1419Slc - var yyhl1419 bool = l >= 0 - for yyj1419 := 0; ; yyj1419++ { - if yyhl1419 { - if yyj1419 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -19552,26 +24974,26 @@ func (x *ExecAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1419Slc = r.DecodeBytes(yys1419Slc, true, true) - yys1419 := string(yys1419Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1419 { + switch yys3 { case "command": if r.TryDecodeAsNil() { x.Command = nil } else { - yyv1420 := &x.Command - yym1421 := z.DecBinary() - _ = yym1421 + yyv4 := &x.Command + yym5 := z.DecBinary() + _ = yym5 if false { } else { - z.F.DecSliceStringX(yyv1420, false, d) + z.F.DecSliceStringX(yyv4, false, d) } } default: - z.DecStructFieldNotFound(-1, yys1419) - } // end switch yys1419 - } // end for yyj1419 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -19579,16 +25001,16 @@ func (x *ExecAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1422 int - var yyb1422 bool - var yyhl1422 bool = l >= 0 - yyj1422++ - if yyhl1422 { - yyb1422 = yyj1422 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1422 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1422 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -19596,26 +25018,26 @@ func (x *ExecAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Command = nil } else { - yyv1423 := &x.Command - yym1424 := z.DecBinary() - _ = yym1424 + yyv7 := &x.Command + yym8 := z.DecBinary() + _ = yym8 if false { } else { - z.F.DecSliceStringX(yyv1423, false, d) + z.F.DecSliceStringX(yyv7, false, d) } } for { - yyj1422++ - if yyhl1422 { - yyb1422 = yyj1422 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1422 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1422 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1422-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19627,49 +25049,49 @@ func (x *Probe) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1425 := z.EncBinary() - _ = yym1425 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1426 := !z.EncBinary() - yy2arr1426 := z.EncBasicHandle().StructToArray - var yyq1426 [8]bool - _, _, _ = yysep1426, yyq1426, yy2arr1426 - const yyr1426 bool = false - yyq1426[0] = x.Handler.Exec != nil && x.Exec != nil - yyq1426[1] = x.Handler.HTTPGet != nil && x.HTTPGet != nil - yyq1426[2] = x.Handler.TCPSocket != nil && x.TCPSocket != nil - yyq1426[3] = x.InitialDelaySeconds != 0 - yyq1426[4] = x.TimeoutSeconds != 0 - yyq1426[5] = x.PeriodSeconds != 0 - yyq1426[6] = x.SuccessThreshold != 0 - yyq1426[7] = x.FailureThreshold != 0 - var yynn1426 int - if yyr1426 || yy2arr1426 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [8]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Handler.Exec != nil && x.Exec != nil + yyq2[1] = x.Handler.HTTPGet != nil && x.HTTPGet != nil + yyq2[2] = x.Handler.TCPSocket != nil && x.TCPSocket != nil + yyq2[3] = x.InitialDelaySeconds != 0 + yyq2[4] = x.TimeoutSeconds != 0 + yyq2[5] = x.PeriodSeconds != 0 + yyq2[6] = x.SuccessThreshold != 0 + yyq2[7] = x.FailureThreshold != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(8) } else { - yynn1426 = 0 - for _, b := range yyq1426 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1426++ + yynn2++ } } - r.EncodeMapStart(yynn1426) - yynn1426 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - var yyn1427 bool + var yyn3 bool if x.Handler.Exec == nil { - yyn1427 = true - goto LABEL1427 + yyn3 = true + goto LABEL3 } - LABEL1427: - if yyr1426 || yy2arr1426 { - if yyn1427 { + LABEL3: + if yyr2 || yy2arr2 { + if yyn3 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1426[0] { + if yyq2[0] { if x.Exec == nil { r.EncodeNil() } else { @@ -19680,11 +25102,11 @@ func (x *Probe) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq1426[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("exec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn1427 { + if yyn3 { r.EncodeNil() } else { if x.Exec == nil { @@ -19695,18 +25117,18 @@ func (x *Probe) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn1428 bool + var yyn6 bool if x.Handler.HTTPGet == nil { - yyn1428 = true - goto LABEL1428 + yyn6 = true + goto LABEL6 } - LABEL1428: - if yyr1426 || yy2arr1426 { - if yyn1428 { + LABEL6: + if yyr2 || yy2arr2 { + if yyn6 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1426[1] { + if yyq2[1] { if x.HTTPGet == nil { r.EncodeNil() } else { @@ -19717,11 +25139,11 @@ func (x *Probe) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq1426[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("httpGet")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn1428 { + if yyn6 { r.EncodeNil() } else { if x.HTTPGet == nil { @@ -19732,18 +25154,18 @@ func (x *Probe) CodecEncodeSelf(e *codec1978.Encoder) { } } } - var yyn1429 bool + var yyn9 bool if x.Handler.TCPSocket == nil { - yyn1429 = true - goto LABEL1429 + yyn9 = true + goto LABEL9 } - LABEL1429: - if yyr1426 || yy2arr1426 { - if yyn1429 { + LABEL9: + if yyr2 || yy2arr2 { + if yyn9 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1426[2] { + if yyq2[2] { if x.TCPSocket == nil { r.EncodeNil() } else { @@ -19754,11 +25176,11 @@ func (x *Probe) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq1426[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("tcpSocket")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn1429 { + if yyn9 { r.EncodeNil() } else { if x.TCPSocket == nil { @@ -19769,11 +25191,11 @@ func (x *Probe) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1426 || yy2arr1426 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1426[3] { - yym1431 := z.EncBinary() - _ = yym1431 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeInt(int64(x.InitialDelaySeconds)) @@ -19782,23 +25204,23 @@ func (x *Probe) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq1426[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("initialDelaySeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1432 := z.EncBinary() - _ = yym1432 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeInt(int64(x.InitialDelaySeconds)) } } } - if yyr1426 || yy2arr1426 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1426[4] { - yym1434 := z.EncBinary() - _ = yym1434 + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeInt(int64(x.TimeoutSeconds)) @@ -19807,23 +25229,23 @@ func (x *Probe) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq1426[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("timeoutSeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1435 := z.EncBinary() - _ = yym1435 + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeInt(int64(x.TimeoutSeconds)) } } } - if yyr1426 || yy2arr1426 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1426[5] { - yym1437 := z.EncBinary() - _ = yym1437 + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 if false { } else { r.EncodeInt(int64(x.PeriodSeconds)) @@ -19832,23 +25254,23 @@ func (x *Probe) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq1426[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("periodSeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1438 := z.EncBinary() - _ = yym1438 + yym20 := z.EncBinary() + _ = yym20 if false { } else { r.EncodeInt(int64(x.PeriodSeconds)) } } } - if yyr1426 || yy2arr1426 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1426[6] { - yym1440 := z.EncBinary() - _ = yym1440 + if yyq2[6] { + yym22 := z.EncBinary() + _ = yym22 if false { } else { r.EncodeInt(int64(x.SuccessThreshold)) @@ -19857,23 +25279,23 @@ func (x *Probe) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq1426[6] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("successThreshold")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1441 := z.EncBinary() - _ = yym1441 + yym23 := z.EncBinary() + _ = yym23 if false { } else { r.EncodeInt(int64(x.SuccessThreshold)) } } } - if yyr1426 || yy2arr1426 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1426[7] { - yym1443 := z.EncBinary() - _ = yym1443 + if yyq2[7] { + yym25 := z.EncBinary() + _ = yym25 if false { } else { r.EncodeInt(int64(x.FailureThreshold)) @@ -19882,19 +25304,19 @@ func (x *Probe) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq1426[7] { + if yyq2[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("failureThreshold")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1444 := z.EncBinary() - _ = yym1444 + yym26 := z.EncBinary() + _ = yym26 if false { } else { r.EncodeInt(int64(x.FailureThreshold)) } } } - if yyr1426 || yy2arr1426 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -19907,25 +25329,25 @@ func (x *Probe) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1445 := z.DecBinary() - _ = yym1445 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1446 := r.ContainerType() - if yyct1446 == codecSelferValueTypeMap1234 { - yyl1446 := r.ReadMapStart() - if yyl1446 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1446, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1446 == codecSelferValueTypeArray1234 { - yyl1446 := r.ReadArrayStart() - if yyl1446 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1446, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -19937,12 +25359,12 @@ func (x *Probe) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1447Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1447Slc - var yyhl1447 bool = l >= 0 - for yyj1447 := 0; ; yyj1447++ { - if yyhl1447 { - if yyj1447 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -19951,10 +25373,10 @@ func (x *Probe) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1447Slc = r.DecodeBytes(yys1447Slc, true, true) - yys1447 := string(yys1447Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1447 { + switch yys3 { case "exec": if x.Handler.Exec == nil { x.Handler.Exec = new(ExecAction) @@ -20001,36 +25423,66 @@ func (x *Probe) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.InitialDelaySeconds = 0 } else { - x.InitialDelaySeconds = int32(r.DecodeInt(32)) + yyv7 := &x.InitialDelaySeconds + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*int32)(yyv7)) = int32(r.DecodeInt(32)) + } } case "timeoutSeconds": if r.TryDecodeAsNil() { x.TimeoutSeconds = 0 } else { - x.TimeoutSeconds = int32(r.DecodeInt(32)) + yyv9 := &x.TimeoutSeconds + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*int32)(yyv9)) = int32(r.DecodeInt(32)) + } } case "periodSeconds": if r.TryDecodeAsNil() { x.PeriodSeconds = 0 } else { - x.PeriodSeconds = int32(r.DecodeInt(32)) + yyv11 := &x.PeriodSeconds + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*int32)(yyv11)) = int32(r.DecodeInt(32)) + } } case "successThreshold": if r.TryDecodeAsNil() { x.SuccessThreshold = 0 } else { - x.SuccessThreshold = int32(r.DecodeInt(32)) + yyv13 := &x.SuccessThreshold + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*int32)(yyv13)) = int32(r.DecodeInt(32)) + } } case "failureThreshold": if r.TryDecodeAsNil() { x.FailureThreshold = 0 } else { - x.FailureThreshold = int32(r.DecodeInt(32)) + yyv15 := &x.FailureThreshold + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*int32)(yyv15)) = int32(r.DecodeInt(32)) + } } default: - z.DecStructFieldNotFound(-1, yys1447) - } // end switch yys1447 - } // end for yyj1447 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -20038,19 +25490,19 @@ func (x *Probe) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1456 int - var yyb1456 bool - var yyhl1456 bool = l >= 0 + var yyj17 int + var yyb17 bool + var yyhl17 bool = l >= 0 if x.Handler.Exec == nil { x.Handler.Exec = new(ExecAction) } - yyj1456++ - if yyhl1456 { - yyb1456 = yyj1456 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb1456 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb1456 { + if yyb17 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20068,13 +25520,13 @@ func (x *Probe) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.Handler.HTTPGet == nil { x.Handler.HTTPGet = new(HTTPGetAction) } - yyj1456++ - if yyhl1456 { - yyb1456 = yyj1456 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb1456 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb1456 { + if yyb17 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20092,13 +25544,13 @@ func (x *Probe) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.Handler.TCPSocket == nil { x.Handler.TCPSocket = new(TCPSocketAction) } - yyj1456++ - if yyhl1456 { - yyb1456 = yyj1456 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb1456 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb1456 { + if yyb17 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20113,13 +25565,13 @@ func (x *Probe) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.TCPSocket.CodecDecodeSelf(d) } - yyj1456++ - if yyhl1456 { - yyb1456 = yyj1456 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb1456 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb1456 { + if yyb17 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20127,15 +25579,21 @@ func (x *Probe) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.InitialDelaySeconds = 0 } else { - x.InitialDelaySeconds = int32(r.DecodeInt(32)) + yyv21 := &x.InitialDelaySeconds + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*int32)(yyv21)) = int32(r.DecodeInt(32)) + } } - yyj1456++ - if yyhl1456 { - yyb1456 = yyj1456 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb1456 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb1456 { + if yyb17 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20143,15 +25601,21 @@ func (x *Probe) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.TimeoutSeconds = 0 } else { - x.TimeoutSeconds = int32(r.DecodeInt(32)) + yyv23 := &x.TimeoutSeconds + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*int32)(yyv23)) = int32(r.DecodeInt(32)) + } } - yyj1456++ - if yyhl1456 { - yyb1456 = yyj1456 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb1456 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb1456 { + if yyb17 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20159,15 +25623,21 @@ func (x *Probe) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.PeriodSeconds = 0 } else { - x.PeriodSeconds = int32(r.DecodeInt(32)) + yyv25 := &x.PeriodSeconds + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*int32)(yyv25)) = int32(r.DecodeInt(32)) + } } - yyj1456++ - if yyhl1456 { - yyb1456 = yyj1456 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb1456 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb1456 { + if yyb17 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20175,15 +25645,21 @@ func (x *Probe) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.SuccessThreshold = 0 } else { - x.SuccessThreshold = int32(r.DecodeInt(32)) + yyv27 := &x.SuccessThreshold + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*int32)(yyv27)) = int32(r.DecodeInt(32)) + } } - yyj1456++ - if yyhl1456 { - yyb1456 = yyj1456 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb1456 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb1456 { + if yyb17 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20191,20 +25667,26 @@ func (x *Probe) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.FailureThreshold = 0 } else { - x.FailureThreshold = int32(r.DecodeInt(32)) + yyv29 := &x.FailureThreshold + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*int32)(yyv29)) = int32(r.DecodeInt(32)) + } } for { - yyj1456++ - if yyhl1456 { - yyb1456 = yyj1456 > l + yyj17++ + if yyhl17 { + yyb17 = yyj17 > l } else { - yyb1456 = r.CheckBreak() + yyb17 = r.CheckBreak() } - if yyb1456 { + if yyb17 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1456-1, "") + z.DecStructFieldNotFound(yyj17-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -20213,8 +25695,8 @@ func (x PullPolicy) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1465 := z.EncBinary() - _ = yym1465 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -20226,8 +25708,34 @@ func (x *PullPolicy) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1466 := z.DecBinary() - _ = yym1466 + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x TerminationMessagePolicy) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *TerminationMessagePolicy) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -20239,8 +25747,8 @@ func (x Capability) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1467 := z.EncBinary() - _ = yym1467 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -20252,8 +25760,8 @@ func (x *Capability) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1468 := z.DecBinary() - _ = yym1468 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -20268,39 +25776,39 @@ func (x *Capabilities) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1469 := z.EncBinary() - _ = yym1469 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1470 := !z.EncBinary() - yy2arr1470 := z.EncBasicHandle().StructToArray - var yyq1470 [2]bool - _, _, _ = yysep1470, yyq1470, yy2arr1470 - const yyr1470 bool = false - yyq1470[0] = len(x.Add) != 0 - yyq1470[1] = len(x.Drop) != 0 - var yynn1470 int - if yyr1470 || yy2arr1470 { + 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 { - yynn1470 = 0 - for _, b := range yyq1470 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1470++ + yynn2++ } } - r.EncodeMapStart(yynn1470) - yynn1470 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1470 || yy2arr1470 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1470[0] { + if yyq2[0] { if x.Add == nil { r.EncodeNil() } else { - yym1472 := z.EncBinary() - _ = yym1472 + yym4 := z.EncBinary() + _ = yym4 if false { } else { h.encSliceCapability(([]Capability)(x.Add), e) @@ -20310,15 +25818,15 @@ func (x *Capabilities) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1470[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("add")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Add == nil { r.EncodeNil() } else { - yym1473 := z.EncBinary() - _ = yym1473 + yym5 := z.EncBinary() + _ = yym5 if false { } else { h.encSliceCapability(([]Capability)(x.Add), e) @@ -20326,14 +25834,14 @@ func (x *Capabilities) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1470 || yy2arr1470 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1470[1] { + if yyq2[1] { if x.Drop == nil { r.EncodeNil() } else { - yym1475 := z.EncBinary() - _ = yym1475 + yym7 := z.EncBinary() + _ = yym7 if false { } else { h.encSliceCapability(([]Capability)(x.Drop), e) @@ -20343,15 +25851,15 @@ func (x *Capabilities) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1470[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("drop")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Drop == nil { r.EncodeNil() } else { - yym1476 := z.EncBinary() - _ = yym1476 + yym8 := z.EncBinary() + _ = yym8 if false { } else { h.encSliceCapability(([]Capability)(x.Drop), e) @@ -20359,7 +25867,7 @@ func (x *Capabilities) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1470 || yy2arr1470 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -20372,25 +25880,25 @@ func (x *Capabilities) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1477 := z.DecBinary() - _ = yym1477 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1478 := r.ContainerType() - if yyct1478 == codecSelferValueTypeMap1234 { - yyl1478 := r.ReadMapStart() - if yyl1478 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1478, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1478 == codecSelferValueTypeArray1234 { - yyl1478 := r.ReadArrayStart() - if yyl1478 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1478, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -20402,12 +25910,12 @@ func (x *Capabilities) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1479Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1479Slc - var yyhl1479 bool = l >= 0 - for yyj1479 := 0; ; yyj1479++ { - if yyhl1479 { - if yyj1479 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -20416,38 +25924,38 @@ func (x *Capabilities) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1479Slc = r.DecodeBytes(yys1479Slc, true, true) - yys1479 := string(yys1479Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1479 { + switch yys3 { case "add": if r.TryDecodeAsNil() { x.Add = nil } else { - yyv1480 := &x.Add - yym1481 := z.DecBinary() - _ = yym1481 + yyv4 := &x.Add + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSliceCapability((*[]Capability)(yyv1480), d) + h.decSliceCapability((*[]Capability)(yyv4), d) } } case "drop": if r.TryDecodeAsNil() { x.Drop = nil } else { - yyv1482 := &x.Drop - yym1483 := z.DecBinary() - _ = yym1483 + yyv6 := &x.Drop + yym7 := z.DecBinary() + _ = yym7 if false { } else { - h.decSliceCapability((*[]Capability)(yyv1482), d) + h.decSliceCapability((*[]Capability)(yyv6), d) } } default: - z.DecStructFieldNotFound(-1, yys1479) - } // end switch yys1479 - } // end for yyj1479 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -20455,16 +25963,16 @@ func (x *Capabilities) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1484 int - var yyb1484 bool - var yyhl1484 bool = l >= 0 - yyj1484++ - if yyhl1484 { - yyb1484 = yyj1484 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1484 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1484 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20472,21 +25980,21 @@ func (x *Capabilities) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Add = nil } else { - yyv1485 := &x.Add - yym1486 := z.DecBinary() - _ = yym1486 + yyv9 := &x.Add + yym10 := z.DecBinary() + _ = yym10 if false { } else { - h.decSliceCapability((*[]Capability)(yyv1485), d) + h.decSliceCapability((*[]Capability)(yyv9), d) } } - yyj1484++ - if yyhl1484 { - yyb1484 = yyj1484 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1484 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1484 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20494,26 +26002,26 @@ func (x *Capabilities) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Drop = nil } else { - yyv1487 := &x.Drop - yym1488 := z.DecBinary() - _ = yym1488 + yyv11 := &x.Drop + yym12 := z.DecBinary() + _ = yym12 if false { } else { - h.decSliceCapability((*[]Capability)(yyv1487), d) + h.decSliceCapability((*[]Capability)(yyv11), d) } } for { - yyj1484++ - if yyhl1484 { - yyb1484 = yyj1484 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1484 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1484 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1484-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -20525,34 +26033,34 @@ func (x *ResourceRequirements) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1489 := z.EncBinary() - _ = yym1489 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1490 := !z.EncBinary() - yy2arr1490 := z.EncBasicHandle().StructToArray - var yyq1490 [2]bool - _, _, _ = yysep1490, yyq1490, yy2arr1490 - const yyr1490 bool = false - yyq1490[0] = len(x.Limits) != 0 - yyq1490[1] = len(x.Requests) != 0 - var yynn1490 int - if yyr1490 || yy2arr1490 { + 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 { - yynn1490 = 0 - for _, b := range yyq1490 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1490++ + yynn2++ } } - r.EncodeMapStart(yynn1490) - yynn1490 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1490 || yy2arr1490 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1490[0] { + if yyq2[0] { if x.Limits == nil { r.EncodeNil() } else { @@ -20562,7 +26070,7 @@ func (x *ResourceRequirements) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1490[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("limits")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -20573,9 +26081,9 @@ func (x *ResourceRequirements) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1490 || yy2arr1490 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1490[1] { + if yyq2[1] { if x.Requests == nil { r.EncodeNil() } else { @@ -20585,7 +26093,7 @@ func (x *ResourceRequirements) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1490[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("requests")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -20596,7 +26104,7 @@ func (x *ResourceRequirements) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1490 || yy2arr1490 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -20609,25 +26117,25 @@ func (x *ResourceRequirements) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1493 := z.DecBinary() - _ = yym1493 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1494 := r.ContainerType() - if yyct1494 == codecSelferValueTypeMap1234 { - yyl1494 := r.ReadMapStart() - if yyl1494 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1494, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1494 == codecSelferValueTypeArray1234 { - yyl1494 := r.ReadArrayStart() - if yyl1494 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1494, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -20639,12 +26147,12 @@ func (x *ResourceRequirements) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1495Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1495Slc - var yyhl1495 bool = l >= 0 - for yyj1495 := 0; ; yyj1495++ { - if yyhl1495 { - if yyj1495 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -20653,28 +26161,28 @@ func (x *ResourceRequirements) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1495Slc = r.DecodeBytes(yys1495Slc, true, true) - yys1495 := string(yys1495Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1495 { + switch yys3 { case "limits": if r.TryDecodeAsNil() { x.Limits = nil } else { - yyv1496 := &x.Limits - yyv1496.CodecDecodeSelf(d) + yyv4 := &x.Limits + yyv4.CodecDecodeSelf(d) } case "requests": if r.TryDecodeAsNil() { x.Requests = nil } else { - yyv1497 := &x.Requests - yyv1497.CodecDecodeSelf(d) + yyv5 := &x.Requests + yyv5.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1495) - } // end switch yys1495 - } // end for yyj1495 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -20682,16 +26190,16 @@ func (x *ResourceRequirements) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1498 int - var yyb1498 bool - var yyhl1498 bool = l >= 0 - yyj1498++ - if yyhl1498 { - yyb1498 = yyj1498 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1498 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1498 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20699,16 +26207,16 @@ func (x *ResourceRequirements) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Limits = nil } else { - yyv1499 := &x.Limits - yyv1499.CodecDecodeSelf(d) + yyv7 := &x.Limits + yyv7.CodecDecodeSelf(d) } - yyj1498++ - if yyhl1498 { - yyb1498 = yyj1498 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1498 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1498 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20716,21 +26224,21 @@ func (x *ResourceRequirements) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Requests = nil } else { - yyv1500 := &x.Requests - yyv1500.CodecDecodeSelf(d) + yyv8 := &x.Requests + yyv8.CodecDecodeSelf(d) } for { - yyj1498++ - if yyhl1498 { - yyb1498 = yyj1498 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1498 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1498 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1498-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -20742,48 +26250,52 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1501 := z.EncBinary() - _ = yym1501 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1502 := !z.EncBinary() - yy2arr1502 := z.EncBasicHandle().StructToArray - var yyq1502 [18]bool - _, _, _ = yysep1502, yyq1502, yy2arr1502 - const yyr1502 bool = false - yyq1502[2] = len(x.Command) != 0 - yyq1502[3] = len(x.Args) != 0 - yyq1502[4] = x.WorkingDir != "" - yyq1502[5] = len(x.Ports) != 0 - yyq1502[6] = len(x.Env) != 0 - yyq1502[7] = true - yyq1502[8] = len(x.VolumeMounts) != 0 - yyq1502[9] = x.LivenessProbe != nil - yyq1502[10] = x.ReadinessProbe != nil - yyq1502[11] = x.Lifecycle != nil - yyq1502[12] = x.TerminationMessagePath != "" - yyq1502[14] = x.SecurityContext != nil - yyq1502[15] = x.Stdin != false - yyq1502[16] = x.StdinOnce != false - yyq1502[17] = x.TTY != false - var yynn1502 int - if yyr1502 || yy2arr1502 { - r.EncodeArrayStart(18) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [20]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.EnvFrom) != 0 + yyq2[7] = len(x.Env) != 0 + yyq2[8] = true + yyq2[9] = len(x.VolumeMounts) != 0 + yyq2[10] = x.LivenessProbe != nil + yyq2[11] = x.ReadinessProbe != nil + yyq2[12] = x.Lifecycle != nil + yyq2[13] = x.TerminationMessagePath != "" + yyq2[14] = x.TerminationMessagePolicy != "" + yyq2[15] = x.ImagePullPolicy != "" + yyq2[16] = x.SecurityContext != nil + yyq2[17] = x.Stdin != false + yyq2[18] = x.StdinOnce != false + yyq2[19] = x.TTY != false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(20) } else { - yynn1502 = 3 - for _, b := range yyq1502 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1502++ + yynn2++ } } - r.EncodeMapStart(yynn1502) - yynn1502 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1504 := z.EncBinary() - _ = yym1504 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -20792,40 +26304,46 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1505 := z.EncBinary() - _ = yym1505 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1507 := z.EncBinary() - _ = yym1507 - if false { + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Image)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Image)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("image")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1508 := z.EncBinary() - _ = yym1508 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Image)) + 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 yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[2] { + if yyq2[2] { if x.Command == nil { r.EncodeNil() } else { - yym1510 := z.EncBinary() - _ = yym1510 + yym10 := z.EncBinary() + _ = yym10 if false { } else { z.F.EncSliceStringV(x.Command, false, e) @@ -20835,15 +26353,15 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1502[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("command")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Command == nil { r.EncodeNil() } else { - yym1511 := z.EncBinary() - _ = yym1511 + yym11 := z.EncBinary() + _ = yym11 if false { } else { z.F.EncSliceStringV(x.Command, false, e) @@ -20851,14 +26369,14 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[3] { + if yyq2[3] { if x.Args == nil { r.EncodeNil() } else { - yym1513 := z.EncBinary() - _ = yym1513 + yym13 := z.EncBinary() + _ = yym13 if false { } else { z.F.EncSliceStringV(x.Args, false, e) @@ -20868,15 +26386,15 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1502[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("args")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Args == nil { r.EncodeNil() } else { - yym1514 := z.EncBinary() - _ = yym1514 + yym14 := z.EncBinary() + _ = yym14 if false { } else { z.F.EncSliceStringV(x.Args, false, e) @@ -20884,11 +26402,11 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[4] { - yym1516 := z.EncBinary() - _ = yym1516 + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.WorkingDir)) @@ -20897,26 +26415,26 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1502[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("workingDir")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1517 := z.EncBinary() - _ = yym1517 + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.WorkingDir)) } } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[5] { + if yyq2[5] { if x.Ports == nil { r.EncodeNil() } else { - yym1519 := z.EncBinary() - _ = yym1519 + yym19 := z.EncBinary() + _ = yym19 if false { } else { h.encSliceContainerPort(([]ContainerPort)(x.Ports), e) @@ -20926,15 +26444,15 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1502[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ports")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Ports == nil { r.EncodeNil() } else { - yym1520 := z.EncBinary() - _ = yym1520 + yym20 := z.EncBinary() + _ = yym20 if false { } else { h.encSliceContainerPort(([]ContainerPort)(x.Ports), e) @@ -20942,14 +26460,47 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[6] { + if yyq2[6] { + if x.EnvFrom == nil { + r.EncodeNil() + } else { + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + h.encSliceEnvFromSource(([]EnvFromSource)(x.EnvFrom), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("envFrom")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.EnvFrom == nil { + r.EncodeNil() + } else { + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + h.encSliceEnvFromSource(([]EnvFromSource)(x.EnvFrom), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[7] { if x.Env == nil { r.EncodeNil() } else { - yym1522 := z.EncBinary() - _ = yym1522 + yym25 := z.EncBinary() + _ = yym25 if false { } else { h.encSliceEnvVar(([]EnvVar)(x.Env), e) @@ -20959,15 +26510,15 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1502[6] { + if yyq2[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("env")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Env == nil { r.EncodeNil() } else { - yym1523 := z.EncBinary() - _ = yym1523 + yym26 := z.EncBinary() + _ = yym26 if false { } else { h.encSliceEnvVar(([]EnvVar)(x.Env), e) @@ -20975,31 +26526,31 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[7] { - yy1525 := &x.Resources - yy1525.CodecEncodeSelf(e) + if yyq2[8] { + yy28 := &x.Resources + yy28.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1502[7] { + if yyq2[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resources")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1526 := &x.Resources - yy1526.CodecEncodeSelf(e) + yy30 := &x.Resources + yy30.CodecEncodeSelf(e) } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[8] { + if yyq2[9] { if x.VolumeMounts == nil { r.EncodeNil() } else { - yym1528 := z.EncBinary() - _ = yym1528 + yym33 := z.EncBinary() + _ = yym33 if false { } else { h.encSliceVolumeMount(([]VolumeMount)(x.VolumeMounts), e) @@ -21009,15 +26560,15 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1502[8] { + if yyq2[9] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumeMounts")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.VolumeMounts == nil { r.EncodeNil() } else { - yym1529 := z.EncBinary() - _ = yym1529 + yym34 := z.EncBinary() + _ = yym34 if false { } else { h.encSliceVolumeMount(([]VolumeMount)(x.VolumeMounts), e) @@ -21025,9 +26576,9 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[9] { + if yyq2[10] { if x.LivenessProbe == nil { r.EncodeNil() } else { @@ -21037,7 +26588,7 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1502[9] { + if yyq2[10] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("livenessProbe")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -21048,9 +26599,9 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[10] { + if yyq2[11] { if x.ReadinessProbe == nil { r.EncodeNil() } else { @@ -21060,7 +26611,7 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1502[10] { + if yyq2[11] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("readinessProbe")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -21071,9 +26622,9 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[11] { + if yyq2[12] { if x.Lifecycle == nil { r.EncodeNil() } else { @@ -21083,7 +26634,7 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1502[11] { + if yyq2[12] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lifecycle")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -21094,11 +26645,11 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[12] { - yym1534 := z.EncBinary() - _ = yym1534 + if yyq2[13] { + yym45 := z.EncBinary() + _ = yym45 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.TerminationMessagePath)) @@ -21107,30 +26658,51 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1502[12] { + if yyq2[13] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("terminationMessagePath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1535 := z.EncBinary() - _ = yym1535 + yym46 := z.EncBinary() + _ = yym46 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.TerminationMessagePath)) } } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - x.ImagePullPolicy.CodecEncodeSelf(e) + if yyq2[14] { + x.TerminationMessagePolicy.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("imagePullPolicy")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.ImagePullPolicy.CodecEncodeSelf(e) + if yyq2[14] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("terminationMessagePolicy")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.TerminationMessagePolicy.CodecEncodeSelf(e) + } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[14] { + if yyq2[15] { + x.ImagePullPolicy.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[15] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("imagePullPolicy")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.ImagePullPolicy.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[16] { if x.SecurityContext == nil { r.EncodeNil() } else { @@ -21140,7 +26712,7 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1502[14] { + if yyq2[16] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("securityContext")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -21151,11 +26723,11 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[15] { - yym1539 := z.EncBinary() - _ = yym1539 + if yyq2[17] { + yym57 := z.EncBinary() + _ = yym57 if false { } else { r.EncodeBool(bool(x.Stdin)) @@ -21164,23 +26736,23 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq1502[15] { + if yyq2[17] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdin")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1540 := z.EncBinary() - _ = yym1540 + yym58 := z.EncBinary() + _ = yym58 if false { } else { r.EncodeBool(bool(x.Stdin)) } } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[16] { - yym1542 := z.EncBinary() - _ = yym1542 + if yyq2[18] { + yym60 := z.EncBinary() + _ = yym60 if false { } else { r.EncodeBool(bool(x.StdinOnce)) @@ -21189,23 +26761,23 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq1502[16] { + if yyq2[18] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdinOnce")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1543 := z.EncBinary() - _ = yym1543 + yym61 := z.EncBinary() + _ = yym61 if false { } else { r.EncodeBool(bool(x.StdinOnce)) } } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1502[17] { - yym1545 := z.EncBinary() - _ = yym1545 + if yyq2[19] { + yym63 := z.EncBinary() + _ = yym63 if false { } else { r.EncodeBool(bool(x.TTY)) @@ -21214,19 +26786,19 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq1502[17] { + if yyq2[19] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("tty")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1546 := z.EncBinary() - _ = yym1546 + yym64 := z.EncBinary() + _ = yym64 if false { } else { r.EncodeBool(bool(x.TTY)) } } } - if yyr1502 || yy2arr1502 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -21239,25 +26811,25 @@ func (x *Container) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1547 := z.DecBinary() - _ = yym1547 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1548 := r.ContainerType() - if yyct1548 == codecSelferValueTypeMap1234 { - yyl1548 := r.ReadMapStart() - if yyl1548 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1548, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1548 == codecSelferValueTypeArray1234 { - yyl1548 := r.ReadArrayStart() - if yyl1548 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1548, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -21269,12 +26841,12 @@ func (x *Container) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1549Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1549Slc - var yyhl1549 bool = l >= 0 - for yyj1549 := 0; ; yyj1549++ { - if yyhl1549 { - if yyj1549 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -21283,93 +26855,123 @@ func (x *Container) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1549Slc = r.DecodeBytes(yys1549Slc, true, true) - yys1549 := string(yys1549Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1549 { + switch yys3 { case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "image": if r.TryDecodeAsNil() { x.Image = "" } else { - x.Image = string(r.DecodeString()) + yyv6 := &x.Image + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "command": if r.TryDecodeAsNil() { x.Command = nil } else { - yyv1552 := &x.Command - yym1553 := z.DecBinary() - _ = yym1553 + yyv8 := &x.Command + yym9 := z.DecBinary() + _ = yym9 if false { } else { - z.F.DecSliceStringX(yyv1552, false, d) + z.F.DecSliceStringX(yyv8, false, d) } } case "args": if r.TryDecodeAsNil() { x.Args = nil } else { - yyv1554 := &x.Args - yym1555 := z.DecBinary() - _ = yym1555 + yyv10 := &x.Args + yym11 := z.DecBinary() + _ = yym11 if false { } else { - z.F.DecSliceStringX(yyv1554, false, d) + z.F.DecSliceStringX(yyv10, false, d) } } case "workingDir": if r.TryDecodeAsNil() { x.WorkingDir = "" } else { - x.WorkingDir = string(r.DecodeString()) + yyv12 := &x.WorkingDir + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } case "ports": if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv1557 := &x.Ports - yym1558 := z.DecBinary() - _ = yym1558 + yyv14 := &x.Ports + yym15 := z.DecBinary() + _ = yym15 if false { } else { - h.decSliceContainerPort((*[]ContainerPort)(yyv1557), d) + h.decSliceContainerPort((*[]ContainerPort)(yyv14), d) + } + } + case "envFrom": + if r.TryDecodeAsNil() { + x.EnvFrom = nil + } else { + yyv16 := &x.EnvFrom + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + h.decSliceEnvFromSource((*[]EnvFromSource)(yyv16), d) } } case "env": if r.TryDecodeAsNil() { x.Env = nil } else { - yyv1559 := &x.Env - yym1560 := z.DecBinary() - _ = yym1560 + yyv18 := &x.Env + yym19 := z.DecBinary() + _ = yym19 if false { } else { - h.decSliceEnvVar((*[]EnvVar)(yyv1559), d) + h.decSliceEnvVar((*[]EnvVar)(yyv18), d) } } case "resources": if r.TryDecodeAsNil() { x.Resources = ResourceRequirements{} } else { - yyv1561 := &x.Resources - yyv1561.CodecDecodeSelf(d) + yyv20 := &x.Resources + yyv20.CodecDecodeSelf(d) } case "volumeMounts": if r.TryDecodeAsNil() { x.VolumeMounts = nil } else { - yyv1562 := &x.VolumeMounts - yym1563 := z.DecBinary() - _ = yym1563 + yyv21 := &x.VolumeMounts + yym22 := z.DecBinary() + _ = yym22 if false { } else { - h.decSliceVolumeMount((*[]VolumeMount)(yyv1562), d) + h.decSliceVolumeMount((*[]VolumeMount)(yyv21), d) } } case "livenessProbe": @@ -21409,13 +27011,27 @@ func (x *Container) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.TerminationMessagePath = "" } else { - x.TerminationMessagePath = string(r.DecodeString()) + yyv26 := &x.TerminationMessagePath + yym27 := z.DecBinary() + _ = yym27 + if false { + } else { + *((*string)(yyv26)) = r.DecodeString() + } + } + case "terminationMessagePolicy": + if r.TryDecodeAsNil() { + x.TerminationMessagePolicy = "" + } else { + yyv28 := &x.TerminationMessagePolicy + yyv28.CodecDecodeSelf(d) } case "imagePullPolicy": if r.TryDecodeAsNil() { x.ImagePullPolicy = "" } else { - x.ImagePullPolicy = PullPolicy(r.DecodeString()) + yyv29 := &x.ImagePullPolicy + yyv29.CodecDecodeSelf(d) } case "securityContext": if r.TryDecodeAsNil() { @@ -21432,24 +27048,42 @@ func (x *Container) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Stdin = false } else { - x.Stdin = bool(r.DecodeBool()) + yyv31 := &x.Stdin + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + *((*bool)(yyv31)) = r.DecodeBool() + } } case "stdinOnce": if r.TryDecodeAsNil() { x.StdinOnce = false } else { - x.StdinOnce = bool(r.DecodeBool()) + yyv33 := &x.StdinOnce + yym34 := z.DecBinary() + _ = yym34 + if false { + } else { + *((*bool)(yyv33)) = r.DecodeBool() + } } case "tty": if r.TryDecodeAsNil() { x.TTY = false } else { - x.TTY = bool(r.DecodeBool()) + yyv35 := &x.TTY + yym36 := z.DecBinary() + _ = yym36 + if false { + } else { + *((*bool)(yyv35)) = r.DecodeBool() + } } default: - z.DecStructFieldNotFound(-1, yys1549) - } // end switch yys1549 - } // end for yyj1549 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -21457,16 +27091,16 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1573 int - var yyb1573 bool - var yyhl1573 bool = l >= 0 - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + var yyj37 int + var yyb37 bool + var yyhl37 bool = l >= 0 + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21474,15 +27108,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv38 := &x.Name + yym39 := z.DecBinary() + _ = yym39 + if false { + } else { + *((*string)(yyv38)) = r.DecodeString() + } } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21490,15 +27130,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Image = "" } else { - x.Image = string(r.DecodeString()) + yyv40 := &x.Image + yym41 := z.DecBinary() + _ = yym41 + if false { + } else { + *((*string)(yyv40)) = r.DecodeString() + } } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21506,21 +27152,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Command = nil } else { - yyv1576 := &x.Command - yym1577 := z.DecBinary() - _ = yym1577 + yyv42 := &x.Command + yym43 := z.DecBinary() + _ = yym43 if false { } else { - z.F.DecSliceStringX(yyv1576, false, d) + z.F.DecSliceStringX(yyv42, false, d) } } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21528,21 +27174,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Args = nil } else { - yyv1578 := &x.Args - yym1579 := z.DecBinary() - _ = yym1579 + yyv44 := &x.Args + yym45 := z.DecBinary() + _ = yym45 if false { } else { - z.F.DecSliceStringX(yyv1578, false, d) + z.F.DecSliceStringX(yyv44, false, d) } } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21550,15 +27196,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.WorkingDir = "" } else { - x.WorkingDir = string(r.DecodeString()) + yyv46 := &x.WorkingDir + yym47 := z.DecBinary() + _ = yym47 + if false { + } else { + *((*string)(yyv46)) = r.DecodeString() + } } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21566,21 +27218,43 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv1581 := &x.Ports - yym1582 := z.DecBinary() - _ = yym1582 + yyv48 := &x.Ports + yym49 := z.DecBinary() + _ = yym49 if false { } else { - h.decSliceContainerPort((*[]ContainerPort)(yyv1581), d) + h.decSliceContainerPort((*[]ContainerPort)(yyv48), d) } } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.EnvFrom = nil + } else { + yyv50 := &x.EnvFrom + yym51 := z.DecBinary() + _ = yym51 + if false { + } else { + h.decSliceEnvFromSource((*[]EnvFromSource)(yyv50), d) + } + } + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l + } else { + yyb37 = r.CheckBreak() + } + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21588,21 +27262,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Env = nil } else { - yyv1583 := &x.Env - yym1584 := z.DecBinary() - _ = yym1584 + yyv52 := &x.Env + yym53 := z.DecBinary() + _ = yym53 if false { } else { - h.decSliceEnvVar((*[]EnvVar)(yyv1583), d) + h.decSliceEnvVar((*[]EnvVar)(yyv52), d) } } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21610,16 +27284,16 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Resources = ResourceRequirements{} } else { - yyv1585 := &x.Resources - yyv1585.CodecDecodeSelf(d) + yyv54 := &x.Resources + yyv54.CodecDecodeSelf(d) } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21627,21 +27301,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.VolumeMounts = nil } else { - yyv1586 := &x.VolumeMounts - yym1587 := z.DecBinary() - _ = yym1587 + yyv55 := &x.VolumeMounts + yym56 := z.DecBinary() + _ = yym56 if false { } else { - h.decSliceVolumeMount((*[]VolumeMount)(yyv1586), d) + h.decSliceVolumeMount((*[]VolumeMount)(yyv55), d) } } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21656,13 +27330,13 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.LivenessProbe.CodecDecodeSelf(d) } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21677,13 +27351,13 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.ReadinessProbe.CodecDecodeSelf(d) } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21698,13 +27372,13 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Lifecycle.CodecDecodeSelf(d) } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21712,15 +27386,38 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.TerminationMessagePath = "" } else { - x.TerminationMessagePath = string(r.DecodeString()) + yyv60 := &x.TerminationMessagePath + yym61 := z.DecBinary() + _ = yym61 + if false { + } else { + *((*string)(yyv60)) = r.DecodeString() + } } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TerminationMessagePolicy = "" + } else { + yyv62 := &x.TerminationMessagePolicy + yyv62.CodecDecodeSelf(d) + } + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l + } else { + yyb37 = r.CheckBreak() + } + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21728,15 +27425,16 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullPolicy = "" } else { - x.ImagePullPolicy = PullPolicy(r.DecodeString()) + yyv63 := &x.ImagePullPolicy + yyv63.CodecDecodeSelf(d) } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21751,13 +27449,13 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.SecurityContext.CodecDecodeSelf(d) } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21765,15 +27463,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Stdin = false } else { - x.Stdin = bool(r.DecodeBool()) + yyv65 := &x.Stdin + yym66 := z.DecBinary() + _ = yym66 + if false { + } else { + *((*bool)(yyv65)) = r.DecodeBool() + } } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21781,15 +27485,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.StdinOnce = false } else { - x.StdinOnce = bool(r.DecodeBool()) + yyv67 := &x.StdinOnce + yym68 := z.DecBinary() + _ = yym68 + if false { + } else { + *((*bool)(yyv67)) = r.DecodeBool() + } } - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -21797,20 +27507,26 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.TTY = false } else { - x.TTY = bool(r.DecodeBool()) + yyv69 := &x.TTY + yym70 := z.DecBinary() + _ = yym70 + if false { + } else { + *((*bool)(yyv69)) = r.DecodeBool() + } } for { - yyj1573++ - if yyhl1573 { - yyb1573 = yyj1573 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb1573 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb1573 { + if yyb37 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1573-1, "") + z.DecStructFieldNotFound(yyj37-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -21822,35 +27538,35 @@ func (x *Handler) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1597 := z.EncBinary() - _ = yym1597 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1598 := !z.EncBinary() - yy2arr1598 := z.EncBasicHandle().StructToArray - var yyq1598 [3]bool - _, _, _ = yysep1598, yyq1598, yy2arr1598 - const yyr1598 bool = false - yyq1598[0] = x.Exec != nil - yyq1598[1] = x.HTTPGet != nil - yyq1598[2] = x.TCPSocket != nil - var yynn1598 int - if yyr1598 || yy2arr1598 { + 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 { - yynn1598 = 0 - for _, b := range yyq1598 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1598++ + yynn2++ } } - r.EncodeMapStart(yynn1598) - yynn1598 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1598 || yy2arr1598 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1598[0] { + if yyq2[0] { if x.Exec == nil { r.EncodeNil() } else { @@ -21860,7 +27576,7 @@ func (x *Handler) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1598[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("exec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -21871,9 +27587,9 @@ func (x *Handler) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1598 || yy2arr1598 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1598[1] { + if yyq2[1] { if x.HTTPGet == nil { r.EncodeNil() } else { @@ -21883,7 +27599,7 @@ func (x *Handler) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1598[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("httpGet")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -21894,9 +27610,9 @@ func (x *Handler) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1598 || yy2arr1598 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1598[2] { + if yyq2[2] { if x.TCPSocket == nil { r.EncodeNil() } else { @@ -21906,7 +27622,7 @@ func (x *Handler) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1598[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("tcpSocket")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -21917,7 +27633,7 @@ func (x *Handler) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1598 || yy2arr1598 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -21930,25 +27646,25 @@ func (x *Handler) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1602 := z.DecBinary() - _ = yym1602 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1603 := r.ContainerType() - if yyct1603 == codecSelferValueTypeMap1234 { - yyl1603 := r.ReadMapStart() - if yyl1603 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1603, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1603 == codecSelferValueTypeArray1234 { - yyl1603 := r.ReadArrayStart() - if yyl1603 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1603, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -21960,12 +27676,12 @@ func (x *Handler) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1604Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1604Slc - var yyhl1604 bool = l >= 0 - for yyj1604 := 0; ; yyj1604++ { - if yyhl1604 { - if yyj1604 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -21974,10 +27690,10 @@ func (x *Handler) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1604Slc = r.DecodeBytes(yys1604Slc, true, true) - yys1604 := string(yys1604Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1604 { + switch yys3 { case "exec": if r.TryDecodeAsNil() { if x.Exec != nil { @@ -22012,9 +27728,9 @@ func (x *Handler) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.TCPSocket.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1604) - } // end switch yys1604 - } // end for yyj1604 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -22022,16 +27738,16 @@ func (x *Handler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1608 int - var yyb1608 bool - var yyhl1608 bool = l >= 0 - yyj1608++ - if yyhl1608 { - yyb1608 = yyj1608 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1608 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1608 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22046,13 +27762,13 @@ func (x *Handler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Exec.CodecDecodeSelf(d) } - yyj1608++ - if yyhl1608 { - yyb1608 = yyj1608 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1608 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1608 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22067,13 +27783,13 @@ func (x *Handler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.HTTPGet.CodecDecodeSelf(d) } - yyj1608++ - if yyhl1608 { - yyb1608 = yyj1608 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1608 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1608 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22089,17 +27805,17 @@ func (x *Handler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.TCPSocket.CodecDecodeSelf(d) } for { - yyj1608++ - if yyhl1608 { - yyb1608 = yyj1608 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1608 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1608 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1608-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -22111,34 +27827,34 @@ func (x *Lifecycle) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1612 := z.EncBinary() - _ = yym1612 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1613 := !z.EncBinary() - yy2arr1613 := z.EncBasicHandle().StructToArray - var yyq1613 [2]bool - _, _, _ = yysep1613, yyq1613, yy2arr1613 - const yyr1613 bool = false - yyq1613[0] = x.PostStart != nil - yyq1613[1] = x.PreStop != nil - var yynn1613 int - if yyr1613 || yy2arr1613 { + 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 { - yynn1613 = 0 - for _, b := range yyq1613 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1613++ + yynn2++ } } - r.EncodeMapStart(yynn1613) - yynn1613 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1613 || yy2arr1613 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1613[0] { + if yyq2[0] { if x.PostStart == nil { r.EncodeNil() } else { @@ -22148,7 +27864,7 @@ func (x *Lifecycle) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1613[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("postStart")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -22159,9 +27875,9 @@ func (x *Lifecycle) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1613 || yy2arr1613 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1613[1] { + if yyq2[1] { if x.PreStop == nil { r.EncodeNil() } else { @@ -22171,7 +27887,7 @@ func (x *Lifecycle) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1613[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("preStop")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -22182,7 +27898,7 @@ func (x *Lifecycle) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1613 || yy2arr1613 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -22195,25 +27911,25 @@ func (x *Lifecycle) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1616 := z.DecBinary() - _ = yym1616 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1617 := r.ContainerType() - if yyct1617 == codecSelferValueTypeMap1234 { - yyl1617 := r.ReadMapStart() - if yyl1617 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1617, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1617 == codecSelferValueTypeArray1234 { - yyl1617 := r.ReadArrayStart() - if yyl1617 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1617, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -22225,12 +27941,12 @@ func (x *Lifecycle) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1618Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1618Slc - var yyhl1618 bool = l >= 0 - for yyj1618 := 0; ; yyj1618++ { - if yyhl1618 { - if yyj1618 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -22239,10 +27955,10 @@ func (x *Lifecycle) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1618Slc = r.DecodeBytes(yys1618Slc, true, true) - yys1618 := string(yys1618Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1618 { + switch yys3 { case "postStart": if r.TryDecodeAsNil() { if x.PostStart != nil { @@ -22266,9 +27982,9 @@ func (x *Lifecycle) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.PreStop.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1618) - } // end switch yys1618 - } // end for yyj1618 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -22276,16 +27992,16 @@ func (x *Lifecycle) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1621 int - var yyb1621 bool - var yyhl1621 bool = l >= 0 - yyj1621++ - if yyhl1621 { - yyb1621 = yyj1621 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1621 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1621 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22300,13 +28016,13 @@ func (x *Lifecycle) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.PostStart.CodecDecodeSelf(d) } - yyj1621++ - if yyhl1621 { - yyb1621 = yyj1621 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1621 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1621 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22322,17 +28038,17 @@ func (x *Lifecycle) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.PreStop.CodecDecodeSelf(d) } for { - yyj1621++ - if yyhl1621 { - yyb1621 = yyj1621 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1621 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1621 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1621-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -22341,8 +28057,8 @@ func (x ConditionStatus) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1624 := z.EncBinary() - _ = yym1624 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -22354,8 +28070,8 @@ func (x *ConditionStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1625 := z.DecBinary() - _ = yym1625 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -22370,36 +28086,36 @@ func (x *ContainerStateWaiting) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1626 := z.EncBinary() - _ = yym1626 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1627 := !z.EncBinary() - yy2arr1627 := z.EncBasicHandle().StructToArray - var yyq1627 [2]bool - _, _, _ = yysep1627, yyq1627, yy2arr1627 - const yyr1627 bool = false - yyq1627[0] = x.Reason != "" - yyq1627[1] = x.Message != "" - var yynn1627 int - if yyr1627 || yy2arr1627 { + 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 { - yynn1627 = 0 - for _, b := range yyq1627 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1627++ + yynn2++ } } - r.EncodeMapStart(yynn1627) - yynn1627 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1627 || yy2arr1627 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1627[0] { - yym1629 := z.EncBinary() - _ = yym1629 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -22408,23 +28124,23 @@ func (x *ContainerStateWaiting) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1627[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1630 := z.EncBinary() - _ = yym1630 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr1627 || yy2arr1627 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1627[1] { - yym1632 := z.EncBinary() - _ = yym1632 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -22433,19 +28149,19 @@ func (x *ContainerStateWaiting) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1627[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1633 := z.EncBinary() - _ = yym1633 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr1627 || yy2arr1627 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -22458,25 +28174,25 @@ func (x *ContainerStateWaiting) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1634 := z.DecBinary() - _ = yym1634 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1635 := r.ContainerType() - if yyct1635 == codecSelferValueTypeMap1234 { - yyl1635 := r.ReadMapStart() - if yyl1635 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1635, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1635 == codecSelferValueTypeArray1234 { - yyl1635 := r.ReadArrayStart() - if yyl1635 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1635, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -22488,12 +28204,12 @@ func (x *ContainerStateWaiting) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1636Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1636Slc - var yyhl1636 bool = l >= 0 - for yyj1636 := 0; ; yyj1636++ { - if yyhl1636 { - if yyj1636 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -22502,26 +28218,38 @@ func (x *ContainerStateWaiting) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1636Slc = r.DecodeBytes(yys1636Slc, true, true) - yys1636 := string(yys1636Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1636 { + switch yys3 { case "reason": if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv4 := &x.Reason + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "message": if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv6 := &x.Message + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys1636) - } // end switch yys1636 - } // end for yyj1636 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -22529,16 +28257,16 @@ func (x *ContainerStateWaiting) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1639 int - var yyb1639 bool - var yyhl1639 bool = l >= 0 - yyj1639++ - if yyhl1639 { - yyb1639 = yyj1639 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1639 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1639 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22546,15 +28274,21 @@ func (x *ContainerStateWaiting) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv9 := &x.Reason + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } } - yyj1639++ - if yyhl1639 { - yyb1639 = yyj1639 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1639 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1639 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -22562,20 +28296,26 @@ func (x *ContainerStateWaiting) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv11 := &x.Message + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } for { - yyj1639++ - if yyhl1639 { - yyb1639 = yyj1639 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1639 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1639 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1639-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -22587,68 +28327,68 @@ func (x *ContainerStateRunning) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1642 := z.EncBinary() - _ = yym1642 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1643 := !z.EncBinary() - yy2arr1643 := z.EncBasicHandle().StructToArray - var yyq1643 [1]bool - _, _, _ = yysep1643, yyq1643, yy2arr1643 - const yyr1643 bool = false - yyq1643[0] = true - var yynn1643 int - if yyr1643 || yy2arr1643 { + 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 { - yynn1643 = 0 - for _, b := range yyq1643 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1643++ + yynn2++ } } - r.EncodeMapStart(yynn1643) - yynn1643 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1643 || yy2arr1643 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1643[0] { - yy1645 := &x.StartedAt - yym1646 := z.EncBinary() - _ = yym1646 + if yyq2[0] { + yy4 := &x.StartedAt + yym5 := z.EncBinary() + _ = yym5 if false { - } else if z.HasExtensions() && z.EncExt(yy1645) { - } else if yym1646 { - z.EncBinaryMarshal(yy1645) - } else if !yym1646 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1645) + } else if z.HasExtensions() && z.EncExt(yy4) { + } else if yym5 { + z.EncBinaryMarshal(yy4) + } else if !yym5 && z.IsJSONHandle() { + z.EncJSONMarshal(yy4) } else { - z.EncFallback(yy1645) + z.EncFallback(yy4) } } else { r.EncodeNil() } } else { - if yyq1643[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("startedAt")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1647 := &x.StartedAt - yym1648 := z.EncBinary() - _ = yym1648 + yy6 := &x.StartedAt + yym7 := z.EncBinary() + _ = yym7 if false { - } else if z.HasExtensions() && z.EncExt(yy1647) { - } else if yym1648 { - z.EncBinaryMarshal(yy1647) - } else if !yym1648 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1647) + } else if z.HasExtensions() && z.EncExt(yy6) { + } else if yym7 { + z.EncBinaryMarshal(yy6) + } else if !yym7 && z.IsJSONHandle() { + z.EncJSONMarshal(yy6) } else { - z.EncFallback(yy1647) + z.EncFallback(yy6) } } } - if yyr1643 || yy2arr1643 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -22661,25 +28401,25 @@ func (x *ContainerStateRunning) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1649 := z.DecBinary() - _ = yym1649 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1650 := r.ContainerType() - if yyct1650 == codecSelferValueTypeMap1234 { - yyl1650 := r.ReadMapStart() - if yyl1650 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1650, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1650 == codecSelferValueTypeArray1234 { - yyl1650 := r.ReadArrayStart() - if yyl1650 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1650, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -22691,12 +28431,12 @@ func (x *ContainerStateRunning) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1651Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1651Slc - var yyhl1651 bool = l >= 0 - for yyj1651 := 0; ; yyj1651++ { - if yyhl1651 { - if yyj1651 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -22705,31 +28445,31 @@ func (x *ContainerStateRunning) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1651Slc = r.DecodeBytes(yys1651Slc, true, true) - yys1651 := string(yys1651Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1651 { + switch yys3 { case "startedAt": if r.TryDecodeAsNil() { - x.StartedAt = pkg2_unversioned.Time{} + x.StartedAt = pkg2_v1.Time{} } else { - yyv1652 := &x.StartedAt - yym1653 := z.DecBinary() - _ = yym1653 + yyv4 := &x.StartedAt + yym5 := z.DecBinary() + _ = yym5 if false { - } else if z.HasExtensions() && z.DecExt(yyv1652) { - } else if yym1653 { - z.DecBinaryUnmarshal(yyv1652) - } else if !yym1653 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1652) + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else if yym5 { + z.DecBinaryUnmarshal(yyv4) + } else if !yym5 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4) } else { - z.DecFallback(yyv1652, false) + z.DecFallback(yyv4, false) } } default: - z.DecStructFieldNotFound(-1, yys1651) - } // end switch yys1651 - } // end for yyj1651 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -22737,48 +28477,48 @@ func (x *ContainerStateRunning) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1654 int - var yyb1654 bool - var yyhl1654 bool = l >= 0 - yyj1654++ - if yyhl1654 { - yyb1654 = yyj1654 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1654 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1654 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.StartedAt = pkg2_unversioned.Time{} + x.StartedAt = pkg2_v1.Time{} } else { - yyv1655 := &x.StartedAt - yym1656 := z.DecBinary() - _ = yym1656 + yyv7 := &x.StartedAt + yym8 := z.DecBinary() + _ = yym8 if false { - } else if z.HasExtensions() && z.DecExt(yyv1655) { - } else if yym1656 { - z.DecBinaryUnmarshal(yyv1655) - } else if !yym1656 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1655) + } else if z.HasExtensions() && z.DecExt(yyv7) { + } else if yym8 { + z.DecBinaryUnmarshal(yyv7) + } else if !yym8 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv7) } else { - z.DecFallback(yyv1655, false) + z.DecFallback(yyv7, false) } } for { - yyj1654++ - if yyhl1654 { - yyb1654 = yyj1654 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1654 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1654 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1654-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -22790,39 +28530,39 @@ func (x *ContainerStateTerminated) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1657 := z.EncBinary() - _ = yym1657 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1658 := !z.EncBinary() - yy2arr1658 := z.EncBasicHandle().StructToArray - var yyq1658 [7]bool - _, _, _ = yysep1658, yyq1658, yy2arr1658 - const yyr1658 bool = false - yyq1658[1] = x.Signal != 0 - yyq1658[2] = x.Reason != "" - yyq1658[3] = x.Message != "" - yyq1658[4] = true - yyq1658[5] = true - yyq1658[6] = x.ContainerID != "" - var yynn1658 int - if yyr1658 || yy2arr1658 { + 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 { - yynn1658 = 1 - for _, b := range yyq1658 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1658++ + yynn2++ } } - r.EncodeMapStart(yynn1658) - yynn1658 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1658 || yy2arr1658 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1660 := z.EncBinary() - _ = yym1660 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeInt(int64(x.ExitCode)) @@ -22831,18 +28571,18 @@ func (x *ContainerStateTerminated) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("exitCode")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1661 := z.EncBinary() - _ = yym1661 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeInt(int64(x.ExitCode)) } } - if yyr1658 || yy2arr1658 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1658[1] { - yym1663 := z.EncBinary() - _ = yym1663 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeInt(int64(x.Signal)) @@ -22851,23 +28591,23 @@ func (x *ContainerStateTerminated) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq1658[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("signal")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1664 := z.EncBinary() - _ = yym1664 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeInt(int64(x.Signal)) } } } - if yyr1658 || yy2arr1658 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1658[2] { - yym1666 := z.EncBinary() - _ = yym1666 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -22876,23 +28616,23 @@ func (x *ContainerStateTerminated) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1658[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1667 := z.EncBinary() - _ = yym1667 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr1658 || yy2arr1658 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1658[3] { - yym1669 := z.EncBinary() - _ = yym1669 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -22901,97 +28641,97 @@ func (x *ContainerStateTerminated) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1658[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1670 := z.EncBinary() - _ = yym1670 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr1658 || yy2arr1658 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1658[4] { - yy1672 := &x.StartedAt - yym1673 := z.EncBinary() - _ = yym1673 + if yyq2[4] { + yy16 := &x.StartedAt + yym17 := z.EncBinary() + _ = yym17 if false { - } else if z.HasExtensions() && z.EncExt(yy1672) { - } else if yym1673 { - z.EncBinaryMarshal(yy1672) - } else if !yym1673 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1672) + } else if z.HasExtensions() && z.EncExt(yy16) { + } else if yym17 { + z.EncBinaryMarshal(yy16) + } else if !yym17 && z.IsJSONHandle() { + z.EncJSONMarshal(yy16) } else { - z.EncFallback(yy1672) + z.EncFallback(yy16) } } else { r.EncodeNil() } } else { - if yyq1658[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("startedAt")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1674 := &x.StartedAt - yym1675 := z.EncBinary() - _ = yym1675 + yy18 := &x.StartedAt + yym19 := z.EncBinary() + _ = yym19 if false { - } else if z.HasExtensions() && z.EncExt(yy1674) { - } else if yym1675 { - z.EncBinaryMarshal(yy1674) - } else if !yym1675 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1674) + } else if z.HasExtensions() && z.EncExt(yy18) { + } else if yym19 { + z.EncBinaryMarshal(yy18) + } else if !yym19 && z.IsJSONHandle() { + z.EncJSONMarshal(yy18) } else { - z.EncFallback(yy1674) + z.EncFallback(yy18) } } } - if yyr1658 || yy2arr1658 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1658[5] { - yy1677 := &x.FinishedAt - yym1678 := z.EncBinary() - _ = yym1678 + if yyq2[5] { + yy21 := &x.FinishedAt + yym22 := z.EncBinary() + _ = yym22 if false { - } else if z.HasExtensions() && z.EncExt(yy1677) { - } else if yym1678 { - z.EncBinaryMarshal(yy1677) - } else if !yym1678 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1677) + } else if z.HasExtensions() && z.EncExt(yy21) { + } else if yym22 { + z.EncBinaryMarshal(yy21) + } else if !yym22 && z.IsJSONHandle() { + z.EncJSONMarshal(yy21) } else { - z.EncFallback(yy1677) + z.EncFallback(yy21) } } else { r.EncodeNil() } } else { - if yyq1658[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("finishedAt")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1679 := &x.FinishedAt - yym1680 := z.EncBinary() - _ = yym1680 + yy23 := &x.FinishedAt + yym24 := z.EncBinary() + _ = yym24 if false { - } else if z.HasExtensions() && z.EncExt(yy1679) { - } else if yym1680 { - z.EncBinaryMarshal(yy1679) - } else if !yym1680 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1679) + } else if z.HasExtensions() && z.EncExt(yy23) { + } else if yym24 { + z.EncBinaryMarshal(yy23) + } else if !yym24 && z.IsJSONHandle() { + z.EncJSONMarshal(yy23) } else { - z.EncFallback(yy1679) + z.EncFallback(yy23) } } } - if yyr1658 || yy2arr1658 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1658[6] { - yym1682 := z.EncBinary() - _ = yym1682 + if yyq2[6] { + yym26 := z.EncBinary() + _ = yym26 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerID)) @@ -23000,19 +28740,19 @@ func (x *ContainerStateTerminated) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1658[6] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1683 := z.EncBinary() - _ = yym1683 + yym27 := z.EncBinary() + _ = yym27 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerID)) } } } - if yyr1658 || yy2arr1658 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -23025,25 +28765,25 @@ func (x *ContainerStateTerminated) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1684 := z.DecBinary() - _ = yym1684 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1685 := r.ContainerType() - if yyct1685 == codecSelferValueTypeMap1234 { - yyl1685 := r.ReadMapStart() - if yyl1685 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1685, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1685 == codecSelferValueTypeArray1234 { - yyl1685 := r.ReadArrayStart() - if yyl1685 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1685, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -23055,12 +28795,12 @@ func (x *ContainerStateTerminated) codecDecodeSelfFromMap(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1686Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1686Slc - var yyhl1686 bool = l >= 0 - for yyj1686 := 0; ; yyj1686++ { - if yyhl1686 { - if yyj1686 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -23069,78 +28809,108 @@ func (x *ContainerStateTerminated) codecDecodeSelfFromMap(l int, d *codec1978.De } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1686Slc = r.DecodeBytes(yys1686Slc, true, true) - yys1686 := string(yys1686Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1686 { + switch yys3 { case "exitCode": if r.TryDecodeAsNil() { x.ExitCode = 0 } else { - x.ExitCode = int32(r.DecodeInt(32)) + yyv4 := &x.ExitCode + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } } case "signal": if r.TryDecodeAsNil() { x.Signal = 0 } else { - x.Signal = int32(r.DecodeInt(32)) + yyv6 := &x.Signal + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(yyv6)) = int32(r.DecodeInt(32)) + } } case "reason": if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv8 := &x.Reason + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } case "message": if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv10 := &x.Message + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } case "startedAt": if r.TryDecodeAsNil() { - x.StartedAt = pkg2_unversioned.Time{} + x.StartedAt = pkg2_v1.Time{} } else { - yyv1691 := &x.StartedAt - yym1692 := z.DecBinary() - _ = yym1692 + yyv12 := &x.StartedAt + yym13 := z.DecBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.DecExt(yyv1691) { - } else if yym1692 { - z.DecBinaryUnmarshal(yyv1691) - } else if !yym1692 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1691) + } else if z.HasExtensions() && z.DecExt(yyv12) { + } else if yym13 { + z.DecBinaryUnmarshal(yyv12) + } else if !yym13 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv12) } else { - z.DecFallback(yyv1691, false) + z.DecFallback(yyv12, false) } } case "finishedAt": if r.TryDecodeAsNil() { - x.FinishedAt = pkg2_unversioned.Time{} + x.FinishedAt = pkg2_v1.Time{} } else { - yyv1693 := &x.FinishedAt - yym1694 := z.DecBinary() - _ = yym1694 + yyv14 := &x.FinishedAt + yym15 := z.DecBinary() + _ = yym15 if false { - } else if z.HasExtensions() && z.DecExt(yyv1693) { - } else if yym1694 { - z.DecBinaryUnmarshal(yyv1693) - } else if !yym1694 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1693) + } else if z.HasExtensions() && z.DecExt(yyv14) { + } else if yym15 { + z.DecBinaryUnmarshal(yyv14) + } else if !yym15 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv14) } else { - z.DecFallback(yyv1693, false) + z.DecFallback(yyv14, false) } } case "containerID": if r.TryDecodeAsNil() { x.ContainerID = "" } else { - x.ContainerID = string(r.DecodeString()) + yyv16 := &x.ContainerID + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys1686) - } // end switch yys1686 - } // end for yyj1686 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -23148,16 +28918,16 @@ func (x *ContainerStateTerminated) codecDecodeSelfFromArray(l int, d *codec1978. var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1696 int - var yyb1696 bool - var yyhl1696 bool = l >= 0 - yyj1696++ - if yyhl1696 { - yyb1696 = yyj1696 > l + var yyj18 int + var yyb18 bool + var yyhl18 bool = l >= 0 + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1696 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1696 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23165,15 +28935,21 @@ func (x *ContainerStateTerminated) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.ExitCode = 0 } else { - x.ExitCode = int32(r.DecodeInt(32)) + yyv19 := &x.ExitCode + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*int32)(yyv19)) = int32(r.DecodeInt(32)) + } } - yyj1696++ - if yyhl1696 { - yyb1696 = yyj1696 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1696 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1696 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23181,15 +28957,21 @@ func (x *ContainerStateTerminated) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Signal = 0 } else { - x.Signal = int32(r.DecodeInt(32)) + yyv21 := &x.Signal + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*int32)(yyv21)) = int32(r.DecodeInt(32)) + } } - yyj1696++ - if yyhl1696 { - yyb1696 = yyj1696 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1696 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1696 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23197,15 +28979,21 @@ func (x *ContainerStateTerminated) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv23 := &x.Reason + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*string)(yyv23)) = r.DecodeString() + } } - yyj1696++ - if yyhl1696 { - yyb1696 = yyj1696 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1696 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1696 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23213,69 +29001,75 @@ func (x *ContainerStateTerminated) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv25 := &x.Message + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*string)(yyv25)) = r.DecodeString() + } } - yyj1696++ - if yyhl1696 { - yyb1696 = yyj1696 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1696 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1696 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.StartedAt = pkg2_unversioned.Time{} + x.StartedAt = pkg2_v1.Time{} } else { - yyv1701 := &x.StartedAt - yym1702 := z.DecBinary() - _ = yym1702 + yyv27 := &x.StartedAt + yym28 := z.DecBinary() + _ = yym28 if false { - } else if z.HasExtensions() && z.DecExt(yyv1701) { - } else if yym1702 { - z.DecBinaryUnmarshal(yyv1701) - } else if !yym1702 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1701) + } else if z.HasExtensions() && z.DecExt(yyv27) { + } else if yym28 { + z.DecBinaryUnmarshal(yyv27) + } else if !yym28 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv27) } else { - z.DecFallback(yyv1701, false) + z.DecFallback(yyv27, false) } } - yyj1696++ - if yyhl1696 { - yyb1696 = yyj1696 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1696 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1696 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.FinishedAt = pkg2_unversioned.Time{} + x.FinishedAt = pkg2_v1.Time{} } else { - yyv1703 := &x.FinishedAt - yym1704 := z.DecBinary() - _ = yym1704 + yyv29 := &x.FinishedAt + yym30 := z.DecBinary() + _ = yym30 if false { - } else if z.HasExtensions() && z.DecExt(yyv1703) { - } else if yym1704 { - z.DecBinaryUnmarshal(yyv1703) - } else if !yym1704 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1703) + } else if z.HasExtensions() && z.DecExt(yyv29) { + } else if yym30 { + z.DecBinaryUnmarshal(yyv29) + } else if !yym30 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv29) } else { - z.DecFallback(yyv1703, false) + z.DecFallback(yyv29, false) } } - yyj1696++ - if yyhl1696 { - yyb1696 = yyj1696 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1696 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1696 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23283,20 +29077,26 @@ func (x *ContainerStateTerminated) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.ContainerID = "" } else { - x.ContainerID = string(r.DecodeString()) + yyv31 := &x.ContainerID + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + *((*string)(yyv31)) = r.DecodeString() + } } for { - yyj1696++ - if yyhl1696 { - yyb1696 = yyj1696 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1696 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1696 { + if yyb18 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1696-1, "") + z.DecStructFieldNotFound(yyj18-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -23308,35 +29108,35 @@ func (x *ContainerState) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1706 := z.EncBinary() - _ = yym1706 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1707 := !z.EncBinary() - yy2arr1707 := z.EncBasicHandle().StructToArray - var yyq1707 [3]bool - _, _, _ = yysep1707, yyq1707, yy2arr1707 - const yyr1707 bool = false - yyq1707[0] = x.Waiting != nil - yyq1707[1] = x.Running != nil - yyq1707[2] = x.Terminated != nil - var yynn1707 int - if yyr1707 || yy2arr1707 { + 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 { - yynn1707 = 0 - for _, b := range yyq1707 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1707++ + yynn2++ } } - r.EncodeMapStart(yynn1707) - yynn1707 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1707 || yy2arr1707 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1707[0] { + if yyq2[0] { if x.Waiting == nil { r.EncodeNil() } else { @@ -23346,7 +29146,7 @@ func (x *ContainerState) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1707[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("waiting")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -23357,9 +29157,9 @@ func (x *ContainerState) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1707 || yy2arr1707 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1707[1] { + if yyq2[1] { if x.Running == nil { r.EncodeNil() } else { @@ -23369,7 +29169,7 @@ func (x *ContainerState) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1707[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("running")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -23380,9 +29180,9 @@ func (x *ContainerState) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1707 || yy2arr1707 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1707[2] { + if yyq2[2] { if x.Terminated == nil { r.EncodeNil() } else { @@ -23392,7 +29192,7 @@ func (x *ContainerState) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1707[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("terminated")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -23403,7 +29203,7 @@ func (x *ContainerState) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1707 || yy2arr1707 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -23416,25 +29216,25 @@ func (x *ContainerState) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1711 := z.DecBinary() - _ = yym1711 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1712 := r.ContainerType() - if yyct1712 == codecSelferValueTypeMap1234 { - yyl1712 := r.ReadMapStart() - if yyl1712 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1712, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1712 == codecSelferValueTypeArray1234 { - yyl1712 := r.ReadArrayStart() - if yyl1712 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1712, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -23446,12 +29246,12 @@ func (x *ContainerState) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1713Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1713Slc - var yyhl1713 bool = l >= 0 - for yyj1713 := 0; ; yyj1713++ { - if yyhl1713 { - if yyj1713 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -23460,10 +29260,10 @@ func (x *ContainerState) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1713Slc = r.DecodeBytes(yys1713Slc, true, true) - yys1713 := string(yys1713Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1713 { + switch yys3 { case "waiting": if r.TryDecodeAsNil() { if x.Waiting != nil { @@ -23498,9 +29298,9 @@ func (x *ContainerState) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Terminated.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1713) - } // end switch yys1713 - } // end for yyj1713 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -23508,16 +29308,16 @@ func (x *ContainerState) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1717 int - var yyb1717 bool - var yyhl1717 bool = l >= 0 - yyj1717++ - if yyhl1717 { - yyb1717 = yyj1717 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1717 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1717 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23532,13 +29332,13 @@ func (x *ContainerState) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Waiting.CodecDecodeSelf(d) } - yyj1717++ - if yyhl1717 { - yyb1717 = yyj1717 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1717 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1717 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23553,13 +29353,13 @@ func (x *ContainerState) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Running.CodecDecodeSelf(d) } - yyj1717++ - if yyhl1717 { - yyb1717 = yyj1717 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1717 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1717 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23575,17 +29375,17 @@ func (x *ContainerState) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Terminated.CodecDecodeSelf(d) } for { - yyj1717++ - if yyhl1717 { - yyb1717 = yyj1717 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1717 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1717 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1717-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -23597,36 +29397,36 @@ func (x *ContainerStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1721 := z.EncBinary() - _ = yym1721 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1722 := !z.EncBinary() - yy2arr1722 := z.EncBasicHandle().StructToArray - var yyq1722 [8]bool - _, _, _ = yysep1722, yyq1722, yy2arr1722 - const yyr1722 bool = false - yyq1722[1] = true - yyq1722[2] = true - yyq1722[7] = x.ContainerID != "" - var yynn1722 int - if yyr1722 || yy2arr1722 { + 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 { - yynn1722 = 5 - for _, b := range yyq1722 { + yynn2 = 5 + for _, b := range yyq2 { if b { - yynn1722++ + yynn2++ } } - r.EncodeMapStart(yynn1722) - yynn1722 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1722 || yy2arr1722 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1724 := z.EncBinary() - _ = yym1724 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -23635,51 +29435,51 @@ func (x *ContainerStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1725 := z.EncBinary() - _ = yym1725 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr1722 || yy2arr1722 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1722[1] { - yy1727 := &x.State - yy1727.CodecEncodeSelf(e) + if yyq2[1] { + yy7 := &x.State + yy7.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1722[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("state")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1728 := &x.State - yy1728.CodecEncodeSelf(e) + yy9 := &x.State + yy9.CodecEncodeSelf(e) } } - if yyr1722 || yy2arr1722 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1722[2] { - yy1730 := &x.LastTerminationState - yy1730.CodecEncodeSelf(e) + if yyq2[2] { + yy12 := &x.LastTerminationState + yy12.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1722[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lastState")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1731 := &x.LastTerminationState - yy1731.CodecEncodeSelf(e) + yy14 := &x.LastTerminationState + yy14.CodecEncodeSelf(e) } } - if yyr1722 || yy2arr1722 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1733 := z.EncBinary() - _ = yym1733 + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeBool(bool(x.Ready)) @@ -23688,17 +29488,17 @@ func (x *ContainerStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ready")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1734 := z.EncBinary() - _ = yym1734 + yym18 := z.EncBinary() + _ = yym18 if false { } else { r.EncodeBool(bool(x.Ready)) } } - if yyr1722 || yy2arr1722 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1736 := z.EncBinary() - _ = yym1736 + yym20 := z.EncBinary() + _ = yym20 if false { } else { r.EncodeInt(int64(x.RestartCount)) @@ -23707,17 +29507,17 @@ func (x *ContainerStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("restartCount")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1737 := z.EncBinary() - _ = yym1737 + yym21 := z.EncBinary() + _ = yym21 if false { } else { r.EncodeInt(int64(x.RestartCount)) } } - if yyr1722 || yy2arr1722 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1739 := z.EncBinary() - _ = yym1739 + yym23 := z.EncBinary() + _ = yym23 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Image)) @@ -23726,17 +29526,17 @@ func (x *ContainerStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("image")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1740 := z.EncBinary() - _ = yym1740 + yym24 := z.EncBinary() + _ = yym24 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Image)) } } - if yyr1722 || yy2arr1722 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1742 := z.EncBinary() - _ = yym1742 + yym26 := z.EncBinary() + _ = yym26 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ImageID)) @@ -23745,18 +29545,18 @@ func (x *ContainerStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("imageID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1743 := z.EncBinary() - _ = yym1743 + yym27 := z.EncBinary() + _ = yym27 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ImageID)) } } - if yyr1722 || yy2arr1722 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1722[7] { - yym1745 := z.EncBinary() - _ = yym1745 + if yyq2[7] { + yym29 := z.EncBinary() + _ = yym29 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerID)) @@ -23765,19 +29565,19 @@ func (x *ContainerStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1722[7] { + if yyq2[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1746 := z.EncBinary() - _ = yym1746 + yym30 := z.EncBinary() + _ = yym30 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerID)) } } } - if yyr1722 || yy2arr1722 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -23790,25 +29590,25 @@ func (x *ContainerStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1747 := z.DecBinary() - _ = yym1747 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1748 := r.ContainerType() - if yyct1748 == codecSelferValueTypeMap1234 { - yyl1748 := r.ReadMapStart() - if yyl1748 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1748, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1748 == codecSelferValueTypeArray1234 { - yyl1748 := r.ReadArrayStart() - if yyl1748 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1748, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -23820,12 +29620,12 @@ func (x *ContainerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1749Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1749Slc - var yyhl1749 bool = l >= 0 - for yyj1749 := 0; ; yyj1749++ { - if yyhl1749 { - if yyj1749 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -23834,64 +29634,100 @@ func (x *ContainerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1749Slc = r.DecodeBytes(yys1749Slc, true, true) - yys1749 := string(yys1749Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1749 { + switch yys3 { case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "state": if r.TryDecodeAsNil() { x.State = ContainerState{} } else { - yyv1751 := &x.State - yyv1751.CodecDecodeSelf(d) + yyv6 := &x.State + yyv6.CodecDecodeSelf(d) } case "lastState": if r.TryDecodeAsNil() { x.LastTerminationState = ContainerState{} } else { - yyv1752 := &x.LastTerminationState - yyv1752.CodecDecodeSelf(d) + yyv7 := &x.LastTerminationState + yyv7.CodecDecodeSelf(d) } case "ready": if r.TryDecodeAsNil() { x.Ready = false } else { - x.Ready = bool(r.DecodeBool()) + yyv8 := &x.Ready + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(yyv8)) = r.DecodeBool() + } } case "restartCount": if r.TryDecodeAsNil() { x.RestartCount = 0 } else { - x.RestartCount = int32(r.DecodeInt(32)) + yyv10 := &x.RestartCount + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int32)(yyv10)) = int32(r.DecodeInt(32)) + } } case "image": if r.TryDecodeAsNil() { x.Image = "" } else { - x.Image = string(r.DecodeString()) + yyv12 := &x.Image + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } case "imageID": if r.TryDecodeAsNil() { x.ImageID = "" } else { - x.ImageID = string(r.DecodeString()) + yyv14 := &x.ImageID + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } case "containerID": if r.TryDecodeAsNil() { x.ContainerID = "" } else { - x.ContainerID = string(r.DecodeString()) + yyv16 := &x.ContainerID + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys1749) - } // end switch yys1749 - } // end for yyj1749 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -23899,16 +29735,16 @@ func (x *ContainerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1758 int - var yyb1758 bool - var yyhl1758 bool = l >= 0 - yyj1758++ - if yyhl1758 { - yyb1758 = yyj1758 > l + var yyj18 int + var yyb18 bool + var yyhl18 bool = l >= 0 + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1758 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1758 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23916,15 +29752,21 @@ func (x *ContainerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv19 := &x.Name + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } } - yyj1758++ - if yyhl1758 { - yyb1758 = yyj1758 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1758 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1758 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23932,16 +29774,16 @@ func (x *ContainerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.State = ContainerState{} } else { - yyv1760 := &x.State - yyv1760.CodecDecodeSelf(d) + yyv21 := &x.State + yyv21.CodecDecodeSelf(d) } - yyj1758++ - if yyhl1758 { - yyb1758 = yyj1758 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1758 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1758 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23949,16 +29791,16 @@ func (x *ContainerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.LastTerminationState = ContainerState{} } else { - yyv1761 := &x.LastTerminationState - yyv1761.CodecDecodeSelf(d) + yyv22 := &x.LastTerminationState + yyv22.CodecDecodeSelf(d) } - yyj1758++ - if yyhl1758 { - yyb1758 = yyj1758 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1758 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1758 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23966,15 +29808,21 @@ func (x *ContainerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Ready = false } else { - x.Ready = bool(r.DecodeBool()) + yyv23 := &x.Ready + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*bool)(yyv23)) = r.DecodeBool() + } } - yyj1758++ - if yyhl1758 { - yyb1758 = yyj1758 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1758 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1758 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23982,15 +29830,21 @@ func (x *ContainerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.RestartCount = 0 } else { - x.RestartCount = int32(r.DecodeInt(32)) + yyv25 := &x.RestartCount + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*int32)(yyv25)) = int32(r.DecodeInt(32)) + } } - yyj1758++ - if yyhl1758 { - yyb1758 = yyj1758 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1758 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1758 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23998,15 +29852,21 @@ func (x *ContainerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Image = "" } else { - x.Image = string(r.DecodeString()) + yyv27 := &x.Image + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*string)(yyv27)) = r.DecodeString() + } } - yyj1758++ - if yyhl1758 { - yyb1758 = yyj1758 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1758 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1758 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24014,15 +29874,21 @@ func (x *ContainerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ImageID = "" } else { - x.ImageID = string(r.DecodeString()) + yyv29 := &x.ImageID + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*string)(yyv29)) = r.DecodeString() + } } - yyj1758++ - if yyhl1758 { - yyb1758 = yyj1758 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1758 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1758 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24030,20 +29896,26 @@ func (x *ContainerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ContainerID = "" } else { - x.ContainerID = string(r.DecodeString()) + yyv31 := &x.ContainerID + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + *((*string)(yyv31)) = r.DecodeString() + } } for { - yyj1758++ - if yyhl1758 { - yyb1758 = yyj1758 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb1758 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb1758 { + if yyb18 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1758-1, "") + z.DecStructFieldNotFound(yyj18-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -24052,8 +29924,8 @@ func (x PodPhase) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1767 := z.EncBinary() - _ = yym1767 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -24065,8 +29937,8 @@ func (x *PodPhase) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1768 := z.DecBinary() - _ = yym1768 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -24078,8 +29950,8 @@ func (x PodConditionType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1769 := z.EncBinary() - _ = yym1769 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -24091,8 +29963,8 @@ func (x *PodConditionType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1770 := z.DecBinary() - _ = yym1770 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -24107,34 +29979,34 @@ func (x *PodCondition) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1771 := z.EncBinary() - _ = yym1771 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1772 := !z.EncBinary() - yy2arr1772 := z.EncBasicHandle().StructToArray - var yyq1772 [6]bool - _, _, _ = yysep1772, yyq1772, yy2arr1772 - const yyr1772 bool = false - yyq1772[2] = true - yyq1772[3] = true - yyq1772[4] = x.Reason != "" - yyq1772[5] = x.Message != "" - var yynn1772 int - if yyr1772 || yy2arr1772 { + 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 { - yynn1772 = 2 - for _, b := range yyq1772 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn1772++ + yynn2++ } } - r.EncodeMapStart(yynn1772) - yynn1772 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1772 || yy2arr1772 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Type.CodecEncodeSelf(e) } else { @@ -24143,7 +30015,7 @@ func (x *PodCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } - if yyr1772 || yy2arr1772 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Status.CodecEncodeSelf(e) } else { @@ -24152,85 +30024,85 @@ func (x *PodCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Status.CodecEncodeSelf(e) } - if yyr1772 || yy2arr1772 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1772[2] { - yy1776 := &x.LastProbeTime - yym1777 := z.EncBinary() - _ = yym1777 + if yyq2[2] { + yy10 := &x.LastProbeTime + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy1776) { - } else if yym1777 { - z.EncBinaryMarshal(yy1776) - } else if !yym1777 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1776) + } else if z.HasExtensions() && z.EncExt(yy10) { + } else if yym11 { + z.EncBinaryMarshal(yy10) + } else if !yym11 && z.IsJSONHandle() { + z.EncJSONMarshal(yy10) } else { - z.EncFallback(yy1776) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq1772[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lastProbeTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1778 := &x.LastProbeTime - yym1779 := z.EncBinary() - _ = yym1779 + yy12 := &x.LastProbeTime + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy1778) { - } else if yym1779 { - z.EncBinaryMarshal(yy1778) - } else if !yym1779 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1778) + } else if z.HasExtensions() && z.EncExt(yy12) { + } else if yym13 { + z.EncBinaryMarshal(yy12) + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(yy12) } else { - z.EncFallback(yy1778) + z.EncFallback(yy12) } } } - if yyr1772 || yy2arr1772 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1772[3] { - yy1781 := &x.LastTransitionTime - yym1782 := z.EncBinary() - _ = yym1782 + if yyq2[3] { + yy15 := &x.LastTransitionTime + yym16 := z.EncBinary() + _ = yym16 if false { - } else if z.HasExtensions() && z.EncExt(yy1781) { - } else if yym1782 { - z.EncBinaryMarshal(yy1781) - } else if !yym1782 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1781) + } else if z.HasExtensions() && z.EncExt(yy15) { + } else if yym16 { + z.EncBinaryMarshal(yy15) + } else if !yym16 && z.IsJSONHandle() { + z.EncJSONMarshal(yy15) } else { - z.EncFallback(yy1781) + z.EncFallback(yy15) } } else { r.EncodeNil() } } else { - if yyq1772[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1783 := &x.LastTransitionTime - yym1784 := z.EncBinary() - _ = yym1784 + yy17 := &x.LastTransitionTime + yym18 := z.EncBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.EncExt(yy1783) { - } else if yym1784 { - z.EncBinaryMarshal(yy1783) - } else if !yym1784 && z.IsJSONHandle() { - z.EncJSONMarshal(yy1783) + } else if z.HasExtensions() && z.EncExt(yy17) { + } else if yym18 { + z.EncBinaryMarshal(yy17) + } else if !yym18 && z.IsJSONHandle() { + z.EncJSONMarshal(yy17) } else { - z.EncFallback(yy1783) + z.EncFallback(yy17) } } } - if yyr1772 || yy2arr1772 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1772[4] { - yym1786 := z.EncBinary() - _ = yym1786 + if yyq2[4] { + yym20 := z.EncBinary() + _ = yym20 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -24239,23 +30111,23 @@ func (x *PodCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1772[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1787 := z.EncBinary() - _ = yym1787 + yym21 := z.EncBinary() + _ = yym21 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr1772 || yy2arr1772 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1772[5] { - yym1789 := z.EncBinary() - _ = yym1789 + if yyq2[5] { + yym23 := z.EncBinary() + _ = yym23 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -24264,19 +30136,19 @@ func (x *PodCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1772[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1790 := z.EncBinary() - _ = yym1790 + yym24 := z.EncBinary() + _ = yym24 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr1772 || yy2arr1772 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -24289,25 +30161,25 @@ func (x *PodCondition) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1791 := z.DecBinary() - _ = yym1791 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1792 := r.ContainerType() - if yyct1792 == codecSelferValueTypeMap1234 { - yyl1792 := r.ReadMapStart() - if yyl1792 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1792, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1792 == codecSelferValueTypeArray1234 { - yyl1792 := r.ReadArrayStart() - if yyl1792 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1792, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -24319,12 +30191,12 @@ func (x *PodCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1793Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1793Slc - var yyhl1793 bool = l >= 0 - for yyj1793 := 0; ; yyj1793++ { - if yyhl1793 { - if yyj1793 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -24333,72 +30205,86 @@ func (x *PodCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1793Slc = r.DecodeBytes(yys1793Slc, true, true) - yys1793 := string(yys1793Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1793 { + switch yys3 { case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = PodConditionType(r.DecodeString()) + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = "" } else { - x.Status = ConditionStatus(r.DecodeString()) + yyv5 := &x.Status + yyv5.CodecDecodeSelf(d) } case "lastProbeTime": if r.TryDecodeAsNil() { - x.LastProbeTime = pkg2_unversioned.Time{} + x.LastProbeTime = pkg2_v1.Time{} } else { - yyv1796 := &x.LastProbeTime - yym1797 := z.DecBinary() - _ = yym1797 + yyv6 := &x.LastProbeTime + yym7 := z.DecBinary() + _ = yym7 if false { - } else if z.HasExtensions() && z.DecExt(yyv1796) { - } else if yym1797 { - z.DecBinaryUnmarshal(yyv1796) - } else if !yym1797 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1796) + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if yym7 { + z.DecBinaryUnmarshal(yyv6) + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) } else { - z.DecFallback(yyv1796, false) + z.DecFallback(yyv6, false) } } case "lastTransitionTime": if r.TryDecodeAsNil() { - x.LastTransitionTime = pkg2_unversioned.Time{} + x.LastTransitionTime = pkg2_v1.Time{} } else { - yyv1798 := &x.LastTransitionTime - yym1799 := z.DecBinary() - _ = yym1799 + yyv8 := &x.LastTransitionTime + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv1798) { - } else if yym1799 { - z.DecBinaryUnmarshal(yyv1798) - } else if !yym1799 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1798) + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else if yym9 { + z.DecBinaryUnmarshal(yyv8) + } else if !yym9 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv8) } else { - z.DecFallback(yyv1798, false) + z.DecFallback(yyv8, false) } } case "reason": if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv10 := &x.Reason + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } case "message": if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv12 := &x.Message + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys1793) - } // end switch yys1793 - } // end for yyj1793 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -24406,16 +30292,16 @@ func (x *PodCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1802 int - var yyb1802 bool - var yyhl1802 bool = l >= 0 - yyj1802++ - if yyhl1802 { - yyb1802 = yyj1802 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb1802 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb1802 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24423,15 +30309,16 @@ func (x *PodCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = PodConditionType(r.DecodeString()) + yyv15 := &x.Type + yyv15.CodecDecodeSelf(d) } - yyj1802++ - if yyhl1802 { - yyb1802 = yyj1802 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb1802 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb1802 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24439,69 +30326,70 @@ func (x *PodCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = "" } else { - x.Status = ConditionStatus(r.DecodeString()) + yyv16 := &x.Status + yyv16.CodecDecodeSelf(d) } - yyj1802++ - if yyhl1802 { - yyb1802 = yyj1802 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb1802 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb1802 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.LastProbeTime = pkg2_unversioned.Time{} + x.LastProbeTime = pkg2_v1.Time{} } else { - yyv1805 := &x.LastProbeTime - yym1806 := z.DecBinary() - _ = yym1806 + yyv17 := &x.LastProbeTime + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv1805) { - } else if yym1806 { - z.DecBinaryUnmarshal(yyv1805) - } else if !yym1806 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1805) + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else if yym18 { + z.DecBinaryUnmarshal(yyv17) + } else if !yym18 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv17) } else { - z.DecFallback(yyv1805, false) + z.DecFallback(yyv17, false) } } - yyj1802++ - if yyhl1802 { - yyb1802 = yyj1802 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb1802 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb1802 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.LastTransitionTime = pkg2_unversioned.Time{} + x.LastTransitionTime = pkg2_v1.Time{} } else { - yyv1807 := &x.LastTransitionTime - yym1808 := z.DecBinary() - _ = yym1808 + yyv19 := &x.LastTransitionTime + yym20 := z.DecBinary() + _ = yym20 if false { - } else if z.HasExtensions() && z.DecExt(yyv1807) { - } else if yym1808 { - z.DecBinaryUnmarshal(yyv1807) - } else if !yym1808 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1807) + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else if yym20 { + z.DecBinaryUnmarshal(yyv19) + } else if !yym20 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv19) } else { - z.DecFallback(yyv1807, false) + z.DecFallback(yyv19, false) } } - yyj1802++ - if yyhl1802 { - yyb1802 = yyj1802 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb1802 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb1802 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24509,15 +30397,21 @@ func (x *PodCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv21 := &x.Reason + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } } - yyj1802++ - if yyhl1802 { - yyb1802 = yyj1802 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb1802 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb1802 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -24525,20 +30419,26 @@ func (x *PodCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv23 := &x.Message + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*string)(yyv23)) = r.DecodeString() + } } for { - yyj1802++ - if yyhl1802 { - yyb1802 = yyj1802 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb1802 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb1802 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1802-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -24547,8 +30447,8 @@ func (x RestartPolicy) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1811 := z.EncBinary() - _ = yym1811 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -24560,8 +30460,8 @@ func (x *RestartPolicy) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1812 := z.DecBinary() - _ = yym1812 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -24569,356 +30469,12 @@ func (x *RestartPolicy) CodecDecodeSelf(d *codec1978.Decoder) { } } -func (x *PodList) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1813 := z.EncBinary() - _ = yym1813 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep1814 := !z.EncBinary() - yy2arr1814 := z.EncBasicHandle().StructToArray - var yyq1814 [4]bool - _, _, _ = yysep1814, yyq1814, yy2arr1814 - const yyr1814 bool = false - yyq1814[0] = x.Kind != "" - yyq1814[1] = x.APIVersion != "" - yyq1814[2] = true - var yynn1814 int - if yyr1814 || yy2arr1814 { - r.EncodeArrayStart(4) - } else { - yynn1814 = 1 - for _, b := range yyq1814 { - if b { - yynn1814++ - } - } - r.EncodeMapStart(yynn1814) - yynn1814 = 0 - } - if yyr1814 || yy2arr1814 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1814[0] { - yym1816 := z.EncBinary() - _ = yym1816 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1814[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1817 := z.EncBinary() - _ = yym1817 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr1814 || yy2arr1814 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1814[1] { - yym1819 := z.EncBinary() - _ = yym1819 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq1814[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1820 := z.EncBinary() - _ = yym1820 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr1814 || yy2arr1814 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1814[2] { - yy1822 := &x.ListMeta - yym1823 := z.EncBinary() - _ = yym1823 - if false { - } else if z.HasExtensions() && z.EncExt(yy1822) { - } else { - z.EncFallback(yy1822) - } - } else { - r.EncodeNil() - } - } else { - if yyq1814[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1824 := &x.ListMeta - yym1825 := z.EncBinary() - _ = yym1825 - if false { - } else if z.HasExtensions() && z.EncExt(yy1824) { - } else { - z.EncFallback(yy1824) - } - } - } - if yyr1814 || yy2arr1814 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym1827 := z.EncBinary() - _ = yym1827 - 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 { - yym1828 := z.EncBinary() - _ = yym1828 - if false { - } else { - h.encSlicePod(([]Pod)(x.Items), e) - } - } - } - if yyr1814 || yy2arr1814 { - 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 - yym1829 := z.DecBinary() - _ = yym1829 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct1830 := r.ContainerType() - if yyct1830 == codecSelferValueTypeMap1234 { - yyl1830 := r.ReadMapStart() - if yyl1830 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl1830, d) - } - } else if yyct1830 == codecSelferValueTypeArray1234 { - yyl1830 := r.ReadArrayStart() - if yyl1830 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl1830, 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 yys1831Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1831Slc - var yyhl1831 bool = l >= 0 - for yyj1831 := 0; ; yyj1831++ { - if yyhl1831 { - if yyj1831 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1831Slc = r.DecodeBytes(yys1831Slc, true, true) - yys1831 := string(yys1831Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1831 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} - } else { - yyv1834 := &x.ListMeta - yym1835 := z.DecBinary() - _ = yym1835 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1834) { - } else { - z.DecFallback(yyv1834, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv1836 := &x.Items - yym1837 := z.DecBinary() - _ = yym1837 - if false { - } else { - h.decSlicePod((*[]Pod)(yyv1836), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys1831) - } // end switch yys1831 - } // end for yyj1831 - 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 yyj1838 int - var yyb1838 bool - var yyhl1838 bool = l >= 0 - yyj1838++ - if yyhl1838 { - yyb1838 = yyj1838 > l - } else { - yyb1838 = r.CheckBreak() - } - if yyb1838 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj1838++ - if yyhl1838 { - yyb1838 = yyj1838 > l - } else { - yyb1838 = r.CheckBreak() - } - if yyb1838 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj1838++ - if yyhl1838 { - yyb1838 = yyj1838 > l - } else { - yyb1838 = r.CheckBreak() - } - if yyb1838 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} - } else { - yyv1841 := &x.ListMeta - yym1842 := z.DecBinary() - _ = yym1842 - if false { - } else if z.HasExtensions() && z.DecExt(yyv1841) { - } else { - z.DecFallback(yyv1841, false) - } - } - yyj1838++ - if yyhl1838 { - yyb1838 = yyj1838 > l - } else { - yyb1838 = r.CheckBreak() - } - if yyb1838 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv1843 := &x.Items - yym1844 := z.DecBinary() - _ = yym1844 - if false { - } else { - h.decSlicePod((*[]Pod)(yyv1843), d) - } - } - for { - yyj1838++ - if yyhl1838 { - yyb1838 = yyj1838 > l - } else { - yyb1838 = r.CheckBreak() - } - if yyb1838 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1838-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - func (x DNSPolicy) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1845 := z.EncBinary() - _ = yym1845 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -24930,8 +30486,8 @@ func (x *DNSPolicy) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1846 := z.DecBinary() - _ = yym1846 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -24946,36 +30502,36 @@ func (x *NodeSelector) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1847 := z.EncBinary() - _ = yym1847 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1848 := !z.EncBinary() - yy2arr1848 := z.EncBasicHandle().StructToArray - var yyq1848 [1]bool - _, _, _ = yysep1848, yyq1848, yy2arr1848 - const yyr1848 bool = false - var yynn1848 int - if yyr1848 || yy2arr1848 { + 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 { - yynn1848 = 1 - for _, b := range yyq1848 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1848++ + yynn2++ } } - r.EncodeMapStart(yynn1848) - yynn1848 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1848 || yy2arr1848 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.NodeSelectorTerms == nil { r.EncodeNil() } else { - yym1850 := z.EncBinary() - _ = yym1850 + yym4 := z.EncBinary() + _ = yym4 if false { } else { h.encSliceNodeSelectorTerm(([]NodeSelectorTerm)(x.NodeSelectorTerms), e) @@ -24988,15 +30544,15 @@ func (x *NodeSelector) CodecEncodeSelf(e *codec1978.Encoder) { if x.NodeSelectorTerms == nil { r.EncodeNil() } else { - yym1851 := z.EncBinary() - _ = yym1851 + yym5 := z.EncBinary() + _ = yym5 if false { } else { h.encSliceNodeSelectorTerm(([]NodeSelectorTerm)(x.NodeSelectorTerms), e) } } } - if yyr1848 || yy2arr1848 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -25009,25 +30565,25 @@ func (x *NodeSelector) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1852 := z.DecBinary() - _ = yym1852 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1853 := r.ContainerType() - if yyct1853 == codecSelferValueTypeMap1234 { - yyl1853 := r.ReadMapStart() - if yyl1853 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1853, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1853 == codecSelferValueTypeArray1234 { - yyl1853 := r.ReadArrayStart() - if yyl1853 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1853, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -25039,12 +30595,12 @@ func (x *NodeSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1854Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1854Slc - var yyhl1854 bool = l >= 0 - for yyj1854 := 0; ; yyj1854++ { - if yyhl1854 { - if yyj1854 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -25053,26 +30609,26 @@ func (x *NodeSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1854Slc = r.DecodeBytes(yys1854Slc, true, true) - yys1854 := string(yys1854Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1854 { + switch yys3 { case "nodeSelectorTerms": if r.TryDecodeAsNil() { x.NodeSelectorTerms = nil } else { - yyv1855 := &x.NodeSelectorTerms - yym1856 := z.DecBinary() - _ = yym1856 + yyv4 := &x.NodeSelectorTerms + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSliceNodeSelectorTerm((*[]NodeSelectorTerm)(yyv1855), d) + h.decSliceNodeSelectorTerm((*[]NodeSelectorTerm)(yyv4), d) } } default: - z.DecStructFieldNotFound(-1, yys1854) - } // end switch yys1854 - } // end for yyj1854 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -25080,16 +30636,16 @@ func (x *NodeSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1857 int - var yyb1857 bool - var yyhl1857 bool = l >= 0 - yyj1857++ - if yyhl1857 { - yyb1857 = yyj1857 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1857 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1857 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25097,26 +30653,26 @@ func (x *NodeSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeSelectorTerms = nil } else { - yyv1858 := &x.NodeSelectorTerms - yym1859 := z.DecBinary() - _ = yym1859 + yyv7 := &x.NodeSelectorTerms + yym8 := z.DecBinary() + _ = yym8 if false { } else { - h.decSliceNodeSelectorTerm((*[]NodeSelectorTerm)(yyv1858), d) + h.decSliceNodeSelectorTerm((*[]NodeSelectorTerm)(yyv7), d) } } for { - yyj1857++ - if yyhl1857 { - yyb1857 = yyj1857 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1857 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1857 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1857-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -25128,36 +30684,36 @@ func (x *NodeSelectorTerm) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1860 := z.EncBinary() - _ = yym1860 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1861 := !z.EncBinary() - yy2arr1861 := z.EncBasicHandle().StructToArray - var yyq1861 [1]bool - _, _, _ = yysep1861, yyq1861, yy2arr1861 - const yyr1861 bool = false - var yynn1861 int - if yyr1861 || yy2arr1861 { + 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 { - yynn1861 = 1 - for _, b := range yyq1861 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1861++ + yynn2++ } } - r.EncodeMapStart(yynn1861) - yynn1861 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1861 || yy2arr1861 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.MatchExpressions == nil { r.EncodeNil() } else { - yym1863 := z.EncBinary() - _ = yym1863 + yym4 := z.EncBinary() + _ = yym4 if false { } else { h.encSliceNodeSelectorRequirement(([]NodeSelectorRequirement)(x.MatchExpressions), e) @@ -25170,15 +30726,15 @@ func (x *NodeSelectorTerm) CodecEncodeSelf(e *codec1978.Encoder) { if x.MatchExpressions == nil { r.EncodeNil() } else { - yym1864 := z.EncBinary() - _ = yym1864 + yym5 := z.EncBinary() + _ = yym5 if false { } else { h.encSliceNodeSelectorRequirement(([]NodeSelectorRequirement)(x.MatchExpressions), e) } } } - if yyr1861 || yy2arr1861 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -25191,25 +30747,25 @@ func (x *NodeSelectorTerm) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1865 := z.DecBinary() - _ = yym1865 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1866 := r.ContainerType() - if yyct1866 == codecSelferValueTypeMap1234 { - yyl1866 := r.ReadMapStart() - if yyl1866 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1866, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1866 == codecSelferValueTypeArray1234 { - yyl1866 := r.ReadArrayStart() - if yyl1866 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1866, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -25221,12 +30777,12 @@ func (x *NodeSelectorTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1867Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1867Slc - var yyhl1867 bool = l >= 0 - for yyj1867 := 0; ; yyj1867++ { - if yyhl1867 { - if yyj1867 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -25235,26 +30791,26 @@ func (x *NodeSelectorTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1867Slc = r.DecodeBytes(yys1867Slc, true, true) - yys1867 := string(yys1867Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1867 { + switch yys3 { case "matchExpressions": if r.TryDecodeAsNil() { x.MatchExpressions = nil } else { - yyv1868 := &x.MatchExpressions - yym1869 := z.DecBinary() - _ = yym1869 + yyv4 := &x.MatchExpressions + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSliceNodeSelectorRequirement((*[]NodeSelectorRequirement)(yyv1868), d) + h.decSliceNodeSelectorRequirement((*[]NodeSelectorRequirement)(yyv4), d) } } default: - z.DecStructFieldNotFound(-1, yys1867) - } // end switch yys1867 - } // end for yyj1867 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -25262,16 +30818,16 @@ func (x *NodeSelectorTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1870 int - var yyb1870 bool - var yyhl1870 bool = l >= 0 - yyj1870++ - if yyhl1870 { - yyb1870 = yyj1870 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1870 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1870 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25279,26 +30835,26 @@ func (x *NodeSelectorTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.MatchExpressions = nil } else { - yyv1871 := &x.MatchExpressions - yym1872 := z.DecBinary() - _ = yym1872 + yyv7 := &x.MatchExpressions + yym8 := z.DecBinary() + _ = yym8 if false { } else { - h.decSliceNodeSelectorRequirement((*[]NodeSelectorRequirement)(yyv1871), d) + h.decSliceNodeSelectorRequirement((*[]NodeSelectorRequirement)(yyv7), d) } } for { - yyj1870++ - if yyhl1870 { - yyb1870 = yyj1870 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1870 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1870 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1870-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -25310,34 +30866,34 @@ func (x *NodeSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1873 := z.EncBinary() - _ = yym1873 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1874 := !z.EncBinary() - yy2arr1874 := z.EncBasicHandle().StructToArray - var yyq1874 [3]bool - _, _, _ = yysep1874, yyq1874, yy2arr1874 - const yyr1874 bool = false - yyq1874[2] = len(x.Values) != 0 - var yynn1874 int - if yyr1874 || yy2arr1874 { + 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 { - yynn1874 = 2 - for _, b := range yyq1874 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn1874++ + yynn2++ } } - r.EncodeMapStart(yynn1874) - yynn1874 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1874 || yy2arr1874 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1876 := z.EncBinary() - _ = yym1876 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Key)) @@ -25346,14 +30902,14 @@ func (x *NodeSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("key")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1877 := z.EncBinary() - _ = yym1877 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Key)) } } - if yyr1874 || yy2arr1874 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Operator.CodecEncodeSelf(e) } else { @@ -25362,14 +30918,14 @@ func (x *NodeSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Operator.CodecEncodeSelf(e) } - if yyr1874 || yy2arr1874 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1874[2] { + if yyq2[2] { if x.Values == nil { r.EncodeNil() } else { - yym1880 := z.EncBinary() - _ = yym1880 + yym10 := z.EncBinary() + _ = yym10 if false { } else { z.F.EncSliceStringV(x.Values, false, e) @@ -25379,15 +30935,15 @@ func (x *NodeSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1874[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("values")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Values == nil { r.EncodeNil() } else { - yym1881 := z.EncBinary() - _ = yym1881 + yym11 := z.EncBinary() + _ = yym11 if false { } else { z.F.EncSliceStringV(x.Values, false, e) @@ -25395,7 +30951,7 @@ func (x *NodeSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1874 || yy2arr1874 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -25408,25 +30964,25 @@ func (x *NodeSelectorRequirement) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1882 := z.DecBinary() - _ = yym1882 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1883 := r.ContainerType() - if yyct1883 == codecSelferValueTypeMap1234 { - yyl1883 := r.ReadMapStart() - if yyl1883 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1883, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1883 == codecSelferValueTypeArray1234 { - yyl1883 := r.ReadArrayStart() - if yyl1883 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1883, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -25438,12 +30994,12 @@ func (x *NodeSelectorRequirement) codecDecodeSelfFromMap(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1884Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1884Slc - var yyhl1884 bool = l >= 0 - for yyj1884 := 0; ; yyj1884++ { - if yyhl1884 { - if yyj1884 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -25452,38 +31008,45 @@ func (x *NodeSelectorRequirement) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1884Slc = r.DecodeBytes(yys1884Slc, true, true) - yys1884 := string(yys1884Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1884 { + switch yys3 { case "key": if r.TryDecodeAsNil() { x.Key = "" } else { - x.Key = string(r.DecodeString()) + yyv4 := &x.Key + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "operator": if r.TryDecodeAsNil() { x.Operator = "" } else { - x.Operator = NodeSelectorOperator(r.DecodeString()) + yyv6 := &x.Operator + yyv6.CodecDecodeSelf(d) } case "values": if r.TryDecodeAsNil() { x.Values = nil } else { - yyv1887 := &x.Values - yym1888 := z.DecBinary() - _ = yym1888 + yyv7 := &x.Values + yym8 := z.DecBinary() + _ = yym8 if false { } else { - z.F.DecSliceStringX(yyv1887, false, d) + z.F.DecSliceStringX(yyv7, false, d) } } default: - z.DecStructFieldNotFound(-1, yys1884) - } // end switch yys1884 - } // end for yyj1884 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -25491,16 +31054,16 @@ func (x *NodeSelectorRequirement) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1889 int - var yyb1889 bool - var yyhl1889 bool = l >= 0 - yyj1889++ - if yyhl1889 { - yyb1889 = yyj1889 > l + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb1889 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb1889 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25508,15 +31071,21 @@ func (x *NodeSelectorRequirement) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Key = "" } else { - x.Key = string(r.DecodeString()) + yyv10 := &x.Key + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } - yyj1889++ - if yyhl1889 { - yyb1889 = yyj1889 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb1889 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb1889 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25524,15 +31093,16 @@ func (x *NodeSelectorRequirement) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Operator = "" } else { - x.Operator = NodeSelectorOperator(r.DecodeString()) + yyv12 := &x.Operator + yyv12.CodecDecodeSelf(d) } - yyj1889++ - if yyhl1889 { - yyb1889 = yyj1889 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb1889 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb1889 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25540,26 +31110,26 @@ func (x *NodeSelectorRequirement) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Values = nil } else { - yyv1892 := &x.Values - yym1893 := z.DecBinary() - _ = yym1893 + yyv13 := &x.Values + yym14 := z.DecBinary() + _ = yym14 if false { } else { - z.F.DecSliceStringX(yyv1892, false, d) + z.F.DecSliceStringX(yyv13, false, d) } } for { - yyj1889++ - if yyhl1889 { - yyb1889 = yyj1889 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb1889 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb1889 { + if yyb9 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1889-1, "") + z.DecStructFieldNotFound(yyj9-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -25568,8 +31138,8 @@ func (x NodeSelectorOperator) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1894 := z.EncBinary() - _ = yym1894 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -25581,8 +31151,8 @@ func (x *NodeSelectorOperator) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1895 := z.DecBinary() - _ = yym1895 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -25597,35 +31167,35 @@ func (x *Affinity) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1896 := z.EncBinary() - _ = yym1896 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1897 := !z.EncBinary() - yy2arr1897 := z.EncBasicHandle().StructToArray - var yyq1897 [3]bool - _, _, _ = yysep1897, yyq1897, yy2arr1897 - const yyr1897 bool = false - yyq1897[0] = x.NodeAffinity != nil - yyq1897[1] = x.PodAffinity != nil - yyq1897[2] = x.PodAntiAffinity != nil - var yynn1897 int - if yyr1897 || yy2arr1897 { + 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 { - yynn1897 = 0 - for _, b := range yyq1897 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1897++ + yynn2++ } } - r.EncodeMapStart(yynn1897) - yynn1897 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1897 || yy2arr1897 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1897[0] { + if yyq2[0] { if x.NodeAffinity == nil { r.EncodeNil() } else { @@ -25635,7 +31205,7 @@ func (x *Affinity) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1897[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeAffinity")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -25646,9 +31216,9 @@ func (x *Affinity) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1897 || yy2arr1897 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1897[1] { + if yyq2[1] { if x.PodAffinity == nil { r.EncodeNil() } else { @@ -25658,7 +31228,7 @@ func (x *Affinity) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1897[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podAffinity")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -25669,9 +31239,9 @@ func (x *Affinity) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1897 || yy2arr1897 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1897[2] { + if yyq2[2] { if x.PodAntiAffinity == nil { r.EncodeNil() } else { @@ -25681,7 +31251,7 @@ func (x *Affinity) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1897[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podAntiAffinity")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -25692,7 +31262,7 @@ func (x *Affinity) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1897 || yy2arr1897 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -25705,25 +31275,25 @@ func (x *Affinity) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1901 := z.DecBinary() - _ = yym1901 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1902 := r.ContainerType() - if yyct1902 == codecSelferValueTypeMap1234 { - yyl1902 := r.ReadMapStart() - if yyl1902 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1902, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1902 == codecSelferValueTypeArray1234 { - yyl1902 := r.ReadArrayStart() - if yyl1902 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1902, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -25735,12 +31305,12 @@ func (x *Affinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1903Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1903Slc - var yyhl1903 bool = l >= 0 - for yyj1903 := 0; ; yyj1903++ { - if yyhl1903 { - if yyj1903 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -25749,10 +31319,10 @@ func (x *Affinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1903Slc = r.DecodeBytes(yys1903Slc, true, true) - yys1903 := string(yys1903Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1903 { + switch yys3 { case "nodeAffinity": if r.TryDecodeAsNil() { if x.NodeAffinity != nil { @@ -25787,9 +31357,9 @@ func (x *Affinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.PodAntiAffinity.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1903) - } // end switch yys1903 - } // end for yyj1903 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -25797,16 +31367,16 @@ func (x *Affinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1907 int - var yyb1907 bool - var yyhl1907 bool = l >= 0 - yyj1907++ - if yyhl1907 { - yyb1907 = yyj1907 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1907 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1907 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25821,13 +31391,13 @@ func (x *Affinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.NodeAffinity.CodecDecodeSelf(d) } - yyj1907++ - if yyhl1907 { - yyb1907 = yyj1907 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1907 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1907 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25842,13 +31412,13 @@ func (x *Affinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.PodAffinity.CodecDecodeSelf(d) } - yyj1907++ - if yyhl1907 { - yyb1907 = yyj1907 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1907 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1907 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -25864,17 +31434,17 @@ func (x *Affinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.PodAntiAffinity.CodecDecodeSelf(d) } for { - yyj1907++ - if yyhl1907 { - yyb1907 = yyj1907 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1907 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1907 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1907-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -25886,39 +31456,39 @@ func (x *PodAffinity) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1911 := z.EncBinary() - _ = yym1911 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1912 := !z.EncBinary() - yy2arr1912 := z.EncBasicHandle().StructToArray - var yyq1912 [2]bool - _, _, _ = yysep1912, yyq1912, yy2arr1912 - const yyr1912 bool = false - yyq1912[0] = len(x.RequiredDuringSchedulingIgnoredDuringExecution) != 0 - yyq1912[1] = len(x.PreferredDuringSchedulingIgnoredDuringExecution) != 0 - var yynn1912 int - if yyr1912 || yy2arr1912 { + 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 { - yynn1912 = 0 - for _, b := range yyq1912 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1912++ + yynn2++ } } - r.EncodeMapStart(yynn1912) - yynn1912 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1912 || yy2arr1912 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1912[0] { + if yyq2[0] { if x.RequiredDuringSchedulingIgnoredDuringExecution == nil { r.EncodeNil() } else { - yym1914 := z.EncBinary() - _ = yym1914 + yym4 := z.EncBinary() + _ = yym4 if false { } else { h.encSlicePodAffinityTerm(([]PodAffinityTerm)(x.RequiredDuringSchedulingIgnoredDuringExecution), e) @@ -25928,15 +31498,15 @@ func (x *PodAffinity) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1912[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("requiredDuringSchedulingIgnoredDuringExecution")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RequiredDuringSchedulingIgnoredDuringExecution == nil { r.EncodeNil() } else { - yym1915 := z.EncBinary() - _ = yym1915 + yym5 := z.EncBinary() + _ = yym5 if false { } else { h.encSlicePodAffinityTerm(([]PodAffinityTerm)(x.RequiredDuringSchedulingIgnoredDuringExecution), e) @@ -25944,14 +31514,14 @@ func (x *PodAffinity) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1912 || yy2arr1912 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1912[1] { + if yyq2[1] { if x.PreferredDuringSchedulingIgnoredDuringExecution == nil { r.EncodeNil() } else { - yym1917 := z.EncBinary() - _ = yym1917 + yym7 := z.EncBinary() + _ = yym7 if false { } else { h.encSliceWeightedPodAffinityTerm(([]WeightedPodAffinityTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e) @@ -25961,15 +31531,15 @@ func (x *PodAffinity) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1912[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("preferredDuringSchedulingIgnoredDuringExecution")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.PreferredDuringSchedulingIgnoredDuringExecution == nil { r.EncodeNil() } else { - yym1918 := z.EncBinary() - _ = yym1918 + yym8 := z.EncBinary() + _ = yym8 if false { } else { h.encSliceWeightedPodAffinityTerm(([]WeightedPodAffinityTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e) @@ -25977,7 +31547,7 @@ func (x *PodAffinity) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1912 || yy2arr1912 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -25990,25 +31560,25 @@ func (x *PodAffinity) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1919 := z.DecBinary() - _ = yym1919 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1920 := r.ContainerType() - if yyct1920 == codecSelferValueTypeMap1234 { - yyl1920 := r.ReadMapStart() - if yyl1920 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1920, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1920 == codecSelferValueTypeArray1234 { - yyl1920 := r.ReadArrayStart() - if yyl1920 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1920, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -26020,12 +31590,12 @@ func (x *PodAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1921Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1921Slc - var yyhl1921 bool = l >= 0 - for yyj1921 := 0; ; yyj1921++ { - if yyhl1921 { - if yyj1921 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -26034,38 +31604,38 @@ func (x *PodAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1921Slc = r.DecodeBytes(yys1921Slc, true, true) - yys1921 := string(yys1921Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1921 { + switch yys3 { case "requiredDuringSchedulingIgnoredDuringExecution": if r.TryDecodeAsNil() { x.RequiredDuringSchedulingIgnoredDuringExecution = nil } else { - yyv1922 := &x.RequiredDuringSchedulingIgnoredDuringExecution - yym1923 := z.DecBinary() - _ = yym1923 + yyv4 := &x.RequiredDuringSchedulingIgnoredDuringExecution + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv1922), d) + h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv4), d) } } case "preferredDuringSchedulingIgnoredDuringExecution": if r.TryDecodeAsNil() { x.PreferredDuringSchedulingIgnoredDuringExecution = nil } else { - yyv1924 := &x.PreferredDuringSchedulingIgnoredDuringExecution - yym1925 := z.DecBinary() - _ = yym1925 + yyv6 := &x.PreferredDuringSchedulingIgnoredDuringExecution + yym7 := z.DecBinary() + _ = yym7 if false { } else { - h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv1924), d) + h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv6), d) } } default: - z.DecStructFieldNotFound(-1, yys1921) - } // end switch yys1921 - } // end for yyj1921 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -26073,16 +31643,16 @@ func (x *PodAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1926 int - var yyb1926 bool - var yyhl1926 bool = l >= 0 - yyj1926++ - if yyhl1926 { - yyb1926 = yyj1926 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1926 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1926 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26090,21 +31660,21 @@ func (x *PodAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.RequiredDuringSchedulingIgnoredDuringExecution = nil } else { - yyv1927 := &x.RequiredDuringSchedulingIgnoredDuringExecution - yym1928 := z.DecBinary() - _ = yym1928 + yyv9 := &x.RequiredDuringSchedulingIgnoredDuringExecution + yym10 := z.DecBinary() + _ = yym10 if false { } else { - h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv1927), d) + h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv9), d) } } - yyj1926++ - if yyhl1926 { - yyb1926 = yyj1926 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1926 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1926 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26112,26 +31682,26 @@ func (x *PodAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.PreferredDuringSchedulingIgnoredDuringExecution = nil } else { - yyv1929 := &x.PreferredDuringSchedulingIgnoredDuringExecution - yym1930 := z.DecBinary() - _ = yym1930 + yyv11 := &x.PreferredDuringSchedulingIgnoredDuringExecution + yym12 := z.DecBinary() + _ = yym12 if false { } else { - h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv1929), d) + h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv11), d) } } for { - yyj1926++ - if yyhl1926 { - yyb1926 = yyj1926 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1926 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1926 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1926-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -26143,39 +31713,39 @@ func (x *PodAntiAffinity) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1931 := z.EncBinary() - _ = yym1931 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1932 := !z.EncBinary() - yy2arr1932 := z.EncBasicHandle().StructToArray - var yyq1932 [2]bool - _, _, _ = yysep1932, yyq1932, yy2arr1932 - const yyr1932 bool = false - yyq1932[0] = len(x.RequiredDuringSchedulingIgnoredDuringExecution) != 0 - yyq1932[1] = len(x.PreferredDuringSchedulingIgnoredDuringExecution) != 0 - var yynn1932 int - if yyr1932 || yy2arr1932 { + 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 { - yynn1932 = 0 - for _, b := range yyq1932 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1932++ + yynn2++ } } - r.EncodeMapStart(yynn1932) - yynn1932 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1932 || yy2arr1932 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1932[0] { + if yyq2[0] { if x.RequiredDuringSchedulingIgnoredDuringExecution == nil { r.EncodeNil() } else { - yym1934 := z.EncBinary() - _ = yym1934 + yym4 := z.EncBinary() + _ = yym4 if false { } else { h.encSlicePodAffinityTerm(([]PodAffinityTerm)(x.RequiredDuringSchedulingIgnoredDuringExecution), e) @@ -26185,15 +31755,15 @@ func (x *PodAntiAffinity) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1932[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("requiredDuringSchedulingIgnoredDuringExecution")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RequiredDuringSchedulingIgnoredDuringExecution == nil { r.EncodeNil() } else { - yym1935 := z.EncBinary() - _ = yym1935 + yym5 := z.EncBinary() + _ = yym5 if false { } else { h.encSlicePodAffinityTerm(([]PodAffinityTerm)(x.RequiredDuringSchedulingIgnoredDuringExecution), e) @@ -26201,14 +31771,14 @@ func (x *PodAntiAffinity) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1932 || yy2arr1932 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1932[1] { + if yyq2[1] { if x.PreferredDuringSchedulingIgnoredDuringExecution == nil { r.EncodeNil() } else { - yym1937 := z.EncBinary() - _ = yym1937 + yym7 := z.EncBinary() + _ = yym7 if false { } else { h.encSliceWeightedPodAffinityTerm(([]WeightedPodAffinityTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e) @@ -26218,15 +31788,15 @@ func (x *PodAntiAffinity) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1932[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("preferredDuringSchedulingIgnoredDuringExecution")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.PreferredDuringSchedulingIgnoredDuringExecution == nil { r.EncodeNil() } else { - yym1938 := z.EncBinary() - _ = yym1938 + yym8 := z.EncBinary() + _ = yym8 if false { } else { h.encSliceWeightedPodAffinityTerm(([]WeightedPodAffinityTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e) @@ -26234,7 +31804,7 @@ func (x *PodAntiAffinity) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1932 || yy2arr1932 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -26247,25 +31817,25 @@ func (x *PodAntiAffinity) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1939 := z.DecBinary() - _ = yym1939 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1940 := r.ContainerType() - if yyct1940 == codecSelferValueTypeMap1234 { - yyl1940 := r.ReadMapStart() - if yyl1940 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1940, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1940 == codecSelferValueTypeArray1234 { - yyl1940 := r.ReadArrayStart() - if yyl1940 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1940, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -26277,12 +31847,12 @@ func (x *PodAntiAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1941Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1941Slc - var yyhl1941 bool = l >= 0 - for yyj1941 := 0; ; yyj1941++ { - if yyhl1941 { - if yyj1941 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -26291,38 +31861,38 @@ func (x *PodAntiAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1941Slc = r.DecodeBytes(yys1941Slc, true, true) - yys1941 := string(yys1941Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1941 { + switch yys3 { case "requiredDuringSchedulingIgnoredDuringExecution": if r.TryDecodeAsNil() { x.RequiredDuringSchedulingIgnoredDuringExecution = nil } else { - yyv1942 := &x.RequiredDuringSchedulingIgnoredDuringExecution - yym1943 := z.DecBinary() - _ = yym1943 + yyv4 := &x.RequiredDuringSchedulingIgnoredDuringExecution + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv1942), d) + h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv4), d) } } case "preferredDuringSchedulingIgnoredDuringExecution": if r.TryDecodeAsNil() { x.PreferredDuringSchedulingIgnoredDuringExecution = nil } else { - yyv1944 := &x.PreferredDuringSchedulingIgnoredDuringExecution - yym1945 := z.DecBinary() - _ = yym1945 + yyv6 := &x.PreferredDuringSchedulingIgnoredDuringExecution + yym7 := z.DecBinary() + _ = yym7 if false { } else { - h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv1944), d) + h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv6), d) } } default: - z.DecStructFieldNotFound(-1, yys1941) - } // end switch yys1941 - } // end for yyj1941 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -26330,16 +31900,16 @@ func (x *PodAntiAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1946 int - var yyb1946 bool - var yyhl1946 bool = l >= 0 - yyj1946++ - if yyhl1946 { - yyb1946 = yyj1946 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1946 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1946 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26347,21 +31917,21 @@ func (x *PodAntiAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.RequiredDuringSchedulingIgnoredDuringExecution = nil } else { - yyv1947 := &x.RequiredDuringSchedulingIgnoredDuringExecution - yym1948 := z.DecBinary() - _ = yym1948 + yyv9 := &x.RequiredDuringSchedulingIgnoredDuringExecution + yym10 := z.DecBinary() + _ = yym10 if false { } else { - h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv1947), d) + h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv9), d) } } - yyj1946++ - if yyhl1946 { - yyb1946 = yyj1946 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1946 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1946 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26369,26 +31939,26 @@ func (x *PodAntiAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.PreferredDuringSchedulingIgnoredDuringExecution = nil } else { - yyv1949 := &x.PreferredDuringSchedulingIgnoredDuringExecution - yym1950 := z.DecBinary() - _ = yym1950 + yyv11 := &x.PreferredDuringSchedulingIgnoredDuringExecution + yym12 := z.DecBinary() + _ = yym12 if false { } else { - h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv1949), d) + h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv11), d) } } for { - yyj1946++ - if yyhl1946 { - yyb1946 = yyj1946 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1946 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1946 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1946-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -26400,33 +31970,33 @@ func (x *WeightedPodAffinityTerm) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1951 := z.EncBinary() - _ = yym1951 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1952 := !z.EncBinary() - yy2arr1952 := z.EncBasicHandle().StructToArray - var yyq1952 [2]bool - _, _, _ = yysep1952, yyq1952, yy2arr1952 - const yyr1952 bool = false - var yynn1952 int - if yyr1952 || yy2arr1952 { + 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 { - yynn1952 = 2 - for _, b := range yyq1952 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn1952++ + yynn2++ } } - r.EncodeMapStart(yynn1952) - yynn1952 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1952 || yy2arr1952 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1954 := z.EncBinary() - _ = yym1954 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeInt(int64(x.Weight)) @@ -26435,25 +32005,25 @@ func (x *WeightedPodAffinityTerm) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("weight")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1955 := z.EncBinary() - _ = yym1955 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeInt(int64(x.Weight)) } } - if yyr1952 || yy2arr1952 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1957 := &x.PodAffinityTerm - yy1957.CodecEncodeSelf(e) + yy7 := &x.PodAffinityTerm + yy7.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podAffinityTerm")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1958 := &x.PodAffinityTerm - yy1958.CodecEncodeSelf(e) + yy9 := &x.PodAffinityTerm + yy9.CodecEncodeSelf(e) } - if yyr1952 || yy2arr1952 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -26466,25 +32036,25 @@ func (x *WeightedPodAffinityTerm) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1959 := z.DecBinary() - _ = yym1959 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1960 := r.ContainerType() - if yyct1960 == codecSelferValueTypeMap1234 { - yyl1960 := r.ReadMapStart() - if yyl1960 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1960, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1960 == codecSelferValueTypeArray1234 { - yyl1960 := r.ReadArrayStart() - if yyl1960 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1960, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -26496,12 +32066,12 @@ func (x *WeightedPodAffinityTerm) codecDecodeSelfFromMap(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1961Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1961Slc - var yyhl1961 bool = l >= 0 - for yyj1961 := 0; ; yyj1961++ { - if yyhl1961 { - if yyj1961 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -26510,27 +32080,33 @@ func (x *WeightedPodAffinityTerm) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1961Slc = r.DecodeBytes(yys1961Slc, true, true) - yys1961 := string(yys1961Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1961 { + switch yys3 { case "weight": if r.TryDecodeAsNil() { x.Weight = 0 } else { - x.Weight = int(r.DecodeInt(codecSelferBitsize1234)) + yyv4 := &x.Weight + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } } case "podAffinityTerm": if r.TryDecodeAsNil() { x.PodAffinityTerm = PodAffinityTerm{} } else { - yyv1963 := &x.PodAffinityTerm - yyv1963.CodecDecodeSelf(d) + yyv6 := &x.PodAffinityTerm + yyv6.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1961) - } // end switch yys1961 - } // end for yyj1961 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -26538,16 +32114,16 @@ func (x *WeightedPodAffinityTerm) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1964 int - var yyb1964 bool - var yyhl1964 bool = l >= 0 - yyj1964++ - if yyhl1964 { - yyb1964 = yyj1964 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1964 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1964 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26555,15 +32131,21 @@ func (x *WeightedPodAffinityTerm) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Weight = 0 } else { - x.Weight = int(r.DecodeInt(codecSelferBitsize1234)) + yyv8 := &x.Weight + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } } - yyj1964++ - if yyhl1964 { - yyb1964 = yyj1964 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1964 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1964 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26571,21 +32153,21 @@ func (x *WeightedPodAffinityTerm) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.PodAffinityTerm = PodAffinityTerm{} } else { - yyv1966 := &x.PodAffinityTerm - yyv1966.CodecDecodeSelf(d) + yyv10 := &x.PodAffinityTerm + yyv10.CodecDecodeSelf(d) } for { - yyj1964++ - if yyhl1964 { - yyb1964 = yyj1964 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1964 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1964 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1964-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -26597,39 +32179,40 @@ func (x *PodAffinityTerm) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1967 := z.EncBinary() - _ = yym1967 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1968 := !z.EncBinary() - yy2arr1968 := z.EncBasicHandle().StructToArray - var yyq1968 [3]bool - _, _, _ = yysep1968, yyq1968, yy2arr1968 - const yyr1968 bool = false - yyq1968[0] = x.LabelSelector != nil - yyq1968[2] = x.TopologyKey != "" - var yynn1968 int - if yyr1968 || yy2arr1968 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.LabelSelector != nil + yyq2[1] = len(x.Namespaces) != 0 + yyq2[2] = x.TopologyKey != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(3) } else { - yynn1968 = 1 - for _, b := range yyq1968 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1968++ + yynn2++ } } - r.EncodeMapStart(yynn1968) - yynn1968 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1968 || yy2arr1968 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1968[0] { + if yyq2[0] { if x.LabelSelector == nil { r.EncodeNil() } else { - yym1970 := z.EncBinary() - _ = yym1970 + yym4 := z.EncBinary() + _ = yym4 if false { } else if z.HasExtensions() && z.EncExt(x.LabelSelector) { } else { @@ -26640,15 +32223,15 @@ func (x *PodAffinityTerm) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1968[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("labelSelector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.LabelSelector == nil { r.EncodeNil() } else { - yym1971 := z.EncBinary() - _ = yym1971 + yym5 := z.EncBinary() + _ = yym5 if false { } else if z.HasExtensions() && z.EncExt(x.LabelSelector) { } else { @@ -26657,38 +32240,44 @@ func (x *PodAffinityTerm) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1968 || yy2arr1968 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Namespaces == nil { - r.EncodeNil() - } else { - yym1973 := z.EncBinary() - _ = yym1973 - if false { + if yyq2[1] { + if x.Namespaces == nil { + r.EncodeNil() } else { - z.F.EncSliceStringV(x.Namespaces, false, e) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + z.F.EncSliceStringV(x.Namespaces, false, e) + } } + } else { + r.EncodeNil() } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("namespaces")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Namespaces == nil { - r.EncodeNil() - } else { - yym1974 := z.EncBinary() - _ = yym1974 - if false { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("namespaces")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Namespaces == nil { + r.EncodeNil() } else { - z.F.EncSliceStringV(x.Namespaces, false, e) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + z.F.EncSliceStringV(x.Namespaces, false, e) + } } } } - if yyr1968 || yy2arr1968 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1968[2] { - yym1976 := z.EncBinary() - _ = yym1976 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.TopologyKey)) @@ -26697,19 +32286,19 @@ func (x *PodAffinityTerm) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1968[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("topologyKey")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1977 := z.EncBinary() - _ = yym1977 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.TopologyKey)) } } } - if yyr1968 || yy2arr1968 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -26722,25 +32311,25 @@ func (x *PodAffinityTerm) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1978 := z.DecBinary() - _ = yym1978 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1979 := r.ContainerType() - if yyct1979 == codecSelferValueTypeMap1234 { - yyl1979 := r.ReadMapStart() - if yyl1979 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1979, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1979 == codecSelferValueTypeArray1234 { - yyl1979 := r.ReadArrayStart() - if yyl1979 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1979, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -26752,12 +32341,12 @@ func (x *PodAffinityTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1980Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1980Slc - var yyhl1980 bool = l >= 0 - for yyj1980 := 0; ; yyj1980++ { - if yyhl1980 { - if yyj1980 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -26766,10 +32355,10 @@ func (x *PodAffinityTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1980Slc = r.DecodeBytes(yys1980Slc, true, true) - yys1980 := string(yys1980Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1980 { + switch yys3 { case "labelSelector": if r.TryDecodeAsNil() { if x.LabelSelector != nil { @@ -26777,10 +32366,10 @@ func (x *PodAffinityTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } else { if x.LabelSelector == nil { - x.LabelSelector = new(pkg2_unversioned.LabelSelector) + x.LabelSelector = new(pkg2_v1.LabelSelector) } - yym1982 := z.DecBinary() - _ = yym1982 + yym5 := z.DecBinary() + _ = yym5 if false { } else if z.HasExtensions() && z.DecExt(x.LabelSelector) { } else { @@ -26791,24 +32380,30 @@ func (x *PodAffinityTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Namespaces = nil } else { - yyv1983 := &x.Namespaces - yym1984 := z.DecBinary() - _ = yym1984 + yyv6 := &x.Namespaces + yym7 := z.DecBinary() + _ = yym7 if false { } else { - z.F.DecSliceStringX(yyv1983, false, d) + z.F.DecSliceStringX(yyv6, false, d) } } case "topologyKey": if r.TryDecodeAsNil() { x.TopologyKey = "" } else { - x.TopologyKey = string(r.DecodeString()) + yyv8 := &x.TopologyKey + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys1980) - } // end switch yys1980 - } // end for yyj1980 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -26816,16 +32411,16 @@ func (x *PodAffinityTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1986 int - var yyb1986 bool - var yyhl1986 bool = l >= 0 - yyj1986++ - if yyhl1986 { - yyb1986 = yyj1986 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1986 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1986 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26836,23 +32431,23 @@ func (x *PodAffinityTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } } else { if x.LabelSelector == nil { - x.LabelSelector = new(pkg2_unversioned.LabelSelector) + x.LabelSelector = new(pkg2_v1.LabelSelector) } - yym1988 := z.DecBinary() - _ = yym1988 + yym12 := z.DecBinary() + _ = yym12 if false { } else if z.HasExtensions() && z.DecExt(x.LabelSelector) { } else { z.DecFallback(x.LabelSelector, false) } } - yyj1986++ - if yyhl1986 { - yyb1986 = yyj1986 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1986 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1986 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26860,21 +32455,21 @@ func (x *PodAffinityTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Namespaces = nil } else { - yyv1989 := &x.Namespaces - yym1990 := z.DecBinary() - _ = yym1990 + yyv13 := &x.Namespaces + yym14 := z.DecBinary() + _ = yym14 if false { } else { - z.F.DecSliceStringX(yyv1989, false, d) + z.F.DecSliceStringX(yyv13, false, d) } } - yyj1986++ - if yyhl1986 { - yyb1986 = yyj1986 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1986 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1986 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -26882,20 +32477,26 @@ func (x *PodAffinityTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.TopologyKey = "" } else { - x.TopologyKey = string(r.DecodeString()) + yyv15 := &x.TopologyKey + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } for { - yyj1986++ - if yyhl1986 { - yyb1986 = yyj1986 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb1986 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb1986 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1986-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -26907,34 +32508,34 @@ func (x *NodeAffinity) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1992 := z.EncBinary() - _ = yym1992 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1993 := !z.EncBinary() - yy2arr1993 := z.EncBasicHandle().StructToArray - var yyq1993 [2]bool - _, _, _ = yysep1993, yyq1993, yy2arr1993 - const yyr1993 bool = false - yyq1993[0] = x.RequiredDuringSchedulingIgnoredDuringExecution != nil - yyq1993[1] = len(x.PreferredDuringSchedulingIgnoredDuringExecution) != 0 - var yynn1993 int - if yyr1993 || yy2arr1993 { + 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 { - yynn1993 = 0 - for _, b := range yyq1993 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1993++ + yynn2++ } } - r.EncodeMapStart(yynn1993) - yynn1993 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1993 || yy2arr1993 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1993[0] { + if yyq2[0] { if x.RequiredDuringSchedulingIgnoredDuringExecution == nil { r.EncodeNil() } else { @@ -26944,7 +32545,7 @@ func (x *NodeAffinity) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1993[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("requiredDuringSchedulingIgnoredDuringExecution")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -26955,14 +32556,14 @@ func (x *NodeAffinity) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1993 || yy2arr1993 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1993[1] { + if yyq2[1] { if x.PreferredDuringSchedulingIgnoredDuringExecution == nil { r.EncodeNil() } else { - yym1996 := z.EncBinary() - _ = yym1996 + yym7 := z.EncBinary() + _ = yym7 if false { } else { h.encSlicePreferredSchedulingTerm(([]PreferredSchedulingTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e) @@ -26972,15 +32573,15 @@ func (x *NodeAffinity) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1993[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("preferredDuringSchedulingIgnoredDuringExecution")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.PreferredDuringSchedulingIgnoredDuringExecution == nil { r.EncodeNil() } else { - yym1997 := z.EncBinary() - _ = yym1997 + yym8 := z.EncBinary() + _ = yym8 if false { } else { h.encSlicePreferredSchedulingTerm(([]PreferredSchedulingTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e) @@ -26988,7 +32589,7 @@ func (x *NodeAffinity) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1993 || yy2arr1993 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -27001,25 +32602,25 @@ func (x *NodeAffinity) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1998 := z.DecBinary() - _ = yym1998 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1999 := r.ContainerType() - if yyct1999 == codecSelferValueTypeMap1234 { - yyl1999 := r.ReadMapStart() - if yyl1999 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1999, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1999 == codecSelferValueTypeArray1234 { - yyl1999 := r.ReadArrayStart() - if yyl1999 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1999, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -27031,12 +32632,12 @@ func (x *NodeAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2000Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2000Slc - var yyhl2000 bool = l >= 0 - for yyj2000 := 0; ; yyj2000++ { - if yyhl2000 { - if yyj2000 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -27045,10 +32646,10 @@ func (x *NodeAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2000Slc = r.DecodeBytes(yys2000Slc, true, true) - yys2000 := string(yys2000Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2000 { + switch yys3 { case "requiredDuringSchedulingIgnoredDuringExecution": if r.TryDecodeAsNil() { if x.RequiredDuringSchedulingIgnoredDuringExecution != nil { @@ -27064,18 +32665,18 @@ func (x *NodeAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.PreferredDuringSchedulingIgnoredDuringExecution = nil } else { - yyv2002 := &x.PreferredDuringSchedulingIgnoredDuringExecution - yym2003 := z.DecBinary() - _ = yym2003 + yyv5 := &x.PreferredDuringSchedulingIgnoredDuringExecution + yym6 := z.DecBinary() + _ = yym6 if false { } else { - h.decSlicePreferredSchedulingTerm((*[]PreferredSchedulingTerm)(yyv2002), d) + h.decSlicePreferredSchedulingTerm((*[]PreferredSchedulingTerm)(yyv5), d) } } default: - z.DecStructFieldNotFound(-1, yys2000) - } // end switch yys2000 - } // end for yyj2000 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -27083,16 +32684,16 @@ func (x *NodeAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2004 int - var yyb2004 bool - var yyhl2004 bool = l >= 0 - yyj2004++ - if yyhl2004 { - yyb2004 = yyj2004 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb2004 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb2004 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27107,13 +32708,13 @@ func (x *NodeAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.RequiredDuringSchedulingIgnoredDuringExecution.CodecDecodeSelf(d) } - yyj2004++ - if yyhl2004 { - yyb2004 = yyj2004 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb2004 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb2004 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27121,26 +32722,26 @@ func (x *NodeAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.PreferredDuringSchedulingIgnoredDuringExecution = nil } else { - yyv2006 := &x.PreferredDuringSchedulingIgnoredDuringExecution - yym2007 := z.DecBinary() - _ = yym2007 + yyv9 := &x.PreferredDuringSchedulingIgnoredDuringExecution + yym10 := z.DecBinary() + _ = yym10 if false { } else { - h.decSlicePreferredSchedulingTerm((*[]PreferredSchedulingTerm)(yyv2006), d) + h.decSlicePreferredSchedulingTerm((*[]PreferredSchedulingTerm)(yyv9), d) } } for { - yyj2004++ - if yyhl2004 { - yyb2004 = yyj2004 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb2004 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb2004 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2004-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -27152,33 +32753,33 @@ func (x *PreferredSchedulingTerm) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2008 := z.EncBinary() - _ = yym2008 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2009 := !z.EncBinary() - yy2arr2009 := z.EncBasicHandle().StructToArray - var yyq2009 [2]bool - _, _, _ = yysep2009, yyq2009, yy2arr2009 - const yyr2009 bool = false - var yynn2009 int - if yyr2009 || yy2arr2009 { + 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 { - yynn2009 = 2 - for _, b := range yyq2009 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn2009++ + yynn2++ } } - r.EncodeMapStart(yynn2009) - yynn2009 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2009 || yy2arr2009 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2011 := z.EncBinary() - _ = yym2011 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeInt(int64(x.Weight)) @@ -27187,25 +32788,25 @@ func (x *PreferredSchedulingTerm) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("weight")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2012 := z.EncBinary() - _ = yym2012 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeInt(int64(x.Weight)) } } - if yyr2009 || yy2arr2009 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy2014 := &x.Preference - yy2014.CodecEncodeSelf(e) + yy7 := &x.Preference + yy7.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("preference")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2015 := &x.Preference - yy2015.CodecEncodeSelf(e) + yy9 := &x.Preference + yy9.CodecEncodeSelf(e) } - if yyr2009 || yy2arr2009 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -27218,25 +32819,25 @@ func (x *PreferredSchedulingTerm) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2016 := z.DecBinary() - _ = yym2016 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2017 := r.ContainerType() - if yyct2017 == codecSelferValueTypeMap1234 { - yyl2017 := r.ReadMapStart() - if yyl2017 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2017, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2017 == codecSelferValueTypeArray1234 { - yyl2017 := r.ReadArrayStart() - if yyl2017 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2017, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -27248,12 +32849,12 @@ func (x *PreferredSchedulingTerm) codecDecodeSelfFromMap(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2018Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2018Slc - var yyhl2018 bool = l >= 0 - for yyj2018 := 0; ; yyj2018++ { - if yyhl2018 { - if yyj2018 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -27262,27 +32863,33 @@ func (x *PreferredSchedulingTerm) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2018Slc = r.DecodeBytes(yys2018Slc, true, true) - yys2018 := string(yys2018Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2018 { + switch yys3 { case "weight": if r.TryDecodeAsNil() { x.Weight = 0 } else { - x.Weight = int32(r.DecodeInt(32)) + yyv4 := &x.Weight + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } } case "preference": if r.TryDecodeAsNil() { x.Preference = NodeSelectorTerm{} } else { - yyv2020 := &x.Preference - yyv2020.CodecDecodeSelf(d) + yyv6 := &x.Preference + yyv6.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2018) - } // end switch yys2018 - } // end for yyj2018 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -27290,16 +32897,16 @@ func (x *PreferredSchedulingTerm) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2021 int - var yyb2021 bool - var yyhl2021 bool = l >= 0 - yyj2021++ - if yyhl2021 { - yyb2021 = yyj2021 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb2021 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb2021 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27307,15 +32914,21 @@ func (x *PreferredSchedulingTerm) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Weight = 0 } else { - x.Weight = int32(r.DecodeInt(32)) + yyv8 := &x.Weight + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } } - yyj2021++ - if yyhl2021 { - yyb2021 = yyj2021 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb2021 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb2021 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27323,21 +32936,21 @@ func (x *PreferredSchedulingTerm) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Preference = NodeSelectorTerm{} } else { - yyv2023 := &x.Preference - yyv2023.CodecDecodeSelf(d) + yyv10 := &x.Preference + yyv10.CodecDecodeSelf(d) } for { - yyj2021++ - if yyhl2021 { - yyb2021 = yyj2021 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb2021 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb2021 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2021-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -27349,34 +32962,35 @@ func (x *Taint) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2024 := z.EncBinary() - _ = yym2024 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2025 := !z.EncBinary() - yy2arr2025 := z.EncBasicHandle().StructToArray - var yyq2025 [3]bool - _, _, _ = yysep2025, yyq2025, yy2arr2025 - const yyr2025 bool = false - yyq2025[1] = x.Value != "" - var yynn2025 int - if yyr2025 || yy2arr2025 { - r.EncodeArrayStart(3) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Value != "" + yyq2[3] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) } else { - yynn2025 = 2 - for _, b := range yyq2025 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn2025++ + yynn2++ } } - r.EncodeMapStart(yynn2025) - yynn2025 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2025 || yy2arr2025 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2027 := z.EncBinary() - _ = yym2027 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Key)) @@ -27385,18 +32999,18 @@ func (x *Taint) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("key")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2028 := z.EncBinary() - _ = yym2028 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Key)) } } - if yyr2025 || yy2arr2025 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2025[1] { - yym2030 := z.EncBinary() - _ = yym2030 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Value)) @@ -27405,19 +33019,19 @@ func (x *Taint) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2025[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("value")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2031 := z.EncBinary() - _ = yym2031 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Value)) } } } - if yyr2025 || yy2arr2025 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Effect.CodecEncodeSelf(e) } else { @@ -27426,7 +33040,44 @@ func (x *Taint) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Effect.CodecEncodeSelf(e) } - if yyr2025 || yy2arr2025 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy13 := &x.TimeAdded + yym14 := z.EncBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.EncExt(yy13) { + } else if yym14 { + z.EncBinaryMarshal(yy13) + } else if !yym14 && z.IsJSONHandle() { + z.EncJSONMarshal(yy13) + } else { + z.EncFallback(yy13) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("timeAdded")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy15 := &x.TimeAdded + yym16 := z.EncBinary() + _ = yym16 + if false { + } else if z.HasExtensions() && z.EncExt(yy15) { + } else if yym16 { + z.EncBinaryMarshal(yy15) + } else if !yym16 && z.IsJSONHandle() { + z.EncJSONMarshal(yy15) + } else { + z.EncFallback(yy15) + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -27439,25 +33090,25 @@ func (x *Taint) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2033 := z.DecBinary() - _ = yym2033 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2034 := r.ContainerType() - if yyct2034 == codecSelferValueTypeMap1234 { - yyl2034 := r.ReadMapStart() - if yyl2034 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2034, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2034 == codecSelferValueTypeArray1234 { - yyl2034 := r.ReadArrayStart() - if yyl2034 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2034, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -27469,12 +33120,12 @@ func (x *Taint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2035Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2035Slc - var yyhl2035 bool = l >= 0 - for yyj2035 := 0; ; yyj2035++ { - if yyhl2035 { - if yyj2035 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -27483,32 +33134,62 @@ func (x *Taint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2035Slc = r.DecodeBytes(yys2035Slc, true, true) - yys2035 := string(yys2035Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2035 { + switch yys3 { case "key": if r.TryDecodeAsNil() { x.Key = "" } else { - x.Key = string(r.DecodeString()) + yyv4 := &x.Key + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "value": if r.TryDecodeAsNil() { x.Value = "" } else { - x.Value = string(r.DecodeString()) + yyv6 := &x.Value + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "effect": if r.TryDecodeAsNil() { x.Effect = "" } else { - x.Effect = TaintEffect(r.DecodeString()) + yyv8 := &x.Effect + yyv8.CodecDecodeSelf(d) + } + case "timeAdded": + if r.TryDecodeAsNil() { + x.TimeAdded = pkg2_v1.Time{} + } else { + yyv9 := &x.TimeAdded + yym10 := z.DecBinary() + _ = yym10 + if false { + } else if z.HasExtensions() && z.DecExt(yyv9) { + } else if yym10 { + z.DecBinaryUnmarshal(yyv9) + } else if !yym10 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv9) + } else { + z.DecFallback(yyv9, false) + } } default: - z.DecStructFieldNotFound(-1, yys2035) - } // end switch yys2035 - } // end for yyj2035 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -27516,16 +33197,16 @@ func (x *Taint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2039 int - var yyb2039 bool - var yyhl2039 bool = l >= 0 - yyj2039++ - if yyhl2039 { - yyb2039 = yyj2039 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2039 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2039 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27533,15 +33214,21 @@ func (x *Taint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Key = "" } else { - x.Key = string(r.DecodeString()) + yyv12 := &x.Key + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } - yyj2039++ - if yyhl2039 { - yyb2039 = yyj2039 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2039 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2039 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27549,15 +33236,21 @@ func (x *Taint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Value = "" } else { - x.Value = string(r.DecodeString()) + yyv14 := &x.Value + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj2039++ - if yyhl2039 { - yyb2039 = yyj2039 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2039 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2039 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27565,20 +33258,48 @@ func (x *Taint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Effect = "" } else { - x.Effect = TaintEffect(r.DecodeString()) + yyv16 := &x.Effect + yyv16.CodecDecodeSelf(d) + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TimeAdded = pkg2_v1.Time{} + } else { + yyv17 := &x.TimeAdded + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else if yym18 { + z.DecBinaryUnmarshal(yyv17) + } else if !yym18 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv17) + } else { + z.DecFallback(yyv17, false) + } } for { - yyj2039++ - if yyhl2039 { - yyb2039 = yyj2039 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2039 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2039 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2039-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -27587,8 +33308,8 @@ func (x TaintEffect) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2043 := z.EncBinary() - _ = yym2043 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -27600,8 +33321,8 @@ func (x *TaintEffect) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2044 := z.DecBinary() - _ = yym2044 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -27616,38 +33337,39 @@ func (x *Toleration) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2045 := z.EncBinary() - _ = yym2045 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2046 := !z.EncBinary() - yy2arr2046 := z.EncBasicHandle().StructToArray - var yyq2046 [4]bool - _, _, _ = yysep2046, yyq2046, yy2arr2046 - const yyr2046 bool = false - yyq2046[0] = x.Key != "" - yyq2046[1] = x.Operator != "" - yyq2046[2] = x.Value != "" - yyq2046[3] = x.Effect != "" - var yynn2046 int - if yyr2046 || yy2arr2046 { - r.EncodeArrayStart(4) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Key != "" + yyq2[1] = x.Operator != "" + yyq2[2] = x.Value != "" + yyq2[3] = x.Effect != "" + yyq2[4] = x.TolerationSeconds != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) } else { - yynn2046 = 0 - for _, b := range yyq2046 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2046++ + yynn2++ } } - r.EncodeMapStart(yynn2046) - yynn2046 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2046 || yy2arr2046 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2046[0] { - yym2048 := z.EncBinary() - _ = yym2048 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Key)) @@ -27656,38 +33378,38 @@ func (x *Toleration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2046[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("key")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2049 := z.EncBinary() - _ = yym2049 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Key)) } } } - if yyr2046 || yy2arr2046 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2046[1] { + if yyq2[1] { x.Operator.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2046[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("operator")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Operator.CodecEncodeSelf(e) } } - if yyr2046 || yy2arr2046 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2046[2] { - yym2052 := z.EncBinary() - _ = yym2052 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Value)) @@ -27696,34 +33418,69 @@ func (x *Toleration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2046[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("value")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2053 := z.EncBinary() - _ = yym2053 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Value)) } } } - if yyr2046 || yy2arr2046 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2046[3] { + if yyq2[3] { x.Effect.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2046[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("effect")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Effect.CodecEncodeSelf(e) } } - if yyr2046 || yy2arr2046 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + if x.TolerationSeconds == nil { + r.EncodeNil() + } else { + yy16 := *x.TolerationSeconds + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeInt(int64(yy16)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("tolerationSeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.TolerationSeconds == nil { + r.EncodeNil() + } else { + yy18 := *x.TolerationSeconds + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeInt(int64(yy18)) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -27736,25 +33493,25 @@ func (x *Toleration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2055 := z.DecBinary() - _ = yym2055 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2056 := r.ContainerType() - if yyct2056 == codecSelferValueTypeMap1234 { - yyl2056 := r.ReadMapStart() - if yyl2056 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2056, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2056 == codecSelferValueTypeArray1234 { - yyl2056 := r.ReadArrayStart() - if yyl2056 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2056, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -27766,12 +33523,12 @@ func (x *Toleration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2057Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2057Slc - var yyhl2057 bool = l >= 0 - for yyj2057 := 0; ; yyj2057++ { - if yyhl2057 { - if yyj2057 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -27780,38 +33537,68 @@ func (x *Toleration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2057Slc = r.DecodeBytes(yys2057Slc, true, true) - yys2057 := string(yys2057Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2057 { + switch yys3 { case "key": if r.TryDecodeAsNil() { x.Key = "" } else { - x.Key = string(r.DecodeString()) + yyv4 := &x.Key + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "operator": if r.TryDecodeAsNil() { x.Operator = "" } else { - x.Operator = TolerationOperator(r.DecodeString()) + yyv6 := &x.Operator + yyv6.CodecDecodeSelf(d) } case "value": if r.TryDecodeAsNil() { x.Value = "" } else { - x.Value = string(r.DecodeString()) + yyv7 := &x.Value + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*string)(yyv7)) = r.DecodeString() + } } case "effect": if r.TryDecodeAsNil() { x.Effect = "" } else { - x.Effect = TaintEffect(r.DecodeString()) + yyv9 := &x.Effect + yyv9.CodecDecodeSelf(d) + } + case "tolerationSeconds": + if r.TryDecodeAsNil() { + if x.TolerationSeconds != nil { + x.TolerationSeconds = nil + } + } else { + if x.TolerationSeconds == nil { + x.TolerationSeconds = new(int64) + } + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int64)(x.TolerationSeconds)) = int64(r.DecodeInt(64)) + } } default: - z.DecStructFieldNotFound(-1, yys2057) - } // end switch yys2057 - } // end for yyj2057 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -27819,16 +33606,16 @@ func (x *Toleration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2062 int - var yyb2062 bool - var yyhl2062 bool = l >= 0 - yyj2062++ - if yyhl2062 { - yyb2062 = yyj2062 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2062 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2062 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27836,15 +33623,21 @@ func (x *Toleration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Key = "" } else { - x.Key = string(r.DecodeString()) + yyv13 := &x.Key + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj2062++ - if yyhl2062 { - yyb2062 = yyj2062 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2062 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2062 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27852,15 +33645,16 @@ func (x *Toleration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Operator = "" } else { - x.Operator = TolerationOperator(r.DecodeString()) + yyv15 := &x.Operator + yyv15.CodecDecodeSelf(d) } - yyj2062++ - if yyhl2062 { - yyb2062 = yyj2062 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2062 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2062 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27868,15 +33662,21 @@ func (x *Toleration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Value = "" } else { - x.Value = string(r.DecodeString()) + yyv16 := &x.Value + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } - yyj2062++ - if yyhl2062 { - yyb2062 = yyj2062 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2062 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2062 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -27884,20 +33684,47 @@ func (x *Toleration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Effect = "" } else { - x.Effect = TaintEffect(r.DecodeString()) + yyv18 := &x.Effect + yyv18.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.TolerationSeconds != nil { + x.TolerationSeconds = nil + } + } else { + if x.TolerationSeconds == nil { + x.TolerationSeconds = new(int64) + } + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*int64)(x.TolerationSeconds)) = int64(r.DecodeInt(64)) + } } for { - yyj2062++ - if yyhl2062 { - yyb2062 = yyj2062 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2062 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2062 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2062-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -27906,8 +33733,8 @@ func (x TolerationOperator) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2067 := z.EncBinary() - _ = yym2067 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -27919,8 +33746,8 @@ func (x *TolerationOperator) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2068 := z.DecBinary() - _ = yym2068 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -27935,73 +33762,123 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2069 := z.EncBinary() - _ = yym2069 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2070 := !z.EncBinary() - yy2arr2070 := z.EncBasicHandle().StructToArray - var yyq2070 [13]bool - _, _, _ = yysep2070, yyq2070, yy2arr2070 - const yyr2070 bool = false - yyq2070[2] = x.RestartPolicy != "" - yyq2070[3] = x.TerminationGracePeriodSeconds != nil - yyq2070[4] = x.ActiveDeadlineSeconds != nil - yyq2070[5] = x.DNSPolicy != "" - yyq2070[6] = len(x.NodeSelector) != 0 - yyq2070[8] = x.NodeName != "" - yyq2070[9] = x.SecurityContext != nil - yyq2070[10] = len(x.ImagePullSecrets) != 0 - yyq2070[11] = x.Hostname != "" - yyq2070[12] = x.Subdomain != "" - var yynn2070 int - if yyr2070 || yy2arr2070 { - r.EncodeArrayStart(13) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [22]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = len(x.Volumes) != 0 + yyq2[1] = len(x.InitContainers) != 0 + yyq2[3] = x.RestartPolicy != "" + yyq2[4] = x.TerminationGracePeriodSeconds != nil + yyq2[5] = x.ActiveDeadlineSeconds != nil + yyq2[6] = x.DNSPolicy != "" + yyq2[7] = len(x.NodeSelector) != 0 + yyq2[8] = x.ServiceAccountName != "" + yyq2[9] = x.DeprecatedServiceAccount != "" + yyq2[10] = x.AutomountServiceAccountToken != nil + yyq2[11] = x.NodeName != "" + yyq2[12] = x.HostNetwork != false + yyq2[13] = x.HostPID != false + yyq2[14] = x.HostIPC != false + yyq2[15] = x.SecurityContext != nil + yyq2[16] = len(x.ImagePullSecrets) != 0 + yyq2[17] = x.Hostname != "" + yyq2[18] = x.Subdomain != "" + yyq2[19] = x.Affinity != nil + yyq2[20] = x.SchedulerName != "" + yyq2[21] = len(x.Tolerations) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(22) } else { - yynn2070 = 3 - for _, b := range yyq2070 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn2070++ + yynn2++ } } - r.EncodeMapStart(yynn2070) - yynn2070 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2070 || yy2arr2070 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Volumes == nil { - r.EncodeNil() - } else { - yym2072 := z.EncBinary() - _ = yym2072 - if false { + if yyq2[0] { + if x.Volumes == nil { + r.EncodeNil() } else { - h.encSliceVolume(([]Volume)(x.Volumes), e) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + h.encSliceVolume(([]Volume)(x.Volumes), e) + } } + } else { + r.EncodeNil() } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("volumes")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Volumes == nil { - r.EncodeNil() - } else { - yym2073 := z.EncBinary() - _ = yym2073 - if false { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("volumes")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Volumes == nil { + r.EncodeNil() } else { - h.encSliceVolume(([]Volume)(x.Volumes), e) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + h.encSliceVolume(([]Volume)(x.Volumes), e) + } } } } - if yyr2070 || yy2arr2070 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.InitContainers == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + h.encSliceContainer(([]Container)(x.InitContainers), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("initContainers")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.InitContainers == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + h.encSliceContainer(([]Container)(x.InitContainers), e) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Containers == nil { r.EncodeNil() } else { - yym2075 := z.EncBinary() - _ = yym2075 + yym10 := z.EncBinary() + _ = yym10 if false { } else { h.encSliceContainer(([]Container)(x.Containers), e) @@ -28014,122 +33891,122 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x.Containers == nil { r.EncodeNil() } else { - yym2076 := z.EncBinary() - _ = yym2076 + yym11 := z.EncBinary() + _ = yym11 if false { } else { h.encSliceContainer(([]Container)(x.Containers), e) } } } - if yyr2070 || yy2arr2070 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2070[2] { + if yyq2[3] { x.RestartPolicy.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2070[2] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("restartPolicy")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.RestartPolicy.CodecEncodeSelf(e) } } - if yyr2070 || yy2arr2070 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2070[3] { + if yyq2[4] { if x.TerminationGracePeriodSeconds == nil { r.EncodeNil() } else { - yy2079 := *x.TerminationGracePeriodSeconds - yym2080 := z.EncBinary() - _ = yym2080 + yy16 := *x.TerminationGracePeriodSeconds + yym17 := z.EncBinary() + _ = yym17 if false { } else { - r.EncodeInt(int64(yy2079)) + r.EncodeInt(int64(yy16)) } } } else { r.EncodeNil() } } else { - if yyq2070[3] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("terminationGracePeriodSeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.TerminationGracePeriodSeconds == nil { r.EncodeNil() } else { - yy2081 := *x.TerminationGracePeriodSeconds - yym2082 := z.EncBinary() - _ = yym2082 + yy18 := *x.TerminationGracePeriodSeconds + yym19 := z.EncBinary() + _ = yym19 if false { } else { - r.EncodeInt(int64(yy2081)) + r.EncodeInt(int64(yy18)) } } } } - if yyr2070 || yy2arr2070 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2070[4] { + if yyq2[5] { if x.ActiveDeadlineSeconds == nil { r.EncodeNil() } else { - yy2084 := *x.ActiveDeadlineSeconds - yym2085 := z.EncBinary() - _ = yym2085 + yy21 := *x.ActiveDeadlineSeconds + yym22 := z.EncBinary() + _ = yym22 if false { } else { - r.EncodeInt(int64(yy2084)) + r.EncodeInt(int64(yy21)) } } } else { r.EncodeNil() } } else { - if yyq2070[4] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("activeDeadlineSeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ActiveDeadlineSeconds == nil { r.EncodeNil() } else { - yy2086 := *x.ActiveDeadlineSeconds - yym2087 := z.EncBinary() - _ = yym2087 + yy23 := *x.ActiveDeadlineSeconds + yym24 := z.EncBinary() + _ = yym24 if false { } else { - r.EncodeInt(int64(yy2086)) + r.EncodeInt(int64(yy23)) } } } } - if yyr2070 || yy2arr2070 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2070[5] { + if yyq2[6] { x.DNSPolicy.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2070[5] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("dnsPolicy")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.DNSPolicy.CodecEncodeSelf(e) } } - if yyr2070 || yy2arr2070 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2070[6] { + if yyq2[7] { if x.NodeSelector == nil { r.EncodeNil() } else { - yym2090 := z.EncBinary() - _ = yym2090 + yym29 := z.EncBinary() + _ = yym29 if false { } else { z.F.EncMapStringStringV(x.NodeSelector, false, e) @@ -28139,15 +34016,15 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2070[6] { + if yyq2[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeSelector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.NodeSelector == nil { r.EncodeNil() } else { - yym2091 := z.EncBinary() - _ = yym2091 + yym30 := z.EncBinary() + _ = yym30 if false { } else { z.F.EncMapStringStringV(x.NodeSelector, false, e) @@ -28155,30 +34032,96 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2070 || yy2arr2070 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2093 := z.EncBinary() - _ = yym2093 - if false { + if yyq2[8] { + yym32 := z.EncBinary() + _ = yym32 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("serviceAccountName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2094 := z.EncBinary() - _ = yym2094 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName)) + if yyq2[8] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("serviceAccountName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym33 := z.EncBinary() + _ = yym33 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName)) + } } } - if yyr2070 || yy2arr2070 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2070[8] { - yym2096 := z.EncBinary() - _ = yym2096 + if yyq2[9] { + yym35 := z.EncBinary() + _ = yym35 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.DeprecatedServiceAccount)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[9] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("serviceAccount")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym36 := z.EncBinary() + _ = yym36 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.DeprecatedServiceAccount)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[10] { + if x.AutomountServiceAccountToken == nil { + r.EncodeNil() + } else { + yy38 := *x.AutomountServiceAccountToken + yym39 := z.EncBinary() + _ = yym39 + if false { + } else { + r.EncodeBool(bool(yy38)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[10] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("automountServiceAccountToken")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.AutomountServiceAccountToken == nil { + r.EncodeNil() + } else { + yy40 := *x.AutomountServiceAccountToken + yym41 := z.EncBinary() + _ = yym41 + if false { + } else { + r.EncodeBool(bool(yy40)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[11] { + yym43 := z.EncBinary() + _ = yym43 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.NodeName)) @@ -28187,21 +34130,96 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2070[8] { + if yyq2[11] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2097 := z.EncBinary() - _ = yym2097 + yym44 := z.EncBinary() + _ = yym44 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.NodeName)) } } } - if yyr2070 || yy2arr2070 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2070[9] { + if yyq2[12] { + yym46 := z.EncBinary() + _ = yym46 + if false { + } else { + r.EncodeBool(bool(x.HostNetwork)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[12] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostNetwork")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym47 := z.EncBinary() + _ = yym47 + if false { + } else { + r.EncodeBool(bool(x.HostNetwork)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[13] { + yym49 := z.EncBinary() + _ = yym49 + if false { + } else { + r.EncodeBool(bool(x.HostPID)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[13] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostPID")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym50 := z.EncBinary() + _ = yym50 + if false { + } else { + r.EncodeBool(bool(x.HostPID)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[14] { + yym52 := z.EncBinary() + _ = yym52 + if false { + } else { + r.EncodeBool(bool(x.HostIPC)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[14] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("hostIPC")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym53 := z.EncBinary() + _ = yym53 + if false { + } else { + r.EncodeBool(bool(x.HostIPC)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[15] { if x.SecurityContext == nil { r.EncodeNil() } else { @@ -28211,7 +34229,7 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2070[9] { + if yyq2[15] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("securityContext")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -28222,14 +34240,14 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2070 || yy2arr2070 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2070[10] { + if yyq2[16] { if x.ImagePullSecrets == nil { r.EncodeNil() } else { - yym2100 := z.EncBinary() - _ = yym2100 + yym58 := z.EncBinary() + _ = yym58 if false { } else { h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) @@ -28239,15 +34257,15 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2070[10] { + if yyq2[16] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ImagePullSecrets == nil { r.EncodeNil() } else { - yym2101 := z.EncBinary() - _ = yym2101 + yym59 := z.EncBinary() + _ = yym59 if false { } else { h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) @@ -28255,11 +34273,11 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2070 || yy2arr2070 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2070[11] { - yym2103 := z.EncBinary() - _ = yym2103 + if yyq2[17] { + yym61 := z.EncBinary() + _ = yym61 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Hostname)) @@ -28268,23 +34286,23 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2070[11] { + if yyq2[17] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostname")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2104 := z.EncBinary() - _ = yym2104 + yym62 := z.EncBinary() + _ = yym62 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Hostname)) } } } - if yyr2070 || yy2arr2070 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2070[12] { - yym2106 := z.EncBinary() - _ = yym2106 + if yyq2[18] { + yym64 := z.EncBinary() + _ = yym64 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Subdomain)) @@ -28293,19 +34311,100 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2070[12] { + if yyq2[18] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("subdomain")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2107 := z.EncBinary() - _ = yym2107 + yym65 := z.EncBinary() + _ = yym65 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Subdomain)) } } } - if yyr2070 || yy2arr2070 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[19] { + if x.Affinity == nil { + r.EncodeNil() + } else { + x.Affinity.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[19] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("affinity")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Affinity == nil { + r.EncodeNil() + } else { + x.Affinity.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[20] { + yym70 := z.EncBinary() + _ = yym70 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[20] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("schedulerName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym71 := z.EncBinary() + _ = yym71 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[21] { + if x.Tolerations == nil { + r.EncodeNil() + } else { + yym73 := z.EncBinary() + _ = yym73 + if false { + } else { + h.encSliceToleration(([]Toleration)(x.Tolerations), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[21] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("tolerations")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Tolerations == nil { + r.EncodeNil() + } else { + yym74 := z.EncBinary() + _ = yym74 + if false { + } else { + h.encSliceToleration(([]Toleration)(x.Tolerations), e) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -28318,25 +34417,25 @@ func (x *PodSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2108 := z.DecBinary() - _ = yym2108 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2109 := r.ContainerType() - if yyct2109 == codecSelferValueTypeMap1234 { - yyl2109 := r.ReadMapStart() - if yyl2109 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2109, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2109 == codecSelferValueTypeArray1234 { - yyl2109 := r.ReadArrayStart() - if yyl2109 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2109, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -28348,12 +34447,12 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2110Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2110Slc - var yyhl2110 bool = l >= 0 - for yyj2110 := 0; ; yyj2110++ { - if yyhl2110 { - if yyj2110 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -28362,39 +34461,52 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2110Slc = r.DecodeBytes(yys2110Slc, true, true) - yys2110 := string(yys2110Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2110 { + switch yys3 { case "volumes": if r.TryDecodeAsNil() { x.Volumes = nil } else { - yyv2111 := &x.Volumes - yym2112 := z.DecBinary() - _ = yym2112 + yyv4 := &x.Volumes + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSliceVolume((*[]Volume)(yyv2111), d) + h.decSliceVolume((*[]Volume)(yyv4), d) + } + } + case "initContainers": + if r.TryDecodeAsNil() { + x.InitContainers = nil + } else { + yyv6 := &x.InitContainers + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + h.decSliceContainer((*[]Container)(yyv6), d) } } case "containers": if r.TryDecodeAsNil() { x.Containers = nil } else { - yyv2113 := &x.Containers - yym2114 := z.DecBinary() - _ = yym2114 + yyv8 := &x.Containers + yym9 := z.DecBinary() + _ = yym9 if false { } else { - h.decSliceContainer((*[]Container)(yyv2113), d) + h.decSliceContainer((*[]Container)(yyv8), d) } } case "restartPolicy": if r.TryDecodeAsNil() { x.RestartPolicy = "" } else { - x.RestartPolicy = RestartPolicy(r.DecodeString()) + yyv10 := &x.RestartPolicy + yyv10.CodecDecodeSelf(d) } case "terminationGracePeriodSeconds": if r.TryDecodeAsNil() { @@ -28405,8 +34517,8 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.TerminationGracePeriodSeconds == nil { x.TerminationGracePeriodSeconds = new(int64) } - yym2117 := z.DecBinary() - _ = yym2117 + yym12 := z.DecBinary() + _ = yym12 if false { } else { *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64)) @@ -28421,8 +34533,8 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.ActiveDeadlineSeconds == nil { x.ActiveDeadlineSeconds = new(int64) } - yym2119 := z.DecBinary() - _ = yym2119 + yym14 := z.DecBinary() + _ = yym14 if false { } else { *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) @@ -28432,31 +34544,108 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DNSPolicy = "" } else { - x.DNSPolicy = DNSPolicy(r.DecodeString()) + yyv15 := &x.DNSPolicy + yyv15.CodecDecodeSelf(d) } case "nodeSelector": if r.TryDecodeAsNil() { x.NodeSelector = nil } else { - yyv2121 := &x.NodeSelector - yym2122 := z.DecBinary() - _ = yym2122 + yyv16 := &x.NodeSelector + yym17 := z.DecBinary() + _ = yym17 if false { } else { - z.F.DecMapStringStringX(yyv2121, false, d) + z.F.DecMapStringStringX(yyv16, false, d) } } case "serviceAccountName": if r.TryDecodeAsNil() { x.ServiceAccountName = "" } else { - x.ServiceAccountName = string(r.DecodeString()) + yyv18 := &x.ServiceAccountName + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *((*string)(yyv18)) = r.DecodeString() + } + } + case "serviceAccount": + if r.TryDecodeAsNil() { + x.DeprecatedServiceAccount = "" + } else { + yyv20 := &x.DeprecatedServiceAccount + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + *((*string)(yyv20)) = r.DecodeString() + } + } + case "automountServiceAccountToken": + if r.TryDecodeAsNil() { + if x.AutomountServiceAccountToken != nil { + x.AutomountServiceAccountToken = nil + } + } else { + if x.AutomountServiceAccountToken == nil { + x.AutomountServiceAccountToken = new(bool) + } + yym23 := z.DecBinary() + _ = yym23 + if false { + } else { + *((*bool)(x.AutomountServiceAccountToken)) = r.DecodeBool() + } } case "nodeName": if r.TryDecodeAsNil() { x.NodeName = "" } else { - x.NodeName = string(r.DecodeString()) + yyv24 := &x.NodeName + yym25 := z.DecBinary() + _ = yym25 + if false { + } else { + *((*string)(yyv24)) = r.DecodeString() + } + } + case "hostNetwork": + if r.TryDecodeAsNil() { + x.HostNetwork = false + } else { + yyv26 := &x.HostNetwork + yym27 := z.DecBinary() + _ = yym27 + if false { + } else { + *((*bool)(yyv26)) = r.DecodeBool() + } + } + case "hostPID": + if r.TryDecodeAsNil() { + x.HostPID = false + } else { + yyv28 := &x.HostPID + yym29 := z.DecBinary() + _ = yym29 + if false { + } else { + *((*bool)(yyv28)) = r.DecodeBool() + } + } + case "hostIPC": + if r.TryDecodeAsNil() { + x.HostIPC = false + } else { + yyv30 := &x.HostIPC + yym31 := z.DecBinary() + _ = yym31 + if false { + } else { + *((*bool)(yyv30)) = r.DecodeBool() + } } case "securityContext": if r.TryDecodeAsNil() { @@ -28473,30 +34662,77 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv2126 := &x.ImagePullSecrets - yym2127 := z.DecBinary() - _ = yym2127 + yyv33 := &x.ImagePullSecrets + yym34 := z.DecBinary() + _ = yym34 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv2126), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv33), d) } } case "hostname": if r.TryDecodeAsNil() { x.Hostname = "" } else { - x.Hostname = string(r.DecodeString()) + yyv35 := &x.Hostname + yym36 := z.DecBinary() + _ = yym36 + if false { + } else { + *((*string)(yyv35)) = r.DecodeString() + } } case "subdomain": if r.TryDecodeAsNil() { x.Subdomain = "" } else { - x.Subdomain = string(r.DecodeString()) + yyv37 := &x.Subdomain + yym38 := z.DecBinary() + _ = yym38 + if false { + } else { + *((*string)(yyv37)) = r.DecodeString() + } + } + case "affinity": + if r.TryDecodeAsNil() { + if x.Affinity != nil { + x.Affinity = nil + } + } else { + if x.Affinity == nil { + x.Affinity = new(Affinity) + } + x.Affinity.CodecDecodeSelf(d) + } + case "schedulerName": + if r.TryDecodeAsNil() { + x.SchedulerName = "" + } else { + yyv40 := &x.SchedulerName + yym41 := z.DecBinary() + _ = yym41 + if false { + } else { + *((*string)(yyv40)) = r.DecodeString() + } + } + case "tolerations": + if r.TryDecodeAsNil() { + x.Tolerations = nil + } else { + yyv42 := &x.Tolerations + yym43 := z.DecBinary() + _ = yym43 + if false { + } else { + h.decSliceToleration((*[]Toleration)(yyv42), d) + } } default: - z.DecStructFieldNotFound(-1, yys2110) - } // end switch yys2110 - } // end for yyj2110 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -28504,16 +34740,16 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2130 int - var yyb2130 bool - var yyhl2130 bool = l >= 0 - yyj2130++ - if yyhl2130 { - yyb2130 = yyj2130 > l + var yyj44 int + var yyb44 bool + var yyhl44 bool = l >= 0 + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2130 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2130 { + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28521,21 +34757,43 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Volumes = nil } else { - yyv2131 := &x.Volumes - yym2132 := z.DecBinary() - _ = yym2132 + yyv45 := &x.Volumes + yym46 := z.DecBinary() + _ = yym46 if false { } else { - h.decSliceVolume((*[]Volume)(yyv2131), d) + h.decSliceVolume((*[]Volume)(yyv45), d) } } - yyj2130++ - if yyhl2130 { - yyb2130 = yyj2130 > l + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2130 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2130 { + if yyb44 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.InitContainers = nil + } else { + yyv47 := &x.InitContainers + yym48 := z.DecBinary() + _ = yym48 + if false { + } else { + h.decSliceContainer((*[]Container)(yyv47), d) + } + } + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l + } else { + yyb44 = r.CheckBreak() + } + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28543,21 +34801,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Containers = nil } else { - yyv2133 := &x.Containers - yym2134 := z.DecBinary() - _ = yym2134 + yyv49 := &x.Containers + yym50 := z.DecBinary() + _ = yym50 if false { } else { - h.decSliceContainer((*[]Container)(yyv2133), d) + h.decSliceContainer((*[]Container)(yyv49), d) } } - yyj2130++ - if yyhl2130 { - yyb2130 = yyj2130 > l + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2130 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2130 { + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28565,15 +34823,16 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.RestartPolicy = "" } else { - x.RestartPolicy = RestartPolicy(r.DecodeString()) + yyv51 := &x.RestartPolicy + yyv51.CodecDecodeSelf(d) } - yyj2130++ - if yyhl2130 { - yyb2130 = yyj2130 > l + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2130 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2130 { + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28586,20 +34845,20 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TerminationGracePeriodSeconds == nil { x.TerminationGracePeriodSeconds = new(int64) } - yym2137 := z.DecBinary() - _ = yym2137 + yym53 := z.DecBinary() + _ = yym53 if false { } else { *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64)) } } - yyj2130++ - if yyhl2130 { - yyb2130 = yyj2130 > l + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2130 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2130 { + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28612,20 +34871,20 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.ActiveDeadlineSeconds == nil { x.ActiveDeadlineSeconds = new(int64) } - yym2139 := z.DecBinary() - _ = yym2139 + yym55 := z.DecBinary() + _ = yym55 if false { } else { *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) } } - yyj2130++ - if yyhl2130 { - yyb2130 = yyj2130 > l + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2130 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2130 { + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28633,15 +34892,16 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DNSPolicy = "" } else { - x.DNSPolicy = DNSPolicy(r.DecodeString()) + yyv56 := &x.DNSPolicy + yyv56.CodecDecodeSelf(d) } - yyj2130++ - if yyhl2130 { - yyb2130 = yyj2130 > l + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2130 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2130 { + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28649,21 +34909,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeSelector = nil } else { - yyv2141 := &x.NodeSelector - yym2142 := z.DecBinary() - _ = yym2142 + yyv57 := &x.NodeSelector + yym58 := z.DecBinary() + _ = yym58 if false { } else { - z.F.DecMapStringStringX(yyv2141, false, d) + z.F.DecMapStringStringX(yyv57, false, d) } } - yyj2130++ - if yyhl2130 { - yyb2130 = yyj2130 > l + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2130 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2130 { + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28671,15 +34931,69 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ServiceAccountName = "" } else { - x.ServiceAccountName = string(r.DecodeString()) + yyv59 := &x.ServiceAccountName + yym60 := z.DecBinary() + _ = yym60 + if false { + } else { + *((*string)(yyv59)) = r.DecodeString() + } } - yyj2130++ - if yyhl2130 { - yyb2130 = yyj2130 > l + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2130 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2130 { + if yyb44 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.DeprecatedServiceAccount = "" + } else { + yyv61 := &x.DeprecatedServiceAccount + yym62 := z.DecBinary() + _ = yym62 + if false { + } else { + *((*string)(yyv61)) = r.DecodeString() + } + } + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l + } else { + yyb44 = r.CheckBreak() + } + if yyb44 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.AutomountServiceAccountToken != nil { + x.AutomountServiceAccountToken = nil + } + } else { + if x.AutomountServiceAccountToken == nil { + x.AutomountServiceAccountToken = new(bool) + } + yym64 := z.DecBinary() + _ = yym64 + if false { + } else { + *((*bool)(x.AutomountServiceAccountToken)) = r.DecodeBool() + } + } + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l + } else { + yyb44 = r.CheckBreak() + } + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28687,15 +35001,87 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeName = "" } else { - x.NodeName = string(r.DecodeString()) + yyv65 := &x.NodeName + yym66 := z.DecBinary() + _ = yym66 + if false { + } else { + *((*string)(yyv65)) = r.DecodeString() + } } - yyj2130++ - if yyhl2130 { - yyb2130 = yyj2130 > l + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2130 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2130 { + if yyb44 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostNetwork = false + } else { + yyv67 := &x.HostNetwork + yym68 := z.DecBinary() + _ = yym68 + if false { + } else { + *((*bool)(yyv67)) = r.DecodeBool() + } + } + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l + } else { + yyb44 = r.CheckBreak() + } + if yyb44 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostPID = false + } else { + yyv69 := &x.HostPID + yym70 := z.DecBinary() + _ = yym70 + if false { + } else { + *((*bool)(yyv69)) = r.DecodeBool() + } + } + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l + } else { + yyb44 = r.CheckBreak() + } + if yyb44 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostIPC = false + } else { + yyv71 := &x.HostIPC + yym72 := z.DecBinary() + _ = yym72 + if false { + } else { + *((*bool)(yyv71)) = r.DecodeBool() + } + } + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l + } else { + yyb44 = r.CheckBreak() + } + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28710,13 +35096,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.SecurityContext.CodecDecodeSelf(d) } - yyj2130++ - if yyhl2130 { - yyb2130 = yyj2130 > l + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2130 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2130 { + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28724,21 +35110,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv2146 := &x.ImagePullSecrets - yym2147 := z.DecBinary() - _ = yym2147 + yyv74 := &x.ImagePullSecrets + yym75 := z.DecBinary() + _ = yym75 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv2146), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv74), d) } } - yyj2130++ - if yyhl2130 { - yyb2130 = yyj2130 > l + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2130 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2130 { + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28746,15 +35132,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Hostname = "" } else { - x.Hostname = string(r.DecodeString()) + yyv76 := &x.Hostname + yym77 := z.DecBinary() + _ = yym77 + if false { + } else { + *((*string)(yyv76)) = r.DecodeString() + } } - yyj2130++ - if yyhl2130 { - yyb2130 = yyj2130 > l + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2130 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2130 { + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -28762,223 +35154,91 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Subdomain = "" } else { - x.Subdomain = string(r.DecodeString()) - } - for { - yyj2130++ - if yyhl2130 { - yyb2130 = yyj2130 > l - } else { - yyb2130 = r.CheckBreak() - } - if yyb2130 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2130-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - -func (x *Sysctl) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym2150 := z.EncBinary() - _ = yym2150 + yyv78 := &x.Subdomain + yym79 := z.DecBinary() + _ = yym79 if false { - } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2151 := !z.EncBinary() - yy2arr2151 := z.EncBasicHandle().StructToArray - var yyq2151 [2]bool - _, _, _ = yysep2151, yyq2151, yy2arr2151 - const yyr2151 bool = false - var yynn2151 int - if yyr2151 || yy2arr2151 { - r.EncodeArrayStart(2) - } else { - yynn2151 = 2 - for _, b := range yyq2151 { - if b { - yynn2151++ - } - } - r.EncodeMapStart(yynn2151) - yynn2151 = 0 - } - if yyr2151 || yy2arr2151 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2153 := z.EncBinary() - _ = yym2153 - 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) - yym2154 := z.EncBinary() - _ = yym2154 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } - if yyr2151 || yy2arr2151 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2156 := z.EncBinary() - _ = yym2156 - 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) - yym2157 := z.EncBinary() - _ = yym2157 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Value)) - } - } - if yyr2151 || yy2arr2151 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } + *((*string)(yyv78)) = r.DecodeString() } } -} - -func (x *Sysctl) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym2158 := z.DecBinary() - _ = yym2158 - if false { - } else if z.HasExtensions() && z.DecExt(x) { + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyct2159 := r.ContainerType() - if yyct2159 == codecSelferValueTypeMap1234 { - yyl2159 := r.ReadMapStart() - if yyl2159 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl2159, d) - } - } else if yyct2159 == codecSelferValueTypeArray1234 { - yyl2159 := r.ReadArrayStart() - if yyl2159 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl2159, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } + yyb44 = r.CheckBreak() } -} - -func (x *Sysctl) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys2160Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2160Slc - var yyhl2160 bool = l >= 0 - for yyj2160 := 0; ; yyj2160++ { - if yyhl2160 { - if yyj2160 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2160Slc = r.DecodeBytes(yys2160Slc, true, true) - yys2160 := string(yys2160Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2160 { - 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, yys2160) - } // end switch yys2160 - } // end for yyj2160 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *Sysctl) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj2163 int - var yyb2163 bool - var yyhl2163 bool = l >= 0 - yyj2163++ - if yyhl2163 { - yyb2163 = yyj2163 > l - } else { - yyb2163 = r.CheckBreak() - } - if yyb2163 { + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Name = "" + if x.Affinity != nil { + x.Affinity = nil + } } else { - x.Name = string(r.DecodeString()) + if x.Affinity == nil { + x.Affinity = new(Affinity) + } + x.Affinity.CodecDecodeSelf(d) } - yyj2163++ - if yyhl2163 { - yyb2163 = yyj2163 > l + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2163 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2163 { + if yyb44 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Value = "" + x.SchedulerName = "" } else { - x.Value = string(r.DecodeString()) + yyv81 := &x.SchedulerName + yym82 := z.DecBinary() + _ = yym82 + if false { + } else { + *((*string)(yyv81)) = r.DecodeString() + } + } + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l + } else { + yyb44 = r.CheckBreak() + } + if yyb44 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Tolerations = nil + } else { + yyv83 := &x.Tolerations + yym84 := z.DecBinary() + _ = yym84 + if false { + } else { + h.decSliceToleration((*[]Toleration)(yyv83), d) + } } for { - yyj2163++ - if yyhl2163 { - yyb2163 = yyj2163 > l + yyj44++ + if yyhl44 { + yyb44 = yyj44 > l } else { - yyb2163 = r.CheckBreak() + yyb44 = r.CheckBreak() } - if yyb2163 { + if yyb44 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2163-1, "") + z.DecStructFieldNotFound(yyj44-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -28990,115 +35250,37 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2166 := z.EncBinary() - _ = yym2166 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2167 := !z.EncBinary() - yy2arr2167 := z.EncBasicHandle().StructToArray - var yyq2167 [8]bool - _, _, _ = yysep2167, yyq2167, yy2arr2167 - const yyr2167 bool = false - yyq2167[0] = x.HostNetwork != false - yyq2167[1] = x.HostPID != false - yyq2167[2] = x.HostIPC != false - yyq2167[3] = x.SELinuxOptions != nil - yyq2167[4] = x.RunAsUser != nil - yyq2167[5] = x.RunAsNonRoot != nil - yyq2167[6] = len(x.SupplementalGroups) != 0 - yyq2167[7] = x.FSGroup != nil - var yynn2167 int - if yyr2167 || yy2arr2167 { - r.EncodeArrayStart(8) + 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 { - yynn2167 = 0 - for _, b := range yyq2167 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2167++ + yynn2++ } } - r.EncodeMapStart(yynn2167) - yynn2167 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2167 || yy2arr2167 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2167[0] { - yym2169 := z.EncBinary() - _ = yym2169 - if false { - } else { - r.EncodeBool(bool(x.HostNetwork)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq2167[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostNetwork")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2170 := z.EncBinary() - _ = yym2170 - if false { - } else { - r.EncodeBool(bool(x.HostNetwork)) - } - } - } - if yyr2167 || yy2arr2167 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2167[1] { - yym2172 := z.EncBinary() - _ = yym2172 - if false { - } else { - r.EncodeBool(bool(x.HostPID)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq2167[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostPID")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2173 := z.EncBinary() - _ = yym2173 - if false { - } else { - r.EncodeBool(bool(x.HostPID)) - } - } - } - if yyr2167 || yy2arr2167 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2167[2] { - yym2175 := z.EncBinary() - _ = yym2175 - if false { - } else { - r.EncodeBool(bool(x.HostIPC)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq2167[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("hostIPC")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2176 := z.EncBinary() - _ = yym2176 - if false { - } else { - r.EncodeBool(bool(x.HostIPC)) - } - } - } - if yyr2167 || yy2arr2167 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2167[3] { + if yyq2[0] { if x.SELinuxOptions == nil { r.EncodeNil() } else { @@ -29108,7 +35290,7 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2167[3] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -29119,84 +35301,84 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2167 || yy2arr2167 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2167[4] { + if yyq2[1] { if x.RunAsUser == nil { r.EncodeNil() } else { - yy2179 := *x.RunAsUser - yym2180 := z.EncBinary() - _ = yym2180 + yy7 := *x.RunAsUser + yym8 := z.EncBinary() + _ = yym8 if false { } else { - r.EncodeInt(int64(yy2179)) + r.EncodeInt(int64(yy7)) } } } else { r.EncodeNil() } } else { - if yyq2167[4] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsUser")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsUser == nil { r.EncodeNil() } else { - yy2181 := *x.RunAsUser - yym2182 := z.EncBinary() - _ = yym2182 + yy9 := *x.RunAsUser + yym10 := z.EncBinary() + _ = yym10 if false { } else { - r.EncodeInt(int64(yy2181)) + r.EncodeInt(int64(yy9)) } } } } - if yyr2167 || yy2arr2167 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2167[5] { + if yyq2[2] { if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy2184 := *x.RunAsNonRoot - yym2185 := z.EncBinary() - _ = yym2185 + yy12 := *x.RunAsNonRoot + yym13 := z.EncBinary() + _ = yym13 if false { } else { - r.EncodeBool(bool(yy2184)) + r.EncodeBool(bool(yy12)) } } } else { r.EncodeNil() } } else { - if yyq2167[5] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsNonRoot")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy2186 := *x.RunAsNonRoot - yym2187 := z.EncBinary() - _ = yym2187 + yy14 := *x.RunAsNonRoot + yym15 := z.EncBinary() + _ = yym15 if false { } else { - r.EncodeBool(bool(yy2186)) + r.EncodeBool(bool(yy14)) } } } } - if yyr2167 || yy2arr2167 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2167[6] { + if yyq2[3] { if x.SupplementalGroups == nil { r.EncodeNil() } else { - yym2189 := z.EncBinary() - _ = yym2189 + yym17 := z.EncBinary() + _ = yym17 if false { } else { z.F.EncSliceInt64V(x.SupplementalGroups, false, e) @@ -29206,15 +35388,15 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2167[6] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("supplementalGroups")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.SupplementalGroups == nil { r.EncodeNil() } else { - yym2190 := z.EncBinary() - _ = yym2190 + yym18 := z.EncBinary() + _ = yym18 if false { } else { z.F.EncSliceInt64V(x.SupplementalGroups, false, e) @@ -29222,42 +35404,42 @@ func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2167 || yy2arr2167 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2167[7] { + if yyq2[4] { if x.FSGroup == nil { r.EncodeNil() } else { - yy2192 := *x.FSGroup - yym2193 := z.EncBinary() - _ = yym2193 + yy20 := *x.FSGroup + yym21 := z.EncBinary() + _ = yym21 if false { } else { - r.EncodeInt(int64(yy2192)) + r.EncodeInt(int64(yy20)) } } } else { r.EncodeNil() } } else { - if yyq2167[7] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fsGroup")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.FSGroup == nil { r.EncodeNil() } else { - yy2194 := *x.FSGroup - yym2195 := z.EncBinary() - _ = yym2195 + yy22 := *x.FSGroup + yym23 := z.EncBinary() + _ = yym23 if false { } else { - r.EncodeInt(int64(yy2194)) + r.EncodeInt(int64(yy22)) } } } } - if yyr2167 || yy2arr2167 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -29270,25 +35452,25 @@ func (x *PodSecurityContext) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2196 := z.DecBinary() - _ = yym2196 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2197 := r.ContainerType() - if yyct2197 == codecSelferValueTypeMap1234 { - yyl2197 := r.ReadMapStart() - if yyl2197 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2197, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2197 == codecSelferValueTypeArray1234 { - yyl2197 := r.ReadArrayStart() - if yyl2197 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2197, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -29300,12 +35482,12 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2198Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2198Slc - var yyhl2198 bool = l >= 0 - for yyj2198 := 0; ; yyj2198++ { - if yyhl2198 { - if yyj2198 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -29314,28 +35496,10 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2198Slc = r.DecodeBytes(yys2198Slc, true, true) - yys2198 := string(yys2198Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2198 { - 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()) - } + switch yys3 { case "seLinuxOptions": if r.TryDecodeAsNil() { if x.SELinuxOptions != nil { @@ -29356,8 +35520,8 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym2204 := z.DecBinary() - _ = yym2204 + yym6 := z.DecBinary() + _ = yym6 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) @@ -29372,8 +35536,8 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym2206 := z.DecBinary() - _ = yym2206 + yym8 := z.DecBinary() + _ = yym8 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() @@ -29383,12 +35547,12 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.SupplementalGroups = nil } else { - yyv2207 := &x.SupplementalGroups - yym2208 := z.DecBinary() - _ = yym2208 + yyv9 := &x.SupplementalGroups + yym10 := z.DecBinary() + _ = yym10 if false { } else { - z.F.DecSliceInt64X(yyv2207, false, d) + z.F.DecSliceInt64X(yyv9, false, d) } } case "fsGroup": @@ -29400,17 +35564,17 @@ func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if x.FSGroup == nil { x.FSGroup = new(int64) } - yym2210 := z.DecBinary() - _ = yym2210 + yym12 := z.DecBinary() + _ = yym12 if false { } else { *((*int64)(x.FSGroup)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys2198) - } // end switch yys2198 - } // end for yyj2198 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -29418,64 +35582,16 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2211 int - var yyb2211 bool - var yyhl2211 bool = l >= 0 - yyj2211++ - if yyhl2211 { - yyb2211 = yyj2211 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb2211 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb2211 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostNetwork = false - } else { - x.HostNetwork = bool(r.DecodeBool()) - } - yyj2211++ - if yyhl2211 { - yyb2211 = yyj2211 > l - } else { - yyb2211 = r.CheckBreak() - } - if yyb2211 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostPID = false - } else { - x.HostPID = bool(r.DecodeBool()) - } - yyj2211++ - if yyhl2211 { - yyb2211 = yyj2211 > l - } else { - yyb2211 = r.CheckBreak() - } - if yyb2211 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostIPC = false - } else { - x.HostIPC = bool(r.DecodeBool()) - } - yyj2211++ - if yyhl2211 { - yyb2211 = yyj2211 > l - } else { - yyb2211 = r.CheckBreak() - } - if yyb2211 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29490,13 +35606,13 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode } x.SELinuxOptions.CodecDecodeSelf(d) } - yyj2211++ - if yyhl2211 { - yyb2211 = yyj2211 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb2211 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb2211 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29509,20 +35625,20 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym2217 := z.DecBinary() - _ = yym2217 + yym16 := z.DecBinary() + _ = yym16 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) } } - yyj2211++ - if yyhl2211 { - yyb2211 = yyj2211 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb2211 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb2211 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29535,20 +35651,20 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym2219 := z.DecBinary() - _ = yym2219 + yym18 := z.DecBinary() + _ = yym18 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() } } - yyj2211++ - if yyhl2211 { - yyb2211 = yyj2211 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb2211 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb2211 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29556,21 +35672,21 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.SupplementalGroups = nil } else { - yyv2220 := &x.SupplementalGroups - yym2221 := z.DecBinary() - _ = yym2221 + yyv19 := &x.SupplementalGroups + yym20 := z.DecBinary() + _ = yym20 if false { } else { - z.F.DecSliceInt64X(yyv2220, false, d) + z.F.DecSliceInt64X(yyv19, false, d) } } - yyj2211++ - if yyhl2211 { - yyb2211 = yyj2211 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb2211 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb2211 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -29583,29 +35699,55 @@ func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decode if x.FSGroup == nil { x.FSGroup = new(int64) } - yym2223 := z.DecBinary() - _ = yym2223 + yym22 := z.DecBinary() + _ = yym22 if false { } else { *((*int64)(x.FSGroup)) = int64(r.DecodeInt(64)) } } for { - yyj2211++ - if yyhl2211 { - yyb2211 = yyj2211 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb2211 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb2211 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2211-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } +func (x PodQOSClass) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *PodQOSClass) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -29613,60 +35755,62 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2224 := z.EncBinary() - _ = yym2224 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2225 := !z.EncBinary() - yy2arr2225 := z.EncBasicHandle().StructToArray - var yyq2225 [8]bool - _, _, _ = yysep2225, yyq2225, yy2arr2225 - const yyr2225 bool = false - yyq2225[0] = x.Phase != "" - yyq2225[1] = len(x.Conditions) != 0 - yyq2225[2] = x.Message != "" - yyq2225[3] = x.Reason != "" - yyq2225[4] = x.HostIP != "" - yyq2225[5] = x.PodIP != "" - yyq2225[6] = x.StartTime != nil - yyq2225[7] = len(x.ContainerStatuses) != 0 - var yynn2225 int - if yyr2225 || yy2arr2225 { - r.EncodeArrayStart(8) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [10]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Phase != "" + yyq2[1] = len(x.Conditions) != 0 + yyq2[2] = x.Message != "" + yyq2[3] = x.Reason != "" + yyq2[4] = x.HostIP != "" + yyq2[5] = x.PodIP != "" + yyq2[6] = x.StartTime != nil + yyq2[7] = len(x.InitContainerStatuses) != 0 + yyq2[8] = len(x.ContainerStatuses) != 0 + yyq2[9] = x.QOSClass != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(10) } else { - yynn2225 = 0 - for _, b := range yyq2225 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2225++ + yynn2++ } } - r.EncodeMapStart(yynn2225) - yynn2225 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2225 || yy2arr2225 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2225[0] { + if yyq2[0] { x.Phase.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2225[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("phase")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Phase.CodecEncodeSelf(e) } } - if yyr2225 || yy2arr2225 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2225[1] { + if yyq2[1] { if x.Conditions == nil { r.EncodeNil() } else { - yym2228 := z.EncBinary() - _ = yym2228 + yym7 := z.EncBinary() + _ = yym7 if false { } else { h.encSlicePodCondition(([]PodCondition)(x.Conditions), e) @@ -29676,15 +35820,15 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2225[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("conditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Conditions == nil { r.EncodeNil() } else { - yym2229 := z.EncBinary() - _ = yym2229 + yym8 := z.EncBinary() + _ = yym8 if false { } else { h.encSlicePodCondition(([]PodCondition)(x.Conditions), e) @@ -29692,11 +35836,11 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2225 || yy2arr2225 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2225[2] { - yym2231 := z.EncBinary() - _ = yym2231 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -29705,23 +35849,23 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2225[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2232 := z.EncBinary() - _ = yym2232 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr2225 || yy2arr2225 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2225[3] { - yym2234 := z.EncBinary() - _ = yym2234 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -29730,23 +35874,23 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2225[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2235 := z.EncBinary() - _ = yym2235 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr2225 || yy2arr2225 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2225[4] { - yym2237 := z.EncBinary() - _ = yym2237 + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.HostIP)) @@ -29755,23 +35899,23 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2225[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostIP")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2238 := z.EncBinary() - _ = yym2238 + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.HostIP)) } } } - if yyr2225 || yy2arr2225 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2225[5] { - yym2240 := z.EncBinary() - _ = yym2240 + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodIP)) @@ -29780,31 +35924,31 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2225[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podIP")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2241 := z.EncBinary() - _ = yym2241 + yym20 := z.EncBinary() + _ = yym20 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodIP)) } } } - if yyr2225 || yy2arr2225 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2225[6] { + if yyq2[6] { if x.StartTime == nil { r.EncodeNil() } else { - yym2243 := z.EncBinary() - _ = yym2243 + yym22 := z.EncBinary() + _ = yym22 if false { } else if z.HasExtensions() && z.EncExt(x.StartTime) { - } else if yym2243 { + } else if yym22 { z.EncBinaryMarshal(x.StartTime) - } else if !yym2243 && z.IsJSONHandle() { + } else if !yym22 && z.IsJSONHandle() { z.EncJSONMarshal(x.StartTime) } else { z.EncFallback(x.StartTime) @@ -29814,20 +35958,20 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2225[6] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("startTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.StartTime == nil { r.EncodeNil() } else { - yym2244 := z.EncBinary() - _ = yym2244 + yym23 := z.EncBinary() + _ = yym23 if false { } else if z.HasExtensions() && z.EncExt(x.StartTime) { - } else if yym2244 { + } else if yym23 { z.EncBinaryMarshal(x.StartTime) - } else if !yym2244 && z.IsJSONHandle() { + } else if !yym23 && z.IsJSONHandle() { z.EncJSONMarshal(x.StartTime) } else { z.EncFallback(x.StartTime) @@ -29835,14 +35979,47 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2225 || yy2arr2225 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2225[7] { + if yyq2[7] { + if x.InitContainerStatuses == nil { + r.EncodeNil() + } else { + yym25 := z.EncBinary() + _ = yym25 + if false { + } else { + h.encSliceContainerStatus(([]ContainerStatus)(x.InitContainerStatuses), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[7] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("initContainerStatuses")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.InitContainerStatuses == nil { + r.EncodeNil() + } else { + yym26 := z.EncBinary() + _ = yym26 + if false { + } else { + h.encSliceContainerStatus(([]ContainerStatus)(x.InitContainerStatuses), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[8] { if x.ContainerStatuses == nil { r.EncodeNil() } else { - yym2246 := z.EncBinary() - _ = yym2246 + yym28 := z.EncBinary() + _ = yym28 if false { } else { h.encSliceContainerStatus(([]ContainerStatus)(x.ContainerStatuses), e) @@ -29852,15 +36029,15 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2225[7] { + if yyq2[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerStatuses")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ContainerStatuses == nil { r.EncodeNil() } else { - yym2247 := z.EncBinary() - _ = yym2247 + yym29 := z.EncBinary() + _ = yym29 if false { } else { h.encSliceContainerStatus(([]ContainerStatus)(x.ContainerStatuses), e) @@ -29868,7 +36045,22 @@ func (x *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2225 || yy2arr2225 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[9] { + x.QOSClass.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[9] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("qosClass")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.QOSClass.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -29881,25 +36073,25 @@ func (x *PodStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2248 := z.DecBinary() - _ = yym2248 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2249 := r.ContainerType() - if yyct2249 == codecSelferValueTypeMap1234 { - yyl2249 := r.ReadMapStart() - if yyl2249 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2249, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2249 == codecSelferValueTypeArray1234 { - yyl2249 := r.ReadArrayStart() - if yyl2249 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2249, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -29911,12 +36103,12 @@ func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2250Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2250Slc - var yyhl2250 bool = l >= 0 - for yyj2250 := 0; ; yyj2250++ { - if yyhl2250 { - if yyj2250 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -29925,51 +36117,76 @@ func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2250Slc = r.DecodeBytes(yys2250Slc, true, true) - yys2250 := string(yys2250Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2250 { + switch yys3 { case "phase": if r.TryDecodeAsNil() { x.Phase = "" } else { - x.Phase = PodPhase(r.DecodeString()) + yyv4 := &x.Phase + yyv4.CodecDecodeSelf(d) } case "conditions": if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv2252 := &x.Conditions - yym2253 := z.DecBinary() - _ = yym2253 + yyv5 := &x.Conditions + yym6 := z.DecBinary() + _ = yym6 if false { } else { - h.decSlicePodCondition((*[]PodCondition)(yyv2252), d) + h.decSlicePodCondition((*[]PodCondition)(yyv5), d) } } case "message": if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv7 := &x.Message + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*string)(yyv7)) = r.DecodeString() + } } case "reason": if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv9 := &x.Reason + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } } case "hostIP": if r.TryDecodeAsNil() { x.HostIP = "" } else { - x.HostIP = string(r.DecodeString()) + yyv11 := &x.HostIP + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } case "podIP": if r.TryDecodeAsNil() { x.PodIP = "" } else { - x.PodIP = string(r.DecodeString()) + yyv13 := &x.PodIP + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } case "startTime": if r.TryDecodeAsNil() { @@ -29978,36 +36195,55 @@ func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } else { if x.StartTime == nil { - x.StartTime = new(pkg2_unversioned.Time) + x.StartTime = new(pkg2_v1.Time) } - yym2259 := z.DecBinary() - _ = yym2259 + yym16 := z.DecBinary() + _ = yym16 if false { } else if z.HasExtensions() && z.DecExt(x.StartTime) { - } else if yym2259 { + } else if yym16 { z.DecBinaryUnmarshal(x.StartTime) - } else if !yym2259 && z.IsJSONHandle() { + } else if !yym16 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.StartTime) } else { z.DecFallback(x.StartTime, false) } } + case "initContainerStatuses": + if r.TryDecodeAsNil() { + x.InitContainerStatuses = nil + } else { + yyv17 := &x.InitContainerStatuses + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + h.decSliceContainerStatus((*[]ContainerStatus)(yyv17), d) + } + } case "containerStatuses": if r.TryDecodeAsNil() { x.ContainerStatuses = nil } else { - yyv2260 := &x.ContainerStatuses - yym2261 := z.DecBinary() - _ = yym2261 + yyv19 := &x.ContainerStatuses + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceContainerStatus((*[]ContainerStatus)(yyv2260), d) + h.decSliceContainerStatus((*[]ContainerStatus)(yyv19), d) } } + case "qosClass": + if r.TryDecodeAsNil() { + x.QOSClass = "" + } else { + yyv21 := &x.QOSClass + yyv21.CodecDecodeSelf(d) + } default: - z.DecStructFieldNotFound(-1, yys2250) - } // end switch yys2250 - } // end for yyj2250 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -30015,16 +36251,16 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2262 int - var yyb2262 bool - var yyhl2262 bool = l >= 0 - yyj2262++ - if yyhl2262 { - yyb2262 = yyj2262 > l + var yyj22 int + var yyb22 bool + var yyhl22 bool = l >= 0 + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2262 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2262 { + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30032,15 +36268,16 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Phase = "" } else { - x.Phase = PodPhase(r.DecodeString()) + yyv23 := &x.Phase + yyv23.CodecDecodeSelf(d) } - yyj2262++ - if yyhl2262 { - yyb2262 = yyj2262 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2262 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2262 { + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30048,21 +36285,21 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv2264 := &x.Conditions - yym2265 := z.DecBinary() - _ = yym2265 + yyv24 := &x.Conditions + yym25 := z.DecBinary() + _ = yym25 if false { } else { - h.decSlicePodCondition((*[]PodCondition)(yyv2264), d) + h.decSlicePodCondition((*[]PodCondition)(yyv24), d) } } - yyj2262++ - if yyhl2262 { - yyb2262 = yyj2262 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2262 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2262 { + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30070,15 +36307,21 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv26 := &x.Message + yym27 := z.DecBinary() + _ = yym27 + if false { + } else { + *((*string)(yyv26)) = r.DecodeString() + } } - yyj2262++ - if yyhl2262 { - yyb2262 = yyj2262 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2262 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2262 { + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30086,15 +36329,21 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv28 := &x.Reason + yym29 := z.DecBinary() + _ = yym29 + if false { + } else { + *((*string)(yyv28)) = r.DecodeString() + } } - yyj2262++ - if yyhl2262 { - yyb2262 = yyj2262 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2262 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2262 { + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30102,15 +36351,21 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.HostIP = "" } else { - x.HostIP = string(r.DecodeString()) + yyv30 := &x.HostIP + yym31 := z.DecBinary() + _ = yym31 + if false { + } else { + *((*string)(yyv30)) = r.DecodeString() + } } - yyj2262++ - if yyhl2262 { - yyb2262 = yyj2262 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2262 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2262 { + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30118,15 +36373,21 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.PodIP = "" } else { - x.PodIP = string(r.DecodeString()) + yyv32 := &x.PodIP + yym33 := z.DecBinary() + _ = yym33 + if false { + } else { + *((*string)(yyv32)) = r.DecodeString() + } } - yyj2262++ - if yyhl2262 { - yyb2262 = yyj2262 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2262 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2262 { + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30137,27 +36398,49 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } } else { if x.StartTime == nil { - x.StartTime = new(pkg2_unversioned.Time) + x.StartTime = new(pkg2_v1.Time) } - yym2271 := z.DecBinary() - _ = yym2271 + yym35 := z.DecBinary() + _ = yym35 if false { } else if z.HasExtensions() && z.DecExt(x.StartTime) { - } else if yym2271 { + } else if yym35 { z.DecBinaryUnmarshal(x.StartTime) - } else if !yym2271 && z.IsJSONHandle() { + } else if !yym35 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.StartTime) } else { z.DecFallback(x.StartTime, false) } } - yyj2262++ - if yyhl2262 { - yyb2262 = yyj2262 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2262 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2262 { + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.InitContainerStatuses = nil + } else { + yyv36 := &x.InitContainerStatuses + yym37 := z.DecBinary() + _ = yym37 + if false { + } else { + h.decSliceContainerStatus((*[]ContainerStatus)(yyv36), d) + } + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30165,26 +36448,43 @@ func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ContainerStatuses = nil } else { - yyv2272 := &x.ContainerStatuses - yym2273 := z.DecBinary() - _ = yym2273 + yyv38 := &x.ContainerStatuses + yym39 := z.DecBinary() + _ = yym39 if false { } else { - h.decSliceContainerStatus((*[]ContainerStatus)(yyv2272), d) + h.decSliceContainerStatus((*[]ContainerStatus)(yyv38), d) } } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.QOSClass = "" + } else { + yyv40 := &x.QOSClass + yyv40.CodecDecodeSelf(d) + } for { - yyj2262++ - if yyhl2262 { - yyb2262 = yyj2262 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2262 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2262 { + if yyb22 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2262-1, "") + z.DecStructFieldNotFound(yyj22-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -30196,38 +36496,38 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2274 := z.EncBinary() - _ = yym2274 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2275 := !z.EncBinary() - yy2arr2275 := z.EncBasicHandle().StructToArray - var yyq2275 [4]bool - _, _, _ = yysep2275, yyq2275, yy2arr2275 - const yyr2275 bool = false - yyq2275[0] = x.Kind != "" - yyq2275[1] = x.APIVersion != "" - yyq2275[2] = true - yyq2275[3] = true - var yynn2275 int - if yyr2275 || yy2arr2275 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn2275 = 0 - for _, b := range yyq2275 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2275++ + yynn2++ } } - r.EncodeMapStart(yynn2275) - yynn2275 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2275 || yy2arr2275 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2275[0] { - yym2277 := z.EncBinary() - _ = yym2277 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -30236,23 +36536,23 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2275[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2278 := z.EncBinary() - _ = yym2278 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2275 || yy2arr2275 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2275[1] { - yym2280 := z.EncBinary() - _ = yym2280 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -30261,53 +36561,65 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2275[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2281 := z.EncBinary() - _ = yym2281 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2275 || yy2arr2275 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2275[2] { - yy2283 := &x.ObjectMeta - yy2283.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq2275[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2284 := &x.ObjectMeta - yy2284.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr2275 || yy2arr2275 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2275[3] { - yy2286 := &x.Status - yy2286.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Status + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2275[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2287 := &x.Status - yy2287.CodecEncodeSelf(e) + yy17 := &x.Status + yy17.CodecEncodeSelf(e) } } - if yyr2275 || yy2arr2275 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -30320,25 +36632,25 @@ func (x *PodStatusResult) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2288 := z.DecBinary() - _ = yym2288 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2289 := r.ContainerType() - if yyct2289 == codecSelferValueTypeMap1234 { - yyl2289 := r.ReadMapStart() - if yyl2289 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2289, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2289 == codecSelferValueTypeArray1234 { - yyl2289 := r.ReadArrayStart() - if yyl2289 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2289, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -30350,12 +36662,12 @@ func (x *PodStatusResult) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2290Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2290Slc - var yyhl2290 bool = l >= 0 - for yyj2290 := 0; ; yyj2290++ { - if yyhl2290 { - if yyj2290 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -30364,40 +36676,58 @@ func (x *PodStatusResult) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2290Slc = r.DecodeBytes(yys2290Slc, true, true) - yys2290 := string(yys2290Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2290 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2293 := &x.ObjectMeta - yyv2293.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "status": if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv2294 := &x.Status - yyv2294.CodecDecodeSelf(d) + yyv10 := &x.Status + yyv10.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2290) - } // end switch yys2290 - } // end for yyj2290 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -30405,16 +36735,16 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2295 int - var yyb2295 bool - var yyhl2295 bool = l >= 0 - yyj2295++ - if yyhl2295 { - yyb2295 = yyj2295 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2295 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2295 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30422,15 +36752,21 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } - yyj2295++ - if yyhl2295 { - yyb2295 = yyj2295 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2295 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2295 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30438,32 +36774,44 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj2295++ - if yyhl2295 { - yyb2295 = yyj2295 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2295 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2295 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2298 := &x.ObjectMeta - yyv2298.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj2295++ - if yyhl2295 { - yyb2295 = yyj2295 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2295 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2295 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30471,21 +36819,21 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv2299 := &x.Status - yyv2299.CodecDecodeSelf(d) + yyv18 := &x.Status + yyv18.CodecDecodeSelf(d) } for { - yyj2295++ - if yyhl2295 { - yyb2295 = yyj2295 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2295 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2295 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2295-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -30497,39 +36845,39 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2300 := z.EncBinary() - _ = yym2300 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2301 := !z.EncBinary() - yy2arr2301 := z.EncBasicHandle().StructToArray - var yyq2301 [5]bool - _, _, _ = yysep2301, yyq2301, yy2arr2301 - const yyr2301 bool = false - yyq2301[0] = x.Kind != "" - yyq2301[1] = x.APIVersion != "" - yyq2301[2] = true - yyq2301[3] = true - yyq2301[4] = true - var yynn2301 int - if yyr2301 || yy2arr2301 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn2301 = 0 - for _, b := range yyq2301 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2301++ + yynn2++ } } - r.EncodeMapStart(yynn2301) - yynn2301 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2301 || yy2arr2301 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2301[0] { - yym2303 := z.EncBinary() - _ = yym2303 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -30538,23 +36886,23 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2301[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2304 := z.EncBinary() - _ = yym2304 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2301 || yy2arr2301 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2301[1] { - yym2306 := z.EncBinary() - _ = yym2306 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -30563,70 +36911,82 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2301[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2307 := z.EncBinary() - _ = yym2307 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2301 || yy2arr2301 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2301[2] { - yy2309 := &x.ObjectMeta - yy2309.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq2301[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2310 := &x.ObjectMeta - yy2310.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr2301 || yy2arr2301 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2301[3] { - yy2312 := &x.Spec - yy2312.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2301[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2313 := &x.Spec - yy2313.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr2301 || yy2arr2301 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2301[4] { - yy2315 := &x.Status - yy2315.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2301[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2316 := &x.Status - yy2316.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr2301 || yy2arr2301 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -30639,25 +36999,25 @@ func (x *Pod) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2317 := z.DecBinary() - _ = yym2317 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2318 := r.ContainerType() - if yyct2318 == codecSelferValueTypeMap1234 { - yyl2318 := r.ReadMapStart() - if yyl2318 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2318, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2318 == codecSelferValueTypeArray1234 { - yyl2318 := r.ReadArrayStart() - if yyl2318 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2318, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -30669,12 +37029,12 @@ func (x *Pod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2319Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2319Slc - var yyhl2319 bool = l >= 0 - for yyj2319 := 0; ; yyj2319++ { - if yyhl2319 { - if yyj2319 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -30683,47 +37043,65 @@ func (x *Pod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2319Slc = r.DecodeBytes(yys2319Slc, true, true) - yys2319 := string(yys2319Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2319 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2322 := &x.ObjectMeta - yyv2322.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv2323 := &x.Spec - yyv2323.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv2324 := &x.Status - yyv2324.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2319) - } // end switch yys2319 - } // end for yyj2319 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -30731,16 +37109,16 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2325 int - var yyb2325 bool - var yyhl2325 bool = l >= 0 - yyj2325++ - if yyhl2325 { - yyb2325 = yyj2325 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2325 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2325 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30748,15 +37126,21 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj2325++ - if yyhl2325 { - yyb2325 = yyj2325 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2325 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2325 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30764,32 +37148,44 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj2325++ - if yyhl2325 { - yyb2325 = yyj2325 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2325 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2325 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2328 := &x.ObjectMeta - yyv2328.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj2325++ - if yyhl2325 { - yyb2325 = yyj2325 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2325 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2325 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30797,16 +37193,16 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv2329 := &x.Spec - yyv2329.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj2325++ - if yyhl2325 { - yyb2325 = yyj2325 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2325 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2325 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30814,21 +37210,389 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv2330 := &x.Status - yyv2330.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj2325++ - if yyhl2325 { - yyb2325 = yyj2325 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2325 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2325 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2325-1, "") + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PodList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSlicePod(([]Pod)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSlicePod(([]Pod)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PodList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PodList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg2_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSlicePod((*[]Pod)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PodList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg2_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSlicePod((*[]Pod)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -30840,66 +37604,78 @@ func (x *PodTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2331 := z.EncBinary() - _ = yym2331 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2332 := !z.EncBinary() - yy2arr2332 := z.EncBasicHandle().StructToArray - var yyq2332 [2]bool - _, _, _ = yysep2332, yyq2332, yy2arr2332 - const yyr2332 bool = false - yyq2332[0] = true - yyq2332[1] = true - var yynn2332 int - if yyr2332 || yy2arr2332 { + 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 { - yynn2332 = 0 - for _, b := range yyq2332 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2332++ + yynn2++ } } - r.EncodeMapStart(yynn2332) - yynn2332 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2332 || yy2arr2332 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2332[0] { - yy2334 := &x.ObjectMeta - yy2334.CodecEncodeSelf(e) + if yyq2[0] { + yy4 := &x.ObjectMeta + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(yy4) { + } else { + z.EncFallback(yy4) + } } else { r.EncodeNil() } } else { - if yyq2332[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2335 := &x.ObjectMeta - yy2335.CodecEncodeSelf(e) + yy6 := &x.ObjectMeta + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(yy6) { + } else { + z.EncFallback(yy6) + } } } - if yyr2332 || yy2arr2332 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2332[1] { - yy2337 := &x.Spec - yy2337.CodecEncodeSelf(e) + if yyq2[1] { + yy9 := &x.Spec + yy9.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2332[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2338 := &x.Spec - yy2338.CodecEncodeSelf(e) + yy11 := &x.Spec + yy11.CodecEncodeSelf(e) } } - if yyr2332 || yy2arr2332 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -30912,25 +37688,25 @@ func (x *PodTemplateSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2339 := z.DecBinary() - _ = yym2339 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2340 := r.ContainerType() - if yyct2340 == codecSelferValueTypeMap1234 { - yyl2340 := r.ReadMapStart() - if yyl2340 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2340, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2340 == codecSelferValueTypeArray1234 { - yyl2340 := r.ReadArrayStart() - if yyl2340 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2340, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -30942,12 +37718,12 @@ func (x *PodTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2341Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2341Slc - var yyhl2341 bool = l >= 0 - for yyj2341 := 0; ; yyj2341++ { - if yyhl2341 { - if yyj2341 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -30956,28 +37732,34 @@ func (x *PodTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2341Slc = r.DecodeBytes(yys2341Slc, true, true) - yys2341 := string(yys2341Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2341 { + switch yys3 { case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2342 := &x.ObjectMeta - yyv2342.CodecDecodeSelf(d) + yyv4 := &x.ObjectMeta + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else { + z.DecFallback(yyv4, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv2343 := &x.Spec - yyv2343.CodecDecodeSelf(d) + yyv6 := &x.Spec + yyv6.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2341) - } // end switch yys2341 - } // end for yyj2341 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -30985,33 +37767,39 @@ func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2344 int - var yyb2344 bool - var yyhl2344 bool = l >= 0 - yyj2344++ - if yyhl2344 { - yyb2344 = yyj2344 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb2344 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb2344 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2345 := &x.ObjectMeta - yyv2345.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } - yyj2344++ - if yyhl2344 { - yyb2344 = yyj2344 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb2344 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb2344 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31019,21 +37807,21 @@ func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv2346 := &x.Spec - yyv2346.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } for { - yyj2344++ - if yyhl2344 { - yyb2344 = yyj2344 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb2344 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb2344 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2344-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -31045,38 +37833,38 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2347 := z.EncBinary() - _ = yym2347 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2348 := !z.EncBinary() - yy2arr2348 := z.EncBasicHandle().StructToArray - var yyq2348 [4]bool - _, _, _ = yysep2348, yyq2348, yy2arr2348 - const yyr2348 bool = false - yyq2348[0] = x.Kind != "" - yyq2348[1] = x.APIVersion != "" - yyq2348[2] = true - yyq2348[3] = true - var yynn2348 int - if yyr2348 || yy2arr2348 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn2348 = 0 - for _, b := range yyq2348 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2348++ + yynn2++ } } - r.EncodeMapStart(yynn2348) - yynn2348 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2348 || yy2arr2348 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2348[0] { - yym2350 := z.EncBinary() - _ = yym2350 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -31085,23 +37873,23 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2348[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2351 := z.EncBinary() - _ = yym2351 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2348 || yy2arr2348 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2348[1] { - yym2353 := z.EncBinary() - _ = yym2353 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -31110,53 +37898,65 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2348[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2354 := z.EncBinary() - _ = yym2354 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2348 || yy2arr2348 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2348[2] { - yy2356 := &x.ObjectMeta - yy2356.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq2348[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2357 := &x.ObjectMeta - yy2357.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr2348 || yy2arr2348 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2348[3] { - yy2359 := &x.Template - yy2359.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Template + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2348[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("template")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2360 := &x.Template - yy2360.CodecEncodeSelf(e) + yy17 := &x.Template + yy17.CodecEncodeSelf(e) } } - if yyr2348 || yy2arr2348 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -31169,25 +37969,25 @@ func (x *PodTemplate) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2361 := z.DecBinary() - _ = yym2361 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2362 := r.ContainerType() - if yyct2362 == codecSelferValueTypeMap1234 { - yyl2362 := r.ReadMapStart() - if yyl2362 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2362, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2362 == codecSelferValueTypeArray1234 { - yyl2362 := r.ReadArrayStart() - if yyl2362 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2362, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -31199,12 +37999,12 @@ func (x *PodTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2363Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2363Slc - var yyhl2363 bool = l >= 0 - for yyj2363 := 0; ; yyj2363++ { - if yyhl2363 { - if yyj2363 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -31213,40 +38013,58 @@ func (x *PodTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2363Slc = r.DecodeBytes(yys2363Slc, true, true) - yys2363 := string(yys2363Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2363 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2366 := &x.ObjectMeta - yyv2366.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "template": if r.TryDecodeAsNil() { x.Template = PodTemplateSpec{} } else { - yyv2367 := &x.Template - yyv2367.CodecDecodeSelf(d) + yyv10 := &x.Template + yyv10.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2363) - } // end switch yys2363 - } // end for yyj2363 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -31254,16 +38072,16 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2368 int - var yyb2368 bool - var yyhl2368 bool = l >= 0 - yyj2368++ - if yyhl2368 { - yyb2368 = yyj2368 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2368 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2368 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31271,15 +38089,21 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } - yyj2368++ - if yyhl2368 { - yyb2368 = yyj2368 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2368 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2368 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31287,32 +38111,44 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj2368++ - if yyhl2368 { - yyb2368 = yyj2368 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2368 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2368 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2371 := &x.ObjectMeta - yyv2371.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj2368++ - if yyhl2368 { - yyb2368 = yyj2368 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2368 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2368 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31320,21 +38156,21 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Template = PodTemplateSpec{} } else { - yyv2372 := &x.Template - yyv2372.CodecDecodeSelf(d) + yyv18 := &x.Template + yyv18.CodecDecodeSelf(d) } for { - yyj2368++ - if yyhl2368 { - yyb2368 = yyj2368 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2368 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2368 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2368-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -31346,37 +38182,37 @@ func (x *PodTemplateList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2373 := z.EncBinary() - _ = yym2373 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2374 := !z.EncBinary() - yy2arr2374 := z.EncBasicHandle().StructToArray - var yyq2374 [4]bool - _, _, _ = yysep2374, yyq2374, yy2arr2374 - const yyr2374 bool = false - yyq2374[0] = x.Kind != "" - yyq2374[1] = x.APIVersion != "" - yyq2374[2] = true - var yynn2374 int - if yyr2374 || yy2arr2374 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn2374 = 1 - for _, b := range yyq2374 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn2374++ + yynn2++ } } - r.EncodeMapStart(yynn2374) - yynn2374 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2374 || yy2arr2374 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2374[0] { - yym2376 := z.EncBinary() - _ = yym2376 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -31385,23 +38221,23 @@ func (x *PodTemplateList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2374[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2377 := z.EncBinary() - _ = yym2377 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2374 || yy2arr2374 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2374[1] { - yym2379 := z.EncBinary() - _ = yym2379 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -31410,54 +38246,54 @@ func (x *PodTemplateList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2374[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2380 := z.EncBinary() - _ = yym2380 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2374 || yy2arr2374 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2374[2] { - yy2382 := &x.ListMeta - yym2383 := z.EncBinary() - _ = yym2383 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy2382) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy2382) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq2374[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2384 := &x.ListMeta - yym2385 := z.EncBinary() - _ = yym2385 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy2384) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy2384) + z.EncFallback(yy12) } } } - if yyr2374 || yy2arr2374 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym2387 := z.EncBinary() - _ = yym2387 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSlicePodTemplate(([]PodTemplate)(x.Items), e) @@ -31470,15 +38306,15 @@ func (x *PodTemplateList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym2388 := z.EncBinary() - _ = yym2388 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSlicePodTemplate(([]PodTemplate)(x.Items), e) } } } - if yyr2374 || yy2arr2374 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -31491,25 +38327,25 @@ func (x *PodTemplateList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2389 := z.DecBinary() - _ = yym2389 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2390 := r.ContainerType() - if yyct2390 == codecSelferValueTypeMap1234 { - yyl2390 := r.ReadMapStart() - if yyl2390 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2390, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2390 == codecSelferValueTypeArray1234 { - yyl2390 := r.ReadArrayStart() - if yyl2390 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2390, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -31521,12 +38357,12 @@ func (x *PodTemplateList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2391Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2391Slc - var yyhl2391 bool = l >= 0 - for yyj2391 := 0; ; yyj2391++ { - if yyhl2391 { - if yyj2391 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -31535,51 +38371,63 @@ func (x *PodTemplateList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2391Slc = r.DecodeBytes(yys2391Slc, true, true) - yys2391 := string(yys2391Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2391 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv2394 := &x.ListMeta - yym2395 := z.DecBinary() - _ = yym2395 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv2394) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv2394, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2396 := &x.Items - yym2397 := z.DecBinary() - _ = yym2397 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSlicePodTemplate((*[]PodTemplate)(yyv2396), d) + h.decSlicePodTemplate((*[]PodTemplate)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys2391) - } // end switch yys2391 - } // end for yyj2391 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -31587,16 +38435,16 @@ func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2398 int - var yyb2398 bool - var yyhl2398 bool = l >= 0 - yyj2398++ - if yyhl2398 { - yyb2398 = yyj2398 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2398 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2398 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31604,15 +38452,21 @@ func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj2398++ - if yyhl2398 { - yyb2398 = yyj2398 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2398 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2398 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31620,38 +38474,44 @@ func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj2398++ - if yyhl2398 { - yyb2398 = yyj2398 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2398 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2398 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv2401 := &x.ListMeta - yym2402 := z.DecBinary() - _ = yym2402 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv2401) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv2401, false) + z.DecFallback(yyv17, false) } } - yyj2398++ - if yyhl2398 { - yyb2398 = yyj2398 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2398 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2398 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31659,26 +38519,26 @@ func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2403 := &x.Items - yym2404 := z.DecBinary() - _ = yym2404 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSlicePodTemplate((*[]PodTemplate)(yyv2403), d) + h.decSlicePodTemplate((*[]PodTemplate)(yyv19), d) } } for { - yyj2398++ - if yyhl2398 { - yyb2398 = yyj2398 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2398 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2398 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2398-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -31690,79 +38550,129 @@ func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2405 := z.EncBinary() - _ = yym2405 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2406 := !z.EncBinary() - yy2arr2406 := z.EncBasicHandle().StructToArray - var yyq2406 [3]bool - _, _, _ = yysep2406, yyq2406, yy2arr2406 - const yyr2406 bool = false - yyq2406[2] = x.Template != nil - var yynn2406 int - if yyr2406 || yy2arr2406 { - r.EncodeArrayStart(3) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Replicas != nil + yyq2[1] = x.MinReadySeconds != 0 + yyq2[2] = len(x.Selector) != 0 + yyq2[3] = x.Template != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) } else { - yynn2406 = 2 - for _, b := range yyq2406 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2406++ + yynn2++ } } - r.EncodeMapStart(yynn2406) - yynn2406 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2406 || yy2arr2406 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2408 := z.EncBinary() - _ = yym2408 - if false { + 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.EncodeInt(int64(x.Replicas)) + r.EncodeNil() } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2409 := z.EncBinary() - _ = yym2409 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) + 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 yyr2406 || yy2arr2406 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Selector == nil { - r.EncodeNil() - } else { - yym2411 := z.EncBinary() - _ = yym2411 + if yyq2[1] { + yym9 := z.EncBinary() + _ = yym9 if false { } else { - z.F.EncMapStringStringV(x.Selector, false, e) + r.EncodeInt(int64(x.MinReadySeconds)) } + } else { + r.EncodeInt(0) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Selector == nil { - r.EncodeNil() - } else { - yym2412 := z.EncBinary() - _ = yym2412 + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym10 := z.EncBinary() + _ = yym10 if false { } else { - z.F.EncMapStringStringV(x.Selector, false, e) + r.EncodeInt(int64(x.MinReadySeconds)) } } } - if yyr2406 || yy2arr2406 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2406[2] { + if yyq2[2] { + if x.Selector == nil { + r.EncodeNil() + } else { + yym12 := z.EncBinary() + _ = yym12 + if false { + } else { + z.F.EncMapStringStringV(x.Selector, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("selector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Selector == nil { + r.EncodeNil() + } else { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + z.F.EncMapStringStringV(x.Selector, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { if x.Template == nil { r.EncodeNil() } else { @@ -31772,7 +38682,7 @@ func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2406[2] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("template")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -31783,7 +38693,7 @@ func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2406 || yy2arr2406 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -31796,25 +38706,25 @@ func (x *ReplicationControllerSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2414 := z.DecBinary() - _ = yym2414 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2415 := r.ContainerType() - if yyct2415 == codecSelferValueTypeMap1234 { - yyl2415 := r.ReadMapStart() - if yyl2415 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2415, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2415 == codecSelferValueTypeArray1234 { - yyl2415 := r.ReadArrayStart() - if yyl2415 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2415, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -31826,12 +38736,12 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromMap(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2416Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2416Slc - var yyhl2416 bool = l >= 0 - for yyj2416 := 0; ; yyj2416++ { - if yyhl2416 { - if yyj2416 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -31840,26 +38750,48 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromMap(l int, d *codec1978.D } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2416Slc = r.DecodeBytes(yys2416Slc, true, true) - yys2416 := string(yys2416Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2416 { + switch yys3 { case "replicas": if r.TryDecodeAsNil() { - x.Replicas = 0 + if x.Replicas != nil { + x.Replicas = nil + } } else { - x.Replicas = int32(r.DecodeInt(32)) + if x.Replicas == nil { + x.Replicas = new(int32) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) + } + } + case "minReadySeconds": + if r.TryDecodeAsNil() { + x.MinReadySeconds = 0 + } else { + yyv6 := &x.MinReadySeconds + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(yyv6)) = int32(r.DecodeInt(32)) + } } case "selector": if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv2418 := &x.Selector - yym2419 := z.DecBinary() - _ = yym2419 + yyv8 := &x.Selector + yym9 := z.DecBinary() + _ = yym9 if false { } else { - z.F.DecMapStringStringX(yyv2418, false, d) + z.F.DecMapStringStringX(yyv8, false, d) } } case "template": @@ -31874,9 +38806,9 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromMap(l int, d *codec1978.D x.Template.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2416) - } // end switch yys2416 - } // end for yyj2416 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -31884,32 +38816,64 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2421 int - var yyb2421 bool - var yyhl2421 bool = l >= 0 - yyj2421++ - if yyhl2421 { - yyb2421 = yyj2421 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2421 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2421 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Replicas = 0 + if x.Replicas != nil { + x.Replicas = nil + } } else { - x.Replicas = int32(r.DecodeInt(32)) + if x.Replicas == nil { + x.Replicas = new(int32) + } + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) + } } - yyj2421++ - if yyhl2421 { - yyb2421 = yyj2421 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2421 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2421 { + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MinReadySeconds = 0 + } else { + yyv14 := &x.MinReadySeconds + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*int32)(yyv14)) = int32(r.DecodeInt(32)) + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31917,21 +38881,21 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv2423 := &x.Selector - yym2424 := z.DecBinary() - _ = yym2424 + yyv16 := &x.Selector + yym17 := z.DecBinary() + _ = yym17 if false { } else { - z.F.DecMapStringStringX(yyv2423, false, d) + z.F.DecMapStringStringX(yyv16, false, d) } } - yyj2421++ - if yyhl2421 { - yyb2421 = yyj2421 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2421 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2421 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -31947,17 +38911,17 @@ func (x *ReplicationControllerSpec) codecDecodeSelfFromArray(l int, d *codec1978 x.Template.CodecDecodeSelf(d) } for { - yyj2421++ - if yyhl2421 { - yyb2421 = yyj2421 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2421 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2421 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2421-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -31969,36 +38933,38 @@ func (x *ReplicationControllerStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2426 := z.EncBinary() - _ = yym2426 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2427 := !z.EncBinary() - yy2arr2427 := z.EncBasicHandle().StructToArray - var yyq2427 [4]bool - _, _, _ = yysep2427, yyq2427, yy2arr2427 - const yyr2427 bool = false - yyq2427[1] = x.FullyLabeledReplicas != 0 - yyq2427[2] = x.ReadyReplicas != 0 - yyq2427[3] = x.ObservedGeneration != 0 - var yynn2427 int - if yyr2427 || yy2arr2427 { - r.EncodeArrayStart(4) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [6]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.FullyLabeledReplicas != 0 + yyq2[2] = x.ReadyReplicas != 0 + yyq2[3] = x.AvailableReplicas != 0 + yyq2[4] = x.ObservedGeneration != 0 + yyq2[5] = len(x.Conditions) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(6) } else { - yynn2427 = 1 - for _, b := range yyq2427 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn2427++ + yynn2++ } } - r.EncodeMapStart(yynn2427) - yynn2427 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2427 || yy2arr2427 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2429 := z.EncBinary() - _ = yym2429 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeInt(int64(x.Replicas)) @@ -32007,18 +38973,18 @@ func (x *ReplicationControllerStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("replicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2430 := z.EncBinary() - _ = yym2430 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeInt(int64(x.Replicas)) } } - if yyr2427 || yy2arr2427 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2427[1] { - yym2432 := z.EncBinary() - _ = yym2432 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeInt(int64(x.FullyLabeledReplicas)) @@ -32027,23 +38993,23 @@ func (x *ReplicationControllerStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq2427[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fullyLabeledReplicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2433 := z.EncBinary() - _ = yym2433 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeInt(int64(x.FullyLabeledReplicas)) } } } - if yyr2427 || yy2arr2427 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2427[2] { - yym2435 := z.EncBinary() - _ = yym2435 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeInt(int64(x.ReadyReplicas)) @@ -32052,23 +39018,48 @@ func (x *ReplicationControllerStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq2427[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("readyReplicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2436 := z.EncBinary() - _ = yym2436 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeInt(int64(x.ReadyReplicas)) } } } - if yyr2427 || yy2arr2427 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2427[3] { - yym2438 := z.EncBinary() - _ = yym2438 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeInt(int64(x.AvailableReplicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("availableReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeInt(int64(x.AvailableReplicas)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeInt(int64(x.ObservedGeneration)) @@ -32077,19 +39068,52 @@ func (x *ReplicationControllerStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq2427[3] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2439 := z.EncBinary() - _ = yym2439 + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeInt(int64(x.ObservedGeneration)) } } } - if yyr2427 || yy2arr2427 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + if x.Conditions == nil { + r.EncodeNil() + } else { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + h.encSliceReplicationControllerCondition(([]ReplicationControllerCondition)(x.Conditions), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("conditions")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Conditions == nil { + r.EncodeNil() + } else { + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + h.encSliceReplicationControllerCondition(([]ReplicationControllerCondition)(x.Conditions), e) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -32102,25 +39126,25 @@ func (x *ReplicationControllerStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2440 := z.DecBinary() - _ = yym2440 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2441 := r.ContainerType() - if yyct2441 == codecSelferValueTypeMap1234 { - yyl2441 := r.ReadMapStart() - if yyl2441 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2441, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2441 == codecSelferValueTypeArray1234 { - yyl2441 := r.ReadArrayStart() - if yyl2441 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2441, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -32132,12 +39156,12 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromMap(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2442Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2442Slc - var yyhl2442 bool = l >= 0 - for yyj2442 := 0; ; yyj2442++ { - if yyhl2442 { - if yyj2442 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -32146,38 +39170,86 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromMap(l int, d *codec1978 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2442Slc = r.DecodeBytes(yys2442Slc, true, true) - yys2442 := string(yys2442Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2442 { + switch yys3 { case "replicas": if r.TryDecodeAsNil() { x.Replicas = 0 } else { - x.Replicas = int32(r.DecodeInt(32)) + yyv4 := &x.Replicas + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } } case "fullyLabeledReplicas": if r.TryDecodeAsNil() { x.FullyLabeledReplicas = 0 } else { - x.FullyLabeledReplicas = int32(r.DecodeInt(32)) + yyv6 := &x.FullyLabeledReplicas + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(yyv6)) = int32(r.DecodeInt(32)) + } } case "readyReplicas": if r.TryDecodeAsNil() { x.ReadyReplicas = 0 } else { - x.ReadyReplicas = int32(r.DecodeInt(32)) + yyv8 := &x.ReadyReplicas + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } + } + case "availableReplicas": + if r.TryDecodeAsNil() { + x.AvailableReplicas = 0 + } else { + yyv10 := &x.AvailableReplicas + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int32)(yyv10)) = int32(r.DecodeInt(32)) + } } case "observedGeneration": if r.TryDecodeAsNil() { x.ObservedGeneration = 0 } else { - x.ObservedGeneration = int64(r.DecodeInt(64)) + yyv12 := &x.ObservedGeneration + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int64)(yyv12)) = int64(r.DecodeInt(64)) + } + } + case "conditions": + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv14 := &x.Conditions + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + h.decSliceReplicationControllerCondition((*[]ReplicationControllerCondition)(yyv14), d) + } } default: - z.DecStructFieldNotFound(-1, yys2442) - } // end switch yys2442 - } // end for yyj2442 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -32185,16 +39257,16 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromArray(l int, d *codec19 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2447 int - var yyb2447 bool - var yyhl2447 bool = l >= 0 - yyj2447++ - if yyhl2447 { - yyb2447 = yyj2447 > l + var yyj16 int + var yyb16 bool + var yyhl16 bool = l >= 0 + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb2447 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb2447 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32202,15 +39274,21 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.Replicas = 0 } else { - x.Replicas = int32(r.DecodeInt(32)) + yyv17 := &x.Replicas + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*int32)(yyv17)) = int32(r.DecodeInt(32)) + } } - yyj2447++ - if yyhl2447 { - yyb2447 = yyj2447 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb2447 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb2447 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32218,15 +39296,21 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.FullyLabeledReplicas = 0 } else { - x.FullyLabeledReplicas = int32(r.DecodeInt(32)) + yyv19 := &x.FullyLabeledReplicas + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*int32)(yyv19)) = int32(r.DecodeInt(32)) + } } - yyj2447++ - if yyhl2447 { - yyb2447 = yyj2447 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb2447 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb2447 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32234,15 +39318,43 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.ReadyReplicas = 0 } else { - x.ReadyReplicas = int32(r.DecodeInt(32)) + yyv21 := &x.ReadyReplicas + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*int32)(yyv21)) = int32(r.DecodeInt(32)) + } } - yyj2447++ - if yyhl2447 { - yyb2447 = yyj2447 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb2447 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb2447 { + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.AvailableReplicas = 0 + } else { + yyv23 := &x.AvailableReplicas + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*int32)(yyv23)) = int32(r.DecodeInt(32)) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32250,20 +39362,463 @@ func (x *ReplicationControllerStatus) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.ObservedGeneration = 0 } else { - x.ObservedGeneration = int64(r.DecodeInt(64)) + yyv25 := &x.ObservedGeneration + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*int64)(yyv25)) = int64(r.DecodeInt(64)) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv27 := &x.Conditions + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + h.decSliceReplicationControllerCondition((*[]ReplicationControllerCondition)(yyv27), d) + } } for { - yyj2447++ - if yyhl2447 { - yyb2447 = yyj2447 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb2447 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb2447 { + if yyb16 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2447-1, "") + z.DecStructFieldNotFound(yyj16-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x ReplicationControllerConditionType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *ReplicationControllerConditionType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *ReplicationControllerCondition) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[2] = true + yyq2[3] = x.Reason != "" + yyq2[4] = x.Message != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Status.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Status.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.LastTransitionTime + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else if yym11 { + z.EncBinaryMarshal(yy10) + } else if !yym11 && z.IsJSONHandle() { + z.EncJSONMarshal(yy10) + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.LastTransitionTime + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else if yym13 { + z.EncBinaryMarshal(yy12) + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(yy12) + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("message")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ReplicationControllerCondition) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ReplicationControllerCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = "" + } else { + yyv5 := &x.Status + yyv5.CodecDecodeSelf(d) + } + case "lastTransitionTime": + if r.TryDecodeAsNil() { + x.LastTransitionTime = pkg2_v1.Time{} + } else { + yyv6 := &x.LastTransitionTime + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if yym7 { + z.DecBinaryUnmarshal(yyv6) + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) + } else { + z.DecFallback(yyv6, false) + } + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv8 := &x.Reason + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "message": + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv10 := &x.Message + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ReplicationControllerCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv13 := &x.Type + yyv13.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = "" + } else { + yyv14 := &x.Status + yyv14.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastTransitionTime = pkg2_v1.Time{} + } else { + yyv15 := &x.LastTransitionTime + yym16 := z.DecBinary() + _ = yym16 + if false { + } else if z.HasExtensions() && z.DecExt(yyv15) { + } else if yym16 { + z.DecBinaryUnmarshal(yyv15) + } else if !yym16 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv15) + } else { + z.DecFallback(yyv15, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv17 := &x.Reason + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv19 := &x.Message + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -32275,39 +39830,39 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2452 := z.EncBinary() - _ = yym2452 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2453 := !z.EncBinary() - yy2arr2453 := z.EncBasicHandle().StructToArray - var yyq2453 [5]bool - _, _, _ = yysep2453, yyq2453, yy2arr2453 - const yyr2453 bool = false - yyq2453[0] = x.Kind != "" - yyq2453[1] = x.APIVersion != "" - yyq2453[2] = true - yyq2453[3] = true - yyq2453[4] = true - var yynn2453 int - if yyr2453 || yy2arr2453 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn2453 = 0 - for _, b := range yyq2453 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2453++ + yynn2++ } } - r.EncodeMapStart(yynn2453) - yynn2453 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2453 || yy2arr2453 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2453[0] { - yym2455 := z.EncBinary() - _ = yym2455 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -32316,23 +39871,23 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2453[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2456 := z.EncBinary() - _ = yym2456 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2453 || yy2arr2453 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2453[1] { - yym2458 := z.EncBinary() - _ = yym2458 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -32341,70 +39896,82 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2453[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2459 := z.EncBinary() - _ = yym2459 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2453 || yy2arr2453 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2453[2] { - yy2461 := &x.ObjectMeta - yy2461.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq2453[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2462 := &x.ObjectMeta - yy2462.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr2453 || yy2arr2453 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2453[3] { - yy2464 := &x.Spec - yy2464.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2453[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2465 := &x.Spec - yy2465.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr2453 || yy2arr2453 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2453[4] { - yy2467 := &x.Status - yy2467.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2453[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2468 := &x.Status - yy2468.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr2453 || yy2arr2453 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -32417,25 +39984,25 @@ func (x *ReplicationController) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2469 := z.DecBinary() - _ = yym2469 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2470 := r.ContainerType() - if yyct2470 == codecSelferValueTypeMap1234 { - yyl2470 := r.ReadMapStart() - if yyl2470 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2470, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2470 == codecSelferValueTypeArray1234 { - yyl2470 := r.ReadArrayStart() - if yyl2470 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2470, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -32447,12 +40014,12 @@ func (x *ReplicationController) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2471Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2471Slc - var yyhl2471 bool = l >= 0 - for yyj2471 := 0; ; yyj2471++ { - if yyhl2471 { - if yyj2471 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -32461,47 +40028,65 @@ func (x *ReplicationController) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2471Slc = r.DecodeBytes(yys2471Slc, true, true) - yys2471 := string(yys2471Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2471 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2474 := &x.ObjectMeta - yyv2474.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ReplicationControllerSpec{} } else { - yyv2475 := &x.Spec - yyv2475.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ReplicationControllerStatus{} } else { - yyv2476 := &x.Status - yyv2476.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2471) - } // end switch yys2471 - } // end for yyj2471 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -32509,16 +40094,16 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2477 int - var yyb2477 bool - var yyhl2477 bool = l >= 0 - yyj2477++ - if yyhl2477 { - yyb2477 = yyj2477 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2477 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2477 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32526,15 +40111,21 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj2477++ - if yyhl2477 { - yyb2477 = yyj2477 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2477 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2477 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32542,32 +40133,44 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj2477++ - if yyhl2477 { - yyb2477 = yyj2477 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2477 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2477 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2480 := &x.ObjectMeta - yyv2480.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj2477++ - if yyhl2477 { - yyb2477 = yyj2477 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2477 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2477 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32575,16 +40178,16 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Spec = ReplicationControllerSpec{} } else { - yyv2481 := &x.Spec - yyv2481.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj2477++ - if yyhl2477 { - yyb2477 = yyj2477 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2477 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2477 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32592,21 +40195,21 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Status = ReplicationControllerStatus{} } else { - yyv2482 := &x.Status - yyv2482.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj2477++ - if yyhl2477 { - yyb2477 = yyj2477 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2477 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2477 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2477-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -32618,37 +40221,37 @@ func (x *ReplicationControllerList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2483 := z.EncBinary() - _ = yym2483 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2484 := !z.EncBinary() - yy2arr2484 := z.EncBasicHandle().StructToArray - var yyq2484 [4]bool - _, _, _ = yysep2484, yyq2484, yy2arr2484 - const yyr2484 bool = false - yyq2484[0] = x.Kind != "" - yyq2484[1] = x.APIVersion != "" - yyq2484[2] = true - var yynn2484 int - if yyr2484 || yy2arr2484 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn2484 = 1 - for _, b := range yyq2484 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn2484++ + yynn2++ } } - r.EncodeMapStart(yynn2484) - yynn2484 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2484 || yy2arr2484 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2484[0] { - yym2486 := z.EncBinary() - _ = yym2486 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -32657,23 +40260,23 @@ func (x *ReplicationControllerList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2484[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2487 := z.EncBinary() - _ = yym2487 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2484 || yy2arr2484 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2484[1] { - yym2489 := z.EncBinary() - _ = yym2489 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -32682,54 +40285,54 @@ func (x *ReplicationControllerList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2484[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2490 := z.EncBinary() - _ = yym2490 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2484 || yy2arr2484 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2484[2] { - yy2492 := &x.ListMeta - yym2493 := z.EncBinary() - _ = yym2493 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy2492) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy2492) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq2484[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2494 := &x.ListMeta - yym2495 := z.EncBinary() - _ = yym2495 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy2494) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy2494) + z.EncFallback(yy12) } } } - if yyr2484 || yy2arr2484 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym2497 := z.EncBinary() - _ = yym2497 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceReplicationController(([]ReplicationController)(x.Items), e) @@ -32742,15 +40345,15 @@ func (x *ReplicationControllerList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym2498 := z.EncBinary() - _ = yym2498 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceReplicationController(([]ReplicationController)(x.Items), e) } } } - if yyr2484 || yy2arr2484 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -32763,25 +40366,25 @@ func (x *ReplicationControllerList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2499 := z.DecBinary() - _ = yym2499 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2500 := r.ContainerType() - if yyct2500 == codecSelferValueTypeMap1234 { - yyl2500 := r.ReadMapStart() - if yyl2500 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2500, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2500 == codecSelferValueTypeArray1234 { - yyl2500 := r.ReadArrayStart() - if yyl2500 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2500, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -32793,12 +40396,12 @@ func (x *ReplicationControllerList) codecDecodeSelfFromMap(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2501Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2501Slc - var yyhl2501 bool = l >= 0 - for yyj2501 := 0; ; yyj2501++ { - if yyhl2501 { - if yyj2501 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -32807,51 +40410,63 @@ func (x *ReplicationControllerList) codecDecodeSelfFromMap(l int, d *codec1978.D } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2501Slc = r.DecodeBytes(yys2501Slc, true, true) - yys2501 := string(yys2501Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2501 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv2504 := &x.ListMeta - yym2505 := z.DecBinary() - _ = yym2505 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv2504) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv2504, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2506 := &x.Items - yym2507 := z.DecBinary() - _ = yym2507 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceReplicationController((*[]ReplicationController)(yyv2506), d) + h.decSliceReplicationController((*[]ReplicationController)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys2501) - } // end switch yys2501 - } // end for yyj2501 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -32859,16 +40474,16 @@ func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2508 int - var yyb2508 bool - var yyhl2508 bool = l >= 0 - yyj2508++ - if yyhl2508 { - yyb2508 = yyj2508 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2508 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2508 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32876,15 +40491,21 @@ func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj2508++ - if yyhl2508 { - yyb2508 = yyj2508 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2508 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2508 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32892,38 +40513,44 @@ func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj2508++ - if yyhl2508 { - yyb2508 = yyj2508 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2508 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2508 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv2511 := &x.ListMeta - yym2512 := z.DecBinary() - _ = yym2512 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv2511) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv2511, false) + z.DecFallback(yyv17, false) } } - yyj2508++ - if yyhl2508 { - yyb2508 = yyj2508 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2508 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2508 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32931,370 +40558,26 @@ func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2513 := &x.Items - yym2514 := z.DecBinary() - _ = yym2514 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceReplicationController((*[]ReplicationController)(yyv2513), d) + h.decSliceReplicationController((*[]ReplicationController)(yyv19), d) } } for { - yyj2508++ - if yyhl2508 { - yyb2508 = yyj2508 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2508 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2508 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2508-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 { - yym2515 := z.EncBinary() - _ = yym2515 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2516 := !z.EncBinary() - yy2arr2516 := z.EncBasicHandle().StructToArray - var yyq2516 [4]bool - _, _, _ = yysep2516, yyq2516, yy2arr2516 - const yyr2516 bool = false - yyq2516[0] = x.Kind != "" - yyq2516[1] = x.APIVersion != "" - yyq2516[2] = true - var yynn2516 int - if yyr2516 || yy2arr2516 { - r.EncodeArrayStart(4) - } else { - yynn2516 = 1 - for _, b := range yyq2516 { - if b { - yynn2516++ - } - } - r.EncodeMapStart(yynn2516) - yynn2516 = 0 - } - if yyr2516 || yy2arr2516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2516[0] { - yym2518 := z.EncBinary() - _ = yym2518 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2516[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2519 := z.EncBinary() - _ = yym2519 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr2516 || yy2arr2516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2516[1] { - yym2521 := z.EncBinary() - _ = yym2521 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2516[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2522 := z.EncBinary() - _ = yym2522 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr2516 || yy2arr2516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2516[2] { - yy2524 := &x.ListMeta - yym2525 := z.EncBinary() - _ = yym2525 - if false { - } else if z.HasExtensions() && z.EncExt(yy2524) { - } else { - z.EncFallback(yy2524) - } - } else { - r.EncodeNil() - } - } else { - if yyq2516[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2526 := &x.ListMeta - yym2527 := z.EncBinary() - _ = yym2527 - if false { - } else if z.HasExtensions() && z.EncExt(yy2526) { - } else { - z.EncFallback(yy2526) - } - } - } - if yyr2516 || yy2arr2516 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Items == nil { - r.EncodeNil() - } else { - yym2529 := z.EncBinary() - _ = yym2529 - 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 { - yym2530 := z.EncBinary() - _ = yym2530 - if false { - } else { - h.encSliceService(([]Service)(x.Items), e) - } - } - } - if yyr2516 || yy2arr2516 { - 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 - yym2531 := z.DecBinary() - _ = yym2531 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2532 := r.ContainerType() - if yyct2532 == codecSelferValueTypeMap1234 { - yyl2532 := r.ReadMapStart() - if yyl2532 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl2532, d) - } - } else if yyct2532 == codecSelferValueTypeArray1234 { - yyl2532 := r.ReadArrayStart() - if yyl2532 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl2532, 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 yys2533Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2533Slc - var yyhl2533 bool = l >= 0 - for yyj2533 := 0; ; yyj2533++ { - if yyhl2533 { - if yyj2533 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2533Slc = r.DecodeBytes(yys2533Slc, true, true) - yys2533 := string(yys2533Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2533 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "metadata": - if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} - } else { - yyv2536 := &x.ListMeta - yym2537 := z.DecBinary() - _ = yym2537 - if false { - } else if z.HasExtensions() && z.DecExt(yyv2536) { - } else { - z.DecFallback(yyv2536, false) - } - } - case "items": - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv2538 := &x.Items - yym2539 := z.DecBinary() - _ = yym2539 - if false { - } else { - h.decSliceService((*[]Service)(yyv2538), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys2533) - } // end switch yys2533 - } // end for yyj2533 - 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 yyj2540 int - var yyb2540 bool - var yyhl2540 bool = l >= 0 - yyj2540++ - if yyhl2540 { - yyb2540 = yyj2540 > l - } else { - yyb2540 = r.CheckBreak() - } - if yyb2540 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj2540++ - if yyhl2540 { - yyb2540 = yyj2540 > l - } else { - yyb2540 = r.CheckBreak() - } - if yyb2540 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj2540++ - if yyhl2540 { - yyb2540 = yyj2540 > l - } else { - yyb2540 = r.CheckBreak() - } - if yyb2540 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} - } else { - yyv2543 := &x.ListMeta - yym2544 := z.DecBinary() - _ = yym2544 - if false { - } else if z.HasExtensions() && z.DecExt(yyv2543) { - } else { - z.DecFallback(yyv2543, false) - } - } - yyj2540++ - if yyhl2540 { - yyb2540 = yyj2540 > l - } else { - yyb2540 = r.CheckBreak() - } - if yyb2540 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Items = nil - } else { - yyv2545 := &x.Items - yym2546 := z.DecBinary() - _ = yym2546 - if false { - } else { - h.decSliceService((*[]Service)(yyv2545), d) - } - } - for { - yyj2540++ - if yyhl2540 { - yyb2540 = yyj2540 > l - } else { - yyb2540 = r.CheckBreak() - } - if yyb2540 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2540-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -33303,8 +40586,8 @@ func (x ServiceAffinity) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2547 := z.EncBinary() - _ = yym2547 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -33316,8 +40599,8 @@ func (x *ServiceAffinity) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2548 := z.DecBinary() - _ = yym2548 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -33329,8 +40612,8 @@ func (x ServiceType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2549 := z.EncBinary() - _ = yym2549 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -33342,8 +40625,8 @@ func (x *ServiceType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2550 := z.DecBinary() - _ = yym2550 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -33358,48 +40641,48 @@ func (x *ServiceStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2551 := z.EncBinary() - _ = yym2551 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2552 := !z.EncBinary() - yy2arr2552 := z.EncBasicHandle().StructToArray - var yyq2552 [1]bool - _, _, _ = yysep2552, yyq2552, yy2arr2552 - const yyr2552 bool = false - yyq2552[0] = true - var yynn2552 int - if yyr2552 || yy2arr2552 { + 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 { - yynn2552 = 0 - for _, b := range yyq2552 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2552++ + yynn2++ } } - r.EncodeMapStart(yynn2552) - yynn2552 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2552 || yy2arr2552 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2552[0] { - yy2554 := &x.LoadBalancer - yy2554.CodecEncodeSelf(e) + if yyq2[0] { + yy4 := &x.LoadBalancer + yy4.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2552[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("loadBalancer")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2555 := &x.LoadBalancer - yy2555.CodecEncodeSelf(e) + yy6 := &x.LoadBalancer + yy6.CodecEncodeSelf(e) } } - if yyr2552 || yy2arr2552 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -33412,25 +40695,25 @@ func (x *ServiceStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2556 := z.DecBinary() - _ = yym2556 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2557 := r.ContainerType() - if yyct2557 == codecSelferValueTypeMap1234 { - yyl2557 := r.ReadMapStart() - if yyl2557 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2557, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2557 == codecSelferValueTypeArray1234 { - yyl2557 := r.ReadArrayStart() - if yyl2557 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2557, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -33442,12 +40725,12 @@ func (x *ServiceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2558Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2558Slc - var yyhl2558 bool = l >= 0 - for yyj2558 := 0; ; yyj2558++ { - if yyhl2558 { - if yyj2558 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -33456,21 +40739,21 @@ func (x *ServiceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2558Slc = r.DecodeBytes(yys2558Slc, true, true) - yys2558 := string(yys2558Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2558 { + switch yys3 { case "loadBalancer": if r.TryDecodeAsNil() { x.LoadBalancer = LoadBalancerStatus{} } else { - yyv2559 := &x.LoadBalancer - yyv2559.CodecDecodeSelf(d) + yyv4 := &x.LoadBalancer + yyv4.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2558) - } // end switch yys2558 - } // end for yyj2558 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -33478,16 +40761,16 @@ func (x *ServiceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2560 int - var yyb2560 bool - var yyhl2560 bool = l >= 0 - yyj2560++ - if yyhl2560 { - yyb2560 = yyj2560 > l + var yyj5 int + var yyb5 bool + var yyhl5 bool = l >= 0 + yyj5++ + if yyhl5 { + yyb5 = yyj5 > l } else { - yyb2560 = r.CheckBreak() + yyb5 = r.CheckBreak() } - if yyb2560 { + if yyb5 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33495,21 +40778,21 @@ func (x *ServiceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LoadBalancer = LoadBalancerStatus{} } else { - yyv2561 := &x.LoadBalancer - yyv2561.CodecDecodeSelf(d) + yyv6 := &x.LoadBalancer + yyv6.CodecDecodeSelf(d) } for { - yyj2560++ - if yyhl2560 { - yyb2560 = yyj2560 > l + yyj5++ + if yyhl5 { + yyb5 = yyj5 > l } else { - yyb2560 = r.CheckBreak() + yyb5 = r.CheckBreak() } - if yyb2560 { + if yyb5 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2560-1, "") + z.DecStructFieldNotFound(yyj5-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -33521,38 +40804,38 @@ func (x *LoadBalancerStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2562 := z.EncBinary() - _ = yym2562 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2563 := !z.EncBinary() - yy2arr2563 := z.EncBasicHandle().StructToArray - var yyq2563 [1]bool - _, _, _ = yysep2563, yyq2563, yy2arr2563 - const yyr2563 bool = false - yyq2563[0] = len(x.Ingress) != 0 - var yynn2563 int - if yyr2563 || yy2arr2563 { + 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 { - yynn2563 = 0 - for _, b := range yyq2563 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2563++ + yynn2++ } } - r.EncodeMapStart(yynn2563) - yynn2563 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2563 || yy2arr2563 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2563[0] { + if yyq2[0] { if x.Ingress == nil { r.EncodeNil() } else { - yym2565 := z.EncBinary() - _ = yym2565 + yym4 := z.EncBinary() + _ = yym4 if false { } else { h.encSliceLoadBalancerIngress(([]LoadBalancerIngress)(x.Ingress), e) @@ -33562,15 +40845,15 @@ func (x *LoadBalancerStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2563[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ingress")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Ingress == nil { r.EncodeNil() } else { - yym2566 := z.EncBinary() - _ = yym2566 + yym5 := z.EncBinary() + _ = yym5 if false { } else { h.encSliceLoadBalancerIngress(([]LoadBalancerIngress)(x.Ingress), e) @@ -33578,7 +40861,7 @@ func (x *LoadBalancerStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2563 || yy2arr2563 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -33591,25 +40874,25 @@ func (x *LoadBalancerStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2567 := z.DecBinary() - _ = yym2567 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2568 := r.ContainerType() - if yyct2568 == codecSelferValueTypeMap1234 { - yyl2568 := r.ReadMapStart() - if yyl2568 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2568, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2568 == codecSelferValueTypeArray1234 { - yyl2568 := r.ReadArrayStart() - if yyl2568 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2568, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -33621,12 +40904,12 @@ func (x *LoadBalancerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2569Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2569Slc - var yyhl2569 bool = l >= 0 - for yyj2569 := 0; ; yyj2569++ { - if yyhl2569 { - if yyj2569 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -33635,26 +40918,26 @@ func (x *LoadBalancerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2569Slc = r.DecodeBytes(yys2569Slc, true, true) - yys2569 := string(yys2569Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2569 { + switch yys3 { case "ingress": if r.TryDecodeAsNil() { x.Ingress = nil } else { - yyv2570 := &x.Ingress - yym2571 := z.DecBinary() - _ = yym2571 + yyv4 := &x.Ingress + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv2570), d) + h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv4), d) } } default: - z.DecStructFieldNotFound(-1, yys2569) - } // end switch yys2569 - } // end for yyj2569 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -33662,16 +40945,16 @@ func (x *LoadBalancerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2572 int - var yyb2572 bool - var yyhl2572 bool = l >= 0 - yyj2572++ - if yyhl2572 { - yyb2572 = yyj2572 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb2572 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb2572 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33679,26 +40962,26 @@ func (x *LoadBalancerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Ingress = nil } else { - yyv2573 := &x.Ingress - yym2574 := z.DecBinary() - _ = yym2574 + yyv7 := &x.Ingress + yym8 := z.DecBinary() + _ = yym8 if false { } else { - h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv2573), d) + h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv7), d) } } for { - yyj2572++ - if yyhl2572 { - yyb2572 = yyj2572 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb2572 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb2572 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2572-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -33710,36 +40993,36 @@ func (x *LoadBalancerIngress) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2575 := z.EncBinary() - _ = yym2575 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2576 := !z.EncBinary() - yy2arr2576 := z.EncBasicHandle().StructToArray - var yyq2576 [2]bool - _, _, _ = yysep2576, yyq2576, yy2arr2576 - const yyr2576 bool = false - yyq2576[0] = x.IP != "" - yyq2576[1] = x.Hostname != "" - var yynn2576 int - if yyr2576 || yy2arr2576 { + 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 { - yynn2576 = 0 - for _, b := range yyq2576 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2576++ + yynn2++ } } - r.EncodeMapStart(yynn2576) - yynn2576 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2576 || yy2arr2576 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2576[0] { - yym2578 := z.EncBinary() - _ = yym2578 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.IP)) @@ -33748,23 +41031,23 @@ func (x *LoadBalancerIngress) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2576[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ip")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2579 := z.EncBinary() - _ = yym2579 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.IP)) } } } - if yyr2576 || yy2arr2576 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2576[1] { - yym2581 := z.EncBinary() - _ = yym2581 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Hostname)) @@ -33773,19 +41056,19 @@ func (x *LoadBalancerIngress) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2576[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostname")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2582 := z.EncBinary() - _ = yym2582 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Hostname)) } } } - if yyr2576 || yy2arr2576 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -33798,25 +41081,25 @@ func (x *LoadBalancerIngress) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2583 := z.DecBinary() - _ = yym2583 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2584 := r.ContainerType() - if yyct2584 == codecSelferValueTypeMap1234 { - yyl2584 := r.ReadMapStart() - if yyl2584 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2584, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2584 == codecSelferValueTypeArray1234 { - yyl2584 := r.ReadArrayStart() - if yyl2584 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2584, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -33828,12 +41111,12 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2585Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2585Slc - var yyhl2585 bool = l >= 0 - for yyj2585 := 0; ; yyj2585++ { - if yyhl2585 { - if yyj2585 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -33842,26 +41125,38 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2585Slc = r.DecodeBytes(yys2585Slc, true, true) - yys2585 := string(yys2585Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2585 { + switch yys3 { case "ip": if r.TryDecodeAsNil() { x.IP = "" } else { - x.IP = string(r.DecodeString()) + yyv4 := &x.IP + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "hostname": if r.TryDecodeAsNil() { x.Hostname = "" } else { - x.Hostname = string(r.DecodeString()) + yyv6 := &x.Hostname + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys2585) - } // end switch yys2585 - } // end for yyj2585 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -33869,16 +41164,16 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2588 int - var yyb2588 bool - var yyhl2588 bool = l >= 0 - yyj2588++ - if yyhl2588 { - yyb2588 = yyj2588 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb2588 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb2588 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33886,15 +41181,21 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.IP = "" } else { - x.IP = string(r.DecodeString()) + yyv9 := &x.IP + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } } - yyj2588++ - if yyhl2588 { - yyb2588 = yyj2588 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb2588 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb2588 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33902,20 +41203,26 @@ func (x *LoadBalancerIngress) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Hostname = "" } else { - x.Hostname = string(r.DecodeString()) + yyv11 := &x.Hostname + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } for { - yyj2588++ - if yyhl2588 { - yyb2588 = yyj2588 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb2588 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb2588 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2588-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -33927,156 +41234,153 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2591 := z.EncBinary() - _ = yym2591 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2592 := !z.EncBinary() - yy2arr2592 := z.EncBasicHandle().StructToArray - var yyq2592 [9]bool - _, _, _ = yysep2592, yyq2592, yy2arr2592 - const yyr2592 bool = false - yyq2592[0] = x.Type != "" - yyq2592[3] = x.ClusterIP != "" - yyq2592[5] = len(x.ExternalIPs) != 0 - yyq2592[6] = x.LoadBalancerIP != "" - yyq2592[7] = x.SessionAffinity != "" - yyq2592[8] = len(x.LoadBalancerSourceRanges) != 0 - var yynn2592 int - if yyr2592 || yy2arr2592 { - r.EncodeArrayStart(9) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [10]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = len(x.Ports) != 0 + yyq2[1] = len(x.Selector) != 0 + yyq2[2] = x.ClusterIP != "" + yyq2[3] = x.Type != "" + yyq2[4] = len(x.ExternalIPs) != 0 + yyq2[5] = len(x.DeprecatedPublicIPs) != 0 + yyq2[6] = x.SessionAffinity != "" + yyq2[7] = x.LoadBalancerIP != "" + yyq2[8] = len(x.LoadBalancerSourceRanges) != 0 + yyq2[9] = x.ExternalName != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(10) } else { - yynn2592 = 3 - for _, b := range yyq2592 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2592++ + yynn2++ } } - r.EncodeMapStart(yynn2592) - yynn2592 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2592 || yy2arr2592 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2592[0] { + if yyq2[0] { + if x.Ports == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + h.encSliceServicePort(([]ServicePort)(x.Ports), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("ports")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Ports == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + h.encSliceServicePort(([]ServicePort)(x.Ports), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Selector == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + z.F.EncMapStringStringV(x.Selector, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("selector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Selector == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + z.F.EncMapStringStringV(x.Selector, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ClusterIP)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("clusterIP")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ClusterIP)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2592[0] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } } - if yyr2592 || yy2arr2592 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Ports == nil { - r.EncodeNil() - } else { - yym2595 := z.EncBinary() - _ = yym2595 - 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 { - yym2596 := z.EncBinary() - _ = yym2596 - if false { - } else { - h.encSliceServicePort(([]ServicePort)(x.Ports), e) - } - } - } - if yyr2592 || yy2arr2592 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Selector == nil { - r.EncodeNil() - } else { - yym2598 := z.EncBinary() - _ = yym2598 - 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 { - yym2599 := z.EncBinary() - _ = yym2599 - if false { - } else { - z.F.EncMapStringStringV(x.Selector, false, e) - } - } - } - if yyr2592 || yy2arr2592 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2592[3] { - yym2601 := z.EncBinary() - _ = yym2601 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterIP)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2592[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("clusterIP")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2602 := z.EncBinary() - _ = yym2602 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterIP)) - } - } - } - if yyr2592 || yy2arr2592 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2604 := z.EncBinary() - _ = yym2604 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ExternalName)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("ExternalName")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2605 := z.EncBinary() - _ = yym2605 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ExternalName)) - } - } - if yyr2592 || yy2arr2592 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2592[5] { + if yyq2[4] { if x.ExternalIPs == nil { r.EncodeNil() } else { - yym2607 := z.EncBinary() - _ = yym2607 + yym16 := z.EncBinary() + _ = yym16 if false { } else { z.F.EncSliceStringV(x.ExternalIPs, false, e) @@ -34086,15 +41390,15 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2592[5] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("externalIPs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ExternalIPs == nil { r.EncodeNil() } else { - yym2608 := z.EncBinary() - _ = yym2608 + yym17 := z.EncBinary() + _ = yym17 if false { } else { z.F.EncSliceStringV(x.ExternalIPs, false, e) @@ -34102,54 +41406,87 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2592 || yy2arr2592 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2592[6] { - yym2610 := z.EncBinary() - _ = yym2610 - if false { + if yyq2[5] { + if x.DeprecatedPublicIPs == nil { + r.EncodeNil() } else { - r.EncodeString(codecSelferC_UTF81234, string(x.LoadBalancerIP)) + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + z.F.EncSliceStringV(x.DeprecatedPublicIPs, false, e) + } } } else { - r.EncodeString(codecSelferC_UTF81234, "") + r.EncodeNil() } } else { - if yyq2592[6] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("loadBalancerIP")) + r.EncodeString(codecSelferC_UTF81234, string("deprecatedPublicIPs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2611 := z.EncBinary() - _ = yym2611 - if false { + if x.DeprecatedPublicIPs == nil { + r.EncodeNil() } else { - r.EncodeString(codecSelferC_UTF81234, string(x.LoadBalancerIP)) + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + z.F.EncSliceStringV(x.DeprecatedPublicIPs, false, e) + } } } } - if yyr2592 || yy2arr2592 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2592[7] { + if yyq2[6] { x.SessionAffinity.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2592[7] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("sessionAffinity")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.SessionAffinity.CodecEncodeSelf(e) } } - if yyr2592 || yy2arr2592 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2592[8] { + 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 { - yym2614 := z.EncBinary() - _ = yym2614 + yym28 := z.EncBinary() + _ = yym28 if false { } else { z.F.EncSliceStringV(x.LoadBalancerSourceRanges, false, e) @@ -34159,15 +41496,15 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2592[8] { + if yyq2[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("loadBalancerSourceRanges")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.LoadBalancerSourceRanges == nil { r.EncodeNil() } else { - yym2615 := z.EncBinary() - _ = yym2615 + yym29 := z.EncBinary() + _ = yym29 if false { } else { z.F.EncSliceStringV(x.LoadBalancerSourceRanges, false, e) @@ -34175,7 +41512,32 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2592 || yy2arr2592 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[9] { + yym31 := z.EncBinary() + _ = yym31 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ExternalName)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[9] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("externalName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym32 := z.EncBinary() + _ = yym32 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ExternalName)) + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -34188,25 +41550,25 @@ func (x *ServiceSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2616 := z.DecBinary() - _ = yym2616 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2617 := r.ContainerType() - if yyct2617 == codecSelferValueTypeMap1234 { - yyl2617 := r.ReadMapStart() - if yyl2617 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2617, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2617 == codecSelferValueTypeArray1234 { - yyl2617 := r.ReadArrayStart() - if yyl2617 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2617, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -34218,12 +41580,12 @@ func (x *ServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2618Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2618Slc - var yyhl2618 bool = l >= 0 - for yyj2618 := 0; ; yyj2618++ { - if yyhl2618 { - if yyj2618 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -34232,92 +41594,124 @@ func (x *ServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2618Slc = r.DecodeBytes(yys2618Slc, true, true) - yys2618 := string(yys2618Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2618 { - case "type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = ServiceType(r.DecodeString()) - } + switch yys3 { case "ports": if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv2620 := &x.Ports - yym2621 := z.DecBinary() - _ = yym2621 + yyv4 := &x.Ports + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSliceServicePort((*[]ServicePort)(yyv2620), d) + h.decSliceServicePort((*[]ServicePort)(yyv4), d) } } case "selector": if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv2622 := &x.Selector - yym2623 := z.DecBinary() - _ = yym2623 + yyv6 := &x.Selector + yym7 := z.DecBinary() + _ = yym7 if false { } else { - z.F.DecMapStringStringX(yyv2622, false, d) + z.F.DecMapStringStringX(yyv6, false, d) } } case "clusterIP": if r.TryDecodeAsNil() { x.ClusterIP = "" } else { - x.ClusterIP = string(r.DecodeString()) + yyv8 := &x.ClusterIP + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } - case "ExternalName": + case "type": if r.TryDecodeAsNil() { - x.ExternalName = "" + x.Type = "" } else { - x.ExternalName = string(r.DecodeString()) + yyv10 := &x.Type + yyv10.CodecDecodeSelf(d) } case "externalIPs": if r.TryDecodeAsNil() { x.ExternalIPs = nil } else { - yyv2626 := &x.ExternalIPs - yym2627 := z.DecBinary() - _ = yym2627 + yyv11 := &x.ExternalIPs + yym12 := z.DecBinary() + _ = yym12 if false { } else { - z.F.DecSliceStringX(yyv2626, false, d) + z.F.DecSliceStringX(yyv11, false, d) } } - case "loadBalancerIP": + case "deprecatedPublicIPs": if r.TryDecodeAsNil() { - x.LoadBalancerIP = "" + x.DeprecatedPublicIPs = nil } else { - x.LoadBalancerIP = string(r.DecodeString()) + yyv13 := &x.DeprecatedPublicIPs + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + z.F.DecSliceStringX(yyv13, false, d) + } } case "sessionAffinity": if r.TryDecodeAsNil() { x.SessionAffinity = "" } else { - x.SessionAffinity = ServiceAffinity(r.DecodeString()) + yyv15 := &x.SessionAffinity + yyv15.CodecDecodeSelf(d) + } + case "loadBalancerIP": + if r.TryDecodeAsNil() { + x.LoadBalancerIP = "" + } else { + yyv16 := &x.LoadBalancerIP + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } case "loadBalancerSourceRanges": if r.TryDecodeAsNil() { x.LoadBalancerSourceRanges = nil } else { - yyv2630 := &x.LoadBalancerSourceRanges - yym2631 := z.DecBinary() - _ = yym2631 + yyv18 := &x.LoadBalancerSourceRanges + yym19 := z.DecBinary() + _ = yym19 if false { } else { - z.F.DecSliceStringX(yyv2630, false, d) + z.F.DecSliceStringX(yyv18, false, d) + } + } + case "externalName": + if r.TryDecodeAsNil() { + x.ExternalName = "" + } else { + yyv20 := &x.ExternalName + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + *((*string)(yyv20)) = r.DecodeString() } } default: - z.DecStructFieldNotFound(-1, yys2618) - } // end switch yys2618 - } // end for yyj2618 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -34325,32 +41719,16 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2632 int - var yyb2632 bool - var yyhl2632 bool = l >= 0 - yyj2632++ - if yyhl2632 { - yyb2632 = yyj2632 > l + var yyj22 int + var yyb22 bool + var yyhl22 bool = l >= 0 + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2632 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2632 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = ServiceType(r.DecodeString()) - } - yyj2632++ - if yyhl2632 { - yyb2632 = yyj2632 > l - } else { - yyb2632 = r.CheckBreak() - } - if yyb2632 { + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34358,21 +41736,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv2634 := &x.Ports - yym2635 := z.DecBinary() - _ = yym2635 + yyv23 := &x.Ports + yym24 := z.DecBinary() + _ = yym24 if false { } else { - h.decSliceServicePort((*[]ServicePort)(yyv2634), d) + h.decSliceServicePort((*[]ServicePort)(yyv23), d) } } - yyj2632++ - if yyhl2632 { - yyb2632 = yyj2632 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2632 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2632 { + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34380,21 +41758,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Selector = nil } else { - yyv2636 := &x.Selector - yym2637 := z.DecBinary() - _ = yym2637 + yyv25 := &x.Selector + yym26 := z.DecBinary() + _ = yym26 if false { } else { - z.F.DecMapStringStringX(yyv2636, false, d) + z.F.DecMapStringStringX(yyv25, false, d) } } - yyj2632++ - if yyhl2632 { - yyb2632 = yyj2632 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2632 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2632 { + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34402,31 +41780,38 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ClusterIP = "" } else { - x.ClusterIP = string(r.DecodeString()) + yyv27 := &x.ClusterIP + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*string)(yyv27)) = r.DecodeString() + } } - yyj2632++ - if yyhl2632 { - yyb2632 = yyj2632 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2632 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2632 { + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ExternalName = "" + x.Type = "" } else { - x.ExternalName = string(r.DecodeString()) + yyv29 := &x.Type + yyv29.CodecDecodeSelf(d) } - yyj2632++ - if yyhl2632 { - yyb2632 = yyj2632 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2632 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2632 { + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34434,37 +41819,43 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ExternalIPs = nil } else { - yyv2640 := &x.ExternalIPs - yym2641 := z.DecBinary() - _ = yym2641 + yyv30 := &x.ExternalIPs + yym31 := z.DecBinary() + _ = yym31 if false { } else { - z.F.DecSliceStringX(yyv2640, false, d) + z.F.DecSliceStringX(yyv30, false, d) } } - yyj2632++ - if yyhl2632 { - yyb2632 = yyj2632 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2632 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2632 { + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.LoadBalancerIP = "" + x.DeprecatedPublicIPs = nil } else { - x.LoadBalancerIP = string(r.DecodeString()) + yyv32 := &x.DeprecatedPublicIPs + yym33 := z.DecBinary() + _ = yym33 + if false { + } else { + z.F.DecSliceStringX(yyv32, false, d) + } } - yyj2632++ - if yyhl2632 { - yyb2632 = yyj2632 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2632 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2632 { + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34472,15 +41863,38 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.SessionAffinity = "" } else { - x.SessionAffinity = ServiceAffinity(r.DecodeString()) + yyv34 := &x.SessionAffinity + yyv34.CodecDecodeSelf(d) } - yyj2632++ - if yyhl2632 { - yyb2632 = yyj2632 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2632 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2632 { + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LoadBalancerIP = "" + } else { + yyv35 := &x.LoadBalancerIP + yym36 := z.DecBinary() + _ = yym36 + if false { + } else { + *((*string)(yyv35)) = r.DecodeString() + } + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34488,26 +41902,48 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LoadBalancerSourceRanges = nil } else { - yyv2644 := &x.LoadBalancerSourceRanges - yym2645 := z.DecBinary() - _ = yym2645 + yyv37 := &x.LoadBalancerSourceRanges + yym38 := z.DecBinary() + _ = yym38 if false { } else { - z.F.DecSliceStringX(yyv2644, false, d) + z.F.DecSliceStringX(yyv37, false, d) + } + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ExternalName = "" + } else { + yyv39 := &x.ExternalName + yym40 := z.DecBinary() + _ = yym40 + if false { + } else { + *((*string)(yyv39)) = r.DecodeString() } } for { - yyj2632++ - if yyhl2632 { - yyb2632 = yyj2632 > l + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l } else { - yyb2632 = r.CheckBreak() + yyb22 = r.CheckBreak() } - if yyb2632 { + if yyb22 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2632-1, "") + z.DecStructFieldNotFound(yyj22-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -34519,61 +41955,77 @@ func (x *ServicePort) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2646 := z.EncBinary() - _ = yym2646 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2647 := !z.EncBinary() - yy2arr2647 := z.EncBasicHandle().StructToArray - var yyq2647 [5]bool - _, _, _ = yysep2647, yyq2647, yy2arr2647 - const yyr2647 bool = false - var yynn2647 int - if yyr2647 || yy2arr2647 { + 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 { - yynn2647 = 5 - for _, b := range yyq2647 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn2647++ + yynn2++ } } - r.EncodeMapStart(yynn2647) - yynn2647 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2647 || yy2arr2647 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2649 := z.EncBinary() - _ = yym2649 - if false { + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("name")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2650 := z.EncBinary() - _ = yym2650 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + 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 yyr2647 || yy2arr2647 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - x.Protocol.CodecEncodeSelf(e) + if yyq2[1] { + x.Protocol.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("protocol")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Protocol.CodecEncodeSelf(e) + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("protocol")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Protocol.CodecEncodeSelf(e) + } } - if yyr2647 || yy2arr2647 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2653 := z.EncBinary() - _ = yym2653 + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeInt(int64(x.Port)) @@ -34582,60 +42034,72 @@ func (x *ServicePort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2654 := z.EncBinary() - _ = yym2654 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr2647 || yy2arr2647 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy2656 := &x.TargetPort - yym2657 := z.EncBinary() - _ = yym2657 - if false { - } else if z.HasExtensions() && z.EncExt(yy2656) { - } else if !yym2657 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2656) + 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 { - z.EncFallback(yy2656) + r.EncodeNil() } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("targetPort")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2658 := &x.TargetPort - yym2659 := z.EncBinary() - _ = yym2659 - if false { - } else if z.HasExtensions() && z.EncExt(yy2658) { - } else if !yym2659 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2658) - } else { - z.EncFallback(yy2658) + 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 yyr2647 || yy2arr2647 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2661 := z.EncBinary() - _ = yym2661 - if false { + if yyq2[4] { + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + r.EncodeInt(int64(x.NodePort)) + } } else { - r.EncodeInt(int64(x.NodePort)) + r.EncodeInt(0) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodePort")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2662 := z.EncBinary() - _ = yym2662 - if false { - } else { - r.EncodeInt(int64(x.NodePort)) + 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 yyr2647 || yy2arr2647 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -34648,25 +42112,25 @@ func (x *ServicePort) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2663 := z.DecBinary() - _ = yym2663 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2664 := r.ContainerType() - if yyct2664 == codecSelferValueTypeMap1234 { - yyl2664 := r.ReadMapStart() - if yyl2664 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2664, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2664 == codecSelferValueTypeArray1234 { - yyl2664 := r.ReadArrayStart() - if yyl2664 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2664, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -34678,12 +42142,12 @@ func (x *ServicePort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2665Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2665Slc - var yyhl2665 bool = l >= 0 - for yyj2665 := 0; ; yyj2665++ { - if yyhl2665 { - if yyj2665 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -34692,53 +42156,72 @@ func (x *ServicePort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2665Slc = r.DecodeBytes(yys2665Slc, true, true) - yys2665 := string(yys2665Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2665 { + switch yys3 { case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "protocol": if r.TryDecodeAsNil() { x.Protocol = "" } else { - x.Protocol = Protocol(r.DecodeString()) + yyv6 := &x.Protocol + yyv6.CodecDecodeSelf(d) } case "port": if r.TryDecodeAsNil() { x.Port = 0 } else { - x.Port = int32(r.DecodeInt(32)) + yyv7 := &x.Port + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*int32)(yyv7)) = int32(r.DecodeInt(32)) + } } case "targetPort": if r.TryDecodeAsNil() { x.TargetPort = pkg4_intstr.IntOrString{} } else { - yyv2669 := &x.TargetPort - yym2670 := z.DecBinary() - _ = yym2670 + yyv9 := &x.TargetPort + yym10 := z.DecBinary() + _ = yym10 if false { - } else if z.HasExtensions() && z.DecExt(yyv2669) { - } else if !yym2670 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2669) + } else if z.HasExtensions() && z.DecExt(yyv9) { + } else if !yym10 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv9) } else { - z.DecFallback(yyv2669, false) + z.DecFallback(yyv9, false) } } case "nodePort": if r.TryDecodeAsNil() { x.NodePort = 0 } else { - x.NodePort = int32(r.DecodeInt(32)) + yyv11 := &x.NodePort + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*int32)(yyv11)) = int32(r.DecodeInt(32)) + } } default: - z.DecStructFieldNotFound(-1, yys2665) - } // end switch yys2665 - } // end for yyj2665 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -34746,16 +42229,16 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2672 int - var yyb2672 bool - var yyhl2672 bool = l >= 0 - yyj2672++ - if yyhl2672 { - yyb2672 = yyj2672 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb2672 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb2672 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34763,15 +42246,21 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv14 := &x.Name + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj2672++ - if yyhl2672 { - yyb2672 = yyj2672 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb2672 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb2672 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34779,15 +42268,16 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Protocol = "" } else { - x.Protocol = Protocol(r.DecodeString()) + yyv16 := &x.Protocol + yyv16.CodecDecodeSelf(d) } - yyj2672++ - if yyhl2672 { - yyb2672 = yyj2672 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb2672 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb2672 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34795,15 +42285,21 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Port = 0 } else { - x.Port = int32(r.DecodeInt(32)) + yyv17 := &x.Port + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*int32)(yyv17)) = int32(r.DecodeInt(32)) + } } - yyj2672++ - if yyhl2672 { - yyb2672 = yyj2672 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb2672 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb2672 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34811,24 +42307,24 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.TargetPort = pkg4_intstr.IntOrString{} } else { - yyv2676 := &x.TargetPort - yym2677 := z.DecBinary() - _ = yym2677 + yyv19 := &x.TargetPort + yym20 := z.DecBinary() + _ = yym20 if false { - } else if z.HasExtensions() && z.DecExt(yyv2676) { - } else if !yym2677 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2676) + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else if !yym20 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv19) } else { - z.DecFallback(yyv2676, false) + z.DecFallback(yyv19, false) } } - yyj2672++ - if yyhl2672 { - yyb2672 = yyj2672 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb2672 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb2672 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34836,20 +42332,26 @@ func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodePort = 0 } else { - x.NodePort = int32(r.DecodeInt(32)) + yyv21 := &x.NodePort + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*int32)(yyv21)) = int32(r.DecodeInt(32)) + } } for { - yyj2672++ - if yyhl2672 { - yyb2672 = yyj2672 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb2672 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb2672 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2672-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -34861,39 +42363,39 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2679 := z.EncBinary() - _ = yym2679 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2680 := !z.EncBinary() - yy2arr2680 := z.EncBasicHandle().StructToArray - var yyq2680 [5]bool - _, _, _ = yysep2680, yyq2680, yy2arr2680 - const yyr2680 bool = false - yyq2680[0] = x.Kind != "" - yyq2680[1] = x.APIVersion != "" - yyq2680[2] = true - yyq2680[3] = true - yyq2680[4] = true - var yynn2680 int - if yyr2680 || yy2arr2680 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn2680 = 0 - for _, b := range yyq2680 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2680++ + yynn2++ } } - r.EncodeMapStart(yynn2680) - yynn2680 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2680 || yy2arr2680 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2680[0] { - yym2682 := z.EncBinary() - _ = yym2682 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -34902,23 +42404,23 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2680[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2683 := z.EncBinary() - _ = yym2683 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2680 || yy2arr2680 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2680[1] { - yym2685 := z.EncBinary() - _ = yym2685 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -34927,70 +42429,82 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2680[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2686 := z.EncBinary() - _ = yym2686 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2680 || yy2arr2680 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2680[2] { - yy2688 := &x.ObjectMeta - yy2688.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq2680[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2689 := &x.ObjectMeta - yy2689.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr2680 || yy2arr2680 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2680[3] { - yy2691 := &x.Spec - yy2691.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2680[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2692 := &x.Spec - yy2692.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr2680 || yy2arr2680 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2680[4] { - yy2694 := &x.Status - yy2694.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2680[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2695 := &x.Status - yy2695.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr2680 || yy2arr2680 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -35003,25 +42517,25 @@ func (x *Service) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2696 := z.DecBinary() - _ = yym2696 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2697 := r.ContainerType() - if yyct2697 == codecSelferValueTypeMap1234 { - yyl2697 := r.ReadMapStart() - if yyl2697 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2697, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2697 == codecSelferValueTypeArray1234 { - yyl2697 := r.ReadArrayStart() - if yyl2697 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2697, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -35033,12 +42547,12 @@ func (x *Service) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2698Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2698Slc - var yyhl2698 bool = l >= 0 - for yyj2698 := 0; ; yyj2698++ { - if yyhl2698 { - if yyj2698 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -35047,47 +42561,65 @@ func (x *Service) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2698Slc = r.DecodeBytes(yys2698Slc, true, true) - yys2698 := string(yys2698Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2698 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2701 := &x.ObjectMeta - yyv2701.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ServiceSpec{} } else { - yyv2702 := &x.Spec - yyv2702.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ServiceStatus{} } else { - yyv2703 := &x.Status - yyv2703.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2698) - } // end switch yys2698 - } // end for yyj2698 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -35095,16 +42627,16 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2704 int - var yyb2704 bool - var yyhl2704 bool = l >= 0 - yyj2704++ - if yyhl2704 { - yyb2704 = yyj2704 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2704 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2704 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35112,15 +42644,21 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj2704++ - if yyhl2704 { - yyb2704 = yyj2704 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2704 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2704 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35128,32 +42666,44 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj2704++ - if yyhl2704 { - yyb2704 = yyj2704 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2704 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2704 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2707 := &x.ObjectMeta - yyv2707.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj2704++ - if yyhl2704 { - yyb2704 = yyj2704 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2704 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2704 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35161,16 +42711,16 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ServiceSpec{} } else { - yyv2708 := &x.Spec - yyv2708.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj2704++ - if yyhl2704 { - yyb2704 = yyj2704 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2704 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2704 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35178,21 +42728,389 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ServiceStatus{} } else { - yyv2709 := &x.Status - yyv2709.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj2704++ - if yyhl2704 { - yyb2704 = yyj2704 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2704 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2704 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2704-1, "") + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ServiceList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceService(([]Service)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceService(([]Service)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ServiceList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ServiceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg2_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceService((*[]Service)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg2_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceService((*[]Service)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35204,38 +43122,40 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2710 := z.EncBinary() - _ = yym2710 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2711 := !z.EncBinary() - yy2arr2711 := z.EncBasicHandle().StructToArray - var yyq2711 [5]bool - _, _, _ = yysep2711, yyq2711, yy2arr2711 - const yyr2711 bool = false - yyq2711[0] = x.Kind != "" - yyq2711[1] = x.APIVersion != "" - yyq2711[2] = true - yyq2711[4] = len(x.ImagePullSecrets) != 0 - var yynn2711 int - if yyr2711 || yy2arr2711 { - r.EncodeArrayStart(5) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [6]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = len(x.Secrets) != 0 + yyq2[4] = len(x.ImagePullSecrets) != 0 + yyq2[5] = x.AutomountServiceAccountToken != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(6) } else { - yynn2711 = 1 - for _, b := range yyq2711 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2711++ + yynn2++ } } - r.EncodeMapStart(yynn2711) - yynn2711 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2711 || yy2arr2711 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2711[0] { - yym2713 := z.EncBinary() - _ = yym2713 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -35244,23 +43164,23 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2711[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2714 := z.EncBinary() - _ = yym2714 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2711 || yy2arr2711 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2711[1] { - yym2716 := z.EncBinary() - _ = yym2716 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -35269,70 +43189,88 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2711[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2717 := z.EncBinary() - _ = yym2717 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2711 || yy2arr2711 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2711[2] { - yy2719 := &x.ObjectMeta - yy2719.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq2711[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2720 := &x.ObjectMeta - yy2720.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr2711 || yy2arr2711 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Secrets == nil { - r.EncodeNil() - } else { - yym2722 := z.EncBinary() - _ = yym2722 - if false { + if yyq2[3] { + if x.Secrets == nil { + r.EncodeNil() } else { - h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e) + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e) + } } + } else { + r.EncodeNil() } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("secrets")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Secrets == nil { - r.EncodeNil() - } else { - yym2723 := z.EncBinary() - _ = yym2723 - if false { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("secrets")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Secrets == nil { + r.EncodeNil() } else { - h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e) + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e) + } } } } - if yyr2711 || yy2arr2711 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2711[4] { + if yyq2[4] { if x.ImagePullSecrets == nil { r.EncodeNil() } else { - yym2725 := z.EncBinary() - _ = yym2725 + yym18 := z.EncBinary() + _ = yym18 if false { } else { h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) @@ -35342,15 +43280,15 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2711[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ImagePullSecrets == nil { r.EncodeNil() } else { - yym2726 := z.EncBinary() - _ = yym2726 + yym19 := z.EncBinary() + _ = yym19 if false { } else { h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e) @@ -35358,7 +43296,42 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2711 || yy2arr2711 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + if x.AutomountServiceAccountToken == nil { + r.EncodeNil() + } else { + yy21 := *x.AutomountServiceAccountToken + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + r.EncodeBool(bool(yy21)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("automountServiceAccountToken")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.AutomountServiceAccountToken == nil { + r.EncodeNil() + } else { + yy23 := *x.AutomountServiceAccountToken + yym24 := z.EncBinary() + _ = yym24 + if false { + } else { + r.EncodeBool(bool(yy23)) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -35371,25 +43344,25 @@ func (x *ServiceAccount) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2727 := z.DecBinary() - _ = yym2727 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2728 := r.ContainerType() - if yyct2728 == codecSelferValueTypeMap1234 { - yyl2728 := r.ReadMapStart() - if yyl2728 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2728, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2728 == codecSelferValueTypeArray1234 { - yyl2728 := r.ReadArrayStart() - if yyl2728 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2728, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -35401,12 +43374,12 @@ func (x *ServiceAccount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2729Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2729Slc - var yyhl2729 bool = l >= 0 - for yyj2729 := 0; ; yyj2729++ { - if yyhl2729 { - if yyj2729 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -35415,57 +43388,91 @@ func (x *ServiceAccount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2729Slc = r.DecodeBytes(yys2729Slc, true, true) - yys2729 := string(yys2729Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2729 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2732 := &x.ObjectMeta - yyv2732.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "secrets": if r.TryDecodeAsNil() { x.Secrets = nil } else { - yyv2733 := &x.Secrets - yym2734 := z.DecBinary() - _ = yym2734 + yyv10 := &x.Secrets + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceObjectReference((*[]ObjectReference)(yyv2733), d) + h.decSliceObjectReference((*[]ObjectReference)(yyv10), d) } } case "imagePullSecrets": if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv2735 := &x.ImagePullSecrets - yym2736 := z.DecBinary() - _ = yym2736 + yyv12 := &x.ImagePullSecrets + yym13 := z.DecBinary() + _ = yym13 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv2735), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv12), d) + } + } + case "automountServiceAccountToken": + if r.TryDecodeAsNil() { + if x.AutomountServiceAccountToken != nil { + x.AutomountServiceAccountToken = nil + } + } else { + if x.AutomountServiceAccountToken == nil { + x.AutomountServiceAccountToken = new(bool) + } + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*bool)(x.AutomountServiceAccountToken)) = r.DecodeBool() } } default: - z.DecStructFieldNotFound(-1, yys2729) - } // end switch yys2729 - } // end for yyj2729 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -35473,16 +43480,16 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2737 int - var yyb2737 bool - var yyhl2737 bool = l >= 0 - yyj2737++ - if yyhl2737 { - yyb2737 = yyj2737 > l + var yyj16 int + var yyb16 bool + var yyhl16 bool = l >= 0 + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb2737 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb2737 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35490,15 +43497,21 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv17 := &x.Kind + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } } - yyj2737++ - if yyhl2737 { - yyb2737 = yyj2737 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb2737 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb2737 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35506,32 +43519,44 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv19 := &x.APIVersion + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } } - yyj2737++ - if yyhl2737 { - yyb2737 = yyj2737 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb2737 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb2737 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2740 := &x.ObjectMeta - yyv2740.CodecDecodeSelf(d) + yyv21 := &x.ObjectMeta + yym22 := z.DecBinary() + _ = yym22 + if false { + } else if z.HasExtensions() && z.DecExt(yyv21) { + } else { + z.DecFallback(yyv21, false) + } } - yyj2737++ - if yyhl2737 { - yyb2737 = yyj2737 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb2737 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb2737 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35539,21 +43564,21 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Secrets = nil } else { - yyv2741 := &x.Secrets - yym2742 := z.DecBinary() - _ = yym2742 + yyv23 := &x.Secrets + yym24 := z.DecBinary() + _ = yym24 if false { } else { - h.decSliceObjectReference((*[]ObjectReference)(yyv2741), d) + h.decSliceObjectReference((*[]ObjectReference)(yyv23), d) } } - yyj2737++ - if yyhl2737 { - yyb2737 = yyj2737 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb2737 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb2737 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35561,26 +43586,52 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv2743 := &x.ImagePullSecrets - yym2744 := z.DecBinary() - _ = yym2744 + yyv25 := &x.ImagePullSecrets + yym26 := z.DecBinary() + _ = yym26 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv2743), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv25), d) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.AutomountServiceAccountToken != nil { + x.AutomountServiceAccountToken = nil + } + } else { + if x.AutomountServiceAccountToken == nil { + x.AutomountServiceAccountToken = new(bool) + } + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*bool)(x.AutomountServiceAccountToken)) = r.DecodeBool() } } for { - yyj2737++ - if yyhl2737 { - yyb2737 = yyj2737 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb2737 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb2737 { + if yyb16 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2737-1, "") + z.DecStructFieldNotFound(yyj16-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35592,37 +43643,37 @@ func (x *ServiceAccountList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2745 := z.EncBinary() - _ = yym2745 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2746 := !z.EncBinary() - yy2arr2746 := z.EncBasicHandle().StructToArray - var yyq2746 [4]bool - _, _, _ = yysep2746, yyq2746, yy2arr2746 - const yyr2746 bool = false - yyq2746[0] = x.Kind != "" - yyq2746[1] = x.APIVersion != "" - yyq2746[2] = true - var yynn2746 int - if yyr2746 || yy2arr2746 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn2746 = 1 - for _, b := range yyq2746 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn2746++ + yynn2++ } } - r.EncodeMapStart(yynn2746) - yynn2746 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2746 || yy2arr2746 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2746[0] { - yym2748 := z.EncBinary() - _ = yym2748 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -35631,23 +43682,23 @@ func (x *ServiceAccountList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2746[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2749 := z.EncBinary() - _ = yym2749 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2746 || yy2arr2746 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2746[1] { - yym2751 := z.EncBinary() - _ = yym2751 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -35656,54 +43707,54 @@ func (x *ServiceAccountList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2746[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2752 := z.EncBinary() - _ = yym2752 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2746 || yy2arr2746 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2746[2] { - yy2754 := &x.ListMeta - yym2755 := z.EncBinary() - _ = yym2755 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy2754) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy2754) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq2746[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2756 := &x.ListMeta - yym2757 := z.EncBinary() - _ = yym2757 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy2756) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy2756) + z.EncFallback(yy12) } } } - if yyr2746 || yy2arr2746 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym2759 := z.EncBinary() - _ = yym2759 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceServiceAccount(([]ServiceAccount)(x.Items), e) @@ -35716,15 +43767,15 @@ func (x *ServiceAccountList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym2760 := z.EncBinary() - _ = yym2760 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceServiceAccount(([]ServiceAccount)(x.Items), e) } } } - if yyr2746 || yy2arr2746 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -35737,25 +43788,25 @@ func (x *ServiceAccountList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2761 := z.DecBinary() - _ = yym2761 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2762 := r.ContainerType() - if yyct2762 == codecSelferValueTypeMap1234 { - yyl2762 := r.ReadMapStart() - if yyl2762 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2762, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2762 == codecSelferValueTypeArray1234 { - yyl2762 := r.ReadArrayStart() - if yyl2762 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2762, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -35767,12 +43818,12 @@ func (x *ServiceAccountList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2763Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2763Slc - var yyhl2763 bool = l >= 0 - for yyj2763 := 0; ; yyj2763++ { - if yyhl2763 { - if yyj2763 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -35781,51 +43832,63 @@ func (x *ServiceAccountList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2763Slc = r.DecodeBytes(yys2763Slc, true, true) - yys2763 := string(yys2763Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2763 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv2766 := &x.ListMeta - yym2767 := z.DecBinary() - _ = yym2767 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv2766) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv2766, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2768 := &x.Items - yym2769 := z.DecBinary() - _ = yym2769 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceServiceAccount((*[]ServiceAccount)(yyv2768), d) + h.decSliceServiceAccount((*[]ServiceAccount)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys2763) - } // end switch yys2763 - } // end for yyj2763 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -35833,16 +43896,16 @@ func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2770 int - var yyb2770 bool - var yyhl2770 bool = l >= 0 - yyj2770++ - if yyhl2770 { - yyb2770 = yyj2770 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2770 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2770 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35850,15 +43913,21 @@ func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj2770++ - if yyhl2770 { - yyb2770 = yyj2770 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2770 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2770 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35866,38 +43935,44 @@ func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj2770++ - if yyhl2770 { - yyb2770 = yyj2770 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2770 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2770 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv2773 := &x.ListMeta - yym2774 := z.DecBinary() - _ = yym2774 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv2773) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv2773, false) + z.DecFallback(yyv17, false) } } - yyj2770++ - if yyhl2770 { - yyb2770 = yyj2770 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2770 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2770 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35905,26 +43980,26 @@ func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2775 := &x.Items - yym2776 := z.DecBinary() - _ = yym2776 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceServiceAccount((*[]ServiceAccount)(yyv2775), d) + h.decSliceServiceAccount((*[]ServiceAccount)(yyv19), d) } } for { - yyj2770++ - if yyhl2770 { - yyb2770 = yyj2770 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2770 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2770 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2770-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35936,37 +44011,37 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2777 := z.EncBinary() - _ = yym2777 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2778 := !z.EncBinary() - yy2arr2778 := z.EncBasicHandle().StructToArray - var yyq2778 [4]bool - _, _, _ = yysep2778, yyq2778, yy2arr2778 - const yyr2778 bool = false - yyq2778[0] = x.Kind != "" - yyq2778[1] = x.APIVersion != "" - yyq2778[2] = true - var yynn2778 int - if yyr2778 || yy2arr2778 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn2778 = 1 - for _, b := range yyq2778 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn2778++ + yynn2++ } } - r.EncodeMapStart(yynn2778) - yynn2778 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2778 || yy2arr2778 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2778[0] { - yym2780 := z.EncBinary() - _ = yym2780 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -35975,23 +44050,23 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2778[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2781 := z.EncBinary() - _ = yym2781 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2778 || yy2arr2778 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2778[1] { - yym2783 := z.EncBinary() - _ = yym2783 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -36000,42 +44075,54 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2778[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2784 := z.EncBinary() - _ = yym2784 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2778 || yy2arr2778 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2778[2] { - yy2786 := &x.ObjectMeta - yy2786.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq2778[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2787 := &x.ObjectMeta - yy2787.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr2778 || yy2arr2778 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Subsets == nil { r.EncodeNil() } else { - yym2789 := z.EncBinary() - _ = yym2789 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceEndpointSubset(([]EndpointSubset)(x.Subsets), e) @@ -36043,20 +44130,20 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Subsets")) + r.EncodeString(codecSelferC_UTF81234, string("subsets")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Subsets == nil { r.EncodeNil() } else { - yym2790 := z.EncBinary() - _ = yym2790 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceEndpointSubset(([]EndpointSubset)(x.Subsets), e) } } } - if yyr2778 || yy2arr2778 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -36069,25 +44156,25 @@ func (x *Endpoints) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2791 := z.DecBinary() - _ = yym2791 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2792 := r.ContainerType() - if yyct2792 == codecSelferValueTypeMap1234 { - yyl2792 := r.ReadMapStart() - if yyl2792 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2792, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2792 == codecSelferValueTypeArray1234 { - yyl2792 := r.ReadArrayStart() - if yyl2792 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2792, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -36099,12 +44186,12 @@ func (x *Endpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2793Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2793Slc - var yyhl2793 bool = l >= 0 - for yyj2793 := 0; ; yyj2793++ { - if yyhl2793 { - if yyj2793 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -36113,45 +44200,63 @@ func (x *Endpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2793Slc = r.DecodeBytes(yys2793Slc, true, true) - yys2793 := string(yys2793Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2793 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2796 := &x.ObjectMeta - yyv2796.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } - case "Subsets": + case "subsets": if r.TryDecodeAsNil() { x.Subsets = nil } else { - yyv2797 := &x.Subsets - yym2798 := z.DecBinary() - _ = yym2798 + yyv10 := &x.Subsets + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceEndpointSubset((*[]EndpointSubset)(yyv2797), d) + h.decSliceEndpointSubset((*[]EndpointSubset)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys2793) - } // end switch yys2793 - } // end for yyj2793 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -36159,16 +44264,16 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2799 int - var yyb2799 bool - var yyhl2799 bool = l >= 0 - yyj2799++ - if yyhl2799 { - yyb2799 = yyj2799 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2799 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2799 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36176,15 +44281,21 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj2799++ - if yyhl2799 { - yyb2799 = yyj2799 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2799 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2799 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36192,32 +44303,44 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj2799++ - if yyhl2799 { - yyb2799 = yyj2799 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2799 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2799 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv2802 := &x.ObjectMeta - yyv2802.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj2799++ - if yyhl2799 { - yyb2799 = yyj2799 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2799 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2799 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36225,26 +44348,26 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Subsets = nil } else { - yyv2803 := &x.Subsets - yym2804 := z.DecBinary() - _ = yym2804 + yyv19 := &x.Subsets + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceEndpointSubset((*[]EndpointSubset)(yyv2803), d) + h.decSliceEndpointSubset((*[]EndpointSubset)(yyv19), d) } } for { - yyj2799++ - if yyhl2799 { - yyb2799 = yyj2799 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2799 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2799 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2799-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -36256,111 +44379,132 @@ func (x *EndpointSubset) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2805 := z.EncBinary() - _ = yym2805 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2806 := !z.EncBinary() - yy2arr2806 := z.EncBasicHandle().StructToArray - var yyq2806 [3]bool - _, _, _ = yysep2806, yyq2806, yy2arr2806 - const yyr2806 bool = false - var yynn2806 int - if yyr2806 || yy2arr2806 { + 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 { - yynn2806 = 3 - for _, b := range yyq2806 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2806++ + yynn2++ } } - r.EncodeMapStart(yynn2806) - yynn2806 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2806 || yy2arr2806 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Addresses == nil { - r.EncodeNil() - } else { - yym2808 := z.EncBinary() - _ = yym2808 - if false { + if yyq2[0] { + if x.Addresses == nil { + r.EncodeNil() } else { - h.encSliceEndpointAddress(([]EndpointAddress)(x.Addresses), e) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + h.encSliceEndpointAddress(([]EndpointAddress)(x.Addresses), e) + } } + } else { + r.EncodeNil() } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Addresses")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Addresses == nil { - r.EncodeNil() - } else { - yym2809 := z.EncBinary() - _ = yym2809 - if false { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("addresses")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Addresses == nil { + r.EncodeNil() } else { - h.encSliceEndpointAddress(([]EndpointAddress)(x.Addresses), e) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + h.encSliceEndpointAddress(([]EndpointAddress)(x.Addresses), e) + } } } } - if yyr2806 || yy2arr2806 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.NotReadyAddresses == nil { - r.EncodeNil() - } else { - yym2811 := z.EncBinary() - _ = yym2811 - if false { + if yyq2[1] { + if x.NotReadyAddresses == nil { + r.EncodeNil() } else { - h.encSliceEndpointAddress(([]EndpointAddress)(x.NotReadyAddresses), e) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + h.encSliceEndpointAddress(([]EndpointAddress)(x.NotReadyAddresses), e) + } } + } else { + r.EncodeNil() } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("NotReadyAddresses")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.NotReadyAddresses == nil { - r.EncodeNil() - } else { - yym2812 := z.EncBinary() - _ = yym2812 - if false { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("notReadyAddresses")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.NotReadyAddresses == nil { + r.EncodeNil() } else { - h.encSliceEndpointAddress(([]EndpointAddress)(x.NotReadyAddresses), e) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + h.encSliceEndpointAddress(([]EndpointAddress)(x.NotReadyAddresses), e) + } } } } - if yyr2806 || yy2arr2806 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Ports == nil { - r.EncodeNil() - } else { - yym2814 := z.EncBinary() - _ = yym2814 - if false { + if yyq2[2] { + if x.Ports == nil { + r.EncodeNil() } else { - h.encSliceEndpointPort(([]EndpointPort)(x.Ports), e) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + h.encSliceEndpointPort(([]EndpointPort)(x.Ports), e) + } } + } else { + r.EncodeNil() } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Ports")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Ports == nil { - r.EncodeNil() - } else { - yym2815 := z.EncBinary() - _ = yym2815 - if false { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("ports")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Ports == nil { + r.EncodeNil() } else { - h.encSliceEndpointPort(([]EndpointPort)(x.Ports), e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + h.encSliceEndpointPort(([]EndpointPort)(x.Ports), e) + } } } } - if yyr2806 || yy2arr2806 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -36373,25 +44517,25 @@ func (x *EndpointSubset) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2816 := z.DecBinary() - _ = yym2816 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2817 := r.ContainerType() - if yyct2817 == codecSelferValueTypeMap1234 { - yyl2817 := r.ReadMapStart() - if yyl2817 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2817, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2817 == codecSelferValueTypeArray1234 { - yyl2817 := r.ReadArrayStart() - if yyl2817 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2817, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -36403,12 +44547,12 @@ func (x *EndpointSubset) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2818Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2818Slc - var yyhl2818 bool = l >= 0 - for yyj2818 := 0; ; yyj2818++ { - if yyhl2818 { - if yyj2818 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -36417,50 +44561,50 @@ func (x *EndpointSubset) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2818Slc = r.DecodeBytes(yys2818Slc, true, true) - yys2818 := string(yys2818Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2818 { - case "Addresses": + switch yys3 { + case "addresses": if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv2819 := &x.Addresses - yym2820 := z.DecBinary() - _ = yym2820 + yyv4 := &x.Addresses + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2819), d) + h.decSliceEndpointAddress((*[]EndpointAddress)(yyv4), d) } } - case "NotReadyAddresses": + case "notReadyAddresses": if r.TryDecodeAsNil() { x.NotReadyAddresses = nil } else { - yyv2821 := &x.NotReadyAddresses - yym2822 := z.DecBinary() - _ = yym2822 + yyv6 := &x.NotReadyAddresses + yym7 := z.DecBinary() + _ = yym7 if false { } else { - h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2821), d) + h.decSliceEndpointAddress((*[]EndpointAddress)(yyv6), d) } } - case "Ports": + case "ports": if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv2823 := &x.Ports - yym2824 := z.DecBinary() - _ = yym2824 + yyv8 := &x.Ports + yym9 := z.DecBinary() + _ = yym9 if false { } else { - h.decSliceEndpointPort((*[]EndpointPort)(yyv2823), d) + h.decSliceEndpointPort((*[]EndpointPort)(yyv8), d) } } default: - z.DecStructFieldNotFound(-1, yys2818) - } // end switch yys2818 - } // end for yyj2818 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -36468,16 +44612,16 @@ func (x *EndpointSubset) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2825 int - var yyb2825 bool - var yyhl2825 bool = l >= 0 - yyj2825++ - if yyhl2825 { - yyb2825 = yyj2825 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb2825 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb2825 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36485,21 +44629,21 @@ func (x *EndpointSubset) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv2826 := &x.Addresses - yym2827 := z.DecBinary() - _ = yym2827 + yyv11 := &x.Addresses + yym12 := z.DecBinary() + _ = yym12 if false { } else { - h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2826), d) + h.decSliceEndpointAddress((*[]EndpointAddress)(yyv11), d) } } - yyj2825++ - if yyhl2825 { - yyb2825 = yyj2825 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb2825 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb2825 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36507,21 +44651,21 @@ func (x *EndpointSubset) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NotReadyAddresses = nil } else { - yyv2828 := &x.NotReadyAddresses - yym2829 := z.DecBinary() - _ = yym2829 + yyv13 := &x.NotReadyAddresses + yym14 := z.DecBinary() + _ = yym14 if false { } else { - h.decSliceEndpointAddress((*[]EndpointAddress)(yyv2828), d) + h.decSliceEndpointAddress((*[]EndpointAddress)(yyv13), d) } } - yyj2825++ - if yyhl2825 { - yyb2825 = yyj2825 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb2825 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb2825 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36529,26 +44673,26 @@ func (x *EndpointSubset) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv2830 := &x.Ports - yym2831 := z.DecBinary() - _ = yym2831 + yyv15 := &x.Ports + yym16 := z.DecBinary() + _ = yym16 if false { } else { - h.decSliceEndpointPort((*[]EndpointPort)(yyv2830), d) + h.decSliceEndpointPort((*[]EndpointPort)(yyv15), d) } } for { - yyj2825++ - if yyhl2825 { - yyb2825 = yyj2825 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb2825 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb2825 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2825-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -36560,55 +44704,56 @@ func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2832 := z.EncBinary() - _ = yym2832 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2833 := !z.EncBinary() - yy2arr2833 := z.EncBasicHandle().StructToArray - var yyq2833 [4]bool - _, _, _ = yysep2833, yyq2833, yy2arr2833 - const yyr2833 bool = false - yyq2833[1] = x.Hostname != "" - yyq2833[2] = x.NodeName != nil - var yynn2833 int - if yyr2833 || yy2arr2833 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Hostname != "" + yyq2[2] = x.NodeName != nil + yyq2[3] = x.TargetRef != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn2833 = 2 - for _, b := range yyq2833 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn2833++ + yynn2++ } } - r.EncodeMapStart(yynn2833) - yynn2833 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2833 || yy2arr2833 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2835 := z.EncBinary() - _ = yym2835 + 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")) + r.EncodeString(codecSelferC_UTF81234, string("ip")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2836 := z.EncBinary() - _ = yym2836 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.IP)) } } - if yyr2833 || yy2arr2833 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2833[1] { - yym2838 := z.EncBinary() - _ = yym2838 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Hostname)) @@ -36617,71 +44762,77 @@ func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2833[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostname")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2839 := z.EncBinary() - _ = yym2839 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Hostname)) } } } - if yyr2833 || yy2arr2833 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2833[2] { + if yyq2[2] { if x.NodeName == nil { r.EncodeNil() } else { - yy2841 := *x.NodeName - yym2842 := z.EncBinary() - _ = yym2842 + yy10 := *x.NodeName + yym11 := z.EncBinary() + _ = yym11 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yy2841)) + r.EncodeString(codecSelferC_UTF81234, string(yy10)) } } } else { r.EncodeNil() } } else { - if yyq2833[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.NodeName == nil { r.EncodeNil() } else { - yy2843 := *x.NodeName - yym2844 := z.EncBinary() - _ = yym2844 + yy12 := *x.NodeName + yym13 := z.EncBinary() + _ = yym13 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yy2843)) + r.EncodeString(codecSelferC_UTF81234, string(yy12)) } } } } - if yyr2833 || yy2arr2833 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.TargetRef == nil { - r.EncodeNil() + if yyq2[3] { + if x.TargetRef == nil { + r.EncodeNil() + } else { + x.TargetRef.CodecEncodeSelf(e) + } } else { - x.TargetRef.CodecEncodeSelf(e) + r.EncodeNil() } } 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 yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("targetRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.TargetRef == nil { + r.EncodeNil() + } else { + x.TargetRef.CodecEncodeSelf(e) + } } } - if yyr2833 || yy2arr2833 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -36694,25 +44845,25 @@ func (x *EndpointAddress) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2846 := z.DecBinary() - _ = yym2846 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2847 := r.ContainerType() - if yyct2847 == codecSelferValueTypeMap1234 { - yyl2847 := r.ReadMapStart() - if yyl2847 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2847, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2847 == codecSelferValueTypeArray1234 { - yyl2847 := r.ReadArrayStart() - if yyl2847 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2847, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -36724,12 +44875,12 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2848Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2848Slc - var yyhl2848 bool = l >= 0 - for yyj2848 := 0; ; yyj2848++ { - if yyhl2848 { - if yyj2848 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -36738,21 +44889,33 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2848Slc = r.DecodeBytes(yys2848Slc, true, true) - yys2848 := string(yys2848Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2848 { - case "IP": + switch yys3 { + case "ip": if r.TryDecodeAsNil() { x.IP = "" } else { - x.IP = string(r.DecodeString()) + yyv4 := &x.IP + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "hostname": if r.TryDecodeAsNil() { x.Hostname = "" } else { - x.Hostname = string(r.DecodeString()) + yyv6 := &x.Hostname + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "nodeName": if r.TryDecodeAsNil() { @@ -36763,14 +44926,14 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.NodeName == nil { x.NodeName = new(string) } - yym2852 := z.DecBinary() - _ = yym2852 + yym9 := z.DecBinary() + _ = yym9 if false { } else { *((*string)(x.NodeName)) = r.DecodeString() } } - case "TargetRef": + case "targetRef": if r.TryDecodeAsNil() { if x.TargetRef != nil { x.TargetRef = nil @@ -36782,9 +44945,9 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.TargetRef.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2848) - } // end switch yys2848 - } // end for yyj2848 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -36792,16 +44955,16 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2854 int - var yyb2854 bool - var yyhl2854 bool = l >= 0 - yyj2854++ - if yyhl2854 { - yyb2854 = yyj2854 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2854 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2854 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36809,15 +44972,21 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.IP = "" } else { - x.IP = string(r.DecodeString()) + yyv12 := &x.IP + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } - yyj2854++ - if yyhl2854 { - yyb2854 = yyj2854 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2854 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2854 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36825,15 +44994,21 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Hostname = "" } else { - x.Hostname = string(r.DecodeString()) + yyv14 := &x.Hostname + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj2854++ - if yyhl2854 { - yyb2854 = yyj2854 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2854 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2854 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36846,20 +45021,20 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.NodeName == nil { x.NodeName = new(string) } - yym2858 := z.DecBinary() - _ = yym2858 + yym17 := z.DecBinary() + _ = yym17 if false { } else { *((*string)(x.NodeName)) = r.DecodeString() } } - yyj2854++ - if yyhl2854 { - yyb2854 = yyj2854 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2854 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2854 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36875,17 +45050,17 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.TargetRef.CodecDecodeSelf(d) } for { - yyj2854++ - if yyhl2854 { - yyb2854 = yyj2854 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb2854 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb2854 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2854-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -36897,77 +45072,91 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2860 := z.EncBinary() - _ = yym2860 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2861 := !z.EncBinary() - yy2arr2861 := z.EncBasicHandle().StructToArray - var yyq2861 [3]bool - _, _, _ = yysep2861, yyq2861, yy2arr2861 - const yyr2861 bool = false - var yynn2861 int - if yyr2861 || yy2arr2861 { + 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 { - yynn2861 = 3 - for _, b := range yyq2861 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn2861++ + yynn2++ } } - r.EncodeMapStart(yynn2861) - yynn2861 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2861 || yy2arr2861 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2863 := z.EncBinary() - _ = yym2863 - if false { + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Name")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2864 := z.EncBinary() - _ = yym2864 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + 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 yyr2861 || yy2arr2861 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2866 := z.EncBinary() - _ = yym2866 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeInt(int64(x.Port)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Port")) + r.EncodeString(codecSelferC_UTF81234, string("port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2867 := z.EncBinary() - _ = yym2867 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr2861 || yy2arr2861 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - x.Protocol.CodecEncodeSelf(e) + if yyq2[2] { + x.Protocol.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Protocol")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Protocol.CodecEncodeSelf(e) + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("protocol")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Protocol.CodecEncodeSelf(e) + } } - if yyr2861 || yy2arr2861 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -36980,25 +45169,25 @@ func (x *EndpointPort) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2869 := z.DecBinary() - _ = yym2869 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2870 := r.ContainerType() - if yyct2870 == codecSelferValueTypeMap1234 { - yyl2870 := r.ReadMapStart() - if yyl2870 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2870, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2870 == codecSelferValueTypeArray1234 { - yyl2870 := r.ReadArrayStart() - if yyl2870 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2870, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37010,12 +45199,12 @@ func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2871Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2871Slc - var yyhl2871 bool = l >= 0 - for yyj2871 := 0; ; yyj2871++ { - if yyhl2871 { - if yyj2871 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -37024,32 +45213,45 @@ func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2871Slc = r.DecodeBytes(yys2871Slc, true, true) - yys2871 := string(yys2871Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2871 { - case "Name": + switch yys3 { + case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } - case "Port": + case "port": if r.TryDecodeAsNil() { x.Port = 0 } else { - x.Port = int32(r.DecodeInt(32)) + yyv6 := &x.Port + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(yyv6)) = int32(r.DecodeInt(32)) + } } - case "Protocol": + case "protocol": if r.TryDecodeAsNil() { x.Protocol = "" } else { - x.Protocol = Protocol(r.DecodeString()) + yyv8 := &x.Protocol + yyv8.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2871) - } // end switch yys2871 - } // end for yyj2871 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37057,16 +45259,16 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2875 int - var yyb2875 bool - var yyhl2875 bool = l >= 0 - yyj2875++ - if yyhl2875 { - yyb2875 = yyj2875 > l + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb2875 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb2875 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37074,15 +45276,21 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv10 := &x.Name + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } - yyj2875++ - if yyhl2875 { - yyb2875 = yyj2875 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb2875 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb2875 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37090,15 +45298,21 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Port = 0 } else { - x.Port = int32(r.DecodeInt(32)) + yyv12 := &x.Port + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int32)(yyv12)) = int32(r.DecodeInt(32)) + } } - yyj2875++ - if yyhl2875 { - yyb2875 = yyj2875 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb2875 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb2875 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37106,20 +45320,21 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Protocol = "" } else { - x.Protocol = Protocol(r.DecodeString()) + yyv14 := &x.Protocol + yyv14.CodecDecodeSelf(d) } for { - yyj2875++ - if yyhl2875 { - yyb2875 = yyj2875 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb2875 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb2875 { + if yyb9 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2875-1, "") + z.DecStructFieldNotFound(yyj9-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37131,37 +45346,37 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2879 := z.EncBinary() - _ = yym2879 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2880 := !z.EncBinary() - yy2arr2880 := z.EncBasicHandle().StructToArray - var yyq2880 [4]bool - _, _, _ = yysep2880, yyq2880, yy2arr2880 - const yyr2880 bool = false - yyq2880[0] = x.Kind != "" - yyq2880[1] = x.APIVersion != "" - yyq2880[2] = true - var yynn2880 int - if yyr2880 || yy2arr2880 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn2880 = 1 - for _, b := range yyq2880 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn2880++ + yynn2++ } } - r.EncodeMapStart(yynn2880) - yynn2880 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2880 || yy2arr2880 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2880[0] { - yym2882 := z.EncBinary() - _ = yym2882 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -37170,23 +45385,23 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2880[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2883 := z.EncBinary() - _ = yym2883 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2880 || yy2arr2880 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2880[1] { - yym2885 := z.EncBinary() - _ = yym2885 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -37195,54 +45410,54 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2880[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2886 := z.EncBinary() - _ = yym2886 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2880 || yy2arr2880 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2880[2] { - yy2888 := &x.ListMeta - yym2889 := z.EncBinary() - _ = yym2889 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy2888) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy2888) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq2880[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2890 := &x.ListMeta - yym2891 := z.EncBinary() - _ = yym2891 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy2890) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy2890) + z.EncFallback(yy12) } } } - if yyr2880 || yy2arr2880 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym2893 := z.EncBinary() - _ = yym2893 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceEndpoints(([]Endpoints)(x.Items), e) @@ -37255,15 +45470,15 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym2894 := z.EncBinary() - _ = yym2894 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceEndpoints(([]Endpoints)(x.Items), e) } } } - if yyr2880 || yy2arr2880 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37276,25 +45491,25 @@ func (x *EndpointsList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2895 := z.DecBinary() - _ = yym2895 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2896 := r.ContainerType() - if yyct2896 == codecSelferValueTypeMap1234 { - yyl2896 := r.ReadMapStart() - if yyl2896 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2896, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2896 == codecSelferValueTypeArray1234 { - yyl2896 := r.ReadArrayStart() - if yyl2896 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2896, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37306,12 +45521,12 @@ func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2897Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2897Slc - var yyhl2897 bool = l >= 0 - for yyj2897 := 0; ; yyj2897++ { - if yyhl2897 { - if yyj2897 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -37320,51 +45535,63 @@ func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2897Slc = r.DecodeBytes(yys2897Slc, true, true) - yys2897 := string(yys2897Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2897 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv2900 := &x.ListMeta - yym2901 := z.DecBinary() - _ = yym2901 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv2900) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv2900, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2902 := &x.Items - yym2903 := z.DecBinary() - _ = yym2903 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceEndpoints((*[]Endpoints)(yyv2902), d) + h.decSliceEndpoints((*[]Endpoints)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys2897) - } // end switch yys2897 - } // end for yyj2897 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37372,16 +45599,16 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2904 int - var yyb2904 bool - var yyhl2904 bool = l >= 0 - yyj2904++ - if yyhl2904 { - yyb2904 = yyj2904 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2904 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2904 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37389,15 +45616,21 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj2904++ - if yyhl2904 { - yyb2904 = yyj2904 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2904 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2904 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37405,38 +45638,44 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj2904++ - if yyhl2904 { - yyb2904 = yyj2904 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2904 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2904 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv2907 := &x.ListMeta - yym2908 := z.DecBinary() - _ = yym2908 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv2907) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv2907, false) + z.DecFallback(yyv17, false) } } - yyj2904++ - if yyhl2904 { - yyb2904 = yyj2904 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2904 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2904 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37444,26 +45683,26 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2909 := &x.Items - yym2910 := z.DecBinary() - _ = yym2910 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceEndpoints((*[]Endpoints)(yyv2909), d) + h.decSliceEndpoints((*[]Endpoints)(yyv19), d) } } for { - yyj2904++ - if yyhl2904 { - yyb2904 = yyj2904 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb2904 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb2904 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2904-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37475,38 +45714,39 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2911 := z.EncBinary() - _ = yym2911 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2912 := !z.EncBinary() - yy2arr2912 := z.EncBasicHandle().StructToArray - var yyq2912 [4]bool - _, _, _ = yysep2912, yyq2912, yy2arr2912 - const yyr2912 bool = false - yyq2912[0] = x.PodCIDR != "" - yyq2912[1] = x.ExternalID != "" - yyq2912[2] = x.ProviderID != "" - yyq2912[3] = x.Unschedulable != false - var yynn2912 int - if yyr2912 || yy2arr2912 { - r.EncodeArrayStart(4) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.PodCIDR != "" + yyq2[1] = x.ExternalID != "" + yyq2[2] = x.ProviderID != "" + yyq2[3] = x.Unschedulable != false + yyq2[4] = len(x.Taints) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) } else { - yynn2912 = 0 - for _, b := range yyq2912 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2912++ + yynn2++ } } - r.EncodeMapStart(yynn2912) - yynn2912 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2912 || yy2arr2912 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2912[0] { - yym2914 := z.EncBinary() - _ = yym2914 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) @@ -37515,23 +45755,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2912[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2915 := z.EncBinary() - _ = yym2915 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) } } } - if yyr2912 || yy2arr2912 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2912[1] { - yym2917 := z.EncBinary() - _ = yym2917 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ExternalID)) @@ -37540,23 +45780,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2912[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("externalID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2918 := z.EncBinary() - _ = yym2918 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ExternalID)) } } } - if yyr2912 || yy2arr2912 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2912[2] { - yym2920 := z.EncBinary() - _ = yym2920 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ProviderID)) @@ -37565,23 +45805,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2912[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("providerID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2921 := z.EncBinary() - _ = yym2921 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ProviderID)) } } } - if yyr2912 || yy2arr2912 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2912[3] { - yym2923 := z.EncBinary() - _ = yym2923 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeBool(bool(x.Unschedulable)) @@ -37590,19 +45830,52 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2912[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("unschedulable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2924 := z.EncBinary() - _ = yym2924 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeBool(bool(x.Unschedulable)) } } } - if yyr2912 || yy2arr2912 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + if x.Taints == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceTaint(([]Taint)(x.Taints), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("taints")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Taints == nil { + r.EncodeNil() + } else { + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + h.encSliceTaint(([]Taint)(x.Taints), e) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37615,25 +45888,25 @@ func (x *NodeSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2925 := z.DecBinary() - _ = yym2925 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2926 := r.ContainerType() - if yyct2926 == codecSelferValueTypeMap1234 { - yyl2926 := r.ReadMapStart() - if yyl2926 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2926, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2926 == codecSelferValueTypeArray1234 { - yyl2926 := r.ReadArrayStart() - if yyl2926 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2926, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37645,12 +45918,12 @@ func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2927Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2927Slc - var yyhl2927 bool = l >= 0 - for yyj2927 := 0; ; yyj2927++ { - if yyhl2927 { - if yyj2927 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -37659,38 +45932,74 @@ func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2927Slc = r.DecodeBytes(yys2927Slc, true, true) - yys2927 := string(yys2927Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2927 { + switch yys3 { case "podCIDR": if r.TryDecodeAsNil() { x.PodCIDR = "" } else { - x.PodCIDR = string(r.DecodeString()) + yyv4 := &x.PodCIDR + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "externalID": if r.TryDecodeAsNil() { x.ExternalID = "" } else { - x.ExternalID = string(r.DecodeString()) + yyv6 := &x.ExternalID + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "providerID": if r.TryDecodeAsNil() { x.ProviderID = "" } else { - x.ProviderID = string(r.DecodeString()) + yyv8 := &x.ProviderID + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } case "unschedulable": if r.TryDecodeAsNil() { x.Unschedulable = false } else { - x.Unschedulable = bool(r.DecodeBool()) + yyv10 := &x.Unschedulable + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(yyv10)) = r.DecodeBool() + } + } + case "taints": + if r.TryDecodeAsNil() { + x.Taints = nil + } else { + yyv12 := &x.Taints + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + h.decSliceTaint((*[]Taint)(yyv12), d) + } } default: - z.DecStructFieldNotFound(-1, yys2927) - } // end switch yys2927 - } // end for yyj2927 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37698,16 +46007,16 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2932 int - var yyb2932 bool - var yyhl2932 bool = l >= 0 - yyj2932++ - if yyhl2932 { - yyb2932 = yyj2932 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb2932 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb2932 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37715,15 +46024,21 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.PodCIDR = "" } else { - x.PodCIDR = string(r.DecodeString()) + yyv15 := &x.PodCIDR + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj2932++ - if yyhl2932 { - yyb2932 = yyj2932 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb2932 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb2932 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37731,15 +46046,21 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ExternalID = "" } else { - x.ExternalID = string(r.DecodeString()) + yyv17 := &x.ExternalID + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } } - yyj2932++ - if yyhl2932 { - yyb2932 = yyj2932 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb2932 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb2932 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37747,15 +46068,21 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ProviderID = "" } else { - x.ProviderID = string(r.DecodeString()) + yyv19 := &x.ProviderID + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } } - yyj2932++ - if yyhl2932 { - yyb2932 = yyj2932 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb2932 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb2932 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37763,20 +46090,48 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Unschedulable = false } else { - x.Unschedulable = bool(r.DecodeBool()) + yyv21 := &x.Unschedulable + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*bool)(yyv21)) = r.DecodeBool() + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Taints = nil + } else { + yyv23 := &x.Taints + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + h.decSliceTaint((*[]Taint)(yyv23), d) + } } for { - yyj2932++ - if yyhl2932 { - yyb2932 = yyj2932 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb2932 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb2932 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2932-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37788,33 +46143,33 @@ func (x *DaemonEndpoint) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2937 := z.EncBinary() - _ = yym2937 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2938 := !z.EncBinary() - yy2arr2938 := z.EncBasicHandle().StructToArray - var yyq2938 [1]bool - _, _, _ = yysep2938, yyq2938, yy2arr2938 - const yyr2938 bool = false - var yynn2938 int - if yyr2938 || yy2arr2938 { + 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 { - yynn2938 = 1 - for _, b := range yyq2938 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn2938++ + yynn2++ } } - r.EncodeMapStart(yynn2938) - yynn2938 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2938 || yy2arr2938 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2940 := z.EncBinary() - _ = yym2940 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeInt(int64(x.Port)) @@ -37823,14 +46178,14 @@ func (x *DaemonEndpoint) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2941 := z.EncBinary() - _ = yym2941 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr2938 || yy2arr2938 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37843,25 +46198,25 @@ func (x *DaemonEndpoint) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2942 := z.DecBinary() - _ = yym2942 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2943 := r.ContainerType() - if yyct2943 == codecSelferValueTypeMap1234 { - yyl2943 := r.ReadMapStart() - if yyl2943 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2943, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2943 == codecSelferValueTypeArray1234 { - yyl2943 := r.ReadArrayStart() - if yyl2943 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2943, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37873,12 +46228,12 @@ func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2944Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2944Slc - var yyhl2944 bool = l >= 0 - for yyj2944 := 0; ; yyj2944++ { - if yyhl2944 { - if yyj2944 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -37887,20 +46242,26 @@ func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2944Slc = r.DecodeBytes(yys2944Slc, true, true) - yys2944 := string(yys2944Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2944 { + switch yys3 { case "Port": if r.TryDecodeAsNil() { x.Port = 0 } else { - x.Port = int32(r.DecodeInt(32)) + yyv4 := &x.Port + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } } default: - z.DecStructFieldNotFound(-1, yys2944) - } // end switch yys2944 - } // end for yyj2944 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37908,16 +46269,16 @@ func (x *DaemonEndpoint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2946 int - var yyb2946 bool - var yyhl2946 bool = l >= 0 - yyj2946++ - if yyhl2946 { - yyb2946 = yyj2946 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb2946 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb2946 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37925,20 +46286,26 @@ func (x *DaemonEndpoint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Port = 0 } else { - x.Port = int32(r.DecodeInt(32)) + yyv7 := &x.Port + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*int32)(yyv7)) = int32(r.DecodeInt(32)) + } } for { - yyj2946++ - if yyhl2946 { - yyb2946 = yyj2946 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb2946 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb2946 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2946-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37950,48 +46317,48 @@ func (x *NodeDaemonEndpoints) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2948 := z.EncBinary() - _ = yym2948 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2949 := !z.EncBinary() - yy2arr2949 := z.EncBasicHandle().StructToArray - var yyq2949 [1]bool - _, _, _ = yysep2949, yyq2949, yy2arr2949 - const yyr2949 bool = false - yyq2949[0] = true - var yynn2949 int - if yyr2949 || yy2arr2949 { + 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 { - yynn2949 = 0 - for _, b := range yyq2949 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn2949++ + yynn2++ } } - r.EncodeMapStart(yynn2949) - yynn2949 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2949 || yy2arr2949 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2949[0] { - yy2951 := &x.KubeletEndpoint - yy2951.CodecEncodeSelf(e) + if yyq2[0] { + yy4 := &x.KubeletEndpoint + yy4.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2949[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeletEndpoint")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2952 := &x.KubeletEndpoint - yy2952.CodecEncodeSelf(e) + yy6 := &x.KubeletEndpoint + yy6.CodecEncodeSelf(e) } } - if yyr2949 || yy2arr2949 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -38004,25 +46371,25 @@ func (x *NodeDaemonEndpoints) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2953 := z.DecBinary() - _ = yym2953 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2954 := r.ContainerType() - if yyct2954 == codecSelferValueTypeMap1234 { - yyl2954 := r.ReadMapStart() - if yyl2954 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2954, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2954 == codecSelferValueTypeArray1234 { - yyl2954 := r.ReadArrayStart() - if yyl2954 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2954, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -38034,12 +46401,12 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2955Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2955Slc - var yyhl2955 bool = l >= 0 - for yyj2955 := 0; ; yyj2955++ { - if yyhl2955 { - if yyj2955 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -38048,21 +46415,21 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2955Slc = r.DecodeBytes(yys2955Slc, true, true) - yys2955 := string(yys2955Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2955 { + switch yys3 { case "kubeletEndpoint": if r.TryDecodeAsNil() { x.KubeletEndpoint = DaemonEndpoint{} } else { - yyv2956 := &x.KubeletEndpoint - yyv2956.CodecDecodeSelf(d) + yyv4 := &x.KubeletEndpoint + yyv4.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2955) - } // end switch yys2955 - } // end for yyj2955 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -38070,16 +46437,16 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2957 int - var yyb2957 bool - var yyhl2957 bool = l >= 0 - yyj2957++ - if yyhl2957 { - yyb2957 = yyj2957 > l + var yyj5 int + var yyb5 bool + var yyhl5 bool = l >= 0 + yyj5++ + if yyhl5 { + yyb5 = yyj5 > l } else { - yyb2957 = r.CheckBreak() + yyb5 = r.CheckBreak() } - if yyb2957 { + if yyb5 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38087,21 +46454,21 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.KubeletEndpoint = DaemonEndpoint{} } else { - yyv2958 := &x.KubeletEndpoint - yyv2958.CodecDecodeSelf(d) + yyv6 := &x.KubeletEndpoint + yyv6.CodecDecodeSelf(d) } for { - yyj2957++ - if yyhl2957 { - yyb2957 = yyj2957 > l + yyj5++ + if yyhl5 { + yyb5 = yyj5 > l } else { - yyb2957 = r.CheckBreak() + yyb5 = r.CheckBreak() } - if yyb2957 { + if yyb5 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2957-1, "") + z.DecStructFieldNotFound(yyj5-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -38113,33 +46480,33 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2959 := z.EncBinary() - _ = yym2959 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2960 := !z.EncBinary() - yy2arr2960 := z.EncBasicHandle().StructToArray - var yyq2960 [10]bool - _, _, _ = yysep2960, yyq2960, yy2arr2960 - const yyr2960 bool = false - var yynn2960 int - if yyr2960 || yy2arr2960 { + 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 { - yynn2960 = 10 - for _, b := range yyq2960 { + yynn2 = 10 + for _, b := range yyq2 { if b { - yynn2960++ + yynn2++ } } - r.EncodeMapStart(yynn2960) - yynn2960 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr2960 || yy2arr2960 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2962 := z.EncBinary() - _ = yym2962 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.MachineID)) @@ -38148,17 +46515,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("machineID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2963 := z.EncBinary() - _ = yym2963 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.MachineID)) } } - if yyr2960 || yy2arr2960 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2965 := z.EncBinary() - _ = yym2965 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SystemUUID)) @@ -38167,17 +46534,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("systemUUID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2966 := z.EncBinary() - _ = yym2966 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SystemUUID)) } } - if yyr2960 || yy2arr2960 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2968 := z.EncBinary() - _ = yym2968 + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.BootID)) @@ -38186,17 +46553,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("bootID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2969 := z.EncBinary() - _ = yym2969 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.BootID)) } } - if yyr2960 || yy2arr2960 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2971 := z.EncBinary() - _ = yym2971 + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KernelVersion)) @@ -38205,17 +46572,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kernelVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2972 := z.EncBinary() - _ = yym2972 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KernelVersion)) } } - if yyr2960 || yy2arr2960 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2974 := z.EncBinary() - _ = yym2974 + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OSImage)) @@ -38224,17 +46591,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("osImage")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2975 := z.EncBinary() - _ = yym2975 + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OSImage)) } } - if yyr2960 || yy2arr2960 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2977 := z.EncBinary() - _ = yym2977 + yym19 := z.EncBinary() + _ = yym19 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntimeVersion)) @@ -38243,17 +46610,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerRuntimeVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2978 := z.EncBinary() - _ = yym2978 + yym20 := z.EncBinary() + _ = yym20 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntimeVersion)) } } - if yyr2960 || yy2arr2960 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2980 := z.EncBinary() - _ = yym2980 + yym22 := z.EncBinary() + _ = yym22 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeletVersion)) @@ -38262,17 +46629,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeletVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2981 := z.EncBinary() - _ = yym2981 + yym23 := z.EncBinary() + _ = yym23 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeletVersion)) } } - if yyr2960 || yy2arr2960 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2983 := z.EncBinary() - _ = yym2983 + yym25 := z.EncBinary() + _ = yym25 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeProxyVersion)) @@ -38281,17 +46648,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeProxyVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2984 := z.EncBinary() - _ = yym2984 + yym26 := z.EncBinary() + _ = yym26 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeProxyVersion)) } } - if yyr2960 || yy2arr2960 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2986 := z.EncBinary() - _ = yym2986 + yym28 := z.EncBinary() + _ = yym28 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OperatingSystem)) @@ -38300,17 +46667,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("operatingSystem")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2987 := z.EncBinary() - _ = yym2987 + yym29 := z.EncBinary() + _ = yym29 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OperatingSystem)) } } - if yyr2960 || yy2arr2960 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2989 := z.EncBinary() - _ = yym2989 + yym31 := z.EncBinary() + _ = yym31 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Architecture)) @@ -38319,14 +46686,14 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("architecture")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2990 := z.EncBinary() - _ = yym2990 + yym32 := z.EncBinary() + _ = yym32 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Architecture)) } } - if yyr2960 || yy2arr2960 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -38339,25 +46706,25 @@ func (x *NodeSystemInfo) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2991 := z.DecBinary() - _ = yym2991 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2992 := r.ContainerType() - if yyct2992 == codecSelferValueTypeMap1234 { - yyl2992 := r.ReadMapStart() - if yyl2992 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2992, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct2992 == codecSelferValueTypeArray1234 { - yyl2992 := r.ReadArrayStart() - if yyl2992 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2992, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -38369,12 +46736,12 @@ func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2993Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2993Slc - var yyhl2993 bool = l >= 0 - for yyj2993 := 0; ; yyj2993++ { - if yyhl2993 { - if yyj2993 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -38383,74 +46750,134 @@ func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2993Slc = r.DecodeBytes(yys2993Slc, true, true) - yys2993 := string(yys2993Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2993 { + switch yys3 { case "machineID": if r.TryDecodeAsNil() { x.MachineID = "" } else { - x.MachineID = string(r.DecodeString()) + yyv4 := &x.MachineID + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "systemUUID": if r.TryDecodeAsNil() { x.SystemUUID = "" } else { - x.SystemUUID = string(r.DecodeString()) + yyv6 := &x.SystemUUID + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "bootID": if r.TryDecodeAsNil() { x.BootID = "" } else { - x.BootID = string(r.DecodeString()) + yyv8 := &x.BootID + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } case "kernelVersion": if r.TryDecodeAsNil() { x.KernelVersion = "" } else { - x.KernelVersion = string(r.DecodeString()) + yyv10 := &x.KernelVersion + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } case "osImage": if r.TryDecodeAsNil() { x.OSImage = "" } else { - x.OSImage = string(r.DecodeString()) + yyv12 := &x.OSImage + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } case "containerRuntimeVersion": if r.TryDecodeAsNil() { x.ContainerRuntimeVersion = "" } else { - x.ContainerRuntimeVersion = string(r.DecodeString()) + yyv14 := &x.ContainerRuntimeVersion + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } case "kubeletVersion": if r.TryDecodeAsNil() { x.KubeletVersion = "" } else { - x.KubeletVersion = string(r.DecodeString()) + yyv16 := &x.KubeletVersion + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } case "kubeProxyVersion": if r.TryDecodeAsNil() { x.KubeProxyVersion = "" } else { - x.KubeProxyVersion = string(r.DecodeString()) + yyv18 := &x.KubeProxyVersion + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *((*string)(yyv18)) = r.DecodeString() + } } case "operatingSystem": if r.TryDecodeAsNil() { x.OperatingSystem = "" } else { - x.OperatingSystem = string(r.DecodeString()) + yyv20 := &x.OperatingSystem + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + *((*string)(yyv20)) = r.DecodeString() + } } case "architecture": if r.TryDecodeAsNil() { x.Architecture = "" } else { - x.Architecture = string(r.DecodeString()) + yyv22 := &x.Architecture + yym23 := z.DecBinary() + _ = yym23 + if false { + } else { + *((*string)(yyv22)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys2993) - } // end switch yys2993 - } // end for yyj2993 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -38458,16 +46885,16 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3004 int - var yyb3004 bool - var yyhl3004 bool = l >= 0 - yyj3004++ - if yyhl3004 { - yyb3004 = yyj3004 > l + var yyj24 int + var yyb24 bool + var yyhl24 bool = l >= 0 + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3004 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3004 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38475,15 +46902,21 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.MachineID = "" } else { - x.MachineID = string(r.DecodeString()) + yyv25 := &x.MachineID + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*string)(yyv25)) = r.DecodeString() + } } - yyj3004++ - if yyhl3004 { - yyb3004 = yyj3004 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3004 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3004 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38491,15 +46924,21 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.SystemUUID = "" } else { - x.SystemUUID = string(r.DecodeString()) + yyv27 := &x.SystemUUID + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*string)(yyv27)) = r.DecodeString() + } } - yyj3004++ - if yyhl3004 { - yyb3004 = yyj3004 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3004 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3004 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38507,15 +46946,21 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.BootID = "" } else { - x.BootID = string(r.DecodeString()) + yyv29 := &x.BootID + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*string)(yyv29)) = r.DecodeString() + } } - yyj3004++ - if yyhl3004 { - yyb3004 = yyj3004 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3004 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3004 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38523,15 +46968,21 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.KernelVersion = "" } else { - x.KernelVersion = string(r.DecodeString()) + yyv31 := &x.KernelVersion + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + *((*string)(yyv31)) = r.DecodeString() + } } - yyj3004++ - if yyhl3004 { - yyb3004 = yyj3004 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3004 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3004 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38539,15 +46990,21 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.OSImage = "" } else { - x.OSImage = string(r.DecodeString()) + yyv33 := &x.OSImage + yym34 := z.DecBinary() + _ = yym34 + if false { + } else { + *((*string)(yyv33)) = r.DecodeString() + } } - yyj3004++ - if yyhl3004 { - yyb3004 = yyj3004 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3004 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3004 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38555,15 +47012,21 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ContainerRuntimeVersion = "" } else { - x.ContainerRuntimeVersion = string(r.DecodeString()) + yyv35 := &x.ContainerRuntimeVersion + yym36 := z.DecBinary() + _ = yym36 + if false { + } else { + *((*string)(yyv35)) = r.DecodeString() + } } - yyj3004++ - if yyhl3004 { - yyb3004 = yyj3004 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3004 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3004 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38571,15 +47034,21 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.KubeletVersion = "" } else { - x.KubeletVersion = string(r.DecodeString()) + yyv37 := &x.KubeletVersion + yym38 := z.DecBinary() + _ = yym38 + if false { + } else { + *((*string)(yyv37)) = r.DecodeString() + } } - yyj3004++ - if yyhl3004 { - yyb3004 = yyj3004 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3004 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3004 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38587,15 +47056,21 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.KubeProxyVersion = "" } else { - x.KubeProxyVersion = string(r.DecodeString()) + yyv39 := &x.KubeProxyVersion + yym40 := z.DecBinary() + _ = yym40 + if false { + } else { + *((*string)(yyv39)) = r.DecodeString() + } } - yyj3004++ - if yyhl3004 { - yyb3004 = yyj3004 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3004 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3004 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38603,15 +47078,21 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.OperatingSystem = "" } else { - x.OperatingSystem = string(r.DecodeString()) + yyv41 := &x.OperatingSystem + yym42 := z.DecBinary() + _ = yym42 + if false { + } else { + *((*string)(yyv41)) = r.DecodeString() + } } - yyj3004++ - if yyhl3004 { - yyb3004 = yyj3004 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3004 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3004 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38619,20 +47100,26 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Architecture = "" } else { - x.Architecture = string(r.DecodeString()) + yyv43 := &x.Architecture + yym44 := z.DecBinary() + _ = yym44 + if false { + } else { + *((*string)(yyv43)) = r.DecodeString() + } } for { - yyj3004++ - if yyhl3004 { - yyb3004 = yyj3004 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3004 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3004 { + if yyb24 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3004-1, "") + z.DecStructFieldNotFound(yyj24-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -38644,42 +47131,42 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3015 := z.EncBinary() - _ = yym3015 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3016 := !z.EncBinary() - yy2arr3016 := z.EncBasicHandle().StructToArray - var yyq3016 [10]bool - _, _, _ = yysep3016, yyq3016, yy2arr3016 - const yyr3016 bool = false - yyq3016[0] = len(x.Capacity) != 0 - yyq3016[1] = len(x.Allocatable) != 0 - yyq3016[2] = x.Phase != "" - yyq3016[3] = len(x.Conditions) != 0 - yyq3016[4] = len(x.Addresses) != 0 - yyq3016[5] = true - yyq3016[6] = true - yyq3016[7] = len(x.Images) != 0 - yyq3016[8] = len(x.VolumesInUse) != 0 - yyq3016[9] = len(x.VolumesAttached) != 0 - var yynn3016 int - if yyr3016 || yy2arr3016 { + 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 { - yynn3016 = 0 - for _, b := range yyq3016 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3016++ + yynn2++ } } - r.EncodeMapStart(yynn3016) - yynn3016 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3016 || yy2arr3016 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3016[0] { + if yyq2[0] { if x.Capacity == nil { r.EncodeNil() } else { @@ -38689,7 +47176,7 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3016[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("capacity")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -38700,9 +47187,9 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3016 || yy2arr3016 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3016[1] { + if yyq2[1] { if x.Allocatable == nil { r.EncodeNil() } else { @@ -38712,7 +47199,7 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3016[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("allocatable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -38723,29 +47210,29 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3016 || yy2arr3016 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3016[2] { + if yyq2[2] { x.Phase.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3016[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("phase")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Phase.CodecEncodeSelf(e) } } - if yyr3016 || yy2arr3016 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3016[3] { + if yyq2[3] { if x.Conditions == nil { r.EncodeNil() } else { - yym3021 := z.EncBinary() - _ = yym3021 + yym13 := z.EncBinary() + _ = yym13 if false { } else { h.encSliceNodeCondition(([]NodeCondition)(x.Conditions), e) @@ -38755,15 +47242,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3016[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("conditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Conditions == nil { r.EncodeNil() } else { - yym3022 := z.EncBinary() - _ = yym3022 + yym14 := z.EncBinary() + _ = yym14 if false { } else { h.encSliceNodeCondition(([]NodeCondition)(x.Conditions), e) @@ -38771,14 +47258,14 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3016 || yy2arr3016 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3016[4] { + if yyq2[4] { if x.Addresses == nil { r.EncodeNil() } else { - yym3024 := z.EncBinary() - _ = yym3024 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceNodeAddress(([]NodeAddress)(x.Addresses), e) @@ -38788,15 +47275,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3016[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("addresses")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Addresses == nil { r.EncodeNil() } else { - yym3025 := z.EncBinary() - _ = yym3025 + yym17 := z.EncBinary() + _ = yym17 if false { } else { h.encSliceNodeAddress(([]NodeAddress)(x.Addresses), e) @@ -38804,48 +47291,48 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3016 || yy2arr3016 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3016[5] { - yy3027 := &x.DaemonEndpoints - yy3027.CodecEncodeSelf(e) + if yyq2[5] { + yy19 := &x.DaemonEndpoints + yy19.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3016[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("daemonEndpoints")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3028 := &x.DaemonEndpoints - yy3028.CodecEncodeSelf(e) + yy21 := &x.DaemonEndpoints + yy21.CodecEncodeSelf(e) } } - if yyr3016 || yy2arr3016 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3016[6] { - yy3030 := &x.NodeInfo - yy3030.CodecEncodeSelf(e) + if yyq2[6] { + yy24 := &x.NodeInfo + yy24.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3016[6] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeInfo")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3031 := &x.NodeInfo - yy3031.CodecEncodeSelf(e) + yy26 := &x.NodeInfo + yy26.CodecEncodeSelf(e) } } - if yyr3016 || yy2arr3016 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3016[7] { + if yyq2[7] { if x.Images == nil { r.EncodeNil() } else { - yym3033 := z.EncBinary() - _ = yym3033 + yym29 := z.EncBinary() + _ = yym29 if false { } else { h.encSliceContainerImage(([]ContainerImage)(x.Images), e) @@ -38855,15 +47342,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3016[7] { + if yyq2[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("images")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Images == nil { r.EncodeNil() } else { - yym3034 := z.EncBinary() - _ = yym3034 + yym30 := z.EncBinary() + _ = yym30 if false { } else { h.encSliceContainerImage(([]ContainerImage)(x.Images), e) @@ -38871,14 +47358,14 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3016 || yy2arr3016 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3016[8] { + if yyq2[8] { if x.VolumesInUse == nil { r.EncodeNil() } else { - yym3036 := z.EncBinary() - _ = yym3036 + yym32 := z.EncBinary() + _ = yym32 if false { } else { h.encSliceUniqueVolumeName(([]UniqueVolumeName)(x.VolumesInUse), e) @@ -38888,15 +47375,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3016[8] { + if yyq2[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumesInUse")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.VolumesInUse == nil { r.EncodeNil() } else { - yym3037 := z.EncBinary() - _ = yym3037 + yym33 := z.EncBinary() + _ = yym33 if false { } else { h.encSliceUniqueVolumeName(([]UniqueVolumeName)(x.VolumesInUse), e) @@ -38904,14 +47391,14 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3016 || yy2arr3016 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3016[9] { + if yyq2[9] { if x.VolumesAttached == nil { r.EncodeNil() } else { - yym3039 := z.EncBinary() - _ = yym3039 + yym35 := z.EncBinary() + _ = yym35 if false { } else { h.encSliceAttachedVolume(([]AttachedVolume)(x.VolumesAttached), e) @@ -38921,15 +47408,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3016[9] { + if yyq2[9] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumesAttached")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.VolumesAttached == nil { r.EncodeNil() } else { - yym3040 := z.EncBinary() - _ = yym3040 + yym36 := z.EncBinary() + _ = yym36 if false { } else { h.encSliceAttachedVolume(([]AttachedVolume)(x.VolumesAttached), e) @@ -38937,7 +47424,7 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3016 || yy2arr3016 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -38950,25 +47437,25 @@ func (x *NodeStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3041 := z.DecBinary() - _ = yym3041 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3042 := r.ContainerType() - if yyct3042 == codecSelferValueTypeMap1234 { - yyl3042 := r.ReadMapStart() - if yyl3042 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3042, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3042 == codecSelferValueTypeArray1234 { - yyl3042 := r.ReadArrayStart() - if yyl3042 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3042, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -38980,12 +47467,12 @@ func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3043Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3043Slc - var yyhl3043 bool = l >= 0 - for yyj3043 := 0; ; yyj3043++ { - if yyhl3043 { - if yyj3043 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -38994,108 +47481,109 @@ func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3043Slc = r.DecodeBytes(yys3043Slc, true, true) - yys3043 := string(yys3043Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3043 { + switch yys3 { case "capacity": if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv3044 := &x.Capacity - yyv3044.CodecDecodeSelf(d) + yyv4 := &x.Capacity + yyv4.CodecDecodeSelf(d) } case "allocatable": if r.TryDecodeAsNil() { x.Allocatable = nil } else { - yyv3045 := &x.Allocatable - yyv3045.CodecDecodeSelf(d) + yyv5 := &x.Allocatable + yyv5.CodecDecodeSelf(d) } case "phase": if r.TryDecodeAsNil() { x.Phase = "" } else { - x.Phase = NodePhase(r.DecodeString()) + yyv6 := &x.Phase + yyv6.CodecDecodeSelf(d) } case "conditions": if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv3047 := &x.Conditions - yym3048 := z.DecBinary() - _ = yym3048 + yyv7 := &x.Conditions + yym8 := z.DecBinary() + _ = yym8 if false { } else { - h.decSliceNodeCondition((*[]NodeCondition)(yyv3047), d) + h.decSliceNodeCondition((*[]NodeCondition)(yyv7), d) } } case "addresses": if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv3049 := &x.Addresses - yym3050 := z.DecBinary() - _ = yym3050 + yyv9 := &x.Addresses + yym10 := z.DecBinary() + _ = yym10 if false { } else { - h.decSliceNodeAddress((*[]NodeAddress)(yyv3049), d) + h.decSliceNodeAddress((*[]NodeAddress)(yyv9), d) } } case "daemonEndpoints": if r.TryDecodeAsNil() { x.DaemonEndpoints = NodeDaemonEndpoints{} } else { - yyv3051 := &x.DaemonEndpoints - yyv3051.CodecDecodeSelf(d) + yyv11 := &x.DaemonEndpoints + yyv11.CodecDecodeSelf(d) } case "nodeInfo": if r.TryDecodeAsNil() { x.NodeInfo = NodeSystemInfo{} } else { - yyv3052 := &x.NodeInfo - yyv3052.CodecDecodeSelf(d) + yyv12 := &x.NodeInfo + yyv12.CodecDecodeSelf(d) } case "images": if r.TryDecodeAsNil() { x.Images = nil } else { - yyv3053 := &x.Images - yym3054 := z.DecBinary() - _ = yym3054 + yyv13 := &x.Images + yym14 := z.DecBinary() + _ = yym14 if false { } else { - h.decSliceContainerImage((*[]ContainerImage)(yyv3053), d) + h.decSliceContainerImage((*[]ContainerImage)(yyv13), d) } } case "volumesInUse": if r.TryDecodeAsNil() { x.VolumesInUse = nil } else { - yyv3055 := &x.VolumesInUse - yym3056 := z.DecBinary() - _ = yym3056 + yyv15 := &x.VolumesInUse + yym16 := z.DecBinary() + _ = yym16 if false { } else { - h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv3055), d) + h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv15), d) } } case "volumesAttached": if r.TryDecodeAsNil() { x.VolumesAttached = nil } else { - yyv3057 := &x.VolumesAttached - yym3058 := z.DecBinary() - _ = yym3058 + yyv17 := &x.VolumesAttached + yym18 := z.DecBinary() + _ = yym18 if false { } else { - h.decSliceAttachedVolume((*[]AttachedVolume)(yyv3057), d) + h.decSliceAttachedVolume((*[]AttachedVolume)(yyv17), d) } } default: - z.DecStructFieldNotFound(-1, yys3043) - } // end switch yys3043 - } // end for yyj3043 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39103,16 +47591,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3059 int - var yyb3059 bool - var yyhl3059 bool = l >= 0 - yyj3059++ - if yyhl3059 { - yyb3059 = yyj3059 > l + var yyj19 int + var yyb19 bool + var yyhl19 bool = l >= 0 + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb3059 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb3059 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39120,16 +47608,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv3060 := &x.Capacity - yyv3060.CodecDecodeSelf(d) + yyv20 := &x.Capacity + yyv20.CodecDecodeSelf(d) } - yyj3059++ - if yyhl3059 { - yyb3059 = yyj3059 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb3059 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb3059 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39137,16 +47625,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Allocatable = nil } else { - yyv3061 := &x.Allocatable - yyv3061.CodecDecodeSelf(d) + yyv21 := &x.Allocatable + yyv21.CodecDecodeSelf(d) } - yyj3059++ - if yyhl3059 { - yyb3059 = yyj3059 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb3059 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb3059 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39154,15 +47642,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Phase = "" } else { - x.Phase = NodePhase(r.DecodeString()) + yyv22 := &x.Phase + yyv22.CodecDecodeSelf(d) } - yyj3059++ - if yyhl3059 { - yyb3059 = yyj3059 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb3059 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb3059 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39170,21 +47659,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv3063 := &x.Conditions - yym3064 := z.DecBinary() - _ = yym3064 + yyv23 := &x.Conditions + yym24 := z.DecBinary() + _ = yym24 if false { } else { - h.decSliceNodeCondition((*[]NodeCondition)(yyv3063), d) + h.decSliceNodeCondition((*[]NodeCondition)(yyv23), d) } } - yyj3059++ - if yyhl3059 { - yyb3059 = yyj3059 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb3059 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb3059 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39192,21 +47681,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv3065 := &x.Addresses - yym3066 := z.DecBinary() - _ = yym3066 + yyv25 := &x.Addresses + yym26 := z.DecBinary() + _ = yym26 if false { } else { - h.decSliceNodeAddress((*[]NodeAddress)(yyv3065), d) + h.decSliceNodeAddress((*[]NodeAddress)(yyv25), d) } } - yyj3059++ - if yyhl3059 { - yyb3059 = yyj3059 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb3059 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb3059 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39214,16 +47703,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DaemonEndpoints = NodeDaemonEndpoints{} } else { - yyv3067 := &x.DaemonEndpoints - yyv3067.CodecDecodeSelf(d) + yyv27 := &x.DaemonEndpoints + yyv27.CodecDecodeSelf(d) } - yyj3059++ - if yyhl3059 { - yyb3059 = yyj3059 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb3059 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb3059 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39231,16 +47720,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeInfo = NodeSystemInfo{} } else { - yyv3068 := &x.NodeInfo - yyv3068.CodecDecodeSelf(d) + yyv28 := &x.NodeInfo + yyv28.CodecDecodeSelf(d) } - yyj3059++ - if yyhl3059 { - yyb3059 = yyj3059 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb3059 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb3059 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39248,21 +47737,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Images = nil } else { - yyv3069 := &x.Images - yym3070 := z.DecBinary() - _ = yym3070 + yyv29 := &x.Images + yym30 := z.DecBinary() + _ = yym30 if false { } else { - h.decSliceContainerImage((*[]ContainerImage)(yyv3069), d) + h.decSliceContainerImage((*[]ContainerImage)(yyv29), d) } } - yyj3059++ - if yyhl3059 { - yyb3059 = yyj3059 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb3059 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb3059 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39270,21 +47759,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.VolumesInUse = nil } else { - yyv3071 := &x.VolumesInUse - yym3072 := z.DecBinary() - _ = yym3072 + yyv31 := &x.VolumesInUse + yym32 := z.DecBinary() + _ = yym32 if false { } else { - h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv3071), d) + h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv31), d) } } - yyj3059++ - if yyhl3059 { - yyb3059 = yyj3059 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb3059 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb3059 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39292,26 +47781,26 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.VolumesAttached = nil } else { - yyv3073 := &x.VolumesAttached - yym3074 := z.DecBinary() - _ = yym3074 + yyv33 := &x.VolumesAttached + yym34 := z.DecBinary() + _ = yym34 if false { } else { - h.decSliceAttachedVolume((*[]AttachedVolume)(yyv3073), d) + h.decSliceAttachedVolume((*[]AttachedVolume)(yyv33), d) } } for { - yyj3059++ - if yyhl3059 { - yyb3059 = yyj3059 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb3059 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb3059 { + if yyb19 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3059-1, "") + z.DecStructFieldNotFound(yyj19-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39320,8 +47809,8 @@ func (x UniqueVolumeName) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3075 := z.EncBinary() - _ = yym3075 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -39333,8 +47822,8 @@ func (x *UniqueVolumeName) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3076 := z.DecBinary() - _ = yym3076 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -39349,30 +47838,30 @@ func (x *AttachedVolume) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3077 := z.EncBinary() - _ = yym3077 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3078 := !z.EncBinary() - yy2arr3078 := z.EncBasicHandle().StructToArray - var yyq3078 [2]bool - _, _, _ = yysep3078, yyq3078, yy2arr3078 - const yyr3078 bool = false - var yynn3078 int - if yyr3078 || yy2arr3078 { + 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 { - yynn3078 = 2 - for _, b := range yyq3078 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn3078++ + yynn2++ } } - r.EncodeMapStart(yynn3078) - yynn3078 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3078 || yy2arr3078 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Name.CodecEncodeSelf(e) } else { @@ -39381,10 +47870,10 @@ func (x *AttachedVolume) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Name.CodecEncodeSelf(e) } - if yyr3078 || yy2arr3078 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3081 := z.EncBinary() - _ = yym3081 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.DevicePath)) @@ -39393,14 +47882,14 @@ func (x *AttachedVolume) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("devicePath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3082 := z.EncBinary() - _ = yym3082 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.DevicePath)) } } - if yyr3078 || yy2arr3078 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -39413,25 +47902,25 @@ func (x *AttachedVolume) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3083 := z.DecBinary() - _ = yym3083 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3084 := r.ContainerType() - if yyct3084 == codecSelferValueTypeMap1234 { - yyl3084 := r.ReadMapStart() - if yyl3084 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3084, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3084 == codecSelferValueTypeArray1234 { - yyl3084 := r.ReadArrayStart() - if yyl3084 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3084, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -39443,12 +47932,12 @@ func (x *AttachedVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3085Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3085Slc - var yyhl3085 bool = l >= 0 - for yyj3085 := 0; ; yyj3085++ { - if yyhl3085 { - if yyj3085 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -39457,26 +47946,33 @@ func (x *AttachedVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3085Slc = r.DecodeBytes(yys3085Slc, true, true) - yys3085 := string(yys3085Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3085 { + switch yys3 { case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = UniqueVolumeName(r.DecodeString()) + yyv4 := &x.Name + yyv4.CodecDecodeSelf(d) } case "devicePath": if r.TryDecodeAsNil() { x.DevicePath = "" } else { - x.DevicePath = string(r.DecodeString()) + yyv5 := &x.DevicePath + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys3085) - } // end switch yys3085 - } // end for yyj3085 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39484,16 +47980,16 @@ func (x *AttachedVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3088 int - var yyb3088 bool - var yyhl3088 bool = l >= 0 - yyj3088++ - if yyhl3088 { - yyb3088 = yyj3088 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb3088 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb3088 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39501,15 +47997,16 @@ func (x *AttachedVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = UniqueVolumeName(r.DecodeString()) + yyv8 := &x.Name + yyv8.CodecDecodeSelf(d) } - yyj3088++ - if yyhl3088 { - yyb3088 = yyj3088 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb3088 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb3088 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39517,20 +48014,26 @@ func (x *AttachedVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DevicePath = "" } else { - x.DevicePath = string(r.DecodeString()) + yyv9 := &x.DevicePath + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } } for { - yyj3088++ - if yyhl3088 { - yyb3088 = yyj3088 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb3088 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb3088 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3088-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39542,38 +48045,38 @@ func (x *AvoidPods) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3091 := z.EncBinary() - _ = yym3091 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3092 := !z.EncBinary() - yy2arr3092 := z.EncBasicHandle().StructToArray - var yyq3092 [1]bool - _, _, _ = yysep3092, yyq3092, yy2arr3092 - const yyr3092 bool = false - yyq3092[0] = len(x.PreferAvoidPods) != 0 - var yynn3092 int - if yyr3092 || yy2arr3092 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [1]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = len(x.PreferAvoidPods) != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(1) } else { - yynn3092 = 0 - for _, b := range yyq3092 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3092++ + yynn2++ } } - r.EncodeMapStart(yynn3092) - yynn3092 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3092 || yy2arr3092 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3092[0] { + if yyq2[0] { if x.PreferAvoidPods == nil { r.EncodeNil() } else { - yym3094 := z.EncBinary() - _ = yym3094 + yym4 := z.EncBinary() + _ = yym4 if false { } else { h.encSlicePreferAvoidPodsEntry(([]PreferAvoidPodsEntry)(x.PreferAvoidPods), e) @@ -39583,15 +48086,15 @@ func (x *AvoidPods) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3092[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("preferAvoidPods")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.PreferAvoidPods == nil { r.EncodeNil() } else { - yym3095 := z.EncBinary() - _ = yym3095 + yym5 := z.EncBinary() + _ = yym5 if false { } else { h.encSlicePreferAvoidPodsEntry(([]PreferAvoidPodsEntry)(x.PreferAvoidPods), e) @@ -39599,7 +48102,7 @@ func (x *AvoidPods) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3092 || yy2arr3092 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -39612,25 +48115,25 @@ func (x *AvoidPods) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3096 := z.DecBinary() - _ = yym3096 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3097 := r.ContainerType() - if yyct3097 == codecSelferValueTypeMap1234 { - yyl3097 := r.ReadMapStart() - if yyl3097 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3097, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3097 == codecSelferValueTypeArray1234 { - yyl3097 := r.ReadArrayStart() - if yyl3097 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3097, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -39642,12 +48145,12 @@ func (x *AvoidPods) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3098Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3098Slc - var yyhl3098 bool = l >= 0 - for yyj3098 := 0; ; yyj3098++ { - if yyhl3098 { - if yyj3098 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -39656,26 +48159,26 @@ func (x *AvoidPods) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3098Slc = r.DecodeBytes(yys3098Slc, true, true) - yys3098 := string(yys3098Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3098 { + switch yys3 { case "preferAvoidPods": if r.TryDecodeAsNil() { x.PreferAvoidPods = nil } else { - yyv3099 := &x.PreferAvoidPods - yym3100 := z.DecBinary() - _ = yym3100 + yyv4 := &x.PreferAvoidPods + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv3099), d) + h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv4), d) } } default: - z.DecStructFieldNotFound(-1, yys3098) - } // end switch yys3098 - } // end for yyj3098 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39683,16 +48186,16 @@ func (x *AvoidPods) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3101 int - var yyb3101 bool - var yyhl3101 bool = l >= 0 - yyj3101++ - if yyhl3101 { - yyb3101 = yyj3101 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb3101 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb3101 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39700,26 +48203,26 @@ func (x *AvoidPods) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.PreferAvoidPods = nil } else { - yyv3102 := &x.PreferAvoidPods - yym3103 := z.DecBinary() - _ = yym3103 + yyv7 := &x.PreferAvoidPods + yym8 := z.DecBinary() + _ = yym8 if false { } else { - h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv3102), d) + h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv7), d) } } for { - yyj3101++ - if yyhl3101 { - yyb3101 = yyj3101 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb3101 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb3101 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3101-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39731,85 +48234,85 @@ func (x *PreferAvoidPodsEntry) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3104 := z.EncBinary() - _ = yym3104 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3105 := !z.EncBinary() - yy2arr3105 := z.EncBasicHandle().StructToArray - var yyq3105 [4]bool - _, _, _ = yysep3105, yyq3105, yy2arr3105 - const yyr3105 bool = false - yyq3105[1] = true - yyq3105[2] = x.Reason != "" - yyq3105[3] = x.Message != "" - var yynn3105 int - if yyr3105 || yy2arr3105 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = true + yyq2[2] = x.Reason != "" + yyq2[3] = x.Message != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn3105 = 1 - for _, b := range yyq3105 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn3105++ + yynn2++ } } - r.EncodeMapStart(yynn3105) - yynn3105 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3105 || yy2arr3105 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3107 := &x.PodSignature - yy3107.CodecEncodeSelf(e) + yy4 := &x.PodSignature + yy4.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podSignature")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3108 := &x.PodSignature - yy3108.CodecEncodeSelf(e) + yy6 := &x.PodSignature + yy6.CodecEncodeSelf(e) } - if yyr3105 || yy2arr3105 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3105[1] { - yy3110 := &x.EvictionTime - yym3111 := z.EncBinary() - _ = yym3111 + if yyq2[1] { + yy9 := &x.EvictionTime + yym10 := z.EncBinary() + _ = yym10 if false { - } else if z.HasExtensions() && z.EncExt(yy3110) { - } else if yym3111 { - z.EncBinaryMarshal(yy3110) - } else if !yym3111 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3110) + } else if z.HasExtensions() && z.EncExt(yy9) { + } else if yym10 { + z.EncBinaryMarshal(yy9) + } else if !yym10 && z.IsJSONHandle() { + z.EncJSONMarshal(yy9) } else { - z.EncFallback(yy3110) + z.EncFallback(yy9) } } else { r.EncodeNil() } } else { - if yyq3105[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("evictionTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3112 := &x.EvictionTime - yym3113 := z.EncBinary() - _ = yym3113 + yy11 := &x.EvictionTime + yym12 := z.EncBinary() + _ = yym12 if false { - } else if z.HasExtensions() && z.EncExt(yy3112) { - } else if yym3113 { - z.EncBinaryMarshal(yy3112) - } else if !yym3113 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3112) + } else if z.HasExtensions() && z.EncExt(yy11) { + } else if yym12 { + z.EncBinaryMarshal(yy11) + } else if !yym12 && z.IsJSONHandle() { + z.EncJSONMarshal(yy11) } else { - z.EncFallback(yy3112) + z.EncFallback(yy11) } } } - if yyr3105 || yy2arr3105 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3105[2] { - yym3115 := z.EncBinary() - _ = yym3115 + if yyq2[2] { + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -39818,23 +48321,23 @@ func (x *PreferAvoidPodsEntry) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3105[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3116 := z.EncBinary() - _ = yym3116 + yym15 := z.EncBinary() + _ = yym15 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr3105 || yy2arr3105 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3105[3] { - yym3118 := z.EncBinary() - _ = yym3118 + if yyq2[3] { + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -39843,19 +48346,19 @@ func (x *PreferAvoidPodsEntry) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3105[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3119 := z.EncBinary() - _ = yym3119 + yym18 := z.EncBinary() + _ = yym18 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr3105 || yy2arr3105 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -39868,25 +48371,25 @@ func (x *PreferAvoidPodsEntry) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3120 := z.DecBinary() - _ = yym3120 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3121 := r.ContainerType() - if yyct3121 == codecSelferValueTypeMap1234 { - yyl3121 := r.ReadMapStart() - if yyl3121 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3121, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3121 == codecSelferValueTypeArray1234 { - yyl3121 := r.ReadArrayStart() - if yyl3121 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3121, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -39898,12 +48401,12 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3122Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3122Slc - var yyhl3122 bool = l >= 0 - for yyj3122 := 0; ; yyj3122++ { - if yyhl3122 { - if yyj3122 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -39912,50 +48415,62 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3122Slc = r.DecodeBytes(yys3122Slc, true, true) - yys3122 := string(yys3122Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3122 { + switch yys3 { case "podSignature": if r.TryDecodeAsNil() { x.PodSignature = PodSignature{} } else { - yyv3123 := &x.PodSignature - yyv3123.CodecDecodeSelf(d) + yyv4 := &x.PodSignature + yyv4.CodecDecodeSelf(d) } case "evictionTime": if r.TryDecodeAsNil() { - x.EvictionTime = pkg2_unversioned.Time{} + x.EvictionTime = pkg2_v1.Time{} } else { - yyv3124 := &x.EvictionTime - yym3125 := z.DecBinary() - _ = yym3125 + yyv5 := &x.EvictionTime + yym6 := z.DecBinary() + _ = yym6 if false { - } else if z.HasExtensions() && z.DecExt(yyv3124) { - } else if yym3125 { - z.DecBinaryUnmarshal(yyv3124) - } else if !yym3125 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3124) + } else if z.HasExtensions() && z.DecExt(yyv5) { + } else if yym6 { + z.DecBinaryUnmarshal(yyv5) + } else if !yym6 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv5) } else { - z.DecFallback(yyv3124, false) + z.DecFallback(yyv5, false) } } case "reason": if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv7 := &x.Reason + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*string)(yyv7)) = r.DecodeString() + } } case "message": if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv9 := &x.Message + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys3122) - } // end switch yys3122 - } // end for yyj3122 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39963,16 +48478,16 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3128 int - var yyb3128 bool - var yyhl3128 bool = l >= 0 - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb3128 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb3128 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39980,43 +48495,43 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.PodSignature = PodSignature{} } else { - yyv3129 := &x.PodSignature - yyv3129.CodecDecodeSelf(d) + yyv12 := &x.PodSignature + yyv12.CodecDecodeSelf(d) } - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb3128 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb3128 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.EvictionTime = pkg2_unversioned.Time{} + x.EvictionTime = pkg2_v1.Time{} } else { - yyv3130 := &x.EvictionTime - yym3131 := z.DecBinary() - _ = yym3131 + yyv13 := &x.EvictionTime + yym14 := z.DecBinary() + _ = yym14 if false { - } else if z.HasExtensions() && z.DecExt(yyv3130) { - } else if yym3131 { - z.DecBinaryUnmarshal(yyv3130) - } else if !yym3131 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3130) + } else if z.HasExtensions() && z.DecExt(yyv13) { + } else if yym14 { + z.DecBinaryUnmarshal(yyv13) + } else if !yym14 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv13) } else { - z.DecFallback(yyv3130, false) + z.DecFallback(yyv13, false) } } - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb3128 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb3128 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40024,15 +48539,21 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv15 := &x.Reason + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb3128 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb3128 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40040,20 +48561,26 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv17 := &x.Message + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } } for { - yyj3128++ - if yyhl3128 { - yyb3128 = yyj3128 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb3128 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb3128 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3128-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40065,54 +48592,66 @@ func (x *PodSignature) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3134 := z.EncBinary() - _ = yym3134 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3135 := !z.EncBinary() - yy2arr3135 := z.EncBasicHandle().StructToArray - var yyq3135 [1]bool - _, _, _ = yysep3135, yyq3135, yy2arr3135 - const yyr3135 bool = false - yyq3135[0] = x.PodController != nil - var yynn3135 int - if yyr3135 || yy2arr3135 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [1]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.PodController != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(1) } else { - yynn3135 = 0 - for _, b := range yyq3135 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3135++ + yynn2++ } } - r.EncodeMapStart(yynn3135) - yynn3135 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3135 || yy2arr3135 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3135[0] { + if yyq2[0] { if x.PodController == nil { r.EncodeNil() } else { - x.PodController.CodecEncodeSelf(e) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else if z.HasExtensions() && z.EncExt(x.PodController) { + } else { + z.EncFallback(x.PodController) + } } } else { r.EncodeNil() } } else { - if yyq3135[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podController")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.PodController == nil { r.EncodeNil() } else { - x.PodController.CodecEncodeSelf(e) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(x.PodController) { + } else { + z.EncFallback(x.PodController) + } } } } - if yyr3135 || yy2arr3135 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40125,25 +48664,25 @@ func (x *PodSignature) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3137 := z.DecBinary() - _ = yym3137 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3138 := r.ContainerType() - if yyct3138 == codecSelferValueTypeMap1234 { - yyl3138 := r.ReadMapStart() - if yyl3138 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3138, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3138 == codecSelferValueTypeArray1234 { - yyl3138 := r.ReadArrayStart() - if yyl3138 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3138, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40155,12 +48694,12 @@ func (x *PodSignature) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3139Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3139Slc - var yyhl3139 bool = l >= 0 - for yyj3139 := 0; ; yyj3139++ { - if yyhl3139 { - if yyj3139 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -40169,10 +48708,10 @@ func (x *PodSignature) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3139Slc = r.DecodeBytes(yys3139Slc, true, true) - yys3139 := string(yys3139Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3139 { + switch yys3 { case "podController": if r.TryDecodeAsNil() { if x.PodController != nil { @@ -40180,14 +48719,20 @@ func (x *PodSignature) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } else { if x.PodController == nil { - x.PodController = new(OwnerReference) + x.PodController = new(pkg2_v1.OwnerReference) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(x.PodController) { + } else { + z.DecFallback(x.PodController, false) } - x.PodController.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3139) - } // end switch yys3139 - } // end for yyj3139 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40195,16 +48740,16 @@ func (x *PodSignature) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3141 int - var yyb3141 bool - var yyhl3141 bool = l >= 0 - yyj3141++ - if yyhl3141 { - yyb3141 = yyj3141 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb3141 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb3141 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40215,22 +48760,28 @@ func (x *PodSignature) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } } else { if x.PodController == nil { - x.PodController = new(OwnerReference) + x.PodController = new(pkg2_v1.OwnerReference) + } + yym8 := z.DecBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.DecExt(x.PodController) { + } else { + z.DecFallback(x.PodController, false) } - x.PodController.CodecDecodeSelf(d) } for { - yyj3141++ - if yyhl3141 { - yyb3141 = yyj3141 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb3141 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb3141 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3141-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40242,37 +48793,37 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3143 := z.EncBinary() - _ = yym3143 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3144 := !z.EncBinary() - yy2arr3144 := z.EncBasicHandle().StructToArray - var yyq3144 [2]bool - _, _, _ = yysep3144, yyq3144, yy2arr3144 - const yyr3144 bool = false - yyq3144[1] = x.SizeBytes != 0 - var yynn3144 int - if yyr3144 || yy2arr3144 { + 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 { - yynn3144 = 1 - for _, b := range yyq3144 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn3144++ + yynn2++ } } - r.EncodeMapStart(yynn3144) - yynn3144 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3144 || yy2arr3144 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Names == nil { r.EncodeNil() } else { - yym3146 := z.EncBinary() - _ = yym3146 + yym4 := z.EncBinary() + _ = yym4 if false { } else { z.F.EncSliceStringV(x.Names, false, e) @@ -40285,19 +48836,19 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { if x.Names == nil { r.EncodeNil() } else { - yym3147 := z.EncBinary() - _ = yym3147 + yym5 := z.EncBinary() + _ = yym5 if false { } else { z.F.EncSliceStringV(x.Names, false, e) } } } - if yyr3144 || yy2arr3144 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3144[1] { - yym3149 := z.EncBinary() - _ = yym3149 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeInt(int64(x.SizeBytes)) @@ -40306,19 +48857,19 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq3144[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("sizeBytes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3150 := z.EncBinary() - _ = yym3150 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeInt(int64(x.SizeBytes)) } } } - if yyr3144 || yy2arr3144 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40331,25 +48882,25 @@ func (x *ContainerImage) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3151 := z.DecBinary() - _ = yym3151 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3152 := r.ContainerType() - if yyct3152 == codecSelferValueTypeMap1234 { - yyl3152 := r.ReadMapStart() - if yyl3152 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3152, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3152 == codecSelferValueTypeArray1234 { - yyl3152 := r.ReadArrayStart() - if yyl3152 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3152, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40361,12 +48912,12 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3153Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3153Slc - var yyhl3153 bool = l >= 0 - for yyj3153 := 0; ; yyj3153++ { - if yyhl3153 { - if yyj3153 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -40375,32 +48926,38 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3153Slc = r.DecodeBytes(yys3153Slc, true, true) - yys3153 := string(yys3153Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3153 { + switch yys3 { case "names": if r.TryDecodeAsNil() { x.Names = nil } else { - yyv3154 := &x.Names - yym3155 := z.DecBinary() - _ = yym3155 + yyv4 := &x.Names + yym5 := z.DecBinary() + _ = yym5 if false { } else { - z.F.DecSliceStringX(yyv3154, false, d) + z.F.DecSliceStringX(yyv4, false, d) } } case "sizeBytes": if r.TryDecodeAsNil() { x.SizeBytes = 0 } else { - x.SizeBytes = int64(r.DecodeInt(64)) + yyv6 := &x.SizeBytes + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int64)(yyv6)) = int64(r.DecodeInt(64)) + } } default: - z.DecStructFieldNotFound(-1, yys3153) - } // end switch yys3153 - } // end for yyj3153 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40408,16 +48965,16 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3157 int - var yyb3157 bool - var yyhl3157 bool = l >= 0 - yyj3157++ - if yyhl3157 { - yyb3157 = yyj3157 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb3157 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb3157 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40425,21 +48982,21 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Names = nil } else { - yyv3158 := &x.Names - yym3159 := z.DecBinary() - _ = yym3159 + yyv9 := &x.Names + yym10 := z.DecBinary() + _ = yym10 if false { } else { - z.F.DecSliceStringX(yyv3158, false, d) + z.F.DecSliceStringX(yyv9, false, d) } } - yyj3157++ - if yyhl3157 { - yyb3157 = yyj3157 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb3157 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb3157 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40447,20 +49004,26 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.SizeBytes = 0 } else { - x.SizeBytes = int64(r.DecodeInt(64)) + yyv11 := &x.SizeBytes + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*int64)(yyv11)) = int64(r.DecodeInt(64)) + } } for { - yyj3157++ - if yyhl3157 { - yyb3157 = yyj3157 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb3157 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb3157 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3157-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40469,8 +49032,8 @@ func (x NodePhase) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3161 := z.EncBinary() - _ = yym3161 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -40482,8 +49045,8 @@ func (x *NodePhase) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3162 := z.DecBinary() - _ = yym3162 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -40495,8 +49058,8 @@ func (x NodeConditionType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3163 := z.EncBinary() - _ = yym3163 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -40508,8 +49071,8 @@ func (x *NodeConditionType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3164 := z.DecBinary() - _ = yym3164 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -40524,34 +49087,34 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3165 := z.EncBinary() - _ = yym3165 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3166 := !z.EncBinary() - yy2arr3166 := z.EncBasicHandle().StructToArray - var yyq3166 [6]bool - _, _, _ = yysep3166, yyq3166, yy2arr3166 - const yyr3166 bool = false - yyq3166[2] = true - yyq3166[3] = true - yyq3166[4] = x.Reason != "" - yyq3166[5] = x.Message != "" - var yynn3166 int - if yyr3166 || yy2arr3166 { + 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 { - yynn3166 = 2 - for _, b := range yyq3166 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn3166++ + yynn2++ } } - r.EncodeMapStart(yynn3166) - yynn3166 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3166 || yy2arr3166 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Type.CodecEncodeSelf(e) } else { @@ -40560,7 +49123,7 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } - if yyr3166 || yy2arr3166 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Status.CodecEncodeSelf(e) } else { @@ -40569,85 +49132,85 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Status.CodecEncodeSelf(e) } - if yyr3166 || yy2arr3166 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3166[2] { - yy3170 := &x.LastHeartbeatTime - yym3171 := z.EncBinary() - _ = yym3171 + if yyq2[2] { + yy10 := &x.LastHeartbeatTime + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy3170) { - } else if yym3171 { - z.EncBinaryMarshal(yy3170) - } else if !yym3171 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3170) + } else if z.HasExtensions() && z.EncExt(yy10) { + } else if yym11 { + z.EncBinaryMarshal(yy10) + } else if !yym11 && z.IsJSONHandle() { + z.EncJSONMarshal(yy10) } else { - z.EncFallback(yy3170) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq3166[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lastHeartbeatTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3172 := &x.LastHeartbeatTime - yym3173 := z.EncBinary() - _ = yym3173 + yy12 := &x.LastHeartbeatTime + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy3172) { - } else if yym3173 { - z.EncBinaryMarshal(yy3172) - } else if !yym3173 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3172) + } else if z.HasExtensions() && z.EncExt(yy12) { + } else if yym13 { + z.EncBinaryMarshal(yy12) + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(yy12) } else { - z.EncFallback(yy3172) + z.EncFallback(yy12) } } } - if yyr3166 || yy2arr3166 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3166[3] { - yy3175 := &x.LastTransitionTime - yym3176 := z.EncBinary() - _ = yym3176 + if yyq2[3] { + yy15 := &x.LastTransitionTime + yym16 := z.EncBinary() + _ = yym16 if false { - } else if z.HasExtensions() && z.EncExt(yy3175) { - } else if yym3176 { - z.EncBinaryMarshal(yy3175) - } else if !yym3176 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3175) + } else if z.HasExtensions() && z.EncExt(yy15) { + } else if yym16 { + z.EncBinaryMarshal(yy15) + } else if !yym16 && z.IsJSONHandle() { + z.EncJSONMarshal(yy15) } else { - z.EncFallback(yy3175) + z.EncFallback(yy15) } } else { r.EncodeNil() } } else { - if yyq3166[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3177 := &x.LastTransitionTime - yym3178 := z.EncBinary() - _ = yym3178 + yy17 := &x.LastTransitionTime + yym18 := z.EncBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.EncExt(yy3177) { - } else if yym3178 { - z.EncBinaryMarshal(yy3177) - } else if !yym3178 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3177) + } else if z.HasExtensions() && z.EncExt(yy17) { + } else if yym18 { + z.EncBinaryMarshal(yy17) + } else if !yym18 && z.IsJSONHandle() { + z.EncJSONMarshal(yy17) } else { - z.EncFallback(yy3177) + z.EncFallback(yy17) } } } - if yyr3166 || yy2arr3166 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3166[4] { - yym3180 := z.EncBinary() - _ = yym3180 + if yyq2[4] { + yym20 := z.EncBinary() + _ = yym20 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -40656,23 +49219,23 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3166[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3181 := z.EncBinary() - _ = yym3181 + yym21 := z.EncBinary() + _ = yym21 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr3166 || yy2arr3166 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3166[5] { - yym3183 := z.EncBinary() - _ = yym3183 + if yyq2[5] { + yym23 := z.EncBinary() + _ = yym23 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -40681,19 +49244,19 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3166[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3184 := z.EncBinary() - _ = yym3184 + yym24 := z.EncBinary() + _ = yym24 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr3166 || yy2arr3166 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40706,25 +49269,25 @@ func (x *NodeCondition) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3185 := z.DecBinary() - _ = yym3185 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3186 := r.ContainerType() - if yyct3186 == codecSelferValueTypeMap1234 { - yyl3186 := r.ReadMapStart() - if yyl3186 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3186, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3186 == codecSelferValueTypeArray1234 { - yyl3186 := r.ReadArrayStart() - if yyl3186 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3186, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40736,12 +49299,12 @@ func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3187Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3187Slc - var yyhl3187 bool = l >= 0 - for yyj3187 := 0; ; yyj3187++ { - if yyhl3187 { - if yyj3187 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -40750,72 +49313,86 @@ func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3187Slc = r.DecodeBytes(yys3187Slc, true, true) - yys3187 := string(yys3187Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3187 { + switch yys3 { case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = NodeConditionType(r.DecodeString()) + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = "" } else { - x.Status = ConditionStatus(r.DecodeString()) + yyv5 := &x.Status + yyv5.CodecDecodeSelf(d) } case "lastHeartbeatTime": if r.TryDecodeAsNil() { - x.LastHeartbeatTime = pkg2_unversioned.Time{} + x.LastHeartbeatTime = pkg2_v1.Time{} } else { - yyv3190 := &x.LastHeartbeatTime - yym3191 := z.DecBinary() - _ = yym3191 + yyv6 := &x.LastHeartbeatTime + yym7 := z.DecBinary() + _ = yym7 if false { - } else if z.HasExtensions() && z.DecExt(yyv3190) { - } else if yym3191 { - z.DecBinaryUnmarshal(yyv3190) - } else if !yym3191 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3190) + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if yym7 { + z.DecBinaryUnmarshal(yyv6) + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) } else { - z.DecFallback(yyv3190, false) + z.DecFallback(yyv6, false) } } case "lastTransitionTime": if r.TryDecodeAsNil() { - x.LastTransitionTime = pkg2_unversioned.Time{} + x.LastTransitionTime = pkg2_v1.Time{} } else { - yyv3192 := &x.LastTransitionTime - yym3193 := z.DecBinary() - _ = yym3193 + yyv8 := &x.LastTransitionTime + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv3192) { - } else if yym3193 { - z.DecBinaryUnmarshal(yyv3192) - } else if !yym3193 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3192) + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else if yym9 { + z.DecBinaryUnmarshal(yyv8) + } else if !yym9 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv8) } else { - z.DecFallback(yyv3192, false) + z.DecFallback(yyv8, false) } } case "reason": if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv10 := &x.Reason + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } case "message": if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv12 := &x.Message + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys3187) - } // end switch yys3187 - } // end for yyj3187 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40823,16 +49400,16 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3196 int - var yyb3196 bool - var yyhl3196 bool = l >= 0 - yyj3196++ - if yyhl3196 { - yyb3196 = yyj3196 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb3196 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb3196 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40840,15 +49417,16 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = NodeConditionType(r.DecodeString()) + yyv15 := &x.Type + yyv15.CodecDecodeSelf(d) } - yyj3196++ - if yyhl3196 { - yyb3196 = yyj3196 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb3196 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb3196 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40856,69 +49434,70 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = "" } else { - x.Status = ConditionStatus(r.DecodeString()) + yyv16 := &x.Status + yyv16.CodecDecodeSelf(d) } - yyj3196++ - if yyhl3196 { - yyb3196 = yyj3196 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb3196 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb3196 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.LastHeartbeatTime = pkg2_unversioned.Time{} + x.LastHeartbeatTime = pkg2_v1.Time{} } else { - yyv3199 := &x.LastHeartbeatTime - yym3200 := z.DecBinary() - _ = yym3200 + yyv17 := &x.LastHeartbeatTime + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv3199) { - } else if yym3200 { - z.DecBinaryUnmarshal(yyv3199) - } else if !yym3200 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3199) + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else if yym18 { + z.DecBinaryUnmarshal(yyv17) + } else if !yym18 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv17) } else { - z.DecFallback(yyv3199, false) + z.DecFallback(yyv17, false) } } - yyj3196++ - if yyhl3196 { - yyb3196 = yyj3196 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb3196 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb3196 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.LastTransitionTime = pkg2_unversioned.Time{} + x.LastTransitionTime = pkg2_v1.Time{} } else { - yyv3201 := &x.LastTransitionTime - yym3202 := z.DecBinary() - _ = yym3202 + yyv19 := &x.LastTransitionTime + yym20 := z.DecBinary() + _ = yym20 if false { - } else if z.HasExtensions() && z.DecExt(yyv3201) { - } else if yym3202 { - z.DecBinaryUnmarshal(yyv3201) - } else if !yym3202 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3201) + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else if yym20 { + z.DecBinaryUnmarshal(yyv19) + } else if !yym20 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv19) } else { - z.DecFallback(yyv3201, false) + z.DecFallback(yyv19, false) } } - yyj3196++ - if yyhl3196 { - yyb3196 = yyj3196 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb3196 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb3196 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40926,15 +49505,21 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv21 := &x.Reason + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } } - yyj3196++ - if yyhl3196 { - yyb3196 = yyj3196 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb3196 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb3196 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40942,20 +49527,26 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv23 := &x.Message + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*string)(yyv23)) = r.DecodeString() + } } for { - yyj3196++ - if yyhl3196 { - yyb3196 = yyj3196 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb3196 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb3196 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3196-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40964,8 +49555,8 @@ func (x NodeAddressType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3205 := z.EncBinary() - _ = yym3205 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -40977,8 +49568,8 @@ func (x *NodeAddressType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3206 := z.DecBinary() - _ = yym3206 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -40993,30 +49584,30 @@ func (x *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3207 := z.EncBinary() - _ = yym3207 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3208 := !z.EncBinary() - yy2arr3208 := z.EncBasicHandle().StructToArray - var yyq3208 [2]bool - _, _, _ = yysep3208, yyq3208, yy2arr3208 - const yyr3208 bool = false - var yynn3208 int - if yyr3208 || yy2arr3208 { + 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 { - yynn3208 = 2 - for _, b := range yyq3208 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn3208++ + yynn2++ } } - r.EncodeMapStart(yynn3208) - yynn3208 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3208 || yy2arr3208 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Type.CodecEncodeSelf(e) } else { @@ -41025,10 +49616,10 @@ func (x *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } - if yyr3208 || yy2arr3208 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3211 := z.EncBinary() - _ = yym3211 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) @@ -41037,14 +49628,14 @@ func (x *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("address")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3212 := z.EncBinary() - _ = yym3212 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) } } - if yyr3208 || yy2arr3208 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41057,25 +49648,25 @@ func (x *NodeAddress) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3213 := z.DecBinary() - _ = yym3213 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3214 := r.ContainerType() - if yyct3214 == codecSelferValueTypeMap1234 { - yyl3214 := r.ReadMapStart() - if yyl3214 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3214, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3214 == codecSelferValueTypeArray1234 { - yyl3214 := r.ReadArrayStart() - if yyl3214 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3214, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41087,12 +49678,12 @@ func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3215Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3215Slc - var yyhl3215 bool = l >= 0 - for yyj3215 := 0; ; yyj3215++ { - if yyhl3215 { - if yyj3215 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -41101,26 +49692,33 @@ func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3215Slc = r.DecodeBytes(yys3215Slc, true, true) - yys3215 := string(yys3215Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3215 { + switch yys3 { case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = NodeAddressType(r.DecodeString()) + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) } case "address": if r.TryDecodeAsNil() { x.Address = "" } else { - x.Address = string(r.DecodeString()) + yyv5 := &x.Address + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys3215) - } // end switch yys3215 - } // end for yyj3215 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41128,16 +49726,16 @@ func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3218 int - var yyb3218 bool - var yyhl3218 bool = l >= 0 - yyj3218++ - if yyhl3218 { - yyb3218 = yyj3218 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb3218 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb3218 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41145,15 +49743,16 @@ func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = NodeAddressType(r.DecodeString()) + yyv8 := &x.Type + yyv8.CodecDecodeSelf(d) } - yyj3218++ - if yyhl3218 { - yyb3218 = yyj3218 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb3218 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb3218 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41161,189 +49760,26 @@ func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Address = "" } else { - x.Address = string(r.DecodeString()) - } - for { - yyj3218++ - if yyhl3218 { - yyb3218 = yyj3218 > l - } else { - yyb3218 = r.CheckBreak() - } - if yyb3218 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3218-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 { - yym3221 := z.EncBinary() - _ = yym3221 + yyv9 := &x.Address + yym10 := z.DecBinary() + _ = yym10 if false { - } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3222 := !z.EncBinary() - yy2arr3222 := z.EncBasicHandle().StructToArray - var yyq3222 [1]bool - _, _, _ = yysep3222, yyq3222, yy2arr3222 - const yyr3222 bool = false - yyq3222[0] = len(x.Capacity) != 0 - var yynn3222 int - if yyr3222 || yy2arr3222 { - r.EncodeArrayStart(1) - } else { - yynn3222 = 0 - for _, b := range yyq3222 { - if b { - yynn3222++ - } - } - r.EncodeMapStart(yynn3222) - yynn3222 = 0 - } - if yyr3222 || yy2arr3222 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3222[0] { - if x.Capacity == nil { - r.EncodeNil() - } else { - x.Capacity.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq3222[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 yyr3222 || yy2arr3222 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } + *((*string)(yyv9)) = r.DecodeString() } } -} - -func (x *NodeResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym3224 := z.DecBinary() - _ = yym3224 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3225 := r.ContainerType() - if yyct3225 == codecSelferValueTypeMap1234 { - yyl3225 := r.ReadMapStart() - if yyl3225 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3225, d) - } - } else if yyct3225 == codecSelferValueTypeArray1234 { - yyl3225 := r.ReadArrayStart() - if yyl3225 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3225, 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 yys3226Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3226Slc - var yyhl3226 bool = l >= 0 - for yyj3226 := 0; ; yyj3226++ { - if yyhl3226 { - if yyj3226 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3226Slc = r.DecodeBytes(yys3226Slc, true, true) - yys3226 := string(yys3226Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3226 { - case "capacity": - if r.TryDecodeAsNil() { - x.Capacity = nil - } else { - yyv3227 := &x.Capacity - yyv3227.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3226) - } // end switch yys3226 - } // end for yyj3226 - 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 yyj3228 int - var yyb3228 bool - var yyhl3228 bool = l >= 0 - yyj3228++ - if yyhl3228 { - yyb3228 = yyj3228 > l - } else { - yyb3228 = r.CheckBreak() - } - if yyb3228 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Capacity = nil - } else { - yyv3229 := &x.Capacity - yyv3229.CodecDecodeSelf(d) - } for { - yyj3228++ - if yyhl3228 { - yyb3228 = yyj3228 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb3228 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb3228 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3228-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41352,8 +49788,8 @@ func (x ResourceName) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3230 := z.EncBinary() - _ = yym3230 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -41365,8 +49801,8 @@ func (x *ResourceName) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3231 := z.DecBinary() - _ = yym3231 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -41381,8 +49817,8 @@ func (x ResourceList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3232 := z.EncBinary() - _ = yym3232 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -41395,8 +49831,8 @@ func (x *ResourceList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3233 := z.DecBinary() - _ = yym3233 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -41411,39 +49847,39 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3234 := z.EncBinary() - _ = yym3234 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3235 := !z.EncBinary() - yy2arr3235 := z.EncBasicHandle().StructToArray - var yyq3235 [5]bool - _, _, _ = yysep3235, yyq3235, yy2arr3235 - const yyr3235 bool = false - yyq3235[0] = x.Kind != "" - yyq3235[1] = x.APIVersion != "" - yyq3235[2] = true - yyq3235[3] = true - yyq3235[4] = true - var yynn3235 int - if yyr3235 || yy2arr3235 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn3235 = 0 - for _, b := range yyq3235 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3235++ + yynn2++ } } - r.EncodeMapStart(yynn3235) - yynn3235 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3235 || yy2arr3235 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3235[0] { - yym3237 := z.EncBinary() - _ = yym3237 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -41452,23 +49888,23 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3235[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3238 := z.EncBinary() - _ = yym3238 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3235 || yy2arr3235 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3235[1] { - yym3240 := z.EncBinary() - _ = yym3240 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -41477,70 +49913,82 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3235[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3241 := z.EncBinary() - _ = yym3241 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3235 || yy2arr3235 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3235[2] { - yy3243 := &x.ObjectMeta - yy3243.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq3235[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3244 := &x.ObjectMeta - yy3244.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr3235 || yy2arr3235 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3235[3] { - yy3246 := &x.Spec - yy3246.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3235[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3247 := &x.Spec - yy3247.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr3235 || yy2arr3235 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3235[4] { - yy3249 := &x.Status - yy3249.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3235[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3250 := &x.Status - yy3250.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr3235 || yy2arr3235 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41553,25 +50001,25 @@ func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3251 := z.DecBinary() - _ = yym3251 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3252 := r.ContainerType() - if yyct3252 == codecSelferValueTypeMap1234 { - yyl3252 := r.ReadMapStart() - if yyl3252 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3252, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3252 == codecSelferValueTypeArray1234 { - yyl3252 := r.ReadArrayStart() - if yyl3252 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3252, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41583,12 +50031,12 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3253Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3253Slc - var yyhl3253 bool = l >= 0 - for yyj3253 := 0; ; yyj3253++ { - if yyhl3253 { - if yyj3253 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -41597,47 +50045,65 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3253Slc = r.DecodeBytes(yys3253Slc, true, true) - yys3253 := string(yys3253Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3253 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv3256 := &x.ObjectMeta - yyv3256.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = NodeSpec{} } else { - yyv3257 := &x.Spec - yyv3257.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = NodeStatus{} } else { - yyv3258 := &x.Status - yyv3258.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3253) - } // end switch yys3253 - } // end for yyj3253 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41645,16 +50111,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3259 int - var yyb3259 bool - var yyhl3259 bool = l >= 0 - yyj3259++ - if yyhl3259 { - yyb3259 = yyj3259 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3259 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3259 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41662,15 +50128,21 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj3259++ - if yyhl3259 { - yyb3259 = yyj3259 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3259 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3259 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41678,32 +50150,44 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj3259++ - if yyhl3259 { - yyb3259 = yyj3259 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3259 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3259 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv3262 := &x.ObjectMeta - yyv3262.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj3259++ - if yyhl3259 { - yyb3259 = yyj3259 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3259 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3259 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41711,16 +50195,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NodeSpec{} } else { - yyv3263 := &x.Spec - yyv3263.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj3259++ - if yyhl3259 { - yyb3259 = yyj3259 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3259 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3259 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41728,21 +50212,21 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = NodeStatus{} } else { - yyv3264 := &x.Status - yyv3264.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj3259++ - if yyhl3259 { - yyb3259 = yyj3259 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3259 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3259 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3259-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41754,37 +50238,37 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3265 := z.EncBinary() - _ = yym3265 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3266 := !z.EncBinary() - yy2arr3266 := z.EncBasicHandle().StructToArray - var yyq3266 [4]bool - _, _, _ = yysep3266, yyq3266, yy2arr3266 - const yyr3266 bool = false - yyq3266[0] = x.Kind != "" - yyq3266[1] = x.APIVersion != "" - yyq3266[2] = true - var yynn3266 int - if yyr3266 || yy2arr3266 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn3266 = 1 - for _, b := range yyq3266 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn3266++ + yynn2++ } } - r.EncodeMapStart(yynn3266) - yynn3266 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3266 || yy2arr3266 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3266[0] { - yym3268 := z.EncBinary() - _ = yym3268 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -41793,23 +50277,23 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3266[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3269 := z.EncBinary() - _ = yym3269 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3266 || yy2arr3266 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3266[1] { - yym3271 := z.EncBinary() - _ = yym3271 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -41818,54 +50302,54 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3266[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3272 := z.EncBinary() - _ = yym3272 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3266 || yy2arr3266 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3266[2] { - yy3274 := &x.ListMeta - yym3275 := z.EncBinary() - _ = yym3275 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy3274) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy3274) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq3266[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3276 := &x.ListMeta - yym3277 := z.EncBinary() - _ = yym3277 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy3276) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy3276) + z.EncFallback(yy12) } } } - if yyr3266 || yy2arr3266 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3279 := z.EncBinary() - _ = yym3279 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceNode(([]Node)(x.Items), e) @@ -41878,15 +50362,15 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3280 := z.EncBinary() - _ = yym3280 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceNode(([]Node)(x.Items), e) } } } - if yyr3266 || yy2arr3266 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41899,25 +50383,25 @@ func (x *NodeList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3281 := z.DecBinary() - _ = yym3281 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3282 := r.ContainerType() - if yyct3282 == codecSelferValueTypeMap1234 { - yyl3282 := r.ReadMapStart() - if yyl3282 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3282, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3282 == codecSelferValueTypeArray1234 { - yyl3282 := r.ReadArrayStart() - if yyl3282 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3282, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41929,12 +50413,12 @@ func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3283Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3283Slc - var yyhl3283 bool = l >= 0 - for yyj3283 := 0; ; yyj3283++ { - if yyhl3283 { - if yyj3283 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -41943,51 +50427,63 @@ func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3283Slc = r.DecodeBytes(yys3283Slc, true, true) - yys3283 := string(yys3283Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3283 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv3286 := &x.ListMeta - yym3287 := z.DecBinary() - _ = yym3287 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv3286) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv3286, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3288 := &x.Items - yym3289 := z.DecBinary() - _ = yym3289 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceNode((*[]Node)(yyv3288), d) + h.decSliceNode((*[]Node)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys3283) - } // end switch yys3283 - } // end for yyj3283 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41995,16 +50491,16 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3290 int - var yyb3290 bool - var yyhl3290 bool = l >= 0 - yyj3290++ - if yyhl3290 { - yyb3290 = yyj3290 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3290 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3290 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42012,15 +50508,21 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj3290++ - if yyhl3290 { - yyb3290 = yyj3290 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3290 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3290 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42028,38 +50530,44 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj3290++ - if yyhl3290 { - yyb3290 = yyj3290 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3290 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3290 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv3293 := &x.ListMeta - yym3294 := z.DecBinary() - _ = yym3294 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv3293) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv3293, false) + z.DecFallback(yyv17, false) } } - yyj3290++ - if yyhl3290 { - yyb3290 = yyj3290 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3290 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3290 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42067,30 +50575,56 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3295 := &x.Items - yym3296 := z.DecBinary() - _ = yym3296 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceNode((*[]Node)(yyv3295), d) + h.decSliceNode((*[]Node)(yyv19), d) } } for { - yyj3290++ - if yyhl3290 { - yyb3290 = yyj3290 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3290 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3290 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3290-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } +func (x FinalizerName) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *FinalizerName) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + func (x *NamespaceSpec) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -42098,57 +50632,64 @@ func (x *NamespaceSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3297 := z.EncBinary() - _ = yym3297 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3298 := !z.EncBinary() - yy2arr3298 := z.EncBasicHandle().StructToArray - var yyq3298 [1]bool - _, _, _ = yysep3298, yyq3298, yy2arr3298 - const yyr3298 bool = false - var yynn3298 int - if yyr3298 || yy2arr3298 { + 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 { - yynn3298 = 1 - for _, b := range yyq3298 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3298++ + yynn2++ } } - r.EncodeMapStart(yynn3298) - yynn3298 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3298 || yy2arr3298 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.Finalizers == nil { - r.EncodeNil() - } else { - yym3300 := z.EncBinary() - _ = yym3300 - if false { + if yyq2[0] { + if x.Finalizers == nil { + r.EncodeNil() } else { - h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e) + } } + } else { + r.EncodeNil() } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Finalizers")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Finalizers == nil { - r.EncodeNil() - } else { - yym3301 := z.EncBinary() - _ = yym3301 - if false { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("finalizers")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Finalizers == nil { + r.EncodeNil() } else { - h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e) + } } } } - if yyr3298 || yy2arr3298 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -42161,25 +50702,25 @@ func (x *NamespaceSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3302 := z.DecBinary() - _ = yym3302 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3303 := r.ContainerType() - if yyct3303 == codecSelferValueTypeMap1234 { - yyl3303 := r.ReadMapStart() - if yyl3303 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3303, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3303 == codecSelferValueTypeArray1234 { - yyl3303 := r.ReadArrayStart() - if yyl3303 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3303, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -42191,12 +50732,12 @@ func (x *NamespaceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3304Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3304Slc - var yyhl3304 bool = l >= 0 - for yyj3304 := 0; ; yyj3304++ { - if yyhl3304 { - if yyj3304 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -42205,26 +50746,26 @@ func (x *NamespaceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3304Slc = r.DecodeBytes(yys3304Slc, true, true) - yys3304 := string(yys3304Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3304 { - case "Finalizers": + switch yys3 { + case "finalizers": if r.TryDecodeAsNil() { x.Finalizers = nil } else { - yyv3305 := &x.Finalizers - yym3306 := z.DecBinary() - _ = yym3306 + yyv4 := &x.Finalizers + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSliceFinalizerName((*[]FinalizerName)(yyv3305), d) + h.decSliceFinalizerName((*[]FinalizerName)(yyv4), d) } } default: - z.DecStructFieldNotFound(-1, yys3304) - } // end switch yys3304 - } // end for yyj3304 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -42232,16 +50773,16 @@ func (x *NamespaceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3307 int - var yyb3307 bool - var yyhl3307 bool = l >= 0 - yyj3307++ - if yyhl3307 { - yyb3307 = yyj3307 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb3307 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb3307 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42249,56 +50790,30 @@ func (x *NamespaceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Finalizers = nil } else { - yyv3308 := &x.Finalizers - yym3309 := z.DecBinary() - _ = yym3309 + yyv7 := &x.Finalizers + yym8 := z.DecBinary() + _ = yym8 if false { } else { - h.decSliceFinalizerName((*[]FinalizerName)(yyv3308), d) + h.decSliceFinalizerName((*[]FinalizerName)(yyv7), d) } } for { - yyj3307++ - if yyhl3307 { - yyb3307 = yyj3307 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb3307 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb3307 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3307-1, "") + 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 - yym3310 := z.EncBinary() - _ = yym3310 - 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 - yym3311 := z.DecBinary() - _ = yym3311 - 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) @@ -42306,46 +50821,46 @@ func (x *NamespaceStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3312 := z.EncBinary() - _ = yym3312 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3313 := !z.EncBinary() - yy2arr3313 := z.EncBasicHandle().StructToArray - var yyq3313 [1]bool - _, _, _ = yysep3313, yyq3313, yy2arr3313 - const yyr3313 bool = false - yyq3313[0] = x.Phase != "" - var yynn3313 int - if yyr3313 || yy2arr3313 { + 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 { - yynn3313 = 0 - for _, b := range yyq3313 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3313++ + yynn2++ } } - r.EncodeMapStart(yynn3313) - yynn3313 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3313 || yy2arr3313 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3313[0] { + if yyq2[0] { x.Phase.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3313[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("phase")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Phase.CodecEncodeSelf(e) } } - if yyr3313 || yy2arr3313 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -42358,25 +50873,25 @@ func (x *NamespaceStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3315 := z.DecBinary() - _ = yym3315 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3316 := r.ContainerType() - if yyct3316 == codecSelferValueTypeMap1234 { - yyl3316 := r.ReadMapStart() - if yyl3316 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3316, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3316 == codecSelferValueTypeArray1234 { - yyl3316 := r.ReadArrayStart() - if yyl3316 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3316, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -42388,12 +50903,12 @@ func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3317Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3317Slc - var yyhl3317 bool = l >= 0 - for yyj3317 := 0; ; yyj3317++ { - if yyhl3317 { - if yyj3317 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -42402,20 +50917,21 @@ func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3317Slc = r.DecodeBytes(yys3317Slc, true, true) - yys3317 := string(yys3317Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3317 { + switch yys3 { case "phase": if r.TryDecodeAsNil() { x.Phase = "" } else { - x.Phase = NamespacePhase(r.DecodeString()) + yyv4 := &x.Phase + yyv4.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3317) - } // end switch yys3317 - } // end for yyj3317 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -42423,16 +50939,16 @@ func (x *NamespaceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3319 int - var yyb3319 bool - var yyhl3319 bool = l >= 0 - yyj3319++ - if yyhl3319 { - yyb3319 = yyj3319 > l + var yyj5 int + var yyb5 bool + var yyhl5 bool = l >= 0 + yyj5++ + if yyhl5 { + yyb5 = yyj5 > l } else { - yyb3319 = r.CheckBreak() + yyb5 = r.CheckBreak() } - if yyb3319 { + if yyb5 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42440,20 +50956,21 @@ func (x *NamespaceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Phase = "" } else { - x.Phase = NamespacePhase(r.DecodeString()) + yyv6 := &x.Phase + yyv6.CodecDecodeSelf(d) } for { - yyj3319++ - if yyhl3319 { - yyb3319 = yyj3319 > l + yyj5++ + if yyhl5 { + yyb5 = yyj5 > l } else { - yyb3319 = r.CheckBreak() + yyb5 = r.CheckBreak() } - if yyb3319 { + if yyb5 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3319-1, "") + z.DecStructFieldNotFound(yyj5-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -42462,8 +50979,8 @@ func (x NamespacePhase) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3321 := z.EncBinary() - _ = yym3321 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -42475,8 +50992,8 @@ func (x *NamespacePhase) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3322 := z.DecBinary() - _ = yym3322 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -42491,39 +51008,39 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3323 := z.EncBinary() - _ = yym3323 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3324 := !z.EncBinary() - yy2arr3324 := z.EncBasicHandle().StructToArray - var yyq3324 [5]bool - _, _, _ = yysep3324, yyq3324, yy2arr3324 - const yyr3324 bool = false - yyq3324[0] = x.Kind != "" - yyq3324[1] = x.APIVersion != "" - yyq3324[2] = true - yyq3324[3] = true - yyq3324[4] = true - var yynn3324 int - if yyr3324 || yy2arr3324 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn3324 = 0 - for _, b := range yyq3324 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3324++ + yynn2++ } } - r.EncodeMapStart(yynn3324) - yynn3324 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3324 || yy2arr3324 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3324[0] { - yym3326 := z.EncBinary() - _ = yym3326 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -42532,23 +51049,23 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3324[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3327 := z.EncBinary() - _ = yym3327 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3324 || yy2arr3324 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3324[1] { - yym3329 := z.EncBinary() - _ = yym3329 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -42557,70 +51074,82 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3324[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3330 := z.EncBinary() - _ = yym3330 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3324 || yy2arr3324 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3324[2] { - yy3332 := &x.ObjectMeta - yy3332.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq3324[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3333 := &x.ObjectMeta - yy3333.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr3324 || yy2arr3324 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3324[3] { - yy3335 := &x.Spec - yy3335.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3324[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3336 := &x.Spec - yy3336.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr3324 || yy2arr3324 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3324[4] { - yy3338 := &x.Status - yy3338.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3324[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3339 := &x.Status - yy3339.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr3324 || yy2arr3324 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -42633,25 +51162,25 @@ func (x *Namespace) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3340 := z.DecBinary() - _ = yym3340 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3341 := r.ContainerType() - if yyct3341 == codecSelferValueTypeMap1234 { - yyl3341 := r.ReadMapStart() - if yyl3341 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3341, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3341 == codecSelferValueTypeArray1234 { - yyl3341 := r.ReadArrayStart() - if yyl3341 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3341, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -42663,12 +51192,12 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3342Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3342Slc - var yyhl3342 bool = l >= 0 - for yyj3342 := 0; ; yyj3342++ { - if yyhl3342 { - if yyj3342 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -42677,47 +51206,65 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3342Slc = r.DecodeBytes(yys3342Slc, true, true) - yys3342 := string(yys3342Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3342 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv3345 := &x.ObjectMeta - yyv3345.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = NamespaceSpec{} } else { - yyv3346 := &x.Spec - yyv3346.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = NamespaceStatus{} } else { - yyv3347 := &x.Status - yyv3347.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3342) - } // end switch yys3342 - } // end for yyj3342 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -42725,16 +51272,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3348 int - var yyb3348 bool - var yyhl3348 bool = l >= 0 - yyj3348++ - if yyhl3348 { - yyb3348 = yyj3348 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3348 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3348 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42742,15 +51289,21 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj3348++ - if yyhl3348 { - yyb3348 = yyj3348 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3348 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3348 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42758,32 +51311,44 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj3348++ - if yyhl3348 { - yyb3348 = yyj3348 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3348 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3348 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv3351 := &x.ObjectMeta - yyv3351.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj3348++ - if yyhl3348 { - yyb3348 = yyj3348 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3348 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3348 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42791,16 +51356,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NamespaceSpec{} } else { - yyv3352 := &x.Spec - yyv3352.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj3348++ - if yyhl3348 { - yyb3348 = yyj3348 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3348 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3348 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42808,21 +51373,21 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = NamespaceStatus{} } else { - yyv3353 := &x.Status - yyv3353.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj3348++ - if yyhl3348 { - yyb3348 = yyj3348 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3348 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3348 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3348-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -42834,37 +51399,37 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3354 := z.EncBinary() - _ = yym3354 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3355 := !z.EncBinary() - yy2arr3355 := z.EncBasicHandle().StructToArray - var yyq3355 [4]bool - _, _, _ = yysep3355, yyq3355, yy2arr3355 - const yyr3355 bool = false - yyq3355[0] = x.Kind != "" - yyq3355[1] = x.APIVersion != "" - yyq3355[2] = true - var yynn3355 int - if yyr3355 || yy2arr3355 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn3355 = 1 - for _, b := range yyq3355 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn3355++ + yynn2++ } } - r.EncodeMapStart(yynn3355) - yynn3355 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3355 || yy2arr3355 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3355[0] { - yym3357 := z.EncBinary() - _ = yym3357 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -42873,23 +51438,23 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3355[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3358 := z.EncBinary() - _ = yym3358 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3355 || yy2arr3355 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3355[1] { - yym3360 := z.EncBinary() - _ = yym3360 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -42898,54 +51463,54 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3355[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3361 := z.EncBinary() - _ = yym3361 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3355 || yy2arr3355 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3355[2] { - yy3363 := &x.ListMeta - yym3364 := z.EncBinary() - _ = yym3364 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy3363) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy3363) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq3355[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3365 := &x.ListMeta - yym3366 := z.EncBinary() - _ = yym3366 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy3365) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy3365) + z.EncFallback(yy12) } } } - if yyr3355 || yy2arr3355 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3368 := z.EncBinary() - _ = yym3368 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceNamespace(([]Namespace)(x.Items), e) @@ -42958,15 +51523,15 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3369 := z.EncBinary() - _ = yym3369 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceNamespace(([]Namespace)(x.Items), e) } } } - if yyr3355 || yy2arr3355 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -42979,25 +51544,25 @@ func (x *NamespaceList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3370 := z.DecBinary() - _ = yym3370 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3371 := r.ContainerType() - if yyct3371 == codecSelferValueTypeMap1234 { - yyl3371 := r.ReadMapStart() - if yyl3371 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3371, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3371 == codecSelferValueTypeArray1234 { - yyl3371 := r.ReadArrayStart() - if yyl3371 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3371, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -43009,12 +51574,12 @@ func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3372Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3372Slc - var yyhl3372 bool = l >= 0 - for yyj3372 := 0; ; yyj3372++ { - if yyhl3372 { - if yyj3372 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -43023,51 +51588,63 @@ func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3372Slc = r.DecodeBytes(yys3372Slc, true, true) - yys3372 := string(yys3372Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3372 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv3375 := &x.ListMeta - yym3376 := z.DecBinary() - _ = yym3376 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv3375) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv3375, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3377 := &x.Items - yym3378 := z.DecBinary() - _ = yym3378 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceNamespace((*[]Namespace)(yyv3377), d) + h.decSliceNamespace((*[]Namespace)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys3372) - } // end switch yys3372 - } // end for yyj3372 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -43075,16 +51652,16 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3379 int - var yyb3379 bool - var yyhl3379 bool = l >= 0 - yyj3379++ - if yyhl3379 { - yyb3379 = yyj3379 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3379 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3379 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43092,15 +51669,21 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj3379++ - if yyhl3379 { - yyb3379 = yyj3379 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3379 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3379 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43108,38 +51691,44 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj3379++ - if yyhl3379 { - yyb3379 = yyj3379 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3379 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3379 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv3382 := &x.ListMeta - yym3383 := z.DecBinary() - _ = yym3383 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv3382) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv3382, false) + z.DecFallback(yyv17, false) } } - yyj3379++ - if yyhl3379 { - yyb3379 = yyj3379 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3379 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3379 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43147,26 +51736,26 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3384 := &x.Items - yym3385 := z.DecBinary() - _ = yym3385 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceNamespace((*[]Namespace)(yyv3384), d) + h.decSliceNamespace((*[]Namespace)(yyv19), d) } } for { - yyj3379++ - if yyhl3379 { - yyb3379 = yyj3379 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3379 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3379 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3379-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -43178,37 +51767,37 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3386 := z.EncBinary() - _ = yym3386 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3387 := !z.EncBinary() - yy2arr3387 := z.EncBasicHandle().StructToArray - var yyq3387 [4]bool - _, _, _ = yysep3387, yyq3387, yy2arr3387 - const yyr3387 bool = false - yyq3387[0] = x.Kind != "" - yyq3387[1] = x.APIVersion != "" - yyq3387[2] = true - var yynn3387 int - if yyr3387 || yy2arr3387 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn3387 = 1 - for _, b := range yyq3387 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn3387++ + yynn2++ } } - r.EncodeMapStart(yynn3387) - yynn3387 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3387 || yy2arr3387 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3387[0] { - yym3389 := z.EncBinary() - _ = yym3389 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -43217,23 +51806,23 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3387[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3390 := z.EncBinary() - _ = yym3390 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3387 || yy2arr3387 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3387[1] { - yym3392 := z.EncBinary() - _ = yym3392 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -43242,47 +51831,59 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3387[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3393 := z.EncBinary() - _ = yym3393 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3387 || yy2arr3387 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3387[2] { - yy3395 := &x.ObjectMeta - yy3395.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq3387[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3396 := &x.ObjectMeta - yy3396.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr3387 || yy2arr3387 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3398 := &x.Target - yy3398.CodecEncodeSelf(e) + yy15 := &x.Target + yy15.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("target")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3399 := &x.Target - yy3399.CodecEncodeSelf(e) + yy17 := &x.Target + yy17.CodecEncodeSelf(e) } - if yyr3387 || yy2arr3387 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -43295,25 +51896,25 @@ func (x *Binding) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3400 := z.DecBinary() - _ = yym3400 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3401 := r.ContainerType() - if yyct3401 == codecSelferValueTypeMap1234 { - yyl3401 := r.ReadMapStart() - if yyl3401 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3401, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3401 == codecSelferValueTypeArray1234 { - yyl3401 := r.ReadArrayStart() - if yyl3401 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3401, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -43325,12 +51926,12 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3402Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3402Slc - var yyhl3402 bool = l >= 0 - for yyj3402 := 0; ; yyj3402++ { - if yyhl3402 { - if yyj3402 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -43339,40 +51940,58 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3402Slc = r.DecodeBytes(yys3402Slc, true, true) - yys3402 := string(yys3402Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3402 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv3405 := &x.ObjectMeta - yyv3405.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "target": if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv3406 := &x.Target - yyv3406.CodecDecodeSelf(d) + yyv10 := &x.Target + yyv10.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3402) - } // end switch yys3402 - } // end for yyj3402 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -43380,16 +51999,16 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3407 int - var yyb3407 bool - var yyhl3407 bool = l >= 0 - yyj3407++ - if yyhl3407 { - yyb3407 = yyj3407 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb3407 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb3407 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43397,15 +52016,21 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } - yyj3407++ - if yyhl3407 { - yyb3407 = yyj3407 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb3407 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb3407 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43413,32 +52038,44 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj3407++ - if yyhl3407 { - yyb3407 = yyj3407 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb3407 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb3407 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv3410 := &x.ObjectMeta - yyv3410.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj3407++ - if yyhl3407 { - yyb3407 = yyj3407 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb3407 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb3407 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43446,21 +52083,21 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv3411 := &x.Target - yyv3411.CodecDecodeSelf(d) + yyv18 := &x.Target + yyv18.CodecDecodeSelf(d) } for { - yyj3407++ - if yyhl3407 { - yyb3407 = yyj3407 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb3407 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb3407 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3407-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -43472,68 +52109,68 @@ func (x *Preconditions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3412 := z.EncBinary() - _ = yym3412 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3413 := !z.EncBinary() - yy2arr3413 := z.EncBasicHandle().StructToArray - var yyq3413 [1]bool - _, _, _ = yysep3413, yyq3413, yy2arr3413 - const yyr3413 bool = false - yyq3413[0] = x.UID != nil - var yynn3413 int - if yyr3413 || yy2arr3413 { + 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 { - yynn3413 = 0 - for _, b := range yyq3413 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3413++ + yynn2++ } } - r.EncodeMapStart(yynn3413) - yynn3413 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3413 || yy2arr3413 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3413[0] { + if yyq2[0] { if x.UID == nil { r.EncodeNil() } else { - yy3415 := *x.UID - yym3416 := z.EncBinary() - _ = yym3416 + yy4 := *x.UID + yym5 := z.EncBinary() + _ = yym5 if false { - } else if z.HasExtensions() && z.EncExt(yy3415) { + } else if z.HasExtensions() && z.EncExt(yy4) { } else { - r.EncodeString(codecSelferC_UTF81234, string(yy3415)) + r.EncodeString(codecSelferC_UTF81234, string(yy4)) } } } else { r.EncodeNil() } } else { - if yyq3413[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("uid")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.UID == nil { r.EncodeNil() } else { - yy3417 := *x.UID - yym3418 := z.EncBinary() - _ = yym3418 + yy6 := *x.UID + yym7 := z.EncBinary() + _ = yym7 if false { - } else if z.HasExtensions() && z.EncExt(yy3417) { + } else if z.HasExtensions() && z.EncExt(yy6) { } else { - r.EncodeString(codecSelferC_UTF81234, string(yy3417)) + r.EncodeString(codecSelferC_UTF81234, string(yy6)) } } } } - if yyr3413 || yy2arr3413 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -43546,25 +52183,25 @@ func (x *Preconditions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3419 := z.DecBinary() - _ = yym3419 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3420 := r.ContainerType() - if yyct3420 == codecSelferValueTypeMap1234 { - yyl3420 := r.ReadMapStart() - if yyl3420 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3420, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3420 == codecSelferValueTypeArray1234 { - yyl3420 := r.ReadArrayStart() - if yyl3420 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3420, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -43576,12 +52213,12 @@ func (x *Preconditions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3421Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3421Slc - var yyhl3421 bool = l >= 0 - for yyj3421 := 0; ; yyj3421++ { - if yyhl3421 { - if yyj3421 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -43590,10 +52227,10 @@ func (x *Preconditions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3421Slc = r.DecodeBytes(yys3421Slc, true, true) - yys3421 := string(yys3421Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3421 { + switch yys3 { case "uid": if r.TryDecodeAsNil() { if x.UID != nil { @@ -43603,8 +52240,8 @@ func (x *Preconditions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.UID == nil { x.UID = new(pkg1_types.UID) } - yym3423 := z.DecBinary() - _ = yym3423 + yym5 := z.DecBinary() + _ = yym5 if false { } else if z.HasExtensions() && z.DecExt(x.UID) { } else { @@ -43612,9 +52249,9 @@ func (x *Preconditions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } default: - z.DecStructFieldNotFound(-1, yys3421) - } // end switch yys3421 - } // end for yyj3421 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -43622,16 +52259,16 @@ func (x *Preconditions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3424 int - var yyb3424 bool - var yyhl3424 bool = l >= 0 - yyj3424++ - if yyhl3424 { - yyb3424 = yyj3424 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb3424 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb3424 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43644,8 +52281,8 @@ func (x *Preconditions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.UID == nil { x.UID = new(pkg1_types.UID) } - yym3426 := z.DecBinary() - _ = yym3426 + yym8 := z.DecBinary() + _ = yym8 if false { } else if z.HasExtensions() && z.DecExt(x.UID) { } else { @@ -43653,21 +52290,47 @@ func (x *Preconditions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } } for { - yyj3424++ - if yyhl3424 { - yyb3424 = yyj3424 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb3424 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb3424 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3424-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } +func (x DeletionPropagation) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *DeletionPropagation) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -43675,39 +52338,39 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3427 := z.EncBinary() - _ = yym3427 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3428 := !z.EncBinary() - yy2arr3428 := z.EncBasicHandle().StructToArray - var yyq3428 [5]bool - _, _, _ = yysep3428, yyq3428, yy2arr3428 - const yyr3428 bool = false - yyq3428[0] = x.Kind != "" - yyq3428[1] = x.APIVersion != "" - yyq3428[2] = x.GracePeriodSeconds != nil - yyq3428[3] = x.Preconditions != nil - yyq3428[4] = x.OrphanDependents != nil - var yynn3428 int - if yyr3428 || yy2arr3428 { - r.EncodeArrayStart(5) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [6]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = x.GracePeriodSeconds != nil + yyq2[3] = x.Preconditions != nil + yyq2[4] = x.OrphanDependents != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(6) } else { - yynn3428 = 0 - for _, b := range yyq3428 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn3428++ + yynn2++ } } - r.EncodeMapStart(yynn3428) - yynn3428 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3428 || yy2arr3428 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3428[0] { - yym3430 := z.EncBinary() - _ = yym3430 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -43716,23 +52379,23 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3428[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3431 := z.EncBinary() - _ = yym3431 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3428 || yy2arr3428 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3428[1] { - yym3433 := z.EncBinary() - _ = yym3433 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -43741,56 +52404,56 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3428[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3434 := z.EncBinary() - _ = yym3434 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3428 || yy2arr3428 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3428[2] { + if yyq2[2] { if x.GracePeriodSeconds == nil { r.EncodeNil() } else { - yy3436 := *x.GracePeriodSeconds - yym3437 := z.EncBinary() - _ = yym3437 + yy10 := *x.GracePeriodSeconds + yym11 := z.EncBinary() + _ = yym11 if false { } else { - r.EncodeInt(int64(yy3436)) + r.EncodeInt(int64(yy10)) } } } else { r.EncodeNil() } } else { - if yyq3428[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("gracePeriodSeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.GracePeriodSeconds == nil { r.EncodeNil() } else { - yy3438 := *x.GracePeriodSeconds - yym3439 := z.EncBinary() - _ = yym3439 + yy12 := *x.GracePeriodSeconds + yym13 := z.EncBinary() + _ = yym13 if false { } else { - r.EncodeInt(int64(yy3438)) + r.EncodeInt(int64(yy12)) } } } } - if yyr3428 || yy2arr3428 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3428[3] { + if yyq2[3] { if x.Preconditions == nil { r.EncodeNil() } else { @@ -43800,7 +52463,7 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3428[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("preconditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -43811,42 +52474,61 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3428 || yy2arr3428 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3428[4] { + if yyq2[4] { if x.OrphanDependents == nil { r.EncodeNil() } else { - yy3442 := *x.OrphanDependents - yym3443 := z.EncBinary() - _ = yym3443 + yy18 := *x.OrphanDependents + yym19 := z.EncBinary() + _ = yym19 if false { } else { - r.EncodeBool(bool(yy3442)) + r.EncodeBool(bool(yy18)) } } } else { r.EncodeNil() } } else { - if yyq3428[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("orphanDependents")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.OrphanDependents == nil { r.EncodeNil() } else { - yy3444 := *x.OrphanDependents - yym3445 := z.EncBinary() - _ = yym3445 + yy20 := *x.OrphanDependents + yym21 := z.EncBinary() + _ = yym21 if false { } else { - r.EncodeBool(bool(yy3444)) + r.EncodeBool(bool(yy20)) } } } } - if yyr3428 || yy2arr3428 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.PropagationPolicy == nil { + r.EncodeNil() + } else { + yy23 := *x.PropagationPolicy + yy23.CodecEncodeSelf(e) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("PropagationPolicy")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.PropagationPolicy == nil { + r.EncodeNil() + } else { + yy25 := *x.PropagationPolicy + yy25.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -43859,25 +52541,25 @@ func (x *DeleteOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3446 := z.DecBinary() - _ = yym3446 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3447 := r.ContainerType() - if yyct3447 == codecSelferValueTypeMap1234 { - yyl3447 := r.ReadMapStart() - if yyl3447 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3447, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3447 == codecSelferValueTypeArray1234 { - yyl3447 := r.ReadArrayStart() - if yyl3447 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3447, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -43889,12 +52571,12 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3448Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3448Slc - var yyhl3448 bool = l >= 0 - for yyj3448 := 0; ; yyj3448++ { - if yyhl3448 { - if yyj3448 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -43903,21 +52585,33 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3448Slc = r.DecodeBytes(yys3448Slc, true, true) - yys3448 := string(yys3448Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3448 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "gracePeriodSeconds": if r.TryDecodeAsNil() { @@ -43928,8 +52622,8 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.GracePeriodSeconds == nil { x.GracePeriodSeconds = new(int64) } - yym3452 := z.DecBinary() - _ = yym3452 + yym9 := z.DecBinary() + _ = yym9 if false { } else { *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64)) @@ -43955,17 +52649,28 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.OrphanDependents == nil { x.OrphanDependents = new(bool) } - yym3455 := z.DecBinary() - _ = yym3455 + yym12 := z.DecBinary() + _ = yym12 if false { } else { *((*bool)(x.OrphanDependents)) = r.DecodeBool() } } + case "PropagationPolicy": + if r.TryDecodeAsNil() { + if x.PropagationPolicy != nil { + x.PropagationPolicy = nil + } + } else { + if x.PropagationPolicy == nil { + x.PropagationPolicy = new(DeletionPropagation) + } + x.PropagationPolicy.CodecDecodeSelf(d) + } default: - z.DecStructFieldNotFound(-1, yys3448) - } // end switch yys3448 - } // end for yyj3448 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -43973,16 +52678,16 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3456 int - var yyb3456 bool - var yyhl3456 bool = l >= 0 - yyj3456++ - if yyhl3456 { - yyb3456 = yyj3456 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb3456 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb3456 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43990,15 +52695,21 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj3456++ - if yyhl3456 { - yyb3456 = yyj3456 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb3456 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb3456 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44006,15 +52717,21 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } } - yyj3456++ - if yyhl3456 { - yyb3456 = yyj3456 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb3456 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb3456 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44027,20 +52744,20 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.GracePeriodSeconds == nil { x.GracePeriodSeconds = new(int64) } - yym3460 := z.DecBinary() - _ = yym3460 + yym20 := z.DecBinary() + _ = yym20 if false { } else { *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64)) } } - yyj3456++ - if yyhl3456 { - yyb3456 = yyj3456 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb3456 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb3456 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44055,13 +52772,13 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Preconditions.CodecDecodeSelf(d) } - yyj3456++ - if yyhl3456 { - yyb3456 = yyj3456 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb3456 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb3456 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44074,324 +52791,46 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.OrphanDependents == nil { x.OrphanDependents = new(bool) } - yym3463 := z.DecBinary() - _ = yym3463 + yym23 := z.DecBinary() + _ = yym23 if false { } else { *((*bool)(x.OrphanDependents)) = r.DecodeBool() } } - for { - yyj3456++ - if yyhl3456 { - yyb3456 = yyj3456 > l - } else { - yyb3456 = r.CheckBreak() + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.PropagationPolicy != nil { + x.PropagationPolicy = nil } - if yyb3456 { + } else { + if x.PropagationPolicy == nil { + x.PropagationPolicy = new(DeletionPropagation) + } + x.PropagationPolicy.CodecDecodeSelf(d) + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3456-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 { - yym3464 := z.EncBinary() - _ = yym3464 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep3465 := !z.EncBinary() - yy2arr3465 := z.EncBasicHandle().StructToArray - var yyq3465 [4]bool - _, _, _ = yysep3465, yyq3465, yy2arr3465 - const yyr3465 bool = false - yyq3465[0] = x.Kind != "" - yyq3465[1] = x.APIVersion != "" - var yynn3465 int - if yyr3465 || yy2arr3465 { - r.EncodeArrayStart(4) - } else { - yynn3465 = 2 - for _, b := range yyq3465 { - if b { - yynn3465++ - } - } - r.EncodeMapStart(yynn3465) - yynn3465 = 0 - } - if yyr3465 || yy2arr3465 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3465[0] { - yym3467 := z.EncBinary() - _ = yym3467 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3465[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3468 := z.EncBinary() - _ = yym3468 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } - if yyr3465 || yy2arr3465 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3465[1] { - yym3470 := z.EncBinary() - _ = yym3470 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq3465[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3471 := z.EncBinary() - _ = yym3471 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - } - if yyr3465 || yy2arr3465 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3473 := z.EncBinary() - _ = yym3473 - if false { - } else { - r.EncodeBool(bool(x.Export)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("export")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3474 := z.EncBinary() - _ = yym3474 - if false { - } else { - r.EncodeBool(bool(x.Export)) - } - } - if yyr3465 || yy2arr3465 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3476 := z.EncBinary() - _ = yym3476 - if false { - } else { - r.EncodeBool(bool(x.Exact)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("exact")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3477 := z.EncBinary() - _ = yym3477 - if false { - } else { - r.EncodeBool(bool(x.Exact)) - } - } - if yyr3465 || yy2arr3465 { - 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 - yym3478 := z.DecBinary() - _ = yym3478 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3479 := r.ContainerType() - if yyct3479 == codecSelferValueTypeMap1234 { - yyl3479 := r.ReadMapStart() - if yyl3479 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3479, d) - } - } else if yyct3479 == codecSelferValueTypeArray1234 { - yyl3479 := r.ReadArrayStart() - if yyl3479 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3479, 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 yys3480Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3480Slc - var yyhl3480 bool = l >= 0 - for yyj3480 := 0; ; yyj3480++ { - if yyhl3480 { - if yyj3480 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3480Slc = r.DecodeBytes(yys3480Slc, true, true) - yys3480 := string(yys3480Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3480 { - case "kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - case "apiVersion": - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - case "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()) - } - default: - z.DecStructFieldNotFound(-1, yys3480) - } // end switch yys3480 - } // end for yyj3480 - 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 yyj3485 int - var yyb3485 bool - var yyhl3485 bool = l >= 0 - yyj3485++ - if yyhl3485 { - yyb3485 = yyj3485 > l - } else { - yyb3485 = r.CheckBreak() - } - if yyb3485 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj3485++ - if yyhl3485 { - yyb3485 = yyj3485 > l - } else { - yyb3485 = r.CheckBreak() - } - if yyb3485 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj3485++ - if yyhl3485 { - yyb3485 = yyj3485 > l - } else { - yyb3485 = r.CheckBreak() - } - if yyb3485 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Export = false - } else { - x.Export = bool(r.DecodeBool()) - } - yyj3485++ - if yyhl3485 { - yyb3485 = yyj3485 > l - } else { - yyb3485 = r.CheckBreak() - } - if yyb3485 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Exact = false - } else { - x.Exact = bool(r.DecodeBool()) - } - for { - yyj3485++ - if yyhl3485 { - yyb3485 = yyj3485 > l - } else { - yyb3485 = r.CheckBreak() - } - if yyb3485 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3485-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -44403,36 +52842,41 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3490 := z.EncBinary() - _ = yym3490 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3491 := !z.EncBinary() - yy2arr3491 := z.EncBasicHandle().StructToArray - var yyq3491 [7]bool - _, _, _ = yysep3491, yyq3491, yy2arr3491 - const yyr3491 bool = false - yyq3491[0] = x.Kind != "" - yyq3491[1] = x.APIVersion != "" - var yynn3491 int - if yyr3491 || yy2arr3491 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [7]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = x.LabelSelector != "" + yyq2[3] = x.FieldSelector != "" + yyq2[4] = x.Watch != false + yyq2[5] = x.ResourceVersion != "" + yyq2[6] = x.TimeoutSeconds != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(7) } else { - yynn3491 = 5 - for _, b := range yyq3491 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3491++ + yynn2++ } } - r.EncodeMapStart(yynn3491) - yynn3491 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3491 || yy2arr3491 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3491[0] { - yym3493 := z.EncBinary() - _ = yym3493 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -44441,23 +52885,23 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3491[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3494 := z.EncBinary() - _ = yym3494 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3491 || yy2arr3491 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3491[1] { - yym3496 := z.EncBinary() - _ = yym3496 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -44466,144 +52910,154 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3491[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3497 := z.EncBinary() - _ = yym3497 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3491 || yy2arr3491 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.LabelSelector == nil { - r.EncodeNil() - } else { - yym3499 := z.EncBinary() - _ = yym3499 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { - } else if z.HasExtensions() && z.EncExt(x.LabelSelector) { } else { - z.EncFallback(x.LabelSelector) + r.EncodeString(codecSelferC_UTF81234, string(x.LabelSelector)) } + } else { + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("LabelSelector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.LabelSelector == nil { - r.EncodeNil() - } else { - yym3500 := z.EncBinary() - _ = yym3500 + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("labelSelector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(x.LabelSelector) { } else { - z.EncFallback(x.LabelSelector) + r.EncodeString(codecSelferC_UTF81234, string(x.LabelSelector)) } } } - if yyr3491 || yy2arr3491 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.FieldSelector == nil { - r.EncodeNil() - } else { - yym3502 := z.EncBinary() - _ = yym3502 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(x.FieldSelector) { } else { - z.EncFallback(x.FieldSelector) + r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector)) } + } else { + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("FieldSelector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.FieldSelector == nil { - r.EncodeNil() - } else { - yym3503 := z.EncBinary() - _ = yym3503 + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("fieldSelector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 if false { - } else if z.HasExtensions() && z.EncExt(x.FieldSelector) { } else { - z.EncFallback(x.FieldSelector) + r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector)) } } } - if yyr3491 || yy2arr3491 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3505 := z.EncBinary() - _ = yym3505 - if false { - } else { - r.EncodeBool(bool(x.Watch)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Watch")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3506 := z.EncBinary() - _ = yym3506 - if false { - } else { - r.EncodeBool(bool(x.Watch)) - } - } - if yyr3491 || yy2arr3491 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3508 := z.EncBinary() - _ = yym3508 - 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) - yym3509 := z.EncBinary() - _ = yym3509 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) - } - } - if yyr3491 || yy2arr3491 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.TimeoutSeconds == nil { - r.EncodeNil() - } else { - yy3511 := *x.TimeoutSeconds - yym3512 := z.EncBinary() - _ = yym3512 + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 if false { } else { - r.EncodeInt(int64(yy3511)) + r.EncodeBool(bool(x.Watch)) } + } else { + r.EncodeBool(false) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("TimeoutSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.TimeoutSeconds == nil { - r.EncodeNil() - } else { - yy3513 := *x.TimeoutSeconds - yym3514 := z.EncBinary() - _ = yym3514 + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("watch")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym17 := z.EncBinary() + _ = yym17 if false { } else { - r.EncodeInt(int64(yy3513)) + r.EncodeBool(bool(x.Watch)) } } } - if yyr3491 || yy2arr3491 { + 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] { + if x.TimeoutSeconds == nil { + r.EncodeNil() + } else { + yy22 := *x.TimeoutSeconds + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeInt(int64(yy22)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("timeoutSeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.TimeoutSeconds == nil { + r.EncodeNil() + } else { + yy24 := *x.TimeoutSeconds + yym25 := z.EncBinary() + _ = yym25 + if false { + } else { + r.EncodeInt(int64(yy24)) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -44616,25 +53070,25 @@ func (x *ListOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3515 := z.DecBinary() - _ = yym3515 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3516 := r.ContainerType() - if yyct3516 == codecSelferValueTypeMap1234 { - yyl3516 := r.ReadMapStart() - if yyl3516 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3516, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3516 == codecSelferValueTypeArray1234 { - yyl3516 := r.ReadArrayStart() - if yyl3516 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3516, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -44646,12 +53100,12 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3517Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3517Slc - var yyhl3517 bool = l >= 0 - for yyj3517 := 0; ; yyj3517++ { - if yyhl3517 { - if yyj3517 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -44660,61 +53114,83 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3517Slc = r.DecodeBytes(yys3517Slc, true, true) - yys3517 := string(yys3517Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3517 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) - } - case "LabelSelector": - if r.TryDecodeAsNil() { - x.LabelSelector = nil - } else { - yyv3520 := &x.LabelSelector - yym3521 := z.DecBinary() - _ = yym3521 + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 if false { - } else if z.HasExtensions() && z.DecExt(yyv3520) { } else { - z.DecFallback(yyv3520, true) + *((*string)(yyv6)) = r.DecodeString() } } - case "FieldSelector": + case "labelSelector": if r.TryDecodeAsNil() { - x.FieldSelector = nil + x.LabelSelector = "" } else { - yyv3522 := &x.FieldSelector - yym3523 := z.DecBinary() - _ = yym3523 + yyv8 := &x.LabelSelector + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv3522) { } else { - z.DecFallback(yyv3522, true) + *((*string)(yyv8)) = r.DecodeString() } } - case "Watch": + case "fieldSelector": + if r.TryDecodeAsNil() { + x.FieldSelector = "" + } else { + yyv10 := &x.FieldSelector + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + case "watch": if r.TryDecodeAsNil() { x.Watch = false } else { - x.Watch = bool(r.DecodeBool()) + yyv12 := &x.Watch + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*bool)(yyv12)) = r.DecodeBool() + } } - case "ResourceVersion": + case "resourceVersion": if r.TryDecodeAsNil() { x.ResourceVersion = "" } else { - x.ResourceVersion = string(r.DecodeString()) + yyv14 := &x.ResourceVersion + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - case "TimeoutSeconds": + case "timeoutSeconds": if r.TryDecodeAsNil() { if x.TimeoutSeconds != nil { x.TimeoutSeconds = nil @@ -44723,17 +53199,17 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.TimeoutSeconds == nil { x.TimeoutSeconds = new(int64) } - yym3527 := z.DecBinary() - _ = yym3527 + yym17 := z.DecBinary() + _ = yym17 if false { } else { *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys3517) - } // end switch yys3517 - } // end for yyj3517 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -44741,16 +53217,16 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3528 int - var yyb3528 bool - var yyhl3528 bool = l >= 0 - yyj3528++ - if yyhl3528 { - yyb3528 = yyj3528 > l + var yyj18 int + var yyb18 bool + var yyhl18 bool = l >= 0 + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3528 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3528 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44758,15 +53234,21 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv19 := &x.Kind + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } } - yyj3528++ - if yyhl3528 { - yyb3528 = yyj3528 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3528 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3528 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44774,61 +53256,65 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv21 := &x.APIVersion + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } } - yyj3528++ - if yyhl3528 { - yyb3528 = yyj3528 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3528 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3528 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.LabelSelector = nil + x.LabelSelector = "" } else { - yyv3531 := &x.LabelSelector - yym3532 := z.DecBinary() - _ = yym3532 + yyv23 := &x.LabelSelector + yym24 := z.DecBinary() + _ = yym24 if false { - } else if z.HasExtensions() && z.DecExt(yyv3531) { } else { - z.DecFallback(yyv3531, true) + *((*string)(yyv23)) = r.DecodeString() } } - yyj3528++ - if yyhl3528 { - yyb3528 = yyj3528 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3528 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3528 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.FieldSelector = nil + x.FieldSelector = "" } else { - yyv3533 := &x.FieldSelector - yym3534 := z.DecBinary() - _ = yym3534 + yyv25 := &x.FieldSelector + yym26 := z.DecBinary() + _ = yym26 if false { - } else if z.HasExtensions() && z.DecExt(yyv3533) { } else { - z.DecFallback(yyv3533, true) + *((*string)(yyv25)) = r.DecodeString() } } - yyj3528++ - if yyhl3528 { - yyb3528 = yyj3528 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3528 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3528 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44836,15 +53322,21 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Watch = false } else { - x.Watch = bool(r.DecodeBool()) + yyv27 := &x.Watch + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*bool)(yyv27)) = r.DecodeBool() + } } - yyj3528++ - if yyhl3528 { - yyb3528 = yyj3528 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3528 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3528 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44852,15 +53344,21 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ResourceVersion = "" } else { - x.ResourceVersion = string(r.DecodeString()) + yyv29 := &x.ResourceVersion + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*string)(yyv29)) = r.DecodeString() + } } - yyj3528++ - if yyhl3528 { - yyb3528 = yyj3528 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3528 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3528 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44873,25 +53371,25 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TimeoutSeconds == nil { x.TimeoutSeconds = new(int64) } - yym3538 := z.DecBinary() - _ = yym3538 + yym32 := z.DecBinary() + _ = yym32 if false { } else { *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64)) } } for { - yyj3528++ - if yyhl3528 { - yyb3528 = yyj3528 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3528 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3528 { + if yyb18 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3528-1, "") + z.DecStructFieldNotFound(yyj18-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -44903,36 +53401,44 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3539 := z.EncBinary() - _ = yym3539 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3540 := !z.EncBinary() - yy2arr3540 := z.EncBasicHandle().StructToArray - var yyq3540 [10]bool - _, _, _ = yysep3540, yyq3540, yy2arr3540 - const yyr3540 bool = false - yyq3540[0] = x.Kind != "" - yyq3540[1] = x.APIVersion != "" - var yynn3540 int - if yyr3540 || yy2arr3540 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [10]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = x.Container != "" + yyq2[3] = x.Follow != false + yyq2[4] = x.Previous != false + yyq2[5] = x.SinceSeconds != nil + yyq2[6] = x.SinceTime != nil + yyq2[7] = x.Timestamps != false + yyq2[8] = x.TailLines != nil + yyq2[9] = x.LimitBytes != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(10) } else { - yynn3540 = 8 - for _, b := range yyq3540 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3540++ + yynn2++ } } - r.EncodeMapStart(yynn3540) - yynn3540 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3540 || yy2arr3540 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3540[0] { - yym3542 := z.EncBinary() - _ = yym3542 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -44941,23 +53447,23 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3540[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3543 := z.EncBinary() - _ = yym3543 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3540 || yy2arr3540 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3540[1] { - yym3545 := z.EncBinary() - _ = yym3545 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -44966,219 +53472,267 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3540[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3546 := z.EncBinary() - _ = yym3546 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3540 || yy2arr3540 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3548 := z.EncBinary() - _ = yym3548 - 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) - yym3549 := z.EncBinary() - _ = yym3549 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Container)) - } - } - if yyr3540 || yy2arr3540 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3551 := z.EncBinary() - _ = yym3551 - if false { - } else { - r.EncodeBool(bool(x.Follow)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Follow")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3552 := z.EncBinary() - _ = yym3552 - if false { - } else { - r.EncodeBool(bool(x.Follow)) - } - } - if yyr3540 || yy2arr3540 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3554 := z.EncBinary() - _ = yym3554 - if false { - } else { - r.EncodeBool(bool(x.Previous)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Previous")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3555 := z.EncBinary() - _ = yym3555 - if false { - } else { - r.EncodeBool(bool(x.Previous)) - } - } - if yyr3540 || yy2arr3540 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.SinceSeconds == nil { - r.EncodeNil() - } else { - yy3557 := *x.SinceSeconds - yym3558 := z.EncBinary() - _ = yym3558 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { - r.EncodeInt(int64(yy3557)) + r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } + } else { + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("SinceSeconds")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.SinceSeconds == nil { - r.EncodeNil() - } else { - yy3559 := *x.SinceSeconds - yym3560 := z.EncBinary() - _ = yym3560 + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("container")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 if false { } else { - r.EncodeInt(int64(yy3559)) + r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } } } - if yyr3540 || yy2arr3540 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.SinceTime == nil { - r.EncodeNil() - } else { - yym3562 := z.EncBinary() - _ = yym3562 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(x.SinceTime) { - } else if yym3562 { - z.EncBinaryMarshal(x.SinceTime) - } else if !yym3562 && z.IsJSONHandle() { - z.EncJSONMarshal(x.SinceTime) } else { - z.EncFallback(x.SinceTime) + r.EncodeBool(bool(x.Follow)) } + } else { + r.EncodeBool(false) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("SinceTime")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.SinceTime == nil { - r.EncodeNil() - } else { - yym3563 := z.EncBinary() - _ = yym3563 + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("follow")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 if false { - } else if z.HasExtensions() && z.EncExt(x.SinceTime) { - } else if yym3563 { - z.EncBinaryMarshal(x.SinceTime) - } else if !yym3563 && z.IsJSONHandle() { - z.EncJSONMarshal(x.SinceTime) } else { - z.EncFallback(x.SinceTime) + r.EncodeBool(bool(x.Follow)) } } } - if yyr3540 || yy2arr3540 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3565 := z.EncBinary() - _ = yym3565 - if false { - } else { - r.EncodeBool(bool(x.Timestamps)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Timestamps")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3566 := z.EncBinary() - _ = yym3566 - if false { - } else { - r.EncodeBool(bool(x.Timestamps)) - } - } - if yyr3540 || yy2arr3540 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.TailLines == nil { - r.EncodeNil() - } else { - yy3568 := *x.TailLines - yym3569 := z.EncBinary() - _ = yym3569 + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 if false { } else { - r.EncodeInt(int64(yy3568)) + r.EncodeBool(bool(x.Previous)) } + } else { + r.EncodeBool(false) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("TailLines")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.TailLines == nil { - r.EncodeNil() - } else { - yy3570 := *x.TailLines - yym3571 := z.EncBinary() - _ = yym3571 + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("previous")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym17 := z.EncBinary() + _ = yym17 if false { } else { - r.EncodeInt(int64(yy3570)) + r.EncodeBool(bool(x.Previous)) } } } - if yyr3540 || yy2arr3540 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if x.LimitBytes == nil { - r.EncodeNil() - } else { - yy3573 := *x.LimitBytes - yym3574 := z.EncBinary() - _ = yym3574 - if false { + if yyq2[5] { + if x.SinceSeconds == nil { + r.EncodeNil() } else { - r.EncodeInt(int64(yy3573)) + yy19 := *x.SinceSeconds + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeInt(int64(yy19)) + } } + } else { + r.EncodeNil() } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("LimitBytes")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.LimitBytes == nil { - r.EncodeNil() - } else { - yy3575 := *x.LimitBytes - yym3576 := z.EncBinary() - _ = yym3576 - if false { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("sinceSeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SinceSeconds == nil { + r.EncodeNil() } else { - r.EncodeInt(int64(yy3575)) + yy21 := *x.SinceSeconds + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + r.EncodeInt(int64(yy21)) + } } } } - if yyr3540 || yy2arr3540 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[6] { + if x.SinceTime == nil { + r.EncodeNil() + } else { + yym24 := z.EncBinary() + _ = yym24 + if false { + } else if z.HasExtensions() && z.EncExt(x.SinceTime) { + } else if yym24 { + z.EncBinaryMarshal(x.SinceTime) + } else if !yym24 && z.IsJSONHandle() { + z.EncJSONMarshal(x.SinceTime) + } else { + z.EncFallback(x.SinceTime) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("sinceTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SinceTime == nil { + r.EncodeNil() + } else { + yym25 := z.EncBinary() + _ = yym25 + if false { + } else if z.HasExtensions() && z.EncExt(x.SinceTime) { + } else if yym25 { + z.EncBinaryMarshal(x.SinceTime) + } else if !yym25 && z.IsJSONHandle() { + z.EncJSONMarshal(x.SinceTime) + } else { + z.EncFallback(x.SinceTime) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[7] { + yym27 := z.EncBinary() + _ = yym27 + if false { + } else { + r.EncodeBool(bool(x.Timestamps)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[7] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("timestamps")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym28 := z.EncBinary() + _ = yym28 + if false { + } else { + r.EncodeBool(bool(x.Timestamps)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[8] { + if x.TailLines == nil { + r.EncodeNil() + } else { + yy30 := *x.TailLines + yym31 := z.EncBinary() + _ = yym31 + if false { + } else { + r.EncodeInt(int64(yy30)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[8] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("tailLines")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.TailLines == nil { + r.EncodeNil() + } else { + yy32 := *x.TailLines + yym33 := z.EncBinary() + _ = yym33 + if false { + } else { + r.EncodeInt(int64(yy32)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[9] { + if x.LimitBytes == nil { + r.EncodeNil() + } else { + yy35 := *x.LimitBytes + yym36 := z.EncBinary() + _ = yym36 + if false { + } else { + r.EncodeInt(int64(yy35)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[9] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("limitBytes")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.LimitBytes == nil { + r.EncodeNil() + } else { + yy37 := *x.LimitBytes + yym38 := z.EncBinary() + _ = yym38 + if false { + } else { + r.EncodeInt(int64(yy37)) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -45191,25 +53745,25 @@ func (x *PodLogOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3577 := z.DecBinary() - _ = yym3577 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3578 := r.ContainerType() - if yyct3578 == codecSelferValueTypeMap1234 { - yyl3578 := r.ReadMapStart() - if yyl3578 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3578, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3578 == codecSelferValueTypeArray1234 { - yyl3578 := r.ReadArrayStart() - if yyl3578 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3578, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -45221,12 +53775,12 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3579Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3579Slc - var yyhl3579 bool = l >= 0 - for yyj3579 := 0; ; yyj3579++ { - if yyhl3579 { - if yyj3579 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -45235,41 +53789,71 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3579Slc = r.DecodeBytes(yys3579Slc, true, true) - yys3579 := string(yys3579Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3579 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } - case "Container": + case "container": if r.TryDecodeAsNil() { x.Container = "" } else { - x.Container = string(r.DecodeString()) + yyv8 := &x.Container + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } - case "Follow": + case "follow": if r.TryDecodeAsNil() { x.Follow = false } else { - x.Follow = bool(r.DecodeBool()) + yyv10 := &x.Follow + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(yyv10)) = r.DecodeBool() + } } - case "Previous": + case "previous": if r.TryDecodeAsNil() { x.Previous = false } else { - x.Previous = bool(r.DecodeBool()) + yyv12 := &x.Previous + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*bool)(yyv12)) = r.DecodeBool() + } } - case "SinceSeconds": + case "sinceSeconds": if r.TryDecodeAsNil() { if x.SinceSeconds != nil { x.SinceSeconds = nil @@ -45278,41 +53862,47 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.SinceSeconds == nil { x.SinceSeconds = new(int64) } - yym3586 := z.DecBinary() - _ = yym3586 + yym15 := z.DecBinary() + _ = yym15 if false { } else { *((*int64)(x.SinceSeconds)) = int64(r.DecodeInt(64)) } } - case "SinceTime": + case "sinceTime": if r.TryDecodeAsNil() { if x.SinceTime != nil { x.SinceTime = nil } } else { if x.SinceTime == nil { - x.SinceTime = new(pkg2_unversioned.Time) + x.SinceTime = new(pkg2_v1.Time) } - yym3588 := z.DecBinary() - _ = yym3588 + yym17 := z.DecBinary() + _ = yym17 if false { } else if z.HasExtensions() && z.DecExt(x.SinceTime) { - } else if yym3588 { + } else if yym17 { z.DecBinaryUnmarshal(x.SinceTime) - } else if !yym3588 && z.IsJSONHandle() { + } else if !yym17 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.SinceTime) } else { z.DecFallback(x.SinceTime, false) } } - case "Timestamps": + case "timestamps": if r.TryDecodeAsNil() { x.Timestamps = false } else { - x.Timestamps = bool(r.DecodeBool()) + yyv18 := &x.Timestamps + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *((*bool)(yyv18)) = r.DecodeBool() + } } - case "TailLines": + case "tailLines": if r.TryDecodeAsNil() { if x.TailLines != nil { x.TailLines = nil @@ -45321,14 +53911,14 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.TailLines == nil { x.TailLines = new(int64) } - yym3591 := z.DecBinary() - _ = yym3591 + yym21 := z.DecBinary() + _ = yym21 if false { } else { *((*int64)(x.TailLines)) = int64(r.DecodeInt(64)) } } - case "LimitBytes": + case "limitBytes": if r.TryDecodeAsNil() { if x.LimitBytes != nil { x.LimitBytes = nil @@ -45337,17 +53927,17 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.LimitBytes == nil { x.LimitBytes = new(int64) } - yym3593 := z.DecBinary() - _ = yym3593 + yym23 := z.DecBinary() + _ = yym23 if false { } else { *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys3579) - } // end switch yys3579 - } // end for yyj3579 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -45355,16 +53945,16 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3594 int - var yyb3594 bool - var yyhl3594 bool = l >= 0 - yyj3594++ - if yyhl3594 { - yyb3594 = yyj3594 > l + var yyj24 int + var yyb24 bool + var yyhl24 bool = l >= 0 + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3594 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3594 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45372,15 +53962,21 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv25 := &x.Kind + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*string)(yyv25)) = r.DecodeString() + } } - yyj3594++ - if yyhl3594 { - yyb3594 = yyj3594 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3594 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3594 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45388,15 +53984,21 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv27 := &x.APIVersion + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*string)(yyv27)) = r.DecodeString() + } } - yyj3594++ - if yyhl3594 { - yyb3594 = yyj3594 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3594 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3594 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45404,15 +54006,21 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Container = "" } else { - x.Container = string(r.DecodeString()) + yyv29 := &x.Container + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*string)(yyv29)) = r.DecodeString() + } } - yyj3594++ - if yyhl3594 { - yyb3594 = yyj3594 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3594 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3594 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45420,15 +54028,21 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Follow = false } else { - x.Follow = bool(r.DecodeBool()) + yyv31 := &x.Follow + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + *((*bool)(yyv31)) = r.DecodeBool() + } } - yyj3594++ - if yyhl3594 { - yyb3594 = yyj3594 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3594 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3594 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45436,15 +54050,21 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Previous = false } else { - x.Previous = bool(r.DecodeBool()) + yyv33 := &x.Previous + yym34 := z.DecBinary() + _ = yym34 + if false { + } else { + *((*bool)(yyv33)) = r.DecodeBool() + } } - yyj3594++ - if yyhl3594 { - yyb3594 = yyj3594 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3594 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3594 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45457,20 +54077,20 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.SinceSeconds == nil { x.SinceSeconds = new(int64) } - yym3601 := z.DecBinary() - _ = yym3601 + yym36 := z.DecBinary() + _ = yym36 if false { } else { *((*int64)(x.SinceSeconds)) = int64(r.DecodeInt(64)) } } - yyj3594++ - if yyhl3594 { - yyb3594 = yyj3594 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3594 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3594 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45481,27 +54101,27 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } } else { if x.SinceTime == nil { - x.SinceTime = new(pkg2_unversioned.Time) + x.SinceTime = new(pkg2_v1.Time) } - yym3603 := z.DecBinary() - _ = yym3603 + yym38 := z.DecBinary() + _ = yym38 if false { } else if z.HasExtensions() && z.DecExt(x.SinceTime) { - } else if yym3603 { + } else if yym38 { z.DecBinaryUnmarshal(x.SinceTime) - } else if !yym3603 && z.IsJSONHandle() { + } else if !yym38 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.SinceTime) } else { z.DecFallback(x.SinceTime, false) } } - yyj3594++ - if yyhl3594 { - yyb3594 = yyj3594 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3594 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3594 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45509,15 +54129,21 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Timestamps = false } else { - x.Timestamps = bool(r.DecodeBool()) + yyv39 := &x.Timestamps + yym40 := z.DecBinary() + _ = yym40 + if false { + } else { + *((*bool)(yyv39)) = r.DecodeBool() + } } - yyj3594++ - if yyhl3594 { - yyb3594 = yyj3594 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3594 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3594 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45530,20 +54156,20 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TailLines == nil { x.TailLines = new(int64) } - yym3606 := z.DecBinary() - _ = yym3606 + yym42 := z.DecBinary() + _ = yym42 if false { } else { *((*int64)(x.TailLines)) = int64(r.DecodeInt(64)) } } - yyj3594++ - if yyhl3594 { - yyb3594 = yyj3594 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3594 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3594 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45556,25 +54182,25 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.LimitBytes == nil { x.LimitBytes = new(int64) } - yym3608 := z.DecBinary() - _ = yym3608 + yym44 := z.DecBinary() + _ = yym44 if false { } else { *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64)) } } for { - yyj3594++ - if yyhl3594 { - yyb3594 = yyj3594 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3594 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3594 { + if yyb24 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3594-1, "") + z.DecStructFieldNotFound(yyj24-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45586,41 +54212,41 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3609 := z.EncBinary() - _ = yym3609 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3610 := !z.EncBinary() - yy2arr3610 := z.EncBasicHandle().StructToArray - var yyq3610 [7]bool - _, _, _ = yysep3610, yyq3610, yy2arr3610 - const yyr3610 bool = false - yyq3610[0] = x.Kind != "" - yyq3610[1] = x.APIVersion != "" - yyq3610[2] = x.Stdin != false - yyq3610[3] = x.Stdout != false - yyq3610[4] = x.Stderr != false - yyq3610[5] = x.TTY != false - yyq3610[6] = x.Container != "" - var yynn3610 int - if yyr3610 || yy2arr3610 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [7]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = x.Stdin != false + yyq2[3] = x.Stdout != false + yyq2[4] = x.Stderr != false + yyq2[5] = x.TTY != false + yyq2[6] = x.Container != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(7) } else { - yynn3610 = 0 - for _, b := range yyq3610 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3610++ + yynn2++ } } - r.EncodeMapStart(yynn3610) - yynn3610 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3610 || yy2arr3610 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3610[0] { - yym3612 := z.EncBinary() - _ = yym3612 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -45629,23 +54255,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3610[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3613 := z.EncBinary() - _ = yym3613 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3610 || yy2arr3610 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3610[1] { - yym3615 := z.EncBinary() - _ = yym3615 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -45654,23 +54280,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3610[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3616 := z.EncBinary() - _ = yym3616 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3610 || yy2arr3610 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3610[2] { - yym3618 := z.EncBinary() - _ = yym3618 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeBool(bool(x.Stdin)) @@ -45679,23 +54305,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3610[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdin")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3619 := z.EncBinary() - _ = yym3619 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeBool(bool(x.Stdin)) } } } - if yyr3610 || yy2arr3610 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3610[3] { - yym3621 := z.EncBinary() - _ = yym3621 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeBool(bool(x.Stdout)) @@ -45704,23 +54330,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3610[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdout")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3622 := z.EncBinary() - _ = yym3622 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeBool(bool(x.Stdout)) } } } - if yyr3610 || yy2arr3610 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3610[4] { - yym3624 := z.EncBinary() - _ = yym3624 + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeBool(bool(x.Stderr)) @@ -45729,23 +54355,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3610[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stderr")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3625 := z.EncBinary() - _ = yym3625 + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeBool(bool(x.Stderr)) } } } - if yyr3610 || yy2arr3610 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3610[5] { - yym3627 := z.EncBinary() - _ = yym3627 + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 if false { } else { r.EncodeBool(bool(x.TTY)) @@ -45754,23 +54380,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3610[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("tty")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3628 := z.EncBinary() - _ = yym3628 + yym20 := z.EncBinary() + _ = yym20 if false { } else { r.EncodeBool(bool(x.TTY)) } } } - if yyr3610 || yy2arr3610 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3610[6] { - yym3630 := z.EncBinary() - _ = yym3630 + if yyq2[6] { + yym22 := z.EncBinary() + _ = yym22 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) @@ -45779,19 +54405,19 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3610[6] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("container")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3631 := z.EncBinary() - _ = yym3631 + yym23 := z.EncBinary() + _ = yym23 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } } } - if yyr3610 || yy2arr3610 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -45804,25 +54430,25 @@ func (x *PodAttachOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3632 := z.DecBinary() - _ = yym3632 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3633 := r.ContainerType() - if yyct3633 == codecSelferValueTypeMap1234 { - yyl3633 := r.ReadMapStart() - if yyl3633 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3633, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3633 == codecSelferValueTypeArray1234 { - yyl3633 := r.ReadArrayStart() - if yyl3633 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3633, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -45834,12 +54460,12 @@ func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3634Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3634Slc - var yyhl3634 bool = l >= 0 - for yyj3634 := 0; ; yyj3634++ { - if yyhl3634 { - if yyj3634 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -45848,56 +54474,98 @@ func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3634Slc = r.DecodeBytes(yys3634Slc, true, true) - yys3634 := string(yys3634Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3634 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "stdin": if r.TryDecodeAsNil() { x.Stdin = false } else { - x.Stdin = bool(r.DecodeBool()) + yyv8 := &x.Stdin + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(yyv8)) = r.DecodeBool() + } } case "stdout": if r.TryDecodeAsNil() { x.Stdout = false } else { - x.Stdout = bool(r.DecodeBool()) + yyv10 := &x.Stdout + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(yyv10)) = r.DecodeBool() + } } case "stderr": if r.TryDecodeAsNil() { x.Stderr = false } else { - x.Stderr = bool(r.DecodeBool()) + yyv12 := &x.Stderr + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*bool)(yyv12)) = r.DecodeBool() + } } case "tty": if r.TryDecodeAsNil() { x.TTY = false } else { - x.TTY = bool(r.DecodeBool()) + yyv14 := &x.TTY + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*bool)(yyv14)) = r.DecodeBool() + } } case "container": if r.TryDecodeAsNil() { x.Container = "" } else { - x.Container = string(r.DecodeString()) + yyv16 := &x.Container + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys3634) - } // end switch yys3634 - } // end for yyj3634 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -45905,16 +54573,16 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3642 int - var yyb3642 bool - var yyhl3642 bool = l >= 0 - yyj3642++ - if yyhl3642 { - yyb3642 = yyj3642 > l + var yyj18 int + var yyb18 bool + var yyhl18 bool = l >= 0 + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3642 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3642 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45922,15 +54590,21 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv19 := &x.Kind + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } } - yyj3642++ - if yyhl3642 { - yyb3642 = yyj3642 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3642 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3642 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45938,15 +54612,21 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv21 := &x.APIVersion + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } } - yyj3642++ - if yyhl3642 { - yyb3642 = yyj3642 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3642 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3642 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45954,15 +54634,21 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Stdin = false } else { - x.Stdin = bool(r.DecodeBool()) + yyv23 := &x.Stdin + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*bool)(yyv23)) = r.DecodeBool() + } } - yyj3642++ - if yyhl3642 { - yyb3642 = yyj3642 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3642 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3642 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45970,15 +54656,21 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Stdout = false } else { - x.Stdout = bool(r.DecodeBool()) + yyv25 := &x.Stdout + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*bool)(yyv25)) = r.DecodeBool() + } } - yyj3642++ - if yyhl3642 { - yyb3642 = yyj3642 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3642 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3642 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45986,15 +54678,21 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Stderr = false } else { - x.Stderr = bool(r.DecodeBool()) + yyv27 := &x.Stderr + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*bool)(yyv27)) = r.DecodeBool() + } } - yyj3642++ - if yyhl3642 { - yyb3642 = yyj3642 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3642 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3642 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46002,15 +54700,21 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.TTY = false } else { - x.TTY = bool(r.DecodeBool()) + yyv29 := &x.TTY + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*bool)(yyv29)) = r.DecodeBool() + } } - yyj3642++ - if yyhl3642 { - yyb3642 = yyj3642 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3642 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3642 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46018,20 +54722,26 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Container = "" } else { - x.Container = string(r.DecodeString()) + yyv31 := &x.Container + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + *((*string)(yyv31)) = r.DecodeString() + } } for { - yyj3642++ - if yyhl3642 { - yyb3642 = yyj3642 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3642 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3642 { + if yyb18 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3642-1, "") + z.DecStructFieldNotFound(yyj18-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46043,36 +54753,41 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3650 := z.EncBinary() - _ = yym3650 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3651 := !z.EncBinary() - yy2arr3651 := z.EncBasicHandle().StructToArray - var yyq3651 [8]bool - _, _, _ = yysep3651, yyq3651, yy2arr3651 - const yyr3651 bool = false - yyq3651[0] = x.Kind != "" - yyq3651[1] = x.APIVersion != "" - var yynn3651 int - if yyr3651 || yy2arr3651 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [8]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = x.Stdin != false + yyq2[3] = x.Stdout != false + yyq2[4] = x.Stderr != false + yyq2[5] = x.TTY != false + yyq2[6] = x.Container != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(8) } else { - yynn3651 = 6 - for _, b := range yyq3651 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn3651++ + yynn2++ } } - r.EncodeMapStart(yynn3651) - yynn3651 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3651 || yy2arr3651 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3651[0] { - yym3653 := z.EncBinary() - _ = yym3653 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -46081,23 +54796,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3651[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3654 := z.EncBinary() - _ = yym3654 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3651 || yy2arr3651 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3651[1] { - yym3656 := z.EncBinary() - _ = yym3656 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -46106,120 +54821,150 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3651[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3657 := z.EncBinary() - _ = yym3657 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3651 || yy2arr3651 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3659 := z.EncBinary() - _ = yym3659 - if false { + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeBool(bool(x.Stdin)) + } } else { - r.EncodeBool(bool(x.Stdin)) + r.EncodeBool(false) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Stdin")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3660 := z.EncBinary() - _ = yym3660 - if false { - } else { - r.EncodeBool(bool(x.Stdin)) + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("stdin")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeBool(bool(x.Stdin)) + } } } - if yyr3651 || yy2arr3651 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3662 := z.EncBinary() - _ = yym3662 - if false { + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeBool(bool(x.Stdout)) + } } else { - r.EncodeBool(bool(x.Stdout)) + r.EncodeBool(false) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Stdout")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3663 := z.EncBinary() - _ = yym3663 - if false { - } else { - r.EncodeBool(bool(x.Stdout)) + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("stdout")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeBool(bool(x.Stdout)) + } } } - if yyr3651 || yy2arr3651 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3665 := z.EncBinary() - _ = yym3665 - if false { + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeBool(bool(x.Stderr)) + } } else { - r.EncodeBool(bool(x.Stderr)) + r.EncodeBool(false) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Stderr")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3666 := z.EncBinary() - _ = yym3666 - if false { - } else { - r.EncodeBool(bool(x.Stderr)) + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("stderr")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeBool(bool(x.Stderr)) + } } } - if yyr3651 || yy2arr3651 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3668 := z.EncBinary() - _ = yym3668 - if false { + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeBool(bool(x.TTY)) + } } else { - r.EncodeBool(bool(x.TTY)) + r.EncodeBool(false) } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("TTY")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3669 := z.EncBinary() - _ = yym3669 - if false { - } else { - r.EncodeBool(bool(x.TTY)) + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("tty")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeBool(bool(x.TTY)) + } } } - if yyr3651 || yy2arr3651 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3671 := z.EncBinary() - _ = yym3671 - if false { + if yyq2[6] { + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Container)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Container)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Container")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3672 := z.EncBinary() - _ = yym3672 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Container)) + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("container")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Container)) + } } } - if yyr3651 || yy2arr3651 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Command == nil { r.EncodeNil() } else { - yym3674 := z.EncBinary() - _ = yym3674 + yym25 := z.EncBinary() + _ = yym25 if false { } else { z.F.EncSliceStringV(x.Command, false, e) @@ -46227,20 +54972,20 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Command")) + r.EncodeString(codecSelferC_UTF81234, string("command")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Command == nil { r.EncodeNil() } else { - yym3675 := z.EncBinary() - _ = yym3675 + yym26 := z.EncBinary() + _ = yym26 if false { } else { z.F.EncSliceStringV(x.Command, false, e) } } } - if yyr3651 || yy2arr3651 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -46253,25 +54998,25 @@ func (x *PodExecOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3676 := z.DecBinary() - _ = yym3676 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3677 := r.ContainerType() - if yyct3677 == codecSelferValueTypeMap1234 { - yyl3677 := r.ReadMapStart() - if yyl3677 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3677, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3677 == codecSelferValueTypeArray1234 { - yyl3677 := r.ReadArrayStart() - if yyl3677 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3677, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -46283,12 +55028,12 @@ func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3678Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3678Slc - var yyhl3678 bool = l >= 0 - for yyj3678 := 0; ; yyj3678++ { - if yyhl3678 { - if yyj3678 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -46297,68 +55042,110 @@ func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3678Slc = r.DecodeBytes(yys3678Slc, true, true) - yys3678 := string(yys3678Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3678 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } - case "Stdin": + case "stdin": if r.TryDecodeAsNil() { x.Stdin = false } else { - x.Stdin = bool(r.DecodeBool()) + yyv8 := &x.Stdin + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(yyv8)) = r.DecodeBool() + } } - case "Stdout": + case "stdout": if r.TryDecodeAsNil() { x.Stdout = false } else { - x.Stdout = bool(r.DecodeBool()) + yyv10 := &x.Stdout + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(yyv10)) = r.DecodeBool() + } } - case "Stderr": + case "stderr": if r.TryDecodeAsNil() { x.Stderr = false } else { - x.Stderr = bool(r.DecodeBool()) + yyv12 := &x.Stderr + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*bool)(yyv12)) = r.DecodeBool() + } } - case "TTY": + case "tty": if r.TryDecodeAsNil() { x.TTY = false } else { - x.TTY = bool(r.DecodeBool()) + yyv14 := &x.TTY + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*bool)(yyv14)) = r.DecodeBool() + } } - case "Container": + case "container": if r.TryDecodeAsNil() { x.Container = "" } else { - x.Container = string(r.DecodeString()) + yyv16 := &x.Container + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } - case "Command": + case "command": if r.TryDecodeAsNil() { x.Command = nil } else { - yyv3686 := &x.Command - yym3687 := z.DecBinary() - _ = yym3687 + yyv18 := &x.Command + yym19 := z.DecBinary() + _ = yym19 if false { } else { - z.F.DecSliceStringX(yyv3686, false, d) + z.F.DecSliceStringX(yyv18, false, d) } } default: - z.DecStructFieldNotFound(-1, yys3678) - } // end switch yys3678 - } // end for yyj3678 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -46366,16 +55153,16 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3688 int - var yyb3688 bool - var yyhl3688 bool = l >= 0 - yyj3688++ - if yyhl3688 { - yyb3688 = yyj3688 > l + var yyj20 int + var yyb20 bool + var yyhl20 bool = l >= 0 + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l } else { - yyb3688 = r.CheckBreak() + yyb20 = r.CheckBreak() } - if yyb3688 { + if yyb20 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46383,15 +55170,21 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv21 := &x.Kind + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } } - yyj3688++ - if yyhl3688 { - yyb3688 = yyj3688 > l + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l } else { - yyb3688 = r.CheckBreak() + yyb20 = r.CheckBreak() } - if yyb3688 { + if yyb20 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46399,15 +55192,21 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv23 := &x.APIVersion + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*string)(yyv23)) = r.DecodeString() + } } - yyj3688++ - if yyhl3688 { - yyb3688 = yyj3688 > l + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l } else { - yyb3688 = r.CheckBreak() + yyb20 = r.CheckBreak() } - if yyb3688 { + if yyb20 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46415,15 +55214,21 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Stdin = false } else { - x.Stdin = bool(r.DecodeBool()) + yyv25 := &x.Stdin + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*bool)(yyv25)) = r.DecodeBool() + } } - yyj3688++ - if yyhl3688 { - yyb3688 = yyj3688 > l + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l } else { - yyb3688 = r.CheckBreak() + yyb20 = r.CheckBreak() } - if yyb3688 { + if yyb20 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46431,15 +55236,21 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Stdout = false } else { - x.Stdout = bool(r.DecodeBool()) + yyv27 := &x.Stdout + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*bool)(yyv27)) = r.DecodeBool() + } } - yyj3688++ - if yyhl3688 { - yyb3688 = yyj3688 > l + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l } else { - yyb3688 = r.CheckBreak() + yyb20 = r.CheckBreak() } - if yyb3688 { + if yyb20 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46447,15 +55258,21 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Stderr = false } else { - x.Stderr = bool(r.DecodeBool()) + yyv29 := &x.Stderr + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*bool)(yyv29)) = r.DecodeBool() + } } - yyj3688++ - if yyhl3688 { - yyb3688 = yyj3688 > l + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l } else { - yyb3688 = r.CheckBreak() + yyb20 = r.CheckBreak() } - if yyb3688 { + if yyb20 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46463,15 +55280,21 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.TTY = false } else { - x.TTY = bool(r.DecodeBool()) + yyv31 := &x.TTY + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + *((*bool)(yyv31)) = r.DecodeBool() + } } - yyj3688++ - if yyhl3688 { - yyb3688 = yyj3688 > l + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l } else { - yyb3688 = r.CheckBreak() + yyb20 = r.CheckBreak() } - if yyb3688 { + if yyb20 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46479,15 +55302,21 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Container = "" } else { - x.Container = string(r.DecodeString()) + yyv33 := &x.Container + yym34 := z.DecBinary() + _ = yym34 + if false { + } else { + *((*string)(yyv33)) = r.DecodeString() + } } - yyj3688++ - if yyhl3688 { - yyb3688 = yyj3688 > l + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l } else { - yyb3688 = r.CheckBreak() + yyb20 = r.CheckBreak() } - if yyb3688 { + if yyb20 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46495,26 +55324,335 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Command = nil } else { - yyv3696 := &x.Command - yym3697 := z.DecBinary() - _ = yym3697 + yyv35 := &x.Command + yym36 := z.DecBinary() + _ = yym36 if false { } else { - z.F.DecSliceStringX(yyv3696, false, d) + z.F.DecSliceStringX(yyv35, false, d) } } for { - yyj3688++ - if yyhl3688 { - yyb3688 = yyj3688 > l + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l } else { - yyb3688 = r.CheckBreak() + yyb20 = r.CheckBreak() } - if yyb3688 { + if yyb20 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3688-1, "") + z.DecStructFieldNotFound(yyj20-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PodPortForwardOptions) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = len(x.Ports) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Ports == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + z.F.EncSliceInt32V(x.Ports, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("ports")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Ports == nil { + r.EncodeNil() + } else { + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + z.F.EncSliceInt32V(x.Ports, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PodPortForwardOptions) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PodPortForwardOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "ports": + if r.TryDecodeAsNil() { + x.Ports = nil + } else { + yyv8 := &x.Ports + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + z.F.DecSliceInt32X(yyv8, false, d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PodPortForwardOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv11 := &x.Kind + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv13 := &x.APIVersion + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Ports = nil + } else { + yyv15 := &x.Ports + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + z.F.DecSliceInt32X(yyv15, false, d) + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46526,36 +55664,37 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3698 := z.EncBinary() - _ = yym3698 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3699 := !z.EncBinary() - yy2arr3699 := z.EncBasicHandle().StructToArray - var yyq3699 [3]bool - _, _, _ = yysep3699, yyq3699, yy2arr3699 - const yyr3699 bool = false - yyq3699[0] = x.Kind != "" - yyq3699[1] = x.APIVersion != "" - var yynn3699 int - if yyr3699 || yy2arr3699 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = x.Path != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(3) } else { - yynn3699 = 1 - for _, b := range yyq3699 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3699++ + yynn2++ } } - r.EncodeMapStart(yynn3699) - yynn3699 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3699 || yy2arr3699 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3699[0] { - yym3701 := z.EncBinary() - _ = yym3701 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -46564,23 +55703,23 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3699[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3702 := z.EncBinary() - _ = yym3702 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3699 || yy2arr3699 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3699[1] { - yym3704 := z.EncBinary() - _ = yym3704 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -46589,38 +55728,44 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3699[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3705 := z.EncBinary() - _ = yym3705 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3699 || yy2arr3699 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3707 := z.EncBinary() - _ = yym3707 - if false { + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Path")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3708 := z.EncBinary() - _ = yym3708 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("path")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } } } - if yyr3699 || yy2arr3699 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -46633,25 +55778,25 @@ func (x *PodProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3709 := z.DecBinary() - _ = yym3709 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3710 := r.ContainerType() - if yyct3710 == codecSelferValueTypeMap1234 { - yyl3710 := r.ReadMapStart() - if yyl3710 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3710, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3710 == codecSelferValueTypeArray1234 { - yyl3710 := r.ReadArrayStart() - if yyl3710 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3710, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -46663,12 +55808,12 @@ func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3711Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3711Slc - var yyhl3711 bool = l >= 0 - for yyj3711 := 0; ; yyj3711++ { - if yyhl3711 { - if yyj3711 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -46677,32 +55822,50 @@ func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3711Slc = r.DecodeBytes(yys3711Slc, true, true) - yys3711 := string(yys3711Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3711 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } - case "Path": + case "path": if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv8 := &x.Path + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys3711) - } // end switch yys3711 - } // end for yyj3711 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -46710,16 +55873,16 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3715 int - var yyb3715 bool - var yyhl3715 bool = l >= 0 - yyj3715++ - if yyhl3715 { - yyb3715 = yyj3715 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb3715 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb3715 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46727,15 +55890,21 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv11 := &x.Kind + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } - yyj3715++ - if yyhl3715 { - yyb3715 = yyj3715 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb3715 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb3715 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46743,15 +55912,21 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv13 := &x.APIVersion + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj3715++ - if yyhl3715 { - yyb3715 = yyj3715 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb3715 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb3715 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46759,20 +55934,26 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv15 := &x.Path + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } for { - yyj3715++ - if yyhl3715 { - yyb3715 = yyj3715 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb3715 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb3715 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3715-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46784,36 +55965,37 @@ func (x *NodeProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3719 := z.EncBinary() - _ = yym3719 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3720 := !z.EncBinary() - yy2arr3720 := z.EncBasicHandle().StructToArray - var yyq3720 [3]bool - _, _, _ = yysep3720, yyq3720, yy2arr3720 - const yyr3720 bool = false - yyq3720[0] = x.Kind != "" - yyq3720[1] = x.APIVersion != "" - var yynn3720 int - if yyr3720 || yy2arr3720 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = x.Path != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(3) } else { - yynn3720 = 1 - for _, b := range yyq3720 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3720++ + yynn2++ } } - r.EncodeMapStart(yynn3720) - yynn3720 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3720 || yy2arr3720 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3720[0] { - yym3722 := z.EncBinary() - _ = yym3722 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -46822,23 +56004,23 @@ func (x *NodeProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3720[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3723 := z.EncBinary() - _ = yym3723 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3720 || yy2arr3720 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3720[1] { - yym3725 := z.EncBinary() - _ = yym3725 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -46847,38 +56029,44 @@ func (x *NodeProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3720[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3726 := z.EncBinary() - _ = yym3726 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3720 || yy2arr3720 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3728 := z.EncBinary() - _ = yym3728 - if false { + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Path")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3729 := z.EncBinary() - _ = yym3729 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("path")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } } } - if yyr3720 || yy2arr3720 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -46891,25 +56079,25 @@ func (x *NodeProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3730 := z.DecBinary() - _ = yym3730 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3731 := r.ContainerType() - if yyct3731 == codecSelferValueTypeMap1234 { - yyl3731 := r.ReadMapStart() - if yyl3731 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3731, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3731 == codecSelferValueTypeArray1234 { - yyl3731 := r.ReadArrayStart() - if yyl3731 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3731, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -46921,12 +56109,12 @@ func (x *NodeProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3732Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3732Slc - var yyhl3732 bool = l >= 0 - for yyj3732 := 0; ; yyj3732++ { - if yyhl3732 { - if yyj3732 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -46935,32 +56123,50 @@ func (x *NodeProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3732Slc = r.DecodeBytes(yys3732Slc, true, true) - yys3732 := string(yys3732Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3732 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } - case "Path": + case "path": if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv8 := &x.Path + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys3732) - } // end switch yys3732 - } // end for yyj3732 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -46968,16 +56174,16 @@ func (x *NodeProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3736 int - var yyb3736 bool - var yyhl3736 bool = l >= 0 - yyj3736++ - if yyhl3736 { - yyb3736 = yyj3736 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb3736 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb3736 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46985,15 +56191,21 @@ func (x *NodeProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv11 := &x.Kind + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } - yyj3736++ - if yyhl3736 { - yyb3736 = yyj3736 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb3736 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb3736 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47001,15 +56213,21 @@ func (x *NodeProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv13 := &x.APIVersion + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj3736++ - if yyhl3736 { - yyb3736 = yyj3736 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb3736 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb3736 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47017,20 +56235,26 @@ func (x *NodeProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv15 := &x.Path + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } for { - yyj3736++ - if yyhl3736 { - yyb3736 = yyj3736 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb3736 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb3736 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3736-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -47042,36 +56266,37 @@ func (x *ServiceProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3740 := z.EncBinary() - _ = yym3740 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3741 := !z.EncBinary() - yy2arr3741 := z.EncBasicHandle().StructToArray - var yyq3741 [3]bool - _, _, _ = yysep3741, yyq3741, yy2arr3741 - const yyr3741 bool = false - yyq3741[0] = x.Kind != "" - yyq3741[1] = x.APIVersion != "" - var yynn3741 int - if yyr3741 || yy2arr3741 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = x.Path != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(3) } else { - yynn3741 = 1 - for _, b := range yyq3741 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3741++ + yynn2++ } } - r.EncodeMapStart(yynn3741) - yynn3741 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3741 || yy2arr3741 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3741[0] { - yym3743 := z.EncBinary() - _ = yym3743 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -47080,23 +56305,23 @@ func (x *ServiceProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3741[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3744 := z.EncBinary() - _ = yym3744 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3741 || yy2arr3741 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3741[1] { - yym3746 := z.EncBinary() - _ = yym3746 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -47105,38 +56330,44 @@ func (x *ServiceProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3741[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3747 := z.EncBinary() - _ = yym3747 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3741 || yy2arr3741 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3749 := z.EncBinary() - _ = yym3749 - if false { + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Path")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3750 := z.EncBinary() - _ = yym3750 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("path")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } } } - if yyr3741 || yy2arr3741 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -47149,25 +56380,25 @@ func (x *ServiceProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3751 := z.DecBinary() - _ = yym3751 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3752 := r.ContainerType() - if yyct3752 == codecSelferValueTypeMap1234 { - yyl3752 := r.ReadMapStart() - if yyl3752 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3752, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3752 == codecSelferValueTypeArray1234 { - yyl3752 := r.ReadArrayStart() - if yyl3752 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3752, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -47179,12 +56410,12 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3753Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3753Slc - var yyhl3753 bool = l >= 0 - for yyj3753 := 0; ; yyj3753++ { - if yyhl3753 { - if yyj3753 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -47193,32 +56424,50 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3753Slc = r.DecodeBytes(yys3753Slc, true, true) - yys3753 := string(yys3753Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3753 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } - case "Path": + case "path": if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv8 := &x.Path + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys3753) - } // end switch yys3753 - } // end for yyj3753 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -47226,16 +56475,16 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3757 int - var yyb3757 bool - var yyhl3757 bool = l >= 0 - yyj3757++ - if yyhl3757 { - yyb3757 = yyj3757 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb3757 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb3757 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47243,15 +56492,21 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv11 := &x.Kind + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } - yyj3757++ - if yyhl3757 { - yyb3757 = yyj3757 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb3757 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb3757 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47259,15 +56514,21 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv13 := &x.APIVersion + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj3757++ - if yyhl3757 { - yyb3757 = yyj3757 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb3757 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb3757 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47275,385 +56536,26 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) - } - for { - yyj3757++ - if yyhl3757 { - yyb3757 = yyj3757 > l - } else { - yyb3757 = r.CheckBreak() - } - if yyb3757 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3757-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 { - yym3761 := z.EncBinary() - _ = yym3761 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep3762 := !z.EncBinary() - yy2arr3762 := z.EncBasicHandle().StructToArray - var yyq3762 [5]bool - _, _, _ = yysep3762, yyq3762, yy2arr3762 - const yyr3762 bool = false - yyq3762[4] = x.Controller != nil - var yynn3762 int - if yyr3762 || yy2arr3762 { - r.EncodeArrayStart(5) - } else { - yynn3762 = 4 - for _, b := range yyq3762 { - if b { - yynn3762++ - } - } - r.EncodeMapStart(yynn3762) - yynn3762 = 0 - } - if yyr3762 || yy2arr3762 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3764 := z.EncBinary() - _ = yym3764 - 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) - yym3765 := z.EncBinary() - _ = yym3765 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) - } - } - if yyr3762 || yy2arr3762 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3767 := z.EncBinary() - _ = yym3767 - 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) - yym3768 := z.EncBinary() - _ = yym3768 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - if yyr3762 || yy2arr3762 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3770 := z.EncBinary() - _ = yym3770 - 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) - yym3771 := z.EncBinary() - _ = yym3771 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) - } - } - if yyr3762 || yy2arr3762 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3773 := z.EncBinary() - _ = yym3773 - 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) - yym3774 := z.EncBinary() - _ = yym3774 - if false { - } else if z.HasExtensions() && z.EncExt(x.UID) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.UID)) - } - } - if yyr3762 || yy2arr3762 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3762[4] { - if x.Controller == nil { - r.EncodeNil() - } else { - yy3776 := *x.Controller - yym3777 := z.EncBinary() - _ = yym3777 - if false { - } else { - r.EncodeBool(bool(yy3776)) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq3762[4] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("controller")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Controller == nil { - r.EncodeNil() - } else { - yy3778 := *x.Controller - yym3779 := z.EncBinary() - _ = yym3779 - if false { - } else { - r.EncodeBool(bool(yy3778)) - } - } - } - } - if yyr3762 || yy2arr3762 { - 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 - yym3780 := z.DecBinary() - _ = yym3780 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct3781 := r.ContainerType() - if yyct3781 == codecSelferValueTypeMap1234 { - yyl3781 := r.ReadMapStart() - if yyl3781 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl3781, d) - } - } else if yyct3781 == codecSelferValueTypeArray1234 { - yyl3781 := r.ReadArrayStart() - if yyl3781 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl3781, 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 yys3782Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3782Slc - var yyhl3782 bool = l >= 0 - for yyj3782 := 0; ; yyj3782++ { - if yyhl3782 { - if yyj3782 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3782Slc = r.DecodeBytes(yys3782Slc, true, true) - yys3782 := string(yys3782Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3782 { - 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) - } - yym3788 := z.DecBinary() - _ = yym3788 - if false { - } else { - *((*bool)(x.Controller)) = r.DecodeBool() - } - } - default: - z.DecStructFieldNotFound(-1, yys3782) - } // end switch yys3782 - } // end for yyj3782 - 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 yyj3789 int - var yyb3789 bool - var yyhl3789 bool = l >= 0 - yyj3789++ - if yyhl3789 { - yyb3789 = yyj3789 > l - } else { - yyb3789 = r.CheckBreak() - } - if yyb3789 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - x.APIVersion = string(r.DecodeString()) - } - yyj3789++ - if yyhl3789 { - yyb3789 = yyj3789 > l - } else { - yyb3789 = r.CheckBreak() - } - if yyb3789 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind = string(r.DecodeString()) - } - yyj3789++ - if yyhl3789 { - yyb3789 = yyj3789 > l - } else { - yyb3789 = r.CheckBreak() - } - if yyb3789 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = string(r.DecodeString()) - } - yyj3789++ - if yyhl3789 { - yyb3789 = yyj3789 > l - } else { - yyb3789 = r.CheckBreak() - } - if yyb3789 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.UID = "" - } else { - x.UID = pkg1_types.UID(r.DecodeString()) - } - yyj3789++ - if yyhl3789 { - yyb3789 = yyj3789 > l - } else { - yyb3789 = r.CheckBreak() - } - if yyb3789 { - 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) - } - yym3795 := z.DecBinary() - _ = yym3795 + yyv15 := &x.Path + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*bool)(x.Controller)) = r.DecodeBool() + *((*string)(yyv15)) = r.DecodeString() } } for { - yyj3789++ - if yyhl3789 { - yyb3789 = yyj3789 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb3789 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb3789 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3789-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -47665,41 +56567,41 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3796 := z.EncBinary() - _ = yym3796 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3797 := !z.EncBinary() - yy2arr3797 := z.EncBasicHandle().StructToArray - var yyq3797 [7]bool - _, _, _ = yysep3797, yyq3797, yy2arr3797 - const yyr3797 bool = false - yyq3797[0] = x.Kind != "" - yyq3797[1] = x.Namespace != "" - yyq3797[2] = x.Name != "" - yyq3797[3] = x.UID != "" - yyq3797[4] = x.APIVersion != "" - yyq3797[5] = x.ResourceVersion != "" - yyq3797[6] = x.FieldPath != "" - var yynn3797 int - if yyr3797 || yy2arr3797 { + 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 { - yynn3797 = 0 - for _, b := range yyq3797 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3797++ + yynn2++ } } - r.EncodeMapStart(yynn3797) - yynn3797 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3797 || yy2arr3797 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3797[0] { - yym3799 := z.EncBinary() - _ = yym3799 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -47708,23 +56610,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3797[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3800 := z.EncBinary() - _ = yym3800 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3797 || yy2arr3797 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3797[1] { - yym3802 := z.EncBinary() - _ = yym3802 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) @@ -47733,23 +56635,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3797[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("namespace")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3803 := z.EncBinary() - _ = yym3803 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) } } } - if yyr3797 || yy2arr3797 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3797[2] { - yym3805 := z.EncBinary() - _ = yym3805 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -47758,23 +56660,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3797[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3806 := z.EncBinary() - _ = yym3806 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } } - if yyr3797 || yy2arr3797 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3797[3] { - yym3808 := z.EncBinary() - _ = yym3808 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { } else if z.HasExtensions() && z.EncExt(x.UID) { } else { @@ -47784,12 +56686,12 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3797[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("uid")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3809 := z.EncBinary() - _ = yym3809 + yym14 := z.EncBinary() + _ = yym14 if false { } else if z.HasExtensions() && z.EncExt(x.UID) { } else { @@ -47797,11 +56699,11 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3797 || yy2arr3797 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3797[4] { - yym3811 := z.EncBinary() - _ = yym3811 + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -47810,23 +56712,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3797[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3812 := z.EncBinary() - _ = yym3812 + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3797 || yy2arr3797 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3797[5] { - yym3814 := z.EncBinary() - _ = yym3814 + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) @@ -47835,23 +56737,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3797[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3815 := z.EncBinary() - _ = yym3815 + yym20 := z.EncBinary() + _ = yym20 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) } } } - if yyr3797 || yy2arr3797 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3797[6] { - yym3817 := z.EncBinary() - _ = yym3817 + if yyq2[6] { + yym22 := z.EncBinary() + _ = yym22 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath)) @@ -47860,19 +56762,19 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3797[6] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fieldPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3818 := z.EncBinary() - _ = yym3818 + yym23 := z.EncBinary() + _ = yym23 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath)) } } } - if yyr3797 || yy2arr3797 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -47885,25 +56787,25 @@ func (x *ObjectReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3819 := z.DecBinary() - _ = yym3819 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3820 := r.ContainerType() - if yyct3820 == codecSelferValueTypeMap1234 { - yyl3820 := r.ReadMapStart() - if yyl3820 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3820, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3820 == codecSelferValueTypeArray1234 { - yyl3820 := r.ReadArrayStart() - if yyl3820 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3820, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -47915,12 +56817,12 @@ func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3821Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3821Slc - var yyhl3821 bool = l >= 0 - for yyj3821 := 0; ; yyj3821++ { - if yyhl3821 { - if yyj3821 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -47929,56 +56831,99 @@ func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3821Slc = r.DecodeBytes(yys3821Slc, true, true) - yys3821 := string(yys3821Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3821 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "namespace": if r.TryDecodeAsNil() { x.Namespace = "" } else { - x.Namespace = string(r.DecodeString()) + yyv6 := &x.Namespace + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv8 := &x.Name + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } case "uid": if r.TryDecodeAsNil() { x.UID = "" } else { - x.UID = pkg1_types.UID(r.DecodeString()) + yyv10 := &x.UID + yym11 := z.DecBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.DecExt(yyv10) { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv12 := &x.APIVersion + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } case "resourceVersion": if r.TryDecodeAsNil() { x.ResourceVersion = "" } else { - x.ResourceVersion = string(r.DecodeString()) + yyv14 := &x.ResourceVersion + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } case "fieldPath": if r.TryDecodeAsNil() { x.FieldPath = "" } else { - x.FieldPath = string(r.DecodeString()) + yyv16 := &x.FieldPath + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys3821) - } // end switch yys3821 - } // end for yyj3821 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -47986,16 +56931,16 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3829 int - var yyb3829 bool - var yyhl3829 bool = l >= 0 - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + var yyj18 int + var yyb18 bool + var yyhl18 bool = l >= 0 + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3829 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3829 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48003,15 +56948,21 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv19 := &x.Kind + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } } - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3829 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3829 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48019,15 +56970,21 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Namespace = "" } else { - x.Namespace = string(r.DecodeString()) + yyv21 := &x.Namespace + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } } - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3829 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3829 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48035,15 +56992,21 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv23 := &x.Name + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*string)(yyv23)) = r.DecodeString() + } } - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3829 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3829 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48051,15 +57014,22 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.UID = "" } else { - x.UID = pkg1_types.UID(r.DecodeString()) + yyv25 := &x.UID + yym26 := z.DecBinary() + _ = yym26 + if false { + } else if z.HasExtensions() && z.DecExt(yyv25) { + } else { + *((*string)(yyv25)) = r.DecodeString() + } } - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3829 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3829 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48067,15 +57037,21 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv27 := &x.APIVersion + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*string)(yyv27)) = r.DecodeString() + } } - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3829 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3829 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48083,15 +57059,21 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ResourceVersion = "" } else { - x.ResourceVersion = string(r.DecodeString()) + yyv29 := &x.ResourceVersion + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*string)(yyv29)) = r.DecodeString() + } } - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3829 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3829 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48099,20 +57081,26 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.FieldPath = "" } else { - x.FieldPath = string(r.DecodeString()) + yyv31 := &x.FieldPath + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + *((*string)(yyv31)) = r.DecodeString() + } } for { - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb3829 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb3829 { + if yyb18 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3829-1, "") + z.DecStructFieldNotFound(yyj18-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -48124,49 +57112,56 @@ func (x *LocalObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3837 := z.EncBinary() - _ = yym3837 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3838 := !z.EncBinary() - yy2arr3838 := z.EncBasicHandle().StructToArray - var yyq3838 [1]bool - _, _, _ = yysep3838, yyq3838, yy2arr3838 - const yyr3838 bool = false - var yynn3838 int - if yyr3838 || yy2arr3838 { + 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 { - yynn3838 = 1 - for _, b := range yyq3838 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3838++ + yynn2++ } } - r.EncodeMapStart(yynn3838) - yynn3838 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3838 || yy2arr3838 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3840 := z.EncBinary() - _ = yym3840 - if false { + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + r.EncodeString(codecSelferC_UTF81234, "") } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("Name")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3841 := z.EncBinary() - _ = yym3841 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + 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 yyr3838 || yy2arr3838 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -48179,25 +57174,25 @@ func (x *LocalObjectReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3842 := z.DecBinary() - _ = yym3842 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3843 := r.ContainerType() - if yyct3843 == codecSelferValueTypeMap1234 { - yyl3843 := r.ReadMapStart() - if yyl3843 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3843, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3843 == codecSelferValueTypeArray1234 { - yyl3843 := r.ReadArrayStart() - if yyl3843 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3843, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -48209,12 +57204,12 @@ func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3844Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3844Slc - var yyhl3844 bool = l >= 0 - for yyj3844 := 0; ; yyj3844++ { - if yyhl3844 { - if yyj3844 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -48223,20 +57218,26 @@ func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3844Slc = r.DecodeBytes(yys3844Slc, true, true) - yys3844 := string(yys3844Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3844 { - case "Name": + switch yys3 { + case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys3844) - } // end switch yys3844 - } // end for yyj3844 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -48244,16 +57245,16 @@ func (x *LocalObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3846 int - var yyb3846 bool - var yyhl3846 bool = l >= 0 - yyj3846++ - if yyhl3846 { - yyb3846 = yyj3846 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb3846 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb3846 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48261,20 +57262,26 @@ func (x *LocalObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv7 := &x.Name + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*string)(yyv7)) = r.DecodeString() + } } for { - yyj3846++ - if yyhl3846 { - yyb3846 = yyj3846 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb3846 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb3846 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3846-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -48286,37 +57293,37 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3848 := z.EncBinary() - _ = yym3848 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3849 := !z.EncBinary() - yy2arr3849 := z.EncBasicHandle().StructToArray - var yyq3849 [3]bool - _, _, _ = yysep3849, yyq3849, yy2arr3849 - const yyr3849 bool = false - yyq3849[0] = x.Kind != "" - yyq3849[1] = x.APIVersion != "" - yyq3849[2] = true - var yynn3849 int - if yyr3849 || yy2arr3849 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(3) } else { - yynn3849 = 0 - for _, b := range yyq3849 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3849++ + yynn2++ } } - r.EncodeMapStart(yynn3849) - yynn3849 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3849 || yy2arr3849 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3849[0] { - yym3851 := z.EncBinary() - _ = yym3851 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -48325,23 +57332,23 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3849[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3852 := z.EncBinary() - _ = yym3852 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3849 || yy2arr3849 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3849[1] { - yym3854 := z.EncBinary() - _ = yym3854 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -48350,36 +57357,36 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3849[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3855 := z.EncBinary() - _ = yym3855 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3849 || yy2arr3849 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3849[2] { - yy3857 := &x.Reference - yy3857.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.Reference + yy10.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3849[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reference")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3858 := &x.Reference - yy3858.CodecEncodeSelf(e) + yy12 := &x.Reference + yy12.CodecEncodeSelf(e) } } - if yyr3849 || yy2arr3849 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -48392,25 +57399,25 @@ func (x *SerializedReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3859 := z.DecBinary() - _ = yym3859 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3860 := r.ContainerType() - if yyct3860 == codecSelferValueTypeMap1234 { - yyl3860 := r.ReadMapStart() - if yyl3860 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3860, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3860 == codecSelferValueTypeArray1234 { - yyl3860 := r.ReadArrayStart() - if yyl3860 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3860, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -48422,12 +57429,12 @@ func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3861Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3861Slc - var yyhl3861 bool = l >= 0 - for yyj3861 := 0; ; yyj3861++ { - if yyhl3861 { - if yyj3861 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -48436,33 +57443,45 @@ func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3861Slc = r.DecodeBytes(yys3861Slc, true, true) - yys3861 := string(yys3861Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3861 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "reference": if r.TryDecodeAsNil() { x.Reference = ObjectReference{} } else { - yyv3864 := &x.Reference - yyv3864.CodecDecodeSelf(d) + yyv8 := &x.Reference + yyv8.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3861) - } // end switch yys3861 - } // end for yyj3861 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -48470,16 +57489,16 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3865 int - var yyb3865 bool - var yyhl3865 bool = l >= 0 - yyj3865++ - if yyhl3865 { - yyb3865 = yyj3865 > l + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb3865 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb3865 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48487,15 +57506,21 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv10 := &x.Kind + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } - yyj3865++ - if yyhl3865 { - yyb3865 = yyj3865 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb3865 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb3865 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48503,15 +57528,21 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv12 := &x.APIVersion + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } - yyj3865++ - if yyhl3865 { - yyb3865 = yyj3865 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb3865 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb3865 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48519,21 +57550,21 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Reference = ObjectReference{} } else { - yyv3868 := &x.Reference - yyv3868.CodecDecodeSelf(d) + yyv14 := &x.Reference + yyv14.CodecDecodeSelf(d) } for { - yyj3865++ - if yyhl3865 { - yyb3865 = yyj3865 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb3865 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb3865 { + if yyb9 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3865-1, "") + z.DecStructFieldNotFound(yyj9-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -48545,36 +57576,36 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3869 := z.EncBinary() - _ = yym3869 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3870 := !z.EncBinary() - yy2arr3870 := z.EncBasicHandle().StructToArray - var yyq3870 [2]bool - _, _, _ = yysep3870, yyq3870, yy2arr3870 - const yyr3870 bool = false - yyq3870[0] = x.Component != "" - yyq3870[1] = x.Host != "" - var yynn3870 int - if yyr3870 || yy2arr3870 { + 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 { - yynn3870 = 0 - for _, b := range yyq3870 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn3870++ + yynn2++ } } - r.EncodeMapStart(yynn3870) - yynn3870 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3870 || yy2arr3870 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3870[0] { - yym3872 := z.EncBinary() - _ = yym3872 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Component)) @@ -48583,23 +57614,23 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3870[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("component")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3873 := z.EncBinary() - _ = yym3873 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Component)) } } } - if yyr3870 || yy2arr3870 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3870[1] { - yym3875 := z.EncBinary() - _ = yym3875 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Host)) @@ -48608,19 +57639,19 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3870[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("host")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3876 := z.EncBinary() - _ = yym3876 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Host)) } } } - if yyr3870 || yy2arr3870 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -48633,25 +57664,25 @@ func (x *EventSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3877 := z.DecBinary() - _ = yym3877 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3878 := r.ContainerType() - if yyct3878 == codecSelferValueTypeMap1234 { - yyl3878 := r.ReadMapStart() - if yyl3878 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3878, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3878 == codecSelferValueTypeArray1234 { - yyl3878 := r.ReadArrayStart() - if yyl3878 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3878, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -48663,12 +57694,12 @@ func (x *EventSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3879Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3879Slc - var yyhl3879 bool = l >= 0 - for yyj3879 := 0; ; yyj3879++ { - if yyhl3879 { - if yyj3879 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -48677,26 +57708,38 @@ func (x *EventSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3879Slc = r.DecodeBytes(yys3879Slc, true, true) - yys3879 := string(yys3879Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3879 { + switch yys3 { case "component": if r.TryDecodeAsNil() { x.Component = "" } else { - x.Component = string(r.DecodeString()) + yyv4 := &x.Component + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "host": if r.TryDecodeAsNil() { x.Host = "" } else { - x.Host = string(r.DecodeString()) + yyv6 := &x.Host + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys3879) - } // end switch yys3879 - } // end for yyj3879 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -48704,16 +57747,16 @@ func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3882 int - var yyb3882 bool - var yyhl3882 bool = l >= 0 - yyj3882++ - if yyhl3882 { - yyb3882 = yyj3882 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb3882 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb3882 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48721,15 +57764,21 @@ func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Component = "" } else { - x.Component = string(r.DecodeString()) + yyv9 := &x.Component + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } } - yyj3882++ - if yyhl3882 { - yyb3882 = yyj3882 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb3882 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb3882 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48737,20 +57786,26 @@ func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Host = "" } else { - x.Host = string(r.DecodeString()) + yyv11 := &x.Host + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } for { - yyj3882++ - if yyhl3882 { - yyb3882 = yyj3882 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb3882 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb3882 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3882-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -48762,45 +57817,43 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3885 := z.EncBinary() - _ = yym3885 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3886 := !z.EncBinary() - yy2arr3886 := z.EncBasicHandle().StructToArray - var yyq3886 [11]bool - _, _, _ = yysep3886, yyq3886, yy2arr3886 - const yyr3886 bool = false - yyq3886[0] = x.Kind != "" - yyq3886[1] = x.APIVersion != "" - yyq3886[2] = true - yyq3886[3] = true - yyq3886[4] = x.Reason != "" - yyq3886[5] = x.Message != "" - yyq3886[6] = true - yyq3886[7] = true - yyq3886[8] = true - yyq3886[9] = x.Count != 0 - yyq3886[10] = x.Type != "" - var yynn3886 int - if yyr3886 || yy2arr3886 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [11]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[4] = x.Reason != "" + yyq2[5] = x.Message != "" + yyq2[6] = true + yyq2[7] = true + yyq2[8] = true + yyq2[9] = x.Count != 0 + yyq2[10] = x.Type != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(11) } else { - yynn3886 = 0 - for _, b := range yyq3886 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn3886++ + yynn2++ } } - r.EncodeMapStart(yynn3886) - yynn3886 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3886 || yy2arr3886 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3886[0] { - yym3888 := z.EncBinary() - _ = yym3888 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -48809,23 +57862,23 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3886[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3889 := z.EncBinary() - _ = yym3889 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3886 || yy2arr3886 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3886[1] { - yym3891 := z.EncBinary() - _ = yym3891 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -48834,57 +57887,57 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3886[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3892 := z.EncBinary() - _ = yym3892 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3886 || yy2arr3886 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3886[2] { - yy3894 := &x.ObjectMeta - yy3894.CodecEncodeSelf(e) + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - r.EncodeNil() + z.EncFallback(yy10) } } else { - if yyq3886[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3895 := &x.ObjectMeta - yy3895.CodecEncodeSelf(e) - } - } - if yyr3886 || yy2arr3886 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3886[3] { - yy3897 := &x.InvolvedObject - yy3897.CodecEncodeSelf(e) + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - r.EncodeNil() - } - } else { - if yyq3886[3] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("involvedObject")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3898 := &x.InvolvedObject - yy3898.CodecEncodeSelf(e) + z.EncFallback(yy12) } } - if yyr3886 || yy2arr3886 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3886[4] { - yym3900 := z.EncBinary() - _ = yym3900 + yy15 := &x.InvolvedObject + yy15.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("involvedObject")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.InvolvedObject + yy17.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym20 := z.EncBinary() + _ = yym20 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -48893,23 +57946,23 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3886[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3901 := z.EncBinary() - _ = yym3901 + yym21 := z.EncBinary() + _ = yym21 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr3886 || yy2arr3886 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3886[5] { - yym3903 := z.EncBinary() - _ = yym3903 + if yyq2[5] { + yym23 := z.EncBinary() + _ = yym23 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -48918,114 +57971,114 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3886[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3904 := z.EncBinary() - _ = yym3904 + yym24 := z.EncBinary() + _ = yym24 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr3886 || yy2arr3886 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3886[6] { - yy3906 := &x.Source - yy3906.CodecEncodeSelf(e) + if yyq2[6] { + yy26 := &x.Source + yy26.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3886[6] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("source")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3907 := &x.Source - yy3907.CodecEncodeSelf(e) + yy28 := &x.Source + yy28.CodecEncodeSelf(e) } } - if yyr3886 || yy2arr3886 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3886[7] { - yy3909 := &x.FirstTimestamp - yym3910 := z.EncBinary() - _ = yym3910 + if yyq2[7] { + yy31 := &x.FirstTimestamp + yym32 := z.EncBinary() + _ = yym32 if false { - } else if z.HasExtensions() && z.EncExt(yy3909) { - } else if yym3910 { - z.EncBinaryMarshal(yy3909) - } else if !yym3910 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3909) + } else if z.HasExtensions() && z.EncExt(yy31) { + } else if yym32 { + z.EncBinaryMarshal(yy31) + } else if !yym32 && z.IsJSONHandle() { + z.EncJSONMarshal(yy31) } else { - z.EncFallback(yy3909) + z.EncFallback(yy31) } } else { r.EncodeNil() } } else { - if yyq3886[7] { + if yyq2[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("firstTimestamp")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3911 := &x.FirstTimestamp - yym3912 := z.EncBinary() - _ = yym3912 + yy33 := &x.FirstTimestamp + yym34 := z.EncBinary() + _ = yym34 if false { - } else if z.HasExtensions() && z.EncExt(yy3911) { - } else if yym3912 { - z.EncBinaryMarshal(yy3911) - } else if !yym3912 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3911) + } else if z.HasExtensions() && z.EncExt(yy33) { + } else if yym34 { + z.EncBinaryMarshal(yy33) + } else if !yym34 && z.IsJSONHandle() { + z.EncJSONMarshal(yy33) } else { - z.EncFallback(yy3911) + z.EncFallback(yy33) } } } - if yyr3886 || yy2arr3886 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3886[8] { - yy3914 := &x.LastTimestamp - yym3915 := z.EncBinary() - _ = yym3915 + if yyq2[8] { + yy36 := &x.LastTimestamp + yym37 := z.EncBinary() + _ = yym37 if false { - } else if z.HasExtensions() && z.EncExt(yy3914) { - } else if yym3915 { - z.EncBinaryMarshal(yy3914) - } else if !yym3915 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3914) + } else if z.HasExtensions() && z.EncExt(yy36) { + } else if yym37 { + z.EncBinaryMarshal(yy36) + } else if !yym37 && z.IsJSONHandle() { + z.EncJSONMarshal(yy36) } else { - z.EncFallback(yy3914) + z.EncFallback(yy36) } } else { r.EncodeNil() } } else { - if yyq3886[8] { + if yyq2[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lastTimestamp")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3916 := &x.LastTimestamp - yym3917 := z.EncBinary() - _ = yym3917 + yy38 := &x.LastTimestamp + yym39 := z.EncBinary() + _ = yym39 if false { - } else if z.HasExtensions() && z.EncExt(yy3916) { - } else if yym3917 { - z.EncBinaryMarshal(yy3916) - } else if !yym3917 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3916) + } else if z.HasExtensions() && z.EncExt(yy38) { + } else if yym39 { + z.EncBinaryMarshal(yy38) + } else if !yym39 && z.IsJSONHandle() { + z.EncJSONMarshal(yy38) } else { - z.EncFallback(yy3916) + z.EncFallback(yy38) } } } - if yyr3886 || yy2arr3886 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3886[9] { - yym3919 := z.EncBinary() - _ = yym3919 + if yyq2[9] { + yym41 := z.EncBinary() + _ = yym41 if false { } else { r.EncodeInt(int64(x.Count)) @@ -49034,23 +58087,23 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq3886[9] { + if yyq2[9] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("count")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3920 := z.EncBinary() - _ = yym3920 + yym42 := z.EncBinary() + _ = yym42 if false { } else { r.EncodeInt(int64(x.Count)) } } } - if yyr3886 || yy2arr3886 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3886[10] { - yym3922 := z.EncBinary() - _ = yym3922 + if yyq2[10] { + yym44 := z.EncBinary() + _ = yym44 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) @@ -49059,19 +58112,19 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3886[10] { + if yyq2[10] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3923 := z.EncBinary() - _ = yym3923 + yym45 := z.EncBinary() + _ = yym45 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) } } } - if yyr3886 || yy2arr3886 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -49084,25 +58137,25 @@ func (x *Event) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3924 := z.DecBinary() - _ = yym3924 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3925 := r.ContainerType() - if yyct3925 == codecSelferValueTypeMap1234 { - yyl3925 := r.ReadMapStart() - if yyl3925 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3925, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3925 == codecSelferValueTypeArray1234 { - yyl3925 := r.ReadArrayStart() - if yyl3925 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3925, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -49114,12 +58167,12 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3926Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3926Slc - var yyhl3926 bool = l >= 0 - for yyj3926 := 0; ; yyj3926++ { - if yyhl3926 { - if yyj3926 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -49128,105 +58181,147 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3926Slc = r.DecodeBytes(yys3926Slc, true, true) - yys3926 := string(yys3926Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3926 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv3929 := &x.ObjectMeta - yyv3929.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "involvedObject": if r.TryDecodeAsNil() { x.InvolvedObject = ObjectReference{} } else { - yyv3930 := &x.InvolvedObject - yyv3930.CodecDecodeSelf(d) + yyv10 := &x.InvolvedObject + yyv10.CodecDecodeSelf(d) } case "reason": if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv11 := &x.Reason + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } case "message": if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv13 := &x.Message + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } case "source": if r.TryDecodeAsNil() { x.Source = EventSource{} } else { - yyv3933 := &x.Source - yyv3933.CodecDecodeSelf(d) + yyv15 := &x.Source + yyv15.CodecDecodeSelf(d) } case "firstTimestamp": if r.TryDecodeAsNil() { - x.FirstTimestamp = pkg2_unversioned.Time{} + x.FirstTimestamp = pkg2_v1.Time{} } else { - yyv3934 := &x.FirstTimestamp - yym3935 := z.DecBinary() - _ = yym3935 + yyv16 := &x.FirstTimestamp + yym17 := z.DecBinary() + _ = yym17 if false { - } else if z.HasExtensions() && z.DecExt(yyv3934) { - } else if yym3935 { - z.DecBinaryUnmarshal(yyv3934) - } else if !yym3935 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3934) + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else if yym17 { + z.DecBinaryUnmarshal(yyv16) + } else if !yym17 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv16) } else { - z.DecFallback(yyv3934, false) + z.DecFallback(yyv16, false) } } case "lastTimestamp": if r.TryDecodeAsNil() { - x.LastTimestamp = pkg2_unversioned.Time{} + x.LastTimestamp = pkg2_v1.Time{} } else { - yyv3936 := &x.LastTimestamp - yym3937 := z.DecBinary() - _ = yym3937 + yyv18 := &x.LastTimestamp + yym19 := z.DecBinary() + _ = yym19 if false { - } else if z.HasExtensions() && z.DecExt(yyv3936) { - } else if yym3937 { - z.DecBinaryUnmarshal(yyv3936) - } else if !yym3937 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3936) + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else if yym19 { + z.DecBinaryUnmarshal(yyv18) + } else if !yym19 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv18) } else { - z.DecFallback(yyv3936, false) + z.DecFallback(yyv18, false) } } case "count": if r.TryDecodeAsNil() { x.Count = 0 } else { - x.Count = int32(r.DecodeInt(32)) + yyv20 := &x.Count + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + *((*int32)(yyv20)) = int32(r.DecodeInt(32)) + } } case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = string(r.DecodeString()) + yyv22 := &x.Type + yym23 := z.DecBinary() + _ = yym23 + if false { + } else { + *((*string)(yyv22)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys3926) - } // end switch yys3926 - } // end for yyj3926 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -49234,16 +58329,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3940 int - var yyb3940 bool - var yyhl3940 bool = l >= 0 - yyj3940++ - if yyhl3940 { - yyb3940 = yyj3940 > l + var yyj24 int + var yyb24 bool + var yyhl24 bool = l >= 0 + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3940 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3940 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49251,15 +58346,21 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv25 := &x.Kind + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*string)(yyv25)) = r.DecodeString() + } } - yyj3940++ - if yyhl3940 { - yyb3940 = yyj3940 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3940 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3940 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49267,32 +58368,44 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv27 := &x.APIVersion + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*string)(yyv27)) = r.DecodeString() + } } - yyj3940++ - if yyhl3940 { - yyb3940 = yyj3940 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3940 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3940 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv3943 := &x.ObjectMeta - yyv3943.CodecDecodeSelf(d) + yyv29 := &x.ObjectMeta + yym30 := z.DecBinary() + _ = yym30 + if false { + } else if z.HasExtensions() && z.DecExt(yyv29) { + } else { + z.DecFallback(yyv29, false) + } } - yyj3940++ - if yyhl3940 { - yyb3940 = yyj3940 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3940 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3940 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49300,16 +58413,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.InvolvedObject = ObjectReference{} } else { - yyv3944 := &x.InvolvedObject - yyv3944.CodecDecodeSelf(d) + yyv31 := &x.InvolvedObject + yyv31.CodecDecodeSelf(d) } - yyj3940++ - if yyhl3940 { - yyb3940 = yyj3940 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3940 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3940 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49317,15 +58430,21 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv32 := &x.Reason + yym33 := z.DecBinary() + _ = yym33 + if false { + } else { + *((*string)(yyv32)) = r.DecodeString() + } } - yyj3940++ - if yyhl3940 { - yyb3940 = yyj3940 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3940 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3940 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49333,15 +58452,21 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv34 := &x.Message + yym35 := z.DecBinary() + _ = yym35 + if false { + } else { + *((*string)(yyv34)) = r.DecodeString() + } } - yyj3940++ - if yyhl3940 { - yyb3940 = yyj3940 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3940 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3940 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49349,70 +58474,70 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Source = EventSource{} } else { - yyv3947 := &x.Source - yyv3947.CodecDecodeSelf(d) + yyv36 := &x.Source + yyv36.CodecDecodeSelf(d) } - yyj3940++ - if yyhl3940 { - yyb3940 = yyj3940 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3940 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3940 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.FirstTimestamp = pkg2_unversioned.Time{} + x.FirstTimestamp = pkg2_v1.Time{} } else { - yyv3948 := &x.FirstTimestamp - yym3949 := z.DecBinary() - _ = yym3949 + yyv37 := &x.FirstTimestamp + yym38 := z.DecBinary() + _ = yym38 if false { - } else if z.HasExtensions() && z.DecExt(yyv3948) { - } else if yym3949 { - z.DecBinaryUnmarshal(yyv3948) - } else if !yym3949 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3948) + } else if z.HasExtensions() && z.DecExt(yyv37) { + } else if yym38 { + z.DecBinaryUnmarshal(yyv37) + } else if !yym38 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv37) } else { - z.DecFallback(yyv3948, false) + z.DecFallback(yyv37, false) } } - yyj3940++ - if yyhl3940 { - yyb3940 = yyj3940 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3940 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3940 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.LastTimestamp = pkg2_unversioned.Time{} + x.LastTimestamp = pkg2_v1.Time{} } else { - yyv3950 := &x.LastTimestamp - yym3951 := z.DecBinary() - _ = yym3951 + yyv39 := &x.LastTimestamp + yym40 := z.DecBinary() + _ = yym40 if false { - } else if z.HasExtensions() && z.DecExt(yyv3950) { - } else if yym3951 { - z.DecBinaryUnmarshal(yyv3950) - } else if !yym3951 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3950) + } else if z.HasExtensions() && z.DecExt(yyv39) { + } else if yym40 { + z.DecBinaryUnmarshal(yyv39) + } else if !yym40 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv39) } else { - z.DecFallback(yyv3950, false) + z.DecFallback(yyv39, false) } } - yyj3940++ - if yyhl3940 { - yyb3940 = yyj3940 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3940 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3940 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49420,15 +58545,21 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Count = 0 } else { - x.Count = int32(r.DecodeInt(32)) + yyv41 := &x.Count + yym42 := z.DecBinary() + _ = yym42 + if false { + } else { + *((*int32)(yyv41)) = int32(r.DecodeInt(32)) + } } - yyj3940++ - if yyhl3940 { - yyb3940 = yyj3940 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3940 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3940 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49436,20 +58567,26 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = string(r.DecodeString()) + yyv43 := &x.Type + yym44 := z.DecBinary() + _ = yym44 + if false { + } else { + *((*string)(yyv43)) = r.DecodeString() + } } for { - yyj3940++ - if yyhl3940 { - yyb3940 = yyj3940 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb3940 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb3940 { + if yyb24 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3940-1, "") + z.DecStructFieldNotFound(yyj24-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49461,37 +58598,37 @@ func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3954 := z.EncBinary() - _ = yym3954 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3955 := !z.EncBinary() - yy2arr3955 := z.EncBasicHandle().StructToArray - var yyq3955 [4]bool - _, _, _ = yysep3955, yyq3955, yy2arr3955 - const yyr3955 bool = false - yyq3955[0] = x.Kind != "" - yyq3955[1] = x.APIVersion != "" - yyq3955[2] = true - var yynn3955 int - if yyr3955 || yy2arr3955 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn3955 = 1 - for _, b := range yyq3955 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn3955++ + yynn2++ } } - r.EncodeMapStart(yynn3955) - yynn3955 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3955 || yy2arr3955 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3955[0] { - yym3957 := z.EncBinary() - _ = yym3957 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -49500,23 +58637,23 @@ func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3955[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3958 := z.EncBinary() - _ = yym3958 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3955 || yy2arr3955 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3955[1] { - yym3960 := z.EncBinary() - _ = yym3960 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -49525,54 +58662,54 @@ func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3955[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3961 := z.EncBinary() - _ = yym3961 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3955 || yy2arr3955 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3955[2] { - yy3963 := &x.ListMeta - yym3964 := z.EncBinary() - _ = yym3964 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy3963) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy3963) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq3955[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3965 := &x.ListMeta - yym3966 := z.EncBinary() - _ = yym3966 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy3965) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy3965) + z.EncFallback(yy12) } } } - if yyr3955 || yy2arr3955 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3968 := z.EncBinary() - _ = yym3968 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceEvent(([]Event)(x.Items), e) @@ -49585,15 +58722,15 @@ func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3969 := z.EncBinary() - _ = yym3969 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceEvent(([]Event)(x.Items), e) } } } - if yyr3955 || yy2arr3955 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -49606,25 +58743,25 @@ func (x *EventList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3970 := z.DecBinary() - _ = yym3970 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3971 := r.ContainerType() - if yyct3971 == codecSelferValueTypeMap1234 { - yyl3971 := r.ReadMapStart() - if yyl3971 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3971, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct3971 == codecSelferValueTypeArray1234 { - yyl3971 := r.ReadArrayStart() - if yyl3971 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3971, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -49636,12 +58773,12 @@ func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3972Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3972Slc - var yyhl3972 bool = l >= 0 - for yyj3972 := 0; ; yyj3972++ { - if yyhl3972 { - if yyj3972 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -49650,51 +58787,63 @@ func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3972Slc = r.DecodeBytes(yys3972Slc, true, true) - yys3972 := string(yys3972Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3972 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv3975 := &x.ListMeta - yym3976 := z.DecBinary() - _ = yym3976 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv3975) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv3975, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3977 := &x.Items - yym3978 := z.DecBinary() - _ = yym3978 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceEvent((*[]Event)(yyv3977), d) + h.decSliceEvent((*[]Event)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys3972) - } // end switch yys3972 - } // end for yyj3972 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -49702,16 +58851,16 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3979 int - var yyb3979 bool - var yyhl3979 bool = l >= 0 - yyj3979++ - if yyhl3979 { - yyb3979 = yyj3979 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3979 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3979 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49719,15 +58868,21 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj3979++ - if yyhl3979 { - yyb3979 = yyj3979 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3979 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3979 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49735,38 +58890,44 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj3979++ - if yyhl3979 { - yyb3979 = yyj3979 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3979 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3979 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv3982 := &x.ListMeta - yym3983 := z.DecBinary() - _ = yym3983 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv3982) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv3982, false) + z.DecFallback(yyv17, false) } } - yyj3979++ - if yyhl3979 { - yyb3979 = yyj3979 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3979 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3979 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49774,26 +58935,26 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3984 := &x.Items - yym3985 := z.DecBinary() - _ = yym3985 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceEvent((*[]Event)(yyv3984), d) + h.decSliceEvent((*[]Event)(yyv19), d) } } for { - yyj3979++ - if yyhl3979 { - yyb3979 = yyj3979 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb3979 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb3979 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3979-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49805,37 +58966,37 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3986 := z.EncBinary() - _ = yym3986 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3987 := !z.EncBinary() - yy2arr3987 := z.EncBasicHandle().StructToArray - var yyq3987 [4]bool - _, _, _ = yysep3987, yyq3987, yy2arr3987 - const yyr3987 bool = false - yyq3987[0] = x.Kind != "" - yyq3987[1] = x.APIVersion != "" - yyq3987[2] = true - var yynn3987 int - if yyr3987 || yy2arr3987 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn3987 = 1 - for _, b := range yyq3987 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn3987++ + yynn2++ } } - r.EncodeMapStart(yynn3987) - yynn3987 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr3987 || yy2arr3987 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3987[0] { - yym3989 := z.EncBinary() - _ = yym3989 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -49844,23 +59005,23 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3987[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3990 := z.EncBinary() - _ = yym3990 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3987 || yy2arr3987 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3987[1] { - yym3992 := z.EncBinary() - _ = yym3992 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -49869,57 +59030,57 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3987[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3993 := z.EncBinary() - _ = yym3993 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3987 || yy2arr3987 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3987[2] { - yy3995 := &x.ListMeta - yym3996 := z.EncBinary() - _ = yym3996 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy3995) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy3995) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq3987[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3997 := &x.ListMeta - yym3998 := z.EncBinary() - _ = yym3998 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy3997) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy3997) + z.EncFallback(yy12) } } } - if yyr3987 || yy2arr3987 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym4000 := z.EncBinary() - _ = yym4000 + yym15 := z.EncBinary() + _ = yym15 if false { } else { - h.encSliceruntime_Object(([]pkg7_runtime.Object)(x.Items), e) + h.encSliceruntime_RawExtension(([]pkg5_runtime.RawExtension)(x.Items), e) } } } else { @@ -49929,15 +59090,15 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym4001 := z.EncBinary() - _ = yym4001 + yym16 := z.EncBinary() + _ = yym16 if false { } else { - h.encSliceruntime_Object(([]pkg7_runtime.Object)(x.Items), e) + h.encSliceruntime_RawExtension(([]pkg5_runtime.RawExtension)(x.Items), e) } } } - if yyr3987 || yy2arr3987 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -49950,25 +59111,25 @@ func (x *List) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4002 := z.DecBinary() - _ = yym4002 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4003 := r.ContainerType() - if yyct4003 == codecSelferValueTypeMap1234 { - yyl4003 := r.ReadMapStart() - if yyl4003 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4003, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4003 == codecSelferValueTypeArray1234 { - yyl4003 := r.ReadArrayStart() - if yyl4003 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4003, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -49980,12 +59141,12 @@ func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4004Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4004Slc - var yyhl4004 bool = l >= 0 - for yyj4004 := 0; ; yyj4004++ { - if yyhl4004 { - if yyj4004 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -49994,51 +59155,63 @@ func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4004Slc = r.DecodeBytes(yys4004Slc, true, true) - yys4004 := string(yys4004Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4004 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv4007 := &x.ListMeta - yym4008 := z.DecBinary() - _ = yym4008 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv4007) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv4007, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4009 := &x.Items - yym4010 := z.DecBinary() - _ = yym4010 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceruntime_Object((*[]pkg7_runtime.Object)(yyv4009), d) + h.decSliceruntime_RawExtension((*[]pkg5_runtime.RawExtension)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys4004) - } // end switch yys4004 - } // end for yyj4004 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -50046,16 +59219,16 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4011 int - var yyb4011 bool - var yyhl4011 bool = l >= 0 - yyj4011++ - if yyhl4011 { - yyb4011 = yyj4011 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4011 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4011 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50063,15 +59236,21 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj4011++ - if yyhl4011 { - yyb4011 = yyj4011 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4011 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4011 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50079,38 +59258,44 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj4011++ - if yyhl4011 { - yyb4011 = yyj4011 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4011 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4011 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv4014 := &x.ListMeta - yym4015 := z.DecBinary() - _ = yym4015 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv4014) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv4014, false) + z.DecFallback(yyv17, false) } } - yyj4011++ - if yyhl4011 { - yyb4011 = yyj4011 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4011 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4011 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50118,26 +59303,26 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4016 := &x.Items - yym4017 := z.DecBinary() - _ = yym4017 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceruntime_Object((*[]pkg7_runtime.Object)(yyv4016), d) + h.decSliceruntime_RawExtension((*[]pkg5_runtime.RawExtension)(yyv19), d) } } for { - yyj4011++ - if yyhl4011 { - yyb4011 = yyj4011 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4011 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4011 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4011-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50146,8 +59331,8 @@ func (x LimitType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym4018 := z.EncBinary() - _ = yym4018 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -50159,8 +59344,8 @@ func (x *LimitType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4019 := z.DecBinary() - _ = yym4019 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -50175,53 +59360,53 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4020 := z.EncBinary() - _ = yym4020 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4021 := !z.EncBinary() - yy2arr4021 := z.EncBasicHandle().StructToArray - var yyq4021 [6]bool - _, _, _ = yysep4021, yyq4021, yy2arr4021 - const yyr4021 bool = false - yyq4021[0] = x.Type != "" - yyq4021[1] = len(x.Max) != 0 - yyq4021[2] = len(x.Min) != 0 - yyq4021[3] = len(x.Default) != 0 - yyq4021[4] = len(x.DefaultRequest) != 0 - yyq4021[5] = len(x.MaxLimitRequestRatio) != 0 - var yynn4021 int - if yyr4021 || yy2arr4021 { + 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 { - yynn4021 = 0 - for _, b := range yyq4021 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn4021++ + yynn2++ } } - r.EncodeMapStart(yynn4021) - yynn4021 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4021 || yy2arr4021 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4021[0] { + if yyq2[0] { x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4021[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } } - if yyr4021 || yy2arr4021 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4021[1] { + if yyq2[1] { if x.Max == nil { r.EncodeNil() } else { @@ -50231,7 +59416,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4021[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("max")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -50242,9 +59427,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4021 || yy2arr4021 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4021[2] { + if yyq2[2] { if x.Min == nil { r.EncodeNil() } else { @@ -50254,7 +59439,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4021[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("min")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -50265,9 +59450,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4021 || yy2arr4021 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4021[3] { + if yyq2[3] { if x.Default == nil { r.EncodeNil() } else { @@ -50277,7 +59462,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4021[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("default")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -50288,9 +59473,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4021 || yy2arr4021 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4021[4] { + if yyq2[4] { if x.DefaultRequest == nil { r.EncodeNil() } else { @@ -50300,7 +59485,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4021[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("defaultRequest")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -50311,9 +59496,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4021 || yy2arr4021 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4021[5] { + if yyq2[5] { if x.MaxLimitRequestRatio == nil { r.EncodeNil() } else { @@ -50323,7 +59508,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4021[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maxLimitRequestRatio")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -50334,7 +59519,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4021 || yy2arr4021 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -50347,25 +59532,25 @@ func (x *LimitRangeItem) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4028 := z.DecBinary() - _ = yym4028 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4029 := r.ContainerType() - if yyct4029 == codecSelferValueTypeMap1234 { - yyl4029 := r.ReadMapStart() - if yyl4029 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4029, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4029 == codecSelferValueTypeArray1234 { - yyl4029 := r.ReadArrayStart() - if yyl4029 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4029, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -50377,12 +59562,12 @@ func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4030Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4030Slc - var yyhl4030 bool = l >= 0 - for yyj4030 := 0; ; yyj4030++ { - if yyhl4030 { - if yyj4030 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -50391,55 +59576,56 @@ func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4030Slc = r.DecodeBytes(yys4030Slc, true, true) - yys4030 := string(yys4030Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4030 { + switch yys3 { case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = LimitType(r.DecodeString()) + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) } case "max": if r.TryDecodeAsNil() { x.Max = nil } else { - yyv4032 := &x.Max - yyv4032.CodecDecodeSelf(d) + yyv5 := &x.Max + yyv5.CodecDecodeSelf(d) } case "min": if r.TryDecodeAsNil() { x.Min = nil } else { - yyv4033 := &x.Min - yyv4033.CodecDecodeSelf(d) + yyv6 := &x.Min + yyv6.CodecDecodeSelf(d) } case "default": if r.TryDecodeAsNil() { x.Default = nil } else { - yyv4034 := &x.Default - yyv4034.CodecDecodeSelf(d) + yyv7 := &x.Default + yyv7.CodecDecodeSelf(d) } case "defaultRequest": if r.TryDecodeAsNil() { x.DefaultRequest = nil } else { - yyv4035 := &x.DefaultRequest - yyv4035.CodecDecodeSelf(d) + yyv8 := &x.DefaultRequest + yyv8.CodecDecodeSelf(d) } case "maxLimitRequestRatio": if r.TryDecodeAsNil() { x.MaxLimitRequestRatio = nil } else { - yyv4036 := &x.MaxLimitRequestRatio - yyv4036.CodecDecodeSelf(d) + yyv9 := &x.MaxLimitRequestRatio + yyv9.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys4030) - } // end switch yys4030 - } // end for yyj4030 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -50447,16 +59633,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4037 int - var yyb4037 bool - var yyhl4037 bool = l >= 0 - yyj4037++ - if yyhl4037 { - yyb4037 = yyj4037 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb4037 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb4037 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50464,15 +59650,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = LimitType(r.DecodeString()) + yyv11 := &x.Type + yyv11.CodecDecodeSelf(d) } - yyj4037++ - if yyhl4037 { - yyb4037 = yyj4037 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb4037 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb4037 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50480,16 +59667,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Max = nil } else { - yyv4039 := &x.Max - yyv4039.CodecDecodeSelf(d) + yyv12 := &x.Max + yyv12.CodecDecodeSelf(d) } - yyj4037++ - if yyhl4037 { - yyb4037 = yyj4037 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb4037 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb4037 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50497,16 +59684,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Min = nil } else { - yyv4040 := &x.Min - yyv4040.CodecDecodeSelf(d) + yyv13 := &x.Min + yyv13.CodecDecodeSelf(d) } - yyj4037++ - if yyhl4037 { - yyb4037 = yyj4037 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb4037 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb4037 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50514,16 +59701,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Default = nil } else { - yyv4041 := &x.Default - yyv4041.CodecDecodeSelf(d) + yyv14 := &x.Default + yyv14.CodecDecodeSelf(d) } - yyj4037++ - if yyhl4037 { - yyb4037 = yyj4037 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb4037 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb4037 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50531,16 +59718,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DefaultRequest = nil } else { - yyv4042 := &x.DefaultRequest - yyv4042.CodecDecodeSelf(d) + yyv15 := &x.DefaultRequest + yyv15.CodecDecodeSelf(d) } - yyj4037++ - if yyhl4037 { - yyb4037 = yyj4037 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb4037 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb4037 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50548,21 +59735,21 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.MaxLimitRequestRatio = nil } else { - yyv4043 := &x.MaxLimitRequestRatio - yyv4043.CodecDecodeSelf(d) + yyv16 := &x.MaxLimitRequestRatio + yyv16.CodecDecodeSelf(d) } for { - yyj4037++ - if yyhl4037 { - yyb4037 = yyj4037 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb4037 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb4037 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4037-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50574,36 +59761,36 @@ func (x *LimitRangeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4044 := z.EncBinary() - _ = yym4044 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4045 := !z.EncBinary() - yy2arr4045 := z.EncBasicHandle().StructToArray - var yyq4045 [1]bool - _, _, _ = yysep4045, yyq4045, yy2arr4045 - const yyr4045 bool = false - var yynn4045 int - if yyr4045 || yy2arr4045 { + 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 { - yynn4045 = 1 - for _, b := range yyq4045 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn4045++ + yynn2++ } } - r.EncodeMapStart(yynn4045) - yynn4045 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4045 || yy2arr4045 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Limits == nil { r.EncodeNil() } else { - yym4047 := z.EncBinary() - _ = yym4047 + yym4 := z.EncBinary() + _ = yym4 if false { } else { h.encSliceLimitRangeItem(([]LimitRangeItem)(x.Limits), e) @@ -50616,15 +59803,15 @@ func (x *LimitRangeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x.Limits == nil { r.EncodeNil() } else { - yym4048 := z.EncBinary() - _ = yym4048 + yym5 := z.EncBinary() + _ = yym5 if false { } else { h.encSliceLimitRangeItem(([]LimitRangeItem)(x.Limits), e) } } } - if yyr4045 || yy2arr4045 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -50637,25 +59824,25 @@ func (x *LimitRangeSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4049 := z.DecBinary() - _ = yym4049 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4050 := r.ContainerType() - if yyct4050 == codecSelferValueTypeMap1234 { - yyl4050 := r.ReadMapStart() - if yyl4050 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4050, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4050 == codecSelferValueTypeArray1234 { - yyl4050 := r.ReadArrayStart() - if yyl4050 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4050, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -50667,12 +59854,12 @@ func (x *LimitRangeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4051Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4051Slc - var yyhl4051 bool = l >= 0 - for yyj4051 := 0; ; yyj4051++ { - if yyhl4051 { - if yyj4051 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -50681,26 +59868,26 @@ func (x *LimitRangeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4051Slc = r.DecodeBytes(yys4051Slc, true, true) - yys4051 := string(yys4051Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4051 { + switch yys3 { case "limits": if r.TryDecodeAsNil() { x.Limits = nil } else { - yyv4052 := &x.Limits - yym4053 := z.DecBinary() - _ = yym4053 + yyv4 := &x.Limits + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv4052), d) + h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv4), d) } } default: - z.DecStructFieldNotFound(-1, yys4051) - } // end switch yys4051 - } // end for yyj4051 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -50708,16 +59895,16 @@ func (x *LimitRangeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4054 int - var yyb4054 bool - var yyhl4054 bool = l >= 0 - yyj4054++ - if yyhl4054 { - yyb4054 = yyj4054 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb4054 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb4054 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50725,26 +59912,26 @@ func (x *LimitRangeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Limits = nil } else { - yyv4055 := &x.Limits - yym4056 := z.DecBinary() - _ = yym4056 + yyv7 := &x.Limits + yym8 := z.DecBinary() + _ = yym8 if false { } else { - h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv4055), d) + h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv7), d) } } for { - yyj4054++ - if yyhl4054 { - yyb4054 = yyj4054 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb4054 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb4054 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4054-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50756,38 +59943,38 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4057 := z.EncBinary() - _ = yym4057 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4058 := !z.EncBinary() - yy2arr4058 := z.EncBasicHandle().StructToArray - var yyq4058 [4]bool - _, _, _ = yysep4058, yyq4058, yy2arr4058 - const yyr4058 bool = false - yyq4058[0] = x.Kind != "" - yyq4058[1] = x.APIVersion != "" - yyq4058[2] = true - yyq4058[3] = true - var yynn4058 int - if yyr4058 || yy2arr4058 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn4058 = 0 - for _, b := range yyq4058 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn4058++ + yynn2++ } } - r.EncodeMapStart(yynn4058) - yynn4058 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4058 || yy2arr4058 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4058[0] { - yym4060 := z.EncBinary() - _ = yym4060 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -50796,23 +59983,23 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4058[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4061 := z.EncBinary() - _ = yym4061 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4058 || yy2arr4058 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4058[1] { - yym4063 := z.EncBinary() - _ = yym4063 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -50821,53 +60008,65 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4058[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4064 := z.EncBinary() - _ = yym4064 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4058 || yy2arr4058 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4058[2] { - yy4066 := &x.ObjectMeta - yy4066.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq4058[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4067 := &x.ObjectMeta - yy4067.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr4058 || yy2arr4058 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4058[3] { - yy4069 := &x.Spec - yy4069.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq4058[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4070 := &x.Spec - yy4070.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr4058 || yy2arr4058 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -50880,25 +60079,25 @@ func (x *LimitRange) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4071 := z.DecBinary() - _ = yym4071 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4072 := r.ContainerType() - if yyct4072 == codecSelferValueTypeMap1234 { - yyl4072 := r.ReadMapStart() - if yyl4072 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4072, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4072 == codecSelferValueTypeArray1234 { - yyl4072 := r.ReadArrayStart() - if yyl4072 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4072, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -50910,12 +60109,12 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4073Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4073Slc - var yyhl4073 bool = l >= 0 - for yyj4073 := 0; ; yyj4073++ { - if yyhl4073 { - if yyj4073 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -50924,40 +60123,58 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4073Slc = r.DecodeBytes(yys4073Slc, true, true) - yys4073 := string(yys4073Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4073 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv4076 := &x.ObjectMeta - yyv4076.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv4077 := &x.Spec - yyv4077.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys4073) - } // end switch yys4073 - } // end for yyj4073 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -50965,16 +60182,16 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4078 int - var yyb4078 bool - var yyhl4078 bool = l >= 0 - yyj4078++ - if yyhl4078 { - yyb4078 = yyj4078 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb4078 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb4078 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50982,15 +60199,21 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } - yyj4078++ - if yyhl4078 { - yyb4078 = yyj4078 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb4078 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb4078 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50998,32 +60221,44 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj4078++ - if yyhl4078 { - yyb4078 = yyj4078 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb4078 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb4078 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv4081 := &x.ObjectMeta - yyv4081.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj4078++ - if yyhl4078 { - yyb4078 = yyj4078 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb4078 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb4078 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51031,21 +60266,21 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv4082 := &x.Spec - yyv4082.CodecDecodeSelf(d) + yyv18 := &x.Spec + yyv18.CodecDecodeSelf(d) } for { - yyj4078++ - if yyhl4078 { - yyb4078 = yyj4078 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb4078 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb4078 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4078-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -51057,37 +60292,37 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4083 := z.EncBinary() - _ = yym4083 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4084 := !z.EncBinary() - yy2arr4084 := z.EncBasicHandle().StructToArray - var yyq4084 [4]bool - _, _, _ = yysep4084, yyq4084, yy2arr4084 - const yyr4084 bool = false - yyq4084[0] = x.Kind != "" - yyq4084[1] = x.APIVersion != "" - yyq4084[2] = true - var yynn4084 int - if yyr4084 || yy2arr4084 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn4084 = 1 - for _, b := range yyq4084 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn4084++ + yynn2++ } } - r.EncodeMapStart(yynn4084) - yynn4084 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4084 || yy2arr4084 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4084[0] { - yym4086 := z.EncBinary() - _ = yym4086 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -51096,23 +60331,23 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4084[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4087 := z.EncBinary() - _ = yym4087 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4084 || yy2arr4084 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4084[1] { - yym4089 := z.EncBinary() - _ = yym4089 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -51121,54 +60356,54 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4084[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4090 := z.EncBinary() - _ = yym4090 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4084 || yy2arr4084 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4084[2] { - yy4092 := &x.ListMeta - yym4093 := z.EncBinary() - _ = yym4093 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy4092) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy4092) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq4084[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4094 := &x.ListMeta - yym4095 := z.EncBinary() - _ = yym4095 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy4094) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy4094) + z.EncFallback(yy12) } } } - if yyr4084 || yy2arr4084 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym4097 := z.EncBinary() - _ = yym4097 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceLimitRange(([]LimitRange)(x.Items), e) @@ -51181,15 +60416,15 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym4098 := z.EncBinary() - _ = yym4098 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceLimitRange(([]LimitRange)(x.Items), e) } } } - if yyr4084 || yy2arr4084 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -51202,25 +60437,25 @@ func (x *LimitRangeList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4099 := z.DecBinary() - _ = yym4099 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4100 := r.ContainerType() - if yyct4100 == codecSelferValueTypeMap1234 { - yyl4100 := r.ReadMapStart() - if yyl4100 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4100, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4100 == codecSelferValueTypeArray1234 { - yyl4100 := r.ReadArrayStart() - if yyl4100 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4100, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -51232,12 +60467,12 @@ func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4101Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4101Slc - var yyhl4101 bool = l >= 0 - for yyj4101 := 0; ; yyj4101++ { - if yyhl4101 { - if yyj4101 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -51246,51 +60481,63 @@ func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4101Slc = r.DecodeBytes(yys4101Slc, true, true) - yys4101 := string(yys4101Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4101 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv4104 := &x.ListMeta - yym4105 := z.DecBinary() - _ = yym4105 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv4104) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv4104, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4106 := &x.Items - yym4107 := z.DecBinary() - _ = yym4107 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceLimitRange((*[]LimitRange)(yyv4106), d) + h.decSliceLimitRange((*[]LimitRange)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys4101) - } // end switch yys4101 - } // end for yyj4101 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -51298,16 +60545,16 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4108 int - var yyb4108 bool - var yyhl4108 bool = l >= 0 - yyj4108++ - if yyhl4108 { - yyb4108 = yyj4108 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4108 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4108 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51315,15 +60562,21 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj4108++ - if yyhl4108 { - yyb4108 = yyj4108 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4108 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4108 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51331,38 +60584,44 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj4108++ - if yyhl4108 { - yyb4108 = yyj4108 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4108 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4108 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv4111 := &x.ListMeta - yym4112 := z.DecBinary() - _ = yym4112 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv4111) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv4111, false) + z.DecFallback(yyv17, false) } } - yyj4108++ - if yyhl4108 { - yyb4108 = yyj4108 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4108 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4108 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51370,26 +60629,26 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4113 := &x.Items - yym4114 := z.DecBinary() - _ = yym4114 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceLimitRange((*[]LimitRange)(yyv4113), d) + h.decSliceLimitRange((*[]LimitRange)(yyv19), d) } } for { - yyj4108++ - if yyhl4108 { - yyb4108 = yyj4108 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4108 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4108 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4108-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -51398,8 +60657,8 @@ func (x ResourceQuotaScope) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym4115 := z.EncBinary() - _ = yym4115 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -51411,8 +60670,8 @@ func (x *ResourceQuotaScope) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4116 := z.DecBinary() - _ = yym4116 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -51427,34 +60686,34 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4117 := z.EncBinary() - _ = yym4117 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4118 := !z.EncBinary() - yy2arr4118 := z.EncBasicHandle().StructToArray - var yyq4118 [2]bool - _, _, _ = yysep4118, yyq4118, yy2arr4118 - const yyr4118 bool = false - yyq4118[0] = len(x.Hard) != 0 - yyq4118[1] = len(x.Scopes) != 0 - var yynn4118 int - if yyr4118 || yy2arr4118 { + 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 { - yynn4118 = 0 - for _, b := range yyq4118 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn4118++ + yynn2++ } } - r.EncodeMapStart(yynn4118) - yynn4118 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4118 || yy2arr4118 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4118[0] { + if yyq2[0] { if x.Hard == nil { r.EncodeNil() } else { @@ -51464,7 +60723,7 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4118[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hard")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -51475,14 +60734,14 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4118 || yy2arr4118 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4118[1] { + if yyq2[1] { if x.Scopes == nil { r.EncodeNil() } else { - yym4121 := z.EncBinary() - _ = yym4121 + yym7 := z.EncBinary() + _ = yym7 if false { } else { h.encSliceResourceQuotaScope(([]ResourceQuotaScope)(x.Scopes), e) @@ -51492,15 +60751,15 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4118[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("scopes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Scopes == nil { r.EncodeNil() } else { - yym4122 := z.EncBinary() - _ = yym4122 + yym8 := z.EncBinary() + _ = yym8 if false { } else { h.encSliceResourceQuotaScope(([]ResourceQuotaScope)(x.Scopes), e) @@ -51508,7 +60767,7 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4118 || yy2arr4118 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -51521,25 +60780,25 @@ func (x *ResourceQuotaSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4123 := z.DecBinary() - _ = yym4123 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4124 := r.ContainerType() - if yyct4124 == codecSelferValueTypeMap1234 { - yyl4124 := r.ReadMapStart() - if yyl4124 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4124, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4124 == codecSelferValueTypeArray1234 { - yyl4124 := r.ReadArrayStart() - if yyl4124 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4124, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -51551,12 +60810,12 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4125Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4125Slc - var yyhl4125 bool = l >= 0 - for yyj4125 := 0; ; yyj4125++ { - if yyhl4125 { - if yyj4125 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -51565,33 +60824,33 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4125Slc = r.DecodeBytes(yys4125Slc, true, true) - yys4125 := string(yys4125Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4125 { + switch yys3 { case "hard": if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv4126 := &x.Hard - yyv4126.CodecDecodeSelf(d) + yyv4 := &x.Hard + yyv4.CodecDecodeSelf(d) } case "scopes": if r.TryDecodeAsNil() { x.Scopes = nil } else { - yyv4127 := &x.Scopes - yym4128 := z.DecBinary() - _ = yym4128 + yyv5 := &x.Scopes + yym6 := z.DecBinary() + _ = yym6 if false { } else { - h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv4127), d) + h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv5), d) } } default: - z.DecStructFieldNotFound(-1, yys4125) - } // end switch yys4125 - } // end for yyj4125 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -51599,16 +60858,16 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4129 int - var yyb4129 bool - var yyhl4129 bool = l >= 0 - yyj4129++ - if yyhl4129 { - yyb4129 = yyj4129 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb4129 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb4129 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51616,16 +60875,16 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv4130 := &x.Hard - yyv4130.CodecDecodeSelf(d) + yyv8 := &x.Hard + yyv8.CodecDecodeSelf(d) } - yyj4129++ - if yyhl4129 { - yyb4129 = yyj4129 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb4129 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb4129 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51633,26 +60892,26 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Scopes = nil } else { - yyv4131 := &x.Scopes - yym4132 := z.DecBinary() - _ = yym4132 + yyv9 := &x.Scopes + yym10 := z.DecBinary() + _ = yym10 if false { } else { - h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv4131), d) + h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv9), d) } } for { - yyj4129++ - if yyhl4129 { - yyb4129 = yyj4129 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb4129 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb4129 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4129-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -51664,34 +60923,34 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4133 := z.EncBinary() - _ = yym4133 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4134 := !z.EncBinary() - yy2arr4134 := z.EncBasicHandle().StructToArray - var yyq4134 [2]bool - _, _, _ = yysep4134, yyq4134, yy2arr4134 - const yyr4134 bool = false - yyq4134[0] = len(x.Hard) != 0 - yyq4134[1] = len(x.Used) != 0 - var yynn4134 int - if yyr4134 || yy2arr4134 { + 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 { - yynn4134 = 0 - for _, b := range yyq4134 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn4134++ + yynn2++ } } - r.EncodeMapStart(yynn4134) - yynn4134 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4134 || yy2arr4134 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4134[0] { + if yyq2[0] { if x.Hard == nil { r.EncodeNil() } else { @@ -51701,7 +60960,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4134[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hard")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -51712,9 +60971,9 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4134 || yy2arr4134 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4134[1] { + if yyq2[1] { if x.Used == nil { r.EncodeNil() } else { @@ -51724,7 +60983,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4134[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("used")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -51735,7 +60994,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4134 || yy2arr4134 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -51748,25 +61007,25 @@ func (x *ResourceQuotaStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4137 := z.DecBinary() - _ = yym4137 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4138 := r.ContainerType() - if yyct4138 == codecSelferValueTypeMap1234 { - yyl4138 := r.ReadMapStart() - if yyl4138 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4138, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4138 == codecSelferValueTypeArray1234 { - yyl4138 := r.ReadArrayStart() - if yyl4138 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4138, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -51778,12 +61037,12 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4139Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4139Slc - var yyhl4139 bool = l >= 0 - for yyj4139 := 0; ; yyj4139++ { - if yyhl4139 { - if yyj4139 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -51792,28 +61051,28 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4139Slc = r.DecodeBytes(yys4139Slc, true, true) - yys4139 := string(yys4139Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4139 { + switch yys3 { case "hard": if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv4140 := &x.Hard - yyv4140.CodecDecodeSelf(d) + yyv4 := &x.Hard + yyv4.CodecDecodeSelf(d) } case "used": if r.TryDecodeAsNil() { x.Used = nil } else { - yyv4141 := &x.Used - yyv4141.CodecDecodeSelf(d) + yyv5 := &x.Used + yyv5.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys4139) - } // end switch yys4139 - } // end for yyj4139 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -51821,16 +61080,16 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4142 int - var yyb4142 bool - var yyhl4142 bool = l >= 0 - yyj4142++ - if yyhl4142 { - yyb4142 = yyj4142 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb4142 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb4142 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51838,16 +61097,16 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv4143 := &x.Hard - yyv4143.CodecDecodeSelf(d) + yyv7 := &x.Hard + yyv7.CodecDecodeSelf(d) } - yyj4142++ - if yyhl4142 { - yyb4142 = yyj4142 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb4142 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb4142 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51855,21 +61114,21 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Used = nil } else { - yyv4144 := &x.Used - yyv4144.CodecDecodeSelf(d) + yyv8 := &x.Used + yyv8.CodecDecodeSelf(d) } for { - yyj4142++ - if yyhl4142 { - yyb4142 = yyj4142 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb4142 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb4142 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4142-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -51881,39 +61140,39 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4145 := z.EncBinary() - _ = yym4145 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4146 := !z.EncBinary() - yy2arr4146 := z.EncBasicHandle().StructToArray - var yyq4146 [5]bool - _, _, _ = yysep4146, yyq4146, yy2arr4146 - const yyr4146 bool = false - yyq4146[0] = x.Kind != "" - yyq4146[1] = x.APIVersion != "" - yyq4146[2] = true - yyq4146[3] = true - yyq4146[4] = true - var yynn4146 int - if yyr4146 || yy2arr4146 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn4146 = 0 - for _, b := range yyq4146 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn4146++ + yynn2++ } } - r.EncodeMapStart(yynn4146) - yynn4146 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4146 || yy2arr4146 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4146[0] { - yym4148 := z.EncBinary() - _ = yym4148 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -51922,23 +61181,23 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4146[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4149 := z.EncBinary() - _ = yym4149 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4146 || yy2arr4146 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4146[1] { - yym4151 := z.EncBinary() - _ = yym4151 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -51947,70 +61206,82 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4146[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4152 := z.EncBinary() - _ = yym4152 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4146 || yy2arr4146 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4146[2] { - yy4154 := &x.ObjectMeta - yy4154.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq4146[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4155 := &x.ObjectMeta - yy4155.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr4146 || yy2arr4146 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4146[3] { - yy4157 := &x.Spec - yy4157.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq4146[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4158 := &x.Spec - yy4158.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr4146 || yy2arr4146 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4146[4] { - yy4160 := &x.Status - yy4160.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq4146[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4161 := &x.Status - yy4161.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr4146 || yy2arr4146 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -52023,25 +61294,25 @@ func (x *ResourceQuota) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4162 := z.DecBinary() - _ = yym4162 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4163 := r.ContainerType() - if yyct4163 == codecSelferValueTypeMap1234 { - yyl4163 := r.ReadMapStart() - if yyl4163 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4163, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4163 == codecSelferValueTypeArray1234 { - yyl4163 := r.ReadArrayStart() - if yyl4163 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4163, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -52053,12 +61324,12 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4164Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4164Slc - var yyhl4164 bool = l >= 0 - for yyj4164 := 0; ; yyj4164++ { - if yyhl4164 { - if yyj4164 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -52067,47 +61338,65 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4164Slc = r.DecodeBytes(yys4164Slc, true, true) - yys4164 := string(yys4164Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4164 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv4167 := &x.ObjectMeta - yyv4167.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv4168 := &x.Spec - yyv4168.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv4169 := &x.Status - yyv4169.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys4164) - } // end switch yys4164 - } // end for yyj4164 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -52115,16 +61404,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4170 int - var yyb4170 bool - var yyhl4170 bool = l >= 0 - yyj4170++ - if yyhl4170 { - yyb4170 = yyj4170 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4170 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4170 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52132,15 +61421,21 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj4170++ - if yyhl4170 { - yyb4170 = yyj4170 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4170 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4170 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52148,32 +61443,44 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj4170++ - if yyhl4170 { - yyb4170 = yyj4170 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4170 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4170 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv4173 := &x.ObjectMeta - yyv4173.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj4170++ - if yyhl4170 { - yyb4170 = yyj4170 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4170 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4170 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52181,16 +61488,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv4174 := &x.Spec - yyv4174.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj4170++ - if yyhl4170 { - yyb4170 = yyj4170 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4170 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4170 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52198,21 +61505,21 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv4175 := &x.Status - yyv4175.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj4170++ - if yyhl4170 { - yyb4170 = yyj4170 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4170 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4170 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4170-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -52224,37 +61531,37 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4176 := z.EncBinary() - _ = yym4176 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4177 := !z.EncBinary() - yy2arr4177 := z.EncBasicHandle().StructToArray - var yyq4177 [4]bool - _, _, _ = yysep4177, yyq4177, yy2arr4177 - const yyr4177 bool = false - yyq4177[0] = x.Kind != "" - yyq4177[1] = x.APIVersion != "" - yyq4177[2] = true - var yynn4177 int - if yyr4177 || yy2arr4177 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn4177 = 1 - for _, b := range yyq4177 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn4177++ + yynn2++ } } - r.EncodeMapStart(yynn4177) - yynn4177 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4177 || yy2arr4177 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4177[0] { - yym4179 := z.EncBinary() - _ = yym4179 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -52263,23 +61570,23 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4177[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4180 := z.EncBinary() - _ = yym4180 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4177 || yy2arr4177 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4177[1] { - yym4182 := z.EncBinary() - _ = yym4182 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -52288,54 +61595,54 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4177[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4183 := z.EncBinary() - _ = yym4183 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4177 || yy2arr4177 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4177[2] { - yy4185 := &x.ListMeta - yym4186 := z.EncBinary() - _ = yym4186 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy4185) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy4185) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq4177[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4187 := &x.ListMeta - yym4188 := z.EncBinary() - _ = yym4188 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy4187) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy4187) + z.EncFallback(yy12) } } } - if yyr4177 || yy2arr4177 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym4190 := z.EncBinary() - _ = yym4190 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e) @@ -52348,15 +61655,15 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym4191 := z.EncBinary() - _ = yym4191 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e) } } } - if yyr4177 || yy2arr4177 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -52369,25 +61676,25 @@ func (x *ResourceQuotaList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4192 := z.DecBinary() - _ = yym4192 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4193 := r.ContainerType() - if yyct4193 == codecSelferValueTypeMap1234 { - yyl4193 := r.ReadMapStart() - if yyl4193 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4193, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4193 == codecSelferValueTypeArray1234 { - yyl4193 := r.ReadArrayStart() - if yyl4193 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4193, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -52399,12 +61706,12 @@ func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4194Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4194Slc - var yyhl4194 bool = l >= 0 - for yyj4194 := 0; ; yyj4194++ { - if yyhl4194 { - if yyj4194 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -52413,51 +61720,63 @@ func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4194Slc = r.DecodeBytes(yys4194Slc, true, true) - yys4194 := string(yys4194Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4194 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv4197 := &x.ListMeta - yym4198 := z.DecBinary() - _ = yym4198 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv4197) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv4197, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4199 := &x.Items - yym4200 := z.DecBinary() - _ = yym4200 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceResourceQuota((*[]ResourceQuota)(yyv4199), d) + h.decSliceResourceQuota((*[]ResourceQuota)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys4194) - } // end switch yys4194 - } // end for yyj4194 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -52465,16 +61784,16 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4201 int - var yyb4201 bool - var yyhl4201 bool = l >= 0 - yyj4201++ - if yyhl4201 { - yyb4201 = yyj4201 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4201 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4201 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52482,15 +61801,21 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj4201++ - if yyhl4201 { - yyb4201 = yyj4201 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4201 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4201 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52498,38 +61823,44 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj4201++ - if yyhl4201 { - yyb4201 = yyj4201 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4201 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4201 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv4204 := &x.ListMeta - yym4205 := z.DecBinary() - _ = yym4205 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv4204) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv4204, false) + z.DecFallback(yyv17, false) } } - yyj4201++ - if yyhl4201 { - yyb4201 = yyj4201 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4201 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4201 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52537,26 +61868,26 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4206 := &x.Items - yym4207 := z.DecBinary() - _ = yym4207 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceResourceQuota((*[]ResourceQuota)(yyv4206), d) + h.decSliceResourceQuota((*[]ResourceQuota)(yyv19), d) } } for { - yyj4201++ - if yyhl4201 { - yyb4201 = yyj4201 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4201 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4201 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4201-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -52568,39 +61899,40 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4208 := z.EncBinary() - _ = yym4208 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4209 := !z.EncBinary() - yy2arr4209 := z.EncBasicHandle().StructToArray - var yyq4209 [5]bool - _, _, _ = yysep4209, yyq4209, yy2arr4209 - const yyr4209 bool = false - yyq4209[0] = x.Kind != "" - yyq4209[1] = x.APIVersion != "" - yyq4209[2] = true - yyq4209[3] = len(x.Data) != 0 - yyq4209[4] = x.Type != "" - var yynn4209 int - if yyr4209 || yy2arr4209 { - r.EncodeArrayStart(5) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [6]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = len(x.Data) != 0 + yyq2[4] = len(x.StringData) != 0 + yyq2[5] = x.Type != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(6) } else { - yynn4209 = 0 - for _, b := range yyq4209 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn4209++ + yynn2++ } } - r.EncodeMapStart(yynn4209) - yynn4209 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4209 || yy2arr4209 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4209[0] { - yym4211 := z.EncBinary() - _ = yym4211 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -52609,23 +61941,23 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4209[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4212 := z.EncBinary() - _ = yym4212 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4209 || yy2arr4209 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4209[1] { - yym4214 := z.EncBinary() - _ = yym4214 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -52634,43 +61966,55 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4209[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4215 := z.EncBinary() - _ = yym4215 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4209 || yy2arr4209 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4209[2] { - yy4217 := &x.ObjectMeta - yy4217.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq4209[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4218 := &x.ObjectMeta - yy4218.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr4209 || yy2arr4209 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4209[3] { + if yyq2[3] { if x.Data == nil { r.EncodeNil() } else { - yym4220 := z.EncBinary() - _ = yym4220 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e) @@ -52680,15 +62024,15 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4209[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("data")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Data == nil { r.EncodeNil() } else { - yym4221 := z.EncBinary() - _ = yym4221 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e) @@ -52696,22 +62040,55 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4209 || yy2arr4209 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4209[4] { + if yyq2[4] { + if x.StringData == nil { + r.EncodeNil() + } else { + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + z.F.EncMapStringStringV(x.StringData, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("stringData")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.StringData == nil { + r.EncodeNil() + } else { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + z.F.EncMapStringStringV(x.StringData, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4209[4] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } } - if yyr4209 || yy2arr4209 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -52724,25 +62101,25 @@ func (x *Secret) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4223 := z.DecBinary() - _ = yym4223 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4224 := r.ContainerType() - if yyct4224 == codecSelferValueTypeMap1234 { - yyl4224 := r.ReadMapStart() - if yyl4224 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4224, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4224 == codecSelferValueTypeArray1234 { - yyl4224 := r.ReadArrayStart() - if yyl4224 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4224, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -52754,12 +62131,12 @@ func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4225Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4225Slc - var yyhl4225 bool = l >= 0 - for yyj4225 := 0; ; yyj4225++ { - if yyhl4225 { - if yyj4225 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -52768,51 +62145,82 @@ func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4225Slc = r.DecodeBytes(yys4225Slc, true, true) - yys4225 := string(yys4225Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4225 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv4228 := &x.ObjectMeta - yyv4228.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4229 := &x.Data - yym4230 := z.DecBinary() - _ = yym4230 + yyv10 := &x.Data + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv4229), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv10), d) + } + } + case "stringData": + if r.TryDecodeAsNil() { + x.StringData = nil + } else { + yyv12 := &x.StringData + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + z.F.DecMapStringStringX(yyv12, false, d) } } case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = SecretType(r.DecodeString()) + yyv14 := &x.Type + yyv14.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys4225) - } // end switch yys4225 - } // end for yyj4225 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -52820,16 +62228,16 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4232 int - var yyb4232 bool - var yyhl4232 bool = l >= 0 - yyj4232++ - if yyhl4232 { - yyb4232 = yyj4232 > l + var yyj15 int + var yyb15 bool + var yyhl15 bool = l >= 0 + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb4232 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb4232 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52837,15 +62245,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv16 := &x.Kind + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } - yyj4232++ - if yyhl4232 { - yyb4232 = yyj4232 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb4232 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb4232 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52853,32 +62267,44 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv18 := &x.APIVersion + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *((*string)(yyv18)) = r.DecodeString() + } } - yyj4232++ - if yyhl4232 { - yyb4232 = yyj4232 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb4232 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb4232 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv4235 := &x.ObjectMeta - yyv4235.CodecDecodeSelf(d) + yyv20 := &x.ObjectMeta + yym21 := z.DecBinary() + _ = yym21 + if false { + } else if z.HasExtensions() && z.DecExt(yyv20) { + } else { + z.DecFallback(yyv20, false) + } } - yyj4232++ - if yyhl4232 { - yyb4232 = yyj4232 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb4232 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb4232 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52886,21 +62312,43 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4236 := &x.Data - yym4237 := z.DecBinary() - _ = yym4237 + yyv22 := &x.Data + yym23 := z.DecBinary() + _ = yym23 if false { } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv4236), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv22), d) } } - yyj4232++ - if yyhl4232 { - yyb4232 = yyj4232 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb4232 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb4232 { + if yyb15 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.StringData = nil + } else { + yyv24 := &x.StringData + yym25 := z.DecBinary() + _ = yym25 + if false { + } else { + z.F.DecMapStringStringX(yyv24, false, d) + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52908,20 +62356,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = SecretType(r.DecodeString()) + yyv26 := &x.Type + yyv26.CodecDecodeSelf(d) } for { - yyj4232++ - if yyhl4232 { - yyb4232 = yyj4232 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb4232 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb4232 { + if yyb15 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4232-1, "") + z.DecStructFieldNotFound(yyj15-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -52930,8 +62379,8 @@ func (x SecretType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym4239 := z.EncBinary() - _ = yym4239 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -52943,8 +62392,8 @@ func (x *SecretType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4240 := z.DecBinary() - _ = yym4240 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -52959,37 +62408,37 @@ func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4241 := z.EncBinary() - _ = yym4241 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4242 := !z.EncBinary() - yy2arr4242 := z.EncBasicHandle().StructToArray - var yyq4242 [4]bool - _, _, _ = yysep4242, yyq4242, yy2arr4242 - const yyr4242 bool = false - yyq4242[0] = x.Kind != "" - yyq4242[1] = x.APIVersion != "" - yyq4242[2] = true - var yynn4242 int - if yyr4242 || yy2arr4242 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn4242 = 1 - for _, b := range yyq4242 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn4242++ + yynn2++ } } - r.EncodeMapStart(yynn4242) - yynn4242 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4242 || yy2arr4242 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4242[0] { - yym4244 := z.EncBinary() - _ = yym4244 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -52998,23 +62447,23 @@ func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4242[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4245 := z.EncBinary() - _ = yym4245 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4242 || yy2arr4242 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4242[1] { - yym4247 := z.EncBinary() - _ = yym4247 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -53023,54 +62472,54 @@ func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4242[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4248 := z.EncBinary() - _ = yym4248 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4242 || yy2arr4242 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4242[2] { - yy4250 := &x.ListMeta - yym4251 := z.EncBinary() - _ = yym4251 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy4250) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy4250) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq4242[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4252 := &x.ListMeta - yym4253 := z.EncBinary() - _ = yym4253 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy4252) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy4252) + z.EncFallback(yy12) } } } - if yyr4242 || yy2arr4242 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym4255 := z.EncBinary() - _ = yym4255 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceSecret(([]Secret)(x.Items), e) @@ -53083,15 +62532,15 @@ func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym4256 := z.EncBinary() - _ = yym4256 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceSecret(([]Secret)(x.Items), e) } } } - if yyr4242 || yy2arr4242 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -53104,25 +62553,25 @@ func (x *SecretList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4257 := z.DecBinary() - _ = yym4257 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4258 := r.ContainerType() - if yyct4258 == codecSelferValueTypeMap1234 { - yyl4258 := r.ReadMapStart() - if yyl4258 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4258, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4258 == codecSelferValueTypeArray1234 { - yyl4258 := r.ReadArrayStart() - if yyl4258 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4258, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -53134,12 +62583,12 @@ func (x *SecretList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4259Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4259Slc - var yyhl4259 bool = l >= 0 - for yyj4259 := 0; ; yyj4259++ { - if yyhl4259 { - if yyj4259 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -53148,51 +62597,63 @@ func (x *SecretList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4259Slc = r.DecodeBytes(yys4259Slc, true, true) - yys4259 := string(yys4259Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4259 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv4262 := &x.ListMeta - yym4263 := z.DecBinary() - _ = yym4263 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv4262) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv4262, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4264 := &x.Items - yym4265 := z.DecBinary() - _ = yym4265 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceSecret((*[]Secret)(yyv4264), d) + h.decSliceSecret((*[]Secret)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys4259) - } // end switch yys4259 - } // end for yyj4259 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -53200,16 +62661,16 @@ func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4266 int - var yyb4266 bool - var yyhl4266 bool = l >= 0 - yyj4266++ - if yyhl4266 { - yyb4266 = yyj4266 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4266 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4266 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53217,15 +62678,21 @@ func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj4266++ - if yyhl4266 { - yyb4266 = yyj4266 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4266 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4266 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53233,38 +62700,44 @@ func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj4266++ - if yyhl4266 { - yyb4266 = yyj4266 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4266 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4266 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv4269 := &x.ListMeta - yym4270 := z.DecBinary() - _ = yym4270 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv4269) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv4269, false) + z.DecFallback(yyv17, false) } } - yyj4266++ - if yyhl4266 { - yyb4266 = yyj4266 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4266 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4266 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53272,26 +62745,26 @@ func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4271 := &x.Items - yym4272 := z.DecBinary() - _ = yym4272 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceSecret((*[]Secret)(yyv4271), d) + h.decSliceSecret((*[]Secret)(yyv19), d) } } for { - yyj4266++ - if yyhl4266 { - yyb4266 = yyj4266 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4266 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4266 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4266-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -53303,38 +62776,38 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4273 := z.EncBinary() - _ = yym4273 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4274 := !z.EncBinary() - yy2arr4274 := z.EncBasicHandle().StructToArray - var yyq4274 [4]bool - _, _, _ = yysep4274, yyq4274, yy2arr4274 - const yyr4274 bool = false - yyq4274[0] = x.Kind != "" - yyq4274[1] = x.APIVersion != "" - yyq4274[2] = true - yyq4274[3] = len(x.Data) != 0 - var yynn4274 int - if yyr4274 || yy2arr4274 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = len(x.Data) != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn4274 = 0 - for _, b := range yyq4274 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn4274++ + yynn2++ } } - r.EncodeMapStart(yynn4274) - yynn4274 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4274 || yy2arr4274 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4274[0] { - yym4276 := z.EncBinary() - _ = yym4276 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -53343,23 +62816,23 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4274[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4277 := z.EncBinary() - _ = yym4277 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4274 || yy2arr4274 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4274[1] { - yym4279 := z.EncBinary() - _ = yym4279 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -53368,43 +62841,55 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4274[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4280 := z.EncBinary() - _ = yym4280 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4274 || yy2arr4274 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4274[2] { - yy4282 := &x.ObjectMeta - yy4282.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq4274[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4283 := &x.ObjectMeta - yy4283.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr4274 || yy2arr4274 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4274[3] { + if yyq2[3] { if x.Data == nil { r.EncodeNil() } else { - yym4285 := z.EncBinary() - _ = yym4285 + yym15 := z.EncBinary() + _ = yym15 if false { } else { z.F.EncMapStringStringV(x.Data, false, e) @@ -53414,15 +62899,15 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4274[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("data")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Data == nil { r.EncodeNil() } else { - yym4286 := z.EncBinary() - _ = yym4286 + yym16 := z.EncBinary() + _ = yym16 if false { } else { z.F.EncMapStringStringV(x.Data, false, e) @@ -53430,7 +62915,7 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4274 || yy2arr4274 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -53443,25 +62928,25 @@ func (x *ConfigMap) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4287 := z.DecBinary() - _ = yym4287 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4288 := r.ContainerType() - if yyct4288 == codecSelferValueTypeMap1234 { - yyl4288 := r.ReadMapStart() - if yyl4288 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4288, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4288 == codecSelferValueTypeArray1234 { - yyl4288 := r.ReadArrayStart() - if yyl4288 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4288, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -53473,12 +62958,12 @@ func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4289Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4289Slc - var yyhl4289 bool = l >= 0 - for yyj4289 := 0; ; yyj4289++ { - if yyhl4289 { - if yyj4289 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -53487,45 +62972,63 @@ func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4289Slc = r.DecodeBytes(yys4289Slc, true, true) - yys4289 := string(yys4289Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4289 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv4292 := &x.ObjectMeta - yyv4292.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4293 := &x.Data - yym4294 := z.DecBinary() - _ = yym4294 + yyv10 := &x.Data + yym11 := z.DecBinary() + _ = yym11 if false { } else { - z.F.DecMapStringStringX(yyv4293, false, d) + z.F.DecMapStringStringX(yyv10, false, d) } } default: - z.DecStructFieldNotFound(-1, yys4289) - } // end switch yys4289 - } // end for yyj4289 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -53533,16 +63036,16 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4295 int - var yyb4295 bool - var yyhl4295 bool = l >= 0 - yyj4295++ - if yyhl4295 { - yyb4295 = yyj4295 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4295 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4295 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53550,15 +63053,21 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj4295++ - if yyhl4295 { - yyb4295 = yyj4295 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4295 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4295 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53566,32 +63075,44 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj4295++ - if yyhl4295 { - yyb4295 = yyj4295 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4295 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4295 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv4298 := &x.ObjectMeta - yyv4298.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj4295++ - if yyhl4295 { - yyb4295 = yyj4295 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4295 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4295 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53599,26 +63120,26 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4299 := &x.Data - yym4300 := z.DecBinary() - _ = yym4300 + yyv19 := &x.Data + yym20 := z.DecBinary() + _ = yym20 if false { } else { - z.F.DecMapStringStringX(yyv4299, false, d) + z.F.DecMapStringStringX(yyv19, false, d) } } for { - yyj4295++ - if yyhl4295 { - yyb4295 = yyj4295 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4295 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4295 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4295-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -53630,37 +63151,37 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4301 := z.EncBinary() - _ = yym4301 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4302 := !z.EncBinary() - yy2arr4302 := z.EncBasicHandle().StructToArray - var yyq4302 [4]bool - _, _, _ = yysep4302, yyq4302, yy2arr4302 - const yyr4302 bool = false - yyq4302[0] = x.Kind != "" - yyq4302[1] = x.APIVersion != "" - yyq4302[2] = true - var yynn4302 int - if yyr4302 || yy2arr4302 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn4302 = 1 - for _, b := range yyq4302 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn4302++ + yynn2++ } } - r.EncodeMapStart(yynn4302) - yynn4302 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4302 || yy2arr4302 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4302[0] { - yym4304 := z.EncBinary() - _ = yym4304 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -53669,23 +63190,23 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4302[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4305 := z.EncBinary() - _ = yym4305 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4302 || yy2arr4302 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4302[1] { - yym4307 := z.EncBinary() - _ = yym4307 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -53694,54 +63215,54 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4302[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4308 := z.EncBinary() - _ = yym4308 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4302 || yy2arr4302 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4302[2] { - yy4310 := &x.ListMeta - yym4311 := z.EncBinary() - _ = yym4311 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy4310) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy4310) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq4302[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4312 := &x.ListMeta - yym4313 := z.EncBinary() - _ = yym4313 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy4312) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy4312) + z.EncFallback(yy12) } } } - if yyr4302 || yy2arr4302 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym4315 := z.EncBinary() - _ = yym4315 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceConfigMap(([]ConfigMap)(x.Items), e) @@ -53754,15 +63275,15 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym4316 := z.EncBinary() - _ = yym4316 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceConfigMap(([]ConfigMap)(x.Items), e) } } } - if yyr4302 || yy2arr4302 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -53775,25 +63296,25 @@ func (x *ConfigMapList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4317 := z.DecBinary() - _ = yym4317 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4318 := r.ContainerType() - if yyct4318 == codecSelferValueTypeMap1234 { - yyl4318 := r.ReadMapStart() - if yyl4318 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4318, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4318 == codecSelferValueTypeArray1234 { - yyl4318 := r.ReadArrayStart() - if yyl4318 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4318, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -53805,12 +63326,12 @@ func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4319Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4319Slc - var yyhl4319 bool = l >= 0 - for yyj4319 := 0; ; yyj4319++ { - if yyhl4319 { - if yyj4319 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -53819,51 +63340,63 @@ func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4319Slc = r.DecodeBytes(yys4319Slc, true, true) - yys4319 := string(yys4319Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4319 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv4322 := &x.ListMeta - yym4323 := z.DecBinary() - _ = yym4323 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv4322) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv4322, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4324 := &x.Items - yym4325 := z.DecBinary() - _ = yym4325 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceConfigMap((*[]ConfigMap)(yyv4324), d) + h.decSliceConfigMap((*[]ConfigMap)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys4319) - } // end switch yys4319 - } // end for yyj4319 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -53871,16 +63404,16 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4326 int - var yyb4326 bool - var yyhl4326 bool = l >= 0 - yyj4326++ - if yyhl4326 { - yyb4326 = yyj4326 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4326 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4326 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53888,15 +63421,21 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj4326++ - if yyhl4326 { - yyb4326 = yyj4326 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4326 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4326 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53904,38 +63443,44 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj4326++ - if yyhl4326 { - yyb4326 = yyj4326 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4326 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4326 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv4329 := &x.ListMeta - yym4330 := z.DecBinary() - _ = yym4330 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv4329) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv4329, false) + z.DecFallback(yyv17, false) } } - yyj4326++ - if yyhl4326 { - yyb4326 = yyj4326 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4326 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4326 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53943,62 +63488,36 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4331 := &x.Items - yym4332 := z.DecBinary() - _ = yym4332 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceConfigMap((*[]ConfigMap)(yyv4331), d) + h.decSliceConfigMap((*[]ConfigMap)(yyv19), d) } } for { - yyj4326++ - if yyhl4326 { - yyb4326 = yyj4326 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4326 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4326 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4326-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x PatchType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym4333 := z.EncBinary() - _ = yym4333 - 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 - yym4334 := z.DecBinary() - _ = yym4334 - 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 - yym4335 := z.EncBinary() - _ = yym4335 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -54010,8 +63529,8 @@ func (x *ComponentConditionType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4336 := z.DecBinary() - _ = yym4336 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -54026,32 +63545,32 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4337 := z.EncBinary() - _ = yym4337 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4338 := !z.EncBinary() - yy2arr4338 := z.EncBasicHandle().StructToArray - var yyq4338 [4]bool - _, _, _ = yysep4338, yyq4338, yy2arr4338 - const yyr4338 bool = false - yyq4338[2] = x.Message != "" - yyq4338[3] = x.Error != "" - var yynn4338 int - if yyr4338 || yy2arr4338 { + 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 { - yynn4338 = 2 - for _, b := range yyq4338 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn4338++ + yynn2++ } } - r.EncodeMapStart(yynn4338) - yynn4338 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4338 || yy2arr4338 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Type.CodecEncodeSelf(e) } else { @@ -54060,7 +63579,7 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } - if yyr4338 || yy2arr4338 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Status.CodecEncodeSelf(e) } else { @@ -54069,11 +63588,11 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Status.CodecEncodeSelf(e) } - if yyr4338 || yy2arr4338 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4338[2] { - yym4342 := z.EncBinary() - _ = yym4342 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -54082,23 +63601,23 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4338[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4343 := z.EncBinary() - _ = yym4343 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr4338 || yy2arr4338 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4338[3] { - yym4345 := z.EncBinary() - _ = yym4345 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Error)) @@ -54107,19 +63626,19 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4338[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("error")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4346 := z.EncBinary() - _ = yym4346 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Error)) } } } - if yyr4338 || yy2arr4338 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -54132,25 +63651,25 @@ func (x *ComponentCondition) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4347 := z.DecBinary() - _ = yym4347 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4348 := r.ContainerType() - if yyct4348 == codecSelferValueTypeMap1234 { - yyl4348 := r.ReadMapStart() - if yyl4348 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4348, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4348 == codecSelferValueTypeArray1234 { - yyl4348 := r.ReadArrayStart() - if yyl4348 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4348, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -54162,12 +63681,12 @@ func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4349Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4349Slc - var yyhl4349 bool = l >= 0 - for yyj4349 := 0; ; yyj4349++ { - if yyhl4349 { - if yyj4349 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -54176,38 +63695,52 @@ func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4349Slc = r.DecodeBytes(yys4349Slc, true, true) - yys4349 := string(yys4349Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4349 { + switch yys3 { case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = ComponentConditionType(r.DecodeString()) + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = "" } else { - x.Status = ConditionStatus(r.DecodeString()) + yyv5 := &x.Status + yyv5.CodecDecodeSelf(d) } case "message": if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv6 := &x.Message + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "error": if r.TryDecodeAsNil() { x.Error = "" } else { - x.Error = string(r.DecodeString()) + yyv8 := &x.Error + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys4349) - } // end switch yys4349 - } // end for yyj4349 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -54215,16 +63748,16 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4354 int - var yyb4354 bool - var yyhl4354 bool = l >= 0 - yyj4354++ - if yyhl4354 { - yyb4354 = yyj4354 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb4354 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb4354 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54232,15 +63765,16 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = ComponentConditionType(r.DecodeString()) + yyv11 := &x.Type + yyv11.CodecDecodeSelf(d) } - yyj4354++ - if yyhl4354 { - yyb4354 = yyj4354 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb4354 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb4354 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54248,15 +63782,16 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Status = "" } else { - x.Status = ConditionStatus(r.DecodeString()) + yyv12 := &x.Status + yyv12.CodecDecodeSelf(d) } - yyj4354++ - if yyhl4354 { - yyb4354 = yyj4354 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb4354 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb4354 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54264,15 +63799,21 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Message = "" } else { - x.Message = string(r.DecodeString()) + yyv13 := &x.Message + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj4354++ - if yyhl4354 { - yyb4354 = yyj4354 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb4354 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb4354 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54280,20 +63821,26 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Error = "" } else { - x.Error = string(r.DecodeString()) + yyv15 := &x.Error + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } for { - yyj4354++ - if yyhl4354 { - yyb4354 = yyj4354 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb4354 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb4354 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4354-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54305,38 +63852,38 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4359 := z.EncBinary() - _ = yym4359 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4360 := !z.EncBinary() - yy2arr4360 := z.EncBasicHandle().StructToArray - var yyq4360 [4]bool - _, _, _ = yysep4360, yyq4360, yy2arr4360 - const yyr4360 bool = false - yyq4360[0] = x.Kind != "" - yyq4360[1] = x.APIVersion != "" - yyq4360[2] = true - yyq4360[3] = len(x.Conditions) != 0 - var yynn4360 int - if yyr4360 || yy2arr4360 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = len(x.Conditions) != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn4360 = 0 - for _, b := range yyq4360 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn4360++ + yynn2++ } } - r.EncodeMapStart(yynn4360) - yynn4360 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4360 || yy2arr4360 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4360[0] { - yym4362 := z.EncBinary() - _ = yym4362 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -54345,23 +63892,23 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4360[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4363 := z.EncBinary() - _ = yym4363 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4360 || yy2arr4360 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4360[1] { - yym4365 := z.EncBinary() - _ = yym4365 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -54370,43 +63917,55 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4360[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4366 := z.EncBinary() - _ = yym4366 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4360 || yy2arr4360 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4360[2] { - yy4368 := &x.ObjectMeta - yy4368.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq4360[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4369 := &x.ObjectMeta - yy4369.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr4360 || yy2arr4360 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4360[3] { + if yyq2[3] { if x.Conditions == nil { r.EncodeNil() } else { - yym4371 := z.EncBinary() - _ = yym4371 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e) @@ -54416,15 +63975,15 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4360[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("conditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Conditions == nil { r.EncodeNil() } else { - yym4372 := z.EncBinary() - _ = yym4372 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e) @@ -54432,7 +63991,7 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4360 || yy2arr4360 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -54445,25 +64004,25 @@ func (x *ComponentStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4373 := z.DecBinary() - _ = yym4373 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4374 := r.ContainerType() - if yyct4374 == codecSelferValueTypeMap1234 { - yyl4374 := r.ReadMapStart() - if yyl4374 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4374, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4374 == codecSelferValueTypeArray1234 { - yyl4374 := r.ReadArrayStart() - if yyl4374 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4374, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -54475,12 +64034,12 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4375Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4375Slc - var yyhl4375 bool = l >= 0 - for yyj4375 := 0; ; yyj4375++ { - if yyhl4375 { - if yyj4375 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -54489,45 +64048,63 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4375Slc = r.DecodeBytes(yys4375Slc, true, true) - yys4375 := string(yys4375Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4375 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv4378 := &x.ObjectMeta - yyv4378.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "conditions": if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv4379 := &x.Conditions - yym4380 := z.DecBinary() - _ = yym4380 + yyv10 := &x.Conditions + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv4379), d) + h.decSliceComponentCondition((*[]ComponentCondition)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys4375) - } // end switch yys4375 - } // end for yyj4375 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -54535,16 +64112,16 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4381 int - var yyb4381 bool - var yyhl4381 bool = l >= 0 - yyj4381++ - if yyhl4381 { - yyb4381 = yyj4381 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4381 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4381 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54552,15 +64129,21 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj4381++ - if yyhl4381 { - yyb4381 = yyj4381 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4381 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4381 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54568,32 +64151,44 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj4381++ - if yyhl4381 { - yyb4381 = yyj4381 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4381 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4381 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv4384 := &x.ObjectMeta - yyv4384.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj4381++ - if yyhl4381 { - yyb4381 = yyj4381 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4381 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4381 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54601,26 +64196,26 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv4385 := &x.Conditions - yym4386 := z.DecBinary() - _ = yym4386 + yyv19 := &x.Conditions + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv4385), d) + h.decSliceComponentCondition((*[]ComponentCondition)(yyv19), d) } } for { - yyj4381++ - if yyhl4381 { - yyb4381 = yyj4381 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4381 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4381 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4381-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54632,37 +64227,37 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4387 := z.EncBinary() - _ = yym4387 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4388 := !z.EncBinary() - yy2arr4388 := z.EncBasicHandle().StructToArray - var yyq4388 [4]bool - _, _, _ = yysep4388, yyq4388, yy2arr4388 - const yyr4388 bool = false - yyq4388[0] = x.Kind != "" - yyq4388[1] = x.APIVersion != "" - yyq4388[2] = true - var yynn4388 int - if yyr4388 || yy2arr4388 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn4388 = 1 - for _, b := range yyq4388 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn4388++ + yynn2++ } } - r.EncodeMapStart(yynn4388) - yynn4388 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4388 || yy2arr4388 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4388[0] { - yym4390 := z.EncBinary() - _ = yym4390 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -54671,23 +64266,23 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4388[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4391 := z.EncBinary() - _ = yym4391 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4388 || yy2arr4388 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4388[1] { - yym4393 := z.EncBinary() - _ = yym4393 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -54696,54 +64291,54 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4388[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4394 := z.EncBinary() - _ = yym4394 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4388 || yy2arr4388 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4388[2] { - yy4396 := &x.ListMeta - yym4397 := z.EncBinary() - _ = yym4397 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy4396) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy4396) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq4388[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4398 := &x.ListMeta - yym4399 := z.EncBinary() - _ = yym4399 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy4398) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy4398) + z.EncFallback(yy12) } } } - if yyr4388 || yy2arr4388 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym4401 := z.EncBinary() - _ = yym4401 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e) @@ -54756,15 +64351,15 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym4402 := z.EncBinary() - _ = yym4402 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e) } } } - if yyr4388 || yy2arr4388 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -54777,25 +64372,25 @@ func (x *ComponentStatusList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4403 := z.DecBinary() - _ = yym4403 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4404 := r.ContainerType() - if yyct4404 == codecSelferValueTypeMap1234 { - yyl4404 := r.ReadMapStart() - if yyl4404 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4404, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4404 == codecSelferValueTypeArray1234 { - yyl4404 := r.ReadArrayStart() - if yyl4404 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4404, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -54807,12 +64402,12 @@ func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4405Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4405Slc - var yyhl4405 bool = l >= 0 - for yyj4405 := 0; ; yyj4405++ { - if yyhl4405 { - if yyj4405 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -54821,51 +64416,63 @@ func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4405Slc = r.DecodeBytes(yys4405Slc, true, true) - yys4405 := string(yys4405Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4405 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv4408 := &x.ListMeta - yym4409 := z.DecBinary() - _ = yym4409 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv4408) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv4408, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4410 := &x.Items - yym4411 := z.DecBinary() - _ = yym4411 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceComponentStatus((*[]ComponentStatus)(yyv4410), d) + h.decSliceComponentStatus((*[]ComponentStatus)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys4405) - } // end switch yys4405 - } // end for yyj4405 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -54873,16 +64480,16 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4412 int - var yyb4412 bool - var yyhl4412 bool = l >= 0 - yyj4412++ - if yyhl4412 { - yyb4412 = yyj4412 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4412 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4412 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54890,15 +64497,21 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj4412++ - if yyhl4412 { - yyb4412 = yyj4412 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4412 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4412 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54906,38 +64519,44 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj4412++ - if yyhl4412 { - yyb4412 = yyj4412 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4412 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4412 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv4415 := &x.ListMeta - yym4416 := z.DecBinary() - _ = yym4416 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv4415) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv4415, false) + z.DecFallback(yyv17, false) } } - yyj4412++ - if yyhl4412 { - yyb4412 = yyj4412 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4412 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4412 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54945,26 +64564,846 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4417 := &x.Items - yym4418 := z.DecBinary() - _ = yym4418 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceComponentStatus((*[]ComponentStatus)(yyv4417), d) + h.decSliceComponentStatus((*[]ComponentStatus)(yyv19), d) } } for { - yyj4412++ - if yyhl4412 { - yyb4412 = yyj4412 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4412 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4412 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4412-1, "") + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *DownwardAPIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = len(x.Items) != 0 + yyq2[1] = x.DefaultMode != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.Items == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.DefaultMode == nil { + r.EncodeNil() + } else { + yy7 := *x.DefaultMode + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeInt(int64(yy7)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("defaultMode")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.DefaultMode == nil { + r.EncodeNil() + } else { + yy9 := *x.DefaultMode + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(yy9)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *DownwardAPIVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *DownwardAPIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv4 := &x.Items + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv4), d) + } + } + case "defaultMode": + if r.TryDecodeAsNil() { + if x.DefaultMode != nil { + x.DefaultMode = nil + } + } else { + if x.DefaultMode == nil { + x.DefaultMode = new(int32) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *DownwardAPIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv9 := &x.Items + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv9), d) + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.DefaultMode != nil { + x.DefaultMode = nil + } + } else { + if x.DefaultMode == nil { + x.DefaultMode = new(int32) + } + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32)) + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *DownwardAPIVolumeFile) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.FieldRef != nil + yyq2[2] = x.ResourceFieldRef != nil + yyq2[3] = x.Mode != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("path")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.FieldRef == nil { + r.EncodeNil() + } else { + x.FieldRef.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("fieldRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.FieldRef == nil { + r.EncodeNil() + } else { + x.FieldRef.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.ResourceFieldRef == nil { + r.EncodeNil() + } else { + x.ResourceFieldRef.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resourceFieldRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ResourceFieldRef == nil { + r.EncodeNil() + } else { + x.ResourceFieldRef.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Mode == nil { + r.EncodeNil() + } else { + yy13 := *x.Mode + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeInt(int64(yy13)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("mode")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Mode == nil { + r.EncodeNil() + } else { + yy15 := *x.Mode + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeInt(int64(yy15)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *DownwardAPIVolumeFile) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *DownwardAPIVolumeFile) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "path": + if r.TryDecodeAsNil() { + x.Path = "" + } else { + yyv4 := &x.Path + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "fieldRef": + if r.TryDecodeAsNil() { + if x.FieldRef != nil { + x.FieldRef = nil + } + } else { + if x.FieldRef == nil { + x.FieldRef = new(ObjectFieldSelector) + } + x.FieldRef.CodecDecodeSelf(d) + } + case "resourceFieldRef": + if r.TryDecodeAsNil() { + if x.ResourceFieldRef != nil { + x.ResourceFieldRef = nil + } + } else { + if x.ResourceFieldRef == nil { + x.ResourceFieldRef = new(ResourceFieldSelector) + } + x.ResourceFieldRef.CodecDecodeSelf(d) + } + case "mode": + if r.TryDecodeAsNil() { + if x.Mode != nil { + x.Mode = nil + } + } else { + if x.Mode == nil { + x.Mode = new(int32) + } + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(x.Mode)) = int32(r.DecodeInt(32)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *DownwardAPIVolumeFile) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Path = "" + } else { + yyv11 := &x.Path + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.FieldRef != nil { + x.FieldRef = nil + } + } else { + if x.FieldRef == nil { + x.FieldRef = new(ObjectFieldSelector) + } + x.FieldRef.CodecDecodeSelf(d) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ResourceFieldRef != nil { + x.ResourceFieldRef = nil + } + } else { + if x.ResourceFieldRef == nil { + x.ResourceFieldRef = new(ResourceFieldSelector) + } + x.ResourceFieldRef.CodecDecodeSelf(d) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Mode != nil { + x.Mode = nil + } + } else { + if x.Mode == nil { + x.Mode = new(int32) + } + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*int32)(x.Mode)) = int32(r.DecodeInt(32)) + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *DownwardAPIProjection) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [1]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = len(x.Items) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(1) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.Items == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *DownwardAPIProjection) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *DownwardAPIProjection) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv4 := &x.Items + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv4), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *DownwardAPIProjection) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv7 := &x.Items + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv7), d) + } + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54976,38 +65415,38 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4419 := z.EncBinary() - _ = yym4419 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4420 := !z.EncBinary() - yy2arr4420 := z.EncBasicHandle().StructToArray - var yyq4420 [6]bool - _, _, _ = yysep4420, yyq4420, yy2arr4420 - const yyr4420 bool = false - yyq4420[0] = x.Capabilities != nil - yyq4420[1] = x.Privileged != nil - yyq4420[2] = x.SELinuxOptions != nil - yyq4420[3] = x.RunAsUser != nil - yyq4420[4] = x.RunAsNonRoot != nil - yyq4420[5] = x.ReadOnlyRootFilesystem != nil - var yynn4420 int - if yyr4420 || yy2arr4420 { + 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 { - yynn4420 = 0 - for _, b := range yyq4420 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn4420++ + yynn2++ } } - r.EncodeMapStart(yynn4420) - yynn4420 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4420 || yy2arr4420 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4420[0] { + if yyq2[0] { if x.Capabilities == nil { r.EncodeNil() } else { @@ -55017,7 +65456,7 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4420[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("capabilities")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -55028,44 +65467,44 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4420 || yy2arr4420 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4420[1] { + if yyq2[1] { if x.Privileged == nil { r.EncodeNil() } else { - yy4423 := *x.Privileged - yym4424 := z.EncBinary() - _ = yym4424 + yy7 := *x.Privileged + yym8 := z.EncBinary() + _ = yym8 if false { } else { - r.EncodeBool(bool(yy4423)) + r.EncodeBool(bool(yy7)) } } } else { r.EncodeNil() } } else { - if yyq4420[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("privileged")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Privileged == nil { r.EncodeNil() } else { - yy4425 := *x.Privileged - yym4426 := z.EncBinary() - _ = yym4426 + yy9 := *x.Privileged + yym10 := z.EncBinary() + _ = yym10 if false { } else { - r.EncodeBool(bool(yy4425)) + r.EncodeBool(bool(yy9)) } } } } - if yyr4420 || yy2arr4420 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4420[2] { + if yyq2[2] { if x.SELinuxOptions == nil { r.EncodeNil() } else { @@ -55075,7 +65514,7 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4420[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -55086,112 +65525,112 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4420 || yy2arr4420 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4420[3] { + if yyq2[3] { if x.RunAsUser == nil { r.EncodeNil() } else { - yy4429 := *x.RunAsUser - yym4430 := z.EncBinary() - _ = yym4430 + yy15 := *x.RunAsUser + yym16 := z.EncBinary() + _ = yym16 if false { } else { - r.EncodeInt(int64(yy4429)) + r.EncodeInt(int64(yy15)) } } } else { r.EncodeNil() } } else { - if yyq4420[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsUser")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsUser == nil { r.EncodeNil() } else { - yy4431 := *x.RunAsUser - yym4432 := z.EncBinary() - _ = yym4432 + yy17 := *x.RunAsUser + yym18 := z.EncBinary() + _ = yym18 if false { } else { - r.EncodeInt(int64(yy4431)) + r.EncodeInt(int64(yy17)) } } } } - if yyr4420 || yy2arr4420 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4420[4] { + if yyq2[4] { if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy4434 := *x.RunAsNonRoot - yym4435 := z.EncBinary() - _ = yym4435 + yy20 := *x.RunAsNonRoot + yym21 := z.EncBinary() + _ = yym21 if false { } else { - r.EncodeBool(bool(yy4434)) + r.EncodeBool(bool(yy20)) } } } else { r.EncodeNil() } } else { - if yyq4420[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsNonRoot")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy4436 := *x.RunAsNonRoot - yym4437 := z.EncBinary() - _ = yym4437 + yy22 := *x.RunAsNonRoot + yym23 := z.EncBinary() + _ = yym23 if false { } else { - r.EncodeBool(bool(yy4436)) + r.EncodeBool(bool(yy22)) } } } } - if yyr4420 || yy2arr4420 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4420[5] { + if yyq2[5] { if x.ReadOnlyRootFilesystem == nil { r.EncodeNil() } else { - yy4439 := *x.ReadOnlyRootFilesystem - yym4440 := z.EncBinary() - _ = yym4440 + yy25 := *x.ReadOnlyRootFilesystem + yym26 := z.EncBinary() + _ = yym26 if false { } else { - r.EncodeBool(bool(yy4439)) + r.EncodeBool(bool(yy25)) } } } else { r.EncodeNil() } } else { - if yyq4420[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("readOnlyRootFilesystem")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ReadOnlyRootFilesystem == nil { r.EncodeNil() } else { - yy4441 := *x.ReadOnlyRootFilesystem - yym4442 := z.EncBinary() - _ = yym4442 + yy27 := *x.ReadOnlyRootFilesystem + yym28 := z.EncBinary() + _ = yym28 if false { } else { - r.EncodeBool(bool(yy4441)) + r.EncodeBool(bool(yy27)) } } } } - if yyr4420 || yy2arr4420 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -55204,25 +65643,25 @@ func (x *SecurityContext) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4443 := z.DecBinary() - _ = yym4443 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4444 := r.ContainerType() - if yyct4444 == codecSelferValueTypeMap1234 { - yyl4444 := r.ReadMapStart() - if yyl4444 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4444, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4444 == codecSelferValueTypeArray1234 { - yyl4444 := r.ReadArrayStart() - if yyl4444 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4444, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -55234,12 +65673,12 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4445Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4445Slc - var yyhl4445 bool = l >= 0 - for yyj4445 := 0; ; yyj4445++ { - if yyhl4445 { - if yyj4445 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -55248,10 +65687,10 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4445Slc = r.DecodeBytes(yys4445Slc, true, true) - yys4445 := string(yys4445Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4445 { + switch yys3 { case "capabilities": if r.TryDecodeAsNil() { if x.Capabilities != nil { @@ -55272,8 +65711,8 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.Privileged == nil { x.Privileged = new(bool) } - yym4448 := z.DecBinary() - _ = yym4448 + yym6 := z.DecBinary() + _ = yym6 if false { } else { *((*bool)(x.Privileged)) = r.DecodeBool() @@ -55299,8 +65738,8 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym4451 := z.DecBinary() - _ = yym4451 + yym9 := z.DecBinary() + _ = yym9 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) @@ -55315,8 +65754,8 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym4453 := z.DecBinary() - _ = yym4453 + yym11 := z.DecBinary() + _ = yym11 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() @@ -55331,17 +65770,17 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.ReadOnlyRootFilesystem == nil { x.ReadOnlyRootFilesystem = new(bool) } - yym4455 := z.DecBinary() - _ = yym4455 + yym13 := z.DecBinary() + _ = yym13 if false { } else { *((*bool)(x.ReadOnlyRootFilesystem)) = r.DecodeBool() } } default: - z.DecStructFieldNotFound(-1, yys4445) - } // end switch yys4445 - } // end for yyj4445 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -55349,16 +65788,16 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4456 int - var yyb4456 bool - var yyhl4456 bool = l >= 0 - yyj4456++ - if yyhl4456 { - yyb4456 = yyj4456 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb4456 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb4456 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -55373,13 +65812,13 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } x.Capabilities.CodecDecodeSelf(d) } - yyj4456++ - if yyhl4456 { - yyb4456 = yyj4456 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb4456 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb4456 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -55392,20 +65831,20 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.Privileged == nil { x.Privileged = new(bool) } - yym4459 := z.DecBinary() - _ = yym4459 + yym17 := z.DecBinary() + _ = yym17 if false { } else { *((*bool)(x.Privileged)) = r.DecodeBool() } } - yyj4456++ - if yyhl4456 { - yyb4456 = yyj4456 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb4456 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb4456 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -55420,13 +65859,13 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } x.SELinuxOptions.CodecDecodeSelf(d) } - yyj4456++ - if yyhl4456 { - yyb4456 = yyj4456 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb4456 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb4456 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -55439,20 +65878,20 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym4462 := z.DecBinary() - _ = yym4462 + yym20 := z.DecBinary() + _ = yym20 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) } } - yyj4456++ - if yyhl4456 { - yyb4456 = yyj4456 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb4456 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb4456 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -55465,20 +65904,20 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym4464 := z.DecBinary() - _ = yym4464 + yym22 := z.DecBinary() + _ = yym22 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() } } - yyj4456++ - if yyhl4456 { - yyb4456 = yyj4456 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb4456 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb4456 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -55491,25 +65930,25 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.ReadOnlyRootFilesystem == nil { x.ReadOnlyRootFilesystem = new(bool) } - yym4466 := z.DecBinary() - _ = yym4466 + yym24 := z.DecBinary() + _ = yym24 if false { } else { *((*bool)(x.ReadOnlyRootFilesystem)) = r.DecodeBool() } } for { - yyj4456++ - if yyhl4456 { - yyb4456 = yyj4456 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb4456 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb4456 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4456-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55521,38 +65960,38 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4467 := z.EncBinary() - _ = yym4467 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4468 := !z.EncBinary() - yy2arr4468 := z.EncBasicHandle().StructToArray - var yyq4468 [4]bool - _, _, _ = yysep4468, yyq4468, yy2arr4468 - const yyr4468 bool = false - yyq4468[0] = x.User != "" - yyq4468[1] = x.Role != "" - yyq4468[2] = x.Type != "" - yyq4468[3] = x.Level != "" - var yynn4468 int - if yyr4468 || yy2arr4468 { + 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 { - yynn4468 = 0 - for _, b := range yyq4468 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn4468++ + yynn2++ } } - r.EncodeMapStart(yynn4468) - yynn4468 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4468 || yy2arr4468 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4468[0] { - yym4470 := z.EncBinary() - _ = yym4470 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.User)) @@ -55561,23 +66000,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4468[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("user")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4471 := z.EncBinary() - _ = yym4471 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.User)) } } } - if yyr4468 || yy2arr4468 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4468[1] { - yym4473 := z.EncBinary() - _ = yym4473 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Role)) @@ -55586,23 +66025,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4468[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("role")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4474 := z.EncBinary() - _ = yym4474 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Role)) } } } - if yyr4468 || yy2arr4468 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4468[2] { - yym4476 := z.EncBinary() - _ = yym4476 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) @@ -55611,23 +66050,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4468[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4477 := z.EncBinary() - _ = yym4477 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) } } } - if yyr4468 || yy2arr4468 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4468[3] { - yym4479 := z.EncBinary() - _ = yym4479 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Level)) @@ -55636,19 +66075,19 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4468[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("level")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4480 := z.EncBinary() - _ = yym4480 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Level)) } } } - if yyr4468 || yy2arr4468 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -55661,25 +66100,25 @@ func (x *SELinuxOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4481 := z.DecBinary() - _ = yym4481 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4482 := r.ContainerType() - if yyct4482 == codecSelferValueTypeMap1234 { - yyl4482 := r.ReadMapStart() - if yyl4482 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4482, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4482 == codecSelferValueTypeArray1234 { - yyl4482 := r.ReadArrayStart() - if yyl4482 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4482, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -55691,12 +66130,12 @@ func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4483Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4483Slc - var yyhl4483 bool = l >= 0 - for yyj4483 := 0; ; yyj4483++ { - if yyhl4483 { - if yyj4483 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -55705,38 +66144,62 @@ func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4483Slc = r.DecodeBytes(yys4483Slc, true, true) - yys4483 := string(yys4483Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4483 { + switch yys3 { case "user": if r.TryDecodeAsNil() { x.User = "" } else { - x.User = string(r.DecodeString()) + yyv4 := &x.User + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "role": if r.TryDecodeAsNil() { x.Role = "" } else { - x.Role = string(r.DecodeString()) + yyv6 := &x.Role + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = string(r.DecodeString()) + yyv8 := &x.Type + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } case "level": if r.TryDecodeAsNil() { x.Level = "" } else { - x.Level = string(r.DecodeString()) + yyv10 := &x.Level + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys4483) - } // end switch yys4483 - } // end for yyj4483 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -55744,16 +66207,16 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4488 int - var yyb4488 bool - var yyhl4488 bool = l >= 0 - yyj4488++ - if yyhl4488 { - yyb4488 = yyj4488 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4488 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4488 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -55761,15 +66224,21 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.User = "" } else { - x.User = string(r.DecodeString()) + yyv13 := &x.User + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj4488++ - if yyhl4488 { - yyb4488 = yyj4488 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4488 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4488 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -55777,15 +66246,21 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Role = "" } else { - x.Role = string(r.DecodeString()) + yyv15 := &x.Role + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj4488++ - if yyhl4488 { - yyb4488 = yyj4488 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4488 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4488 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -55793,15 +66268,21 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = string(r.DecodeString()) + yyv17 := &x.Type + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } } - yyj4488++ - if yyhl4488 { - yyb4488 = yyj4488 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4488 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4488 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -55809,20 +66290,26 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Level = "" } else { - x.Level = string(r.DecodeString()) + yyv19 := &x.Level + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } } for { - yyj4488++ - if yyhl4488 { - yyb4488 = yyj4488 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb4488 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb4488 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4488-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55834,37 +66321,37 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4493 := z.EncBinary() - _ = yym4493 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4494 := !z.EncBinary() - yy2arr4494 := z.EncBasicHandle().StructToArray - var yyq4494 [5]bool - _, _, _ = yysep4494, yyq4494, yy2arr4494 - const yyr4494 bool = false - yyq4494[0] = x.Kind != "" - yyq4494[1] = x.APIVersion != "" - yyq4494[2] = true - var yynn4494 int - if yyr4494 || yy2arr4494 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn4494 = 2 - for _, b := range yyq4494 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn4494++ + yynn2++ } } - r.EncodeMapStart(yynn4494) - yynn4494 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr4494 || yy2arr4494 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4494[0] { - yym4496 := z.EncBinary() - _ = yym4496 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -55873,23 +66360,23 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4494[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4497 := z.EncBinary() - _ = yym4497 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4494 || yy2arr4494 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4494[1] { - yym4499 := z.EncBinary() - _ = yym4499 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -55898,39 +66385,51 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4494[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4500 := z.EncBinary() - _ = yym4500 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4494 || yy2arr4494 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4494[2] { - yy4502 := &x.ObjectMeta - yy4502.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq4494[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4503 := &x.ObjectMeta - yy4503.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr4494 || yy2arr4494 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym4505 := z.EncBinary() - _ = yym4505 + yym15 := z.EncBinary() + _ = yym15 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Range)) @@ -55939,20 +66438,20 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("range")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4506 := z.EncBinary() - _ = yym4506 + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Range)) } } - if yyr4494 || yy2arr4494 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Data == nil { r.EncodeNil() } else { - yym4508 := z.EncBinary() - _ = yym4508 + yym18 := z.EncBinary() + _ = yym18 if false { } else { r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data)) @@ -55965,15 +66464,15 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { if x.Data == nil { r.EncodeNil() } else { - yym4509 := z.EncBinary() - _ = yym4509 + yym19 := z.EncBinary() + _ = yym19 if false { } else { r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data)) } } } - if yyr4494 || yy2arr4494 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -55986,25 +66485,25 @@ func (x *RangeAllocation) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4510 := z.DecBinary() - _ = yym4510 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4511 := r.ContainerType() - if yyct4511 == codecSelferValueTypeMap1234 { - yyl4511 := r.ReadMapStart() - if yyl4511 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4511, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct4511 == codecSelferValueTypeArray1234 { - yyl4511 := r.ReadArrayStart() - if yyl4511 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4511, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -56016,12 +66515,12 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4512Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4512Slc - var yyhl4512 bool = l >= 0 - for yyj4512 := 0; ; yyj4512++ { - if yyhl4512 { - if yyj4512 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -56030,51 +66529,75 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4512Slc = r.DecodeBytes(yys4512Slc, true, true) - yys4512 := string(yys4512Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4512 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv4515 := &x.ObjectMeta - yyv4515.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "range": if r.TryDecodeAsNil() { x.Range = "" } else { - x.Range = string(r.DecodeString()) + yyv10 := &x.Range + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4517 := &x.Data - yym4518 := z.DecBinary() - _ = yym4518 + yyv12 := &x.Data + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *yyv4517 = r.DecodeBytes(*(*[]byte)(yyv4517), false, false) + *yyv12 = r.DecodeBytes(*(*[]byte)(yyv12), false, false) } } default: - z.DecStructFieldNotFound(-1, yys4512) - } // end switch yys4512 - } // end for yyj4512 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -56082,16 +66605,16 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4519 int - var yyb4519 bool - var yyhl4519 bool = l >= 0 - yyj4519++ - if yyhl4519 { - yyb4519 = yyj4519 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb4519 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb4519 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56099,15 +66622,21 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj4519++ - if yyhl4519 { - yyb4519 = yyj4519 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb4519 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb4519 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56115,32 +66644,44 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } } - yyj4519++ - if yyhl4519 { - yyb4519 = yyj4519 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb4519 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb4519 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv4522 := &x.ObjectMeta - yyv4522.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj4519++ - if yyhl4519 { - yyb4519 = yyj4519 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb4519 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb4519 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56148,15 +66689,21 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Range = "" } else { - x.Range = string(r.DecodeString()) + yyv21 := &x.Range + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } } - yyj4519++ - if yyhl4519 { - yyb4519 = yyj4519 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb4519 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb4519 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56164,125 +66711,152 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4524 := &x.Data - yym4525 := z.DecBinary() - _ = yym4525 + yyv23 := &x.Data + yym24 := z.DecBinary() + _ = yym24 if false { } else { - *yyv4524 = r.DecodeBytes(*(*[]byte)(yyv4524), false, false) + *yyv23 = r.DecodeBytes(*(*[]byte)(yyv23), false, false) } } for { - yyj4519++ - if yyhl4519 { - yyb4519 = yyj4519 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb4519 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb4519 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4519-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) encSliceOwnerReference(v []OwnerReference, e *codec1978.Encoder) { +func (x codecSelfer1234) encSlicev1_OwnerReference(v []pkg2_v1.OwnerReference, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4526 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4527 := &yyv4526 - yy4527.CodecEncodeSelf(e) + yy2 := &yyv1 + yym3 := z.EncBinary() + _ = yym3 + if false { + } else if z.HasExtensions() && z.EncExt(yy2) { + } else { + z.EncFallback(yy2) + } } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSliceOwnerReference(v *[]OwnerReference, d *codec1978.Decoder) { +func (x codecSelfer1234) decSlicev1_OwnerReference(v *[]pkg2_v1.OwnerReference, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4528 := *v - yyh4528, yyl4528 := z.DecSliceHelperStart() - var yyc4528 bool - if yyl4528 == 0 { - if yyv4528 == nil { - yyv4528 = []OwnerReference{} - yyc4528 = true - } else if len(yyv4528) != 0 { - yyv4528 = yyv4528[:0] - yyc4528 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []pkg2_v1.OwnerReference{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl4528 > 0 { - var yyrr4528, yyrl4528 int - var yyrt4528 bool - if yyl4528 > cap(yyv4528) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4528 := len(yyv4528) > 0 - yyv24528 := yyv4528 - yyrl4528, yyrt4528 = z.DecInferLen(yyl4528, z.DecBasicHandle().MaxInitLen, 72) - if yyrt4528 { - if yyrl4528 <= cap(yyv4528) { - yyv4528 = yyv4528[:yyrl4528] + 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 { - yyv4528 = make([]OwnerReference, yyrl4528) + yyv1 = make([]pkg2_v1.OwnerReference, yyrl1) } } else { - yyv4528 = make([]OwnerReference, yyrl4528) + yyv1 = make([]pkg2_v1.OwnerReference, yyrl1) } - yyc4528 = true - yyrr4528 = len(yyv4528) - if yyrg4528 { - copy(yyv4528, yyv24528) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4528 != len(yyv4528) { - yyv4528 = yyv4528[:yyl4528] - yyc4528 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4528 := 0 - for ; yyj4528 < yyrr4528; yyj4528++ { - yyh4528.ElemContainerState(yyj4528) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4528[yyj4528] = OwnerReference{} + yyv1[yyj1] = pkg2_v1.OwnerReference{} } else { - yyv4529 := &yyv4528[yyj4528] - yyv4529.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yym3 := z.DecBinary() + _ = yym3 + if false { + } else if z.HasExtensions() && z.DecExt(yyv2) { + } else { + z.DecFallback(yyv2, false) + } } } - if yyrt4528 { - for ; yyj4528 < yyl4528; yyj4528++ { - yyv4528 = append(yyv4528, OwnerReference{}) - yyh4528.ElemContainerState(yyj4528) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, pkg2_v1.OwnerReference{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4528[yyj4528] = OwnerReference{} + yyv1[yyj1] = pkg2_v1.OwnerReference{} } else { - yyv4530 := &yyv4528[yyj4528] - yyv4530.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else { + z.DecFallback(yyv4, false) + } } } } } else { - yyj4528 := 0 - for ; !r.CheckBreak(); yyj4528++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4528 >= len(yyv4528) { - yyv4528 = append(yyv4528, OwnerReference{}) // var yyz4528 OwnerReference - yyc4528 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, pkg2_v1.OwnerReference{}) // var yyz1 pkg2_v1.OwnerReference + yyc1 = true } - yyh4528.ElemContainerState(yyj4528) - if yyj4528 < len(yyv4528) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4528[yyj4528] = OwnerReference{} + yyv1[yyj1] = pkg2_v1.OwnerReference{} } else { - yyv4531 := &yyv4528[yyj4528] - yyv4531.CodecDecodeSelf(d) + yyv6 := &yyv1[yyj1] + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else { + z.DecFallback(yyv6, false) + } } } else { @@ -56290,17 +66864,17 @@ func (x codecSelfer1234) decSliceOwnerReference(v *[]OwnerReference, d *codec197 } } - if yyj4528 < len(yyv4528) { - yyv4528 = yyv4528[:yyj4528] - yyc4528 = true - } else if yyj4528 == 0 && yyv4528 == nil { - yyv4528 = []OwnerReference{} - yyc4528 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []pkg2_v1.OwnerReference{} + yyc1 = true } } - yyh4528.End() - if yyc4528 { - *v = yyv4528 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -56309,9 +66883,9 @@ func (x codecSelfer1234) encSlicePersistentVolumeAccessMode(v []PersistentVolume z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4532 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4532.CodecEncodeSelf(e) + yyv1.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56321,75 +66895,81 @@ func (x codecSelfer1234) decSlicePersistentVolumeAccessMode(v *[]PersistentVolum z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4533 := *v - yyh4533, yyl4533 := z.DecSliceHelperStart() - var yyc4533 bool - if yyl4533 == 0 { - if yyv4533 == nil { - yyv4533 = []PersistentVolumeAccessMode{} - yyc4533 = true - } else if len(yyv4533) != 0 { - yyv4533 = yyv4533[:0] - yyc4533 = true + 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 yyl4533 > 0 { - var yyrr4533, yyrl4533 int - var yyrt4533 bool - if yyl4533 > cap(yyv4533) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrl4533, yyrt4533 = z.DecInferLen(yyl4533, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4533 { - if yyrl4533 <= cap(yyv4533) { - yyv4533 = yyv4533[:yyrl4533] + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4533 = make([]PersistentVolumeAccessMode, yyrl4533) + yyv1 = make([]PersistentVolumeAccessMode, yyrl1) } } else { - yyv4533 = make([]PersistentVolumeAccessMode, yyrl4533) + yyv1 = make([]PersistentVolumeAccessMode, yyrl1) } - yyc4533 = true - yyrr4533 = len(yyv4533) - } else if yyl4533 != len(yyv4533) { - yyv4533 = yyv4533[:yyl4533] - yyc4533 = true + yyc1 = true + yyrr1 = len(yyv1) + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4533 := 0 - for ; yyj4533 < yyrr4533; yyj4533++ { - yyh4533.ElemContainerState(yyj4533) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4533[yyj4533] = "" + yyv1[yyj1] = "" } else { - yyv4533[yyj4533] = PersistentVolumeAccessMode(r.DecodeString()) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4533 { - for ; yyj4533 < yyl4533; yyj4533++ { - yyv4533 = append(yyv4533, "") - yyh4533.ElemContainerState(yyj4533) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, "") + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4533[yyj4533] = "" + yyv1[yyj1] = "" } else { - yyv4533[yyj4533] = PersistentVolumeAccessMode(r.DecodeString()) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4533 := 0 - for ; !r.CheckBreak(); yyj4533++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4533 >= len(yyv4533) { - yyv4533 = append(yyv4533, "") // var yyz4533 PersistentVolumeAccessMode - yyc4533 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, "") // var yyz1 PersistentVolumeAccessMode + yyc1 = true } - yyh4533.ElemContainerState(yyj4533) - if yyj4533 < len(yyv4533) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4533[yyj4533] = "" + yyv1[yyj1] = "" } else { - yyv4533[yyj4533] = PersistentVolumeAccessMode(r.DecodeString()) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -56397,17 +66977,17 @@ func (x codecSelfer1234) decSlicePersistentVolumeAccessMode(v *[]PersistentVolum } } - if yyj4533 < len(yyv4533) { - yyv4533 = yyv4533[:yyj4533] - yyc4533 = true - } else if yyj4533 == 0 && yyv4533 == nil { - yyv4533 = []PersistentVolumeAccessMode{} - yyc4533 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []PersistentVolumeAccessMode{} + yyc1 = true } } - yyh4533.End() - if yyc4533 { - *v = yyv4533 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -56416,10 +66996,10 @@ func (x codecSelfer1234) encSlicePersistentVolume(v []PersistentVolume, e *codec z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4537 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4538 := &yyv4537 - yy4538.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56429,83 +67009,86 @@ func (x codecSelfer1234) decSlicePersistentVolume(v *[]PersistentVolume, d *code z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4539 := *v - yyh4539, yyl4539 := z.DecSliceHelperStart() - var yyc4539 bool - if yyl4539 == 0 { - if yyv4539 == nil { - yyv4539 = []PersistentVolume{} - yyc4539 = true - } else if len(yyv4539) != 0 { - yyv4539 = yyv4539[:0] - yyc4539 = true + 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 yyl4539 > 0 { - var yyrr4539, yyrl4539 int - var yyrt4539 bool - if yyl4539 > cap(yyv4539) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4539 := len(yyv4539) > 0 - yyv24539 := yyv4539 - yyrl4539, yyrt4539 = z.DecInferLen(yyl4539, z.DecBasicHandle().MaxInitLen, 488) - if yyrt4539 { - if yyrl4539 <= cap(yyv4539) { - yyv4539 = yyv4539[:yyrl4539] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 528) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4539 = make([]PersistentVolume, yyrl4539) + yyv1 = make([]PersistentVolume, yyrl1) } } else { - yyv4539 = make([]PersistentVolume, yyrl4539) + yyv1 = make([]PersistentVolume, yyrl1) } - yyc4539 = true - yyrr4539 = len(yyv4539) - if yyrg4539 { - copy(yyv4539, yyv24539) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4539 != len(yyv4539) { - yyv4539 = yyv4539[:yyl4539] - yyc4539 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4539 := 0 - for ; yyj4539 < yyrr4539; yyj4539++ { - yyh4539.ElemContainerState(yyj4539) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4539[yyj4539] = PersistentVolume{} + yyv1[yyj1] = PersistentVolume{} } else { - yyv4540 := &yyv4539[yyj4539] - yyv4540.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4539 { - for ; yyj4539 < yyl4539; yyj4539++ { - yyv4539 = append(yyv4539, PersistentVolume{}) - yyh4539.ElemContainerState(yyj4539) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, PersistentVolume{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4539[yyj4539] = PersistentVolume{} + yyv1[yyj1] = PersistentVolume{} } else { - yyv4541 := &yyv4539[yyj4539] - yyv4541.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4539 := 0 - for ; !r.CheckBreak(); yyj4539++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4539 >= len(yyv4539) { - yyv4539 = append(yyv4539, PersistentVolume{}) // var yyz4539 PersistentVolume - yyc4539 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, PersistentVolume{}) // var yyz1 PersistentVolume + yyc1 = true } - yyh4539.ElemContainerState(yyj4539) - if yyj4539 < len(yyv4539) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4539[yyj4539] = PersistentVolume{} + yyv1[yyj1] = PersistentVolume{} } else { - yyv4542 := &yyv4539[yyj4539] - yyv4542.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -56513,17 +67096,17 @@ func (x codecSelfer1234) decSlicePersistentVolume(v *[]PersistentVolume, d *code } } - if yyj4539 < len(yyv4539) { - yyv4539 = yyv4539[:yyj4539] - yyc4539 = true - } else if yyj4539 == 0 && yyv4539 == nil { - yyv4539 = []PersistentVolume{} - yyc4539 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []PersistentVolume{} + yyc1 = true } } - yyh4539.End() - if yyc4539 { - *v = yyv4539 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -56532,10 +67115,10 @@ func (x codecSelfer1234) encSlicePersistentVolumeClaim(v []PersistentVolumeClaim z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4543 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4544 := &yyv4543 - yy4544.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56545,83 +67128,86 @@ func (x codecSelfer1234) decSlicePersistentVolumeClaim(v *[]PersistentVolumeClai z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4545 := *v - yyh4545, yyl4545 := z.DecSliceHelperStart() - var yyc4545 bool - if yyl4545 == 0 { - if yyv4545 == nil { - yyv4545 = []PersistentVolumeClaim{} - yyc4545 = true - } else if len(yyv4545) != 0 { - yyv4545 = yyv4545[:0] - yyc4545 = true + 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 yyl4545 > 0 { - var yyrr4545, yyrl4545 int - var yyrt4545 bool - if yyl4545 > cap(yyv4545) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4545 := len(yyv4545) > 0 - yyv24545 := yyv4545 - yyrl4545, yyrt4545 = z.DecInferLen(yyl4545, z.DecBasicHandle().MaxInitLen, 368) - if yyrt4545 { - if yyrl4545 <= cap(yyv4545) { - yyv4545 = yyv4545[:yyrl4545] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 376) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4545 = make([]PersistentVolumeClaim, yyrl4545) + yyv1 = make([]PersistentVolumeClaim, yyrl1) } } else { - yyv4545 = make([]PersistentVolumeClaim, yyrl4545) + yyv1 = make([]PersistentVolumeClaim, yyrl1) } - yyc4545 = true - yyrr4545 = len(yyv4545) - if yyrg4545 { - copy(yyv4545, yyv24545) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4545 != len(yyv4545) { - yyv4545 = yyv4545[:yyl4545] - yyc4545 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4545 := 0 - for ; yyj4545 < yyrr4545; yyj4545++ { - yyh4545.ElemContainerState(yyj4545) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4545[yyj4545] = PersistentVolumeClaim{} + yyv1[yyj1] = PersistentVolumeClaim{} } else { - yyv4546 := &yyv4545[yyj4545] - yyv4546.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4545 { - for ; yyj4545 < yyl4545; yyj4545++ { - yyv4545 = append(yyv4545, PersistentVolumeClaim{}) - yyh4545.ElemContainerState(yyj4545) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, PersistentVolumeClaim{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4545[yyj4545] = PersistentVolumeClaim{} + yyv1[yyj1] = PersistentVolumeClaim{} } else { - yyv4547 := &yyv4545[yyj4545] - yyv4547.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4545 := 0 - for ; !r.CheckBreak(); yyj4545++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4545 >= len(yyv4545) { - yyv4545 = append(yyv4545, PersistentVolumeClaim{}) // var yyz4545 PersistentVolumeClaim - yyc4545 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, PersistentVolumeClaim{}) // var yyz1 PersistentVolumeClaim + yyc1 = true } - yyh4545.ElemContainerState(yyj4545) - if yyj4545 < len(yyv4545) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4545[yyj4545] = PersistentVolumeClaim{} + yyv1[yyj1] = PersistentVolumeClaim{} } else { - yyv4548 := &yyv4545[yyj4545] - yyv4548.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -56629,17 +67215,17 @@ func (x codecSelfer1234) decSlicePersistentVolumeClaim(v *[]PersistentVolumeClai } } - if yyj4545 < len(yyv4545) { - yyv4545 = yyv4545[:yyj4545] - yyc4545 = true - } else if yyj4545 == 0 && yyv4545 == nil { - yyv4545 = []PersistentVolumeClaim{} - yyc4545 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []PersistentVolumeClaim{} + yyc1 = true } } - yyh4545.End() - if yyc4545 { - *v = yyv4545 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -56648,10 +67234,10 @@ func (x codecSelfer1234) encSliceKeyToPath(v []KeyToPath, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4549 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4550 := &yyv4549 - yy4550.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56661,83 +67247,86 @@ func (x codecSelfer1234) decSliceKeyToPath(v *[]KeyToPath, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4551 := *v - yyh4551, yyl4551 := z.DecSliceHelperStart() - var yyc4551 bool - if yyl4551 == 0 { - if yyv4551 == nil { - yyv4551 = []KeyToPath{} - yyc4551 = true - } else if len(yyv4551) != 0 { - yyv4551 = yyv4551[:0] - yyc4551 = true + 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 yyl4551 > 0 { - var yyrr4551, yyrl4551 int - var yyrt4551 bool - if yyl4551 > cap(yyv4551) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4551 := len(yyv4551) > 0 - yyv24551 := yyv4551 - yyrl4551, yyrt4551 = z.DecInferLen(yyl4551, z.DecBasicHandle().MaxInitLen, 40) - if yyrt4551 { - if yyrl4551 <= cap(yyv4551) { - yyv4551 = yyv4551[:yyrl4551] + 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 { - yyv4551 = make([]KeyToPath, yyrl4551) + yyv1 = make([]KeyToPath, yyrl1) } } else { - yyv4551 = make([]KeyToPath, yyrl4551) + yyv1 = make([]KeyToPath, yyrl1) } - yyc4551 = true - yyrr4551 = len(yyv4551) - if yyrg4551 { - copy(yyv4551, yyv24551) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4551 != len(yyv4551) { - yyv4551 = yyv4551[:yyl4551] - yyc4551 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4551 := 0 - for ; yyj4551 < yyrr4551; yyj4551++ { - yyh4551.ElemContainerState(yyj4551) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4551[yyj4551] = KeyToPath{} + yyv1[yyj1] = KeyToPath{} } else { - yyv4552 := &yyv4551[yyj4551] - yyv4552.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4551 { - for ; yyj4551 < yyl4551; yyj4551++ { - yyv4551 = append(yyv4551, KeyToPath{}) - yyh4551.ElemContainerState(yyj4551) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, KeyToPath{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4551[yyj4551] = KeyToPath{} + yyv1[yyj1] = KeyToPath{} } else { - yyv4553 := &yyv4551[yyj4551] - yyv4553.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4551 := 0 - for ; !r.CheckBreak(); yyj4551++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4551 >= len(yyv4551) { - yyv4551 = append(yyv4551, KeyToPath{}) // var yyz4551 KeyToPath - yyc4551 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, KeyToPath{}) // var yyz1 KeyToPath + yyc1 = true } - yyh4551.ElemContainerState(yyj4551) - if yyj4551 < len(yyv4551) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4551[yyj4551] = KeyToPath{} + yyv1[yyj1] = KeyToPath{} } else { - yyv4554 := &yyv4551[yyj4551] - yyv4554.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -56745,115 +67334,118 @@ func (x codecSelfer1234) decSliceKeyToPath(v *[]KeyToPath, d *codec1978.Decoder) } } - if yyj4551 < len(yyv4551) { - yyv4551 = yyv4551[:yyj4551] - yyc4551 = true - } else if yyj4551 == 0 && yyv4551 == nil { - yyv4551 = []KeyToPath{} - yyc4551 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []KeyToPath{} + yyc1 = true } } - yyh4551.End() - if yyc4551 { - *v = yyv4551 + yyh1.End() + if yyc1 { + *v = yyv1 } } -func (x codecSelfer1234) encSliceDownwardAPIVolumeFile(v []DownwardAPIVolumeFile, e *codec1978.Encoder) { +func (x codecSelfer1234) encSliceVolumeProjection(v []VolumeProjection, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4555 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4556 := &yyv4555 - yy4556.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSliceDownwardAPIVolumeFile(v *[]DownwardAPIVolumeFile, d *codec1978.Decoder) { +func (x codecSelfer1234) decSliceVolumeProjection(v *[]VolumeProjection, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4557 := *v - yyh4557, yyl4557 := z.DecSliceHelperStart() - var yyc4557 bool - if yyl4557 == 0 { - if yyv4557 == nil { - yyv4557 = []DownwardAPIVolumeFile{} - yyc4557 = true - } else if len(yyv4557) != 0 { - yyv4557 = yyv4557[:0] - yyc4557 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []VolumeProjection{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl4557 > 0 { - var yyrr4557, yyrl4557 int - var yyrt4557 bool - if yyl4557 > cap(yyv4557) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4557 := len(yyv4557) > 0 - yyv24557 := yyv4557 - yyrl4557, yyrt4557 = z.DecInferLen(yyl4557, z.DecBasicHandle().MaxInitLen, 40) - if yyrt4557 { - if yyrl4557 <= cap(yyv4557) { - yyv4557 = yyv4557[:yyrl4557] + 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 { - yyv4557 = make([]DownwardAPIVolumeFile, yyrl4557) + yyv1 = make([]VolumeProjection, yyrl1) } } else { - yyv4557 = make([]DownwardAPIVolumeFile, yyrl4557) + yyv1 = make([]VolumeProjection, yyrl1) } - yyc4557 = true - yyrr4557 = len(yyv4557) - if yyrg4557 { - copy(yyv4557, yyv24557) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4557 != len(yyv4557) { - yyv4557 = yyv4557[:yyl4557] - yyc4557 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4557 := 0 - for ; yyj4557 < yyrr4557; yyj4557++ { - yyh4557.ElemContainerState(yyj4557) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4557[yyj4557] = DownwardAPIVolumeFile{} + yyv1[yyj1] = VolumeProjection{} } else { - yyv4558 := &yyv4557[yyj4557] - yyv4558.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4557 { - for ; yyj4557 < yyl4557; yyj4557++ { - yyv4557 = append(yyv4557, DownwardAPIVolumeFile{}) - yyh4557.ElemContainerState(yyj4557) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, VolumeProjection{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4557[yyj4557] = DownwardAPIVolumeFile{} + yyv1[yyj1] = VolumeProjection{} } else { - yyv4559 := &yyv4557[yyj4557] - yyv4559.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4557 := 0 - for ; !r.CheckBreak(); yyj4557++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4557 >= len(yyv4557) { - yyv4557 = append(yyv4557, DownwardAPIVolumeFile{}) // var yyz4557 DownwardAPIVolumeFile - yyc4557 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, VolumeProjection{}) // var yyz1 VolumeProjection + yyc1 = true } - yyh4557.ElemContainerState(yyj4557) - if yyj4557 < len(yyv4557) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4557[yyj4557] = DownwardAPIVolumeFile{} + yyv1[yyj1] = VolumeProjection{} } else { - yyv4560 := &yyv4557[yyj4557] - yyv4560.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -56861,17 +67453,17 @@ func (x codecSelfer1234) decSliceDownwardAPIVolumeFile(v *[]DownwardAPIVolumeFil } } - if yyj4557 < len(yyv4557) { - yyv4557 = yyv4557[:yyj4557] - yyc4557 = true - } else if yyj4557 == 0 && yyv4557 == nil { - yyv4557 = []DownwardAPIVolumeFile{} - yyc4557 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []VolumeProjection{} + yyc1 = true } } - yyh4557.End() - if yyc4557 { - *v = yyv4557 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -56880,10 +67472,10 @@ func (x codecSelfer1234) encSliceHTTPHeader(v []HTTPHeader, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4561 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4562 := &yyv4561 - yy4562.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56893,83 +67485,86 @@ func (x codecSelfer1234) decSliceHTTPHeader(v *[]HTTPHeader, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4563 := *v - yyh4563, yyl4563 := z.DecSliceHelperStart() - var yyc4563 bool - if yyl4563 == 0 { - if yyv4563 == nil { - yyv4563 = []HTTPHeader{} - yyc4563 = true - } else if len(yyv4563) != 0 { - yyv4563 = yyv4563[:0] - yyc4563 = true + 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 yyl4563 > 0 { - var yyrr4563, yyrl4563 int - var yyrt4563 bool - if yyl4563 > cap(yyv4563) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4563 := len(yyv4563) > 0 - yyv24563 := yyv4563 - yyrl4563, yyrt4563 = z.DecInferLen(yyl4563, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4563 { - if yyrl4563 <= cap(yyv4563) { - yyv4563 = yyv4563[:yyrl4563] + 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 { - yyv4563 = make([]HTTPHeader, yyrl4563) + yyv1 = make([]HTTPHeader, yyrl1) } } else { - yyv4563 = make([]HTTPHeader, yyrl4563) + yyv1 = make([]HTTPHeader, yyrl1) } - yyc4563 = true - yyrr4563 = len(yyv4563) - if yyrg4563 { - copy(yyv4563, yyv24563) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4563 != len(yyv4563) { - yyv4563 = yyv4563[:yyl4563] - yyc4563 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4563 := 0 - for ; yyj4563 < yyrr4563; yyj4563++ { - yyh4563.ElemContainerState(yyj4563) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4563[yyj4563] = HTTPHeader{} + yyv1[yyj1] = HTTPHeader{} } else { - yyv4564 := &yyv4563[yyj4563] - yyv4564.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4563 { - for ; yyj4563 < yyl4563; yyj4563++ { - yyv4563 = append(yyv4563, HTTPHeader{}) - yyh4563.ElemContainerState(yyj4563) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, HTTPHeader{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4563[yyj4563] = HTTPHeader{} + yyv1[yyj1] = HTTPHeader{} } else { - yyv4565 := &yyv4563[yyj4563] - yyv4565.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4563 := 0 - for ; !r.CheckBreak(); yyj4563++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4563 >= len(yyv4563) { - yyv4563 = append(yyv4563, HTTPHeader{}) // var yyz4563 HTTPHeader - yyc4563 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, HTTPHeader{}) // var yyz1 HTTPHeader + yyc1 = true } - yyh4563.ElemContainerState(yyj4563) - if yyj4563 < len(yyv4563) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4563[yyj4563] = HTTPHeader{} + yyv1[yyj1] = HTTPHeader{} } else { - yyv4566 := &yyv4563[yyj4563] - yyv4566.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -56977,17 +67572,17 @@ func (x codecSelfer1234) decSliceHTTPHeader(v *[]HTTPHeader, d *codec1978.Decode } } - if yyj4563 < len(yyv4563) { - yyv4563 = yyv4563[:yyj4563] - yyc4563 = true - } else if yyj4563 == 0 && yyv4563 == nil { - yyv4563 = []HTTPHeader{} - yyc4563 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []HTTPHeader{} + yyc1 = true } } - yyh4563.End() - if yyc4563 { - *v = yyv4563 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -56996,9 +67591,9 @@ func (x codecSelfer1234) encSliceCapability(v []Capability, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4567 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4567.CodecEncodeSelf(e) + yyv1.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57008,75 +67603,81 @@ func (x codecSelfer1234) decSliceCapability(v *[]Capability, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4568 := *v - yyh4568, yyl4568 := z.DecSliceHelperStart() - var yyc4568 bool - if yyl4568 == 0 { - if yyv4568 == nil { - yyv4568 = []Capability{} - yyc4568 = true - } else if len(yyv4568) != 0 { - yyv4568 = yyv4568[:0] - yyc4568 = true + 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 yyl4568 > 0 { - var yyrr4568, yyrl4568 int - var yyrt4568 bool - if yyl4568 > cap(yyv4568) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrl4568, yyrt4568 = z.DecInferLen(yyl4568, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4568 { - if yyrl4568 <= cap(yyv4568) { - yyv4568 = yyv4568[:yyrl4568] + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4568 = make([]Capability, yyrl4568) + yyv1 = make([]Capability, yyrl1) } } else { - yyv4568 = make([]Capability, yyrl4568) + yyv1 = make([]Capability, yyrl1) } - yyc4568 = true - yyrr4568 = len(yyv4568) - } else if yyl4568 != len(yyv4568) { - yyv4568 = yyv4568[:yyl4568] - yyc4568 = true + yyc1 = true + yyrr1 = len(yyv1) + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4568 := 0 - for ; yyj4568 < yyrr4568; yyj4568++ { - yyh4568.ElemContainerState(yyj4568) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4568[yyj4568] = "" + yyv1[yyj1] = "" } else { - yyv4568[yyj4568] = Capability(r.DecodeString()) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4568 { - for ; yyj4568 < yyl4568; yyj4568++ { - yyv4568 = append(yyv4568, "") - yyh4568.ElemContainerState(yyj4568) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, "") + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4568[yyj4568] = "" + yyv1[yyj1] = "" } else { - yyv4568[yyj4568] = Capability(r.DecodeString()) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4568 := 0 - for ; !r.CheckBreak(); yyj4568++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4568 >= len(yyv4568) { - yyv4568 = append(yyv4568, "") // var yyz4568 Capability - yyc4568 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, "") // var yyz1 Capability + yyc1 = true } - yyh4568.ElemContainerState(yyj4568) - if yyj4568 < len(yyv4568) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4568[yyj4568] = "" + yyv1[yyj1] = "" } else { - yyv4568[yyj4568] = Capability(r.DecodeString()) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -57084,17 +67685,17 @@ func (x codecSelfer1234) decSliceCapability(v *[]Capability, d *codec1978.Decode } } - if yyj4568 < len(yyv4568) { - yyv4568 = yyv4568[:yyj4568] - yyc4568 = true - } else if yyj4568 == 0 && yyv4568 == nil { - yyv4568 = []Capability{} - yyc4568 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Capability{} + yyc1 = true } } - yyh4568.End() - if yyc4568 { - *v = yyv4568 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -57103,10 +67704,10 @@ func (x codecSelfer1234) encSliceContainerPort(v []ContainerPort, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4572 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4573 := &yyv4572 - yy4573.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57116,83 +67717,86 @@ func (x codecSelfer1234) decSliceContainerPort(v *[]ContainerPort, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4574 := *v - yyh4574, yyl4574 := z.DecSliceHelperStart() - var yyc4574 bool - if yyl4574 == 0 { - if yyv4574 == nil { - yyv4574 = []ContainerPort{} - yyc4574 = true - } else if len(yyv4574) != 0 { - yyv4574 = yyv4574[:0] - yyc4574 = true + 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 yyl4574 > 0 { - var yyrr4574, yyrl4574 int - var yyrt4574 bool - if yyl4574 > cap(yyv4574) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4574 := len(yyv4574) > 0 - yyv24574 := yyv4574 - yyrl4574, yyrt4574 = z.DecInferLen(yyl4574, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4574 { - if yyrl4574 <= cap(yyv4574) { - yyv4574 = yyv4574[:yyrl4574] + 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 { - yyv4574 = make([]ContainerPort, yyrl4574) + yyv1 = make([]ContainerPort, yyrl1) } } else { - yyv4574 = make([]ContainerPort, yyrl4574) + yyv1 = make([]ContainerPort, yyrl1) } - yyc4574 = true - yyrr4574 = len(yyv4574) - if yyrg4574 { - copy(yyv4574, yyv24574) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4574 != len(yyv4574) { - yyv4574 = yyv4574[:yyl4574] - yyc4574 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4574 := 0 - for ; yyj4574 < yyrr4574; yyj4574++ { - yyh4574.ElemContainerState(yyj4574) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4574[yyj4574] = ContainerPort{} + yyv1[yyj1] = ContainerPort{} } else { - yyv4575 := &yyv4574[yyj4574] - yyv4575.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4574 { - for ; yyj4574 < yyl4574; yyj4574++ { - yyv4574 = append(yyv4574, ContainerPort{}) - yyh4574.ElemContainerState(yyj4574) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ContainerPort{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4574[yyj4574] = ContainerPort{} + yyv1[yyj1] = ContainerPort{} } else { - yyv4576 := &yyv4574[yyj4574] - yyv4576.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4574 := 0 - for ; !r.CheckBreak(); yyj4574++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4574 >= len(yyv4574) { - yyv4574 = append(yyv4574, ContainerPort{}) // var yyz4574 ContainerPort - yyc4574 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ContainerPort{}) // var yyz1 ContainerPort + yyc1 = true } - yyh4574.ElemContainerState(yyj4574) - if yyj4574 < len(yyv4574) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4574[yyj4574] = ContainerPort{} + yyv1[yyj1] = ContainerPort{} } else { - yyv4577 := &yyv4574[yyj4574] - yyv4577.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -57200,17 +67804,136 @@ func (x codecSelfer1234) decSliceContainerPort(v *[]ContainerPort, d *codec1978. } } - if yyj4574 < len(yyv4574) { - yyv4574 = yyv4574[:yyj4574] - yyc4574 = true - } else if yyj4574 == 0 && yyv4574 == nil { - yyv4574 = []ContainerPort{} - yyc4574 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ContainerPort{} + yyc1 = true } } - yyh4574.End() - if yyc4574 { - *v = yyv4574 + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceEnvFromSource(v []EnvFromSource, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceEnvFromSource(v *[]EnvFromSource, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []EnvFromSource{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 32) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]EnvFromSource, yyrl1) + } + } else { + yyv1 = make([]EnvFromSource, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = EnvFromSource{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, EnvFromSource{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = EnvFromSource{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, EnvFromSource{}) // var yyz1 EnvFromSource + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = EnvFromSource{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []EnvFromSource{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -57219,10 +67942,10 @@ func (x codecSelfer1234) encSliceEnvVar(v []EnvVar, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4578 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4579 := &yyv4578 - yy4579.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57232,83 +67955,86 @@ func (x codecSelfer1234) decSliceEnvVar(v *[]EnvVar, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4580 := *v - yyh4580, yyl4580 := z.DecSliceHelperStart() - var yyc4580 bool - if yyl4580 == 0 { - if yyv4580 == nil { - yyv4580 = []EnvVar{} - yyc4580 = true - } else if len(yyv4580) != 0 { - yyv4580 = yyv4580[:0] - yyc4580 = true + 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 yyl4580 > 0 { - var yyrr4580, yyrl4580 int - var yyrt4580 bool - if yyl4580 > cap(yyv4580) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4580 := len(yyv4580) > 0 - yyv24580 := yyv4580 - yyrl4580, yyrt4580 = z.DecInferLen(yyl4580, z.DecBasicHandle().MaxInitLen, 40) - if yyrt4580 { - if yyrl4580 <= cap(yyv4580) { - yyv4580 = yyv4580[:yyrl4580] + 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 { - yyv4580 = make([]EnvVar, yyrl4580) + yyv1 = make([]EnvVar, yyrl1) } } else { - yyv4580 = make([]EnvVar, yyrl4580) + yyv1 = make([]EnvVar, yyrl1) } - yyc4580 = true - yyrr4580 = len(yyv4580) - if yyrg4580 { - copy(yyv4580, yyv24580) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4580 != len(yyv4580) { - yyv4580 = yyv4580[:yyl4580] - yyc4580 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4580 := 0 - for ; yyj4580 < yyrr4580; yyj4580++ { - yyh4580.ElemContainerState(yyj4580) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4580[yyj4580] = EnvVar{} + yyv1[yyj1] = EnvVar{} } else { - yyv4581 := &yyv4580[yyj4580] - yyv4581.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4580 { - for ; yyj4580 < yyl4580; yyj4580++ { - yyv4580 = append(yyv4580, EnvVar{}) - yyh4580.ElemContainerState(yyj4580) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, EnvVar{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4580[yyj4580] = EnvVar{} + yyv1[yyj1] = EnvVar{} } else { - yyv4582 := &yyv4580[yyj4580] - yyv4582.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4580 := 0 - for ; !r.CheckBreak(); yyj4580++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4580 >= len(yyv4580) { - yyv4580 = append(yyv4580, EnvVar{}) // var yyz4580 EnvVar - yyc4580 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, EnvVar{}) // var yyz1 EnvVar + yyc1 = true } - yyh4580.ElemContainerState(yyj4580) - if yyj4580 < len(yyv4580) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4580[yyj4580] = EnvVar{} + yyv1[yyj1] = EnvVar{} } else { - yyv4583 := &yyv4580[yyj4580] - yyv4583.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -57316,17 +68042,17 @@ func (x codecSelfer1234) decSliceEnvVar(v *[]EnvVar, d *codec1978.Decoder) { } } - if yyj4580 < len(yyv4580) { - yyv4580 = yyv4580[:yyj4580] - yyc4580 = true - } else if yyj4580 == 0 && yyv4580 == nil { - yyv4580 = []EnvVar{} - yyc4580 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []EnvVar{} + yyc1 = true } } - yyh4580.End() - if yyc4580 { - *v = yyv4580 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -57335,10 +68061,10 @@ func (x codecSelfer1234) encSliceVolumeMount(v []VolumeMount, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4584 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4585 := &yyv4584 - yy4585.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57348,83 +68074,86 @@ func (x codecSelfer1234) decSliceVolumeMount(v *[]VolumeMount, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4586 := *v - yyh4586, yyl4586 := z.DecSliceHelperStart() - var yyc4586 bool - if yyl4586 == 0 { - if yyv4586 == nil { - yyv4586 = []VolumeMount{} - yyc4586 = true - } else if len(yyv4586) != 0 { - yyv4586 = yyv4586[:0] - yyc4586 = true + 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 yyl4586 > 0 { - var yyrr4586, yyrl4586 int - var yyrt4586 bool - if yyl4586 > cap(yyv4586) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4586 := len(yyv4586) > 0 - yyv24586 := yyv4586 - yyrl4586, yyrt4586 = z.DecInferLen(yyl4586, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4586 { - if yyrl4586 <= cap(yyv4586) { - yyv4586 = yyv4586[:yyrl4586] + 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 { - yyv4586 = make([]VolumeMount, yyrl4586) + yyv1 = make([]VolumeMount, yyrl1) } } else { - yyv4586 = make([]VolumeMount, yyrl4586) + yyv1 = make([]VolumeMount, yyrl1) } - yyc4586 = true - yyrr4586 = len(yyv4586) - if yyrg4586 { - copy(yyv4586, yyv24586) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4586 != len(yyv4586) { - yyv4586 = yyv4586[:yyl4586] - yyc4586 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4586 := 0 - for ; yyj4586 < yyrr4586; yyj4586++ { - yyh4586.ElemContainerState(yyj4586) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4586[yyj4586] = VolumeMount{} + yyv1[yyj1] = VolumeMount{} } else { - yyv4587 := &yyv4586[yyj4586] - yyv4587.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4586 { - for ; yyj4586 < yyl4586; yyj4586++ { - yyv4586 = append(yyv4586, VolumeMount{}) - yyh4586.ElemContainerState(yyj4586) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, VolumeMount{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4586[yyj4586] = VolumeMount{} + yyv1[yyj1] = VolumeMount{} } else { - yyv4588 := &yyv4586[yyj4586] - yyv4588.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4586 := 0 - for ; !r.CheckBreak(); yyj4586++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4586 >= len(yyv4586) { - yyv4586 = append(yyv4586, VolumeMount{}) // var yyz4586 VolumeMount - yyc4586 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, VolumeMount{}) // var yyz1 VolumeMount + yyc1 = true } - yyh4586.ElemContainerState(yyj4586) - if yyj4586 < len(yyv4586) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4586[yyj4586] = VolumeMount{} + yyv1[yyj1] = VolumeMount{} } else { - yyv4589 := &yyv4586[yyj4586] - yyv4589.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -57432,133 +68161,17 @@ func (x codecSelfer1234) decSliceVolumeMount(v *[]VolumeMount, d *codec1978.Deco } } - if yyj4586 < len(yyv4586) { - yyv4586 = yyv4586[:yyj4586] - yyc4586 = true - } else if yyj4586 == 0 && yyv4586 == nil { - yyv4586 = []VolumeMount{} - yyc4586 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []VolumeMount{} + yyc1 = true } } - yyh4586.End() - if yyc4586 { - *v = yyv4586 - } -} - -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 _, yyv4590 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4591 := &yyv4590 - yy4591.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 - - yyv4592 := *v - yyh4592, yyl4592 := z.DecSliceHelperStart() - var yyc4592 bool - if yyl4592 == 0 { - if yyv4592 == nil { - yyv4592 = []Pod{} - yyc4592 = true - } else if len(yyv4592) != 0 { - yyv4592 = yyv4592[:0] - yyc4592 = true - } - } else if yyl4592 > 0 { - var yyrr4592, yyrl4592 int - var yyrt4592 bool - if yyl4592 > cap(yyv4592) { - - yyrg4592 := len(yyv4592) > 0 - yyv24592 := yyv4592 - yyrl4592, yyrt4592 = z.DecInferLen(yyl4592, z.DecBasicHandle().MaxInitLen, 640) - if yyrt4592 { - if yyrl4592 <= cap(yyv4592) { - yyv4592 = yyv4592[:yyrl4592] - } else { - yyv4592 = make([]Pod, yyrl4592) - } - } else { - yyv4592 = make([]Pod, yyrl4592) - } - yyc4592 = true - yyrr4592 = len(yyv4592) - if yyrg4592 { - copy(yyv4592, yyv24592) - } - } else if yyl4592 != len(yyv4592) { - yyv4592 = yyv4592[:yyl4592] - yyc4592 = true - } - yyj4592 := 0 - for ; yyj4592 < yyrr4592; yyj4592++ { - yyh4592.ElemContainerState(yyj4592) - if r.TryDecodeAsNil() { - yyv4592[yyj4592] = Pod{} - } else { - yyv4593 := &yyv4592[yyj4592] - yyv4593.CodecDecodeSelf(d) - } - - } - if yyrt4592 { - for ; yyj4592 < yyl4592; yyj4592++ { - yyv4592 = append(yyv4592, Pod{}) - yyh4592.ElemContainerState(yyj4592) - if r.TryDecodeAsNil() { - yyv4592[yyj4592] = Pod{} - } else { - yyv4594 := &yyv4592[yyj4592] - yyv4594.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj4592 := 0 - for ; !r.CheckBreak(); yyj4592++ { - - if yyj4592 >= len(yyv4592) { - yyv4592 = append(yyv4592, Pod{}) // var yyz4592 Pod - yyc4592 = true - } - yyh4592.ElemContainerState(yyj4592) - if yyj4592 < len(yyv4592) { - if r.TryDecodeAsNil() { - yyv4592[yyj4592] = Pod{} - } else { - yyv4595 := &yyv4592[yyj4592] - yyv4595.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj4592 < len(yyv4592) { - yyv4592 = yyv4592[:yyj4592] - yyc4592 = true - } else if yyj4592 == 0 && yyv4592 == nil { - yyv4592 = []Pod{} - yyc4592 = true - } - } - yyh4592.End() - if yyc4592 { - *v = yyv4592 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -57567,10 +68180,10 @@ func (x codecSelfer1234) encSliceNodeSelectorTerm(v []NodeSelectorTerm, e *codec z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4596 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4597 := &yyv4596 - yy4597.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57580,83 +68193,86 @@ func (x codecSelfer1234) decSliceNodeSelectorTerm(v *[]NodeSelectorTerm, d *code z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4598 := *v - yyh4598, yyl4598 := z.DecSliceHelperStart() - var yyc4598 bool - if yyl4598 == 0 { - if yyv4598 == nil { - yyv4598 = []NodeSelectorTerm{} - yyc4598 = true - } else if len(yyv4598) != 0 { - yyv4598 = yyv4598[:0] - yyc4598 = true + 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 yyl4598 > 0 { - var yyrr4598, yyrl4598 int - var yyrt4598 bool - if yyl4598 > cap(yyv4598) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4598 := len(yyv4598) > 0 - yyv24598 := yyv4598 - yyrl4598, yyrt4598 = z.DecInferLen(yyl4598, z.DecBasicHandle().MaxInitLen, 24) - if yyrt4598 { - if yyrl4598 <= cap(yyv4598) { - yyv4598 = yyv4598[:yyrl4598] + 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 { - yyv4598 = make([]NodeSelectorTerm, yyrl4598) + yyv1 = make([]NodeSelectorTerm, yyrl1) } } else { - yyv4598 = make([]NodeSelectorTerm, yyrl4598) + yyv1 = make([]NodeSelectorTerm, yyrl1) } - yyc4598 = true - yyrr4598 = len(yyv4598) - if yyrg4598 { - copy(yyv4598, yyv24598) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4598 != len(yyv4598) { - yyv4598 = yyv4598[:yyl4598] - yyc4598 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4598 := 0 - for ; yyj4598 < yyrr4598; yyj4598++ { - yyh4598.ElemContainerState(yyj4598) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4598[yyj4598] = NodeSelectorTerm{} + yyv1[yyj1] = NodeSelectorTerm{} } else { - yyv4599 := &yyv4598[yyj4598] - yyv4599.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4598 { - for ; yyj4598 < yyl4598; yyj4598++ { - yyv4598 = append(yyv4598, NodeSelectorTerm{}) - yyh4598.ElemContainerState(yyj4598) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, NodeSelectorTerm{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4598[yyj4598] = NodeSelectorTerm{} + yyv1[yyj1] = NodeSelectorTerm{} } else { - yyv4600 := &yyv4598[yyj4598] - yyv4600.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4598 := 0 - for ; !r.CheckBreak(); yyj4598++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4598 >= len(yyv4598) { - yyv4598 = append(yyv4598, NodeSelectorTerm{}) // var yyz4598 NodeSelectorTerm - yyc4598 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, NodeSelectorTerm{}) // var yyz1 NodeSelectorTerm + yyc1 = true } - yyh4598.ElemContainerState(yyj4598) - if yyj4598 < len(yyv4598) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4598[yyj4598] = NodeSelectorTerm{} + yyv1[yyj1] = NodeSelectorTerm{} } else { - yyv4601 := &yyv4598[yyj4598] - yyv4601.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -57664,17 +68280,17 @@ func (x codecSelfer1234) decSliceNodeSelectorTerm(v *[]NodeSelectorTerm, d *code } } - if yyj4598 < len(yyv4598) { - yyv4598 = yyv4598[:yyj4598] - yyc4598 = true - } else if yyj4598 == 0 && yyv4598 == nil { - yyv4598 = []NodeSelectorTerm{} - yyc4598 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []NodeSelectorTerm{} + yyc1 = true } } - yyh4598.End() - if yyc4598 { - *v = yyv4598 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -57683,10 +68299,10 @@ func (x codecSelfer1234) encSliceNodeSelectorRequirement(v []NodeSelectorRequire z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4602 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4603 := &yyv4602 - yy4603.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57696,83 +68312,86 @@ func (x codecSelfer1234) decSliceNodeSelectorRequirement(v *[]NodeSelectorRequir z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4604 := *v - yyh4604, yyl4604 := z.DecSliceHelperStart() - var yyc4604 bool - if yyl4604 == 0 { - if yyv4604 == nil { - yyv4604 = []NodeSelectorRequirement{} - yyc4604 = true - } else if len(yyv4604) != 0 { - yyv4604 = yyv4604[:0] - yyc4604 = true + 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 yyl4604 > 0 { - var yyrr4604, yyrl4604 int - var yyrt4604 bool - if yyl4604 > cap(yyv4604) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4604 := len(yyv4604) > 0 - yyv24604 := yyv4604 - yyrl4604, yyrt4604 = z.DecInferLen(yyl4604, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4604 { - if yyrl4604 <= cap(yyv4604) { - yyv4604 = yyv4604[:yyrl4604] + 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 { - yyv4604 = make([]NodeSelectorRequirement, yyrl4604) + yyv1 = make([]NodeSelectorRequirement, yyrl1) } } else { - yyv4604 = make([]NodeSelectorRequirement, yyrl4604) + yyv1 = make([]NodeSelectorRequirement, yyrl1) } - yyc4604 = true - yyrr4604 = len(yyv4604) - if yyrg4604 { - copy(yyv4604, yyv24604) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4604 != len(yyv4604) { - yyv4604 = yyv4604[:yyl4604] - yyc4604 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4604 := 0 - for ; yyj4604 < yyrr4604; yyj4604++ { - yyh4604.ElemContainerState(yyj4604) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4604[yyj4604] = NodeSelectorRequirement{} + yyv1[yyj1] = NodeSelectorRequirement{} } else { - yyv4605 := &yyv4604[yyj4604] - yyv4605.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4604 { - for ; yyj4604 < yyl4604; yyj4604++ { - yyv4604 = append(yyv4604, NodeSelectorRequirement{}) - yyh4604.ElemContainerState(yyj4604) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, NodeSelectorRequirement{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4604[yyj4604] = NodeSelectorRequirement{} + yyv1[yyj1] = NodeSelectorRequirement{} } else { - yyv4606 := &yyv4604[yyj4604] - yyv4606.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4604 := 0 - for ; !r.CheckBreak(); yyj4604++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4604 >= len(yyv4604) { - yyv4604 = append(yyv4604, NodeSelectorRequirement{}) // var yyz4604 NodeSelectorRequirement - yyc4604 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, NodeSelectorRequirement{}) // var yyz1 NodeSelectorRequirement + yyc1 = true } - yyh4604.ElemContainerState(yyj4604) - if yyj4604 < len(yyv4604) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4604[yyj4604] = NodeSelectorRequirement{} + yyv1[yyj1] = NodeSelectorRequirement{} } else { - yyv4607 := &yyv4604[yyj4604] - yyv4607.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -57780,17 +68399,17 @@ func (x codecSelfer1234) decSliceNodeSelectorRequirement(v *[]NodeSelectorRequir } } - if yyj4604 < len(yyv4604) { - yyv4604 = yyv4604[:yyj4604] - yyc4604 = true - } else if yyj4604 == 0 && yyv4604 == nil { - yyv4604 = []NodeSelectorRequirement{} - yyc4604 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []NodeSelectorRequirement{} + yyc1 = true } } - yyh4604.End() - if yyc4604 { - *v = yyv4604 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -57799,10 +68418,10 @@ func (x codecSelfer1234) encSlicePodAffinityTerm(v []PodAffinityTerm, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4608 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4609 := &yyv4608 - yy4609.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57812,83 +68431,86 @@ func (x codecSelfer1234) decSlicePodAffinityTerm(v *[]PodAffinityTerm, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4610 := *v - yyh4610, yyl4610 := z.DecSliceHelperStart() - var yyc4610 bool - if yyl4610 == 0 { - if yyv4610 == nil { - yyv4610 = []PodAffinityTerm{} - yyc4610 = true - } else if len(yyv4610) != 0 { - yyv4610 = yyv4610[:0] - yyc4610 = true + 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 yyl4610 > 0 { - var yyrr4610, yyrl4610 int - var yyrt4610 bool - if yyl4610 > cap(yyv4610) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4610 := len(yyv4610) > 0 - yyv24610 := yyv4610 - yyrl4610, yyrt4610 = z.DecInferLen(yyl4610, z.DecBasicHandle().MaxInitLen, 48) - if yyrt4610 { - if yyrl4610 <= cap(yyv4610) { - yyv4610 = yyv4610[:yyrl4610] + 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 { - yyv4610 = make([]PodAffinityTerm, yyrl4610) + yyv1 = make([]PodAffinityTerm, yyrl1) } } else { - yyv4610 = make([]PodAffinityTerm, yyrl4610) + yyv1 = make([]PodAffinityTerm, yyrl1) } - yyc4610 = true - yyrr4610 = len(yyv4610) - if yyrg4610 { - copy(yyv4610, yyv24610) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4610 != len(yyv4610) { - yyv4610 = yyv4610[:yyl4610] - yyc4610 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4610 := 0 - for ; yyj4610 < yyrr4610; yyj4610++ { - yyh4610.ElemContainerState(yyj4610) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4610[yyj4610] = PodAffinityTerm{} + yyv1[yyj1] = PodAffinityTerm{} } else { - yyv4611 := &yyv4610[yyj4610] - yyv4611.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4610 { - for ; yyj4610 < yyl4610; yyj4610++ { - yyv4610 = append(yyv4610, PodAffinityTerm{}) - yyh4610.ElemContainerState(yyj4610) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, PodAffinityTerm{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4610[yyj4610] = PodAffinityTerm{} + yyv1[yyj1] = PodAffinityTerm{} } else { - yyv4612 := &yyv4610[yyj4610] - yyv4612.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4610 := 0 - for ; !r.CheckBreak(); yyj4610++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4610 >= len(yyv4610) { - yyv4610 = append(yyv4610, PodAffinityTerm{}) // var yyz4610 PodAffinityTerm - yyc4610 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, PodAffinityTerm{}) // var yyz1 PodAffinityTerm + yyc1 = true } - yyh4610.ElemContainerState(yyj4610) - if yyj4610 < len(yyv4610) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4610[yyj4610] = PodAffinityTerm{} + yyv1[yyj1] = PodAffinityTerm{} } else { - yyv4613 := &yyv4610[yyj4610] - yyv4613.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -57896,17 +68518,17 @@ func (x codecSelfer1234) decSlicePodAffinityTerm(v *[]PodAffinityTerm, d *codec1 } } - if yyj4610 < len(yyv4610) { - yyv4610 = yyv4610[:yyj4610] - yyc4610 = true - } else if yyj4610 == 0 && yyv4610 == nil { - yyv4610 = []PodAffinityTerm{} - yyc4610 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []PodAffinityTerm{} + yyc1 = true } } - yyh4610.End() - if yyc4610 { - *v = yyv4610 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -57915,10 +68537,10 @@ func (x codecSelfer1234) encSliceWeightedPodAffinityTerm(v []WeightedPodAffinity z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4614 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4615 := &yyv4614 - yy4615.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57928,83 +68550,86 @@ func (x codecSelfer1234) decSliceWeightedPodAffinityTerm(v *[]WeightedPodAffinit z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4616 := *v - yyh4616, yyl4616 := z.DecSliceHelperStart() - var yyc4616 bool - if yyl4616 == 0 { - if yyv4616 == nil { - yyv4616 = []WeightedPodAffinityTerm{} - yyc4616 = true - } else if len(yyv4616) != 0 { - yyv4616 = yyv4616[:0] - yyc4616 = true + 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 yyl4616 > 0 { - var yyrr4616, yyrl4616 int - var yyrt4616 bool - if yyl4616 > cap(yyv4616) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4616 := len(yyv4616) > 0 - yyv24616 := yyv4616 - yyrl4616, yyrt4616 = z.DecInferLen(yyl4616, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4616 { - if yyrl4616 <= cap(yyv4616) { - yyv4616 = yyv4616[:yyrl4616] + 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 { - yyv4616 = make([]WeightedPodAffinityTerm, yyrl4616) + yyv1 = make([]WeightedPodAffinityTerm, yyrl1) } } else { - yyv4616 = make([]WeightedPodAffinityTerm, yyrl4616) + yyv1 = make([]WeightedPodAffinityTerm, yyrl1) } - yyc4616 = true - yyrr4616 = len(yyv4616) - if yyrg4616 { - copy(yyv4616, yyv24616) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4616 != len(yyv4616) { - yyv4616 = yyv4616[:yyl4616] - yyc4616 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4616 := 0 - for ; yyj4616 < yyrr4616; yyj4616++ { - yyh4616.ElemContainerState(yyj4616) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4616[yyj4616] = WeightedPodAffinityTerm{} + yyv1[yyj1] = WeightedPodAffinityTerm{} } else { - yyv4617 := &yyv4616[yyj4616] - yyv4617.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4616 { - for ; yyj4616 < yyl4616; yyj4616++ { - yyv4616 = append(yyv4616, WeightedPodAffinityTerm{}) - yyh4616.ElemContainerState(yyj4616) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, WeightedPodAffinityTerm{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4616[yyj4616] = WeightedPodAffinityTerm{} + yyv1[yyj1] = WeightedPodAffinityTerm{} } else { - yyv4618 := &yyv4616[yyj4616] - yyv4618.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4616 := 0 - for ; !r.CheckBreak(); yyj4616++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4616 >= len(yyv4616) { - yyv4616 = append(yyv4616, WeightedPodAffinityTerm{}) // var yyz4616 WeightedPodAffinityTerm - yyc4616 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, WeightedPodAffinityTerm{}) // var yyz1 WeightedPodAffinityTerm + yyc1 = true } - yyh4616.ElemContainerState(yyj4616) - if yyj4616 < len(yyv4616) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4616[yyj4616] = WeightedPodAffinityTerm{} + yyv1[yyj1] = WeightedPodAffinityTerm{} } else { - yyv4619 := &yyv4616[yyj4616] - yyv4619.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -58012,17 +68637,17 @@ func (x codecSelfer1234) decSliceWeightedPodAffinityTerm(v *[]WeightedPodAffinit } } - if yyj4616 < len(yyv4616) { - yyv4616 = yyv4616[:yyj4616] - yyc4616 = true - } else if yyj4616 == 0 && yyv4616 == nil { - yyv4616 = []WeightedPodAffinityTerm{} - yyc4616 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []WeightedPodAffinityTerm{} + yyc1 = true } } - yyh4616.End() - if yyc4616 { - *v = yyv4616 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -58031,10 +68656,10 @@ func (x codecSelfer1234) encSlicePreferredSchedulingTerm(v []PreferredScheduling z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4620 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4621 := &yyv4620 - yy4621.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58044,83 +68669,86 @@ func (x codecSelfer1234) decSlicePreferredSchedulingTerm(v *[]PreferredSchedulin z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4622 := *v - yyh4622, yyl4622 := z.DecSliceHelperStart() - var yyc4622 bool - if yyl4622 == 0 { - if yyv4622 == nil { - yyv4622 = []PreferredSchedulingTerm{} - yyc4622 = true - } else if len(yyv4622) != 0 { - yyv4622 = yyv4622[:0] - yyc4622 = true + 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 yyl4622 > 0 { - var yyrr4622, yyrl4622 int - var yyrt4622 bool - if yyl4622 > cap(yyv4622) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4622 := len(yyv4622) > 0 - yyv24622 := yyv4622 - yyrl4622, yyrt4622 = z.DecInferLen(yyl4622, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4622 { - if yyrl4622 <= cap(yyv4622) { - yyv4622 = yyv4622[:yyrl4622] + 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 { - yyv4622 = make([]PreferredSchedulingTerm, yyrl4622) + yyv1 = make([]PreferredSchedulingTerm, yyrl1) } } else { - yyv4622 = make([]PreferredSchedulingTerm, yyrl4622) + yyv1 = make([]PreferredSchedulingTerm, yyrl1) } - yyc4622 = true - yyrr4622 = len(yyv4622) - if yyrg4622 { - copy(yyv4622, yyv24622) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4622 != len(yyv4622) { - yyv4622 = yyv4622[:yyl4622] - yyc4622 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4622 := 0 - for ; yyj4622 < yyrr4622; yyj4622++ { - yyh4622.ElemContainerState(yyj4622) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4622[yyj4622] = PreferredSchedulingTerm{} + yyv1[yyj1] = PreferredSchedulingTerm{} } else { - yyv4623 := &yyv4622[yyj4622] - yyv4623.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4622 { - for ; yyj4622 < yyl4622; yyj4622++ { - yyv4622 = append(yyv4622, PreferredSchedulingTerm{}) - yyh4622.ElemContainerState(yyj4622) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, PreferredSchedulingTerm{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4622[yyj4622] = PreferredSchedulingTerm{} + yyv1[yyj1] = PreferredSchedulingTerm{} } else { - yyv4624 := &yyv4622[yyj4622] - yyv4624.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4622 := 0 - for ; !r.CheckBreak(); yyj4622++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4622 >= len(yyv4622) { - yyv4622 = append(yyv4622, PreferredSchedulingTerm{}) // var yyz4622 PreferredSchedulingTerm - yyc4622 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, PreferredSchedulingTerm{}) // var yyz1 PreferredSchedulingTerm + yyc1 = true } - yyh4622.ElemContainerState(yyj4622) - if yyj4622 < len(yyv4622) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4622[yyj4622] = PreferredSchedulingTerm{} + yyv1[yyj1] = PreferredSchedulingTerm{} } else { - yyv4625 := &yyv4622[yyj4622] - yyv4625.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -58128,17 +68756,17 @@ func (x codecSelfer1234) decSlicePreferredSchedulingTerm(v *[]PreferredSchedulin } } - if yyj4622 < len(yyv4622) { - yyv4622 = yyv4622[:yyj4622] - yyc4622 = true - } else if yyj4622 == 0 && yyv4622 == nil { - yyv4622 = []PreferredSchedulingTerm{} - yyc4622 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []PreferredSchedulingTerm{} + yyc1 = true } } - yyh4622.End() - if yyc4622 { - *v = yyv4622 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -58147,10 +68775,10 @@ func (x codecSelfer1234) encSliceVolume(v []Volume, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4626 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4627 := &yyv4626 - yy4627.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58160,83 +68788,86 @@ func (x codecSelfer1234) decSliceVolume(v *[]Volume, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4628 := *v - yyh4628, yyl4628 := z.DecSliceHelperStart() - var yyc4628 bool - if yyl4628 == 0 { - if yyv4628 == nil { - yyv4628 = []Volume{} - yyc4628 = true - } else if len(yyv4628) != 0 { - yyv4628 = yyv4628[:0] - yyc4628 = true + 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 yyl4628 > 0 { - var yyrr4628, yyrl4628 int - var yyrt4628 bool - if yyl4628 > cap(yyv4628) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4628 := len(yyv4628) > 0 - yyv24628 := yyv4628 - yyrl4628, yyrt4628 = z.DecInferLen(yyl4628, z.DecBasicHandle().MaxInitLen, 192) - if yyrt4628 { - if yyrl4628 <= cap(yyv4628) { - yyv4628 = yyv4628[:yyrl4628] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 224) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4628 = make([]Volume, yyrl4628) + yyv1 = make([]Volume, yyrl1) } } else { - yyv4628 = make([]Volume, yyrl4628) + yyv1 = make([]Volume, yyrl1) } - yyc4628 = true - yyrr4628 = len(yyv4628) - if yyrg4628 { - copy(yyv4628, yyv24628) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4628 != len(yyv4628) { - yyv4628 = yyv4628[:yyl4628] - yyc4628 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4628 := 0 - for ; yyj4628 < yyrr4628; yyj4628++ { - yyh4628.ElemContainerState(yyj4628) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4628[yyj4628] = Volume{} + yyv1[yyj1] = Volume{} } else { - yyv4629 := &yyv4628[yyj4628] - yyv4629.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4628 { - for ; yyj4628 < yyl4628; yyj4628++ { - yyv4628 = append(yyv4628, Volume{}) - yyh4628.ElemContainerState(yyj4628) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Volume{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4628[yyj4628] = Volume{} + yyv1[yyj1] = Volume{} } else { - yyv4630 := &yyv4628[yyj4628] - yyv4630.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4628 := 0 - for ; !r.CheckBreak(); yyj4628++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4628 >= len(yyv4628) { - yyv4628 = append(yyv4628, Volume{}) // var yyz4628 Volume - yyc4628 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Volume{}) // var yyz1 Volume + yyc1 = true } - yyh4628.ElemContainerState(yyj4628) - if yyj4628 < len(yyv4628) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4628[yyj4628] = Volume{} + yyv1[yyj1] = Volume{} } else { - yyv4631 := &yyv4628[yyj4628] - yyv4631.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -58244,17 +68875,17 @@ func (x codecSelfer1234) decSliceVolume(v *[]Volume, d *codec1978.Decoder) { } } - if yyj4628 < len(yyv4628) { - yyv4628 = yyv4628[:yyj4628] - yyc4628 = true - } else if yyj4628 == 0 && yyv4628 == nil { - yyv4628 = []Volume{} - yyc4628 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Volume{} + yyc1 = true } } - yyh4628.End() - if yyc4628 { - *v = yyv4628 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -58263,10 +68894,10 @@ func (x codecSelfer1234) encSliceContainer(v []Container, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4632 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4633 := &yyv4632 - yy4633.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58276,83 +68907,86 @@ func (x codecSelfer1234) decSliceContainer(v *[]Container, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4634 := *v - yyh4634, yyl4634 := z.DecSliceHelperStart() - var yyc4634 bool - if yyl4634 == 0 { - if yyv4634 == nil { - yyv4634 = []Container{} - yyc4634 = true - } else if len(yyv4634) != 0 { - yyv4634 = yyv4634[:0] - yyc4634 = true + 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 yyl4634 > 0 { - var yyrr4634, yyrl4634 int - var yyrt4634 bool - if yyl4634 > cap(yyv4634) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4634 := len(yyv4634) > 0 - yyv24634 := yyv4634 - yyrl4634, yyrt4634 = z.DecInferLen(yyl4634, z.DecBasicHandle().MaxInitLen, 256) - if yyrt4634 { - if yyrl4634 <= cap(yyv4634) { - yyv4634 = yyv4634[:yyrl4634] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 296) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4634 = make([]Container, yyrl4634) + yyv1 = make([]Container, yyrl1) } } else { - yyv4634 = make([]Container, yyrl4634) + yyv1 = make([]Container, yyrl1) } - yyc4634 = true - yyrr4634 = len(yyv4634) - if yyrg4634 { - copy(yyv4634, yyv24634) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4634 != len(yyv4634) { - yyv4634 = yyv4634[:yyl4634] - yyc4634 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4634 := 0 - for ; yyj4634 < yyrr4634; yyj4634++ { - yyh4634.ElemContainerState(yyj4634) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4634[yyj4634] = Container{} + yyv1[yyj1] = Container{} } else { - yyv4635 := &yyv4634[yyj4634] - yyv4635.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4634 { - for ; yyj4634 < yyl4634; yyj4634++ { - yyv4634 = append(yyv4634, Container{}) - yyh4634.ElemContainerState(yyj4634) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Container{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4634[yyj4634] = Container{} + yyv1[yyj1] = Container{} } else { - yyv4636 := &yyv4634[yyj4634] - yyv4636.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4634 := 0 - for ; !r.CheckBreak(); yyj4634++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4634 >= len(yyv4634) { - yyv4634 = append(yyv4634, Container{}) // var yyz4634 Container - yyc4634 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Container{}) // var yyz1 Container + yyc1 = true } - yyh4634.ElemContainerState(yyj4634) - if yyj4634 < len(yyv4634) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4634[yyj4634] = Container{} + yyv1[yyj1] = Container{} } else { - yyv4637 := &yyv4634[yyj4634] - yyv4637.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -58360,17 +68994,17 @@ func (x codecSelfer1234) decSliceContainer(v *[]Container, d *codec1978.Decoder) } } - if yyj4634 < len(yyv4634) { - yyv4634 = yyv4634[:yyj4634] - yyc4634 = true - } else if yyj4634 == 0 && yyv4634 == nil { - yyv4634 = []Container{} - yyc4634 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Container{} + yyc1 = true } } - yyh4634.End() - if yyc4634 { - *v = yyv4634 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -58379,10 +69013,10 @@ func (x codecSelfer1234) encSliceLocalObjectReference(v []LocalObjectReference, z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4638 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4639 := &yyv4638 - yy4639.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58392,83 +69026,86 @@ func (x codecSelfer1234) decSliceLocalObjectReference(v *[]LocalObjectReference, z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4640 := *v - yyh4640, yyl4640 := z.DecSliceHelperStart() - var yyc4640 bool - if yyl4640 == 0 { - if yyv4640 == nil { - yyv4640 = []LocalObjectReference{} - yyc4640 = true - } else if len(yyv4640) != 0 { - yyv4640 = yyv4640[:0] - yyc4640 = true + 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 yyl4640 > 0 { - var yyrr4640, yyrl4640 int - var yyrt4640 bool - if yyl4640 > cap(yyv4640) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4640 := len(yyv4640) > 0 - yyv24640 := yyv4640 - yyrl4640, yyrt4640 = z.DecInferLen(yyl4640, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4640 { - if yyrl4640 <= cap(yyv4640) { - yyv4640 = yyv4640[:yyrl4640] + 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 { - yyv4640 = make([]LocalObjectReference, yyrl4640) + yyv1 = make([]LocalObjectReference, yyrl1) } } else { - yyv4640 = make([]LocalObjectReference, yyrl4640) + yyv1 = make([]LocalObjectReference, yyrl1) } - yyc4640 = true - yyrr4640 = len(yyv4640) - if yyrg4640 { - copy(yyv4640, yyv24640) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4640 != len(yyv4640) { - yyv4640 = yyv4640[:yyl4640] - yyc4640 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4640 := 0 - for ; yyj4640 < yyrr4640; yyj4640++ { - yyh4640.ElemContainerState(yyj4640) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4640[yyj4640] = LocalObjectReference{} + yyv1[yyj1] = LocalObjectReference{} } else { - yyv4641 := &yyv4640[yyj4640] - yyv4641.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4640 { - for ; yyj4640 < yyl4640; yyj4640++ { - yyv4640 = append(yyv4640, LocalObjectReference{}) - yyh4640.ElemContainerState(yyj4640) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, LocalObjectReference{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4640[yyj4640] = LocalObjectReference{} + yyv1[yyj1] = LocalObjectReference{} } else { - yyv4642 := &yyv4640[yyj4640] - yyv4642.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4640 := 0 - for ; !r.CheckBreak(); yyj4640++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4640 >= len(yyv4640) { - yyv4640 = append(yyv4640, LocalObjectReference{}) // var yyz4640 LocalObjectReference - yyc4640 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, LocalObjectReference{}) // var yyz1 LocalObjectReference + yyc1 = true } - yyh4640.ElemContainerState(yyj4640) - if yyj4640 < len(yyv4640) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4640[yyj4640] = LocalObjectReference{} + yyv1[yyj1] = LocalObjectReference{} } else { - yyv4643 := &yyv4640[yyj4640] - yyv4643.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -58476,17 +69113,136 @@ func (x codecSelfer1234) decSliceLocalObjectReference(v *[]LocalObjectReference, } } - if yyj4640 < len(yyv4640) { - yyv4640 = yyv4640[:yyj4640] - yyc4640 = true - } else if yyj4640 == 0 && yyv4640 == nil { - yyv4640 = []LocalObjectReference{} - yyc4640 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []LocalObjectReference{} + yyc1 = true } } - yyh4640.End() - if yyc4640 { - *v = yyv4640 + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceToleration(v []Toleration, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceToleration(v *[]Toleration, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []Toleration{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 72) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]Toleration, yyrl1) + } + } else { + yyv1 = make([]Toleration, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Toleration{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Toleration{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Toleration{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Toleration{}) // var yyz1 Toleration + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = Toleration{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Toleration{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -58495,10 +69251,10 @@ func (x codecSelfer1234) encSlicePodCondition(v []PodCondition, e *codec1978.Enc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4644 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4645 := &yyv4644 - yy4645.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58508,83 +69264,86 @@ func (x codecSelfer1234) decSlicePodCondition(v *[]PodCondition, d *codec1978.De z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4646 := *v - yyh4646, yyl4646 := z.DecSliceHelperStart() - var yyc4646 bool - if yyl4646 == 0 { - if yyv4646 == nil { - yyv4646 = []PodCondition{} - yyc4646 = true - } else if len(yyv4646) != 0 { - yyv4646 = yyv4646[:0] - yyc4646 = true + 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 yyl4646 > 0 { - var yyrr4646, yyrl4646 int - var yyrt4646 bool - if yyl4646 > cap(yyv4646) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4646 := len(yyv4646) > 0 - yyv24646 := yyv4646 - yyrl4646, yyrt4646 = z.DecInferLen(yyl4646, z.DecBasicHandle().MaxInitLen, 112) - if yyrt4646 { - if yyrl4646 <= cap(yyv4646) { - yyv4646 = yyv4646[:yyrl4646] + 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 { - yyv4646 = make([]PodCondition, yyrl4646) + yyv1 = make([]PodCondition, yyrl1) } } else { - yyv4646 = make([]PodCondition, yyrl4646) + yyv1 = make([]PodCondition, yyrl1) } - yyc4646 = true - yyrr4646 = len(yyv4646) - if yyrg4646 { - copy(yyv4646, yyv24646) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4646 != len(yyv4646) { - yyv4646 = yyv4646[:yyl4646] - yyc4646 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4646 := 0 - for ; yyj4646 < yyrr4646; yyj4646++ { - yyh4646.ElemContainerState(yyj4646) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4646[yyj4646] = PodCondition{} + yyv1[yyj1] = PodCondition{} } else { - yyv4647 := &yyv4646[yyj4646] - yyv4647.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4646 { - for ; yyj4646 < yyl4646; yyj4646++ { - yyv4646 = append(yyv4646, PodCondition{}) - yyh4646.ElemContainerState(yyj4646) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, PodCondition{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4646[yyj4646] = PodCondition{} + yyv1[yyj1] = PodCondition{} } else { - yyv4648 := &yyv4646[yyj4646] - yyv4648.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4646 := 0 - for ; !r.CheckBreak(); yyj4646++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4646 >= len(yyv4646) { - yyv4646 = append(yyv4646, PodCondition{}) // var yyz4646 PodCondition - yyc4646 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, PodCondition{}) // var yyz1 PodCondition + yyc1 = true } - yyh4646.ElemContainerState(yyj4646) - if yyj4646 < len(yyv4646) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4646[yyj4646] = PodCondition{} + yyv1[yyj1] = PodCondition{} } else { - yyv4649 := &yyv4646[yyj4646] - yyv4649.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -58592,17 +69351,17 @@ func (x codecSelfer1234) decSlicePodCondition(v *[]PodCondition, d *codec1978.De } } - if yyj4646 < len(yyv4646) { - yyv4646 = yyv4646[:yyj4646] - yyc4646 = true - } else if yyj4646 == 0 && yyv4646 == nil { - yyv4646 = []PodCondition{} - yyc4646 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []PodCondition{} + yyc1 = true } } - yyh4646.End() - if yyc4646 { - *v = yyv4646 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -58611,10 +69370,10 @@ func (x codecSelfer1234) encSliceContainerStatus(v []ContainerStatus, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4650 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4651 := &yyv4650 - yy4651.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58624,83 +69383,86 @@ func (x codecSelfer1234) decSliceContainerStatus(v *[]ContainerStatus, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4652 := *v - yyh4652, yyl4652 := z.DecSliceHelperStart() - var yyc4652 bool - if yyl4652 == 0 { - if yyv4652 == nil { - yyv4652 = []ContainerStatus{} - yyc4652 = true - } else if len(yyv4652) != 0 { - yyv4652 = yyv4652[:0] - yyc4652 = true + 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 yyl4652 > 0 { - var yyrr4652, yyrl4652 int - var yyrt4652 bool - if yyl4652 > cap(yyv4652) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4652 := len(yyv4652) > 0 - yyv24652 := yyv4652 - yyrl4652, yyrt4652 = z.DecInferLen(yyl4652, z.DecBasicHandle().MaxInitLen, 120) - if yyrt4652 { - if yyrl4652 <= cap(yyv4652) { - yyv4652 = yyv4652[:yyrl4652] + 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 { - yyv4652 = make([]ContainerStatus, yyrl4652) + yyv1 = make([]ContainerStatus, yyrl1) } } else { - yyv4652 = make([]ContainerStatus, yyrl4652) + yyv1 = make([]ContainerStatus, yyrl1) } - yyc4652 = true - yyrr4652 = len(yyv4652) - if yyrg4652 { - copy(yyv4652, yyv24652) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4652 != len(yyv4652) { - yyv4652 = yyv4652[:yyl4652] - yyc4652 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4652 := 0 - for ; yyj4652 < yyrr4652; yyj4652++ { - yyh4652.ElemContainerState(yyj4652) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4652[yyj4652] = ContainerStatus{} + yyv1[yyj1] = ContainerStatus{} } else { - yyv4653 := &yyv4652[yyj4652] - yyv4653.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4652 { - for ; yyj4652 < yyl4652; yyj4652++ { - yyv4652 = append(yyv4652, ContainerStatus{}) - yyh4652.ElemContainerState(yyj4652) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ContainerStatus{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4652[yyj4652] = ContainerStatus{} + yyv1[yyj1] = ContainerStatus{} } else { - yyv4654 := &yyv4652[yyj4652] - yyv4654.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4652 := 0 - for ; !r.CheckBreak(); yyj4652++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4652 >= len(yyv4652) { - yyv4652 = append(yyv4652, ContainerStatus{}) // var yyz4652 ContainerStatus - yyc4652 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ContainerStatus{}) // var yyz1 ContainerStatus + yyc1 = true } - yyh4652.ElemContainerState(yyj4652) - if yyj4652 < len(yyv4652) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4652[yyj4652] = ContainerStatus{} + yyv1[yyj1] = ContainerStatus{} } else { - yyv4655 := &yyv4652[yyj4652] - yyv4655.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -58708,17 +69470,136 @@ func (x codecSelfer1234) decSliceContainerStatus(v *[]ContainerStatus, d *codec1 } } - if yyj4652 < len(yyv4652) { - yyv4652 = yyv4652[:yyj4652] - yyc4652 = true - } else if yyj4652 == 0 && yyv4652 == nil { - yyv4652 = []ContainerStatus{} - yyc4652 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ContainerStatus{} + yyc1 = true } } - yyh4652.End() - if yyc4652 { - *v = yyv4652 + 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, 736) + 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 } } @@ -58727,10 +69608,10 @@ func (x codecSelfer1234) encSlicePodTemplate(v []PodTemplate, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4656 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4657 := &yyv4656 - yy4657.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58740,83 +69621,86 @@ func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4658 := *v - yyh4658, yyl4658 := z.DecSliceHelperStart() - var yyc4658 bool - if yyl4658 == 0 { - if yyv4658 == nil { - yyv4658 = []PodTemplate{} - yyc4658 = true - } else if len(yyv4658) != 0 { - yyv4658 = yyv4658[:0] - yyc4658 = true + 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 yyl4658 > 0 { - var yyrr4658, yyrl4658 int - var yyrt4658 bool - if yyl4658 > cap(yyv4658) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4658 := len(yyv4658) > 0 - yyv24658 := yyv4658 - yyrl4658, yyrt4658 = z.DecInferLen(yyl4658, z.DecBasicHandle().MaxInitLen, 704) - if yyrt4658 { - if yyrl4658 <= cap(yyv4658) { - yyv4658 = yyv4658[:yyrl4658] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 784) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4658 = make([]PodTemplate, yyrl4658) + yyv1 = make([]PodTemplate, yyrl1) } } else { - yyv4658 = make([]PodTemplate, yyrl4658) + yyv1 = make([]PodTemplate, yyrl1) } - yyc4658 = true - yyrr4658 = len(yyv4658) - if yyrg4658 { - copy(yyv4658, yyv24658) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4658 != len(yyv4658) { - yyv4658 = yyv4658[:yyl4658] - yyc4658 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4658 := 0 - for ; yyj4658 < yyrr4658; yyj4658++ { - yyh4658.ElemContainerState(yyj4658) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4658[yyj4658] = PodTemplate{} + yyv1[yyj1] = PodTemplate{} } else { - yyv4659 := &yyv4658[yyj4658] - yyv4659.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4658 { - for ; yyj4658 < yyl4658; yyj4658++ { - yyv4658 = append(yyv4658, PodTemplate{}) - yyh4658.ElemContainerState(yyj4658) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, PodTemplate{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4658[yyj4658] = PodTemplate{} + yyv1[yyj1] = PodTemplate{} } else { - yyv4660 := &yyv4658[yyj4658] - yyv4660.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4658 := 0 - for ; !r.CheckBreak(); yyj4658++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4658 >= len(yyv4658) { - yyv4658 = append(yyv4658, PodTemplate{}) // var yyz4658 PodTemplate - yyc4658 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, PodTemplate{}) // var yyz1 PodTemplate + yyc1 = true } - yyh4658.ElemContainerState(yyj4658) - if yyj4658 < len(yyv4658) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4658[yyj4658] = PodTemplate{} + yyv1[yyj1] = PodTemplate{} } else { - yyv4661 := &yyv4658[yyj4658] - yyv4661.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -58824,17 +69708,136 @@ func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Deco } } - if yyj4658 < len(yyv4658) { - yyv4658 = yyv4658[:yyj4658] - yyc4658 = true - } else if yyj4658 == 0 && yyv4658 == nil { - yyv4658 = []PodTemplate{} - yyc4658 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []PodTemplate{} + yyc1 = true } } - yyh4658.End() - if yyc4658 { - *v = yyv4658 + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceReplicationControllerCondition(v []ReplicationControllerCondition, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceReplicationControllerCondition(v *[]ReplicationControllerCondition, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []ReplicationControllerCondition{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 88) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]ReplicationControllerCondition, yyrl1) + } + } else { + yyv1 = make([]ReplicationControllerCondition, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = ReplicationControllerCondition{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ReplicationControllerCondition{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = ReplicationControllerCondition{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ReplicationControllerCondition{}) // var yyz1 ReplicationControllerCondition + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = ReplicationControllerCondition{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ReplicationControllerCondition{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -58843,10 +69846,10 @@ func (x codecSelfer1234) encSliceReplicationController(v []ReplicationController z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4662 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4663 := &yyv4662 - yy4663.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58856,83 +69859,86 @@ func (x codecSelfer1234) decSliceReplicationController(v *[]ReplicationControlle z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4664 := *v - yyh4664, yyl4664 := z.DecSliceHelperStart() - var yyc4664 bool - if yyl4664 == 0 { - if yyv4664 == nil { - yyv4664 = []ReplicationController{} - yyc4664 = true - } else if len(yyv4664) != 0 { - yyv4664 = yyv4664[:0] - yyc4664 = true + 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 yyl4664 > 0 { - var yyrr4664, yyrl4664 int - var yyrt4664 bool - if yyl4664 > cap(yyv4664) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4664 := len(yyv4664) > 0 - yyv24664 := yyv4664 - yyrl4664, yyrt4664 = z.DecInferLen(yyl4664, z.DecBasicHandle().MaxInitLen, 304) - if yyrt4664 { - if yyrl4664 <= cap(yyv4664) { - yyv4664 = yyv4664[:yyrl4664] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 336) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4664 = make([]ReplicationController, yyrl4664) + yyv1 = make([]ReplicationController, yyrl1) } } else { - yyv4664 = make([]ReplicationController, yyrl4664) + yyv1 = make([]ReplicationController, yyrl1) } - yyc4664 = true - yyrr4664 = len(yyv4664) - if yyrg4664 { - copy(yyv4664, yyv24664) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4664 != len(yyv4664) { - yyv4664 = yyv4664[:yyl4664] - yyc4664 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4664 := 0 - for ; yyj4664 < yyrr4664; yyj4664++ { - yyh4664.ElemContainerState(yyj4664) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4664[yyj4664] = ReplicationController{} + yyv1[yyj1] = ReplicationController{} } else { - yyv4665 := &yyv4664[yyj4664] - yyv4665.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4664 { - for ; yyj4664 < yyl4664; yyj4664++ { - yyv4664 = append(yyv4664, ReplicationController{}) - yyh4664.ElemContainerState(yyj4664) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ReplicationController{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4664[yyj4664] = ReplicationController{} + yyv1[yyj1] = ReplicationController{} } else { - yyv4666 := &yyv4664[yyj4664] - yyv4666.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4664 := 0 - for ; !r.CheckBreak(); yyj4664++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4664 >= len(yyv4664) { - yyv4664 = append(yyv4664, ReplicationController{}) // var yyz4664 ReplicationController - yyc4664 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ReplicationController{}) // var yyz1 ReplicationController + yyc1 = true } - yyh4664.ElemContainerState(yyj4664) - if yyj4664 < len(yyv4664) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4664[yyj4664] = ReplicationController{} + yyv1[yyj1] = ReplicationController{} } else { - yyv4667 := &yyv4664[yyj4664] - yyv4667.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -58940,133 +69946,17 @@ func (x codecSelfer1234) decSliceReplicationController(v *[]ReplicationControlle } } - if yyj4664 < len(yyv4664) { - yyv4664 = yyv4664[:yyj4664] - yyc4664 = true - } else if yyj4664 == 0 && yyv4664 == nil { - yyv4664 = []ReplicationController{} - yyc4664 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ReplicationController{} + yyc1 = true } } - yyh4664.End() - if yyc4664 { - *v = yyv4664 - } -} - -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 _, yyv4668 := range v { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4669 := &yyv4668 - yy4669.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 - - yyv4670 := *v - yyh4670, yyl4670 := z.DecSliceHelperStart() - var yyc4670 bool - if yyl4670 == 0 { - if yyv4670 == nil { - yyv4670 = []Service{} - yyc4670 = true - } else if len(yyv4670) != 0 { - yyv4670 = yyv4670[:0] - yyc4670 = true - } - } else if yyl4670 > 0 { - var yyrr4670, yyrl4670 int - var yyrt4670 bool - if yyl4670 > cap(yyv4670) { - - yyrg4670 := len(yyv4670) > 0 - yyv24670 := yyv4670 - yyrl4670, yyrt4670 = z.DecInferLen(yyl4670, z.DecBasicHandle().MaxInitLen, 440) - if yyrt4670 { - if yyrl4670 <= cap(yyv4670) { - yyv4670 = yyv4670[:yyrl4670] - } else { - yyv4670 = make([]Service, yyrl4670) - } - } else { - yyv4670 = make([]Service, yyrl4670) - } - yyc4670 = true - yyrr4670 = len(yyv4670) - if yyrg4670 { - copy(yyv4670, yyv24670) - } - } else if yyl4670 != len(yyv4670) { - yyv4670 = yyv4670[:yyl4670] - yyc4670 = true - } - yyj4670 := 0 - for ; yyj4670 < yyrr4670; yyj4670++ { - yyh4670.ElemContainerState(yyj4670) - if r.TryDecodeAsNil() { - yyv4670[yyj4670] = Service{} - } else { - yyv4671 := &yyv4670[yyj4670] - yyv4671.CodecDecodeSelf(d) - } - - } - if yyrt4670 { - for ; yyj4670 < yyl4670; yyj4670++ { - yyv4670 = append(yyv4670, Service{}) - yyh4670.ElemContainerState(yyj4670) - if r.TryDecodeAsNil() { - yyv4670[yyj4670] = Service{} - } else { - yyv4672 := &yyv4670[yyj4670] - yyv4672.CodecDecodeSelf(d) - } - - } - } - - } else { - yyj4670 := 0 - for ; !r.CheckBreak(); yyj4670++ { - - if yyj4670 >= len(yyv4670) { - yyv4670 = append(yyv4670, Service{}) // var yyz4670 Service - yyc4670 = true - } - yyh4670.ElemContainerState(yyj4670) - if yyj4670 < len(yyv4670) { - if r.TryDecodeAsNil() { - yyv4670[yyj4670] = Service{} - } else { - yyv4673 := &yyv4670[yyj4670] - yyv4673.CodecDecodeSelf(d) - } - - } else { - z.DecSwallow() - } - - } - if yyj4670 < len(yyv4670) { - yyv4670 = yyv4670[:yyj4670] - yyc4670 = true - } else if yyj4670 == 0 && yyv4670 == nil { - yyv4670 = []Service{} - yyc4670 = true - } - } - yyh4670.End() - if yyc4670 { - *v = yyv4670 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -59075,10 +69965,10 @@ func (x codecSelfer1234) encSliceLoadBalancerIngress(v []LoadBalancerIngress, e z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4674 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4675 := &yyv4674 - yy4675.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59088,83 +69978,86 @@ func (x codecSelfer1234) decSliceLoadBalancerIngress(v *[]LoadBalancerIngress, d z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4676 := *v - yyh4676, yyl4676 := z.DecSliceHelperStart() - var yyc4676 bool - if yyl4676 == 0 { - if yyv4676 == nil { - yyv4676 = []LoadBalancerIngress{} - yyc4676 = true - } else if len(yyv4676) != 0 { - yyv4676 = yyv4676[:0] - yyc4676 = true + 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 yyl4676 > 0 { - var yyrr4676, yyrl4676 int - var yyrt4676 bool - if yyl4676 > cap(yyv4676) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4676 := len(yyv4676) > 0 - yyv24676 := yyv4676 - yyrl4676, yyrt4676 = z.DecInferLen(yyl4676, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4676 { - if yyrl4676 <= cap(yyv4676) { - yyv4676 = yyv4676[:yyrl4676] + 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 { - yyv4676 = make([]LoadBalancerIngress, yyrl4676) + yyv1 = make([]LoadBalancerIngress, yyrl1) } } else { - yyv4676 = make([]LoadBalancerIngress, yyrl4676) + yyv1 = make([]LoadBalancerIngress, yyrl1) } - yyc4676 = true - yyrr4676 = len(yyv4676) - if yyrg4676 { - copy(yyv4676, yyv24676) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4676 != len(yyv4676) { - yyv4676 = yyv4676[:yyl4676] - yyc4676 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4676 := 0 - for ; yyj4676 < yyrr4676; yyj4676++ { - yyh4676.ElemContainerState(yyj4676) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4676[yyj4676] = LoadBalancerIngress{} + yyv1[yyj1] = LoadBalancerIngress{} } else { - yyv4677 := &yyv4676[yyj4676] - yyv4677.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4676 { - for ; yyj4676 < yyl4676; yyj4676++ { - yyv4676 = append(yyv4676, LoadBalancerIngress{}) - yyh4676.ElemContainerState(yyj4676) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, LoadBalancerIngress{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4676[yyj4676] = LoadBalancerIngress{} + yyv1[yyj1] = LoadBalancerIngress{} } else { - yyv4678 := &yyv4676[yyj4676] - yyv4678.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4676 := 0 - for ; !r.CheckBreak(); yyj4676++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4676 >= len(yyv4676) { - yyv4676 = append(yyv4676, LoadBalancerIngress{}) // var yyz4676 LoadBalancerIngress - yyc4676 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, LoadBalancerIngress{}) // var yyz1 LoadBalancerIngress + yyc1 = true } - yyh4676.ElemContainerState(yyj4676) - if yyj4676 < len(yyv4676) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4676[yyj4676] = LoadBalancerIngress{} + yyv1[yyj1] = LoadBalancerIngress{} } else { - yyv4679 := &yyv4676[yyj4676] - yyv4679.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -59172,17 +70065,17 @@ func (x codecSelfer1234) decSliceLoadBalancerIngress(v *[]LoadBalancerIngress, d } } - if yyj4676 < len(yyv4676) { - yyv4676 = yyv4676[:yyj4676] - yyc4676 = true - } else if yyj4676 == 0 && yyv4676 == nil { - yyv4676 = []LoadBalancerIngress{} - yyc4676 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []LoadBalancerIngress{} + yyc1 = true } } - yyh4676.End() - if yyc4676 { - *v = yyv4676 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -59191,10 +70084,10 @@ func (x codecSelfer1234) encSliceServicePort(v []ServicePort, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4680 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4681 := &yyv4680 - yy4681.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59204,83 +70097,86 @@ func (x codecSelfer1234) decSliceServicePort(v *[]ServicePort, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4682 := *v - yyh4682, yyl4682 := z.DecSliceHelperStart() - var yyc4682 bool - if yyl4682 == 0 { - if yyv4682 == nil { - yyv4682 = []ServicePort{} - yyc4682 = true - } else if len(yyv4682) != 0 { - yyv4682 = yyv4682[:0] - yyc4682 = true + 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 yyl4682 > 0 { - var yyrr4682, yyrl4682 int - var yyrt4682 bool - if yyl4682 > cap(yyv4682) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4682 := len(yyv4682) > 0 - yyv24682 := yyv4682 - yyrl4682, yyrt4682 = z.DecInferLen(yyl4682, z.DecBasicHandle().MaxInitLen, 80) - if yyrt4682 { - if yyrl4682 <= cap(yyv4682) { - yyv4682 = yyv4682[:yyrl4682] + 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 { - yyv4682 = make([]ServicePort, yyrl4682) + yyv1 = make([]ServicePort, yyrl1) } } else { - yyv4682 = make([]ServicePort, yyrl4682) + yyv1 = make([]ServicePort, yyrl1) } - yyc4682 = true - yyrr4682 = len(yyv4682) - if yyrg4682 { - copy(yyv4682, yyv24682) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4682 != len(yyv4682) { - yyv4682 = yyv4682[:yyl4682] - yyc4682 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4682 := 0 - for ; yyj4682 < yyrr4682; yyj4682++ { - yyh4682.ElemContainerState(yyj4682) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4682[yyj4682] = ServicePort{} + yyv1[yyj1] = ServicePort{} } else { - yyv4683 := &yyv4682[yyj4682] - yyv4683.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4682 { - for ; yyj4682 < yyl4682; yyj4682++ { - yyv4682 = append(yyv4682, ServicePort{}) - yyh4682.ElemContainerState(yyj4682) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ServicePort{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4682[yyj4682] = ServicePort{} + yyv1[yyj1] = ServicePort{} } else { - yyv4684 := &yyv4682[yyj4682] - yyv4684.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4682 := 0 - for ; !r.CheckBreak(); yyj4682++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4682 >= len(yyv4682) { - yyv4682 = append(yyv4682, ServicePort{}) // var yyz4682 ServicePort - yyc4682 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ServicePort{}) // var yyz1 ServicePort + yyc1 = true } - yyh4682.ElemContainerState(yyj4682) - if yyj4682 < len(yyv4682) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4682[yyj4682] = ServicePort{} + yyv1[yyj1] = ServicePort{} } else { - yyv4685 := &yyv4682[yyj4682] - yyv4685.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -59288,17 +70184,136 @@ func (x codecSelfer1234) decSliceServicePort(v *[]ServicePort, d *codec1978.Deco } } - if yyj4682 < len(yyv4682) { - yyv4682 = yyv4682[:yyj4682] - yyc4682 = true - } else if yyj4682 == 0 && yyv4682 == nil { - yyv4682 = []ServicePort{} - yyc4682 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ServicePort{} + yyc1 = true } } - yyh4682.End() - if yyc4682 { - *v = yyv4682 + 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, 464) + 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 } } @@ -59307,10 +70322,10 @@ func (x codecSelfer1234) encSliceObjectReference(v []ObjectReference, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4686 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4687 := &yyv4686 - yy4687.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59320,83 +70335,86 @@ func (x codecSelfer1234) decSliceObjectReference(v *[]ObjectReference, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4688 := *v - yyh4688, yyl4688 := z.DecSliceHelperStart() - var yyc4688 bool - if yyl4688 == 0 { - if yyv4688 == nil { - yyv4688 = []ObjectReference{} - yyc4688 = true - } else if len(yyv4688) != 0 { - yyv4688 = yyv4688[:0] - yyc4688 = true + 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 yyl4688 > 0 { - var yyrr4688, yyrl4688 int - var yyrt4688 bool - if yyl4688 > cap(yyv4688) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4688 := len(yyv4688) > 0 - yyv24688 := yyv4688 - yyrl4688, yyrt4688 = z.DecInferLen(yyl4688, z.DecBasicHandle().MaxInitLen, 112) - if yyrt4688 { - if yyrl4688 <= cap(yyv4688) { - yyv4688 = yyv4688[:yyrl4688] + 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 { - yyv4688 = make([]ObjectReference, yyrl4688) + yyv1 = make([]ObjectReference, yyrl1) } } else { - yyv4688 = make([]ObjectReference, yyrl4688) + yyv1 = make([]ObjectReference, yyrl1) } - yyc4688 = true - yyrr4688 = len(yyv4688) - if yyrg4688 { - copy(yyv4688, yyv24688) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4688 != len(yyv4688) { - yyv4688 = yyv4688[:yyl4688] - yyc4688 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4688 := 0 - for ; yyj4688 < yyrr4688; yyj4688++ { - yyh4688.ElemContainerState(yyj4688) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4688[yyj4688] = ObjectReference{} + yyv1[yyj1] = ObjectReference{} } else { - yyv4689 := &yyv4688[yyj4688] - yyv4689.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4688 { - for ; yyj4688 < yyl4688; yyj4688++ { - yyv4688 = append(yyv4688, ObjectReference{}) - yyh4688.ElemContainerState(yyj4688) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ObjectReference{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4688[yyj4688] = ObjectReference{} + yyv1[yyj1] = ObjectReference{} } else { - yyv4690 := &yyv4688[yyj4688] - yyv4690.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4688 := 0 - for ; !r.CheckBreak(); yyj4688++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4688 >= len(yyv4688) { - yyv4688 = append(yyv4688, ObjectReference{}) // var yyz4688 ObjectReference - yyc4688 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ObjectReference{}) // var yyz1 ObjectReference + yyc1 = true } - yyh4688.ElemContainerState(yyj4688) - if yyj4688 < len(yyv4688) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4688[yyj4688] = ObjectReference{} + yyv1[yyj1] = ObjectReference{} } else { - yyv4691 := &yyv4688[yyj4688] - yyv4691.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -59404,17 +70422,17 @@ func (x codecSelfer1234) decSliceObjectReference(v *[]ObjectReference, d *codec1 } } - if yyj4688 < len(yyv4688) { - yyv4688 = yyv4688[:yyj4688] - yyc4688 = true - } else if yyj4688 == 0 && yyv4688 == nil { - yyv4688 = []ObjectReference{} - yyc4688 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ObjectReference{} + yyc1 = true } } - yyh4688.End() - if yyc4688 { - *v = yyv4688 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -59423,10 +70441,10 @@ func (x codecSelfer1234) encSliceServiceAccount(v []ServiceAccount, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4692 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4693 := &yyv4692 - yy4693.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59436,83 +70454,86 @@ func (x codecSelfer1234) decSliceServiceAccount(v *[]ServiceAccount, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4694 := *v - yyh4694, yyl4694 := z.DecSliceHelperStart() - var yyc4694 bool - if yyl4694 == 0 { - if yyv4694 == nil { - yyv4694 = []ServiceAccount{} - yyc4694 = true - } else if len(yyv4694) != 0 { - yyv4694 = yyv4694[:0] - yyc4694 = true + 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 yyl4694 > 0 { - var yyrr4694, yyrl4694 int - var yyrt4694 bool - if yyl4694 > cap(yyv4694) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4694 := len(yyv4694) > 0 - yyv24694 := yyv4694 - yyrl4694, yyrt4694 = z.DecInferLen(yyl4694, z.DecBasicHandle().MaxInitLen, 304) - if yyrt4694 { - if yyrl4694 <= cap(yyv4694) { - yyv4694 = yyv4694[:yyrl4694] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 312) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4694 = make([]ServiceAccount, yyrl4694) + yyv1 = make([]ServiceAccount, yyrl1) } } else { - yyv4694 = make([]ServiceAccount, yyrl4694) + yyv1 = make([]ServiceAccount, yyrl1) } - yyc4694 = true - yyrr4694 = len(yyv4694) - if yyrg4694 { - copy(yyv4694, yyv24694) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4694 != len(yyv4694) { - yyv4694 = yyv4694[:yyl4694] - yyc4694 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4694 := 0 - for ; yyj4694 < yyrr4694; yyj4694++ { - yyh4694.ElemContainerState(yyj4694) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4694[yyj4694] = ServiceAccount{} + yyv1[yyj1] = ServiceAccount{} } else { - yyv4695 := &yyv4694[yyj4694] - yyv4695.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4694 { - for ; yyj4694 < yyl4694; yyj4694++ { - yyv4694 = append(yyv4694, ServiceAccount{}) - yyh4694.ElemContainerState(yyj4694) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ServiceAccount{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4694[yyj4694] = ServiceAccount{} + yyv1[yyj1] = ServiceAccount{} } else { - yyv4696 := &yyv4694[yyj4694] - yyv4696.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4694 := 0 - for ; !r.CheckBreak(); yyj4694++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4694 >= len(yyv4694) { - yyv4694 = append(yyv4694, ServiceAccount{}) // var yyz4694 ServiceAccount - yyc4694 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ServiceAccount{}) // var yyz1 ServiceAccount + yyc1 = true } - yyh4694.ElemContainerState(yyj4694) - if yyj4694 < len(yyv4694) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4694[yyj4694] = ServiceAccount{} + yyv1[yyj1] = ServiceAccount{} } else { - yyv4697 := &yyv4694[yyj4694] - yyv4697.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -59520,17 +70541,17 @@ func (x codecSelfer1234) decSliceServiceAccount(v *[]ServiceAccount, d *codec197 } } - if yyj4694 < len(yyv4694) { - yyv4694 = yyv4694[:yyj4694] - yyc4694 = true - } else if yyj4694 == 0 && yyv4694 == nil { - yyv4694 = []ServiceAccount{} - yyc4694 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ServiceAccount{} + yyc1 = true } } - yyh4694.End() - if yyc4694 { - *v = yyv4694 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -59539,10 +70560,10 @@ func (x codecSelfer1234) encSliceEndpointSubset(v []EndpointSubset, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4698 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4699 := &yyv4698 - yy4699.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59552,83 +70573,86 @@ func (x codecSelfer1234) decSliceEndpointSubset(v *[]EndpointSubset, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4700 := *v - yyh4700, yyl4700 := z.DecSliceHelperStart() - var yyc4700 bool - if yyl4700 == 0 { - if yyv4700 == nil { - yyv4700 = []EndpointSubset{} - yyc4700 = true - } else if len(yyv4700) != 0 { - yyv4700 = yyv4700[:0] - yyc4700 = true + 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 yyl4700 > 0 { - var yyrr4700, yyrl4700 int - var yyrt4700 bool - if yyl4700 > cap(yyv4700) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4700 := len(yyv4700) > 0 - yyv24700 := yyv4700 - yyrl4700, yyrt4700 = z.DecInferLen(yyl4700, z.DecBasicHandle().MaxInitLen, 72) - if yyrt4700 { - if yyrl4700 <= cap(yyv4700) { - yyv4700 = yyv4700[:yyrl4700] + 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 { - yyv4700 = make([]EndpointSubset, yyrl4700) + yyv1 = make([]EndpointSubset, yyrl1) } } else { - yyv4700 = make([]EndpointSubset, yyrl4700) + yyv1 = make([]EndpointSubset, yyrl1) } - yyc4700 = true - yyrr4700 = len(yyv4700) - if yyrg4700 { - copy(yyv4700, yyv24700) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4700 != len(yyv4700) { - yyv4700 = yyv4700[:yyl4700] - yyc4700 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4700 := 0 - for ; yyj4700 < yyrr4700; yyj4700++ { - yyh4700.ElemContainerState(yyj4700) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4700[yyj4700] = EndpointSubset{} + yyv1[yyj1] = EndpointSubset{} } else { - yyv4701 := &yyv4700[yyj4700] - yyv4701.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4700 { - for ; yyj4700 < yyl4700; yyj4700++ { - yyv4700 = append(yyv4700, EndpointSubset{}) - yyh4700.ElemContainerState(yyj4700) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, EndpointSubset{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4700[yyj4700] = EndpointSubset{} + yyv1[yyj1] = EndpointSubset{} } else { - yyv4702 := &yyv4700[yyj4700] - yyv4702.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4700 := 0 - for ; !r.CheckBreak(); yyj4700++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4700 >= len(yyv4700) { - yyv4700 = append(yyv4700, EndpointSubset{}) // var yyz4700 EndpointSubset - yyc4700 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, EndpointSubset{}) // var yyz1 EndpointSubset + yyc1 = true } - yyh4700.ElemContainerState(yyj4700) - if yyj4700 < len(yyv4700) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4700[yyj4700] = EndpointSubset{} + yyv1[yyj1] = EndpointSubset{} } else { - yyv4703 := &yyv4700[yyj4700] - yyv4703.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -59636,17 +70660,17 @@ func (x codecSelfer1234) decSliceEndpointSubset(v *[]EndpointSubset, d *codec197 } } - if yyj4700 < len(yyv4700) { - yyv4700 = yyv4700[:yyj4700] - yyc4700 = true - } else if yyj4700 == 0 && yyv4700 == nil { - yyv4700 = []EndpointSubset{} - yyc4700 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []EndpointSubset{} + yyc1 = true } } - yyh4700.End() - if yyc4700 { - *v = yyv4700 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -59655,10 +70679,10 @@ func (x codecSelfer1234) encSliceEndpointAddress(v []EndpointAddress, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4704 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4705 := &yyv4704 - yy4705.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59668,83 +70692,86 @@ func (x codecSelfer1234) decSliceEndpointAddress(v *[]EndpointAddress, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4706 := *v - yyh4706, yyl4706 := z.DecSliceHelperStart() - var yyc4706 bool - if yyl4706 == 0 { - if yyv4706 == nil { - yyv4706 = []EndpointAddress{} - yyc4706 = true - } else if len(yyv4706) != 0 { - yyv4706 = yyv4706[:0] - yyc4706 = true + 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 yyl4706 > 0 { - var yyrr4706, yyrl4706 int - var yyrt4706 bool - if yyl4706 > cap(yyv4706) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4706 := len(yyv4706) > 0 - yyv24706 := yyv4706 - yyrl4706, yyrt4706 = z.DecInferLen(yyl4706, z.DecBasicHandle().MaxInitLen, 48) - if yyrt4706 { - if yyrl4706 <= cap(yyv4706) { - yyv4706 = yyv4706[:yyrl4706] + 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 { - yyv4706 = make([]EndpointAddress, yyrl4706) + yyv1 = make([]EndpointAddress, yyrl1) } } else { - yyv4706 = make([]EndpointAddress, yyrl4706) + yyv1 = make([]EndpointAddress, yyrl1) } - yyc4706 = true - yyrr4706 = len(yyv4706) - if yyrg4706 { - copy(yyv4706, yyv24706) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4706 != len(yyv4706) { - yyv4706 = yyv4706[:yyl4706] - yyc4706 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4706 := 0 - for ; yyj4706 < yyrr4706; yyj4706++ { - yyh4706.ElemContainerState(yyj4706) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4706[yyj4706] = EndpointAddress{} + yyv1[yyj1] = EndpointAddress{} } else { - yyv4707 := &yyv4706[yyj4706] - yyv4707.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4706 { - for ; yyj4706 < yyl4706; yyj4706++ { - yyv4706 = append(yyv4706, EndpointAddress{}) - yyh4706.ElemContainerState(yyj4706) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, EndpointAddress{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4706[yyj4706] = EndpointAddress{} + yyv1[yyj1] = EndpointAddress{} } else { - yyv4708 := &yyv4706[yyj4706] - yyv4708.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4706 := 0 - for ; !r.CheckBreak(); yyj4706++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4706 >= len(yyv4706) { - yyv4706 = append(yyv4706, EndpointAddress{}) // var yyz4706 EndpointAddress - yyc4706 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, EndpointAddress{}) // var yyz1 EndpointAddress + yyc1 = true } - yyh4706.ElemContainerState(yyj4706) - if yyj4706 < len(yyv4706) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4706[yyj4706] = EndpointAddress{} + yyv1[yyj1] = EndpointAddress{} } else { - yyv4709 := &yyv4706[yyj4706] - yyv4709.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -59752,17 +70779,17 @@ func (x codecSelfer1234) decSliceEndpointAddress(v *[]EndpointAddress, d *codec1 } } - if yyj4706 < len(yyv4706) { - yyv4706 = yyv4706[:yyj4706] - yyc4706 = true - } else if yyj4706 == 0 && yyv4706 == nil { - yyv4706 = []EndpointAddress{} - yyc4706 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []EndpointAddress{} + yyc1 = true } } - yyh4706.End() - if yyc4706 { - *v = yyv4706 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -59771,10 +70798,10 @@ func (x codecSelfer1234) encSliceEndpointPort(v []EndpointPort, e *codec1978.Enc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4710 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4711 := &yyv4710 - yy4711.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59784,83 +70811,86 @@ func (x codecSelfer1234) decSliceEndpointPort(v *[]EndpointPort, d *codec1978.De z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4712 := *v - yyh4712, yyl4712 := z.DecSliceHelperStart() - var yyc4712 bool - if yyl4712 == 0 { - if yyv4712 == nil { - yyv4712 = []EndpointPort{} - yyc4712 = true - } else if len(yyv4712) != 0 { - yyv4712 = yyv4712[:0] - yyc4712 = true + 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 yyl4712 > 0 { - var yyrr4712, yyrl4712 int - var yyrt4712 bool - if yyl4712 > cap(yyv4712) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4712 := len(yyv4712) > 0 - yyv24712 := yyv4712 - yyrl4712, yyrt4712 = z.DecInferLen(yyl4712, z.DecBasicHandle().MaxInitLen, 40) - if yyrt4712 { - if yyrl4712 <= cap(yyv4712) { - yyv4712 = yyv4712[:yyrl4712] + 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 { - yyv4712 = make([]EndpointPort, yyrl4712) + yyv1 = make([]EndpointPort, yyrl1) } } else { - yyv4712 = make([]EndpointPort, yyrl4712) + yyv1 = make([]EndpointPort, yyrl1) } - yyc4712 = true - yyrr4712 = len(yyv4712) - if yyrg4712 { - copy(yyv4712, yyv24712) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4712 != len(yyv4712) { - yyv4712 = yyv4712[:yyl4712] - yyc4712 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4712 := 0 - for ; yyj4712 < yyrr4712; yyj4712++ { - yyh4712.ElemContainerState(yyj4712) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4712[yyj4712] = EndpointPort{} + yyv1[yyj1] = EndpointPort{} } else { - yyv4713 := &yyv4712[yyj4712] - yyv4713.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4712 { - for ; yyj4712 < yyl4712; yyj4712++ { - yyv4712 = append(yyv4712, EndpointPort{}) - yyh4712.ElemContainerState(yyj4712) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, EndpointPort{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4712[yyj4712] = EndpointPort{} + yyv1[yyj1] = EndpointPort{} } else { - yyv4714 := &yyv4712[yyj4712] - yyv4714.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4712 := 0 - for ; !r.CheckBreak(); yyj4712++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4712 >= len(yyv4712) { - yyv4712 = append(yyv4712, EndpointPort{}) // var yyz4712 EndpointPort - yyc4712 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, EndpointPort{}) // var yyz1 EndpointPort + yyc1 = true } - yyh4712.ElemContainerState(yyj4712) - if yyj4712 < len(yyv4712) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4712[yyj4712] = EndpointPort{} + yyv1[yyj1] = EndpointPort{} } else { - yyv4715 := &yyv4712[yyj4712] - yyv4715.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -59868,17 +70898,17 @@ func (x codecSelfer1234) decSliceEndpointPort(v *[]EndpointPort, d *codec1978.De } } - if yyj4712 < len(yyv4712) { - yyv4712 = yyv4712[:yyj4712] - yyc4712 = true - } else if yyj4712 == 0 && yyv4712 == nil { - yyv4712 = []EndpointPort{} - yyc4712 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []EndpointPort{} + yyc1 = true } } - yyh4712.End() - if yyc4712 { - *v = yyv4712 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -59887,10 +70917,10 @@ func (x codecSelfer1234) encSliceEndpoints(v []Endpoints, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4716 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4717 := &yyv4716 - yy4717.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59900,83 +70930,86 @@ func (x codecSelfer1234) decSliceEndpoints(v *[]Endpoints, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4718 := *v - yyh4718, yyl4718 := z.DecSliceHelperStart() - var yyc4718 bool - if yyl4718 == 0 { - if yyv4718 == nil { - yyv4718 = []Endpoints{} - yyc4718 = true - } else if len(yyv4718) != 0 { - yyv4718 = yyv4718[:0] - yyc4718 = true + 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 yyl4718 > 0 { - var yyrr4718, yyrl4718 int - var yyrt4718 bool - if yyl4718 > cap(yyv4718) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4718 := len(yyv4718) > 0 - yyv24718 := yyv4718 - yyrl4718, yyrt4718 = z.DecInferLen(yyl4718, z.DecBasicHandle().MaxInitLen, 280) - if yyrt4718 { - if yyrl4718 <= cap(yyv4718) { - yyv4718 = yyv4718[:yyrl4718] + 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 { - yyv4718 = make([]Endpoints, yyrl4718) + yyv1 = make([]Endpoints, yyrl1) } } else { - yyv4718 = make([]Endpoints, yyrl4718) + yyv1 = make([]Endpoints, yyrl1) } - yyc4718 = true - yyrr4718 = len(yyv4718) - if yyrg4718 { - copy(yyv4718, yyv24718) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4718 != len(yyv4718) { - yyv4718 = yyv4718[:yyl4718] - yyc4718 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4718 := 0 - for ; yyj4718 < yyrr4718; yyj4718++ { - yyh4718.ElemContainerState(yyj4718) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4718[yyj4718] = Endpoints{} + yyv1[yyj1] = Endpoints{} } else { - yyv4719 := &yyv4718[yyj4718] - yyv4719.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4718 { - for ; yyj4718 < yyl4718; yyj4718++ { - yyv4718 = append(yyv4718, Endpoints{}) - yyh4718.ElemContainerState(yyj4718) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Endpoints{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4718[yyj4718] = Endpoints{} + yyv1[yyj1] = Endpoints{} } else { - yyv4720 := &yyv4718[yyj4718] - yyv4720.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4718 := 0 - for ; !r.CheckBreak(); yyj4718++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4718 >= len(yyv4718) { - yyv4718 = append(yyv4718, Endpoints{}) // var yyz4718 Endpoints - yyc4718 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Endpoints{}) // var yyz1 Endpoints + yyc1 = true } - yyh4718.ElemContainerState(yyj4718) - if yyj4718 < len(yyv4718) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4718[yyj4718] = Endpoints{} + yyv1[yyj1] = Endpoints{} } else { - yyv4721 := &yyv4718[yyj4718] - yyv4721.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -59984,17 +71017,136 @@ func (x codecSelfer1234) decSliceEndpoints(v *[]Endpoints, d *codec1978.Decoder) } } - if yyj4718 < len(yyv4718) { - yyv4718 = yyv4718[:yyj4718] - yyc4718 = true - } else if yyj4718 == 0 && yyv4718 == nil { - yyv4718 = []Endpoints{} - yyc4718 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Endpoints{} + yyc1 = true } } - yyh4718.End() - if yyc4718 { - *v = yyv4718 + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceTaint(v []Taint, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceTaint(v *[]Taint, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []Taint{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 72) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]Taint, yyrl1) + } + } else { + yyv1 = make([]Taint, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Taint{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Taint{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Taint{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Taint{}) // var yyz1 Taint + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = Taint{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Taint{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -60003,10 +71155,10 @@ func (x codecSelfer1234) encSliceNodeCondition(v []NodeCondition, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4722 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4723 := &yyv4722 - yy4723.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60016,83 +71168,86 @@ func (x codecSelfer1234) decSliceNodeCondition(v *[]NodeCondition, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4724 := *v - yyh4724, yyl4724 := z.DecSliceHelperStart() - var yyc4724 bool - if yyl4724 == 0 { - if yyv4724 == nil { - yyv4724 = []NodeCondition{} - yyc4724 = true - } else if len(yyv4724) != 0 { - yyv4724 = yyv4724[:0] - yyc4724 = true + 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 yyl4724 > 0 { - var yyrr4724, yyrl4724 int - var yyrt4724 bool - if yyl4724 > cap(yyv4724) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4724 := len(yyv4724) > 0 - yyv24724 := yyv4724 - yyrl4724, yyrt4724 = z.DecInferLen(yyl4724, z.DecBasicHandle().MaxInitLen, 112) - if yyrt4724 { - if yyrl4724 <= cap(yyv4724) { - yyv4724 = yyv4724[:yyrl4724] + 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 { - yyv4724 = make([]NodeCondition, yyrl4724) + yyv1 = make([]NodeCondition, yyrl1) } } else { - yyv4724 = make([]NodeCondition, yyrl4724) + yyv1 = make([]NodeCondition, yyrl1) } - yyc4724 = true - yyrr4724 = len(yyv4724) - if yyrg4724 { - copy(yyv4724, yyv24724) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4724 != len(yyv4724) { - yyv4724 = yyv4724[:yyl4724] - yyc4724 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4724 := 0 - for ; yyj4724 < yyrr4724; yyj4724++ { - yyh4724.ElemContainerState(yyj4724) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4724[yyj4724] = NodeCondition{} + yyv1[yyj1] = NodeCondition{} } else { - yyv4725 := &yyv4724[yyj4724] - yyv4725.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4724 { - for ; yyj4724 < yyl4724; yyj4724++ { - yyv4724 = append(yyv4724, NodeCondition{}) - yyh4724.ElemContainerState(yyj4724) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, NodeCondition{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4724[yyj4724] = NodeCondition{} + yyv1[yyj1] = NodeCondition{} } else { - yyv4726 := &yyv4724[yyj4724] - yyv4726.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4724 := 0 - for ; !r.CheckBreak(); yyj4724++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4724 >= len(yyv4724) { - yyv4724 = append(yyv4724, NodeCondition{}) // var yyz4724 NodeCondition - yyc4724 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, NodeCondition{}) // var yyz1 NodeCondition + yyc1 = true } - yyh4724.ElemContainerState(yyj4724) - if yyj4724 < len(yyv4724) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4724[yyj4724] = NodeCondition{} + yyv1[yyj1] = NodeCondition{} } else { - yyv4727 := &yyv4724[yyj4724] - yyv4727.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -60100,17 +71255,17 @@ func (x codecSelfer1234) decSliceNodeCondition(v *[]NodeCondition, d *codec1978. } } - if yyj4724 < len(yyv4724) { - yyv4724 = yyv4724[:yyj4724] - yyc4724 = true - } else if yyj4724 == 0 && yyv4724 == nil { - yyv4724 = []NodeCondition{} - yyc4724 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []NodeCondition{} + yyc1 = true } } - yyh4724.End() - if yyc4724 { - *v = yyv4724 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -60119,10 +71274,10 @@ func (x codecSelfer1234) encSliceNodeAddress(v []NodeAddress, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4728 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4729 := &yyv4728 - yy4729.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60132,83 +71287,86 @@ func (x codecSelfer1234) decSliceNodeAddress(v *[]NodeAddress, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4730 := *v - yyh4730, yyl4730 := z.DecSliceHelperStart() - var yyc4730 bool - if yyl4730 == 0 { - if yyv4730 == nil { - yyv4730 = []NodeAddress{} - yyc4730 = true - } else if len(yyv4730) != 0 { - yyv4730 = yyv4730[:0] - yyc4730 = true + 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 yyl4730 > 0 { - var yyrr4730, yyrl4730 int - var yyrt4730 bool - if yyl4730 > cap(yyv4730) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4730 := len(yyv4730) > 0 - yyv24730 := yyv4730 - yyrl4730, yyrt4730 = z.DecInferLen(yyl4730, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4730 { - if yyrl4730 <= cap(yyv4730) { - yyv4730 = yyv4730[:yyrl4730] + 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 { - yyv4730 = make([]NodeAddress, yyrl4730) + yyv1 = make([]NodeAddress, yyrl1) } } else { - yyv4730 = make([]NodeAddress, yyrl4730) + yyv1 = make([]NodeAddress, yyrl1) } - yyc4730 = true - yyrr4730 = len(yyv4730) - if yyrg4730 { - copy(yyv4730, yyv24730) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4730 != len(yyv4730) { - yyv4730 = yyv4730[:yyl4730] - yyc4730 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4730 := 0 - for ; yyj4730 < yyrr4730; yyj4730++ { - yyh4730.ElemContainerState(yyj4730) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4730[yyj4730] = NodeAddress{} + yyv1[yyj1] = NodeAddress{} } else { - yyv4731 := &yyv4730[yyj4730] - yyv4731.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4730 { - for ; yyj4730 < yyl4730; yyj4730++ { - yyv4730 = append(yyv4730, NodeAddress{}) - yyh4730.ElemContainerState(yyj4730) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, NodeAddress{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4730[yyj4730] = NodeAddress{} + yyv1[yyj1] = NodeAddress{} } else { - yyv4732 := &yyv4730[yyj4730] - yyv4732.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4730 := 0 - for ; !r.CheckBreak(); yyj4730++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4730 >= len(yyv4730) { - yyv4730 = append(yyv4730, NodeAddress{}) // var yyz4730 NodeAddress - yyc4730 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, NodeAddress{}) // var yyz1 NodeAddress + yyc1 = true } - yyh4730.ElemContainerState(yyj4730) - if yyj4730 < len(yyv4730) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4730[yyj4730] = NodeAddress{} + yyv1[yyj1] = NodeAddress{} } else { - yyv4733 := &yyv4730[yyj4730] - yyv4733.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -60216,17 +71374,17 @@ func (x codecSelfer1234) decSliceNodeAddress(v *[]NodeAddress, d *codec1978.Deco } } - if yyj4730 < len(yyv4730) { - yyv4730 = yyv4730[:yyj4730] - yyc4730 = true - } else if yyj4730 == 0 && yyv4730 == nil { - yyv4730 = []NodeAddress{} - yyc4730 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []NodeAddress{} + yyc1 = true } } - yyh4730.End() - if yyc4730 { - *v = yyv4730 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -60235,10 +71393,10 @@ func (x codecSelfer1234) encSliceContainerImage(v []ContainerImage, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4734 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4735 := &yyv4734 - yy4735.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60248,83 +71406,86 @@ func (x codecSelfer1234) decSliceContainerImage(v *[]ContainerImage, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4736 := *v - yyh4736, yyl4736 := z.DecSliceHelperStart() - var yyc4736 bool - if yyl4736 == 0 { - if yyv4736 == nil { - yyv4736 = []ContainerImage{} - yyc4736 = true - } else if len(yyv4736) != 0 { - yyv4736 = yyv4736[:0] - yyc4736 = true + 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 yyl4736 > 0 { - var yyrr4736, yyrl4736 int - var yyrt4736 bool - if yyl4736 > cap(yyv4736) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4736 := len(yyv4736) > 0 - yyv24736 := yyv4736 - yyrl4736, yyrt4736 = z.DecInferLen(yyl4736, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4736 { - if yyrl4736 <= cap(yyv4736) { - yyv4736 = yyv4736[:yyrl4736] + 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 { - yyv4736 = make([]ContainerImage, yyrl4736) + yyv1 = make([]ContainerImage, yyrl1) } } else { - yyv4736 = make([]ContainerImage, yyrl4736) + yyv1 = make([]ContainerImage, yyrl1) } - yyc4736 = true - yyrr4736 = len(yyv4736) - if yyrg4736 { - copy(yyv4736, yyv24736) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4736 != len(yyv4736) { - yyv4736 = yyv4736[:yyl4736] - yyc4736 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4736 := 0 - for ; yyj4736 < yyrr4736; yyj4736++ { - yyh4736.ElemContainerState(yyj4736) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4736[yyj4736] = ContainerImage{} + yyv1[yyj1] = ContainerImage{} } else { - yyv4737 := &yyv4736[yyj4736] - yyv4737.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4736 { - for ; yyj4736 < yyl4736; yyj4736++ { - yyv4736 = append(yyv4736, ContainerImage{}) - yyh4736.ElemContainerState(yyj4736) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ContainerImage{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4736[yyj4736] = ContainerImage{} + yyv1[yyj1] = ContainerImage{} } else { - yyv4738 := &yyv4736[yyj4736] - yyv4738.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4736 := 0 - for ; !r.CheckBreak(); yyj4736++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4736 >= len(yyv4736) { - yyv4736 = append(yyv4736, ContainerImage{}) // var yyz4736 ContainerImage - yyc4736 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ContainerImage{}) // var yyz1 ContainerImage + yyc1 = true } - yyh4736.ElemContainerState(yyj4736) - if yyj4736 < len(yyv4736) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4736[yyj4736] = ContainerImage{} + yyv1[yyj1] = ContainerImage{} } else { - yyv4739 := &yyv4736[yyj4736] - yyv4739.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -60332,17 +71493,17 @@ func (x codecSelfer1234) decSliceContainerImage(v *[]ContainerImage, d *codec197 } } - if yyj4736 < len(yyv4736) { - yyv4736 = yyv4736[:yyj4736] - yyc4736 = true - } else if yyj4736 == 0 && yyv4736 == nil { - yyv4736 = []ContainerImage{} - yyc4736 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ContainerImage{} + yyc1 = true } } - yyh4736.End() - if yyc4736 { - *v = yyv4736 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -60351,9 +71512,9 @@ func (x codecSelfer1234) encSliceUniqueVolumeName(v []UniqueVolumeName, e *codec z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4740 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4740.CodecEncodeSelf(e) + yyv1.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60363,75 +71524,81 @@ func (x codecSelfer1234) decSliceUniqueVolumeName(v *[]UniqueVolumeName, d *code z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4741 := *v - yyh4741, yyl4741 := z.DecSliceHelperStart() - var yyc4741 bool - if yyl4741 == 0 { - if yyv4741 == nil { - yyv4741 = []UniqueVolumeName{} - yyc4741 = true - } else if len(yyv4741) != 0 { - yyv4741 = yyv4741[:0] - yyc4741 = true + 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 yyl4741 > 0 { - var yyrr4741, yyrl4741 int - var yyrt4741 bool - if yyl4741 > cap(yyv4741) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrl4741, yyrt4741 = z.DecInferLen(yyl4741, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4741 { - if yyrl4741 <= cap(yyv4741) { - yyv4741 = yyv4741[:yyrl4741] + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4741 = make([]UniqueVolumeName, yyrl4741) + yyv1 = make([]UniqueVolumeName, yyrl1) } } else { - yyv4741 = make([]UniqueVolumeName, yyrl4741) + yyv1 = make([]UniqueVolumeName, yyrl1) } - yyc4741 = true - yyrr4741 = len(yyv4741) - } else if yyl4741 != len(yyv4741) { - yyv4741 = yyv4741[:yyl4741] - yyc4741 = true + yyc1 = true + yyrr1 = len(yyv1) + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4741 := 0 - for ; yyj4741 < yyrr4741; yyj4741++ { - yyh4741.ElemContainerState(yyj4741) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4741[yyj4741] = "" + yyv1[yyj1] = "" } else { - yyv4741[yyj4741] = UniqueVolumeName(r.DecodeString()) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4741 { - for ; yyj4741 < yyl4741; yyj4741++ { - yyv4741 = append(yyv4741, "") - yyh4741.ElemContainerState(yyj4741) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, "") + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4741[yyj4741] = "" + yyv1[yyj1] = "" } else { - yyv4741[yyj4741] = UniqueVolumeName(r.DecodeString()) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4741 := 0 - for ; !r.CheckBreak(); yyj4741++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4741 >= len(yyv4741) { - yyv4741 = append(yyv4741, "") // var yyz4741 UniqueVolumeName - yyc4741 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, "") // var yyz1 UniqueVolumeName + yyc1 = true } - yyh4741.ElemContainerState(yyj4741) - if yyj4741 < len(yyv4741) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4741[yyj4741] = "" + yyv1[yyj1] = "" } else { - yyv4741[yyj4741] = UniqueVolumeName(r.DecodeString()) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -60439,17 +71606,17 @@ func (x codecSelfer1234) decSliceUniqueVolumeName(v *[]UniqueVolumeName, d *code } } - if yyj4741 < len(yyv4741) { - yyv4741 = yyv4741[:yyj4741] - yyc4741 = true - } else if yyj4741 == 0 && yyv4741 == nil { - yyv4741 = []UniqueVolumeName{} - yyc4741 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []UniqueVolumeName{} + yyc1 = true } } - yyh4741.End() - if yyc4741 { - *v = yyv4741 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -60458,10 +71625,10 @@ func (x codecSelfer1234) encSliceAttachedVolume(v []AttachedVolume, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4745 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4746 := &yyv4745 - yy4746.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60471,83 +71638,86 @@ func (x codecSelfer1234) decSliceAttachedVolume(v *[]AttachedVolume, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4747 := *v - yyh4747, yyl4747 := z.DecSliceHelperStart() - var yyc4747 bool - if yyl4747 == 0 { - if yyv4747 == nil { - yyv4747 = []AttachedVolume{} - yyc4747 = true - } else if len(yyv4747) != 0 { - yyv4747 = yyv4747[:0] - yyc4747 = true + 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 yyl4747 > 0 { - var yyrr4747, yyrl4747 int - var yyrt4747 bool - if yyl4747 > cap(yyv4747) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4747 := len(yyv4747) > 0 - yyv24747 := yyv4747 - yyrl4747, yyrt4747 = z.DecInferLen(yyl4747, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4747 { - if yyrl4747 <= cap(yyv4747) { - yyv4747 = yyv4747[:yyrl4747] + 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 { - yyv4747 = make([]AttachedVolume, yyrl4747) + yyv1 = make([]AttachedVolume, yyrl1) } } else { - yyv4747 = make([]AttachedVolume, yyrl4747) + yyv1 = make([]AttachedVolume, yyrl1) } - yyc4747 = true - yyrr4747 = len(yyv4747) - if yyrg4747 { - copy(yyv4747, yyv24747) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4747 != len(yyv4747) { - yyv4747 = yyv4747[:yyl4747] - yyc4747 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4747 := 0 - for ; yyj4747 < yyrr4747; yyj4747++ { - yyh4747.ElemContainerState(yyj4747) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4747[yyj4747] = AttachedVolume{} + yyv1[yyj1] = AttachedVolume{} } else { - yyv4748 := &yyv4747[yyj4747] - yyv4748.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4747 { - for ; yyj4747 < yyl4747; yyj4747++ { - yyv4747 = append(yyv4747, AttachedVolume{}) - yyh4747.ElemContainerState(yyj4747) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, AttachedVolume{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4747[yyj4747] = AttachedVolume{} + yyv1[yyj1] = AttachedVolume{} } else { - yyv4749 := &yyv4747[yyj4747] - yyv4749.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4747 := 0 - for ; !r.CheckBreak(); yyj4747++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4747 >= len(yyv4747) { - yyv4747 = append(yyv4747, AttachedVolume{}) // var yyz4747 AttachedVolume - yyc4747 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, AttachedVolume{}) // var yyz1 AttachedVolume + yyc1 = true } - yyh4747.ElemContainerState(yyj4747) - if yyj4747 < len(yyv4747) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4747[yyj4747] = AttachedVolume{} + yyv1[yyj1] = AttachedVolume{} } else { - yyv4750 := &yyv4747[yyj4747] - yyv4750.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -60555,17 +71725,17 @@ func (x codecSelfer1234) decSliceAttachedVolume(v *[]AttachedVolume, d *codec197 } } - if yyj4747 < len(yyv4747) { - yyv4747 = yyv4747[:yyj4747] - yyc4747 = true - } else if yyj4747 == 0 && yyv4747 == nil { - yyv4747 = []AttachedVolume{} - yyc4747 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []AttachedVolume{} + yyc1 = true } } - yyh4747.End() - if yyc4747 { - *v = yyv4747 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -60574,10 +71744,10 @@ func (x codecSelfer1234) encSlicePreferAvoidPodsEntry(v []PreferAvoidPodsEntry, z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4751 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4752 := &yyv4751 - yy4752.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60587,83 +71757,86 @@ func (x codecSelfer1234) decSlicePreferAvoidPodsEntry(v *[]PreferAvoidPodsEntry, z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4753 := *v - yyh4753, yyl4753 := z.DecSliceHelperStart() - var yyc4753 bool - if yyl4753 == 0 { - if yyv4753 == nil { - yyv4753 = []PreferAvoidPodsEntry{} - yyc4753 = true - } else if len(yyv4753) != 0 { - yyv4753 = yyv4753[:0] - yyc4753 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []PreferAvoidPodsEntry{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl4753 > 0 { - var yyrr4753, yyrl4753 int - var yyrt4753 bool - if yyl4753 > cap(yyv4753) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4753 := len(yyv4753) > 0 - yyv24753 := yyv4753 - yyrl4753, yyrt4753 = z.DecInferLen(yyl4753, z.DecBasicHandle().MaxInitLen, 64) - if yyrt4753 { - if yyrl4753 <= cap(yyv4753) { - yyv4753 = yyv4753[:yyrl4753] + 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 { - yyv4753 = make([]PreferAvoidPodsEntry, yyrl4753) + yyv1 = make([]PreferAvoidPodsEntry, yyrl1) } } else { - yyv4753 = make([]PreferAvoidPodsEntry, yyrl4753) + yyv1 = make([]PreferAvoidPodsEntry, yyrl1) } - yyc4753 = true - yyrr4753 = len(yyv4753) - if yyrg4753 { - copy(yyv4753, yyv24753) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4753 != len(yyv4753) { - yyv4753 = yyv4753[:yyl4753] - yyc4753 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4753 := 0 - for ; yyj4753 < yyrr4753; yyj4753++ { - yyh4753.ElemContainerState(yyj4753) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4753[yyj4753] = PreferAvoidPodsEntry{} + yyv1[yyj1] = PreferAvoidPodsEntry{} } else { - yyv4754 := &yyv4753[yyj4753] - yyv4754.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4753 { - for ; yyj4753 < yyl4753; yyj4753++ { - yyv4753 = append(yyv4753, PreferAvoidPodsEntry{}) - yyh4753.ElemContainerState(yyj4753) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, PreferAvoidPodsEntry{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4753[yyj4753] = PreferAvoidPodsEntry{} + yyv1[yyj1] = PreferAvoidPodsEntry{} } else { - yyv4755 := &yyv4753[yyj4753] - yyv4755.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4753 := 0 - for ; !r.CheckBreak(); yyj4753++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4753 >= len(yyv4753) { - yyv4753 = append(yyv4753, PreferAvoidPodsEntry{}) // var yyz4753 PreferAvoidPodsEntry - yyc4753 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, PreferAvoidPodsEntry{}) // var yyz1 PreferAvoidPodsEntry + yyc1 = true } - yyh4753.ElemContainerState(yyj4753) - if yyj4753 < len(yyv4753) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4753[yyj4753] = PreferAvoidPodsEntry{} + yyv1[yyj1] = PreferAvoidPodsEntry{} } else { - yyv4756 := &yyv4753[yyj4753] - yyv4756.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -60671,17 +71844,17 @@ func (x codecSelfer1234) decSlicePreferAvoidPodsEntry(v *[]PreferAvoidPodsEntry, } } - if yyj4753 < len(yyv4753) { - yyv4753 = yyv4753[:yyj4753] - yyc4753 = true - } else if yyj4753 == 0 && yyv4753 == nil { - yyv4753 = []PreferAvoidPodsEntry{} - yyc4753 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []PreferAvoidPodsEntry{} + yyc1 = true } } - yyh4753.End() - if yyc4753 { - *v = yyv4753 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -60690,19 +71863,19 @@ func (x codecSelfer1234) encResourceList(v ResourceList, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeMapStart(len(v)) - for yyk4757, yyv4757 := range v { + for yyk1, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerMapKey1234) - yyk4757.CodecEncodeSelf(e) + yyk1.CodecEncodeSelf(e) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4758 := &yyv4757 - yym4759 := z.EncBinary() - _ = yym4759 + yy3 := &yyv1 + yym4 := z.EncBinary() + _ = yym4 if false { - } else if z.HasExtensions() && z.EncExt(yy4758) { - } else if !yym4759 && z.IsJSONHandle() { - z.EncJSONMarshal(yy4758) + } else if z.HasExtensions() && z.EncExt(yy3) { + } else if !yym4 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3) } else { - z.EncFallback(yy4758) + z.EncFallback(yy3) } } z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -60713,86 +71886,88 @@ func (x codecSelfer1234) decResourceList(v *ResourceList, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4760 := *v - yyl4760 := r.ReadMapStart() - yybh4760 := z.DecBasicHandle() - if yyv4760 == nil { - yyrl4760, _ := z.DecInferLen(yyl4760, yybh4760.MaxInitLen, 72) - yyv4760 = make(map[ResourceName]pkg3_resource.Quantity, yyrl4760) - *v = yyv4760 + 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 yymk4760 ResourceName - var yymv4760 pkg3_resource.Quantity - var yymg4760 bool - if yybh4760.MapValueReset { - yymg4760 = true + var yymk1 ResourceName + var yymv1 pkg3_resource.Quantity + var yymg1 bool + if yybh1.MapValueReset { + yymg1 = true } - if yyl4760 > 0 { - for yyj4760 := 0; yyj4760 < yyl4760; yyj4760++ { + if yyl1 > 0 { + for yyj1 := 0; yyj1 < yyl1; yyj1++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk4760 = "" + yymk1 = "" } else { - yymk4760 = ResourceName(r.DecodeString()) + yyv2 := &yymk1 + yyv2.CodecDecodeSelf(d) } - if yymg4760 { - yymv4760 = yyv4760[yymk4760] + if yymg1 { + yymv1 = yyv1[yymk1] } else { - yymv4760 = pkg3_resource.Quantity{} + yymv1 = pkg3_resource.Quantity{} } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv4760 = pkg3_resource.Quantity{} + yymv1 = pkg3_resource.Quantity{} } else { - yyv4762 := &yymv4760 - yym4763 := z.DecBinary() - _ = yym4763 + yyv3 := &yymv1 + yym4 := z.DecBinary() + _ = yym4 if false { - } else if z.HasExtensions() && z.DecExt(yyv4762) { - } else if !yym4763 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv4762) + } else if z.HasExtensions() && z.DecExt(yyv3) { + } else if !yym4 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3) } else { - z.DecFallback(yyv4762, false) + z.DecFallback(yyv3, false) } } - if yyv4760 != nil { - yyv4760[yymk4760] = yymv4760 + if yyv1 != nil { + yyv1[yymk1] = yymv1 } } - } else if yyl4760 < 0 { - for yyj4760 := 0; !r.CheckBreak(); yyj4760++ { + } else if yyl1 < 0 { + for yyj1 := 0; !r.CheckBreak(); yyj1++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk4760 = "" + yymk1 = "" } else { - yymk4760 = ResourceName(r.DecodeString()) + yyv5 := &yymk1 + yyv5.CodecDecodeSelf(d) } - if yymg4760 { - yymv4760 = yyv4760[yymk4760] + if yymg1 { + yymv1 = yyv1[yymk1] } else { - yymv4760 = pkg3_resource.Quantity{} + yymv1 = pkg3_resource.Quantity{} } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv4760 = pkg3_resource.Quantity{} + yymv1 = pkg3_resource.Quantity{} } else { - yyv4765 := &yymv4760 - yym4766 := z.DecBinary() - _ = yym4766 + yyv6 := &yymv1 + yym7 := z.DecBinary() + _ = yym7 if false { - } else if z.HasExtensions() && z.DecExt(yyv4765) { - } else if !yym4766 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv4765) + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) } else { - z.DecFallback(yyv4765, false) + z.DecFallback(yyv6, false) } } - if yyv4760 != nil { - yyv4760[yymk4760] = yymv4760 + if yyv1 != nil { + yyv1[yymk1] = yymv1 } } } // else len==0: TODO: Should we clear map entries? @@ -60804,10 +71979,10 @@ func (x codecSelfer1234) encSliceNode(v []Node, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4767 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4768 := &yyv4767 - yy4768.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60817,83 +71992,86 @@ func (x codecSelfer1234) decSliceNode(v *[]Node, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4769 := *v - yyh4769, yyl4769 := z.DecSliceHelperStart() - var yyc4769 bool - if yyl4769 == 0 { - if yyv4769 == nil { - yyv4769 = []Node{} - yyc4769 = true - } else if len(yyv4769) != 0 { - yyv4769 = yyv4769[:0] - yyc4769 = true + 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 yyl4769 > 0 { - var yyrr4769, yyrl4769 int - var yyrt4769 bool - if yyl4769 > cap(yyv4769) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4769 := len(yyv4769) > 0 - yyv24769 := yyv4769 - yyrl4769, yyrt4769 = z.DecInferLen(yyl4769, z.DecBasicHandle().MaxInitLen, 632) - if yyrt4769 { - if yyrl4769 <= cap(yyv4769) { - yyv4769 = yyv4769[:yyrl4769] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 656) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4769 = make([]Node, yyrl4769) + yyv1 = make([]Node, yyrl1) } } else { - yyv4769 = make([]Node, yyrl4769) + yyv1 = make([]Node, yyrl1) } - yyc4769 = true - yyrr4769 = len(yyv4769) - if yyrg4769 { - copy(yyv4769, yyv24769) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4769 != len(yyv4769) { - yyv4769 = yyv4769[:yyl4769] - yyc4769 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4769 := 0 - for ; yyj4769 < yyrr4769; yyj4769++ { - yyh4769.ElemContainerState(yyj4769) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4769[yyj4769] = Node{} + yyv1[yyj1] = Node{} } else { - yyv4770 := &yyv4769[yyj4769] - yyv4770.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4769 { - for ; yyj4769 < yyl4769; yyj4769++ { - yyv4769 = append(yyv4769, Node{}) - yyh4769.ElemContainerState(yyj4769) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Node{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4769[yyj4769] = Node{} + yyv1[yyj1] = Node{} } else { - yyv4771 := &yyv4769[yyj4769] - yyv4771.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4769 := 0 - for ; !r.CheckBreak(); yyj4769++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4769 >= len(yyv4769) { - yyv4769 = append(yyv4769, Node{}) // var yyz4769 Node - yyc4769 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Node{}) // var yyz1 Node + yyc1 = true } - yyh4769.ElemContainerState(yyj4769) - if yyj4769 < len(yyv4769) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4769[yyj4769] = Node{} + yyv1[yyj1] = Node{} } else { - yyv4772 := &yyv4769[yyj4769] - yyv4772.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -60901,17 +72079,17 @@ func (x codecSelfer1234) decSliceNode(v *[]Node, d *codec1978.Decoder) { } } - if yyj4769 < len(yyv4769) { - yyv4769 = yyv4769[:yyj4769] - yyc4769 = true - } else if yyj4769 == 0 && yyv4769 == nil { - yyv4769 = []Node{} - yyc4769 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Node{} + yyc1 = true } } - yyh4769.End() - if yyc4769 { - *v = yyv4769 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -60920,9 +72098,9 @@ func (x codecSelfer1234) encSliceFinalizerName(v []FinalizerName, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4773 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4773.CodecEncodeSelf(e) + yyv1.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60932,75 +72110,81 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4774 := *v - yyh4774, yyl4774 := z.DecSliceHelperStart() - var yyc4774 bool - if yyl4774 == 0 { - if yyv4774 == nil { - yyv4774 = []FinalizerName{} - yyc4774 = true - } else if len(yyv4774) != 0 { - yyv4774 = yyv4774[:0] - yyc4774 = true + 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 yyl4774 > 0 { - var yyrr4774, yyrl4774 int - var yyrt4774 bool - if yyl4774 > cap(yyv4774) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrl4774, yyrt4774 = z.DecInferLen(yyl4774, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4774 { - if yyrl4774 <= cap(yyv4774) { - yyv4774 = yyv4774[:yyrl4774] + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4774 = make([]FinalizerName, yyrl4774) + yyv1 = make([]FinalizerName, yyrl1) } } else { - yyv4774 = make([]FinalizerName, yyrl4774) + yyv1 = make([]FinalizerName, yyrl1) } - yyc4774 = true - yyrr4774 = len(yyv4774) - } else if yyl4774 != len(yyv4774) { - yyv4774 = yyv4774[:yyl4774] - yyc4774 = true + yyc1 = true + yyrr1 = len(yyv1) + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4774 := 0 - for ; yyj4774 < yyrr4774; yyj4774++ { - yyh4774.ElemContainerState(yyj4774) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4774[yyj4774] = "" + yyv1[yyj1] = "" } else { - yyv4774[yyj4774] = FinalizerName(r.DecodeString()) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4774 { - for ; yyj4774 < yyl4774; yyj4774++ { - yyv4774 = append(yyv4774, "") - yyh4774.ElemContainerState(yyj4774) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, "") + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4774[yyj4774] = "" + yyv1[yyj1] = "" } else { - yyv4774[yyj4774] = FinalizerName(r.DecodeString()) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4774 := 0 - for ; !r.CheckBreak(); yyj4774++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4774 >= len(yyv4774) { - yyv4774 = append(yyv4774, "") // var yyz4774 FinalizerName - yyc4774 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, "") // var yyz1 FinalizerName + yyc1 = true } - yyh4774.ElemContainerState(yyj4774) - if yyj4774 < len(yyv4774) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4774[yyj4774] = "" + yyv1[yyj1] = "" } else { - yyv4774[yyj4774] = FinalizerName(r.DecodeString()) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -61008,17 +72192,17 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. } } - if yyj4774 < len(yyv4774) { - yyv4774 = yyv4774[:yyj4774] - yyc4774 = true - } else if yyj4774 == 0 && yyv4774 == nil { - yyv4774 = []FinalizerName{} - yyc4774 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []FinalizerName{} + yyc1 = true } } - yyh4774.End() - if yyc4774 { - *v = yyv4774 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -61027,10 +72211,10 @@ func (x codecSelfer1234) encSliceNamespace(v []Namespace, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4778 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4779 := &yyv4778 - yy4779.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -61040,83 +72224,86 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4780 := *v - yyh4780, yyl4780 := z.DecSliceHelperStart() - var yyc4780 bool - if yyl4780 == 0 { - if yyv4780 == nil { - yyv4780 = []Namespace{} - yyc4780 = true - } else if len(yyv4780) != 0 { - yyv4780 = yyv4780[:0] - yyc4780 = true + 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 yyl4780 > 0 { - var yyrr4780, yyrl4780 int - var yyrt4780 bool - if yyl4780 > cap(yyv4780) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4780 := len(yyv4780) > 0 - yyv24780 := yyv4780 - yyrl4780, yyrt4780 = z.DecInferLen(yyl4780, z.DecBasicHandle().MaxInitLen, 296) - if yyrt4780 { - if yyrl4780 <= cap(yyv4780) { - yyv4780 = yyv4780[:yyrl4780] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 296) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4780 = make([]Namespace, yyrl4780) + yyv1 = make([]Namespace, yyrl1) } } else { - yyv4780 = make([]Namespace, yyrl4780) + yyv1 = make([]Namespace, yyrl1) } - yyc4780 = true - yyrr4780 = len(yyv4780) - if yyrg4780 { - copy(yyv4780, yyv24780) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4780 != len(yyv4780) { - yyv4780 = yyv4780[:yyl4780] - yyc4780 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4780 := 0 - for ; yyj4780 < yyrr4780; yyj4780++ { - yyh4780.ElemContainerState(yyj4780) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4780[yyj4780] = Namespace{} + yyv1[yyj1] = Namespace{} } else { - yyv4781 := &yyv4780[yyj4780] - yyv4781.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4780 { - for ; yyj4780 < yyl4780; yyj4780++ { - yyv4780 = append(yyv4780, Namespace{}) - yyh4780.ElemContainerState(yyj4780) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Namespace{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4780[yyj4780] = Namespace{} + yyv1[yyj1] = Namespace{} } else { - yyv4782 := &yyv4780[yyj4780] - yyv4782.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4780 := 0 - for ; !r.CheckBreak(); yyj4780++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4780 >= len(yyv4780) { - yyv4780 = append(yyv4780, Namespace{}) // var yyz4780 Namespace - yyc4780 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Namespace{}) // var yyz1 Namespace + yyc1 = true } - yyh4780.ElemContainerState(yyj4780) - if yyj4780 < len(yyv4780) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4780[yyj4780] = Namespace{} + yyv1[yyj1] = Namespace{} } else { - yyv4783 := &yyv4780[yyj4780] - yyv4783.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -61124,17 +72311,17 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) } } - if yyj4780 < len(yyv4780) { - yyv4780 = yyv4780[:yyj4780] - yyc4780 = true - } else if yyj4780 == 0 && yyv4780 == nil { - yyv4780 = []Namespace{} - yyc4780 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Namespace{} + yyc1 = true } } - yyh4780.End() - if yyc4780 { - *v = yyv4780 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -61143,10 +72330,10 @@ func (x codecSelfer1234) encSliceEvent(v []Event, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4784 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4785 := &yyv4784 - yy4785.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -61156,83 +72343,86 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4786 := *v - yyh4786, yyl4786 := z.DecSliceHelperStart() - var yyc4786 bool - if yyl4786 == 0 { - if yyv4786 == nil { - yyv4786 = []Event{} - yyc4786 = true - } else if len(yyv4786) != 0 { - yyv4786 = yyv4786[:0] - yyc4786 = true + 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 yyl4786 > 0 { - var yyrr4786, yyrl4786 int - var yyrt4786 bool - if yyl4786 > cap(yyv4786) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4786 := len(yyv4786) > 0 - yyv24786 := yyv4786 - yyrl4786, yyrt4786 = z.DecInferLen(yyl4786, z.DecBasicHandle().MaxInitLen, 504) - if yyrt4786 { - if yyrl4786 <= cap(yyv4786) { - yyv4786 = yyv4786[:yyrl4786] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 504) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4786 = make([]Event, yyrl4786) + yyv1 = make([]Event, yyrl1) } } else { - yyv4786 = make([]Event, yyrl4786) + yyv1 = make([]Event, yyrl1) } - yyc4786 = true - yyrr4786 = len(yyv4786) - if yyrg4786 { - copy(yyv4786, yyv24786) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4786 != len(yyv4786) { - yyv4786 = yyv4786[:yyl4786] - yyc4786 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4786 := 0 - for ; yyj4786 < yyrr4786; yyj4786++ { - yyh4786.ElemContainerState(yyj4786) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4786[yyj4786] = Event{} + yyv1[yyj1] = Event{} } else { - yyv4787 := &yyv4786[yyj4786] - yyv4787.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4786 { - for ; yyj4786 < yyl4786; yyj4786++ { - yyv4786 = append(yyv4786, Event{}) - yyh4786.ElemContainerState(yyj4786) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Event{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4786[yyj4786] = Event{} + yyv1[yyj1] = Event{} } else { - yyv4788 := &yyv4786[yyj4786] - yyv4788.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4786 := 0 - for ; !r.CheckBreak(); yyj4786++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4786 >= len(yyv4786) { - yyv4786 = append(yyv4786, Event{}) // var yyz4786 Event - yyc4786 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Event{}) // var yyz1 Event + yyc1 = true } - yyh4786.ElemContainerState(yyj4786) - if yyj4786 < len(yyv4786) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4786[yyj4786] = Event{} + yyv1[yyj1] = Event{} } else { - yyv4789 := &yyv4786[yyj4786] - yyv4789.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -61240,115 +72430,121 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { } } - if yyj4786 < len(yyv4786) { - yyv4786 = yyv4786[:yyj4786] - yyc4786 = true - } else if yyj4786 == 0 && yyv4786 == nil { - yyv4786 = []Event{} - yyc4786 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Event{} + yyc1 = true } } - yyh4786.End() - if yyc4786 { - *v = yyv4786 + yyh1.End() + if yyc1 { + *v = yyv1 } } -func (x codecSelfer1234) encSliceruntime_Object(v []pkg7_runtime.Object, e *codec1978.Encoder) { +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 _, yyv4790 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyv4790 == nil { - r.EncodeNil() + yy2 := &yyv1 + yym3 := z.EncBinary() + _ = yym3 + if false { + } else if z.HasExtensions() && z.EncExt(yy2) { + } else if !yym3 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2) } else { - yym4791 := z.EncBinary() - _ = yym4791 - if false { - } else if z.HasExtensions() && z.EncExt(yyv4790) { - } else { - z.EncFallback(yyv4790) - } + z.EncFallback(yy2) } } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg7_runtime.Object, d *codec1978.Decoder) { +func (x codecSelfer1234) decSliceruntime_RawExtension(v *[]pkg5_runtime.RawExtension, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4792 := *v - yyh4792, yyl4792 := z.DecSliceHelperStart() - var yyc4792 bool - if yyl4792 == 0 { - if yyv4792 == nil { - yyv4792 = []pkg7_runtime.Object{} - yyc4792 = true - } else if len(yyv4792) != 0 { - yyv4792 = yyv4792[:0] - yyc4792 = true + 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 yyl4792 > 0 { - var yyrr4792, yyrl4792 int - var yyrt4792 bool - if yyl4792 > cap(yyv4792) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4792 := len(yyv4792) > 0 - yyv24792 := yyv4792 - yyrl4792, yyrt4792 = z.DecInferLen(yyl4792, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4792 { - if yyrl4792 <= cap(yyv4792) { - yyv4792 = yyv4792[:yyrl4792] + 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 { - yyv4792 = make([]pkg7_runtime.Object, yyrl4792) + yyv1 = make([]pkg5_runtime.RawExtension, yyrl1) } } else { - yyv4792 = make([]pkg7_runtime.Object, yyrl4792) + yyv1 = make([]pkg5_runtime.RawExtension, yyrl1) } - yyc4792 = true - yyrr4792 = len(yyv4792) - if yyrg4792 { - copy(yyv4792, yyv24792) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4792 != len(yyv4792) { - yyv4792 = yyv4792[:yyl4792] - yyc4792 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4792 := 0 - for ; yyj4792 < yyrr4792; yyj4792++ { - yyh4792.ElemContainerState(yyj4792) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4792[yyj4792] = nil + yyv1[yyj1] = pkg5_runtime.RawExtension{} } else { - yyv4793 := &yyv4792[yyj4792] - yym4794 := z.DecBinary() - _ = yym4794 + yyv2 := &yyv1[yyj1] + yym3 := z.DecBinary() + _ = yym3 if false { - } else if z.HasExtensions() && z.DecExt(yyv4793) { + } else if z.HasExtensions() && z.DecExt(yyv2) { + } else if !yym3 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2) } else { - z.DecFallback(yyv4793, true) + z.DecFallback(yyv2, false) } } } - if yyrt4792 { - for ; yyj4792 < yyl4792; yyj4792++ { - yyv4792 = append(yyv4792, nil) - yyh4792.ElemContainerState(yyj4792) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, pkg5_runtime.RawExtension{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4792[yyj4792] = nil + yyv1[yyj1] = pkg5_runtime.RawExtension{} } else { - yyv4795 := &yyv4792[yyj4792] - yym4796 := z.DecBinary() - _ = yym4796 + yyv4 := &yyv1[yyj1] + yym5 := z.DecBinary() + _ = yym5 if false { - } else if z.HasExtensions() && z.DecExt(yyv4795) { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else if !yym5 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4) } else { - z.DecFallback(yyv4795, true) + z.DecFallback(yyv4, false) } } @@ -61356,25 +72552,27 @@ func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg7_runtime.Object, d *cod } } else { - yyj4792 := 0 - for ; !r.CheckBreak(); yyj4792++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4792 >= len(yyv4792) { - yyv4792 = append(yyv4792, nil) // var yyz4792 pkg7_runtime.Object - yyc4792 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, pkg5_runtime.RawExtension{}) // var yyz1 pkg5_runtime.RawExtension + yyc1 = true } - yyh4792.ElemContainerState(yyj4792) - if yyj4792 < len(yyv4792) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4792[yyj4792] = nil + yyv1[yyj1] = pkg5_runtime.RawExtension{} } else { - yyv4797 := &yyv4792[yyj4792] - yym4798 := z.DecBinary() - _ = yym4798 + yyv6 := &yyv1[yyj1] + yym7 := z.DecBinary() + _ = yym7 if false { - } else if z.HasExtensions() && z.DecExt(yyv4797) { + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) } else { - z.DecFallback(yyv4797, true) + z.DecFallback(yyv6, false) } } @@ -61383,17 +72581,17 @@ func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg7_runtime.Object, d *cod } } - if yyj4792 < len(yyv4792) { - yyv4792 = yyv4792[:yyj4792] - yyc4792 = true - } else if yyj4792 == 0 && yyv4792 == nil { - yyv4792 = []pkg7_runtime.Object{} - yyc4792 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []pkg5_runtime.RawExtension{} + yyc1 = true } } - yyh4792.End() - if yyc4792 { - *v = yyv4792 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -61402,10 +72600,10 @@ func (x codecSelfer1234) encSliceLimitRangeItem(v []LimitRangeItem, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4799 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4800 := &yyv4799 - yy4800.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -61415,83 +72613,86 @@ func (x codecSelfer1234) decSliceLimitRangeItem(v *[]LimitRangeItem, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4801 := *v - yyh4801, yyl4801 := z.DecSliceHelperStart() - var yyc4801 bool - if yyl4801 == 0 { - if yyv4801 == nil { - yyv4801 = []LimitRangeItem{} - yyc4801 = true - } else if len(yyv4801) != 0 { - yyv4801 = yyv4801[:0] - yyc4801 = true + 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 yyl4801 > 0 { - var yyrr4801, yyrl4801 int - var yyrt4801 bool - if yyl4801 > cap(yyv4801) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4801 := len(yyv4801) > 0 - yyv24801 := yyv4801 - yyrl4801, yyrt4801 = z.DecInferLen(yyl4801, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4801 { - if yyrl4801 <= cap(yyv4801) { - yyv4801 = yyv4801[:yyrl4801] + 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 { - yyv4801 = make([]LimitRangeItem, yyrl4801) + yyv1 = make([]LimitRangeItem, yyrl1) } } else { - yyv4801 = make([]LimitRangeItem, yyrl4801) + yyv1 = make([]LimitRangeItem, yyrl1) } - yyc4801 = true - yyrr4801 = len(yyv4801) - if yyrg4801 { - copy(yyv4801, yyv24801) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4801 != len(yyv4801) { - yyv4801 = yyv4801[:yyl4801] - yyc4801 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4801 := 0 - for ; yyj4801 < yyrr4801; yyj4801++ { - yyh4801.ElemContainerState(yyj4801) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4801[yyj4801] = LimitRangeItem{} + yyv1[yyj1] = LimitRangeItem{} } else { - yyv4802 := &yyv4801[yyj4801] - yyv4802.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4801 { - for ; yyj4801 < yyl4801; yyj4801++ { - yyv4801 = append(yyv4801, LimitRangeItem{}) - yyh4801.ElemContainerState(yyj4801) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, LimitRangeItem{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4801[yyj4801] = LimitRangeItem{} + yyv1[yyj1] = LimitRangeItem{} } else { - yyv4803 := &yyv4801[yyj4801] - yyv4803.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4801 := 0 - for ; !r.CheckBreak(); yyj4801++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4801 >= len(yyv4801) { - yyv4801 = append(yyv4801, LimitRangeItem{}) // var yyz4801 LimitRangeItem - yyc4801 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, LimitRangeItem{}) // var yyz1 LimitRangeItem + yyc1 = true } - yyh4801.ElemContainerState(yyj4801) - if yyj4801 < len(yyv4801) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4801[yyj4801] = LimitRangeItem{} + yyv1[yyj1] = LimitRangeItem{} } else { - yyv4804 := &yyv4801[yyj4801] - yyv4804.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -61499,17 +72700,17 @@ func (x codecSelfer1234) decSliceLimitRangeItem(v *[]LimitRangeItem, d *codec197 } } - if yyj4801 < len(yyv4801) { - yyv4801 = yyv4801[:yyj4801] - yyc4801 = true - } else if yyj4801 == 0 && yyv4801 == nil { - yyv4801 = []LimitRangeItem{} - yyc4801 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []LimitRangeItem{} + yyc1 = true } } - yyh4801.End() - if yyc4801 { - *v = yyv4801 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -61518,10 +72719,10 @@ func (x codecSelfer1234) encSliceLimitRange(v []LimitRange, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4805 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4806 := &yyv4805 - yy4806.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -61531,83 +72732,86 @@ func (x codecSelfer1234) decSliceLimitRange(v *[]LimitRange, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4807 := *v - yyh4807, yyl4807 := z.DecSliceHelperStart() - var yyc4807 bool - if yyl4807 == 0 { - if yyv4807 == nil { - yyv4807 = []LimitRange{} - yyc4807 = true - } else if len(yyv4807) != 0 { - yyv4807 = yyv4807[:0] - yyc4807 = true + 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 yyl4807 > 0 { - var yyrr4807, yyrl4807 int - var yyrt4807 bool - if yyl4807 > cap(yyv4807) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4807 := len(yyv4807) > 0 - yyv24807 := yyv4807 - yyrl4807, yyrt4807 = z.DecInferLen(yyl4807, z.DecBasicHandle().MaxInitLen, 280) - if yyrt4807 { - if yyrl4807 <= cap(yyv4807) { - yyv4807 = yyv4807[:yyrl4807] + 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 { - yyv4807 = make([]LimitRange, yyrl4807) + yyv1 = make([]LimitRange, yyrl1) } } else { - yyv4807 = make([]LimitRange, yyrl4807) + yyv1 = make([]LimitRange, yyrl1) } - yyc4807 = true - yyrr4807 = len(yyv4807) - if yyrg4807 { - copy(yyv4807, yyv24807) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4807 != len(yyv4807) { - yyv4807 = yyv4807[:yyl4807] - yyc4807 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4807 := 0 - for ; yyj4807 < yyrr4807; yyj4807++ { - yyh4807.ElemContainerState(yyj4807) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4807[yyj4807] = LimitRange{} + yyv1[yyj1] = LimitRange{} } else { - yyv4808 := &yyv4807[yyj4807] - yyv4808.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4807 { - for ; yyj4807 < yyl4807; yyj4807++ { - yyv4807 = append(yyv4807, LimitRange{}) - yyh4807.ElemContainerState(yyj4807) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, LimitRange{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4807[yyj4807] = LimitRange{} + yyv1[yyj1] = LimitRange{} } else { - yyv4809 := &yyv4807[yyj4807] - yyv4809.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4807 := 0 - for ; !r.CheckBreak(); yyj4807++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4807 >= len(yyv4807) { - yyv4807 = append(yyv4807, LimitRange{}) // var yyz4807 LimitRange - yyc4807 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, LimitRange{}) // var yyz1 LimitRange + yyc1 = true } - yyh4807.ElemContainerState(yyj4807) - if yyj4807 < len(yyv4807) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4807[yyj4807] = LimitRange{} + yyv1[yyj1] = LimitRange{} } else { - yyv4810 := &yyv4807[yyj4807] - yyv4810.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -61615,17 +72819,17 @@ func (x codecSelfer1234) decSliceLimitRange(v *[]LimitRange, d *codec1978.Decode } } - if yyj4807 < len(yyv4807) { - yyv4807 = yyv4807[:yyj4807] - yyc4807 = true - } else if yyj4807 == 0 && yyv4807 == nil { - yyv4807 = []LimitRange{} - yyc4807 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []LimitRange{} + yyc1 = true } } - yyh4807.End() - if yyc4807 { - *v = yyv4807 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -61634,9 +72838,9 @@ func (x codecSelfer1234) encSliceResourceQuotaScope(v []ResourceQuotaScope, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4811 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4811.CodecEncodeSelf(e) + yyv1.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -61646,75 +72850,81 @@ func (x codecSelfer1234) decSliceResourceQuotaScope(v *[]ResourceQuotaScope, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4812 := *v - yyh4812, yyl4812 := z.DecSliceHelperStart() - var yyc4812 bool - if yyl4812 == 0 { - if yyv4812 == nil { - yyv4812 = []ResourceQuotaScope{} - yyc4812 = true - } else if len(yyv4812) != 0 { - yyv4812 = yyv4812[:0] - yyc4812 = true + 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 yyl4812 > 0 { - var yyrr4812, yyrl4812 int - var yyrt4812 bool - if yyl4812 > cap(yyv4812) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrl4812, yyrt4812 = z.DecInferLen(yyl4812, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4812 { - if yyrl4812 <= cap(yyv4812) { - yyv4812 = yyv4812[:yyrl4812] + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4812 = make([]ResourceQuotaScope, yyrl4812) + yyv1 = make([]ResourceQuotaScope, yyrl1) } } else { - yyv4812 = make([]ResourceQuotaScope, yyrl4812) + yyv1 = make([]ResourceQuotaScope, yyrl1) } - yyc4812 = true - yyrr4812 = len(yyv4812) - } else if yyl4812 != len(yyv4812) { - yyv4812 = yyv4812[:yyl4812] - yyc4812 = true + yyc1 = true + yyrr1 = len(yyv1) + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4812 := 0 - for ; yyj4812 < yyrr4812; yyj4812++ { - yyh4812.ElemContainerState(yyj4812) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4812[yyj4812] = "" + yyv1[yyj1] = "" } else { - yyv4812[yyj4812] = ResourceQuotaScope(r.DecodeString()) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4812 { - for ; yyj4812 < yyl4812; yyj4812++ { - yyv4812 = append(yyv4812, "") - yyh4812.ElemContainerState(yyj4812) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, "") + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4812[yyj4812] = "" + yyv1[yyj1] = "" } else { - yyv4812[yyj4812] = ResourceQuotaScope(r.DecodeString()) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4812 := 0 - for ; !r.CheckBreak(); yyj4812++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4812 >= len(yyv4812) { - yyv4812 = append(yyv4812, "") // var yyz4812 ResourceQuotaScope - yyc4812 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, "") // var yyz1 ResourceQuotaScope + yyc1 = true } - yyh4812.ElemContainerState(yyj4812) - if yyj4812 < len(yyv4812) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4812[yyj4812] = "" + yyv1[yyj1] = "" } else { - yyv4812[yyj4812] = ResourceQuotaScope(r.DecodeString()) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -61722,17 +72932,17 @@ func (x codecSelfer1234) decSliceResourceQuotaScope(v *[]ResourceQuotaScope, d * } } - if yyj4812 < len(yyv4812) { - yyv4812 = yyv4812[:yyj4812] - yyc4812 = true - } else if yyj4812 == 0 && yyv4812 == nil { - yyv4812 = []ResourceQuotaScope{} - yyc4812 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ResourceQuotaScope{} + yyc1 = true } } - yyh4812.End() - if yyc4812 { - *v = yyv4812 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -61741,10 +72951,10 @@ func (x codecSelfer1234) encSliceResourceQuota(v []ResourceQuota, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4816 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4817 := &yyv4816 - yy4817.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -61754,83 +72964,86 @@ func (x codecSelfer1234) decSliceResourceQuota(v *[]ResourceQuota, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4818 := *v - yyh4818, yyl4818 := z.DecSliceHelperStart() - var yyc4818 bool - if yyl4818 == 0 { - if yyv4818 == nil { - yyv4818 = []ResourceQuota{} - yyc4818 = true - } else if len(yyv4818) != 0 { - yyv4818 = yyv4818[:0] - yyc4818 = true + 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 yyl4818 > 0 { - var yyrr4818, yyrl4818 int - var yyrt4818 bool - if yyl4818 > cap(yyv4818) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4818 := len(yyv4818) > 0 - yyv24818 := yyv4818 - yyrl4818, yyrt4818 = z.DecInferLen(yyl4818, z.DecBasicHandle().MaxInitLen, 304) - if yyrt4818 { - if yyrl4818 <= cap(yyv4818) { - yyv4818 = yyv4818[:yyrl4818] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 304) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv4818 = make([]ResourceQuota, yyrl4818) + yyv1 = make([]ResourceQuota, yyrl1) } } else { - yyv4818 = make([]ResourceQuota, yyrl4818) + yyv1 = make([]ResourceQuota, yyrl1) } - yyc4818 = true - yyrr4818 = len(yyv4818) - if yyrg4818 { - copy(yyv4818, yyv24818) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4818 != len(yyv4818) { - yyv4818 = yyv4818[:yyl4818] - yyc4818 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4818 := 0 - for ; yyj4818 < yyrr4818; yyj4818++ { - yyh4818.ElemContainerState(yyj4818) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4818[yyj4818] = ResourceQuota{} + yyv1[yyj1] = ResourceQuota{} } else { - yyv4819 := &yyv4818[yyj4818] - yyv4819.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4818 { - for ; yyj4818 < yyl4818; yyj4818++ { - yyv4818 = append(yyv4818, ResourceQuota{}) - yyh4818.ElemContainerState(yyj4818) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ResourceQuota{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4818[yyj4818] = ResourceQuota{} + yyv1[yyj1] = ResourceQuota{} } else { - yyv4820 := &yyv4818[yyj4818] - yyv4820.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4818 := 0 - for ; !r.CheckBreak(); yyj4818++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4818 >= len(yyv4818) { - yyv4818 = append(yyv4818, ResourceQuota{}) // var yyz4818 ResourceQuota - yyc4818 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ResourceQuota{}) // var yyz1 ResourceQuota + yyc1 = true } - yyh4818.ElemContainerState(yyj4818) - if yyj4818 < len(yyv4818) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4818[yyj4818] = ResourceQuota{} + yyv1[yyj1] = ResourceQuota{} } else { - yyv4821 := &yyv4818[yyj4818] - yyv4821.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -61838,17 +73051,17 @@ func (x codecSelfer1234) decSliceResourceQuota(v *[]ResourceQuota, d *codec1978. } } - if yyj4818 < len(yyv4818) { - yyv4818 = yyv4818[:yyj4818] - yyc4818 = true - } else if yyj4818 == 0 && yyv4818 == nil { - yyv4818 = []ResourceQuota{} - yyc4818 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ResourceQuota{} + yyc1 = true } } - yyh4818.End() - if yyc4818 { - *v = yyv4818 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -61857,23 +73070,23 @@ func (x codecSelfer1234) encMapstringSliceuint8(v map[string][]uint8, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeMapStart(len(v)) - for yyk4822, yyv4822 := range v { + for yyk1, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerMapKey1234) - yym4823 := z.EncBinary() - _ = yym4823 + yym2 := z.EncBinary() + _ = yym2 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yyk4822)) + r.EncodeString(codecSelferC_UTF81234, string(yyk1)) } z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyv4822 == nil { + if yyv1 == nil { r.EncodeNil() } else { - yym4824 := z.EncBinary() - _ = yym4824 + yym3 := z.EncBinary() + _ = yym3 if false { } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(yyv4822)) + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(yyv1)) } } } @@ -61885,95 +73098,121 @@ func (x codecSelfer1234) decMapstringSliceuint8(v *map[string][]uint8, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4825 := *v - yyl4825 := r.ReadMapStart() - yybh4825 := z.DecBasicHandle() - if yyv4825 == nil { - yyrl4825, _ := z.DecInferLen(yyl4825, yybh4825.MaxInitLen, 40) - yyv4825 = make(map[string][]uint8, yyrl4825) - *v = yyv4825 + 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 yymk4825 string - var yymv4825 []uint8 - var yymg4825 bool - if yybh4825.MapValueReset { - yymg4825 = true + var yymk1 string + var yymv1 []uint8 + var yymg1 bool + if yybh1.MapValueReset { + yymg1 = true } - if yyl4825 > 0 { - for yyj4825 := 0; yyj4825 < yyl4825; yyj4825++ { + if yyl1 > 0 { + for yyj1 := 0; yyj1 < yyl1; yyj1++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk4825 = "" + yymk1 = "" } else { - yymk4825 = string(r.DecodeString()) - } - - if yymg4825 { - yymv4825 = yyv4825[yymk4825] - } else { - yymv4825 = nil - } - z.DecSendContainerState(codecSelfer_containerMapValue1234) - if r.TryDecodeAsNil() { - yymv4825 = nil - } else { - yyv4827 := &yymv4825 - yym4828 := z.DecBinary() - _ = yym4828 + yyv2 := &yymk1 + yym3 := z.DecBinary() + _ = yym3 if false { } else { - *yyv4827 = r.DecodeBytes(*(*[]byte)(yyv4827), false, false) + *((*string)(yyv2)) = r.DecodeString() } } - if yyv4825 != nil { - yyv4825[yymk4825] = yymv4825 + if yymg1 { + yymv1 = yyv1[yymk1] + } else { + yymv1 = nil + } + z.DecSendContainerState(codecSelfer_containerMapValue1234) + if r.TryDecodeAsNil() { + yymv1 = nil + } else { + yyv4 := &yymv1 + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *yyv4 = r.DecodeBytes(*(*[]byte)(yyv4), false, false) + } + } + + if yyv1 != nil { + yyv1[yymk1] = yymv1 } } - } else if yyl4825 < 0 { - for yyj4825 := 0; !r.CheckBreak(); yyj4825++ { + } else if yyl1 < 0 { + for yyj1 := 0; !r.CheckBreak(); yyj1++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk4825 = "" + yymk1 = "" } else { - yymk4825 = string(r.DecodeString()) - } - - if yymg4825 { - yymv4825 = yyv4825[yymk4825] - } else { - yymv4825 = nil - } - z.DecSendContainerState(codecSelfer_containerMapValue1234) - if r.TryDecodeAsNil() { - yymv4825 = nil - } else { - yyv4830 := &yymv4825 - yym4831 := z.DecBinary() - _ = yym4831 + yyv6 := &yymk1 + yym7 := z.DecBinary() + _ = yym7 if false { } else { - *yyv4830 = r.DecodeBytes(*(*[]byte)(yyv4830), false, false) + *((*string)(yyv6)) = r.DecodeString() } } - if yyv4825 != nil { - yyv4825[yymk4825] = yymv4825 + if yymg1 { + yymv1 = yyv1[yymk1] + } else { + yymv1 = nil + } + z.DecSendContainerState(codecSelfer_containerMapValue1234) + if r.TryDecodeAsNil() { + yymv1 = nil + } else { + yyv8 := &yymv1 + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *yyv8 = r.DecodeBytes(*(*[]byte)(yyv8), false, false) + } + } + + if yyv1 != nil { + yyv1[yymk1] = yymv1 } } } // else len==0: TODO: Should we clear map entries? z.DecSendContainerState(codecSelfer_containerMapEnd1234) } +func (x codecSelfer1234) encSliceuint8(v []uint8, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(v)) +} + +func (x codecSelfer1234) decSliceuint8(v *[]uint8, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + *v = r.DecodeBytes(*((*[]byte)(v)), false, false) +} + func (x codecSelfer1234) encSliceSecret(v []Secret, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4832 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4833 := &yyv4832 - yy4833.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -61983,83 +73222,86 @@ func (x codecSelfer1234) decSliceSecret(v *[]Secret, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4834 := *v - yyh4834, yyl4834 := z.DecSliceHelperStart() - var yyc4834 bool - if yyl4834 == 0 { - if yyv4834 == nil { - yyv4834 = []Secret{} - yyc4834 = true - } else if len(yyv4834) != 0 { - yyv4834 = yyv4834[:0] - yyc4834 = true + 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 yyl4834 > 0 { - var yyrr4834, yyrl4834 int - var yyrt4834 bool - if yyl4834 > cap(yyv4834) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4834 := len(yyv4834) > 0 - yyv24834 := yyv4834 - yyrl4834, yyrt4834 = z.DecInferLen(yyl4834, z.DecBasicHandle().MaxInitLen, 280) - if yyrt4834 { - if yyrl4834 <= cap(yyv4834) { - yyv4834 = yyv4834[:yyrl4834] + 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 { - yyv4834 = make([]Secret, yyrl4834) + yyv1 = make([]Secret, yyrl1) } } else { - yyv4834 = make([]Secret, yyrl4834) + yyv1 = make([]Secret, yyrl1) } - yyc4834 = true - yyrr4834 = len(yyv4834) - if yyrg4834 { - copy(yyv4834, yyv24834) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4834 != len(yyv4834) { - yyv4834 = yyv4834[:yyl4834] - yyc4834 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4834 := 0 - for ; yyj4834 < yyrr4834; yyj4834++ { - yyh4834.ElemContainerState(yyj4834) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4834[yyj4834] = Secret{} + yyv1[yyj1] = Secret{} } else { - yyv4835 := &yyv4834[yyj4834] - yyv4835.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4834 { - for ; yyj4834 < yyl4834; yyj4834++ { - yyv4834 = append(yyv4834, Secret{}) - yyh4834.ElemContainerState(yyj4834) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Secret{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4834[yyj4834] = Secret{} + yyv1[yyj1] = Secret{} } else { - yyv4836 := &yyv4834[yyj4834] - yyv4836.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4834 := 0 - for ; !r.CheckBreak(); yyj4834++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4834 >= len(yyv4834) { - yyv4834 = append(yyv4834, Secret{}) // var yyz4834 Secret - yyc4834 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Secret{}) // var yyz1 Secret + yyc1 = true } - yyh4834.ElemContainerState(yyj4834) - if yyj4834 < len(yyv4834) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4834[yyj4834] = Secret{} + yyv1[yyj1] = Secret{} } else { - yyv4837 := &yyv4834[yyj4834] - yyv4837.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -62067,17 +73309,17 @@ func (x codecSelfer1234) decSliceSecret(v *[]Secret, d *codec1978.Decoder) { } } - if yyj4834 < len(yyv4834) { - yyv4834 = yyv4834[:yyj4834] - yyc4834 = true - } else if yyj4834 == 0 && yyv4834 == nil { - yyv4834 = []Secret{} - yyc4834 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Secret{} + yyc1 = true } } - yyh4834.End() - if yyc4834 { - *v = yyv4834 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -62086,10 +73328,10 @@ func (x codecSelfer1234) encSliceConfigMap(v []ConfigMap, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4838 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4839 := &yyv4838 - yy4839.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -62099,83 +73341,86 @@ func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4840 := *v - yyh4840, yyl4840 := z.DecSliceHelperStart() - var yyc4840 bool - if yyl4840 == 0 { - if yyv4840 == nil { - yyv4840 = []ConfigMap{} - yyc4840 = true - } else if len(yyv4840) != 0 { - yyv4840 = yyv4840[:0] - yyc4840 = true + 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 yyl4840 > 0 { - var yyrr4840, yyrl4840 int - var yyrt4840 bool - if yyl4840 > cap(yyv4840) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4840 := len(yyv4840) > 0 - yyv24840 := yyv4840 - yyrl4840, yyrt4840 = z.DecInferLen(yyl4840, z.DecBasicHandle().MaxInitLen, 264) - if yyrt4840 { - if yyrl4840 <= cap(yyv4840) { - yyv4840 = yyv4840[:yyrl4840] + 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 { - yyv4840 = make([]ConfigMap, yyrl4840) + yyv1 = make([]ConfigMap, yyrl1) } } else { - yyv4840 = make([]ConfigMap, yyrl4840) + yyv1 = make([]ConfigMap, yyrl1) } - yyc4840 = true - yyrr4840 = len(yyv4840) - if yyrg4840 { - copy(yyv4840, yyv24840) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4840 != len(yyv4840) { - yyv4840 = yyv4840[:yyl4840] - yyc4840 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4840 := 0 - for ; yyj4840 < yyrr4840; yyj4840++ { - yyh4840.ElemContainerState(yyj4840) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4840[yyj4840] = ConfigMap{} + yyv1[yyj1] = ConfigMap{} } else { - yyv4841 := &yyv4840[yyj4840] - yyv4841.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4840 { - for ; yyj4840 < yyl4840; yyj4840++ { - yyv4840 = append(yyv4840, ConfigMap{}) - yyh4840.ElemContainerState(yyj4840) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ConfigMap{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4840[yyj4840] = ConfigMap{} + yyv1[yyj1] = ConfigMap{} } else { - yyv4842 := &yyv4840[yyj4840] - yyv4842.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4840 := 0 - for ; !r.CheckBreak(); yyj4840++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4840 >= len(yyv4840) { - yyv4840 = append(yyv4840, ConfigMap{}) // var yyz4840 ConfigMap - yyc4840 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ConfigMap{}) // var yyz1 ConfigMap + yyc1 = true } - yyh4840.ElemContainerState(yyj4840) - if yyj4840 < len(yyv4840) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4840[yyj4840] = ConfigMap{} + yyv1[yyj1] = ConfigMap{} } else { - yyv4843 := &yyv4840[yyj4840] - yyv4843.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -62183,17 +73428,17 @@ func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) } } - if yyj4840 < len(yyv4840) { - yyv4840 = yyv4840[:yyj4840] - yyc4840 = true - } else if yyj4840 == 0 && yyv4840 == nil { - yyv4840 = []ConfigMap{} - yyc4840 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ConfigMap{} + yyc1 = true } } - yyh4840.End() - if yyc4840 { - *v = yyv4840 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -62202,10 +73447,10 @@ func (x codecSelfer1234) encSliceComponentCondition(v []ComponentCondition, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4844 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4845 := &yyv4844 - yy4845.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -62215,83 +73460,86 @@ func (x codecSelfer1234) decSliceComponentCondition(v *[]ComponentCondition, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4846 := *v - yyh4846, yyl4846 := z.DecSliceHelperStart() - var yyc4846 bool - if yyl4846 == 0 { - if yyv4846 == nil { - yyv4846 = []ComponentCondition{} - yyc4846 = true - } else if len(yyv4846) != 0 { - yyv4846 = yyv4846[:0] - yyc4846 = true + 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 yyl4846 > 0 { - var yyrr4846, yyrl4846 int - var yyrt4846 bool - if yyl4846 > cap(yyv4846) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4846 := len(yyv4846) > 0 - yyv24846 := yyv4846 - yyrl4846, yyrt4846 = z.DecInferLen(yyl4846, z.DecBasicHandle().MaxInitLen, 64) - if yyrt4846 { - if yyrl4846 <= cap(yyv4846) { - yyv4846 = yyv4846[:yyrl4846] + 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 { - yyv4846 = make([]ComponentCondition, yyrl4846) + yyv1 = make([]ComponentCondition, yyrl1) } } else { - yyv4846 = make([]ComponentCondition, yyrl4846) + yyv1 = make([]ComponentCondition, yyrl1) } - yyc4846 = true - yyrr4846 = len(yyv4846) - if yyrg4846 { - copy(yyv4846, yyv24846) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4846 != len(yyv4846) { - yyv4846 = yyv4846[:yyl4846] - yyc4846 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4846 := 0 - for ; yyj4846 < yyrr4846; yyj4846++ { - yyh4846.ElemContainerState(yyj4846) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4846[yyj4846] = ComponentCondition{} + yyv1[yyj1] = ComponentCondition{} } else { - yyv4847 := &yyv4846[yyj4846] - yyv4847.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4846 { - for ; yyj4846 < yyl4846; yyj4846++ { - yyv4846 = append(yyv4846, ComponentCondition{}) - yyh4846.ElemContainerState(yyj4846) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ComponentCondition{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4846[yyj4846] = ComponentCondition{} + yyv1[yyj1] = ComponentCondition{} } else { - yyv4848 := &yyv4846[yyj4846] - yyv4848.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4846 := 0 - for ; !r.CheckBreak(); yyj4846++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4846 >= len(yyv4846) { - yyv4846 = append(yyv4846, ComponentCondition{}) // var yyz4846 ComponentCondition - yyc4846 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ComponentCondition{}) // var yyz1 ComponentCondition + yyc1 = true } - yyh4846.ElemContainerState(yyj4846) - if yyj4846 < len(yyv4846) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4846[yyj4846] = ComponentCondition{} + yyv1[yyj1] = ComponentCondition{} } else { - yyv4849 := &yyv4846[yyj4846] - yyv4849.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -62299,17 +73547,17 @@ func (x codecSelfer1234) decSliceComponentCondition(v *[]ComponentCondition, d * } } - if yyj4846 < len(yyv4846) { - yyv4846 = yyv4846[:yyj4846] - yyc4846 = true - } else if yyj4846 == 0 && yyv4846 == nil { - yyv4846 = []ComponentCondition{} - yyc4846 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ComponentCondition{} + yyc1 = true } } - yyh4846.End() - if yyc4846 { - *v = yyv4846 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -62318,10 +73566,10 @@ func (x codecSelfer1234) encSliceComponentStatus(v []ComponentStatus, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4850 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4851 := &yyv4850 - yy4851.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -62331,83 +73579,86 @@ func (x codecSelfer1234) decSliceComponentStatus(v *[]ComponentStatus, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4852 := *v - yyh4852, yyl4852 := z.DecSliceHelperStart() - var yyc4852 bool - if yyl4852 == 0 { - if yyv4852 == nil { - yyv4852 = []ComponentStatus{} - yyc4852 = true - } else if len(yyv4852) != 0 { - yyv4852 = yyv4852[:0] - yyc4852 = true + 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 yyl4852 > 0 { - var yyrr4852, yyrl4852 int - var yyrt4852 bool - if yyl4852 > cap(yyv4852) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg4852 := len(yyv4852) > 0 - yyv24852 := yyv4852 - yyrl4852, yyrt4852 = z.DecInferLen(yyl4852, z.DecBasicHandle().MaxInitLen, 280) - if yyrt4852 { - if yyrl4852 <= cap(yyv4852) { - yyv4852 = yyv4852[:yyrl4852] + 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 { - yyv4852 = make([]ComponentStatus, yyrl4852) + yyv1 = make([]ComponentStatus, yyrl1) } } else { - yyv4852 = make([]ComponentStatus, yyrl4852) + yyv1 = make([]ComponentStatus, yyrl1) } - yyc4852 = true - yyrr4852 = len(yyv4852) - if yyrg4852 { - copy(yyv4852, yyv24852) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl4852 != len(yyv4852) { - yyv4852 = yyv4852[:yyl4852] - yyc4852 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj4852 := 0 - for ; yyj4852 < yyrr4852; yyj4852++ { - yyh4852.ElemContainerState(yyj4852) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4852[yyj4852] = ComponentStatus{} + yyv1[yyj1] = ComponentStatus{} } else { - yyv4853 := &yyv4852[yyj4852] - yyv4853.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt4852 { - for ; yyj4852 < yyl4852; yyj4852++ { - yyv4852 = append(yyv4852, ComponentStatus{}) - yyh4852.ElemContainerState(yyj4852) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ComponentStatus{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv4852[yyj4852] = ComponentStatus{} + yyv1[yyj1] = ComponentStatus{} } else { - yyv4854 := &yyv4852[yyj4852] - yyv4854.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj4852 := 0 - for ; !r.CheckBreak(); yyj4852++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj4852 >= len(yyv4852) { - yyv4852 = append(yyv4852, ComponentStatus{}) // var yyz4852 ComponentStatus - yyc4852 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ComponentStatus{}) // var yyz1 ComponentStatus + yyc1 = true } - yyh4852.ElemContainerState(yyj4852) - if yyj4852 < len(yyv4852) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv4852[yyj4852] = ComponentStatus{} + yyv1[yyj1] = ComponentStatus{} } else { - yyv4855 := &yyv4852[yyj4852] - yyv4855.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -62415,16 +73666,135 @@ func (x codecSelfer1234) decSliceComponentStatus(v *[]ComponentStatus, d *codec1 } } - if yyj4852 < len(yyv4852) { - yyv4852 = yyv4852[:yyj4852] - yyc4852 = true - } else if yyj4852 == 0 && yyv4852 == nil { - yyv4852 = []ComponentStatus{} - yyc4852 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ComponentStatus{} + yyc1 = true } } - yyh4852.End() - if yyc4852 { - *v = yyv4852 + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceDownwardAPIVolumeFile(v []DownwardAPIVolumeFile, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceDownwardAPIVolumeFile(v *[]DownwardAPIVolumeFile, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []DownwardAPIVolumeFile{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 40) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]DownwardAPIVolumeFile, yyrl1) + } + } else { + yyv1 = make([]DownwardAPIVolumeFile, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = DownwardAPIVolumeFile{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, DownwardAPIVolumeFile{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = DownwardAPIVolumeFile{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, DownwardAPIVolumeFile{}) // var yyz1 DownwardAPIVolumeFile + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = DownwardAPIVolumeFile{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []DownwardAPIVolumeFile{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/v1/types.go b/vendor/k8s.io/client-go/pkg/api/v1/types.go similarity index 77% rename from vendor/k8s.io/client-go/1.5/pkg/api/v1/types.go rename to vendor/k8s.io/client-go/pkg/api/v1/types.go index 94d8c56f3..a75a1d0f0 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/v1/types.go +++ b/vendor/k8s.io/client-go/pkg/api/v1/types.go @@ -17,11 +17,11 @@ limitations under the License. package v1 import ( - "k8s.io/client-go/1.5/pkg/api/resource" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/types" - "k8s.io/client-go/1.5/pkg/util/intstr" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" ) // The comments for the structs and fields can be used from go-restful to @@ -65,13 +65,16 @@ import ( // ObjectMeta is metadata that all persisted resources must have, which includes all objects // users must create. +// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon. +// +k8s:openapi-gen=false type ObjectMeta struct { // Name must be unique within a namespace. Is required when creating resources, although // some resources may allow a client to request the generation of an appropriate name // automatically. Name is primarily intended for creation idempotence and configuration // definition. // Cannot be updated. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + // +optional Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` // GenerateName is an optional prefix, used by the server, to generate a unique @@ -89,6 +92,7 @@ type ObjectMeta struct { // // Applied only if Name is not specified. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency + // +optional GenerateName string `json:"generateName,omitempty" protobuf:"bytes,2,opt,name=generateName"` // Namespace defines the space within each name must be unique. An empty namespace is @@ -98,12 +102,14 @@ type ObjectMeta struct { // // Must be a DNS_LABEL. // Cannot be updated. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md + // More info: http://kubernetes.io/docs/user-guide/namespaces + // +optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` // SelfLink is a URL representing this object. // Populated by the system. // Read-only. + // +optional SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,4,opt,name=selfLink"` // UID is the unique in time and space value for this object. It is typically generated by @@ -112,8 +118,9 @@ type ObjectMeta struct { // // 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"` + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional + UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` // An opaque value that represents the internal version of this object that can // be used by clients to determine when objects have changed. May be used for optimistic @@ -125,10 +132,12 @@ type ObjectMeta struct { // 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 ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"` // A sequence number representing a specific generation of the desired state. // Populated by the system. Read-only. + // +optional Generation int64 `json:"generation,omitempty" protobuf:"varint,7,opt,name=generation"` // CreationTimestamp is a timestamp representing the server time when this object was @@ -139,57 +148,68 @@ type ObjectMeta struct { // 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"` + // +optional + CreationTimestamp metav1.Time `json:"creationTimestamp,omitempty" protobuf:"bytes,8,opt,name=creationTimestamp"` // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This // field is set by the server when a graceful deletion is requested by the user, and is not - // directly settable by a client. The resource 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 + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field. Once set, + // this value may not be unset or be set further into the future, although it may be shortened // or the resource may be deleted prior to this time. For example, a user may request that // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination - // signal to the containers in the pod. Once the resource is deleted in the API, the Kubelet - // will send a hard termination signal to the container. + // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard + // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the + // API. In the presence of network partitions, this object may still exist after this + // timestamp, until an administrator or automated process can determine the resource is + // fully terminated. // If not set, graceful deletion of the object has not been requested. // // Populated by the system when a graceful deletion is requested. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - DeletionTimestamp *unversioned.Time `json:"deletionTimestamp,omitempty" protobuf:"bytes,9,opt,name=deletionTimestamp"` + // +optional + DeletionTimestamp *metav1.Time `json:"deletionTimestamp,omitempty" protobuf:"bytes,9,opt,name=deletionTimestamp"` // Number of seconds allowed for this object to gracefully terminate before // it will be removed from the system. Only set when deletionTimestamp is also set. // May only be shortened. // Read-only. + // +optional DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty" protobuf:"varint,10,opt,name=deletionGracePeriodSeconds"` // Map of string keys and values that can be used to organize and categorize // (scope and select) objects. May match selectors of replication controllers // and services. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md + // More info: http://kubernetes.io/docs/user-guide/labels + // +optional Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"` // Annotations is an unstructured key value map stored with a resource that may be // set by external tools to store and retrieve arbitrary metadata. They are not // queryable and should be preserved when modifying objects. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/annotations.md + // More info: http://kubernetes.io/docs/user-guide/annotations + // +optional Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"` // List of objects depended by this object. If ALL objects in the list have // been deleted, this object will be garbage collected. If this object is managed by a controller, // then an entry in this list will point to this controller, with the controller field set to true. // There cannot be more than one managing controller. - OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"` + // +optional + OwnerReferences []metav1.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. + // +optional Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` // The name of the cluster which the object belongs to. // This is used to distinguish resources with same name and namespace in different clusters. // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + // +optional ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"` } @@ -204,7 +224,7 @@ const ( 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 + // More info: http://kubernetes.io/docs/user-guide/identifiers#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. @@ -219,69 +239,101 @@ type VolumeSource struct { // 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#hostpath // --- // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not // mount host directories as read/write. + // +optional HostPath *HostPathVolumeSource `json:"hostPath,omitempty" protobuf:"bytes,1,opt,name=hostPath"` // EmptyDir represents a temporary directory that shares a pod's lifetime. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#emptydir + // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir + // +optional EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty" protobuf:"bytes,2,opt,name=emptyDir"` // GCEPersistentDisk represents a GCE Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk + // More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + // +optional GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" protobuf:"bytes,3,opt,name=gcePersistentDisk"` // AWSElasticBlockStore represents an AWS Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore + // More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + // +optional AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,4,opt,name=awsElasticBlockStore"` // GitRepo represents a git repository at a particular revision. + // +optional GitRepo *GitRepoVolumeSource `json:"gitRepo,omitempty" protobuf:"bytes,5,opt,name=gitRepo"` // Secret represents a secret that should populate this volume. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#secrets + // More info: http://kubernetes.io/docs/user-guide/volumes#secrets + // +optional Secret *SecretVolumeSource `json:"secret,omitempty" protobuf:"bytes,6,opt,name=secret"` // NFS represents an NFS mount on the host that shares a pod's lifetime - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs + // More info: http://kubernetes.io/docs/user-guide/volumes#nfs + // +optional NFS *NFSVolumeSource `json:"nfs,omitempty" protobuf:"bytes,7,opt,name=nfs"` // ISCSI represents an ISCSI Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. // More info: http://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md + // +optional ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,8,opt,name=iscsi"` // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. // More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md + // +optional Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,9,opt,name=glusterfs"` // PersistentVolumeClaimVolumeSource represents a reference to a // PersistentVolumeClaim in the same namespace. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + // +optional PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty" protobuf:"bytes,10,opt,name=persistentVolumeClaim"` // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md + // +optional RBD *RBDVolumeSource `json:"rbd,omitempty" protobuf:"bytes,11,opt,name=rbd"` // FlexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. This is an // alpha feature and may change in future. + // +optional FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"` // Cinder represents a cinder volume attached and mounted on kubelets host machine // More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + // +optional Cinder *CinderVolumeSource `json:"cinder,omitempty" protobuf:"bytes,13,opt,name=cinder"` // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + // +optional CephFS *CephFSVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,14,opt,name=cephfs"` // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + // +optional Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,15,opt,name=flocker"` // DownwardAPI represents downward API about the pod that should populate this volume + // +optional DownwardAPI *DownwardAPIVolumeSource `json:"downwardAPI,omitempty" protobuf:"bytes,16,opt,name=downwardAPI"` // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + // +optional FC *FCVolumeSource `json:"fc,omitempty" protobuf:"bytes,17,opt,name=fc"` // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + // +optional AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,18,opt,name=azureFile"` // ConfigMap represents a configMap that should populate this volume + // +optional ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty" protobuf:"bytes,19,opt,name=configMap"` // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + // +optional VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,20,opt,name=vsphereVolume"` // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + // +optional Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,21,opt,name=quobyte"` // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + // +optional AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,22,opt,name=azureDisk"` + // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,23,opt,name=photonPersistentDisk"` + // Items for all in one resources secrets, configmaps, and downward API + Projected *ProjectedVolumeSource `json:"projected,omitempty" protobuf:"bytes,26,opt,name=projected"` + // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + // +optional + PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" protobuf:"bytes,24,opt,name=portworxVolume"` + // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // +optional + ScaleIO *ScaleIOVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,25,opt,name=scaleIO"` } // PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. @@ -290,10 +342,11 @@ type VolumeSource struct { // 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 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims ClaimName string `json:"claimName" protobuf:"bytes,1,opt,name=claimName"` // Will force the ReadOnly setting in VolumeMounts. // Default false. + // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"` } @@ -302,98 +355,144 @@ type PersistentVolumeClaimVolumeSource struct { 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + // +optional GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" protobuf:"bytes,1,opt,name=gcePersistentDisk"` // AWSElasticBlockStore represents an AWS Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore + // More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + // +optional AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,2,opt,name=awsElasticBlockStore"` // HostPath represents a directory on the host. // Provisioned by a developer or tester. // This is useful for single-node development and testing only! // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#hostpath + // More info: http://kubernetes.io/docs/user-guide/volumes#hostpath + // +optional HostPath *HostPathVolumeSource `json:"hostPath,omitempty" protobuf:"bytes,3,opt,name=hostPath"` // Glusterfs represents a Glusterfs volume that is attached to a host and // exposed to the pod. Provisioned by an admin. // More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md + // +optional Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,4,opt,name=glusterfs"` // NFS represents an NFS mount on the host. Provisioned by an admin. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs + // More info: http://kubernetes.io/docs/user-guide/volumes#nfs + // +optional NFS *NFSVolumeSource `json:"nfs,omitempty" protobuf:"bytes,5,opt,name=nfs"` // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md + // +optional RBD *RBDVolumeSource `json:"rbd,omitempty" protobuf:"bytes,6,opt,name=rbd"` // ISCSI represents an ISCSI Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. Provisioned by an admin. + // +optional ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,7,opt,name=iscsi"` // Cinder represents a cinder volume attached and mounted on kubelets host machine // More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + // +optional Cinder *CinderVolumeSource `json:"cinder,omitempty" protobuf:"bytes,8,opt,name=cinder"` // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + // +optional CephFS *CephFSVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,9,opt,name=cephfs"` // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + // +optional FC *FCVolumeSource `json:"fc,omitempty" protobuf:"bytes,10,opt,name=fc"` // Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running + // +optional Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,11,opt,name=flocker"` // FlexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. This is an // alpha feature and may change in future. + // +optional FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"` // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + // +optional AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,13,opt,name=azureFile"` // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + // +optional VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,14,opt,name=vsphereVolume"` // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + // +optional Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,15,opt,name=quobyte"` // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + // +optional AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,16,opt,name=azureDisk"` + // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,17,opt,name=photonPersistentDisk"` + // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + // +optional + PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" protobuf:"bytes,18,opt,name=portworxVolume"` + // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // +optional + ScaleIO *ScaleIOVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,19,opt,name=scaleIO"` } +const ( + // AlphaStorageClassAnnotation represents the previous alpha storage class + // annotation. It's currently still used and will be held for backwards + // compatibility + AlphaStorageClassAnnotation = "volume.alpha.kubernetes.io/storage-class" + + // BetaStorageClassAnnotation represents the beta/previous StorageClass annotation. + // It's currently still used and will be held for backwards compatibility + BetaStorageClassAnnotation = "volume.beta.kubernetes.io/storage-class" +) + // +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 +// More info: http://kubernetes.io/docs/user-guide/persistent-volumes type PersistentVolume struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines a specification of a persistent volume owned by the cluster. // Provisioned by an administrator. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistent-volumes + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistent-volumes + // +optional Spec PersistentVolumeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Status represents the current information/status for the persistent volume. // Populated by the system. // Read-only. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistent-volumes + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistent-volumes + // +optional Status PersistentVolumeStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // PersistentVolumeSpec is the specification of a persistent volume. type PersistentVolumeSpec struct { // A description of the persistent volume's resources and capacity. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#capacity + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#capacity + // +optional Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` // The actual volume backing the persistent volume. PersistentVolumeSource `json:",inline" protobuf:"bytes,2,opt,name=persistentVolumeSource"` // AccessModes contains all ways the volume can be mounted. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes + // +optional AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,3,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. // Expected to be non-nil when bound. // claim.VolumeName is the authoritative bind between PV and PVC. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#binding + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#binding + // +optional ClaimRef *ObjectReference `json:"claimRef,omitempty" protobuf:"bytes,4,opt,name=claimRef"` // What happens to a persistent volume when released from its claim. // Valid options are Retain (default) and Recycle. // Recycling must be supported by the volume plugin underlying this persistent volume. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#recycling-policy + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy + // +optional PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty" protobuf:"bytes,5,opt,name=persistentVolumeReclaimPolicy,casttype=PersistentVolumeReclaimPolicy"` + // Name of StorageClass to which this persistent volume belongs. Empty value + // means that this volume does not belong to any StorageClass. + // +optional + StorageClassName string `json:"storageClassName,omitempty" protobuf:"bytes,6,opt,name=storageClassName"` } // PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes. @@ -414,23 +513,27 @@ const ( // 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 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#phase + // +optional Phase PersistentVolumePhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PersistentVolumePhase"` // A human-readable message indicating details about why the volume is in this state. + // +optional Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` // Reason is a brief CamelCase string that describes any failure and is meant // for machine parsing and tidy display in the CLI. + // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` } // PersistentVolumeList is a list of PersistentVolume items. type PersistentVolumeList struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.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 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes Items []PersistentVolume `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -438,29 +541,33 @@ type PersistentVolumeList struct { // PersistentVolumeClaim is a user's request for and claim to a persistent volume type PersistentVolumeClaim struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the desired characteristics of a volume requested by a pod author. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + // +optional Spec PersistentVolumeClaimSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Status represents the current information/status of a persistent volume claim. // Read-only. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#persistentvolumeclaims + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + // +optional Status PersistentVolumeClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // PersistentVolumeClaimList is a list of PersistentVolumeClaim items. type PersistentVolumeClaimList struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.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 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims Items []PersistentVolumeClaim `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -468,25 +575,36 @@ type PersistentVolumeClaimList struct { // 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 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1 + // +optional AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` // A label query over volumes to consider for binding. - Selector *unversioned.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"` + // +optional + Selector *metav1.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 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources + // +optional Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,2,opt,name=resources"` // VolumeName is the binding reference to the PersistentVolume backing this claim. + // +optional VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,3,opt,name=volumeName"` + // Name of the StorageClass required by the claim. + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1 + // +optional + StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,5,opt,name=storageClassName"` } // PersistentVolumeClaimStatus is the current status of a persistent volume claim. type PersistentVolumeClaimStatus struct { // Phase represents the current phase of PersistentVolumeClaim. + // +optional Phase PersistentVolumeClaimPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PersistentVolumeClaimPhase"` // AccessModes contains the actual access modes the volume backing the PVC has. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes-1 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1 + // +optional AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,2,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` // Represents the actual resources of the underlying volume. + // +optional Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,3,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` } @@ -536,7 +654,7 @@ const ( // 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#hostpath Path string `json:"path" protobuf:"bytes,1,opt,name=path"` } @@ -546,7 +664,8 @@ 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir + // +optional Medium StorageMedium `json:"medium,omitempty" protobuf:"bytes,1,opt,name=medium,casttype=StorageMedium"` } @@ -564,6 +683,7 @@ type GlusterfsVolumeSource struct { // 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 ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` } @@ -579,29 +699,35 @@ type RBDVolumeSource struct { // 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#rbd // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"` // The rados pool name. // Default is rbd. // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it. + // +optional RBDPool string `json:"pool,omitempty" protobuf:"bytes,4,opt,name=pool"` // The rados user name. // Default is admin. // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + // +optional RadosUser string `json:"user,omitempty" protobuf:"bytes,5,opt,name=user"` // Keyring is the path to key ring for RBDUser. // Default is /etc/ceph/keyring. // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + // +optional Keyring string `json:"keyring,omitempty" protobuf:"bytes,6,opt,name=keyring"` // SecretRef is name of the authentication secret for RBDUser. If provided // overrides keyring. // Default is nil. // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + // +optional SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,7,opt,name=secretRef"` // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. // More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,8,opt,name=readOnly"` } @@ -617,10 +743,12 @@ type CinderVolumeSource struct { // 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 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 + // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` } @@ -631,27 +759,38 @@ type CephFSVolumeSource struct { // 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 / + // +optional 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 + // +optional User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"` // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret // More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + // +optional SecretFile string `json:"secretFile,omitempty" protobuf:"bytes,4,opt,name=secretFile"` // Optional: SecretRef is reference to the authentication secret for User, default is empty. // More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + // +optional SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"` // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"` } // Represents a Flocker volume mounted by the Flocker agent. +// One and only one of datasetName and datasetUUID should be set. // Flocker volumes do not support ownership management or SELinux relabeling. type FlockerVolumeSource struct { - // 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"` + // Name of the dataset stored as metadata -> name on the dataset for Flocker + // should be considered as deprecated + // +optional + DatasetName string `json:"datasetName,omitempty" protobuf:"bytes,1,opt,name=datasetName"` + // UUID of the dataset. This is unique identifier of a Flocker dataset + // +optional + DatasetUUID string `json:"datasetUUID,omitempty" protobuf:"bytes,2,opt,name=datasetUUID"` } // StorageMedium defines ways that storage can be allocated to a volume. @@ -680,23 +819,26 @@ const ( // 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk PDName string `json:"pdName" protobuf:"bytes,1,opt,name=pdName"` // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk + // More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` // The partition in the volume that you want to mount. // If omitted, the default is to mount by volume name. // Examples: For volume /dev/sda1, you specify the partition as "1". // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk + // More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + // +optional Partition int32 `json:"partition,omitempty" protobuf:"varint,3,opt,name=partition"` // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#gcepersistentdisk + // More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` } @@ -713,14 +855,17 @@ type QuobyteVolumeSource struct { // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. // Defaults to false. + // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` // User to map volume access to // Defaults to serivceaccount user + // +optional User string `json:"user,omitempty" protobuf:"bytes,4,opt,name=user"` // Group to map volume access to // Default is no group + // +optional Group string `json:"group,omitempty" protobuf:"bytes,5,opt,name=group"` } @@ -732,17 +877,21 @@ type FlexVolumeSource struct { // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` // Optional: SecretRef is reference to the secret object containing // sensitive information to pass to the plugin scripts. This may be // empty if no secret object is specified. If the secret object // contains more than one secret, all secrets are passed to the plugin // scripts. + // +optional SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"` // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. + // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` // Optional: Extra command options if any. + // +optional Options map[string]string `json:"options,omitempty" protobuf:"bytes,5,rep,name=options"` } @@ -754,22 +903,25 @@ type FlexVolumeSource struct { // 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"` // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore + // More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` // The partition in the volume that you want to mount. // If omitted, the default is to mount by volume name. // Examples: For volume /dev/sda1, you specify the partition as "1". // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + // +optional Partition int32 `json:"partition,omitempty" protobuf:"varint,3,opt,name=partition"` // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". // If omitted, the default is "false". - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore + // More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` } @@ -780,11 +932,13 @@ type GitRepoVolumeSource struct { // Repository URL Repository string `json:"repository" protobuf:"bytes,1,opt,name=repository"` // Commit hash for the specified revision. + // +optional Revision string `json:"revision,omitempty" protobuf:"bytes,2,opt,name=revision"` // Target directory name. // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the // git repository. Otherwise, if specified, the volume will contain the git repository in // the subdirectory with the given name. + // +optional Directory string `json:"directory,omitempty" protobuf:"bytes,3,opt,name=directory"` } @@ -795,43 +949,72 @@ type GitRepoVolumeSource struct { // 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 + // More info: http://kubernetes.io/docs/user-guide/volumes#secrets + // +optional SecretName string `json:"secretName,omitempty" protobuf:"bytes,1,opt,name=secretName"` // If unspecified, each key-value pair in the Data field of the referenced // Secret will be projected into the volume as a file whose name is the // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be // present. If a key is specified which is not present in the Secret, - // the volume setup will error. Paths must be relative and may not contain - // the '..' path or start with '..'. + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // Optional: mode bits to use on created files by default. Must be a // value between 0 and 0777. Defaults to 0644. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. + // +optional DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"bytes,3,opt,name=defaultMode"` + // Specify whether the Secret or it's keys must be defined + // +optional + Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` } const ( SecretVolumeSourceDefaultMode int32 = 0644 ) +// Adapts a secret into a projected volume. +// +// The contents of the target Secret's Data field will be presented in a +// projected volume as files using the keys in the Data field as the file names. +// Note that this is identical to a secret volume source without the default +// mode. +type SecretProjection struct { + LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` + // If unspecified, each key-value pair in the Data field of the referenced + // Secret will be projected into the volume as a file whose name is the + // key and content is the value. If specified, the listed keys will be + // projected into the specified paths, and unlisted keys will not be + // present. If a key is specified which is not present in the Secret, + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional + Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` + // Specify whether the Secret or its key must be defined + // +optional + Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` +} + // Represents an NFS mount that lasts the lifetime of a pod. // NFS volumes do not support ownership management or SELinux relabeling. type NFSVolumeSource struct { // Server is the hostname or IP address of the NFS server. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs + // More info: http://kubernetes.io/docs/user-guide/volumes#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 + // More info: http://kubernetes.io/docs/user-guide/volumes#nfs Path string `json:"path" protobuf:"bytes,2,opt,name=path"` // ReadOnly here will force // the NFS export to be mounted with read-only permissions. // Defaults to false. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#nfs + // More info: http://kubernetes.io/docs/user-guide/volumes#nfs + // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` } @@ -847,16 +1030,23 @@ type ISCSIVolumeSource struct { // iSCSI target lun number. Lun int32 `json:"lun" protobuf:"varint,3,opt,name=lun"` // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. + // +optional ISCSIInterface string `json:"iscsiInterface,omitempty" protobuf:"bytes,4,opt,name=iscsiInterface"` // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#iscsi + // More info: http://kubernetes.io/docs/user-guide/volumes#iscsi // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,5,opt,name=fsType"` // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. + // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"` + // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port + // is other than default (typically TCP ports 860 and 3260). + // +optional + Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"` } // Represents a Fibre Channel volume. @@ -871,9 +1061,11 @@ type FCVolumeSource struct { // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"` // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. + // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` } @@ -885,6 +1077,7 @@ type AzureFileVolumeSource struct { ShareName string `json:"shareName" protobuf:"bytes,2,opt,name=shareName"` // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. + // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` } @@ -895,8 +1088,20 @@ type VsphereVirtualDiskVolumeSource struct { // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` } + +// Represents a Photon Controller persistent disk resource. +type PhotonPersistentDiskVolumeSource struct { + // ID that identifies Photon Controller persistent disk + PdID string `json:"pdID" protobuf:"bytes,1,opt,name=pdID"` + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` +} + type AzureDataDiskCachingMode string const ( @@ -912,16 +1117,68 @@ type AzureDiskVolumeSource struct { // The URI the data disk in the blob storage DataDiskURI string `json:"diskURI" protobuf:"bytes,2,opt,name=diskURI"` // Host Caching mode: None, Read Only, Read Write. + // +optional CachingMode *AzureDataDiskCachingMode `json:"cachingMode,omitempty" protobuf:"bytes,3,opt,name=cachingMode,casttype=AzureDataDiskCachingMode"` // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // +optional FSType *string `json:"fsType,omitempty" protobuf:"bytes,4,opt,name=fsType"` // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. + // +optional ReadOnly *bool `json:"readOnly,omitempty" protobuf:"varint,5,opt,name=readOnly"` } +// PortworxVolumeSource represents a Portworx volume resource. +type PortworxVolumeSource struct { + // VolumeID uniquely identifies a Portworx volume + VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"` + // FSType represents the filesystem type to mount + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` + // Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // +optional + ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` +} + +// ScaleIOVolumeSource represents a persistent ScaleIO volume +type ScaleIOVolumeSource struct { + // The host address of the ScaleIO API Gateway. + Gateway string `json:"gateway" protobuf:"bytes,1,opt,name=gateway"` + // The name of the storage system as configured in ScaleIO. + System string `json:"system" protobuf:"bytes,2,opt,name=system"` + // SecretRef references to the secret for ScaleIO user and other + // sensitive information. If this is not provided, Login operation will fail. + SecretRef *LocalObjectReference `json:"secretRef" protobuf:"bytes,3,opt,name=secretRef"` + // Flag to enable/disable SSL communication with Gateway, default false + // +optional + SSLEnabled bool `json:"sslEnabled,omitempty" protobuf:"varint,4,opt,name=sslEnabled"` + // The name of the Protection Domain for the configured storage (defaults to "default"). + // +optional + ProtectionDomain string `json:"protectionDomain,omitempty" protobuf:"bytes,5,opt,name=protectionDomain"` + // The Storage Pool associated with the protection domain (defaults to "default"). + // +optional + StoragePool string `json:"storagePool,omitempty" protobuf:"bytes,6,opt,name=storagePool"` + // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). + // +optional + StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"` + // The name of a volume already created in the ScaleIO system + // that is associated with this volume source. + VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,8,opt,name=volumeName"` + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // +optional + FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"` + // Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // +optional + ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,10,opt,name=readOnly"` +} + // Adapts a ConfigMap into a volume. // // The contents of the target ConfigMap's Data field will be presented in a @@ -935,21 +1192,78 @@ type ConfigMapVolumeSource struct { // 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 '..'. + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // Optional: mode bits to use on created files by default. Must be a // value between 0 and 0777. Defaults to 0644. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. + // +optional DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,3,opt,name=defaultMode"` + // Specify whether the ConfigMap or it's keys must be defined + // +optional + Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` } const ( ConfigMapVolumeSourceDefaultMode int32 = 0644 ) +// Adapts a ConfigMap into a projected volume. +// +// The contents of the target ConfigMap's Data field will be presented in a +// projected volume as files using the keys in the Data field as the file names, +// unless the items element is populated with specific mappings of keys to paths. +// Note that this is identical to a configmap volume source without the default +// mode. +type ConfigMapProjection struct { + LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` + // If unspecified, each key-value pair in the Data field of the referenced + // ConfigMap will be projected into the volume as a file whose name is the + // key and content is the value. If specified, the listed keys will be + // projected into the specified paths, and unlisted keys will not be + // present. If a key is specified which is not present in the ConfigMap, + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional + Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` + // Specify whether the ConfigMap or it's keys must be defined + // +optional + Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` +} + +// Represents a projected volume source +type ProjectedVolumeSource struct { + // list of volume projections + Sources []VolumeProjection `json:"sources" protobuf:"bytes,1,rep,name=sources"` + // Mode bits to use on created files by default. Must be a value between + // 0 and 0777. + // Directories within the path are not affected by this setting. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + // +optional + DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,2,opt,name=defaultMode"` +} + +// Projection that may be projected along with other supported volume types +type VolumeProjection struct { + // all types below are the supported types for projection into the same volume + + // information about the secret data to project + Secret *SecretProjection `json:"secret,omitempty" protobuf:"bytes,1,opt,name=secret"` + // information about the downwardAPI data to project + DownwardAPI *DownwardAPIProjection `json:"downwardAPI,omitempty" protobuf:"bytes,2,opt,name=downwardAPI"` + // information about the configMap data to project + ConfigMap *ConfigMapProjection `json:"configMap,omitempty" protobuf:"bytes,3,opt,name=configMap"` +} + +const ( + ProjectedVolumeSourceDefaultMode int32 = 0644 +) + // Maps a string key to a path within a volume. type KeyToPath struct { // The key to project. @@ -964,6 +1278,7 @@ type KeyToPath struct { // and 0777. If not specified, the volume defaultMode will be used. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. + // +optional Mode *int32 `json:"mode,omitempty" protobuf:"varint,3,opt,name=mode"` } @@ -972,19 +1287,23 @@ type ContainerPort struct { // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each // named port in a pod must have a unique name. Name for the port that can be // referred to by services. + // +optional Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` // Number of port to expose on the host. // If specified, this must be a valid port number, 0 < x < 65536. // If HostNetwork is specified, this must match ContainerPort. // Most containers do not need this. + // +optional HostPort int32 `json:"hostPort,omitempty" protobuf:"varint,2,opt,name=hostPort"` // Number of port to expose on the pod's IP address. // This must be a valid port number, 0 < x < 65536. ContainerPort int32 `json:"containerPort" protobuf:"varint,3,opt,name=containerPort"` // Protocol for port. Must be UDP or TCP. // Defaults to "TCP". + // +optional Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,4,opt,name=protocol,casttype=Protocol"` // What host IP to bind the external port to. + // +optional HostIP string `json:"hostIP,omitempty" protobuf:"bytes,5,opt,name=hostIP"` } @@ -994,12 +1313,14 @@ type VolumeMount struct { Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // Mounted read-only if true, read-write otherwise (false or unspecified). // Defaults to false. + // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"` // Path within the container at which the volume should be mounted. Must // not contain ':'. MountPath string `json:"mountPath" protobuf:"bytes,3,opt,name=mountPath"` // Path within the volume from which the container's volume should be mounted. // Defaults to "" (volume's root). + // +optional SubPath string `json:"subPath,omitempty" protobuf:"bytes,4,opt,name=subPath"` } @@ -1018,8 +1339,10 @@ type EnvVar struct { // references will never be expanded, regardless of whether the variable // exists or not. // Defaults to "". + // +optional Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"` // Source for the environment variable's value. Cannot be used if value is not empty. + // +optional ValueFrom *EnvVarSource `json:"valueFrom,omitempty" protobuf:"bytes,3,opt,name=valueFrom"` } @@ -1027,19 +1350,24 @@ type EnvVar struct { type EnvVarSource struct { // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, // spec.nodeName, spec.serviceAccountName, status.podIP. + // +optional FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,1,opt,name=fieldRef"` // Selects a resource of the container: only resources limits and requests // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + // +optional ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,2,opt,name=resourceFieldRef"` // Selects a key of a ConfigMap. + // +optional ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty" protobuf:"bytes,3,opt,name=configMapKeyRef"` // Selects a key of a secret in the pod's namespace + // +optional SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty" protobuf:"bytes,4,opt,name=secretKeyRef"` } // ObjectFieldSelector selects an APIVersioned field of an object. type ObjectFieldSelector struct { // Version of the schema the FieldPath is written in terms of, defaults to "v1". + // +optional APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"` // Path of the field to select in the specified API version. FieldPath string `json:"fieldPath" protobuf:"bytes,2,opt,name=fieldPath"` @@ -1048,10 +1376,12 @@ type ObjectFieldSelector struct { // ResourceFieldSelector represents container resources (cpu, memory) and their output format type ResourceFieldSelector struct { // Container name: required for volumes, optional for env vars + // +optional ContainerName string `json:"containerName,omitempty" protobuf:"bytes,1,opt,name=containerName"` // Required: resource to select Resource string `json:"resource" protobuf:"bytes,2,opt,name=resource"` // Specifies the output format of the exposed resources, defaults to "1" + // +optional Divisor resource.Quantity `json:"divisor,omitempty" protobuf:"bytes,3,opt,name=divisor"` } @@ -1061,6 +1391,9 @@ type ConfigMapKeySelector struct { LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` // The key to select. Key string `json:"key" protobuf:"bytes,2,opt,name=key"` + // Specify whether the ConfigMap or it's key must be defined + // +optional + Optional *bool `json:"optional,omitempty" protobuf:"varint,3,opt,name=optional"` } // SecretKeySelector selects a key of a Secret. @@ -1069,6 +1402,48 @@ type SecretKeySelector struct { LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` // The key of the secret to select from. Must be a valid secret key. Key string `json:"key" protobuf:"bytes,2,opt,name=key"` + // Specify whether the Secret or it's key must be defined + // +optional + Optional *bool `json:"optional,omitempty" protobuf:"varint,3,opt,name=optional"` +} + +// EnvFromSource represents the source of a set of ConfigMaps +type EnvFromSource struct { + // An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + // +optional + Prefix string `json:"prefix,omitempty" protobuf:"bytes,1,opt,name=prefix"` + // The ConfigMap to select from + // +optional + ConfigMapRef *ConfigMapEnvSource `json:"configMapRef,omitempty" protobuf:"bytes,2,opt,name=configMapRef"` + // The Secret to select from + // +optional + SecretRef *SecretEnvSource `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"` +} + +// ConfigMapEnvSource selects a ConfigMap to populate the environment +// variables with. +// +// The contents of the target ConfigMap's Data field will represent the +// key-value pairs as environment variables. +type ConfigMapEnvSource struct { + // The ConfigMap to select from. + LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` + // Specify whether the ConfigMap must be defined + // +optional + Optional *bool `json:"optional,omitempty" protobuf:"varint,2,opt,name=optional"` +} + +// SecretEnvSource selects a Secret to populate the environment +// variables with. +// +// The contents of the target Secret's Data field will represent the +// key-value pairs as environment variables. +type SecretEnvSource struct { + // The Secret to select from. + LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` + // Specify whether the Secret must be defined + // +optional + Optional *bool `json:"optional,omitempty" protobuf:"varint,2,opt,name=optional"` } // HTTPHeader describes a custom header to be used in HTTP probes @@ -1082,6 +1457,7 @@ type HTTPHeader struct { // HTTPGetAction describes an action based on HTTP Get requests. type HTTPGetAction struct { // Path to access on the HTTP server. + // +optional Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` // Name or number of the port to access on the container. // Number must be in the range 1 to 65535. @@ -1089,11 +1465,14 @@ type HTTPGetAction struct { Port intstr.IntOrString `json:"port" protobuf:"bytes,2,opt,name=port"` // Host name to connect to, defaults to the pod IP. You probably want to set // "Host" in httpHeaders instead. + // +optional Host string `json:"host,omitempty" protobuf:"bytes,3,opt,name=host"` // Scheme to use for connecting to the host. // Defaults to HTTP. + // +optional Scheme URIScheme `json:"scheme,omitempty" protobuf:"bytes,4,opt,name=scheme,casttype=URIScheme"` // Custom headers to set in the request. HTTP allows repeated headers. + // +optional HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty" protobuf:"bytes,5,rep,name=httpHeaders"` } @@ -1122,6 +1501,7 @@ type ExecAction struct { // not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use // a shell, you need to explicitly call out to that shell. // Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + // +optional Command []string `json:"command,omitempty" protobuf:"bytes,1,rep,name=command"` } @@ -1131,20 +1511,25 @@ 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 + // More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes + // +optional InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty" protobuf:"varint,2,opt,name=initialDelaySeconds"` // Number of seconds after which the probe times out. // Defaults to 1 second. Minimum value is 1. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes + // More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes + // +optional TimeoutSeconds int32 `json:"timeoutSeconds,omitempty" protobuf:"varint,3,opt,name=timeoutSeconds"` // How often (in seconds) to perform the probe. // Default to 10 seconds. Minimum value is 1. + // +optional PeriodSeconds int32 `json:"periodSeconds,omitempty" protobuf:"varint,4,opt,name=periodSeconds"` // Minimum consecutive successes for the probe to be considered successful after having failed. // Defaults to 1. Must be 1 for liveness. Minimum value is 1. + // +optional SuccessThreshold int32 `json:"successThreshold,omitempty" protobuf:"varint,5,opt,name=successThreshold"` // Minimum consecutive failures for the probe to be considered failed after having succeeded. // Defaults to 3. Minimum value is 1. + // +optional FailureThreshold int32 `json:"failureThreshold,omitempty" protobuf:"varint,6,opt,name=failureThreshold"` } @@ -1160,14 +1545,29 @@ const ( PullIfNotPresent PullPolicy = "IfNotPresent" ) +// TerminationMessagePolicy describes how termination messages are retrieved from a container. +type TerminationMessagePolicy string + +const ( + // TerminationMessageReadFile is the default behavior and will set the container status message to + // the contents of the container's terminationMessagePath when the container exits. + TerminationMessageReadFile TerminationMessagePolicy = "File" + // TerminationMessageFallbackToLogsOnError will read the most recent contents of the container logs + // for the container status message when the container exits with an error and the + // terminationMessagePath has no contents. + TerminationMessageFallbackToLogsOnError TerminationMessagePolicy = "FallbackToLogsOnError" +) + // Capability represent POSIX capabilities type type Capability string // Adds and removes POSIX capabilities from running containers. type Capabilities struct { // Added capabilities + // +optional Add []Capability `json:"add,omitempty" protobuf:"bytes,1,rep,name=add,casttype=Capability"` // Removed capabilities + // +optional Drop []Capability `json:"drop,omitempty" protobuf:"bytes,2,rep,name=drop,casttype=Capability"` } @@ -1175,11 +1575,13 @@ type Capabilities struct { type ResourceRequirements struct { // Limits describes the maximum amount of compute resources allowed. // More info: http://kubernetes.io/docs/user-guide/compute-resources/ + // +optional Limits ResourceList `json:"limits,omitempty" protobuf:"bytes,1,rep,name=limits,casttype=ResourceList,castkey=ResourceName"` // Requests describes the minimum amount of compute resources required. // If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, // otherwise to an implementation-defined value. // More info: http://kubernetes.io/docs/user-guide/compute-resources/ + // +optional Requests ResourceList `json:"requests,omitempty" protobuf:"bytes,2,rep,name=requests,casttype=ResourceList,castkey=ResourceName"` } @@ -1195,7 +1597,8 @@ type Container struct { // 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 + // More info: http://kubernetes.io/docs/user-guide/images + // +optional 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. @@ -1204,7 +1607,8 @@ type Container struct { // 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 + // More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands + // +optional Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"` // Arguments to the entrypoint. // The docker image's CMD is used if this is not provided. @@ -1213,12 +1617,14 @@ type Container struct { // 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 + // More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands + // +optional Args []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"` // Container's working directory. // If not specified, the container runtime's default will be used, which // might be configured in the container image. // Cannot be updated. + // +optional WorkingDir string `json:"workingDir,omitempty" protobuf:"bytes,5,opt,name=workingDir"` // List of ports to expose from the container. Exposing a port here gives // the system additional information about the network connections a @@ -1227,44 +1633,73 @@ type Container struct { // listening on the default "0.0.0.0" address inside a container will be // accessible from the network. // Cannot be updated. + // +optional Ports []ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"` + // List of sources to populate environment variables in the container. + // The keys defined within a source must be a C_IDENTIFIER. All invalid keys + // will be reported as an event when the container is starting. When a key exists in multiple + // sources, the value associated with the last source will take precedence. + // Values defined by an Env with a duplicate key will take precedence. + // Cannot be updated. + // +optional + EnvFrom []EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,19,rep,name=envFrom"` // List of environment variables to set in the container. // Cannot be updated. + // +optional 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 + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources + // +optional Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,8,opt,name=resources"` // Pod volumes to mount into the container's filesystem. // Cannot be updated. - VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,9,rep,name=volumeMounts"` + // +optional + VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` // Periodic probe of container liveness. // Container will be restarted if the probe fails. // Cannot be updated. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes + // More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes + // +optional LivenessProbe *Probe `json:"livenessProbe,omitempty" protobuf:"bytes,10,opt,name=livenessProbe"` // Periodic probe of container service readiness. // Container will be removed from service endpoints if the probe fails. // Cannot be updated. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-probes + // More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes + // +optional ReadinessProbe *Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"` // Actions that the management system should take in response to container lifecycle events. // Cannot be updated. + // +optional Lifecycle *Lifecycle `json:"lifecycle,omitempty" protobuf:"bytes,12,opt,name=lifecycle"` // Optional: Path at which the file to which the container's termination message // will be written is mounted into the container's filesystem. // Message written is intended to be brief final status, such as an assertion failure message. + // Will be truncated by the node if greater than 4096 bytes. The total message length across + // all containers will be limited to 12kb. // Defaults to /dev/termination-log. // Cannot be updated. + // +optional TerminationMessagePath string `json:"terminationMessagePath,omitempty" protobuf:"bytes,13,opt,name=terminationMessagePath"` + // Indicate how the termination message should be populated. File will use the contents of + // terminationMessagePath to populate the container status message on both success and failure. + // FallbackToLogsOnError will use the last chunk of container log output if the termination + // message file is empty and the container exited with an error. + // The log output is limited to 2048 bytes or 80 lines, whichever is smaller. + // Defaults to File. + // Cannot be updated. + // +optional + TerminationMessagePolicy TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty" protobuf:"bytes,20,opt,name=terminationMessagePolicy,casttype=TerminationMessagePolicy"` // Image pull policy. // One of Always, Never, IfNotPresent. // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. // Cannot be updated. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/images.md#updating-images + // More info: http://kubernetes.io/docs/user-guide/images#updating-images + // +optional ImagePullPolicy PullPolicy `json:"imagePullPolicy,omitempty" protobuf:"bytes,14,opt,name=imagePullPolicy,casttype=PullPolicy"` // Security options the pod should run with. // More info: http://releases.k8s.io/HEAD/docs/design/security_context.md + // +optional SecurityContext *SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,15,opt,name=securityContext"` // Variables for interactive containers, these have very specialized use-cases (e.g. debugging) @@ -1273,6 +1708,7 @@ type Container struct { // Whether this container should allocate a buffer for stdin in the container runtime. If this // is not set, reads from stdin in the container will always result in EOF. // Default is false. + // +optional Stdin bool `json:"stdin,omitempty" protobuf:"varint,16,opt,name=stdin"` // Whether the container runtime should close the stdin channel after it has been opened by // a single attach. When stdin is true the stdin stream will remain open across multiple attach @@ -1281,9 +1717,11 @@ type Container struct { // at which time stdin is closed and remains closed until the container is restarted. If this // flag is false, a container processes that reads from stdin will never receive an EOF. // Default is false + // +optional StdinOnce bool `json:"stdinOnce,omitempty" protobuf:"varint,17,opt,name=stdinOnce"` // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. // Default is false. + // +optional TTY bool `json:"tty,omitempty" protobuf:"varint,18,opt,name=tty"` } @@ -1292,12 +1730,15 @@ type Container struct { type Handler struct { // One and only one of the following should be specified. // Exec specifies the action to take. + // +optional Exec *ExecAction `json:"exec,omitempty" protobuf:"bytes,1,opt,name=exec"` // HTTPGet specifies the http request to perform. + // +optional HTTPGet *HTTPGetAction `json:"httpGet,omitempty" protobuf:"bytes,2,opt,name=httpGet"` // TCPSocket specifies an action involving a TCP port. // TCP hooks not yet supported // TODO: implement a realistic TCP lifecycle hook + // +optional TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"` } @@ -1308,14 +1749,16 @@ 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 + // More info: http://kubernetes.io/docs/user-guide/container-environment#hook-details + // +optional PostStart *Handler `json:"postStart,omitempty" protobuf:"bytes,1,opt,name=postStart"` // PreStop is called immediately before a container is terminated. // The container is terminated after the handler completes. // The reason for termination is passed to the handler. // Regardless of the outcome of the handler, the container is eventually terminated. // Other management of the container blocks until the hook completes. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#hook-details + // More info: http://kubernetes.io/docs/user-guide/container-environment#hook-details + // +optional PreStop *Handler `json:"preStop,omitempty" protobuf:"bytes,2,opt,name=preStop"` } @@ -1334,15 +1777,18 @@ const ( // ContainerStateWaiting is a waiting state of a container. type ContainerStateWaiting struct { // (brief) reason the container is not yet running. + // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason"` // Message regarding why the container is not yet running. + // +optional Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` } // ContainerStateRunning is a running state of a container. type ContainerStateRunning struct { // Time at which the container was last (re-)started - StartedAt unversioned.Time `json:"startedAt,omitempty" protobuf:"bytes,1,opt,name=startedAt"` + // +optional + StartedAt metav1.Time `json:"startedAt,omitempty" protobuf:"bytes,1,opt,name=startedAt"` } // ContainerStateTerminated is a terminated state of a container. @@ -1350,16 +1796,22 @@ type ContainerStateTerminated struct { // Exit status from the last termination of the container ExitCode int32 `json:"exitCode" protobuf:"varint,1,opt,name=exitCode"` // Signal from the last termination of the container + // +optional Signal int32 `json:"signal,omitempty" protobuf:"varint,2,opt,name=signal"` // (brief) reason from the last termination of the container + // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` // Message regarding the last termination of the container + // +optional Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"` // Time at which previous execution of the container started - StartedAt unversioned.Time `json:"startedAt,omitempty" protobuf:"bytes,5,opt,name=startedAt"` + // +optional + StartedAt metav1.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"` + // +optional + FinishedAt metav1.Time `json:"finishedAt,omitempty" protobuf:"bytes,6,opt,name=finishedAt"` // Container's ID in the format 'docker://' + // +optional ContainerID string `json:"containerID,omitempty" protobuf:"bytes,7,opt,name=containerID"` } @@ -1368,10 +1820,13 @@ type ContainerStateTerminated struct { // If none of them is specified, the default one is ContainerStateWaiting. type ContainerState struct { // Details about a waiting container + // +optional Waiting *ContainerStateWaiting `json:"waiting,omitempty" protobuf:"bytes,1,opt,name=waiting"` // Details about a running container + // +optional Running *ContainerStateRunning `json:"running,omitempty" protobuf:"bytes,2,opt,name=running"` // Details about a terminated container + // +optional Terminated *ContainerStateTerminated `json:"terminated,omitempty" protobuf:"bytes,3,opt,name=terminated"` } @@ -1381,8 +1836,10 @@ type ContainerStatus struct { // Cannot be updated. Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // Details about the container's current condition. + // +optional State ContainerState `json:"state,omitempty" protobuf:"bytes,2,opt,name=state"` // Details about the container's last termination condition. + // +optional LastTerminationState ContainerState `json:"lastState,omitempty" protobuf:"bytes,3,opt,name=lastState"` // Specifies whether the container has passed its readiness probe. Ready bool `json:"ready" protobuf:"varint,4,opt,name=ready"` @@ -1392,13 +1849,14 @@ type ContainerStatus struct { // 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 + // More info: http://kubernetes.io/docs/user-guide/images // TODO(dchen1107): Which image the container is running with? Image string `json:"image" protobuf:"bytes,6,opt,name=image"` // ImageID of the container's image. ImageID string `json:"imageID" protobuf:"bytes,7,opt,name=imageID"` // Container's ID in the format 'docker://'. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#container-information + // More info: http://kubernetes.io/docs/user-guide/container-environment#container-information + // +optional ContainerID string `json:"containerID,omitempty" protobuf:"bytes,8,opt,name=containerID"` } @@ -1435,25 +1893,34 @@ const ( // PodReady means the pod is able to service requests and should be added to the // load balancing pools of all matching services. PodReady PodConditionType = "Ready" + // PodInitialized means that all init containers in the pod have started successfully. + PodInitialized PodConditionType = "Initialized" + // PodReasonUnschedulable reason in PodScheduled PodCondition means that the scheduler + // can't schedule the pod right now, for example due to insufficient resources in the cluster. + PodReasonUnschedulable = "Unschedulable" ) // PodCondition contains details for the current condition of this pod. type PodCondition struct { // Type is the type of the condition. // Currently only Ready. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-conditions + // More info: http://kubernetes.io/docs/user-guide/pod-states#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 + // More info: http://kubernetes.io/docs/user-guide/pod-states#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"` + // +optional + LastProbeTime metav1.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"` + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` // Unique, one-word, CamelCase reason for the condition's last transition. + // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` // Human-readable message indicating details about last transition. + // +optional Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` } @@ -1473,9 +1940,14 @@ const ( type DNSPolicy string const ( + // DNSClusterFirstWithHostNet indicates that the pod should use cluster DNS + // first, if it is available, then fall back on the default + // (as determined by kubelet) DNS settings. + DNSClusterFirstWithHostNet DNSPolicy = "ClusterFirstWithHostNet" + // DNSClusterFirst indicates that the pod should use cluster DNS - // first, if it is available, then fall back on the default (as - // determined by kubelet) DNS settings. + // first unless hostNetwork is true, if it is available, then + // fall back on the default (as determined by kubelet) DNS settings. DNSClusterFirst DNSPolicy = "ClusterFirst" // DNSDefault indicates that the pod should use the default (as @@ -1512,6 +1984,7 @@ type NodeSelectorRequirement struct { // the values array must be empty. If the operator is Gt or Lt, the values // array must have a single element, which will be interpreted as an integer. // This array is replaced during a strategic merge patch. + // +optional Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` } @@ -1531,10 +2004,13 @@ const ( // Affinity is a group of affinity scheduling rules. type Affinity struct { // Describes node affinity scheduling rules for the pod. + // +optional NodeAffinity *NodeAffinity `json:"nodeAffinity,omitempty" protobuf:"bytes,1,opt,name=nodeAffinity"` // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + // +optional PodAffinity *PodAffinity `json:"podAffinity,omitempty" protobuf:"bytes,2,opt,name=podAffinity"` // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). + // +optional PodAntiAffinity *PodAntiAffinity `json:"podAntiAffinity,omitempty" protobuf:"bytes,3,opt,name=podAntiAffinity"` } @@ -1548,6 +2024,7 @@ type PodAffinity struct { // system will try to eventually evict the pod from its node. // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. + // +optional // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` // If the affinity requirements specified by this field are not met at // scheduling time, the pod will not be scheduled onto the node. @@ -1556,6 +2033,7 @@ type PodAffinity struct { // system may or may not try to eventually evict the pod from its node. // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. + // +optional RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,rep,name=requiredDuringSchedulingIgnoredDuringExecution"` // The scheduler will prefer to schedule pods to nodes that satisfy // the affinity expressions specified by this field, but it may choose @@ -1566,6 +2044,7 @@ type PodAffinity struct { // compute a sum by iterating through the elements of this field and adding // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the // node(s) with the highest sum are the most preferred. + // +optional PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"` } @@ -1579,6 +2058,7 @@ type PodAntiAffinity struct { // system will try to eventually evict the pod from its node. // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. + // +optional // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` // If the anti-affinity requirements specified by this field are not met at // scheduling time, the pod will not be scheduled onto the node. @@ -1587,6 +2067,7 @@ type PodAntiAffinity struct { // system may or may not try to eventually evict the pod from its node. // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. + // +optional RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,rep,name=requiredDuringSchedulingIgnoredDuringExecution"` // The scheduler will prefer to schedule pods to nodes that satisfy // the anti-affinity expressions specified by this field, but it may choose @@ -1597,6 +2078,7 @@ type PodAntiAffinity struct { // compute a sum by iterating through the elements of this field and adding // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the // node(s) with the highest sum are the most preferred. + // +optional PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"` } @@ -1617,12 +2099,11 @@ type WeightedPodAffinityTerm struct { // 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"` + // +optional + LabelSelector *metav1.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"` + // null or empty list means "this pod's namespace" + Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,2,rep,name=namespaces"` // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching // the labelSelector in the specified namespaces, where co-located is defined as running on a node // whose value of the label with key topologyKey matches that of any node on which any of the @@ -1630,6 +2111,7 @@ type PodAffinityTerm struct { // For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" // ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); // for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed. + // +optional TopologyKey string `json:"topologyKey,omitempty" protobuf:"bytes,3,opt,name=topologyKey"` } @@ -1641,6 +2123,7 @@ type NodeAffinity struct { // If the affinity requirements specified by this field cease to be met // at some point during pod execution (e.g. due to an update), the system // will try to eventually evict the pod from its node. + // +optional // RequiredDuringSchedulingRequiredDuringExecution *NodeSelector `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` // If the affinity requirements specified by this field are not met at @@ -1648,6 +2131,7 @@ type NodeAffinity struct { // If the affinity requirements specified by this field cease to be met // at some point during pod execution (e.g. due to an update), the system // may or may not try to eventually evict the pod from its node. + // +optional RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,opt,name=requiredDuringSchedulingIgnoredDuringExecution"` // The scheduler will prefer to schedule pods to nodes that satisfy // the affinity expressions specified by this field, but it may choose @@ -1658,6 +2142,7 @@ type NodeAffinity struct { // compute a sum by iterating through the elements of this field and adding // "weight" to the sum if the node matches the corresponding matchExpressions; the // node(s) with the highest sum are the most preferred. + // +optional PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"` } @@ -1676,11 +2161,16 @@ 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. + // +optional Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"` // Required. The effect of the taint on pods // that do not tolerate the taint. - // Valid effects are NoSchedule and PreferNoSchedule. + // Valid effects are NoSchedule, PreferNoSchedule and NoExecute. Effect TaintEffect `json:"effect" protobuf:"bytes,3,opt,name=effect,casttype=TaintEffect"` + // TimeAdded represents the time at which the taint was added. + // It is only written for NoExecute taints. + // +optional + TimeAdded metav1.Time `json:"timeAdded,omitempty" protobuf:"bytes,4,opt,name=timeAdded"` } type TaintEffect string @@ -1696,37 +2186,42 @@ const ( // 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. + // Like TaintEffectNoSchedule, but additionally do not allow pods submitted to + // Kubelet without going through the scheduler to start. + // Enforced by Kubelet and the scheduler. // TaintEffectNoScheduleNoAdmit TaintEffect = "NoScheduleNoAdmit" - // 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" + // Evict any already-running pods that do not tolerate the taint. + // Currently enforced by NodeController. + TaintEffectNoExecute TaintEffect = "NoExecute" ) // The pod this Toleration is attached to tolerates any taint that matches // the triple using the matching operator . type Toleration struct { - // Required. Key is the taint key that the toleration applies to. + // Key is the taint key that the toleration applies to. Empty means match all taint keys. + // If the key is empty, operator must be Exists; this combination means to match all values and all keys. + // +optional Key string `json:"key,omitempty" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"` - // operator represents a key's relationship to the value. + // Operator represents a key's relationship to the value. // Valid operators are Exists and Equal. Defaults to Equal. // Exists is equivalent to wildcard for value, so that a pod can // tolerate all taints of a particular category. + // +optional Operator TolerationOperator `json:"operator,omitempty" protobuf:"bytes,2,opt,name=operator,casttype=TolerationOperator"` // Value is the taint value the toleration matches to. // If the operator is Exists, the value should be empty, otherwise just a regular string. + // +optional Value string `json:"value,omitempty" protobuf:"bytes,3,opt,name=value"` // Effect indicates the taint effect to match. Empty means match all taint effects. - // When specified, allowed values are NoSchedule and PreferNoSchedule. + // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + // +optional 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. + // TolerationSeconds represents the period of time the toleration (which must be + // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + // it is not set, which means tolerate the taint forever (do not evict). Zero and + // negative values will be treated as 0 (evict immediately) by the system. + // +optional + TolerationSeconds *int64 `json:"tolerationSeconds,omitempty" protobuf:"varint,5,opt,name=tolerationSeconds"` } // A toleration operator is the set of operators that can be used in a toleration. @@ -1761,7 +2256,8 @@ const ( // 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 + // More info: http://kubernetes.io/docs/user-guide/volumes + // +optional 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 @@ -1774,20 +2270,20 @@ type PodSpec struct { // 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"` + // More info: http://kubernetes.io/docs/user-guide/containers + InitContainers []Container `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,20,rep,name=initContainers"` // List of containers belonging to the pod. // Containers cannot currently be added or removed. // There must be at least one container in a Pod. // Cannot be updated. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/containers.md + // More info: http://kubernetes.io/docs/user-guide/containers 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 + // More info: http://kubernetes.io/docs/user-guide/pod-states#restartpolicy + // +optional RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" protobuf:"bytes,3,opt,name=restartPolicy,casttype=RestartPolicy"` // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. // Value must be non-negative integer. The value zero indicates delete immediately. @@ -1796,59 +2292,87 @@ type PodSpec struct { // a termination signal and the time when the processes are forcibly halted with a kill signal. // Set this value longer than the expected cleanup time for your process. // Defaults to 30 seconds. + // +optional TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" protobuf:"varint,4,opt,name=terminationGracePeriodSeconds"` // Optional duration in seconds the pod may be active on the node relative to // StartTime before the system will actively try to mark it failed and kill associated containers. // Value must be a positive integer. + // +optional ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,5,opt,name=activeDeadlineSeconds"` // Set DNS policy for containers within the pod. - // One of 'ClusterFirst' or 'Default'. + // One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. // Defaults to "ClusterFirst". + // To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. + // +optional DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty" protobuf:"bytes,6,opt,name=dnsPolicy,casttype=DNSPolicy"` // NodeSelector is a selector which must be true for the pod to fit on a node. // Selector which must match a node's labels for the pod to be scheduled on that node. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/node-selection/README.md + // More info: http://kubernetes.io/docs/user-guide/node-selection/README + // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,7,rep,name=nodeSelector"` // ServiceAccountName is the name of the ServiceAccount to use to run this pod. // More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md + // +optional ServiceAccountName string `json:"serviceAccountName,omitempty" protobuf:"bytes,8,opt,name=serviceAccountName"` // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. // Deprecated: Use serviceAccountName instead. // +k8s:conversion-gen=false + // +optional DeprecatedServiceAccount string `json:"serviceAccount,omitempty" protobuf:"bytes,9,opt,name=serviceAccount"` + // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. + // +optional + AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty" protobuf:"varint,21,opt,name=automountServiceAccountToken"` // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, // the scheduler simply schedules this pod onto that node, assuming that it fits resource // requirements. + // +optional NodeName string `json:"nodeName,omitempty" protobuf:"bytes,10,opt,name=nodeName"` // Host networking requested for this pod. Use the host's network namespace. // If this option is set, the ports that will be used must be specified. // Default to false. // +k8s:conversion-gen=false + // +optional HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,11,opt,name=hostNetwork"` // Use the host's pid namespace. // Optional: Default to false. // +k8s:conversion-gen=false + // +optional HostPID bool `json:"hostPID,omitempty" protobuf:"varint,12,opt,name=hostPID"` // Use the host's ipc namespace. // Optional: Default to false. // +k8s:conversion-gen=false + // +optional HostIPC bool `json:"hostIPC,omitempty" protobuf:"varint,13,opt,name=hostIPC"` // SecurityContext holds pod-level security attributes and common container settings. // Optional: Defaults to empty. See type description for default values of each field. + // +optional SecurityContext *PodSecurityContext `json:"securityContext,omitempty" protobuf:"bytes,14,opt,name=securityContext"` // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. // If specified, these secrets will be passed to individual puller implementations for them to use. For example, // in the case of docker, only DockerConfig type secrets are honored. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/images.md#specifying-imagepullsecrets-on-a-pod + // More info: http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod + // +optional ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"` // Specifies the hostname of the Pod // If not specified, the pod's hostname will be set to a system-defined value. + // +optional Hostname string `json:"hostname,omitempty" protobuf:"bytes,16,opt,name=hostname"` // If specified, the fully qualified Pod hostname will be "...svc.". // If not specified, the pod will not have a domainname at all. + // +optional Subdomain string `json:"subdomain,omitempty" protobuf:"bytes,17,opt,name=subdomain"` + // If specified, the pod's scheduling constraints + // +optional + Affinity *Affinity `json:"affinity,omitempty" protobuf:"bytes,18,opt,name=affinity"` + // If specified, the pod will be dispatched by specified scheduler. + // If not specified, the pod will be dispatched by default scheduler. + // +optional + SchedulerName string `json:"schedulerName,omitempty" protobuf:"bytes,19,opt,name=schedulerName"` + // If specified, the pod's tolerations. + // +optional + Tolerations []Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"` } // PodSecurityContext holds pod-level security attributes and common container settings. @@ -1860,12 +2384,14 @@ type PodSecurityContext struct { // container. May also be set in SecurityContext. If set in // both SecurityContext and PodSecurityContext, the value specified in SecurityContext // takes precedence for that container. + // +optional SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,1,opt,name=seLinuxOptions"` // The UID to run the entrypoint of the container process. // Defaults to user specified in image metadata if unspecified. // May also be set in SecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence // for that container. + // +optional RunAsUser *int64 `json:"runAsUser,omitempty" protobuf:"varint,2,opt,name=runAsUser"` // Indicates that the container must run as a non-root user. // If true, the Kubelet will validate the image at runtime to ensure that it @@ -1873,10 +2399,12 @@ type PodSecurityContext struct { // If unset or false, no such validation will be performed. // May also be set in SecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" protobuf:"varint,3,opt,name=runAsNonRoot"` // A list of groups applied to the first process run in each container, in addition // to the container's primary GID. If unspecified, no groups will be added to // any container. + // +optional SupplementalGroups []int64 `json:"supplementalGroups,omitempty" protobuf:"varint,4,rep,name=supplementalGroups"` // A special supplemental group that applies to all containers in a pod. // Some volume types allow the Kubelet to change the ownership of that volume @@ -1887,57 +2415,85 @@ type PodSecurityContext struct { // 3. The permission bits are OR'd with rw-rw---- // // If unset, the Kubelet will not modify the ownership and permissions of any volume. + // +optional FSGroup *int64 `json:"fsGroup,omitempty" protobuf:"varint,5,opt,name=fsGroup"` } +// PodQOSClass defines the supported qos classes of Pods. +type PodQOSClass string + +const ( + // PodQOSGuaranteed is the Guaranteed qos class. + PodQOSGuaranteed PodQOSClass = "Guaranteed" + // PodQOSBurstable is the Burstable qos class. + PodQOSBurstable PodQOSClass = "Burstable" + // PodQOSBestEffort is the BestEffort qos class. + PodQOSBestEffort PodQOSClass = "BestEffort" +) + // PodStatus represents information about the status of a pod. Status may trail the actual // state of a system. type PodStatus struct { // Current condition of the pod. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#pod-phase + // More info: http://kubernetes.io/docs/user-guide/pod-states#pod-phase + // +optional 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 + // More info: http://kubernetes.io/docs/user-guide/pod-states#pod-conditions + // +optional Conditions []PodCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` // A human readable message indicating details about why the pod is in this condition. + // +optional Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` // A brief CamelCase message indicating details about why the pod is in this state. // e.g. 'OutOfDisk' + // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` // IP address of the host to which the pod is assigned. Empty if not yet scheduled. + // +optional HostIP string `json:"hostIP,omitempty" protobuf:"bytes,5,opt,name=hostIP"` // IP address allocated to the pod. Routable at least within the cluster. // Empty if not yet allocated. + // +optional PodIP string `json:"podIP,omitempty" protobuf:"bytes,6,opt,name=podIP"` // RFC 3339 date and time at which the object was acknowledged by the Kubelet. // This is before the Kubelet pulled the container image(s) for the pod. - StartTime *unversioned.Time `json:"startTime,omitempty" protobuf:"bytes,7,opt,name=startTime"` + // +optional + StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,7,opt,name=startTime"` // The list has one entry per init container in the manifest. The most recent successful // init container will have ready = true, the most recently started container will have // startTime set. - // 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:"-"` + // More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses + InitContainerStatuses []ContainerStatus `json:"initContainerStatuses,omitempty" protobuf:"bytes,10,rep,name=initContainerStatuses"` + // The list has one entry per container in the manifest. Each entry is currently the output // of `docker inspect`. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/pod-states.md#container-statuses + // More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses + // +optional ContainerStatuses []ContainerStatus `json:"containerStatuses,omitempty" protobuf:"bytes,8,rep,name=containerStatuses"` + // The Quality of Service (QOS) classification assigned to the pod based on resource requirements + // See PodQOSClass type for available QOS classes + // More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md + // +optional + QOSClass PodQOSClass `json:"qosClass,omitempty" protobuf:"bytes,9,rep,name=qosClass"` } // PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded type PodStatusResult struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Most recently observed status of the pod. // This data may not be up to date. // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Status PodStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` } @@ -1946,13 +2502,15 @@ type PodStatusResult struct { // 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"` + metav1.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"` + // +optional + metav1.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 + // +optional Spec PodSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Most recently observed status of the pod. @@ -1960,18 +2518,20 @@ type Pod struct { // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Status PodStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // PodList is a list of Pods. type PodList struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.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 + // More info: http://kubernetes.io/docs/user-guide/pods Items []Pod `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -1979,10 +2539,12 @@ type PodList struct { 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"` + // +optional + metav1.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 + // +optional Spec PodSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } @@ -1990,22 +2552,25 @@ type PodTemplateSpec struct { // PodTemplate describes a template for creating copies of a predefined pod. type PodTemplate struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.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 + // +optional Template PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"` } // PodTemplateList is a list of PodTemplates. type PodTemplateList struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of pod templates Items []PodTemplate `json:"items" protobuf:"bytes,2,rep,name=items"` @@ -2016,24 +2581,34 @@ 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 + // More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller + // +optional Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + // +optional + MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"` + // Selector is a label query over pods that should match the Replicas count. // If Selector is empty, it is defaulted to the labels present on the Pod template. // Label keys and values that must match in order to be controlled by this replication // controller, if empty defaulted to labels on Pod template. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"` // TemplateRef is a reference to an object that describes the pod that will be created if // insufficient replicas are detected. // Reference to an object that describes the pod that will be created if insufficient replicas are detected. + // +optional // TemplateRef *ObjectReference `json:"templateRef,omitempty"` // Template is the object that describes the pod that will be created if // insufficient replicas are detected. This takes precedence over a TemplateRef. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template + // More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template + // +optional Template *PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"` } @@ -2041,32 +2616,72 @@ type ReplicationControllerSpec struct { // 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 + // More info: http://kubernetes.io/docs/user-guide/replication-controller#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. + // +optional FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"` // The number of ready replicas for this replication controller. + // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"` + // The number of available replicas (ready for at least minReadySeconds) for this replication controller. + // +optional + AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"` + // ObservedGeneration reflects the generation of the most recently observed replication controller. + // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"` + + // Represents the latest available observations of a replication controller's current state. + // +optional + Conditions []ReplicationControllerCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` +} + +type ReplicationControllerConditionType string + +// These are valid conditions of a replication controller. +const ( + // ReplicationControllerReplicaFailure is added in a replication controller when one of its pods + // fails to be created due to insufficient quota, limit ranges, pod security policy, node selectors, + // etc. or deleted due to kubelet being down or finalizers are failing. + ReplicationControllerReplicaFailure ReplicationControllerConditionType = "ReplicaFailure" +) + +// ReplicationControllerCondition describes the state of a replication controller at a certain point. +type ReplicationControllerCondition struct { + // Type of replication controller condition. + Type ReplicationControllerConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ReplicationControllerConditionType"` + // Status of the condition, one of True, False, Unknown. + Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` + // The last time the condition transitioned from one status to another. + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` + // The reason for the condition's last transition. + // +optional + Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` + // A human readable message indicating details about the transition. + // +optional + Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` } // +genclient=true // ReplicationController represents the configuration of a replication controller. type ReplicationController struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // If the Labels of a ReplicationController are empty, they are defaulted to // be the same as the Pod(s) that the replication controller manages. // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the specification of the desired behavior of the replication controller. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Spec ReplicationControllerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Status is the most recently observed status of the replication controller. @@ -2074,18 +2689,20 @@ type ReplicationController struct { // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Status ReplicationControllerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // ReplicationControllerList is a collection of replication controllers. type ReplicationControllerList struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.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 + // More info: http://kubernetes.io/docs/user-guide/replication-controller Items []ReplicationController `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -2127,6 +2744,7 @@ const ( type ServiceStatus struct { // LoadBalancer contains the current status of the load-balancer, // if one is present. + // +optional LoadBalancer LoadBalancerStatus `json:"loadBalancer,omitempty" protobuf:"bytes,1,opt,name=loadBalancer"` } @@ -2134,6 +2752,7 @@ type ServiceStatus struct { type LoadBalancerStatus struct { // Ingress is a list containing ingress points for the load-balancer. // Traffic intended for the service should be sent to these ingress points. + // +optional Ingress []LoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"` } @@ -2142,25 +2761,28 @@ type LoadBalancerStatus struct { type LoadBalancerIngress struct { // IP is set for load-balancer ingress points that are IP based // (typically GCE or OpenStack load-balancers) + // +optional IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"` // Hostname is set for load-balancer ingress points that are DNS based // (typically AWS load-balancers) + // +optional Hostname string `json:"hostname,omitempty" protobuf:"bytes,2,opt,name=hostname"` } // ServiceSpec describes the attributes that a user creates on a service. type ServiceSpec struct { // The list of ports that are exposed by this service. - // More info: 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"` + // More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies + Ports []ServicePort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"port" protobuf:"bytes,1,rep,name=ports"` // Route service traffic to pods with label keys and values matching this // selector. If empty or not present, the service is assumed to have an // external process managing its endpoints, which Kubernetes will not // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. // Ignored if type is ExternalName. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview + // More info: http://kubernetes.io/docs/user-guide/services#overview + // +optional Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"` // clusterIP is the IP address of the service and is usually assigned @@ -2171,7 +2793,8 @@ type ServiceSpec struct { // can be specified for headless services when proxying is not required. // Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if // type is ExternalName. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies + // More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies + // +optional ClusterIP string `json:"clusterIP,omitempty" protobuf:"bytes,3,opt,name=clusterIP"` // type determines how the Service is exposed. Defaults to ClusterIP. Valid @@ -2187,7 +2810,8 @@ type ServiceSpec struct { // "LoadBalancer" builds on NodePort and creates an // external load-balancer (if supported in the current cloud) which routes // to the clusterIP. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview + // More info: http://kubernetes.io/docs/user-guide/services#overview + // +optional Type ServiceType `json:"type,omitempty" protobuf:"bytes,4,opt,name=type,casttype=ServiceType"` // externalIPs is a list of IP addresses for which nodes in the cluster @@ -2197,6 +2821,7 @@ type ServiceSpec struct { // 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. + // +optional ExternalIPs []string `json:"externalIPs,omitempty" protobuf:"bytes,5,rep,name=externalIPs"` // deprecatedPublicIPs is deprecated and replaced by the externalIPs field @@ -2205,13 +2830,15 @@ type ServiceSpec struct { // any new API revisions. If both deprecatedPublicIPs *and* externalIPs are // set, deprecatedPublicIPs is used. // +k8s:conversion-gen=false + // +optional 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 + // More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies + // +optional SessionAffinity ServiceAffinity `json:"sessionAffinity,omitempty" protobuf:"bytes,7,opt,name=sessionAffinity,casttype=ServiceAffinity"` // Only applies to Service Type: LoadBalancer @@ -2219,17 +2846,20 @@ type ServiceSpec struct { // This feature depends on whether the underlying cloud-provider supports specifying // the loadBalancerIP when a load balancer is created. // This field will be ignored if the cloud-provider does not support the feature. + // +optional LoadBalancerIP string `json:"loadBalancerIP,omitempty" protobuf:"bytes,8,opt,name=loadBalancerIP"` // If specified and supported by the platform, this will restrict traffic through the cloud-provider // load-balancer will be restricted to the specified client IPs. This field will be ignored if the // cloud-provider does not support the feature." - // More info: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md + // More info: http://kubernetes.io/docs/user-guide/services-firewalls + // +optional LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" protobuf:"bytes,9,opt,name=loadBalancerSourceRanges"` // externalName is the external reference that kubedns or equivalent will // return as a CNAME record for this service. No proxying will be involved. // Must be a valid DNS name and requires Type to be ExternalName. + // +optional ExternalName string `json:"externalName,omitempty" protobuf:"bytes,10,opt,name=externalName"` } @@ -2239,10 +2869,12 @@ type ServicePort struct { // All ports within a ServiceSpec must have unique names. This maps to // the 'Name' field in EndpointPort objects. // Optional if only one ServicePort is defined on this service. + // +optional Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` // The IP protocol for this port. Supports "TCP" and "UDP". // Default is TCP. + // +optional Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,2,opt,name=protocol,casttype=Protocol"` // The port that will be exposed by this service. @@ -2255,14 +2887,16 @@ type ServicePort struct { // 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 + // More info: http://kubernetes.io/docs/user-guide/services#defining-a-service + // +optional TargetPort intstr.IntOrString `json:"targetPort,omitempty" protobuf:"bytes,4,opt,name=targetPort"` // The port on each node on which this service is exposed when type=NodePort or LoadBalancer. // Usually assigned by the system. If specified, it will be allocated to the service // if unused or else creation of the service will fail. // Default is to auto-allocate a port if the ServiceType of this Service requires one. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#type--nodeport + // More info: http://kubernetes.io/docs/user-guide/services#type--nodeport + // +optional NodePort int32 `json:"nodePort,omitempty" protobuf:"varint,5,opt,name=nodePort"` } @@ -2272,19 +2906,22 @@ type ServicePort struct { // (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"` + metav1.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"` + // +optional + metav1.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 + // +optional Spec ServiceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Most recently observed status of the service. // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Status ServiceStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -2296,10 +2933,11 @@ const ( // ServiceList holds a list of services. type ServiceList struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of services Items []Service `json:"items" protobuf:"bytes,2,rep,name=items"` @@ -2312,28 +2950,37 @@ type ServiceList struct { // * a principal that can be authenticated and authorized // * a set of secrets type ServiceAccount struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/secrets.md + // More info: http://kubernetes.io/docs/user-guide/secrets + // +optional 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 + // More info: http://kubernetes.io/docs/user-guide/secrets#manually-specifying-an-imagepullsecret + // +optional ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" protobuf:"bytes,3,rep,name=imagePullSecrets"` + + // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. + // Can be overridden at the pod level. + // +optional + AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty" protobuf:"varint,4,opt,name=automountServiceAccountToken"` } // ServiceAccountList is a list of ServiceAccount objects type ServiceAccountList struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.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 @@ -2355,10 +3002,11 @@ type ServiceAccountList struct { // }, // ] type Endpoints struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // The set of all endpoints is the union of all subsets. Addresses are placed into // subsets according to the IPs they share. A single address with multiple ports, @@ -2383,12 +3031,15 @@ type Endpoints struct { type EndpointSubset struct { // IP addresses which offer the related ports that are marked as ready. These endpoints // should be considered safe for load balancers and clients to utilize. + // +optional Addresses []EndpointAddress `json:"addresses,omitempty" protobuf:"bytes,1,rep,name=addresses"` // IP addresses which offer the related ports but are not currently marked as ready // because they have not yet finished starting, have recently failed a readiness check, // or have recently failed a liveness check. + // +optional NotReadyAddresses []EndpointAddress `json:"notReadyAddresses,omitempty" protobuf:"bytes,2,rep,name=notReadyAddresses"` // Port numbers available on the related IP addresses. + // +optional Ports []EndpointPort `json:"ports,omitempty" protobuf:"bytes,3,rep,name=ports"` } @@ -2402,10 +3053,13 @@ type EndpointAddress struct { // TODO: This should allow hostname or IP, See #4447. IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"` // The Hostname of this endpoint + // +optional Hostname string `json:"hostname,omitempty" protobuf:"bytes,3,opt,name=hostname"` // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. + // +optional NodeName *string `json:"nodeName,omitempty" protobuf:"bytes,4,opt,name=nodeName"` // Reference to object providing the endpoint. + // +optional TargetRef *ObjectReference `json:"targetRef,omitempty" protobuf:"bytes,2,opt,name=targetRef"` } @@ -2414,6 +3068,7 @@ type EndpointPort struct { // The name of this port (corresponds to ServicePort.Name). // Must be a DNS_LABEL. // Optional only if one port is defined. + // +optional Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` // The port number of the endpoint. @@ -2422,15 +3077,17 @@ type EndpointPort struct { // The IP protocol for this port. // Must be UDP or TCP. // Default is TCP. + // +optional Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,3,opt,name=protocol,casttype=Protocol"` } // EndpointsList is a list of endpoints. type EndpointsList struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of endpoints. Items []Endpoints `json:"items" protobuf:"bytes,2,rep,name=items"` @@ -2439,15 +3096,22 @@ type EndpointsList struct { // NodeSpec describes the attributes that a node is created with. type NodeSpec struct { // PodCIDR represents the pod IP range assigned to the node. + // +optional PodCIDR string `json:"podCIDR,omitempty" protobuf:"bytes,1,opt,name=podCIDR"` // External ID of the node assigned by some machine database (e.g. a cloud provider). // Deprecated. + // +optional ExternalID string `json:"externalID,omitempty" protobuf:"bytes,2,opt,name=externalID"` // ID of the node assigned by the cloud provider in the format: :// + // +optional ProviderID string `json:"providerID,omitempty" protobuf:"bytes,3,opt,name=providerID"` // Unschedulable controls node schedulability of new pods. By default, node is schedulable. - // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration"` + // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration + // +optional Unschedulable bool `json:"unschedulable,omitempty" protobuf:"varint,4,opt,name=unschedulable"` + // If specified, the node's taints. + // +optional + Taints []Taint `json:"taints,omitempty" protobuf:"bytes,5,opt,name=taints"` } // DaemonEndpoint contains information about a single Daemon endpoint. @@ -2465,6 +3129,7 @@ type DaemonEndpoint struct { // NodeDaemonEndpoints lists ports opened by daemons running on the Node. type NodeDaemonEndpoints struct { // Endpoint on which Kubelet is listening. + // +optional KubeletEndpoint DaemonEndpoint `json:"kubeletEndpoint,omitempty" protobuf:"bytes,1,opt,name=kubeletEndpoint"` } @@ -2499,32 +3164,42 @@ type NodeSystemInfo struct { // 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. + // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#capacity for more details. + // +optional Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` // Allocatable represents the resources of a node that are available for scheduling. // Defaults to Capacity. + // +optional Allocatable ResourceList `json:"allocatable,omitempty" protobuf:"bytes,2,rep,name=allocatable,casttype=ResourceList,castkey=ResourceName"` // NodePhase is the recently observed lifecycle phase of the node. // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase // The field is never populated, and now is deprecated. + // +optional Phase NodePhase `json:"phase,omitempty" protobuf:"bytes,3,opt,name=phase,casttype=NodePhase"` // Conditions is an array of current observed node conditions. // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition + // +optional 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 + // +optional Addresses []NodeAddress `json:"addresses,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,5,rep,name=addresses"` // Endpoints of daemons running on the Node. + // +optional DaemonEndpoints NodeDaemonEndpoints `json:"daemonEndpoints,omitempty" protobuf:"bytes,6,opt,name=daemonEndpoints"` // Set of ids/uuids to uniquely identify the node. // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-info + // +optional NodeInfo NodeSystemInfo `json:"nodeInfo,omitempty" protobuf:"bytes,7,opt,name=nodeInfo"` // List of container images on this node + // +optional Images []ContainerImage `json:"images,omitempty" protobuf:"bytes,8,rep,name=images"` // List of attachable volumes in use (mounted) by the node. + // +optional VolumesInUse []UniqueVolumeName `json:"volumesInUse,omitempty" protobuf:"bytes,9,rep,name=volumesInUse"` // List of volumes that are attached to the node. + // +optional VolumesAttached []AttachedVolume `json:"volumesAttached,omitempty" protobuf:"bytes,10,rep,name=volumesAttached"` } @@ -2535,7 +3210,7 @@ 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 represents the device path where the volume should be available DevicePath string `json:"devicePath" protobuf:"bytes,2,rep,name=devicePath"` } @@ -2545,6 +3220,7 @@ type AttachedVolume struct { type AvoidPods struct { // Bounded-sized list of signatures of pods that should avoid this node, sorted // in timestamp order from oldest to newest. Size of the slice is unspecified. + // +optional PreferAvoidPods []PreferAvoidPodsEntry `json:"preferAvoidPods,omitempty" protobuf:"bytes,1,rep,name=preferAvoidPods"` } @@ -2553,10 +3229,13 @@ type PreferAvoidPodsEntry struct { // The class of pods. PodSignature PodSignature `json:"podSignature" protobuf:"bytes,1,opt,name=podSignature"` // Time at which this entry was added to the list. - EvictionTime unversioned.Time `json:"evictionTime,omitempty" protobuf:"bytes,2,opt,name=evictionTime"` + // +optional + EvictionTime metav1.Time `json:"evictionTime,omitempty" protobuf:"bytes,2,opt,name=evictionTime"` // (brief) reason why this entry was added to the list. + // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` // Human readable message indicating why this entry was added to the list. + // +optional Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"` } @@ -2564,7 +3243,8 @@ type PreferAvoidPodsEntry struct { // Exactly one field should be set. type PodSignature struct { // Reference to controller whose pods should avoid this node. - PodController *OwnerReference `json:"podController,omitempty" protobuf:"bytes,1,opt,name=podController"` + // +optional + PodController *metav1.OwnerReference `json:"podController,omitempty" protobuf:"bytes,1,opt,name=podController"` } // Describe a container image @@ -2573,6 +3253,7 @@ type ContainerImage struct { // e.g. ["gcr.io/google_containers/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"] Names []string `json:"names" protobuf:"bytes,1,rep,name=names"` // The size of the image in bytes. + // +optional SizeBytes int64 `json:"sizeBytes,omitempty" protobuf:"varint,2,opt,name=sizeBytes"` } @@ -2605,6 +3286,8 @@ const ( NodeDiskPressure NodeConditionType = "DiskPressure" // NodeNetworkUnavailable means that network for the node is not correctly configured. NodeNetworkUnavailable NodeConditionType = "NetworkUnavailable" + // NodeInodePressure means the kubelet is under pressure due to insufficient available inodes. + NodeInodePressure NodeConditionType = "InodePressure" ) // NodeCondition contains condition information for a node. @@ -2614,12 +3297,16 @@ type NodeCondition struct { // 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"` + // +optional + LastHeartbeatTime metav1.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"` + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` // (brief) reason for the condition's last transition. + // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` // Human readable message indicating details about last transition. + // +optional Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` } @@ -2627,9 +3314,13 @@ type NodeAddressType string // These are valid address type of node. const ( - NodeHostName NodeAddressType = "Hostname" - NodeExternalIP NodeAddressType = "ExternalIP" - NodeInternalIP NodeAddressType = "InternalIP" + // Deprecated: NodeLegacyHostIP will be removed in 1.7. + NodeLegacyHostIP NodeAddressType = "LegacyHostIP" + NodeHostName NodeAddressType = "Hostname" + NodeExternalIP NodeAddressType = "ExternalIP" + NodeInternalIP NodeAddressType = "InternalIP" + NodeExternalDNS NodeAddressType = "ExternalDNS" + NodeInternalDNS NodeAddressType = "InternalDNS" ) // NodeAddress contains information for the node's address. @@ -2660,6 +3351,11 @@ const ( // Number of Pods that may be running on this Node: see ResourcePods ) +const ( + // Namespace prefix for opaque counted resources (alpha). + ResourceOpaqueIntPrefix = "pod.alpha.kubernetes.io/opaque-int-resource-" +) + // ResourceList is a set of (resource name, quantity) pairs. type ResourceList map[ResourceName]resource.Quantity @@ -2669,36 +3365,42 @@ type ResourceList map[ResourceName]resource.Quantity // Node is a worker node in Kubernetes. // Each node will have a unique identifier in the cache (i.e. in etcd). type Node struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.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 + // +optional Spec NodeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Most recently observed status of the node. // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Status NodeStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // NodeList is the whole list of all Nodes which have been registered with master. type NodeList struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of nodes Items []Node `json:"items" protobuf:"bytes,2,rep,name=items"` } +// FinalizerName is the name identifying a finalizer during namespace lifecycle. type FinalizerName string -// These are internal finalizer values to Kubernetes, must be qualified name unless defined here +// These are internal finalizer values to Kubernetes, must be qualified name unless defined here or +// in metav1. const ( FinalizerKubernetes FinalizerName = "kubernetes" ) @@ -2707,6 +3409,7 @@ const ( 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 + // +optional Finalizers []FinalizerName `json:"finalizers,omitempty" protobuf:"bytes,1,rep,name=finalizers,casttype=FinalizerName"` } @@ -2714,6 +3417,7 @@ type NamespaceSpec struct { type NamespaceStatus struct { // Phase is the current lifecycle phase of the namespace. // More info: http://releases.k8s.io/HEAD/docs/design/namespaces.md#phases + // +optional Phase NamespacePhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=NamespacePhase"` } @@ -2733,128 +3437,172 @@ const ( // Namespace provides a scope for Names. // Use of multiple namespaces is optional. type Namespace struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.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 + // +optional 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 + // +optional Status NamespaceStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // NamespaceList is a list of Namespaces. type NamespaceList struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.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 + // More info: http://kubernetes.io/docs/user-guide/namespaces Items []Namespace `json:"items" protobuf:"bytes,2,rep,name=items"` } // Binding ties one object to another. // For example, a pod is bound to a node by a scheduler. type Binding struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // The target object that you want to bind to the standard object. Target ObjectReference `json:"target" protobuf:"bytes,2,opt,name=target"` } // Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. +// +k8s:openapi-gen=false type Preconditions struct { // Specifies the target UID. - UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` + // +optional + UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` } +// DeletionPropagation decides if a deletion will propagate to the dependents of the object, and how the garbage collector will handle the propagation. +type DeletionPropagation string + +const ( + // Orphans the dependents. + DeletePropagationOrphan DeletionPropagation = "Orphan" + // Deletes the object from the key-value store, the garbage collector will delete the dependents in the background. + DeletePropagationBackground DeletionPropagation = "Background" + // The object exists in the key-value store until the garbage collector deletes all the dependents whose ownerReference.blockOwnerDeletion=true from the key-value store. + // API sever will put the "DeletingDependents" finalizer on the object, and sets its deletionTimestamp. + // This policy is cascading, i.e., the dependents will be deleted with Foreground. + DeletePropagationForeground DeletionPropagation = "Foreground" +) + // DeleteOptions may be provided when deleting an API object +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. +// +k8s:openapi-gen=false type DeleteOptions struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // The duration in seconds before the object should be deleted. Value must be non-negative integer. // The value zero indicates delete immediately. If this value is nil, the default grace period for the // specified type will be used. // Defaults to a per object value if not specified. zero means delete immediately. + // +optional GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty" protobuf:"varint,1,opt,name=gracePeriodSeconds"` // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be // returned. + // +optional Preconditions *Preconditions `json:"preconditions,omitempty" protobuf:"bytes,2,opt,name=preconditions"` + // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. // Should the dependent objects be orphaned. If true/false, the "orphan" // finalizer will be added to/removed from the object's finalizers list. + // Either this field or PropagationPolicy may be set, but not both. + // +optional OrphanDependents *bool `json:"orphanDependents,omitempty" protobuf:"varint,3,opt,name=orphanDependents"` -} -// 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"` + // Whether and how garbage collection will be performed. + // Either this field or OrphanDependents may be set, but not both. + // The default policy is decided by the existing finalizer set in the + // metadata.finalizers and the resource-specific default policy. + // +optional + PropagationPolicy *DeletionPropagation `protobuf:"bytes,4,opt,name=propagationPolicy,casttype=DeletionPropagation"` } // ListOptions is the query options to a standard REST list call. +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. +// +k8s:openapi-gen=false type ListOptions struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // A selector to restrict the list of returned objects by their labels. // Defaults to everything. + // +optional LabelSelector string `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"` // A selector to restrict the list of returned objects by their fields. // Defaults to everything. + // +optional FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"` // Watch for changes to the described resources and return them as a stream of // add, update, and remove notifications. Specify resourceVersion. + // +optional Watch bool `json:"watch,omitempty" protobuf:"varint,3,opt,name=watch"` // When specified with a watch call, shows changes that occur after that particular version of a resource. // Defaults to changes from the beginning of history. + // When specified for list: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + // +optional ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"` // Timeout for the list/watch call. + // +optional TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,5,opt,name=timeoutSeconds"` } // PodLogOptions is the query options for a Pod's logs REST call. type PodLogOptions struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // The container for which to stream logs. Defaults to only container if there is one container in the pod. + // +optional Container string `json:"container,omitempty" protobuf:"bytes,1,opt,name=container"` // Follow the log stream of the pod. Defaults to false. + // +optional Follow bool `json:"follow,omitempty" protobuf:"varint,2,opt,name=follow"` // Return previous terminated container logs. Defaults to false. + // +optional Previous bool `json:"previous,omitempty" protobuf:"varint,3,opt,name=previous"` // A relative time in seconds before the current time from which to show logs. If this value // precedes the time a pod was started, only logs since the pod start will be returned. // If this value is in the future, no logs will be returned. // Only one of sinceSeconds or sinceTime may be specified. + // +optional SinceSeconds *int64 `json:"sinceSeconds,omitempty" protobuf:"varint,4,opt,name=sinceSeconds"` // An RFC3339 timestamp from which to show logs. If this value // precedes the time a pod was started, only logs since the pod start will be returned. // If this value is in the future, no logs will be returned. // Only one of sinceSeconds or sinceTime may be specified. - SinceTime *unversioned.Time `json:"sinceTime,omitempty" protobuf:"bytes,5,opt,name=sinceTime"` + // +optional + SinceTime *metav1.Time `json:"sinceTime,omitempty" protobuf:"bytes,5,opt,name=sinceTime"` // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line // of log output. Defaults to false. + // +optional Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"` // If set, the number of lines from the end of the logs to show. If not specified, // logs are shown from the creation of the container or sinceSeconds or sinceTime + // +optional TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"` // If set, the number of bytes to read from the server before terminating the // log output. This may not display a complete final line of logging, and may return // slightly more or slightly less than the specified limit. + // +optional LimitBytes *int64 `json:"limitBytes,omitempty" protobuf:"varint,8,opt,name=limitBytes"` } @@ -2863,28 +3611,33 @@ type PodLogOptions struct { // 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"` + metav1.TypeMeta `json:",inline"` // Stdin if true, redirects the standard input stream of the pod for this call. // Defaults to false. + // +optional Stdin bool `json:"stdin,omitempty" protobuf:"varint,1,opt,name=stdin"` // Stdout if true indicates that stdout is to be redirected for the attach call. // Defaults to true. + // +optional Stdout bool `json:"stdout,omitempty" protobuf:"varint,2,opt,name=stdout"` // Stderr if true indicates that stderr is to be redirected for the attach call. // Defaults to true. + // +optional Stderr bool `json:"stderr,omitempty" protobuf:"varint,3,opt,name=stderr"` // TTY if true indicates that a tty will be allocated for the attach call. // This is passed through the container runtime so the tty // is allocated on the worker node by the container runtime. // Defaults to false. + // +optional TTY bool `json:"tty,omitempty" protobuf:"varint,4,opt,name=tty"` // The container in which to execute the command. // Defaults to only container if there is only one container in the pod. + // +optional Container string `json:"container,omitempty" protobuf:"bytes,5,opt,name=container"` } @@ -2893,97 +3646,107 @@ type PodAttachOptions struct { // 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"` + metav1.TypeMeta `json:",inline"` // Redirect the standard input stream of the pod for this call. // Defaults to false. + // +optional Stdin bool `json:"stdin,omitempty" protobuf:"varint,1,opt,name=stdin"` // Redirect the standard output stream of the pod for this call. // Defaults to true. + // +optional Stdout bool `json:"stdout,omitempty" protobuf:"varint,2,opt,name=stdout"` // Redirect the standard error stream of the pod for this call. // Defaults to true. + // +optional Stderr bool `json:"stderr,omitempty" protobuf:"varint,3,opt,name=stderr"` // TTY if true indicates that a tty will be allocated for the exec call. // Defaults to false. + // +optional TTY bool `json:"tty,omitempty" protobuf:"varint,4,opt,name=tty"` // Container in which to execute the command. // Defaults to only container if there is only one container in the pod. + // +optional Container string `json:"container,omitempty" protobuf:"bytes,5,opt,name=container"` // Command is the remote command to execute. argv array. Not executed within a shell. Command []string `json:"command" protobuf:"bytes,6,rep,name=command"` } +// PodPortForwardOptions is the query options to a Pod's port forward call +// when using WebSockets. +// The `port` query parameter must specify the port or +// ports (comma separated) to forward over. +// Port forwarding over SPDY does not use these options. It requires the port +// to be passed in the `port` header as part of request. +type PodPortForwardOptions struct { + metav1.TypeMeta `json:",inline"` + + // List of ports to forward + // Required when using WebSockets + // +optional + Ports []int32 `json:"ports,omitempty" protobuf:"varint,1,rep,name=ports"` +} + // PodProxyOptions is the query options to a Pod's proxy call. type PodProxyOptions struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Path is the URL path to use for the current proxy request to pod. + // +optional Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` } // NodeProxyOptions is the query options to a Node's proxy call. type NodeProxyOptions struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Path is the URL path to use for the current proxy request to node. + // +optional Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` } // ServiceProxyOptions is the query options to a Service's proxy call. type ServiceProxyOptions struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Path is the part of URLs that include service endpoints, suffixes, // and parameters to use for the current proxy request to service. // For example, the whole request URL is // http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. // Path is _search?q=user:kimchy. + // +optional Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` } -// 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 + // +optional 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 + // More info: http://kubernetes.io/docs/user-guide/namespaces + // +optional 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 + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + // +optional 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"` + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional + UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` // API version of the referent. + // +optional APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,5,opt,name=apiVersion"` // Specific resourceVersion to which this reference is made, if any. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + // +optional ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"` // If referring to a piece of an object instead of an entire object, this string @@ -2994,6 +3757,7 @@ type ObjectReference struct { // index 2 in this pod). This syntax is chosen only to have some well-defined way of // referencing a part of an object. // TODO: this design is not final and this field is subject to change in the future. + // +optional FieldPath string `json:"fieldPath,omitempty" protobuf:"bytes,7,opt,name=fieldPath"` } @@ -3001,23 +3765,27 @@ type ObjectReference struct { // 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 + // More info: http://kubernetes.io/docs/user-guide/identifiers#names // TODO: Add other useful fields. apiVersion, kind, uid? + // +optional Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` } // SerializedReference is a reference to serialized object. type SerializedReference struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // The reference to an object in the system. + // +optional Reference ObjectReference `json:"reference,omitempty" protobuf:"bytes,1,opt,name=reference"` } // EventSource contains information for an event. type EventSource struct { // Component from which the event is generated. + // +optional Component string `json:"component,omitempty" protobuf:"bytes,1,opt,name=component"` // Node name on which the event is generated. + // +optional Host string `json:"host,omitempty" protobuf:"bytes,2,opt,name=host"` } @@ -3034,10 +3802,10 @@ const ( // 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"` + metav1.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"` + metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` // The object that this event is about. InvolvedObject ObjectReference `json:"involvedObject" protobuf:"bytes,2,opt,name=involvedObject"` @@ -3045,34 +3813,42 @@ type Event struct { // This should be a short, machine understandable string that gives the reason // for the transition into the object's current status. // TODO: provide exact specification for format. + // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` // A human-readable description of the status of this operation. // TODO: decide on maximum length. + // +optional Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"` // The component reporting this event. Should be a short machine understandable string. + // +optional Source EventSource `json:"source,omitempty" protobuf:"bytes,5,opt,name=source"` // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) - FirstTimestamp unversioned.Time `json:"firstTimestamp,omitempty" protobuf:"bytes,6,opt,name=firstTimestamp"` + // +optional + FirstTimestamp metav1.Time `json:"firstTimestamp,omitempty" protobuf:"bytes,6,opt,name=firstTimestamp"` // The time at which the most recent occurrence of this event was recorded. - LastTimestamp unversioned.Time `json:"lastTimestamp,omitempty" protobuf:"bytes,7,opt,name=lastTimestamp"` + // +optional + LastTimestamp metav1.Time `json:"lastTimestamp,omitempty" protobuf:"bytes,7,opt,name=lastTimestamp"` // The number of times this event has occurred. + // +optional Count int32 `json:"count,omitempty" protobuf:"varint,8,opt,name=count"` // Type of this event (Normal, Warning), new types could be added in the future + // +optional Type string `json:"type,omitempty" protobuf:"bytes,9,opt,name=type"` } // EventList is a list of events. type EventList struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of events Items []Event `json:"items" protobuf:"bytes,2,rep,name=items"` @@ -3080,10 +3856,11 @@ type EventList struct { // List holds a list of objects, which may not be known by the server. type List struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of objects Items []runtime.RawExtension `json:"items" protobuf:"bytes,2,rep,name=items"` @@ -3097,21 +3874,29 @@ const ( LimitTypePod LimitType = "Pod" // Limit that applies to all containers in a namespace LimitTypeContainer LimitType = "Container" + // Limit that applies to all persistent volume claims in a namespace + LimitTypePersistentVolumeClaim LimitType = "PersistentVolumeClaim" ) // LimitRangeItem defines a min/max usage limit for any resource that matches on kind. type LimitRangeItem struct { // Type of resource that this limit applies to. + // +optional Type LimitType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=LimitType"` // Max usage constraints on this kind by resource name. + // +optional Max ResourceList `json:"max,omitempty" protobuf:"bytes,2,rep,name=max,casttype=ResourceList,castkey=ResourceName"` // Min usage constraints on this kind by resource name. + // +optional Min ResourceList `json:"min,omitempty" protobuf:"bytes,3,rep,name=min,casttype=ResourceList,castkey=ResourceName"` // Default resource requirement limit value by resource name if resource limit is omitted. + // +optional Default ResourceList `json:"default,omitempty" protobuf:"bytes,4,rep,name=default,casttype=ResourceList,castkey=ResourceName"` // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. + // +optional DefaultRequest ResourceList `json:"defaultRequest,omitempty" protobuf:"bytes,5,rep,name=defaultRequest,casttype=ResourceList,castkey=ResourceName"` // MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource. + // +optional MaxLimitRequestRatio ResourceList `json:"maxLimitRequestRatio,omitempty" protobuf:"bytes,6,rep,name=maxLimitRequestRatio,casttype=ResourceList,castkey=ResourceName"` } @@ -3125,22 +3910,25 @@ type LimitRangeSpec struct { // LimitRange sets resource usage limits for each kind of resource in a Namespace. type LimitRange struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.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 + // +optional 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"` + metav1.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"` + // +optional + metav1.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 @@ -3197,9 +3985,11 @@ const ( 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 + // +optional Hard ResourceList `json:"hard,omitempty" protobuf:"bytes,1,rep,name=hard,casttype=ResourceList,castkey=ResourceName"` // A collection of filters that must match each object tracked by a quota. // If not specified, the quota matches all objects. + // +optional Scopes []ResourceQuotaScope `json:"scopes,omitempty" protobuf:"bytes,2,rep,name=scopes,casttype=ResourceQuotaScope"` } @@ -3207,8 +3997,10 @@ type ResourceQuotaSpec struct { 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 + // +optional Hard ResourceList `json:"hard,omitempty" protobuf:"bytes,1,rep,name=hard,casttype=ResourceList,castkey=ResourceName"` // Used is the current observed total usage of the resource in the namespace. + // +optional Used ResourceList `json:"used,omitempty" protobuf:"bytes,2,rep,name=used,casttype=ResourceList,castkey=ResourceName"` } @@ -3216,26 +4008,30 @@ type ResourceQuotaStatus struct { // ResourceQuota sets aggregate quota restrictions enforced per namespace type ResourceQuota struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.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 + // +optional 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 + // +optional 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"` + metav1.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"` + // +optional + metav1.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 @@ -3247,16 +4043,18 @@ type ResourceQuotaList struct { // 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"` + metav1.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"` + // +optional + metav1.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 + // +optional Data map[string][]byte `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"` // stringData allows specifying non-binary secret data in string form. @@ -3264,9 +4062,11 @@ type Secret struct { // All keys and values are merged into the data field on write, overwriting any existing values. // It is never output when reading from the API. // +k8s:conversion-gen=false + // +optional StringData map[string]string `json:"stringData,omitempty" protobuf:"bytes,4,rep,name=stringData"` // Used to facilitate programmatic handling of secret data. + // +optional Type SecretType `json:"type,omitempty" protobuf:"bytes,3,opt,name=type,casttype=SecretType"` } @@ -3308,6 +4108,35 @@ const ( // 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. @@ -3326,13 +4155,14 @@ const ( // SecretList is a list of Secret. type SecretList struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.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 + // More info: http://kubernetes.io/docs/user-guide/secrets Items []Secret `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -3340,22 +4170,25 @@ type SecretList struct { // ConfigMap holds configuration data for pods to consume. type ConfigMap struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.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. + // +optional Data map[string]string `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"` } // ConfigMapList is a resource containing a list of ConfigMap objects. type ConfigMapList struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is the list of ConfigMaps. Items []ConfigMap `json:"items" protobuf:"bytes,2,rep,name=items"` @@ -3379,9 +4212,11 @@ type ComponentCondition struct { Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` // Message about the condition for a component. // For example, information about a health check. + // +optional Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` // Condition error code for a component. // For example, a health check error code. + // +optional Error string `json:"error,omitempty" protobuf:"bytes,4,opt,name=error"` } @@ -3390,21 +4225,24 @@ type ComponentCondition struct { // ComponentStatus (and ComponentStatusList) holds the cluster validation info. type ComponentStatus struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of component conditions observed + // +optional 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"` + metav1.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"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ComponentStatus objects. Items []ComponentStatus `json:"items" protobuf:"bytes,2,rep,name=items"` @@ -3414,12 +4252,14 @@ type ComponentStatusList struct { // Downward API volumes support ownership management and SELinux relabeling. type DownwardAPIVolumeSource struct { // Items is a list of downward API volume file + // +optional Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"` // Optional: mode bits to use on created files by default. Must be a // value between 0 and 0777. Defaults to 0644. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. + // +optional DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,2,opt,name=defaultMode"` } @@ -3432,37 +4272,53 @@ type DownwardAPIVolumeFile struct { // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' Path string `json:"path" protobuf:"bytes,1,opt,name=path"` // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + // +optional FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,2,opt,name=fieldRef"` // Selects a resource of the container: only resources limits and requests // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + // +optional ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,3,opt,name=resourceFieldRef"` // Optional: mode bits to use on this file, must be a value between 0 // and 0777. If not specified, the volume defaultMode will be used. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. + // +optional Mode *int32 `json:"mode,omitempty" protobuf:"varint,4,opt,name=mode"` } +// Represents downward API info for projecting into a projected volume. +// Note that this is identical to a downwardAPI volume source without the default +// mode. +type DownwardAPIProjection struct { + // Items is a list of DownwardAPIVolume file + // +optional + Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"` +} + // SecurityContext holds security configuration that will be applied to a container. // Some fields are present in both SecurityContext and PodSecurityContext. When both // are set, the values in SecurityContext take precedence. type SecurityContext struct { // The capabilities to add/drop when running containers. // Defaults to the default set of capabilities granted by the container runtime. + // +optional Capabilities *Capabilities `json:"capabilities,omitempty" protobuf:"bytes,1,opt,name=capabilities"` // Run container in privileged mode. // Processes in privileged containers are essentially equivalent to root on the host. // Defaults to false. + // +optional Privileged *bool `json:"privileged,omitempty" protobuf:"varint,2,opt,name=privileged"` // The SELinux context to be applied to the container. // If unspecified, the container runtime will allocate a random SELinux context for each // container. May also be set in PodSecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,3,opt,name=seLinuxOptions"` // The UID to run the entrypoint of the container process. // Defaults to user specified in image metadata if unspecified. // May also be set in PodSecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional RunAsUser *int64 `json:"runAsUser,omitempty" protobuf:"varint,4,opt,name=runAsUser"` // Indicates that the container must run as a non-root user. // If true, the Kubelet will validate the image at runtime to ensure that it @@ -3470,30 +4326,37 @@ type SecurityContext struct { // If unset or false, no such validation will be performed. // May also be set in PodSecurityContext. If set in both SecurityContext and // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" protobuf:"varint,5,opt,name=runAsNonRoot"` // Whether this container has a read-only root filesystem. // Default is false. + // +optional ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty" protobuf:"varint,6,opt,name=readOnlyRootFilesystem"` } // SELinuxOptions are the labels to be applied to the container type SELinuxOptions struct { // User is a SELinux user label that applies to the container. + // +optional User string `json:"user,omitempty" protobuf:"bytes,1,opt,name=user"` // Role is a SELinux role label that applies to the container. + // +optional Role string `json:"role,omitempty" protobuf:"bytes,2,opt,name=role"` // Type is a SELinux type label that applies to the container. + // +optional Type string `json:"type,omitempty" protobuf:"bytes,3,opt,name=type"` // Level is SELinux level label that applies to the container. + // +optional Level string `json:"level,omitempty" protobuf:"bytes,4,opt,name=level"` } // RangeAllocation is not a public type. type RangeAllocation struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Range is string that identifies the range represented by 'data'. Range string `json:"range" protobuf:"bytes,2,opt,name=range"` @@ -3504,4 +4367,14 @@ type RangeAllocation struct { 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 = metav1.LabelHostname + "," + metav1.LabelZoneFailureDomain + "," + metav1.LabelZoneRegion ) diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/v1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go similarity index 75% rename from vendor/k8s.io/client-go/1.5/pkg/api/v1/types_swagger_doc_generated.go rename to vendor/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go index d9180625e..75416d59a 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go @@ -29,10 +29,10 @@ package v1 // 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", + "volumeID": "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore", + "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore", "partition": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).", - "readOnly": "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore", + "readOnly": "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore", } func (AWSElasticBlockStoreVolumeSource) SwaggerDoc() map[string]string { @@ -53,7 +53,7 @@ func (Affinity) SwaggerDoc() map[string]string { 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", + "devicePath": "DevicePath represents the device path where the volume should be available", } func (AttachedVolume) SwaggerDoc() map[string]string { @@ -180,9 +180,19 @@ func (ConfigMap) SwaggerDoc() map[string]string { return map_ConfigMap } +var map_ConfigMapEnvSource = map[string]string{ + "": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "optional": "Specify whether the ConfigMap must be defined", +} + +func (ConfigMapEnvSource) SwaggerDoc() map[string]string { + return map_ConfigMapEnvSource +} + var map_ConfigMapKeySelector = map[string]string{ - "": "Selects a key from a ConfigMap.", - "key": "The key to select.", + "": "Selects a key from a ConfigMap.", + "key": "The key to select.", + "optional": "Specify whether the ConfigMap or it's key must be defined", } func (ConfigMapKeySelector) SwaggerDoc() map[string]string { @@ -199,10 +209,21 @@ func (ConfigMapList) SwaggerDoc() map[string]string { return map_ConfigMapList } +var map_ConfigMapProjection = map[string]string{ + "": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + "items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "optional": "Specify whether the ConfigMap or it's keys must be defined", +} + +func (ConfigMapProjection) SwaggerDoc() map[string]string { + return map_ConfigMapProjection +} + var map_ConfigMapVolumeSource = map[string]string{ "": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.", - "items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.", + "items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", "defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "optional": "Specify whether the ConfigMap or it's keys must be defined", } func (ConfigMapVolumeSource) SwaggerDoc() map[string]string { @@ -210,25 +231,27 @@ func (ConfigMapVolumeSource) SwaggerDoc() map[string]string { } 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.", + "": "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://kubernetes.io/docs/user-guide/images", + "command": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#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://kubernetes.io/docs/user-guide/containers#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.", + "envFrom": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + "env": "List of environment variables to set in the container. Cannot be updated.", + "resources": "Compute Resources required by this container. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources", + "volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.", + "livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#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://kubernetes.io/docs/user-guide/pod-states#container-probes", + "lifecycle": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", + "terminationMessagePath": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + "terminationMessagePolicy": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + "imagePullPolicy": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/images#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 { @@ -310,9 +333,9 @@ var map_ContainerStatus = map[string]string{ "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", + "image": "The image the container is running. More info: http://kubernetes.io/docs/user-guide/images", "imageID": "ImageID of the container's image.", - "containerID": "Container's ID in the format 'docker://'. More info: http://releases.k8s.io/HEAD/docs/user-guide/container-environment.md#container-information", + "containerID": "Container's ID in the format 'docker://'. More info: http://kubernetes.io/docs/user-guide/container-environment#container-information", } func (ContainerStatus) SwaggerDoc() map[string]string { @@ -329,16 +352,26 @@ func (DaemonEndpoint) SwaggerDoc() map[string]string { } var map_DeleteOptions = map[string]string{ - "": "DeleteOptions may be provided when deleting an API object", + "": "DeleteOptions may be provided when deleting an API object DEPRECATED: This type has been moved to meta/v1 and will be removed soon.", "gracePeriodSeconds": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "preconditions": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", - "orphanDependents": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "orphanDependents": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "PropagationPolicy": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", } func (DeleteOptions) SwaggerDoc() map[string]string { return map_DeleteOptions } +var map_DownwardAPIProjection = map[string]string{ + "": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", + "items": "Items is a list of DownwardAPIVolume file", +} + +func (DownwardAPIProjection) SwaggerDoc() map[string]string { + return map_DownwardAPIProjection +} + var map_DownwardAPIVolumeFile = map[string]string{ "": "DownwardAPIVolumeFile represents information to create the file containing the pod field", "path": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", @@ -363,7 +396,7 @@ func (DownwardAPIVolumeSource) SwaggerDoc() map[string]string { 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", + "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://kubernetes.io/docs/user-guide/volumes#emptydir", } func (EmptyDirVolumeSource) SwaggerDoc() map[string]string { @@ -424,6 +457,17 @@ func (EndpointsList) SwaggerDoc() map[string]string { return map_EndpointsList } +var map_EnvFromSource = map[string]string{ + "": "EnvFromSource represents the source of a set of ConfigMaps", + "prefix": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", + "configMapRef": "The ConfigMap to select from", + "secretRef": "The Secret to select from", +} + +func (EnvFromSource) SwaggerDoc() map[string]string { + return map_EnvFromSource +} + var map_EnvVar = map[string]string{ "": "EnvVar represents an environment variable present in a Container.", "name": "Name of the environment variable. Must be a C_IDENTIFIER.", @@ -493,16 +537,6 @@ 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 worldwide names (WWNs)", @@ -529,8 +563,9 @@ func (FlexVolumeSource) SwaggerDoc() map[string]string { } 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", + "": "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.", + "datasetName": "Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated", + "datasetUUID": "UUID of the dataset. This is unique identifier of a Flocker dataset", } func (FlockerVolumeSource) SwaggerDoc() map[string]string { @@ -539,10 +574,10 @@ func (FlockerVolumeSource) SwaggerDoc() map[string]string { 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", + "pdName": "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk", + "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk", + "partition": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk", + "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk", } func (GCEPersistentDiskVolumeSource) SwaggerDoc() map[string]string { @@ -607,7 +642,7 @@ func (Handler) SwaggerDoc() map[string]string { 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", + "path": "Path of the directory on the host. More info: http://kubernetes.io/docs/user-guide/volumes#hostpath", } func (HostPathVolumeSource) SwaggerDoc() map[string]string { @@ -620,8 +655,9 @@ var map_ISCSIVolumeSource = map[string]string{ "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", + "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://kubernetes.io/docs/user-guide/volumes#iscsi", "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", + "portals": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", } func (ISCSIVolumeSource) SwaggerDoc() map[string]string { @@ -641,8 +677,8 @@ func (KeyToPath) SwaggerDoc() map[string]string { 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", + "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://kubernetes.io/docs/user-guide/container-environment#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://kubernetes.io/docs/user-guide/container-environment#hook-details", } func (Lifecycle) SwaggerDoc() map[string]string { @@ -703,11 +739,11 @@ func (List) SwaggerDoc() map[string]string { } var map_ListOptions = map[string]string{ - "": "ListOptions is the query options to a standard REST list call.", + "": "ListOptions is the query options to a standard REST list call. DEPRECATED: This type has been moved to meta/v1 and will be removed soon.", "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "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.", + "resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "timeoutSeconds": "Timeout for the list/watch call.", } @@ -736,7 +772,7 @@ func (LoadBalancerStatus) SwaggerDoc() map[string]string { 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", + "name": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", } func (LocalObjectReference) SwaggerDoc() map[string]string { @@ -745,9 +781,9 @@ func (LocalObjectReference) SwaggerDoc() map[string]string { 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", + "server": "Server is the hostname or IP address of the NFS server. More info: http://kubernetes.io/docs/user-guide/volumes#nfs", + "path": "Path that is exported by the NFS server. More info: http://kubernetes.io/docs/user-guide/volumes#nfs", + "readOnly": "ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: http://kubernetes.io/docs/user-guide/volumes#nfs", } func (NFSVolumeSource) SwaggerDoc() map[string]string { @@ -768,7 +804,7 @@ func (Namespace) SwaggerDoc() map[string]string { 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", + "items": "Items is the list of Namespace objects in the list. More info: http://kubernetes.io/docs/user-guide/namespaces", } func (NamespaceList) SwaggerDoc() map[string]string { @@ -794,7 +830,7 @@ func (NamespaceStatus) SwaggerDoc() map[string]string { } var map_Node = map[string]string{ - "": "Node is a worker node in Kubernetes.", + "": "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).", "metadata": "Standard object's metadata. More info: 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", @@ -900,7 +936,8 @@ var map_NodeSpec = map[string]string{ "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: ://", - "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\"`", + "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", + "taints": "If specified, the node's taints.", } func (NodeSpec) SwaggerDoc() map[string]string { @@ -909,7 +946,7 @@ func (NodeSpec) SwaggerDoc() map[string]string { 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.", + "capacity": "Capacity represents the total resources of a node. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#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 The field is never populated, and now is deprecated.", "conditions": "Conditions is an array of current observed node conditions. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition", @@ -954,19 +991,19 @@ func (ObjectFieldSelector) SwaggerDoc() map[string]string { } 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", + "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon.", + "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: 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", + "namespace": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.", - "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids", + "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", "resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: 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", + "deletionTimestamp": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: 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", + "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", "ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", "finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", "clusterName": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", @@ -979,9 +1016,9 @@ func (ObjectMeta) SwaggerDoc() map[string]string { 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", + "namespace": "Namespace of the referent. More info: http://kubernetes.io/docs/user-guide/namespaces", + "name": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "uid": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", "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.", @@ -991,24 +1028,11 @@ 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", + "": "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: http://kubernetes.io/docs/user-guide/persistent-volumes", "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", + "spec": "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistent-volumes", + "status": "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistent-volumes", } func (PersistentVolume) SwaggerDoc() map[string]string { @@ -1018,8 +1042,8 @@ func (PersistentVolume) SwaggerDoc() map[string]string { 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", + "spec": "Spec defines the desired characteristics of a volume requested by a pod author. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims", + "status": "Status represents the current information/status of a persistent volume claim. Read-only. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims", } func (PersistentVolumeClaim) SwaggerDoc() map[string]string { @@ -1029,7 +1053,7 @@ func (PersistentVolumeClaim) SwaggerDoc() map[string]string { 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", + "items": "A list of persistent volume claims. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims", } func (PersistentVolumeClaimList) SwaggerDoc() map[string]string { @@ -1037,11 +1061,12 @@ func (PersistentVolumeClaimList) SwaggerDoc() map[string]string { } 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.", + "": "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://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1", + "selector": "A label query over volumes to consider for binding.", + "resources": "Resources represents the minimum resources the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources", + "volumeName": "VolumeName is the binding reference to the PersistentVolume backing this claim.", + "storageClassName": "Name of the StorageClass required by the claim. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1", } func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string { @@ -1051,7 +1076,7 @@ func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string { 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", + "accessModes": "AccessModes contains the actual access modes the volume backing the PVC has. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1", "capacity": "Represents the actual resources of the underlying volume.", } @@ -1061,7 +1086,7 @@ func (PersistentVolumeClaimStatus) SwaggerDoc() map[string]string { 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", + "claimName": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims", "readOnly": "Will force the ReadOnly setting in VolumeMounts. Default false.", } @@ -1072,7 +1097,7 @@ func (PersistentVolumeClaimVolumeSource) SwaggerDoc() map[string]string { 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", + "items": "List of persistent volumes. More info: http://kubernetes.io/docs/user-guide/persistent-volumes", } func (PersistentVolumeList) SwaggerDoc() map[string]string { @@ -1081,11 +1106,11 @@ func (PersistentVolumeList) SwaggerDoc() map[string]string { 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", + "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://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk", + "awsElasticBlockStore": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore", + "hostPath": "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: http://kubernetes.io/docs/user-guide/volumes#hostpath", "glusterfs": "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: 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", + "nfs": "NFS represents an NFS mount on the host. Provisioned by an admin. More info: http://kubernetes.io/docs/user-guide/volumes#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", @@ -1097,6 +1122,9 @@ var map_PersistentVolumeSource = map[string]string{ "vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", "quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", "azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "photonPersistentDisk": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", } func (PersistentVolumeSource) SwaggerDoc() map[string]string { @@ -1105,10 +1133,11 @@ func (PersistentVolumeSource) SwaggerDoc() map[string]string { 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. Recycling 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", + "capacity": "A description of the persistent volume's resources and capacity. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#capacity", + "accessModes": "AccessModes contains all ways the volume can be mounted. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes", + "claimRef": "ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#binding", + "persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy", + "storageClassName": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", } func (PersistentVolumeSpec) SwaggerDoc() map[string]string { @@ -1117,7 +1146,7 @@ func (PersistentVolumeSpec) SwaggerDoc() map[string]string { 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", + "phase": "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#phase", "message": "A human-readable message indicating details about why the volume is in this state.", "reason": "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", } @@ -1126,6 +1155,16 @@ func (PersistentVolumeStatus) SwaggerDoc() map[string]string { return map_PersistentVolumeStatus } +var map_PhotonPersistentDiskVolumeSource = map[string]string{ + "": "Represents a Photon Controller persistent disk resource.", + "pdID": "ID that identifies Photon Controller persistent disk", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", +} + +func (PhotonPersistentDiskVolumeSource) SwaggerDoc() map[string]string { + return map_PhotonPersistentDiskVolumeSource +} + var map_Pod = map[string]string{ "": "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.", "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", @@ -1150,7 +1189,7 @@ func (PodAffinity) SwaggerDoc() map[string]string { 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 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.", + "namespaces": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"", "topologyKey": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.", } @@ -1183,8 +1222,8 @@ func (PodAttachOptions) SwaggerDoc() map[string]string { 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", + "type": "Type is the type of the condition. Currently only Ready. More info: http://kubernetes.io/docs/user-guide/pod-states#pod-conditions", + "status": "Status is the status of the condition. Can be True, False, Unknown. More info: http://kubernetes.io/docs/user-guide/pod-states#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.", @@ -1212,7 +1251,7 @@ func (PodExecOptions) SwaggerDoc() map[string]string { 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", + "items": "List of pods. More info: http://kubernetes.io/docs/user-guide/pods", } func (PodList) SwaggerDoc() map[string]string { @@ -1235,6 +1274,15 @@ func (PodLogOptions) SwaggerDoc() map[string]string { return map_PodLogOptions } +var map_PodPortForwardOptions = map[string]string{ + "": "PodPortForwardOptions is the query options to a Pod's port forward call when using WebSockets. The `port` query parameter must specify the port or ports (comma separated) to forward over. Port forwarding over SPDY does not use these options. It requires the port to be passed in the `port` header as part of request.", + "ports": "List of ports to forward Required when using WebSockets", +} + +func (PodPortForwardOptions) SwaggerDoc() map[string]string { + return map_PodPortForwardOptions +} + var map_PodProxyOptions = map[string]string{ "": "PodProxyOptions is the query options to a Pod's proxy call.", "path": "Path is the URL path to use for the current proxy request to pod.", @@ -1268,23 +1316,28 @@ func (PodSignature) SwaggerDoc() map[string]string { 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", + "volumes": "List of volumes that can be mounted by containers belonging to the pod. More info: http://kubernetes.io/docs/user-guide/volumes", + "initContainers": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers", + "containers": "List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers", + "restartPolicy": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: http://kubernetes.io/docs/user-guide/pod-states#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", + "dnsPolicy": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", + "nodeSelector": "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: http://kubernetes.io/docs/user-guide/node-selection/README", "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.", + "automountServiceAccountToken": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.", "nodeName": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.", "hostNetwork": "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.", "hostPID": "Use the host's pid namespace. Optional: Default to false.", "hostIPC": "Use the host's ipc namespace. Optional: Default to false.", "securityContext": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", - "imagePullSecrets": "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: http://releases.k8s.io/HEAD/docs/user-guide/images.md#specifying-imagepullsecrets-on-a-pod", + "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://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod", "hostname": "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", "subdomain": "If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all.", + "affinity": "If specified, the pod's scheduling constraints", + "schedulerName": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", + "tolerations": "If specified, the pod's tolerations.", } func (PodSpec) SwaggerDoc() map[string]string { @@ -1292,15 +1345,17 @@ func (PodSpec) SwaggerDoc() map[string]string { } 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", + "": "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://kubernetes.io/docs/user-guide/pod-states#pod-phase", + "conditions": "Current service state of pod. More info: http://kubernetes.io/docs/user-guide/pod-states#pod-conditions", + "message": "A human readable message indicating details about why the pod is in this condition.", + "reason": "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'OutOfDisk'", + "hostIP": "IP address of the host to which the pod is assigned. Empty if not yet scheduled.", + "podIP": "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.", + "startTime": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", + "initContainerStatuses": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses", + "containerStatuses": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses", + "qosClass": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md", } func (PodStatus) SwaggerDoc() map[string]string { @@ -1347,6 +1402,17 @@ func (PodTemplateSpec) SwaggerDoc() map[string]string { return map_PodTemplateSpec } +var map_PortworxVolumeSource = map[string]string{ + "": "PortworxVolumeSource represents a Portworx volume resource.", + "volumeID": "VolumeID uniquely identifies a Portworx volume", + "fsType": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", +} + +func (PortworxVolumeSource) SwaggerDoc() map[string]string { + return map_PortworxVolumeSource +} + var map_Preconditions = map[string]string{ "": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", "uid": "Specifies the target UID.", @@ -1380,8 +1446,8 @@ func (PreferredSchedulingTerm) SwaggerDoc() map[string]string { 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", + "initialDelaySeconds": "Number of seconds after the container has started before liveness probes are initiated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", + "timeoutSeconds": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: http://kubernetes.io/docs/user-guide/pod-states#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.", @@ -1391,6 +1457,16 @@ func (Probe) SwaggerDoc() map[string]string { return map_Probe } +var map_ProjectedVolumeSource = map[string]string{ + "": "Represents a projected volume source", + "sources": "list of volume projections", + "defaultMode": "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", +} + +func (ProjectedVolumeSource) SwaggerDoc() map[string]string { + return map_ProjectedVolumeSource +} + var map_QuobyteVolumeSource = map[string]string{ "": "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.", "registry": "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes", @@ -1408,7 +1484,7 @@ 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", + "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://kubernetes.io/docs/user-guide/volumes#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", @@ -1442,10 +1518,23 @@ func (ReplicationController) SwaggerDoc() map[string]string { return map_ReplicationController } +var map_ReplicationControllerCondition = map[string]string{ + "": "ReplicationControllerCondition describes the state of a replication controller at a certain point.", + "type": "Type of replication controller condition.", + "status": "Status of the condition, one of True, False, Unknown.", + "lastTransitionTime": "The last time the condition transitioned from one status to another.", + "reason": "The reason for the condition's last transition.", + "message": "A human readable message indicating details about the transition.", +} + +func (ReplicationControllerCondition) SwaggerDoc() map[string]string { + return map_ReplicationControllerCondition +} + var map_ReplicationControllerList = map[string]string{ "": "ReplicationControllerList is a collection of replication controllers.", "metadata": "Standard list metadata. More info: 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", + "items": "List of replication controllers. More info: http://kubernetes.io/docs/user-guide/replication-controller", } func (ReplicationControllerList) SwaggerDoc() map[string]string { @@ -1453,10 +1542,11 @@ func (ReplicationControllerList) SwaggerDoc() map[string]string { } 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", + "": "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://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller", + "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "selector": "Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template", } func (ReplicationControllerSpec) SwaggerDoc() map[string]string { @@ -1465,10 +1555,12 @@ func (ReplicationControllerSpec) SwaggerDoc() map[string]string { 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", + "replicas": "Replicas is the most recently oberved number of replicas. More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller", "fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replication controller.", "readyReplicas": "The number of ready replicas for this replication controller.", + "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this replication controller.", "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed replication controller.", + "conditions": "Represents the latest available observations of a replication controller's current state.", } func (ReplicationControllerStatus) SwaggerDoc() map[string]string { @@ -1549,6 +1641,24 @@ func (SELinuxOptions) SwaggerDoc() map[string]string { return map_SELinuxOptions } +var map_ScaleIOVolumeSource = map[string]string{ + "": "ScaleIOVolumeSource represents a persistent ScaleIO volume", + "gateway": "The host address of the ScaleIO API Gateway.", + "system": "The name of the storage system as configured in ScaleIO.", + "secretRef": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", + "sslEnabled": "Flag to enable/disable SSL communication with Gateway, default false", + "protectionDomain": "The name of the Protection Domain for the configured storage (defaults to \"default\").", + "storagePool": "The Storage Pool associated with the protection domain (defaults to \"default\").", + "storageMode": "Indicates whether the storage for a volume should be thick or thin (defaults to \"thin\").", + "volumeName": "The name of a volume already created in the ScaleIO system that is associated with this volume source.", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", +} + +func (ScaleIOVolumeSource) SwaggerDoc() map[string]string { + return map_ScaleIOVolumeSource +} + var map_Secret = map[string]string{ "": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", @@ -1561,9 +1671,19 @@ func (Secret) SwaggerDoc() map[string]string { return map_Secret } +var map_SecretEnvSource = map[string]string{ + "": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "optional": "Specify whether the Secret must be defined", +} + +func (SecretEnvSource) SwaggerDoc() map[string]string { + return map_SecretEnvSource +} + var map_SecretKeySelector = map[string]string{ - "": "SecretKeySelector selects a key of a Secret.", - "key": "The key of the secret to select from. Must be a valid secret key.", + "": "SecretKeySelector selects a key of a Secret.", + "key": "The key of the secret to select from. Must be a valid secret key.", + "optional": "Specify whether the Secret or it's key must be defined", } func (SecretKeySelector) SwaggerDoc() map[string]string { @@ -1573,18 +1693,29 @@ func (SecretKeySelector) SwaggerDoc() map[string]string { 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", + "items": "Items is a list of secret objects. More info: http://kubernetes.io/docs/user-guide/secrets", } func (SecretList) SwaggerDoc() map[string]string { return map_SecretList } +var map_SecretProjection = map[string]string{ + "": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", + "items": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "optional": "Specify whether the Secret or its key must be defined", +} + +func (SecretProjection) SwaggerDoc() map[string]string { + return map_SecretProjection +} + var map_SecretVolumeSource = map[string]string{ "": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.", - "secretName": "Name of the secret in the pod's namespace to use. More info: 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 '..'.", + "secretName": "Name of the secret in the pod's namespace to use. More info: http://kubernetes.io/docs/user-guide/volumes#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 unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", "defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "optional": "Specify whether the Secret or it's keys must be defined", } func (SecretVolumeSource) SwaggerDoc() map[string]string { @@ -1626,10 +1757,11 @@ func (Service) SwaggerDoc() map[string]string { } 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", + "": "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://kubernetes.io/docs/user-guide/secrets", + "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://kubernetes.io/docs/user-guide/secrets#manually-specifying-an-imagepullsecret", + "automountServiceAccountToken": "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.", } func (ServiceAccount) SwaggerDoc() map[string]string { @@ -1661,8 +1793,8 @@ var map_ServicePort = map[string]string{ "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", + "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://kubernetes.io/docs/user-guide/services#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://kubernetes.io/docs/user-guide/services#type--nodeport", } func (ServicePort) SwaggerDoc() map[string]string { @@ -1680,15 +1812,15 @@ func (ServiceProxyOptions) SwaggerDoc() map[string]string { 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": "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview", - "clusterIP": "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies", - "type": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview", + "ports": "The list of ports that are exposed by this service. More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies", + "selector": "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: http://kubernetes.io/docs/user-guide/services#overview", + "clusterIP": "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies", + "type": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: http://kubernetes.io/docs/user-guide/services#overview", "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", + "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://kubernetes.io/docs/user-guide/services#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", + "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://kubernetes.io/docs/user-guide/services-firewalls", "externalName": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName.", } @@ -1715,10 +1847,11 @@ func (TCPSocketAction) SwaggerDoc() map[string]string { } 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.", + "": "The node this Taint is attached to has the effect \"effect\" on any pod that that does not tolerate the Taint.", + "key": "Required. The taint key to be applied to a node.", + "value": "Required. The taint value corresponding to the taint key.", + "effect": "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.", + "timeAdded": "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.", } func (Taint) SwaggerDoc() map[string]string { @@ -1726,11 +1859,12 @@ func (Taint) SwaggerDoc() map[string]string { } var map_Toleration = map[string]string{ - "": "The pod this Toleration is attached to tolerates any taint that matches the triple using the matching 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.", + "": "The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .", + "key": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.", + "operator": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.", + "value": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.", + "effect": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.", + "tolerationSeconds": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.", } func (Toleration) SwaggerDoc() map[string]string { @@ -1739,7 +1873,7 @@ func (Toleration) SwaggerDoc() map[string]string { 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", + "name": "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: http://kubernetes.io/docs/user-guide/identifiers#names", } func (Volume) SwaggerDoc() map[string]string { @@ -1758,30 +1892,45 @@ func (VolumeMount) SwaggerDoc() map[string]string { return map_VolumeMount } +var map_VolumeProjection = map[string]string{ + "": "Projection that may be projected along with other supported volume types", + "secret": "information about the secret data to project", + "downwardAPI": "information about the downwardAPI data to project", + "configMap": "information about the configMap data to project", +} + +func (VolumeProjection) SwaggerDoc() map[string]string { + return map_VolumeProjection +} + var map_VolumeSource = map[string]string{ "": "Represents the source of a volume to mount. Only one of its members may be specified.", - "hostPath": "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: 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", + "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://kubernetes.io/docs/user-guide/volumes#hostpath", + "emptyDir": "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir", + "gcePersistentDisk": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk", + "awsElasticBlockStore": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://kubernetes.io/docs/user-guide/volumes#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", + "secret": "Secret represents a secret that should populate this volume. More info: http://kubernetes.io/docs/user-guide/volumes#secrets", + "nfs": "NFS represents an NFS mount on the host that shares a pod's lifetime More info: http://kubernetes.io/docs/user-guide/volumes#nfs", "iscsi": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: 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 an exec based plugin. This is an alpha feature and may change in future.", - "cinder": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: 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", - "quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - "azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "persistentVolumeClaim": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#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 an exec based plugin. This is an alpha feature and may change in future.", + "cinder": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: 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", + "quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "photonPersistentDisk": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "projected": "Items for all in one resources secrets, configmaps, and downward API", + "portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", } func (VolumeSource) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go similarity index 58% rename from vendor/k8s.io/client-go/1.5/pkg/api/v1/zz_generated.conversion.go rename to vendor/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go index 7936a9421..7d534c8c7 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,11 +21,12 @@ limitations under the License. package v1 import ( - api "k8s.io/client-go/1.5/pkg/api" - resource "k8s.io/client-go/1.5/pkg/api/resource" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" - types "k8s.io/client-go/1.5/pkg/types" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" + api "k8s.io/client-go/pkg/api" + unsafe "unsafe" ) func init() { @@ -64,10 +65,14 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_ComponentStatusList_To_v1_ComponentStatusList, Convert_v1_ConfigMap_To_api_ConfigMap, Convert_api_ConfigMap_To_v1_ConfigMap, + Convert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource, + Convert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource, Convert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector, Convert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector, Convert_v1_ConfigMapList_To_api_ConfigMapList, Convert_api_ConfigMapList_To_v1_ConfigMapList, + Convert_v1_ConfigMapProjection_To_api_ConfigMapProjection, + Convert_api_ConfigMapProjection_To_v1_ConfigMapProjection, Convert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource, Convert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource, Convert_v1_Container_To_api_Container, @@ -90,6 +95,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_DaemonEndpoint_To_v1_DaemonEndpoint, Convert_v1_DeleteOptions_To_api_DeleteOptions, Convert_api_DeleteOptions_To_v1_DeleteOptions, + Convert_v1_DownwardAPIProjection_To_api_DownwardAPIProjection, + Convert_api_DownwardAPIProjection_To_v1_DownwardAPIProjection, Convert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile, Convert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile, Convert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource, @@ -106,6 +113,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_Endpoints_To_v1_Endpoints, Convert_v1_EndpointsList_To_api_EndpointsList, Convert_api_EndpointsList_To_v1_EndpointsList, + Convert_v1_EnvFromSource_To_api_EnvFromSource, + Convert_api_EnvFromSource_To_v1_EnvFromSource, Convert_v1_EnvVar_To_api_EnvVar, Convert_api_EnvVar_To_v1_EnvVar, Convert_v1_EnvVarSource_To_api_EnvVarSource, @@ -118,8 +127,6 @@ func RegisterConversions(scheme *runtime.Scheme) error { 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, @@ -188,6 +195,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_NodeList_To_v1_NodeList, Convert_v1_NodeProxyOptions_To_api_NodeProxyOptions, Convert_api_NodeProxyOptions_To_v1_NodeProxyOptions, + Convert_v1_NodeResources_To_api_NodeResources, + Convert_api_NodeResources_To_v1_NodeResources, Convert_v1_NodeSelector_To_api_NodeSelector, Convert_api_NodeSelector_To_v1_NodeSelector, Convert_v1_NodeSelectorRequirement_To_api_NodeSelectorRequirement, @@ -206,8 +215,6 @@ func RegisterConversions(scheme *runtime.Scheme) error { 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, @@ -228,6 +235,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec, Convert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus, Convert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus, + Convert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource, + Convert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource, Convert_v1_Pod_To_api_Pod, Convert_api_Pod_To_v1_Pod, Convert_v1_PodAffinity_To_api_PodAffinity, @@ -246,6 +255,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_PodList_To_v1_PodList, Convert_v1_PodLogOptions_To_api_PodLogOptions, Convert_api_PodLogOptions_To_v1_PodLogOptions, + Convert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions, + Convert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions, Convert_v1_PodProxyOptions_To_api_PodProxyOptions, Convert_api_PodProxyOptions_To_v1_PodProxyOptions, Convert_v1_PodSecurityContext_To_api_PodSecurityContext, @@ -264,6 +275,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_PodTemplateList_To_v1_PodTemplateList, Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec, Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec, + Convert_v1_PortworxVolumeSource_To_api_PortworxVolumeSource, + Convert_api_PortworxVolumeSource_To_v1_PortworxVolumeSource, Convert_v1_Preconditions_To_api_Preconditions, Convert_api_Preconditions_To_v1_Preconditions, Convert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry, @@ -272,6 +285,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm, Convert_v1_Probe_To_api_Probe, Convert_api_Probe_To_v1_Probe, + Convert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource, + Convert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource, Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource, Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource, Convert_v1_RBDVolumeSource_To_api_RBDVolumeSource, @@ -280,6 +295,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_RangeAllocation_To_v1_RangeAllocation, Convert_v1_ReplicationController_To_api_ReplicationController, Convert_api_ReplicationController_To_v1_ReplicationController, + Convert_v1_ReplicationControllerCondition_To_api_ReplicationControllerCondition, + Convert_api_ReplicationControllerCondition_To_v1_ReplicationControllerCondition, Convert_v1_ReplicationControllerList_To_api_ReplicationControllerList, Convert_api_ReplicationControllerList_To_v1_ReplicationControllerList, Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec, @@ -300,12 +317,18 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_ResourceRequirements_To_v1_ResourceRequirements, Convert_v1_SELinuxOptions_To_api_SELinuxOptions, Convert_api_SELinuxOptions_To_v1_SELinuxOptions, + Convert_v1_ScaleIOVolumeSource_To_api_ScaleIOVolumeSource, + Convert_api_ScaleIOVolumeSource_To_v1_ScaleIOVolumeSource, Convert_v1_Secret_To_api_Secret, Convert_api_Secret_To_v1_Secret, + Convert_v1_SecretEnvSource_To_api_SecretEnvSource, + Convert_api_SecretEnvSource_To_v1_SecretEnvSource, Convert_v1_SecretKeySelector_To_api_SecretKeySelector, Convert_api_SecretKeySelector_To_v1_SecretKeySelector, Convert_v1_SecretList_To_api_SecretList, Convert_api_SecretList_To_v1_SecretList, + Convert_v1_SecretProjection_To_api_SecretProjection, + Convert_api_SecretProjection_To_v1_SecretProjection, Convert_v1_SecretVolumeSource_To_api_SecretVolumeSource, Convert_api_SecretVolumeSource_To_v1_SecretVolumeSource, Convert_v1_SecurityContext_To_api_SecurityContext, @@ -328,6 +351,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_ServiceSpec_To_v1_ServiceSpec, Convert_v1_ServiceStatus_To_api_ServiceStatus, Convert_api_ServiceStatus_To_v1_ServiceStatus, + Convert_v1_Sysctl_To_api_Sysctl, + Convert_api_Sysctl_To_v1_Sysctl, Convert_v1_TCPSocketAction_To_api_TCPSocketAction, Convert_api_TCPSocketAction_To_v1_TCPSocketAction, Convert_v1_Taint_To_api_Taint, @@ -338,6 +363,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_Volume_To_v1_Volume, Convert_v1_VolumeMount_To_api_VolumeMount, Convert_api_VolumeMount_To_v1_VolumeMount, + Convert_v1_VolumeProjection_To_api_VolumeProjection, + Convert_api_VolumeProjection_To_v1_VolumeProjection, Convert_v1_VolumeSource_To_api_VolumeSource, Convert_api_VolumeSource_To_v1_VolumeSource, Convert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource, @@ -372,33 +399,9 @@ func Convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolu } 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 - } + out.NodeAffinity = (*api.NodeAffinity)(unsafe.Pointer(in.NodeAffinity)) + out.PodAffinity = (*api.PodAffinity)(unsafe.Pointer(in.PodAffinity)) + out.PodAntiAffinity = (*api.PodAntiAffinity)(unsafe.Pointer(in.PodAntiAffinity)) return nil } @@ -407,33 +410,9 @@ func Convert_v1_Affinity_To_api_Affinity(in *Affinity, out *api.Affinity, s conv } 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 - } + out.NodeAffinity = (*NodeAffinity)(unsafe.Pointer(in.NodeAffinity)) + out.PodAffinity = (*PodAffinity)(unsafe.Pointer(in.PodAffinity)) + out.PodAntiAffinity = (*PodAntiAffinity)(unsafe.Pointer(in.PodAntiAffinity)) return nil } @@ -462,17 +441,7 @@ func Convert_api_AttachedVolume_To_v1_AttachedVolume(in *api.AttachedVolume, out } func autoConvert_v1_AvoidPods_To_api_AvoidPods(in *AvoidPods, out *api.AvoidPods, s conversion.Scope) error { - if in.PreferAvoidPods != nil { - in, out := &in.PreferAvoidPods, &out.PreferAvoidPods - *out = make([]api.PreferAvoidPodsEntry, len(*in)) - for i := range *in { - if err := Convert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.PreferAvoidPods = nil - } + out.PreferAvoidPods = *(*[]api.PreferAvoidPodsEntry)(unsafe.Pointer(&in.PreferAvoidPods)) return nil } @@ -481,17 +450,7 @@ func Convert_v1_AvoidPods_To_api_AvoidPods(in *AvoidPods, out *api.AvoidPods, s } func autoConvert_api_AvoidPods_To_v1_AvoidPods(in *api.AvoidPods, out *AvoidPods, s conversion.Scope) error { - if in.PreferAvoidPods != nil { - in, out := &in.PreferAvoidPods, &out.PreferAvoidPods - *out = make([]PreferAvoidPodsEntry, len(*in)) - for i := range *in { - if err := Convert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.PreferAvoidPods = nil - } + out.PreferAvoidPods = *(*[]PreferAvoidPodsEntry)(unsafe.Pointer(&in.PreferAvoidPods)) return nil } @@ -500,18 +459,11 @@ func Convert_api_AvoidPods_To_v1_AvoidPods(in *api.AvoidPods, out *AvoidPods, s } func autoConvert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(in *AzureDiskVolumeSource, out *api.AzureDiskVolumeSource, s conversion.Scope) error { - SetDefaults_AzureDiskVolumeSource(in) out.DiskName = in.DiskName out.DataDiskURI = in.DataDiskURI - if in.CachingMode != nil { - in, out := &in.CachingMode, &out.CachingMode - *out = new(api.AzureDataDiskCachingMode) - **out = api.AzureDataDiskCachingMode(**in) - } else { - out.CachingMode = nil - } - out.FSType = in.FSType - out.ReadOnly = in.ReadOnly + out.CachingMode = (*api.AzureDataDiskCachingMode)(unsafe.Pointer(in.CachingMode)) + out.FSType = (*string)(unsafe.Pointer(in.FSType)) + out.ReadOnly = (*bool)(unsafe.Pointer(in.ReadOnly)) return nil } @@ -522,15 +474,9 @@ func Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(in *AzureDisk func autoConvert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in *api.AzureDiskVolumeSource, out *AzureDiskVolumeSource, s conversion.Scope) error { out.DiskName = in.DiskName out.DataDiskURI = in.DataDiskURI - if in.CachingMode != nil { - in, out := &in.CachingMode, &out.CachingMode - *out = new(AzureDataDiskCachingMode) - **out = AzureDataDiskCachingMode(**in) - } else { - out.CachingMode = nil - } - out.FSType = in.FSType - out.ReadOnly = in.ReadOnly + out.CachingMode = (*AzureDataDiskCachingMode)(unsafe.Pointer(in.CachingMode)) + out.FSType = (*string)(unsafe.Pointer(in.FSType)) + out.ReadOnly = (*bool)(unsafe.Pointer(in.ReadOnly)) return nil } @@ -561,12 +507,7 @@ func Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource(in *api.Azure } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.Target, &out.Target, s); err != nil { return err } @@ -578,12 +519,7 @@ func Convert_v1_Binding_To_api_Binding(in *Binding, out *api.Binding, s conversi } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.Target, &out.Target, s); err != nil { return err } @@ -595,24 +531,8 @@ func Convert_api_Binding_To_v1_Binding(in *api.Binding, out *Binding, s conversi } 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 - } + out.Add = *(*[]api.Capability)(unsafe.Pointer(&in.Add)) + out.Drop = *(*[]api.Capability)(unsafe.Pointer(&in.Drop)) return nil } @@ -621,24 +541,8 @@ func Convert_v1_Capabilities_To_api_Capabilities(in *Capabilities, out *api.Capa } 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 - } + out.Add = *(*[]Capability)(unsafe.Pointer(&in.Add)) + out.Drop = *(*[]Capability)(unsafe.Pointer(&in.Drop)) return nil } @@ -647,19 +551,11 @@ func Convert_api_Capabilities_To_v1_Capabilities(in *api.Capabilities, out *Capa } func autoConvert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource(in *CephFSVolumeSource, out *api.CephFSVolumeSource, s conversion.Scope) error { - out.Monitors = in.Monitors + out.Monitors = *(*[]string)(unsafe.Pointer(&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.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef)) out.ReadOnly = in.ReadOnly return nil } @@ -669,19 +565,15 @@ func Convert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource(in *CephFSVolumeSou } func autoConvert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource(in *api.CephFSVolumeSource, out *CephFSVolumeSource, s conversion.Scope) error { - out.Monitors = in.Monitors + if in.Monitors == nil { + out.Monitors = make([]string, 0) + } else { + out.Monitors = *(*[]string)(unsafe.Pointer(&in.Monitors)) + } out.Path = in.Path out.User = in.User out.SecretFile = in.SecretFile - 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.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef)) out.ReadOnly = in.ReadOnly return nil } @@ -737,23 +629,8 @@ func Convert_api_ComponentCondition_To_v1_ComponentCondition(in *api.ComponentCo } 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 - } + out.ObjectMeta = in.ObjectMeta + out.Conditions = *(*[]api.ComponentCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -762,23 +639,8 @@ func Convert_v1_ComponentStatus_To_api_ComponentStatus(in *ComponentStatus, out } 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 - } + out.ObjectMeta = in.ObjectMeta + out.Conditions = *(*[]ComponentCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -787,23 +649,8 @@ func Convert_api_ComponentStatus_To_v1_ComponentStatus(in *api.ComponentStatus, } 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 - } + out.ListMeta = in.ListMeta + out.Items = *(*[]api.ComponentStatus)(unsafe.Pointer(&in.Items)) return nil } @@ -812,22 +659,11 @@ func Convert_v1_ComponentStatusList_To_api_ComponentStatusList(in *ComponentStat } 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 - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]ComponentStatus, 0) } else { - out.Items = nil + out.Items = *(*[]ComponentStatus)(unsafe.Pointer(&in.Items)) } return nil } @@ -837,14 +673,8 @@ func Convert_api_ComponentStatusList_To_v1_ComponentStatusList(in *api.Component } 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 + out.ObjectMeta = in.ObjectMeta + out.Data = *(*map[string]string)(unsafe.Pointer(&in.Data)) return nil } @@ -853,13 +683,8 @@ func Convert_v1_ConfigMap_To_api_ConfigMap(in *ConfigMap, out *api.ConfigMap, 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 + out.ObjectMeta = in.ObjectMeta + out.Data = *(*map[string]string)(unsafe.Pointer(&in.Data)) return nil } @@ -867,11 +692,36 @@ func Convert_api_ConfigMap_To_v1_ConfigMap(in *api.ConfigMap, out *ConfigMap, s return autoConvert_api_ConfigMap_To_v1_ConfigMap(in, out, s) } +func autoConvert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource(in *ConfigMapEnvSource, out *api.ConfigMapEnvSource, s conversion.Scope) error { + if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { + return err + } + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) + return nil +} + +func Convert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource(in *ConfigMapEnvSource, out *api.ConfigMapEnvSource, s conversion.Scope) error { + return autoConvert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource(in, out, s) +} + +func autoConvert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource(in *api.ConfigMapEnvSource, out *ConfigMapEnvSource, s conversion.Scope) error { + if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { + return err + } + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) + return nil +} + +func Convert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource(in *api.ConfigMapEnvSource, out *ConfigMapEnvSource, s conversion.Scope) error { + return autoConvert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource(in, out, s) +} + func autoConvert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector(in *ConfigMapKeySelector, out *api.ConfigMapKeySelector, s conversion.Scope) error { if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { return err } out.Key = in.Key + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -884,6 +734,7 @@ func autoConvert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(in *api.Con return err } out.Key = in.Key + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -892,23 +743,8 @@ func Convert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(in *api.ConfigM } 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 - } + out.ListMeta = in.ListMeta + out.Items = *(*[]api.ConfigMap)(unsafe.Pointer(&in.Items)) return nil } @@ -917,22 +753,11 @@ func Convert_v1_ConfigMapList_To_api_ConfigMapList(in *ConfigMapList, out *api.C } 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 - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]ConfigMap, 0) } else { - out.Items = nil + out.Items = *(*[]ConfigMap)(unsafe.Pointer(&in.Items)) } return nil } @@ -941,23 +766,39 @@ func Convert_api_ConfigMapList_To_v1_ConfigMapList(in *api.ConfigMapList, out *C 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 { - SetDefaults_ConfigMapVolumeSource(in) +func autoConvert_v1_ConfigMapProjection_To_api_ConfigMapProjection(in *ConfigMapProjection, out *api.ConfigMapProjection, s conversion.Scope) error { if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { return err } - 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 + out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items)) + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) + return nil +} + +func Convert_v1_ConfigMapProjection_To_api_ConfigMapProjection(in *ConfigMapProjection, out *api.ConfigMapProjection, s conversion.Scope) error { + return autoConvert_v1_ConfigMapProjection_To_api_ConfigMapProjection(in, out, s) +} + +func autoConvert_api_ConfigMapProjection_To_v1_ConfigMapProjection(in *api.ConfigMapProjection, out *ConfigMapProjection, s conversion.Scope) error { + if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { + return err } - out.DefaultMode = in.DefaultMode + out.Items = *(*[]KeyToPath)(unsafe.Pointer(&in.Items)) + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) + return nil +} + +func Convert_api_ConfigMapProjection_To_v1_ConfigMapProjection(in *api.ConfigMapProjection, out *ConfigMapProjection, s conversion.Scope) error { + return autoConvert_api_ConfigMapProjection_To_v1_ConfigMapProjection(in, out, s) +} + +func autoConvert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource(in *ConfigMapVolumeSource, out *api.ConfigMapVolumeSource, s conversion.Scope) error { + if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { + return err + } + out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items)) + out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode)) + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -969,18 +810,9 @@ func autoConvert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource(in *api.C 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 - } - out.DefaultMode = in.DefaultMode + out.Items = *(*[]KeyToPath)(unsafe.Pointer(&in.Items)) + out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode)) + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -989,86 +821,25 @@ func Convert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource(in *api.Confi } 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.Command = *(*[]string)(unsafe.Pointer(&in.Command)) + out.Args = *(*[]string)(unsafe.Pointer(&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 - } + out.Ports = *(*[]api.ContainerPort)(unsafe.Pointer(&in.Ports)) + out.EnvFrom = *(*[]api.EnvFromSource)(unsafe.Pointer(&in.EnvFrom)) + out.Env = *(*[]api.EnvVar)(unsafe.Pointer(&in.Env)) if err := Convert_v1_ResourceRequirements_To_api_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil { return err } - 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.VolumeMounts = *(*[]api.VolumeMount)(unsafe.Pointer(&in.VolumeMounts)) + out.LivenessProbe = (*api.Probe)(unsafe.Pointer(in.LivenessProbe)) + out.ReadinessProbe = (*api.Probe)(unsafe.Pointer(in.ReadinessProbe)) + out.Lifecycle = (*api.Lifecycle)(unsafe.Pointer(in.Lifecycle)) out.TerminationMessagePath = in.TerminationMessagePath + out.TerminationMessagePolicy = api.TerminationMessagePolicy(in.TerminationMessagePolicy) out.ImagePullPolicy = api.PullPolicy(in.ImagePullPolicy) - 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.SecurityContext = (*api.SecurityContext)(unsafe.Pointer(in.SecurityContext)) out.Stdin = in.Stdin out.StdinOnce = in.StdinOnce out.TTY = in.TTY @@ -1082,83 +853,23 @@ func Convert_v1_Container_To_api_Container(in *Container, out *api.Container, 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.Command = *(*[]string)(unsafe.Pointer(&in.Command)) + out.Args = *(*[]string)(unsafe.Pointer(&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 - } + out.Ports = *(*[]ContainerPort)(unsafe.Pointer(&in.Ports)) + out.EnvFrom = *(*[]EnvFromSource)(unsafe.Pointer(&in.EnvFrom)) + out.Env = *(*[]EnvVar)(unsafe.Pointer(&in.Env)) if err := Convert_api_ResourceRequirements_To_v1_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil { return err } - 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.VolumeMounts = *(*[]VolumeMount)(unsafe.Pointer(&in.VolumeMounts)) + out.LivenessProbe = (*Probe)(unsafe.Pointer(in.LivenessProbe)) + out.ReadinessProbe = (*Probe)(unsafe.Pointer(in.ReadinessProbe)) + out.Lifecycle = (*Lifecycle)(unsafe.Pointer(in.Lifecycle)) out.TerminationMessagePath = in.TerminationMessagePath + out.TerminationMessagePolicy = TerminationMessagePolicy(in.TerminationMessagePolicy) out.ImagePullPolicy = PullPolicy(in.ImagePullPolicy) - 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.SecurityContext = (*SecurityContext)(unsafe.Pointer(in.SecurityContext)) out.Stdin = in.Stdin out.StdinOnce = in.StdinOnce out.TTY = in.TTY @@ -1170,7 +881,7 @@ func Convert_api_Container_To_v1_Container(in *api.Container, out *Container, s } func autoConvert_v1_ContainerImage_To_api_ContainerImage(in *ContainerImage, out *api.ContainerImage, s conversion.Scope) error { - out.Names = in.Names + out.Names = *(*[]string)(unsafe.Pointer(&in.Names)) out.SizeBytes = in.SizeBytes return nil } @@ -1180,7 +891,11 @@ func Convert_v1_ContainerImage_To_api_ContainerImage(in *ContainerImage, out *ap } func autoConvert_api_ContainerImage_To_v1_ContainerImage(in *api.ContainerImage, out *ContainerImage, s conversion.Scope) error { - out.Names = in.Names + if in.Names == nil { + out.Names = make([]string, 0) + } else { + out.Names = *(*[]string)(unsafe.Pointer(&in.Names)) + } out.SizeBytes = in.SizeBytes return nil } @@ -1190,7 +905,6 @@ func Convert_api_ContainerImage_To_v1_ContainerImage(in *api.ContainerImage, out } 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 @@ -1217,33 +931,9 @@ func Convert_api_ContainerPort_To_v1_ContainerPort(in *api.ContainerPort, out *C } 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 - } + out.Waiting = (*api.ContainerStateWaiting)(unsafe.Pointer(in.Waiting)) + out.Running = (*api.ContainerStateRunning)(unsafe.Pointer(in.Running)) + out.Terminated = (*api.ContainerStateTerminated)(unsafe.Pointer(in.Terminated)) return nil } @@ -1252,33 +942,9 @@ func Convert_v1_ContainerState_To_api_ContainerState(in *ContainerState, out *ap } 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 - } + out.Waiting = (*ContainerStateWaiting)(unsafe.Pointer(in.Waiting)) + out.Running = (*ContainerStateRunning)(unsafe.Pointer(in.Running)) + out.Terminated = (*ContainerStateTerminated)(unsafe.Pointer(in.Terminated)) return nil } @@ -1287,9 +953,7 @@ func Convert_api_ContainerState_To_v1_ContainerState(in *api.ContainerState, out } 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 - } + out.StartedAt = in.StartedAt return nil } @@ -1298,9 +962,7 @@ func Convert_v1_ContainerStateRunning_To_api_ContainerStateRunning(in *Container } 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 - } + out.StartedAt = in.StartedAt return nil } @@ -1313,12 +975,8 @@ func autoConvert_v1_ContainerStateTerminated_To_api_ContainerStateTerminated(in 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.StartedAt = in.StartedAt + out.FinishedAt = in.FinishedAt out.ContainerID = in.ContainerID return nil } @@ -1332,12 +990,8 @@ func autoConvert_api_ContainerStateTerminated_To_v1_ContainerStateTerminated(in 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.StartedAt = in.StartedAt + out.FinishedAt = in.FinishedAt out.ContainerID = in.ContainerID return nil } @@ -1425,20 +1079,10 @@ func Convert_api_DaemonEndpoint_To_v1_DaemonEndpoint(in *api.DaemonEndpoint, out } 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 + out.GracePeriodSeconds = (*int64)(unsafe.Pointer(in.GracePeriodSeconds)) + out.Preconditions = (*api.Preconditions)(unsafe.Pointer(in.Preconditions)) + out.OrphanDependents = (*bool)(unsafe.Pointer(in.OrphanDependents)) + out.PropagationPolicy = (*api.DeletionPropagation)(unsafe.Pointer(in.PropagationPolicy)) return nil } @@ -1447,20 +1091,10 @@ func Convert_v1_DeleteOptions_To_api_DeleteOptions(in *DeleteOptions, out *api.D } 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 + out.GracePeriodSeconds = (*int64)(unsafe.Pointer(in.GracePeriodSeconds)) + out.Preconditions = (*Preconditions)(unsafe.Pointer(in.Preconditions)) + out.OrphanDependents = (*bool)(unsafe.Pointer(in.OrphanDependents)) + out.PropagationPolicy = (*DeletionPropagation)(unsafe.Pointer(in.PropagationPolicy)) return nil } @@ -1468,27 +1102,29 @@ func Convert_api_DeleteOptions_To_v1_DeleteOptions(in *api.DeleteOptions, out *D return autoConvert_api_DeleteOptions_To_v1_DeleteOptions(in, out, s) } +func autoConvert_v1_DownwardAPIProjection_To_api_DownwardAPIProjection(in *DownwardAPIProjection, out *api.DownwardAPIProjection, s conversion.Scope) error { + out.Items = *(*[]api.DownwardAPIVolumeFile)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1_DownwardAPIProjection_To_api_DownwardAPIProjection(in *DownwardAPIProjection, out *api.DownwardAPIProjection, s conversion.Scope) error { + return autoConvert_v1_DownwardAPIProjection_To_api_DownwardAPIProjection(in, out, s) +} + +func autoConvert_api_DownwardAPIProjection_To_v1_DownwardAPIProjection(in *api.DownwardAPIProjection, out *DownwardAPIProjection, s conversion.Scope) error { + out.Items = *(*[]DownwardAPIVolumeFile)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_api_DownwardAPIProjection_To_v1_DownwardAPIProjection(in *api.DownwardAPIProjection, out *DownwardAPIProjection, s conversion.Scope) error { + return autoConvert_api_DownwardAPIProjection_To_v1_DownwardAPIProjection(in, out, s) +} + func autoConvert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile(in *DownwardAPIVolumeFile, out *api.DownwardAPIVolumeFile, s conversion.Scope) error { out.Path = in.Path - 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 - } - out.Mode = in.Mode + out.FieldRef = (*api.ObjectFieldSelector)(unsafe.Pointer(in.FieldRef)) + out.ResourceFieldRef = (*api.ResourceFieldSelector)(unsafe.Pointer(in.ResourceFieldRef)) + out.Mode = (*int32)(unsafe.Pointer(in.Mode)) return nil } @@ -1498,25 +1134,9 @@ func Convert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile(in *DownwardA 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 - } - out.Mode = in.Mode + out.FieldRef = (*ObjectFieldSelector)(unsafe.Pointer(in.FieldRef)) + out.ResourceFieldRef = (*ResourceFieldSelector)(unsafe.Pointer(in.ResourceFieldRef)) + out.Mode = (*int32)(unsafe.Pointer(in.Mode)) return nil } @@ -1525,19 +1145,8 @@ func Convert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile(in *api.Downw } func autoConvert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(in *DownwardAPIVolumeSource, out *api.DownwardAPIVolumeSource, s conversion.Scope) error { - SetDefaults_DownwardAPIVolumeSource(in) - 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 - } - out.DefaultMode = in.DefaultMode + out.Items = *(*[]api.DownwardAPIVolumeFile)(unsafe.Pointer(&in.Items)) + out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode)) return nil } @@ -1546,18 +1155,8 @@ func Convert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(in *Downw } 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 - } - out.DefaultMode = in.DefaultMode + out.Items = *(*[]DownwardAPIVolumeFile)(unsafe.Pointer(&in.Items)) + out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode)) return nil } @@ -1586,16 +1185,8 @@ func Convert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource(in *api.EmptyDi func autoConvert_v1_EndpointAddress_To_api_EndpointAddress(in *EndpointAddress, out *api.EndpointAddress, s conversion.Scope) error { out.IP = in.IP out.Hostname = in.Hostname - out.NodeName = in.NodeName - 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 - } + out.NodeName = (*string)(unsafe.Pointer(in.NodeName)) + out.TargetRef = (*api.ObjectReference)(unsafe.Pointer(in.TargetRef)) return nil } @@ -1606,16 +1197,8 @@ func Convert_v1_EndpointAddress_To_api_EndpointAddress(in *EndpointAddress, out func autoConvert_api_EndpointAddress_To_v1_EndpointAddress(in *api.EndpointAddress, out *EndpointAddress, s conversion.Scope) error { out.IP = in.IP out.Hostname = in.Hostname - out.NodeName = in.NodeName - 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 - } + out.NodeName = (*string)(unsafe.Pointer(in.NodeName)) + out.TargetRef = (*ObjectReference)(unsafe.Pointer(in.TargetRef)) return nil } @@ -1646,39 +1229,9 @@ func Convert_api_EndpointPort_To_v1_EndpointPort(in *api.EndpointPort, out *Endp } 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 - } + out.Addresses = *(*[]api.EndpointAddress)(unsafe.Pointer(&in.Addresses)) + out.NotReadyAddresses = *(*[]api.EndpointAddress)(unsafe.Pointer(&in.NotReadyAddresses)) + out.Ports = *(*[]api.EndpointPort)(unsafe.Pointer(&in.Ports)) return nil } @@ -1687,39 +1240,9 @@ func Convert_v1_EndpointSubset_To_api_EndpointSubset(in *EndpointSubset, out *ap } 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 - } + out.Addresses = *(*[]EndpointAddress)(unsafe.Pointer(&in.Addresses)) + out.NotReadyAddresses = *(*[]EndpointAddress)(unsafe.Pointer(&in.NotReadyAddresses)) + out.Ports = *(*[]EndpointPort)(unsafe.Pointer(&in.Ports)) return nil } @@ -1728,24 +1251,8 @@ func Convert_api_EndpointSubset_To_v1_EndpointSubset(in *api.EndpointSubset, out } 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 - } + out.ObjectMeta = in.ObjectMeta + out.Subsets = *(*[]api.EndpointSubset)(unsafe.Pointer(&in.Subsets)) return nil } @@ -1754,22 +1261,11 @@ func Convert_v1_Endpoints_To_api_Endpoints(in *Endpoints, out *api.Endpoints, 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 - } - } + out.ObjectMeta = in.ObjectMeta + if in.Subsets == nil { + out.Subsets = make([]EndpointSubset, 0) } else { - out.Subsets = nil + out.Subsets = *(*[]EndpointSubset)(unsafe.Pointer(&in.Subsets)) } return nil } @@ -1779,23 +1275,8 @@ func Convert_api_Endpoints_To_v1_Endpoints(in *api.Endpoints, out *Endpoints, 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 - } + out.ListMeta = in.ListMeta + out.Items = *(*[]api.Endpoints)(unsafe.Pointer(&in.Items)) return nil } @@ -1804,22 +1285,11 @@ func Convert_v1_EndpointsList_To_api_EndpointsList(in *EndpointsList, out *api.E } 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 - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]Endpoints, 0) } else { - out.Items = nil + out.Items = *(*[]Endpoints)(unsafe.Pointer(&in.Items)) } return nil } @@ -1828,18 +1298,32 @@ func Convert_api_EndpointsList_To_v1_EndpointsList(in *api.EndpointsList, out *E return autoConvert_api_EndpointsList_To_v1_EndpointsList(in, out, s) } +func autoConvert_v1_EnvFromSource_To_api_EnvFromSource(in *EnvFromSource, out *api.EnvFromSource, s conversion.Scope) error { + out.Prefix = in.Prefix + out.ConfigMapRef = (*api.ConfigMapEnvSource)(unsafe.Pointer(in.ConfigMapRef)) + out.SecretRef = (*api.SecretEnvSource)(unsafe.Pointer(in.SecretRef)) + return nil +} + +func Convert_v1_EnvFromSource_To_api_EnvFromSource(in *EnvFromSource, out *api.EnvFromSource, s conversion.Scope) error { + return autoConvert_v1_EnvFromSource_To_api_EnvFromSource(in, out, s) +} + +func autoConvert_api_EnvFromSource_To_v1_EnvFromSource(in *api.EnvFromSource, out *EnvFromSource, s conversion.Scope) error { + out.Prefix = in.Prefix + out.ConfigMapRef = (*ConfigMapEnvSource)(unsafe.Pointer(in.ConfigMapRef)) + out.SecretRef = (*SecretEnvSource)(unsafe.Pointer(in.SecretRef)) + return nil +} + +func Convert_api_EnvFromSource_To_v1_EnvFromSource(in *api.EnvFromSource, out *EnvFromSource, s conversion.Scope) error { + return autoConvert_api_EnvFromSource_To_v1_EnvFromSource(in, out, s) +} + func autoConvert_v1_EnvVar_To_api_EnvVar(in *EnvVar, out *api.EnvVar, s conversion.Scope) error { out.Name = in.Name out.Value = in.Value - 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 - } + out.ValueFrom = (*api.EnvVarSource)(unsafe.Pointer(in.ValueFrom)) return nil } @@ -1850,15 +1334,7 @@ func Convert_v1_EnvVar_To_api_EnvVar(in *EnvVar, out *api.EnvVar, s conversion.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 - } + out.ValueFrom = (*EnvVarSource)(unsafe.Pointer(in.ValueFrom)) return nil } @@ -1867,42 +1343,10 @@ func Convert_api_EnvVar_To_v1_EnvVar(in *api.EnvVar, out *EnvVar, s conversion.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 - } + out.FieldRef = (*api.ObjectFieldSelector)(unsafe.Pointer(in.FieldRef)) + out.ResourceFieldRef = (*api.ResourceFieldSelector)(unsafe.Pointer(in.ResourceFieldRef)) + out.ConfigMapKeyRef = (*api.ConfigMapKeySelector)(unsafe.Pointer(in.ConfigMapKeyRef)) + out.SecretKeyRef = (*api.SecretKeySelector)(unsafe.Pointer(in.SecretKeyRef)) return nil } @@ -1911,42 +1355,10 @@ func Convert_v1_EnvVarSource_To_api_EnvVarSource(in *EnvVarSource, out *api.EnvV } 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 - } + out.FieldRef = (*ObjectFieldSelector)(unsafe.Pointer(in.FieldRef)) + out.ResourceFieldRef = (*ResourceFieldSelector)(unsafe.Pointer(in.ResourceFieldRef)) + out.ConfigMapKeyRef = (*ConfigMapKeySelector)(unsafe.Pointer(in.ConfigMapKeyRef)) + out.SecretKeyRef = (*SecretKeySelector)(unsafe.Pointer(in.SecretKeyRef)) return nil } @@ -1955,12 +1367,7 @@ func Convert_api_EnvVarSource_To_v1_EnvVarSource(in *api.EnvVarSource, out *EnvV } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.InvolvedObject, &out.InvolvedObject, s); err != nil { return err } @@ -1969,12 +1376,8 @@ func autoConvert_v1_Event_To_api_Event(in *Event, out *api.Event, s conversion.S 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.FirstTimestamp = in.FirstTimestamp + out.LastTimestamp = in.LastTimestamp out.Count = in.Count out.Type = in.Type return nil @@ -1985,12 +1388,7 @@ func Convert_v1_Event_To_api_Event(in *Event, out *api.Event, s conversion.Scope } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.InvolvedObject, &out.InvolvedObject, s); err != nil { return err } @@ -1999,12 +1397,8 @@ func autoConvert_api_Event_To_v1_Event(in *api.Event, out *Event, s conversion.S 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.FirstTimestamp = in.FirstTimestamp + out.LastTimestamp = in.LastTimestamp out.Count = in.Count out.Type = in.Type return nil @@ -2015,23 +1409,8 @@ func Convert_api_Event_To_v1_Event(in *api.Event, out *Event, s conversion.Scope } 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 - } + out.ListMeta = in.ListMeta + out.Items = *(*[]api.Event)(unsafe.Pointer(&in.Items)) return nil } @@ -2040,22 +1419,11 @@ func Convert_v1_EventList_To_api_EventList(in *EventList, out *api.EventList, 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 - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]Event, 0) } else { - out.Items = nil + out.Items = *(*[]Event)(unsafe.Pointer(&in.Items)) } return nil } @@ -2085,7 +1453,7 @@ func Convert_api_EventSource_To_v1_EventSource(in *api.EventSource, out *EventSo } func autoConvert_v1_ExecAction_To_api_ExecAction(in *ExecAction, out *api.ExecAction, s conversion.Scope) error { - out.Command = in.Command + out.Command = *(*[]string)(unsafe.Pointer(&in.Command)) return nil } @@ -2094,7 +1462,7 @@ func Convert_v1_ExecAction_To_api_ExecAction(in *ExecAction, out *api.ExecAction } func autoConvert_api_ExecAction_To_v1_ExecAction(in *api.ExecAction, out *ExecAction, s conversion.Scope) error { - out.Command = in.Command + out.Command = *(*[]string)(unsafe.Pointer(&in.Command)) return nil } @@ -2102,35 +1470,9 @@ func Convert_api_ExecAction_To_v1_ExecAction(in *api.ExecAction, out *ExecAction 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.TargetWWNs = *(*[]string)(unsafe.Pointer(&in.TargetWWNs)) + out.Lun = (*int32)(unsafe.Pointer(in.Lun)) out.FSType = in.FSType out.ReadOnly = in.ReadOnly return nil @@ -2141,8 +1483,12 @@ func Convert_v1_FCVolumeSource_To_api_FCVolumeSource(in *FCVolumeSource, out *ap } func autoConvert_api_FCVolumeSource_To_v1_FCVolumeSource(in *api.FCVolumeSource, out *FCVolumeSource, s conversion.Scope) error { - out.TargetWWNs = in.TargetWWNs - out.Lun = in.Lun + if in.TargetWWNs == nil { + out.TargetWWNs = make([]string, 0) + } else { + out.TargetWWNs = *(*[]string)(unsafe.Pointer(&in.TargetWWNs)) + } + out.Lun = (*int32)(unsafe.Pointer(in.Lun)) out.FSType = in.FSType out.ReadOnly = in.ReadOnly return nil @@ -2155,17 +1501,9 @@ func Convert_api_FCVolumeSource_To_v1_FCVolumeSource(in *api.FCVolumeSource, out 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.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef)) out.ReadOnly = in.ReadOnly - out.Options = in.Options + out.Options = *(*map[string]string)(unsafe.Pointer(&in.Options)) return nil } @@ -2176,17 +1514,9 @@ func Convert_v1_FlexVolumeSource_To_api_FlexVolumeSource(in *FlexVolumeSource, o 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.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef)) out.ReadOnly = in.ReadOnly - out.Options = in.Options + out.Options = *(*map[string]string)(unsafe.Pointer(&in.Options)) return nil } @@ -2196,6 +1526,7 @@ func Convert_api_FlexVolumeSource_To_v1_FlexVolumeSource(in *api.FlexVolumeSourc func autoConvert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in *FlockerVolumeSource, out *api.FlockerVolumeSource, s conversion.Scope) error { out.DatasetName = in.DatasetName + out.DatasetUUID = in.DatasetUUID return nil } @@ -2205,6 +1536,7 @@ func Convert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in *FlockerVolume func autoConvert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(in *api.FlockerVolumeSource, out *FlockerVolumeSource, s conversion.Scope) error { out.DatasetName = in.DatasetName + out.DatasetUUID = in.DatasetUUID return nil } @@ -2281,24 +1613,11 @@ func Convert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource(in *api.Glust } 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.Port = in.Port 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 - } + out.HTTPHeaders = *(*[]api.HTTPHeader)(unsafe.Pointer(&in.HTTPHeaders)) return nil } @@ -2308,22 +1627,10 @@ func Convert_v1_HTTPGetAction_To_api_HTTPGetAction(in *HTTPGetAction, out *api.H 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.Port = in.Port 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 - } + out.HTTPHeaders = *(*[]HTTPHeader)(unsafe.Pointer(&in.HTTPHeaders)) return nil } @@ -2352,33 +1659,9 @@ func Convert_api_HTTPHeader_To_v1_HTTPHeader(in *api.HTTPHeader, out *HTTPHeader } 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 - } + out.Exec = (*api.ExecAction)(unsafe.Pointer(in.Exec)) + out.HTTPGet = (*api.HTTPGetAction)(unsafe.Pointer(in.HTTPGet)) + out.TCPSocket = (*api.TCPSocketAction)(unsafe.Pointer(in.TCPSocket)) return nil } @@ -2387,33 +1670,9 @@ func Convert_v1_Handler_To_api_Handler(in *Handler, out *api.Handler, s conversi } 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 - } + out.Exec = (*ExecAction)(unsafe.Pointer(in.Exec)) + out.HTTPGet = (*HTTPGetAction)(unsafe.Pointer(in.HTTPGet)) + out.TCPSocket = (*TCPSocketAction)(unsafe.Pointer(in.TCPSocket)) return nil } @@ -2440,13 +1699,13 @@ func Convert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource(in *api.HostPat } 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 + out.Portals = *(*[]string)(unsafe.Pointer(&in.Portals)) return nil } @@ -2461,6 +1720,7 @@ func autoConvert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(in *api.ISCSIVolu out.ISCSIInterface = in.ISCSIInterface out.FSType = in.FSType out.ReadOnly = in.ReadOnly + out.Portals = *(*[]string)(unsafe.Pointer(&in.Portals)) return nil } @@ -2471,7 +1731,7 @@ func Convert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(in *api.ISCSIVolumeSo func autoConvert_v1_KeyToPath_To_api_KeyToPath(in *KeyToPath, out *api.KeyToPath, s conversion.Scope) error { out.Key = in.Key out.Path = in.Path - out.Mode = in.Mode + out.Mode = (*int32)(unsafe.Pointer(in.Mode)) return nil } @@ -2482,7 +1742,7 @@ func Convert_v1_KeyToPath_To_api_KeyToPath(in *KeyToPath, out *api.KeyToPath, s func autoConvert_api_KeyToPath_To_v1_KeyToPath(in *api.KeyToPath, out *KeyToPath, s conversion.Scope) error { out.Key = in.Key out.Path = in.Path - out.Mode = in.Mode + out.Mode = (*int32)(unsafe.Pointer(in.Mode)) return nil } @@ -2491,24 +1751,8 @@ func Convert_api_KeyToPath_To_v1_KeyToPath(in *api.KeyToPath, out *KeyToPath, 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 - } + out.PostStart = (*api.Handler)(unsafe.Pointer(in.PostStart)) + out.PreStop = (*api.Handler)(unsafe.Pointer(in.PreStop)) return nil } @@ -2517,24 +1761,8 @@ func Convert_v1_Lifecycle_To_api_Lifecycle(in *Lifecycle, out *api.Lifecycle, 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 - } + out.PostStart = (*Handler)(unsafe.Pointer(in.PostStart)) + out.PreStop = (*Handler)(unsafe.Pointer(in.PreStop)) return nil } @@ -2543,12 +1771,7 @@ func Convert_api_Lifecycle_To_v1_Lifecycle(in *api.Lifecycle, out *Lifecycle, 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2560,12 +1783,7 @@ func Convert_v1_LimitRange_To_api_LimitRange(in *LimitRange, out *api.LimitRange } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_LimitRangeSpec_To_v1_LimitRangeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2577,23 +1795,12 @@ func Convert_api_LimitRange_To_v1_LimitRange(in *api.LimitRange, out *LimitRange } 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 - } + out.Max = *(*api.ResourceList)(unsafe.Pointer(&in.Max)) + out.Min = *(*api.ResourceList)(unsafe.Pointer(&in.Min)) + out.Default = *(*api.ResourceList)(unsafe.Pointer(&in.Default)) + out.DefaultRequest = *(*api.ResourceList)(unsafe.Pointer(&in.DefaultRequest)) + out.MaxLimitRequestRatio = *(*api.ResourceList)(unsafe.Pointer(&in.MaxLimitRequestRatio)) return nil } @@ -2603,71 +1810,11 @@ func Convert_v1_LimitRangeItem_To_api_LimitRangeItem(in *LimitRangeItem, out *ap 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 - } + out.Max = *(*ResourceList)(unsafe.Pointer(&in.Max)) + out.Min = *(*ResourceList)(unsafe.Pointer(&in.Min)) + out.Default = *(*ResourceList)(unsafe.Pointer(&in.Default)) + out.DefaultRequest = *(*ResourceList)(unsafe.Pointer(&in.DefaultRequest)) + out.MaxLimitRequestRatio = *(*ResourceList)(unsafe.Pointer(&in.MaxLimitRequestRatio)) return nil } @@ -2676,23 +1823,8 @@ func Convert_api_LimitRangeItem_To_v1_LimitRangeItem(in *api.LimitRangeItem, out } 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 - } + out.ListMeta = in.ListMeta + out.Items = *(*[]api.LimitRange)(unsafe.Pointer(&in.Items)) return nil } @@ -2701,22 +1833,11 @@ func Convert_v1_LimitRangeList_To_api_LimitRangeList(in *LimitRangeList, out *ap } 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 - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]LimitRange, 0) } else { - out.Items = nil + out.Items = *(*[]LimitRange)(unsafe.Pointer(&in.Items)) } return nil } @@ -2726,17 +1847,7 @@ func Convert_api_LimitRangeList_To_v1_LimitRangeList(in *api.LimitRangeList, out } 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 - } + out.Limits = *(*[]api.LimitRangeItem)(unsafe.Pointer(&in.Limits)) return nil } @@ -2745,16 +1856,10 @@ func Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec(in *LimitRangeSpec, out *ap } 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 - } - } + if in.Limits == nil { + out.Limits = make([]LimitRangeItem, 0) } else { - out.Limits = nil + out.Limits = *(*[]LimitRangeItem)(unsafe.Pointer(&in.Limits)) } return nil } @@ -2764,12 +1869,7 @@ func Convert_api_LimitRangeSpec_To_v1_LimitRangeSpec(in *api.LimitRangeSpec, out } 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]runtime.Object, len(*in)) @@ -2789,12 +1889,7 @@ func Convert_v1_List_To_api_List(in *List, out *api.List, s conversion.Scope) er } 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]runtime.RawExtension, len(*in)) @@ -2804,7 +1899,7 @@ func autoConvert_api_List_To_v1_List(in *api.List, out *List, s conversion.Scope } } } else { - out.Items = nil + out.Items = make([]runtime.RawExtension, 0) } return nil } @@ -2814,18 +1909,15 @@ func Convert_api_List_To_v1_List(in *api.List, out *List, s conversion.Scope) er } 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 { + if err := meta_v1.Convert_string_To_labels_Selector(&in.LabelSelector, &out.LabelSelector, 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 { + if err := meta_v1.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 + out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds)) return nil } @@ -2834,18 +1926,15 @@ func Convert_v1_ListOptions_To_api_ListOptions(in *ListOptions, out *api.ListOpt } 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 { + if err := meta_v1.Convert_labels_Selector_To_string(&in.LabelSelector, &out.LabelSelector, 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 { + if err := meta_v1.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 + out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds)) return nil } @@ -2874,17 +1963,7 @@ func Convert_api_LoadBalancerIngress_To_v1_LoadBalancerIngress(in *api.LoadBalan } 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 - } + out.Ingress = *(*[]api.LoadBalancerIngress)(unsafe.Pointer(&in.Ingress)) return nil } @@ -2893,17 +1972,7 @@ func Convert_v1_LoadBalancerStatus_To_api_LoadBalancerStatus(in *LoadBalancerSta } 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 - } + out.Ingress = *(*[]LoadBalancerIngress)(unsafe.Pointer(&in.Ingress)) return nil } @@ -2952,12 +2021,7 @@ func Convert_api_NFSVolumeSource_To_v1_NFSVolumeSource(in *api.NFSVolumeSource, } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_NamespaceSpec_To_api_NamespaceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2972,12 +2036,7 @@ func Convert_v1_Namespace_To_api_Namespace(in *Namespace, out *api.Namespace, 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_NamespaceSpec_To_v1_NamespaceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2992,23 +2051,8 @@ func Convert_api_Namespace_To_v1_Namespace(in *api.Namespace, out *Namespace, 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 - } + out.ListMeta = in.ListMeta + out.Items = *(*[]api.Namespace)(unsafe.Pointer(&in.Items)) return nil } @@ -3017,22 +2061,11 @@ func Convert_v1_NamespaceList_To_api_NamespaceList(in *NamespaceList, out *api.N } 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 - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]Namespace, 0) } else { - out.Items = nil + out.Items = *(*[]Namespace)(unsafe.Pointer(&in.Items)) } return nil } @@ -3042,15 +2075,7 @@ func Convert_api_NamespaceList_To_v1_NamespaceList(in *api.NamespaceList, out *N } 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 - } + out.Finalizers = *(*[]api.FinalizerName)(unsafe.Pointer(&in.Finalizers)) return nil } @@ -3059,15 +2084,7 @@ func Convert_v1_NamespaceSpec_To_api_NamespaceSpec(in *NamespaceSpec, out *api.N } 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 - } + out.Finalizers = *(*[]FinalizerName)(unsafe.Pointer(&in.Finalizers)) return nil } @@ -3076,7 +2093,6 @@ func Convert_api_NamespaceSpec_To_v1_NamespaceSpec(in *api.NamespaceSpec, out *N } 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 } @@ -3095,13 +2111,7 @@ func Convert_api_NamespaceStatus_To_v1_NamespaceStatus(in *api.NamespaceStatus, } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_NodeSpec_To_api_NodeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3116,12 +2126,7 @@ func Convert_v1_Node_To_api_Node(in *Node, out *api.Node, s conversion.Scope) er } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_NodeSpec_To_v1_NodeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3156,26 +2161,8 @@ func Convert_api_NodeAddress_To_v1_NodeAddress(in *api.NodeAddress, out *NodeAdd } 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 - } + out.RequiredDuringSchedulingIgnoredDuringExecution = (*api.NodeSelector)(unsafe.Pointer(in.RequiredDuringSchedulingIgnoredDuringExecution)) + out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]api.PreferredSchedulingTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution)) return nil } @@ -3184,26 +2171,8 @@ func Convert_v1_NodeAffinity_To_api_NodeAffinity(in *NodeAffinity, out *api.Node } 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 - } + out.RequiredDuringSchedulingIgnoredDuringExecution = (*NodeSelector)(unsafe.Pointer(in.RequiredDuringSchedulingIgnoredDuringExecution)) + out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]PreferredSchedulingTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution)) return nil } @@ -3214,12 +2183,8 @@ func Convert_api_NodeAffinity_To_v1_NodeAffinity(in *api.NodeAffinity, out *Node 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.LastHeartbeatTime = in.LastHeartbeatTime + out.LastTransitionTime = in.LastTransitionTime out.Reason = in.Reason out.Message = in.Message return nil @@ -3232,12 +2197,8 @@ func Convert_v1_NodeCondition_To_api_NodeCondition(in *NodeCondition, out *api.N 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.LastHeartbeatTime = in.LastHeartbeatTime + out.LastTransitionTime = in.LastTransitionTime out.Reason = in.Reason out.Message = in.Message return nil @@ -3270,23 +2231,8 @@ func Convert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints(in *api.NodeDaemo } 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 - } + out.ListMeta = in.ListMeta + out.Items = *(*[]api.Node)(unsafe.Pointer(&in.Items)) return nil } @@ -3295,22 +2241,11 @@ func Convert_v1_NodeList_To_api_NodeList(in *NodeList, out *api.NodeList, s conv } 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 - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]Node, 0) } else { - out.Items = nil + out.Items = *(*[]Node)(unsafe.Pointer(&in.Items)) } return nil } @@ -3320,9 +2255,6 @@ func Convert_api_NodeList_To_v1_NodeList(in *api.NodeList, out *NodeList, s conv } 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 } @@ -3332,9 +2264,6 @@ func Convert_v1_NodeProxyOptions_To_api_NodeProxyOptions(in *NodeProxyOptions, o } 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 } @@ -3343,18 +2272,26 @@ func Convert_api_NodeProxyOptions_To_v1_NodeProxyOptions(in *api.NodeProxyOption return autoConvert_api_NodeProxyOptions_To_v1_NodeProxyOptions(in, out, s) } +func autoConvert_v1_NodeResources_To_api_NodeResources(in *NodeResources, out *api.NodeResources, s conversion.Scope) error { + out.Capacity = *(*api.ResourceList)(unsafe.Pointer(&in.Capacity)) + return nil +} + +func Convert_v1_NodeResources_To_api_NodeResources(in *NodeResources, out *api.NodeResources, s conversion.Scope) error { + return autoConvert_v1_NodeResources_To_api_NodeResources(in, out, s) +} + +func autoConvert_api_NodeResources_To_v1_NodeResources(in *api.NodeResources, out *NodeResources, s conversion.Scope) error { + out.Capacity = *(*ResourceList)(unsafe.Pointer(&in.Capacity)) + return nil +} + +func Convert_api_NodeResources_To_v1_NodeResources(in *api.NodeResources, out *NodeResources, s conversion.Scope) error { + return autoConvert_api_NodeResources_To_v1_NodeResources(in, out, s) +} + func autoConvert_v1_NodeSelector_To_api_NodeSelector(in *NodeSelector, out *api.NodeSelector, s conversion.Scope) error { - 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 - } + out.NodeSelectorTerms = *(*[]api.NodeSelectorTerm)(unsafe.Pointer(&in.NodeSelectorTerms)) return nil } @@ -3363,16 +2300,10 @@ func Convert_v1_NodeSelector_To_api_NodeSelector(in *NodeSelector, out *api.Node } 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 - } - } + if in.NodeSelectorTerms == nil { + out.NodeSelectorTerms = make([]NodeSelectorTerm, 0) } else { - out.NodeSelectorTerms = nil + out.NodeSelectorTerms = *(*[]NodeSelectorTerm)(unsafe.Pointer(&in.NodeSelectorTerms)) } return nil } @@ -3384,7 +2315,7 @@ func Convert_api_NodeSelector_To_v1_NodeSelector(in *api.NodeSelector, out *Node 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 + out.Values = *(*[]string)(unsafe.Pointer(&in.Values)) return nil } @@ -3395,7 +2326,7 @@ func Convert_v1_NodeSelectorRequirement_To_api_NodeSelectorRequirement(in *NodeS 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 + out.Values = *(*[]string)(unsafe.Pointer(&in.Values)) return nil } @@ -3404,17 +2335,7 @@ func Convert_api_NodeSelectorRequirement_To_v1_NodeSelectorRequirement(in *api.N } 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 - } + out.MatchExpressions = *(*[]api.NodeSelectorRequirement)(unsafe.Pointer(&in.MatchExpressions)) return nil } @@ -3423,16 +2344,10 @@ func Convert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm(in *NodeSelectorTerm, o } 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 - } - } + if in.MatchExpressions == nil { + out.MatchExpressions = make([]NodeSelectorRequirement, 0) } else { - out.MatchExpressions = nil + out.MatchExpressions = *(*[]NodeSelectorRequirement)(unsafe.Pointer(&in.MatchExpressions)) } return nil } @@ -3446,6 +2361,7 @@ func autoConvert_v1_NodeSpec_To_api_NodeSpec(in *NodeSpec, out *api.NodeSpec, s out.ExternalID = in.ExternalID out.ProviderID = in.ProviderID out.Unschedulable = in.Unschedulable + out.Taints = *(*[]api.Taint)(unsafe.Pointer(&in.Taints)) return nil } @@ -3458,6 +2374,7 @@ func autoConvert_api_NodeSpec_To_v1_NodeSpec(in *api.NodeSpec, out *NodeSpec, s out.ExternalID = in.ExternalID out.ProviderID = in.ProviderID out.Unschedulable = in.Unschedulable + out.Taints = *(*[]Taint)(unsafe.Pointer(&in.Taints)) return nil } @@ -3466,73 +2383,20 @@ func Convert_api_NodeSpec_To_v1_NodeSpec(in *api.NodeSpec, out *NodeSpec, s conv } 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.Capacity = *(*api.ResourceList)(unsafe.Pointer(&in.Capacity)) + out.Allocatable = *(*api.ResourceList)(unsafe.Pointer(&in.Allocatable)) 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 - } + out.Conditions = *(*[]api.NodeCondition)(unsafe.Pointer(&in.Conditions)) + out.Addresses = *(*[]api.NodeAddress)(unsafe.Pointer(&in.Addresses)) if err := Convert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints(&in.DaemonEndpoints, &out.DaemonEndpoints, s); err != nil { return err } if err := Convert_v1_NodeSystemInfo_To_api_NodeSystemInfo(&in.NodeInfo, &out.NodeInfo, s); err != nil { return err } - 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 - } + out.Images = *(*[]api.ContainerImage)(unsafe.Pointer(&in.Images)) + out.VolumesInUse = *(*[]api.UniqueVolumeName)(unsafe.Pointer(&in.VolumesInUse)) + out.VolumesAttached = *(*[]api.AttachedVolume)(unsafe.Pointer(&in.VolumesAttached)) return nil } @@ -3541,92 +2405,20 @@ func Convert_v1_NodeStatus_To_api_NodeStatus(in *NodeStatus, out *api.NodeStatus } 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.Capacity = *(*ResourceList)(unsafe.Pointer(&in.Capacity)) + out.Allocatable = *(*ResourceList)(unsafe.Pointer(&in.Allocatable)) 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 - } + out.Conditions = *(*[]NodeCondition)(unsafe.Pointer(&in.Conditions)) + out.Addresses = *(*[]NodeAddress)(unsafe.Pointer(&in.Addresses)) if err := Convert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints(&in.DaemonEndpoints, &out.DaemonEndpoints, s); err != nil { return err } if err := Convert_api_NodeSystemInfo_To_v1_NodeSystemInfo(&in.NodeInfo, &out.NodeInfo, s); err != nil { return err } - 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 - } + out.Images = *(*[]ContainerImage)(unsafe.Pointer(&in.Images)) + out.VolumesInUse = *(*[]UniqueVolumeName)(unsafe.Pointer(&in.VolumesInUse)) + out.VolumesAttached = *(*[]AttachedVolume)(unsafe.Pointer(&in.VolumesAttached)) return nil } @@ -3671,7 +2463,6 @@ func Convert_api_NodeSystemInfo_To_v1_NodeSystemInfo(in *api.NodeSystemInfo, out } 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 @@ -3699,25 +2490,13 @@ func autoConvert_v1_ObjectMeta_To_api_ObjectMeta(in *ObjectMeta, out *api.Object 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 + out.CreationTimestamp = in.CreationTimestamp + out.DeletionTimestamp = (*meta_v1.Time)(unsafe.Pointer(in.DeletionTimestamp)) + out.DeletionGracePeriodSeconds = (*int64)(unsafe.Pointer(in.DeletionGracePeriodSeconds)) + out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + out.OwnerReferences = *(*[]meta_v1.OwnerReference)(unsafe.Pointer(&in.OwnerReferences)) + out.Finalizers = *(*[]string)(unsafe.Pointer(&in.Finalizers)) out.ClusterName = in.ClusterName return nil } @@ -3734,25 +2513,13 @@ func autoConvert_api_ObjectMeta_To_v1_ObjectMeta(in *api.ObjectMeta, out *Object 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 + out.CreationTimestamp = in.CreationTimestamp + out.DeletionTimestamp = (*meta_v1.Time)(unsafe.Pointer(in.DeletionTimestamp)) + out.DeletionGracePeriodSeconds = (*int64)(unsafe.Pointer(in.DeletionGracePeriodSeconds)) + out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels)) + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + out.OwnerReferences = *(*[]meta_v1.OwnerReference)(unsafe.Pointer(&in.OwnerReferences)) + out.Finalizers = *(*[]string)(unsafe.Pointer(&in.Finalizers)) out.ClusterName = in.ClusterName return nil } @@ -3791,40 +2558,8 @@ func Convert_api_ObjectReference_To_v1_ObjectReference(in *api.ObjectReference, 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3839,12 +2574,7 @@ func Convert_v1_PersistentVolume_To_api_PersistentVolume(in *PersistentVolume, o } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3859,13 +2589,7 @@ func Convert_api_PersistentVolume_To_v1_PersistentVolume(in *api.PersistentVolum } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3880,12 +2604,7 @@ func Convert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim(in *Persisten } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3900,23 +2619,8 @@ func Convert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim(in *api.Persi } 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 - } + out.ListMeta = in.ListMeta + out.Items = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.Items)) return nil } @@ -3925,22 +2629,11 @@ func Convert_v1_PersistentVolumeClaimList_To_api_PersistentVolumeClaimList(in *P } 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 - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]PersistentVolumeClaim, 0) } else { - out.Items = nil + out.Items = *(*[]PersistentVolumeClaim)(unsafe.Pointer(&in.Items)) } return nil } @@ -3950,20 +2643,13 @@ func Convert_api_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList(in *a } 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 + out.AccessModes = *(*[]api.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes)) + out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector)) if err := Convert_v1_ResourceRequirements_To_api_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil { return err } out.VolumeName = in.VolumeName + out.StorageClassName = (*string)(unsafe.Pointer(in.StorageClassName)) return nil } @@ -3972,20 +2658,13 @@ func Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(in *P } 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 + out.AccessModes = *(*[]PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes)) + out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector)) if err := Convert_api_ResourceRequirements_To_v1_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil { return err } out.VolumeName = in.VolumeName + out.StorageClassName = (*string)(unsafe.Pointer(in.StorageClassName)) return nil } @@ -3995,18 +2674,8 @@ func Convert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(in *a 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 - } + out.AccessModes = *(*[]api.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes)) + out.Capacity = *(*api.ResourceList)(unsafe.Pointer(&in.Capacity)) return nil } @@ -4016,28 +2685,8 @@ func Convert_v1_PersistentVolumeClaimStatus_To_api_PersistentVolumeClaimStatus(i 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 - } + out.AccessModes = *(*[]PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes)) + out.Capacity = *(*ResourceList)(unsafe.Pointer(&in.Capacity)) return nil } @@ -4066,12 +2715,7 @@ func Convert_api_PersistentVolumeClaimVolumeSource_To_v1_PersistentVolumeClaimVo } 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]api.PersistentVolume, len(*in)) @@ -4091,12 +2735,7 @@ func Convert_v1_PersistentVolumeList_To_api_PersistentVolumeList(in *PersistentV } 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PersistentVolume, len(*in)) @@ -4106,7 +2745,7 @@ func autoConvert_api_PersistentVolumeList_To_v1_PersistentVolumeList(in *api.Per } } } else { - out.Items = nil + out.Items = make([]PersistentVolume, 0) } return nil } @@ -4116,150 +2755,25 @@ func Convert_api_PersistentVolumeList_To_v1_PersistentVolumeList(in *api.Persist } 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 - } - if in.Quobyte != nil { - in, out := &in.Quobyte, &out.Quobyte - *out = new(api.QuobyteVolumeSource) - if err := Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(*in, *out, s); err != nil { - return err - } - } else { - out.Quobyte = nil - } - if in.AzureDisk != nil { - in, out := &in.AzureDisk, &out.AzureDisk - *out = new(api.AzureDiskVolumeSource) - if err := Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(*in, *out, s); err != nil { - return err - } - } else { - out.AzureDisk = nil - } + out.GCEPersistentDisk = (*api.GCEPersistentDiskVolumeSource)(unsafe.Pointer(in.GCEPersistentDisk)) + out.AWSElasticBlockStore = (*api.AWSElasticBlockStoreVolumeSource)(unsafe.Pointer(in.AWSElasticBlockStore)) + out.HostPath = (*api.HostPathVolumeSource)(unsafe.Pointer(in.HostPath)) + out.Glusterfs = (*api.GlusterfsVolumeSource)(unsafe.Pointer(in.Glusterfs)) + out.NFS = (*api.NFSVolumeSource)(unsafe.Pointer(in.NFS)) + out.RBD = (*api.RBDVolumeSource)(unsafe.Pointer(in.RBD)) + out.ISCSI = (*api.ISCSIVolumeSource)(unsafe.Pointer(in.ISCSI)) + out.Cinder = (*api.CinderVolumeSource)(unsafe.Pointer(in.Cinder)) + out.CephFS = (*api.CephFSVolumeSource)(unsafe.Pointer(in.CephFS)) + out.FC = (*api.FCVolumeSource)(unsafe.Pointer(in.FC)) + out.Flocker = (*api.FlockerVolumeSource)(unsafe.Pointer(in.Flocker)) + out.FlexVolume = (*api.FlexVolumeSource)(unsafe.Pointer(in.FlexVolume)) + out.AzureFile = (*api.AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile)) + out.VsphereVolume = (*api.VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume)) + out.Quobyte = (*api.QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte)) + out.AzureDisk = (*api.AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk)) + out.PhotonPersistentDisk = (*api.PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk)) + out.PortworxVolume = (*api.PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume)) + out.ScaleIO = (*api.ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO)) return nil } @@ -4268,150 +2782,25 @@ func Convert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(in *Persist } 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.Quobyte != nil { - in, out := &in.Quobyte, &out.Quobyte - *out = new(QuobyteVolumeSource) - if err := Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(*in, *out, s); err != nil { - return err - } - } else { - out.Quobyte = 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 - } - if in.AzureDisk != nil { - in, out := &in.AzureDisk, &out.AzureDisk - *out = new(AzureDiskVolumeSource) - if err := Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(*in, *out, s); err != nil { - return err - } - } else { - out.AzureDisk = nil - } + out.GCEPersistentDisk = (*GCEPersistentDiskVolumeSource)(unsafe.Pointer(in.GCEPersistentDisk)) + out.AWSElasticBlockStore = (*AWSElasticBlockStoreVolumeSource)(unsafe.Pointer(in.AWSElasticBlockStore)) + out.HostPath = (*HostPathVolumeSource)(unsafe.Pointer(in.HostPath)) + out.Glusterfs = (*GlusterfsVolumeSource)(unsafe.Pointer(in.Glusterfs)) + out.NFS = (*NFSVolumeSource)(unsafe.Pointer(in.NFS)) + out.RBD = (*RBDVolumeSource)(unsafe.Pointer(in.RBD)) + out.Quobyte = (*QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte)) + out.ISCSI = (*ISCSIVolumeSource)(unsafe.Pointer(in.ISCSI)) + out.FlexVolume = (*FlexVolumeSource)(unsafe.Pointer(in.FlexVolume)) + out.Cinder = (*CinderVolumeSource)(unsafe.Pointer(in.Cinder)) + out.CephFS = (*CephFSVolumeSource)(unsafe.Pointer(in.CephFS)) + out.FC = (*FCVolumeSource)(unsafe.Pointer(in.FC)) + out.Flocker = (*FlockerVolumeSource)(unsafe.Pointer(in.Flocker)) + out.AzureFile = (*AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile)) + out.VsphereVolume = (*VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume)) + out.AzureDisk = (*AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk)) + out.PhotonPersistentDisk = (*PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk)) + out.PortworxVolume = (*PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume)) + out.ScaleIO = (*ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO)) return nil } @@ -4420,31 +2809,14 @@ func Convert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in *api.Per } 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 - } + out.Capacity = *(*api.ResourceList)(unsafe.Pointer(&in.Capacity)) if err := Convert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(&in.PersistentVolumeSource, &out.PersistentVolumeSource, s); err != nil { return err } - 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.AccessModes = *(*[]api.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes)) + out.ClaimRef = (*api.ObjectReference)(unsafe.Pointer(in.ClaimRef)) out.PersistentVolumeReclaimPolicy = api.PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy) + out.StorageClassName = in.StorageClassName return nil } @@ -4453,41 +2825,14 @@ func Convert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(in *PersistentV } 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 - } + out.Capacity = *(*ResourceList)(unsafe.Pointer(&in.Capacity)) 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.AccessModes = *(*[]PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes)) + out.ClaimRef = (*ObjectReference)(unsafe.Pointer(in.ClaimRef)) out.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy) + out.StorageClassName = in.StorageClassName return nil } @@ -4517,14 +2862,28 @@ func Convert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus(in *api.Per return autoConvert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus(in, out, s) } +func autoConvert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource(in *PhotonPersistentDiskVolumeSource, out *api.PhotonPersistentDiskVolumeSource, s conversion.Scope) error { + out.PdID = in.PdID + out.FSType = in.FSType + return nil +} + +func Convert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource(in *PhotonPersistentDiskVolumeSource, out *api.PhotonPersistentDiskVolumeSource, s conversion.Scope) error { + return autoConvert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource(in, out, s) +} + +func autoConvert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource(in *api.PhotonPersistentDiskVolumeSource, out *PhotonPersistentDiskVolumeSource, s conversion.Scope) error { + out.PdID = in.PdID + out.FSType = in.FSType + return nil +} + +func Convert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource(in *api.PhotonPersistentDiskVolumeSource, out *PhotonPersistentDiskVolumeSource, s conversion.Scope) error { + return autoConvert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource(in, out, s) +} + func autoConvert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error { - 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodSpec_To_api_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -4535,12 +2894,7 @@ func autoConvert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) er } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodSpec_To_v1_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -4551,28 +2905,8 @@ func autoConvert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) er } 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 - } + out.RequiredDuringSchedulingIgnoredDuringExecution = *(*[]api.PodAffinityTerm)(unsafe.Pointer(&in.RequiredDuringSchedulingIgnoredDuringExecution)) + out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]api.WeightedPodAffinityTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution)) return nil } @@ -4581,28 +2915,8 @@ func Convert_v1_PodAffinity_To_api_PodAffinity(in *PodAffinity, out *api.PodAffi } 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 - } + out.RequiredDuringSchedulingIgnoredDuringExecution = *(*[]PodAffinityTerm)(unsafe.Pointer(&in.RequiredDuringSchedulingIgnoredDuringExecution)) + out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]WeightedPodAffinityTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution)) return nil } @@ -4611,8 +2925,8 @@ func Convert_api_PodAffinity_To_v1_PodAffinity(in *api.PodAffinity, out *PodAffi } 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.LabelSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.LabelSelector)) + out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces)) out.TopologyKey = in.TopologyKey return nil } @@ -4622,8 +2936,8 @@ func Convert_v1_PodAffinityTerm_To_api_PodAffinityTerm(in *PodAffinityTerm, out } 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.LabelSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.LabelSelector)) + out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces)) out.TopologyKey = in.TopologyKey return nil } @@ -4633,28 +2947,8 @@ func Convert_api_PodAffinityTerm_To_v1_PodAffinityTerm(in *api.PodAffinityTerm, } 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 - } + out.RequiredDuringSchedulingIgnoredDuringExecution = *(*[]api.PodAffinityTerm)(unsafe.Pointer(&in.RequiredDuringSchedulingIgnoredDuringExecution)) + out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]api.WeightedPodAffinityTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution)) return nil } @@ -4663,28 +2957,8 @@ func Convert_v1_PodAntiAffinity_To_api_PodAntiAffinity(in *PodAntiAffinity, out } 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 - } + out.RequiredDuringSchedulingIgnoredDuringExecution = *(*[]PodAffinityTerm)(unsafe.Pointer(&in.RequiredDuringSchedulingIgnoredDuringExecution)) + out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]WeightedPodAffinityTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution)) return nil } @@ -4693,10 +2967,6 @@ func Convert_api_PodAntiAffinity_To_v1_PodAntiAffinity(in *api.PodAntiAffinity, } 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 @@ -4710,9 +2980,6 @@ func Convert_v1_PodAttachOptions_To_api_PodAttachOptions(in *PodAttachOptions, o } 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 @@ -4728,12 +2995,8 @@ func Convert_api_PodAttachOptions_To_v1_PodAttachOptions(in *api.PodAttachOption 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.LastProbeTime = in.LastProbeTime + out.LastTransitionTime = in.LastTransitionTime out.Reason = in.Reason out.Message = in.Message return nil @@ -4746,12 +3009,8 @@ func Convert_v1_PodCondition_To_api_PodCondition(in *PodCondition, out *api.PodC 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.LastProbeTime = in.LastProbeTime + out.LastTransitionTime = in.LastTransitionTime out.Reason = in.Reason out.Message = in.Message return nil @@ -4762,16 +3021,12 @@ func Convert_api_PodCondition_To_v1_PodCondition(in *api.PodCondition, out *PodC } 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 + out.Command = *(*[]string)(unsafe.Pointer(&in.Command)) return nil } @@ -4780,15 +3035,16 @@ func Convert_v1_PodExecOptions_To_api_PodExecOptions(in *PodExecOptions, out *ap } 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 + if in.Command == nil { + out.Command = make([]string, 0) + } else { + out.Command = *(*[]string)(unsafe.Pointer(&in.Command)) + } return nil } @@ -4797,12 +3053,7 @@ func Convert_api_PodExecOptions_To_v1_PodExecOptions(in *api.PodExecOptions, out } 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]api.Pod, len(*in)) @@ -4822,12 +3073,7 @@ func Convert_v1_PodList_To_api_PodList(in *PodList, out *api.PodList, s conversi } 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Pod, len(*in)) @@ -4837,7 +3083,7 @@ func autoConvert_api_PodList_To_v1_PodList(in *api.PodList, out *PodList, s conv } } } else { - out.Items = nil + out.Items = make([]Pod, 0) } return nil } @@ -4847,17 +3093,14 @@ func Convert_api_PodList_To_v1_PodList(in *api.PodList, out *PodList, s conversi } 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.SinceSeconds = (*int64)(unsafe.Pointer(in.SinceSeconds)) + out.SinceTime = (*meta_v1.Time)(unsafe.Pointer(in.SinceTime)) out.Timestamps = in.Timestamps - out.TailLines = in.TailLines - out.LimitBytes = in.LimitBytes + out.TailLines = (*int64)(unsafe.Pointer(in.TailLines)) + out.LimitBytes = (*int64)(unsafe.Pointer(in.LimitBytes)) return nil } @@ -4866,17 +3109,14 @@ func Convert_v1_PodLogOptions_To_api_PodLogOptions(in *PodLogOptions, out *api.P } 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.SinceSeconds = (*int64)(unsafe.Pointer(in.SinceSeconds)) + out.SinceTime = (*meta_v1.Time)(unsafe.Pointer(in.SinceTime)) out.Timestamps = in.Timestamps - out.TailLines = in.TailLines - out.LimitBytes = in.LimitBytes + out.TailLines = (*int64)(unsafe.Pointer(in.TailLines)) + out.LimitBytes = (*int64)(unsafe.Pointer(in.LimitBytes)) return nil } @@ -4884,10 +3124,25 @@ func Convert_api_PodLogOptions_To_v1_PodLogOptions(in *api.PodLogOptions, out *P return autoConvert_api_PodLogOptions_To_v1_PodLogOptions(in, out, s) } +func autoConvert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in *PodPortForwardOptions, out *api.PodPortForwardOptions, s conversion.Scope) error { + out.Ports = *(*[]int32)(unsafe.Pointer(&in.Ports)) + return nil +} + +func Convert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in *PodPortForwardOptions, out *api.PodPortForwardOptions, s conversion.Scope) error { + return autoConvert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in, out, s) +} + +func autoConvert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in *api.PodPortForwardOptions, out *PodPortForwardOptions, s conversion.Scope) error { + out.Ports = *(*[]int32)(unsafe.Pointer(&in.Ports)) + return nil +} + +func Convert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in *api.PodPortForwardOptions, out *PodPortForwardOptions, s conversion.Scope) error { + return autoConvert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in, out, s) +} + func autoConvert_v1_PodProxyOptions_To_api_PodProxyOptions(in *PodProxyOptions, out *api.PodProxyOptions, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } out.Path = in.Path return nil } @@ -4897,9 +3152,6 @@ func Convert_v1_PodProxyOptions_To_api_PodProxyOptions(in *PodProxyOptions, out } 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 } @@ -4909,19 +3161,11 @@ func Convert_api_PodProxyOptions_To_v1_PodProxyOptions(in *api.PodProxyOptions, } 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 + out.SELinuxOptions = (*api.SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions)) + out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser)) + out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot)) + out.SupplementalGroups = *(*[]int64)(unsafe.Pointer(&in.SupplementalGroups)) + out.FSGroup = (*int64)(unsafe.Pointer(in.FSGroup)) return nil } @@ -4929,32 +3173,16 @@ func autoConvert_api_PodSecurityContext_To_v1_PodSecurityContext(in *api.PodSecu // INFO: in.HostNetwork opted out of conversion generation // INFO: in.HostPID opted out of conversion generation // INFO: in.HostIPC opted out of conversion generation - if in.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 + out.SELinuxOptions = (*SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions)) + out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser)) + out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot)) + out.SupplementalGroups = *(*[]int64)(unsafe.Pointer(&in.SupplementalGroups)) + out.FSGroup = (*int64)(unsafe.Pointer(in.FSGroup)) return nil } func autoConvert_v1_PodSignature_To_api_PodSignature(in *PodSignature, out *api.PodSignature, s conversion.Scope) error { - if in.PodController != nil { - in, out := &in.PodController, &out.PodController - *out = new(api.OwnerReference) - if err := Convert_v1_OwnerReference_To_api_OwnerReference(*in, *out, s); err != nil { - return err - } - } else { - out.PodController = nil - } + out.PodController = (*meta_v1.OwnerReference)(unsafe.Pointer(in.PodController)) return nil } @@ -4963,15 +3191,7 @@ func Convert_v1_PodSignature_To_api_PodSignature(in *PodSignature, out *api.PodS } func autoConvert_api_PodSignature_To_v1_PodSignature(in *api.PodSignature, out *PodSignature, s conversion.Scope) error { - if in.PodController != nil { - in, out := &in.PodController, &out.PodController - *out = new(OwnerReference) - if err := Convert_api_OwnerReference_To_v1_OwnerReference(*in, *out, s); err != nil { - return err - } - } else { - out.PodController = nil - } + out.PodController = (*meta_v1.OwnerReference)(unsafe.Pointer(in.PodController)) return nil } @@ -4980,7 +3200,6 @@ func Convert_api_PodSignature_To_v1_PodSignature(in *api.PodSignature, out *PodS } 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)) @@ -4992,35 +3211,16 @@ func autoConvert_v1_PodSpec_To_api_PodSpec(in *PodSpec, out *api.PodSpec, s conv } 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.InitContainers = *(*[]api.Container)(unsafe.Pointer(&in.InitContainers)) + out.Containers = *(*[]api.Container)(unsafe.Pointer(&in.Containers)) out.RestartPolicy = api.RestartPolicy(in.RestartPolicy) - out.TerminationGracePeriodSeconds = in.TerminationGracePeriodSeconds - out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds + out.TerminationGracePeriodSeconds = (*int64)(unsafe.Pointer(in.TerminationGracePeriodSeconds)) + out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds)) out.DNSPolicy = api.DNSPolicy(in.DNSPolicy) - out.NodeSelector = in.NodeSelector + out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector)) out.ServiceAccountName = in.ServiceAccountName // INFO: in.DeprecatedServiceAccount opted out of conversion generation + out.AutomountServiceAccountToken = (*bool)(unsafe.Pointer(in.AutomountServiceAccountToken)) out.NodeName = in.NodeName // INFO: in.HostNetwork opted out of conversion generation // INFO: in.HostPID opted out of conversion generation @@ -5034,19 +3234,12 @@ func autoConvert_v1_PodSpec_To_api_PodSpec(in *PodSpec, out *api.PodSpec, s conv } 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.ImagePullSecrets = *(*[]api.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) out.Hostname = in.Hostname out.Subdomain = in.Subdomain + out.Affinity = (*api.Affinity)(unsafe.Pointer(in.Affinity)) + out.SchedulerName = in.SchedulerName + out.Tolerations = *(*[]api.Toleration)(unsafe.Pointer(&in.Tolerations)) return nil } @@ -5062,34 +3255,19 @@ func autoConvert_api_PodSpec_To_v1_PodSpec(in *api.PodSpec, out *PodSpec, s conv } 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 - } - } + out.InitContainers = *(*[]Container)(unsafe.Pointer(&in.InitContainers)) + if in.Containers == nil { + out.Containers = make([]Container, 0) } 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.Containers = *(*[]Container)(unsafe.Pointer(&in.Containers)) } out.RestartPolicy = RestartPolicy(in.RestartPolicy) - out.TerminationGracePeriodSeconds = in.TerminationGracePeriodSeconds - out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds + out.TerminationGracePeriodSeconds = (*int64)(unsafe.Pointer(in.TerminationGracePeriodSeconds)) + out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds)) out.DNSPolicy = DNSPolicy(in.DNSPolicy) - out.NodeSelector = in.NodeSelector + out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector)) out.ServiceAccountName = in.ServiceAccountName + out.AutomountServiceAccountToken = (*bool)(unsafe.Pointer(in.AutomountServiceAccountToken)) out.NodeName = in.NodeName if in.SecurityContext != nil { in, out := &in.SecurityContext, &out.SecurityContext @@ -5100,62 +3278,26 @@ func autoConvert_api_PodSpec_To_v1_PodSpec(in *api.PodSpec, out *PodSpec, s conv } 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.ImagePullSecrets = *(*[]LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) out.Hostname = in.Hostname out.Subdomain = in.Subdomain + out.Affinity = (*Affinity)(unsafe.Pointer(in.Affinity)) + out.SchedulerName = in.SchedulerName + out.Tolerations = *(*[]Toleration)(unsafe.Pointer(&in.Tolerations)) 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.Conditions = *(*[]api.PodCondition)(unsafe.Pointer(&in.Conditions)) out.Message = in.Message out.Reason = in.Reason out.HostIP = in.HostIP out.PodIP = in.PodIP - out.StartTime = 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 - } + out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime)) + out.InitContainerStatuses = *(*[]api.ContainerStatus)(unsafe.Pointer(&in.InitContainerStatuses)) + out.ContainerStatuses = *(*[]api.ContainerStatus)(unsafe.Pointer(&in.ContainerStatuses)) + out.QOSClass = api.PodQOSClass(in.QOSClass) return nil } @@ -5165,44 +3307,15 @@ func Convert_v1_PodStatus_To_api_PodStatus(in *PodStatus, out *api.PodStatus, 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.Conditions = *(*[]PodCondition)(unsafe.Pointer(&in.Conditions)) 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 - } + out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime)) + out.QOSClass = PodQOSClass(in.QOSClass) + out.InitContainerStatuses = *(*[]ContainerStatus)(unsafe.Pointer(&in.InitContainerStatuses)) + out.ContainerStatuses = *(*[]ContainerStatus)(unsafe.Pointer(&in.ContainerStatuses)) return nil } @@ -5211,12 +3324,7 @@ func Convert_api_PodStatus_To_v1_PodStatus(in *api.PodStatus, out *PodStatus, 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodStatus_To_api_PodStatus(&in.Status, &out.Status, s); err != nil { return err } @@ -5224,12 +3332,7 @@ func autoConvert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodStatus_To_v1_PodStatus(&in.Status, &out.Status, s); err != nil { return err } @@ -5237,12 +3340,7 @@ func autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResu } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -5254,12 +3352,7 @@ func Convert_v1_PodTemplate_To_api_PodTemplate(in *PodTemplate, out *api.PodTemp } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -5271,12 +3364,7 @@ func Convert_api_PodTemplate_To_v1_PodTemplate(in *api.PodTemplate, out *PodTemp } 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]api.PodTemplate, len(*in)) @@ -5296,12 +3384,7 @@ func Convert_v1_PodTemplateList_To_api_PodTemplateList(in *PodTemplateList, out } 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PodTemplate, len(*in)) @@ -5311,7 +3394,7 @@ func autoConvert_api_PodTemplateList_To_v1_PodTemplateList(in *api.PodTemplateLi } } } else { - out.Items = nil + out.Items = make([]PodTemplate, 0) } return nil } @@ -5321,9 +3404,7 @@ func Convert_api_PodTemplateList_To_v1_PodTemplateList(in *api.PodTemplateList, } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodSpec_To_api_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -5331,17 +3412,37 @@ func autoConvert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodSpec_To_v1_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil } +func autoConvert_v1_PortworxVolumeSource_To_api_PortworxVolumeSource(in *PortworxVolumeSource, out *api.PortworxVolumeSource, s conversion.Scope) error { + out.VolumeID = in.VolumeID + out.FSType = in.FSType + out.ReadOnly = in.ReadOnly + return nil +} + +func Convert_v1_PortworxVolumeSource_To_api_PortworxVolumeSource(in *PortworxVolumeSource, out *api.PortworxVolumeSource, s conversion.Scope) error { + return autoConvert_v1_PortworxVolumeSource_To_api_PortworxVolumeSource(in, out, s) +} + +func autoConvert_api_PortworxVolumeSource_To_v1_PortworxVolumeSource(in *api.PortworxVolumeSource, out *PortworxVolumeSource, s conversion.Scope) error { + out.VolumeID = in.VolumeID + out.FSType = in.FSType + out.ReadOnly = in.ReadOnly + return nil +} + +func Convert_api_PortworxVolumeSource_To_v1_PortworxVolumeSource(in *api.PortworxVolumeSource, out *PortworxVolumeSource, s conversion.Scope) error { + return autoConvert_api_PortworxVolumeSource_To_v1_PortworxVolumeSource(in, out, s) +} + func autoConvert_v1_Preconditions_To_api_Preconditions(in *Preconditions, out *api.Preconditions, s conversion.Scope) error { - out.UID = in.UID + out.UID = (*types.UID)(unsafe.Pointer(in.UID)) return nil } @@ -5350,7 +3451,7 @@ func Convert_v1_Preconditions_To_api_Preconditions(in *Preconditions, out *api.P } func autoConvert_api_Preconditions_To_v1_Preconditions(in *api.Preconditions, out *Preconditions, s conversion.Scope) error { - out.UID = in.UID + out.UID = (*types.UID)(unsafe.Pointer(in.UID)) return nil } @@ -5362,9 +3463,7 @@ func autoConvert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry(in *PreferA if err := Convert_v1_PodSignature_To_api_PodSignature(&in.PodSignature, &out.PodSignature, s); err != nil { return err } - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.EvictionTime, &out.EvictionTime, s); err != nil { - return err - } + out.EvictionTime = in.EvictionTime out.Reason = in.Reason out.Message = in.Message return nil @@ -5378,9 +3477,7 @@ func autoConvert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry(in *api.Pre if err := Convert_api_PodSignature_To_v1_PodSignature(&in.PodSignature, &out.PodSignature, s); err != nil { return err } - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.EvictionTime, &out.EvictionTime, s); err != nil { - return err - } + out.EvictionTime = in.EvictionTime out.Reason = in.Reason out.Message = in.Message return nil @@ -5415,7 +3512,6 @@ func Convert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm(in *api.P } 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 } @@ -5447,6 +3543,30 @@ func Convert_api_Probe_To_v1_Probe(in *api.Probe, out *Probe, s conversion.Scope return autoConvert_api_Probe_To_v1_Probe(in, out, s) } +func autoConvert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource(in *ProjectedVolumeSource, out *api.ProjectedVolumeSource, s conversion.Scope) error { + out.Sources = *(*[]api.VolumeProjection)(unsafe.Pointer(&in.Sources)) + out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode)) + return nil +} + +func Convert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource(in *ProjectedVolumeSource, out *api.ProjectedVolumeSource, s conversion.Scope) error { + return autoConvert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource(in, out, s) +} + +func autoConvert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource(in *api.ProjectedVolumeSource, out *ProjectedVolumeSource, s conversion.Scope) error { + if in.Sources == nil { + out.Sources = make([]VolumeProjection, 0) + } else { + out.Sources = *(*[]VolumeProjection)(unsafe.Pointer(&in.Sources)) + } + out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode)) + return nil +} + +func Convert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource(in *api.ProjectedVolumeSource, out *ProjectedVolumeSource, s conversion.Scope) error { + return autoConvert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource(in, out, s) +} + func autoConvert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(in *QuobyteVolumeSource, out *api.QuobyteVolumeSource, s conversion.Scope) error { out.Registry = in.Registry out.Volume = in.Volume @@ -5474,22 +3594,13 @@ func Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(in *api.QuobyteVo } func autoConvert_v1_RBDVolumeSource_To_api_RBDVolumeSource(in *RBDVolumeSource, out *api.RBDVolumeSource, s conversion.Scope) error { - SetDefaults_RBDVolumeSource(in) - out.CephMonitors = in.CephMonitors + out.CephMonitors = *(*[]string)(unsafe.Pointer(&in.CephMonitors)) out.RBDImage = in.RBDImage out.FSType = in.FSType out.RBDPool = in.RBDPool out.RadosUser = in.RadosUser out.Keyring = in.Keyring - 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.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef)) out.ReadOnly = in.ReadOnly return nil } @@ -5499,21 +3610,17 @@ func Convert_v1_RBDVolumeSource_To_api_RBDVolumeSource(in *RBDVolumeSource, out } func autoConvert_api_RBDVolumeSource_To_v1_RBDVolumeSource(in *api.RBDVolumeSource, out *RBDVolumeSource, s conversion.Scope) error { - out.CephMonitors = in.CephMonitors + if in.CephMonitors == nil { + out.CephMonitors = make([]string, 0) + } else { + out.CephMonitors = *(*[]string)(unsafe.Pointer(&in.CephMonitors)) + } out.RBDImage = in.RBDImage out.FSType = in.FSType out.RBDPool = in.RBDPool out.RadosUser = in.RadosUser out.Keyring = in.Keyring - 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.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef)) out.ReadOnly = in.ReadOnly return nil } @@ -5523,16 +3630,9 @@ func Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource(in *api.RBDVolumeSource, } 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.ObjectMeta = in.ObjectMeta out.Range = in.Range - if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Data, &out.Data, s); err != nil { - return err - } + out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil } @@ -5541,15 +3641,12 @@ func Convert_v1_RangeAllocation_To_api_RangeAllocation(in *RangeAllocation, out } 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.ObjectMeta = in.ObjectMeta out.Range = in.Range - if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Data, &out.Data, s); err != nil { - return err + if in.Data == nil { + out.Data = make([]byte, 0) + } else { + out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) } return nil } @@ -5559,13 +3656,7 @@ func Convert_api_RangeAllocation_To_v1_RangeAllocation(in *api.RangeAllocation, } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -5580,12 +3671,7 @@ func Convert_v1_ReplicationController_To_api_ReplicationController(in *Replicati } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -5599,13 +3685,34 @@ func Convert_api_ReplicationController_To_v1_ReplicationController(in *api.Repli return autoConvert_api_ReplicationController_To_v1_ReplicationController(in, out, s) } +func autoConvert_v1_ReplicationControllerCondition_To_api_ReplicationControllerCondition(in *ReplicationControllerCondition, out *api.ReplicationControllerCondition, s conversion.Scope) error { + out.Type = api.ReplicationControllerConditionType(in.Type) + out.Status = api.ConditionStatus(in.Status) + out.LastTransitionTime = in.LastTransitionTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +func Convert_v1_ReplicationControllerCondition_To_api_ReplicationControllerCondition(in *ReplicationControllerCondition, out *api.ReplicationControllerCondition, s conversion.Scope) error { + return autoConvert_v1_ReplicationControllerCondition_To_api_ReplicationControllerCondition(in, out, s) +} + +func autoConvert_api_ReplicationControllerCondition_To_v1_ReplicationControllerCondition(in *api.ReplicationControllerCondition, out *ReplicationControllerCondition, s conversion.Scope) error { + out.Type = ReplicationControllerConditionType(in.Type) + out.Status = ConditionStatus(in.Status) + out.LastTransitionTime = in.LastTransitionTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +func Convert_api_ReplicationControllerCondition_To_v1_ReplicationControllerCondition(in *api.ReplicationControllerCondition, out *ReplicationControllerCondition, s conversion.Scope) error { + return autoConvert_api_ReplicationControllerCondition_To_v1_ReplicationControllerCondition(in, out, s) +} + func autoConvert_v1_ReplicationControllerList_To_api_ReplicationControllerList(in *ReplicationControllerList, out *api.ReplicationControllerList, s conversion.Scope) error { - 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]api.ReplicationController, len(*in)) @@ -5625,12 +3732,7 @@ func Convert_v1_ReplicationControllerList_To_api_ReplicationControllerList(in *R } 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ReplicationController, len(*in)) @@ -5640,7 +3742,7 @@ func autoConvert_api_ReplicationControllerList_To_v1_ReplicationControllerList(i } } } else { - out.Items = nil + out.Items = make([]ReplicationController, 0) } return nil } @@ -5650,10 +3752,11 @@ func Convert_api_ReplicationControllerList_To_v1_ReplicationControllerList(in *a } func autoConvert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(in *ReplicationControllerSpec, out *api.ReplicationControllerSpec, s conversion.Scope) error { - if err := api.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil { + if err := meta_v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil { return err } - out.Selector = in.Selector + out.MinReadySeconds = in.MinReadySeconds + out.Selector = *(*map[string]string)(unsafe.Pointer(&in.Selector)) if in.Template != nil { in, out := &in.Template, &out.Template *out = new(api.PodTemplateSpec) @@ -5667,10 +3770,11 @@ func autoConvert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(i } func autoConvert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(in *api.ReplicationControllerSpec, out *ReplicationControllerSpec, s conversion.Scope) error { - if err := api.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil { + if err := meta_v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil { return err } - out.Selector = in.Selector + out.MinReadySeconds = in.MinReadySeconds + out.Selector = *(*map[string]string)(unsafe.Pointer(&in.Selector)) if in.Template != nil { in, out := &in.Template, &out.Template *out = new(PodTemplateSpec) @@ -5687,7 +3791,9 @@ func autoConvert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStat out.Replicas = in.Replicas out.FullyLabeledReplicas = in.FullyLabeledReplicas out.ReadyReplicas = in.ReadyReplicas + out.AvailableReplicas = in.AvailableReplicas out.ObservedGeneration = in.ObservedGeneration + out.Conditions = *(*[]api.ReplicationControllerCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -5699,7 +3805,9 @@ func autoConvert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStat out.Replicas = in.Replicas out.FullyLabeledReplicas = in.FullyLabeledReplicas out.ReadyReplicas = in.ReadyReplicas + out.AvailableReplicas = in.AvailableReplicas out.ObservedGeneration = in.ObservedGeneration + out.Conditions = *(*[]ReplicationControllerCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -5710,9 +3818,7 @@ func Convert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(i 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 - } + out.Divisor = in.Divisor return nil } @@ -5723,9 +3829,7 @@ func Convert_v1_ResourceFieldSelector_To_api_ResourceFieldSelector(in *ResourceF 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 - } + out.Divisor = in.Divisor return nil } @@ -5734,12 +3838,7 @@ func Convert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector(in *api.Resou } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -5754,12 +3853,7 @@ func Convert_v1_ResourceQuota_To_api_ResourceQuota(in *ResourceQuota, out *api.R } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -5774,23 +3868,8 @@ func Convert_api_ResourceQuota_To_v1_ResourceQuota(in *api.ResourceQuota, out *R } 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 - } + out.ListMeta = in.ListMeta + out.Items = *(*[]api.ResourceQuota)(unsafe.Pointer(&in.Items)) return nil } @@ -5799,22 +3878,11 @@ func Convert_v1_ResourceQuotaList_To_api_ResourceQuotaList(in *ResourceQuotaList } 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 - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]ResourceQuota, 0) } else { - out.Items = nil + out.Items = *(*[]ResourceQuota)(unsafe.Pointer(&in.Items)) } return nil } @@ -5824,18 +3892,8 @@ func Convert_api_ResourceQuotaList_To_v1_ResourceQuotaList(in *api.ResourceQuota } 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 - } + out.Hard = *(*api.ResourceList)(unsafe.Pointer(&in.Hard)) + out.Scopes = *(*[]api.ResourceQuotaScope)(unsafe.Pointer(&in.Scopes)) return nil } @@ -5844,28 +3902,8 @@ func Convert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec(in *ResourceQuotaSpec } 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 - } + out.Hard = *(*ResourceList)(unsafe.Pointer(&in.Hard)) + out.Scopes = *(*[]ResourceQuotaScope)(unsafe.Pointer(&in.Scopes)) return nil } @@ -5874,12 +3912,8 @@ func Convert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(in *api.ResourceQuota } 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 - } + out.Hard = *(*api.ResourceList)(unsafe.Pointer(&in.Hard)) + out.Used = *(*api.ResourceList)(unsafe.Pointer(&in.Used)) return nil } @@ -5888,32 +3922,8 @@ func Convert_v1_ResourceQuotaStatus_To_api_ResourceQuotaStatus(in *ResourceQuota } 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 - } + out.Hard = *(*ResourceList)(unsafe.Pointer(&in.Hard)) + out.Used = *(*ResourceList)(unsafe.Pointer(&in.Used)) return nil } @@ -5922,12 +3932,8 @@ func Convert_api_ResourceQuotaStatus_To_v1_ResourceQuotaStatus(in *api.ResourceQ } 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 - } + out.Limits = *(*api.ResourceList)(unsafe.Pointer(&in.Limits)) + out.Requests = *(*api.ResourceList)(unsafe.Pointer(&in.Requests)) return nil } @@ -5936,32 +3942,8 @@ func Convert_v1_ResourceRequirements_To_api_ResourceRequirements(in *ResourceReq } 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 - } + out.Limits = *(*ResourceList)(unsafe.Pointer(&in.Limits)) + out.Requests = *(*ResourceList)(unsafe.Pointer(&in.Requests)) return nil } @@ -5993,28 +3975,53 @@ func Convert_api_SELinuxOptions_To_v1_SELinuxOptions(in *api.SELinuxOptions, out return autoConvert_api_SELinuxOptions_To_v1_SELinuxOptions(in, out, s) } +func autoConvert_v1_ScaleIOVolumeSource_To_api_ScaleIOVolumeSource(in *ScaleIOVolumeSource, out *api.ScaleIOVolumeSource, s conversion.Scope) error { + out.Gateway = in.Gateway + out.System = in.System + out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef)) + out.SSLEnabled = in.SSLEnabled + out.ProtectionDomain = in.ProtectionDomain + out.StoragePool = in.StoragePool + out.StorageMode = in.StorageMode + out.VolumeName = in.VolumeName + out.FSType = in.FSType + out.ReadOnly = in.ReadOnly + return nil +} + +func Convert_v1_ScaleIOVolumeSource_To_api_ScaleIOVolumeSource(in *ScaleIOVolumeSource, out *api.ScaleIOVolumeSource, s conversion.Scope) error { + return autoConvert_v1_ScaleIOVolumeSource_To_api_ScaleIOVolumeSource(in, out, s) +} + +func autoConvert_api_ScaleIOVolumeSource_To_v1_ScaleIOVolumeSource(in *api.ScaleIOVolumeSource, out *ScaleIOVolumeSource, s conversion.Scope) error { + out.Gateway = in.Gateway + out.System = in.System + out.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef)) + out.SSLEnabled = in.SSLEnabled + out.ProtectionDomain = in.ProtectionDomain + out.StoragePool = in.StoragePool + out.StorageMode = in.StorageMode + out.VolumeName = in.VolumeName + out.FSType = in.FSType + out.ReadOnly = in.ReadOnly + return nil +} + +func Convert_api_ScaleIOVolumeSource_To_v1_ScaleIOVolumeSource(in *api.ScaleIOVolumeSource, out *ScaleIOVolumeSource, s conversion.Scope) error { + return autoConvert_api_ScaleIOVolumeSource_To_v1_ScaleIOVolumeSource(in, out, s) +} + func autoConvert_v1_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversion.Scope) error { - 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.ObjectMeta = in.ObjectMeta + out.Data = *(*map[string][]byte)(unsafe.Pointer(&in.Data)) // INFO: in.StringData opted out of conversion generation out.Type = api.SecretType(in.Type) return nil } func autoConvert_api_Secret_To_v1_Secret(in *api.Secret, out *Secret, s conversion.Scope) error { - 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.ObjectMeta = in.ObjectMeta + out.Data = *(*map[string][]byte)(unsafe.Pointer(&in.Data)) out.Type = SecretType(in.Type) return nil } @@ -6023,11 +4030,36 @@ func Convert_api_Secret_To_v1_Secret(in *api.Secret, out *Secret, s conversion.S return autoConvert_api_Secret_To_v1_Secret(in, out, s) } +func autoConvert_v1_SecretEnvSource_To_api_SecretEnvSource(in *SecretEnvSource, out *api.SecretEnvSource, s conversion.Scope) error { + if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { + return err + } + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) + return nil +} + +func Convert_v1_SecretEnvSource_To_api_SecretEnvSource(in *SecretEnvSource, out *api.SecretEnvSource, s conversion.Scope) error { + return autoConvert_v1_SecretEnvSource_To_api_SecretEnvSource(in, out, s) +} + +func autoConvert_api_SecretEnvSource_To_v1_SecretEnvSource(in *api.SecretEnvSource, out *SecretEnvSource, s conversion.Scope) error { + if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { + return err + } + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) + return nil +} + +func Convert_api_SecretEnvSource_To_v1_SecretEnvSource(in *api.SecretEnvSource, out *SecretEnvSource, s conversion.Scope) error { + return autoConvert_api_SecretEnvSource_To_v1_SecretEnvSource(in, out, s) +} + func autoConvert_v1_SecretKeySelector_To_api_SecretKeySelector(in *SecretKeySelector, out *api.SecretKeySelector, s conversion.Scope) error { if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { return err } out.Key = in.Key + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -6040,6 +4072,7 @@ func autoConvert_api_SecretKeySelector_To_v1_SecretKeySelector(in *api.SecretKey return err } out.Key = in.Key + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -6048,12 +4081,7 @@ func Convert_api_SecretKeySelector_To_v1_SecretKeySelector(in *api.SecretKeySele } 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]api.Secret, len(*in)) @@ -6073,12 +4101,7 @@ func Convert_v1_SecretList_To_api_SecretList(in *SecretList, out *api.SecretList } 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Secret, len(*in)) @@ -6088,7 +4111,7 @@ func autoConvert_api_SecretList_To_v1_SecretList(in *api.SecretList, out *Secret } } } else { - out.Items = nil + out.Items = make([]Secret, 0) } return nil } @@ -6097,21 +4120,37 @@ func Convert_api_SecretList_To_v1_SecretList(in *api.SecretList, out *SecretList 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 { - SetDefaults_SecretVolumeSource(in) - 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 +func autoConvert_v1_SecretProjection_To_api_SecretProjection(in *SecretProjection, out *api.SecretProjection, s conversion.Scope) error { + if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { + return err } - out.DefaultMode = in.DefaultMode + out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items)) + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) + return nil +} + +func Convert_v1_SecretProjection_To_api_SecretProjection(in *SecretProjection, out *api.SecretProjection, s conversion.Scope) error { + return autoConvert_v1_SecretProjection_To_api_SecretProjection(in, out, s) +} + +func autoConvert_api_SecretProjection_To_v1_SecretProjection(in *api.SecretProjection, out *SecretProjection, s conversion.Scope) error { + if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { + return err + } + out.Items = *(*[]KeyToPath)(unsafe.Pointer(&in.Items)) + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) + return nil +} + +func Convert_api_SecretProjection_To_v1_SecretProjection(in *api.SecretProjection, out *SecretProjection, s conversion.Scope) error { + return autoConvert_api_SecretProjection_To_v1_SecretProjection(in, out, s) +} + +func autoConvert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in *SecretVolumeSource, out *api.SecretVolumeSource, s conversion.Scope) error { + out.SecretName = in.SecretName + out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items)) + out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode)) + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -6121,18 +4160,9 @@ func Convert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in *SecretVolumeSou 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 - } - out.DefaultMode = in.DefaultMode + out.Items = *(*[]KeyToPath)(unsafe.Pointer(&in.Items)) + out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode)) + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -6141,28 +4171,12 @@ func Convert_api_SecretVolumeSource_To_v1_SecretVolumeSource(in *api.SecretVolum } 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 + out.Capabilities = (*api.Capabilities)(unsafe.Pointer(in.Capabilities)) + out.Privileged = (*bool)(unsafe.Pointer(in.Privileged)) + out.SELinuxOptions = (*api.SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions)) + out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser)) + out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot)) + out.ReadOnlyRootFilesystem = (*bool)(unsafe.Pointer(in.ReadOnlyRootFilesystem)) return nil } @@ -6171,28 +4185,12 @@ func Convert_v1_SecurityContext_To_api_SecurityContext(in *SecurityContext, out } 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 + out.Capabilities = (*Capabilities)(unsafe.Pointer(in.Capabilities)) + out.Privileged = (*bool)(unsafe.Pointer(in.Privileged)) + out.SELinuxOptions = (*SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions)) + out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser)) + out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot)) + out.ReadOnlyRootFilesystem = (*bool)(unsafe.Pointer(in.ReadOnlyRootFilesystem)) return nil } @@ -6201,9 +4199,6 @@ func Convert_api_SecurityContext_To_v1_SecurityContext(in *api.SecurityContext, } 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 } @@ -6215,9 +4210,6 @@ func Convert_v1_SerializedReference_To_api_SerializedReference(in *SerializedRef } 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 } @@ -6229,12 +4221,7 @@ func Convert_api_SerializedReference_To_v1_SerializedReference(in *api.Serialize } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ServiceSpec_To_api_ServiceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -6249,12 +4236,7 @@ func Convert_v1_Service_To_api_Service(in *Service, out *api.Service, s conversi } 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 - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ServiceSpec_To_v1_ServiceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -6269,34 +4251,10 @@ func Convert_api_Service_To_v1_Service(in *api.Service, out *Service, s conversi } 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 - } + out.ObjectMeta = in.ObjectMeta + out.Secrets = *(*[]api.ObjectReference)(unsafe.Pointer(&in.Secrets)) + out.ImagePullSecrets = *(*[]api.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) + out.AutomountServiceAccountToken = (*bool)(unsafe.Pointer(in.AutomountServiceAccountToken)) return nil } @@ -6305,34 +4263,10 @@ func Convert_v1_ServiceAccount_To_api_ServiceAccount(in *ServiceAccount, out *ap } 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 - } + out.ObjectMeta = in.ObjectMeta + out.Secrets = *(*[]ObjectReference)(unsafe.Pointer(&in.Secrets)) + out.ImagePullSecrets = *(*[]LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) + out.AutomountServiceAccountToken = (*bool)(unsafe.Pointer(in.AutomountServiceAccountToken)) return nil } @@ -6341,23 +4275,8 @@ func Convert_api_ServiceAccount_To_v1_ServiceAccount(in *api.ServiceAccount, out } 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 - } + out.ListMeta = in.ListMeta + out.Items = *(*[]api.ServiceAccount)(unsafe.Pointer(&in.Items)) return nil } @@ -6366,22 +4285,11 @@ func Convert_v1_ServiceAccountList_To_api_ServiceAccountList(in *ServiceAccountL } 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 - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]ServiceAccount, 0) } else { - out.Items = nil + out.Items = *(*[]ServiceAccount)(unsafe.Pointer(&in.Items)) } return nil } @@ -6391,12 +4299,7 @@ func Convert_api_ServiceAccountList_To_v1_ServiceAccountList(in *api.ServiceAcco } 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]api.Service, len(*in)) @@ -6416,12 +4319,7 @@ func Convert_v1_ServiceList_To_api_ServiceList(in *ServiceList, out *api.Service } 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Service, len(*in)) @@ -6431,7 +4329,7 @@ func autoConvert_api_ServiceList_To_v1_ServiceList(in *api.ServiceList, out *Ser } } } else { - out.Items = nil + out.Items = make([]Service, 0) } return nil } @@ -6444,9 +4342,7 @@ func autoConvert_v1_ServicePort_To_api_ServicePort(in *ServicePort, out *api.Ser 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.TargetPort = in.TargetPort out.NodePort = in.NodePort return nil } @@ -6459,9 +4355,7 @@ func autoConvert_api_ServicePort_To_v1_ServicePort(in *api.ServicePort, out *Ser 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.TargetPort = in.TargetPort out.NodePort = in.NodePort return nil } @@ -6471,9 +4365,6 @@ func Convert_api_ServicePort_To_v1_ServicePort(in *api.ServicePort, out *Service } 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 } @@ -6483,9 +4374,6 @@ func Convert_v1_ServiceProxyOptions_To_api_ServiceProxyOptions(in *ServiceProxyO } 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 } @@ -6495,50 +4383,29 @@ func Convert_api_ServiceProxyOptions_To_v1_ServiceProxyOptions(in *api.ServicePr } 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.Ports = *(*[]api.ServicePort)(unsafe.Pointer(&in.Ports)) + out.Selector = *(*map[string]string)(unsafe.Pointer(&in.Selector)) out.ClusterIP = in.ClusterIP out.Type = api.ServiceType(in.Type) - out.ExternalIPs = in.ExternalIPs + out.ExternalIPs = *(*[]string)(unsafe.Pointer(&in.ExternalIPs)) // INFO: in.DeprecatedPublicIPs opted out of conversion generation out.SessionAffinity = api.ServiceAffinity(in.SessionAffinity) out.LoadBalancerIP = in.LoadBalancerIP - out.LoadBalancerSourceRanges = in.LoadBalancerSourceRanges + out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges)) out.ExternalName = in.ExternalName 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.Ports = *(*[]ServicePort)(unsafe.Pointer(&in.Ports)) + out.Selector = *(*map[string]string)(unsafe.Pointer(&in.Selector)) out.ClusterIP = in.ClusterIP out.ExternalName = in.ExternalName - out.ExternalIPs = in.ExternalIPs + out.ExternalIPs = *(*[]string)(unsafe.Pointer(&in.ExternalIPs)) out.LoadBalancerIP = in.LoadBalancerIP out.SessionAffinity = ServiceAffinity(in.SessionAffinity) - out.LoadBalancerSourceRanges = in.LoadBalancerSourceRanges + out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges)) return nil } @@ -6564,10 +4431,28 @@ func Convert_api_ServiceStatus_To_v1_ServiceStatus(in *api.ServiceStatus, out *S return autoConvert_api_ServiceStatus_To_v1_ServiceStatus(in, out, s) } +func autoConvert_v1_Sysctl_To_api_Sysctl(in *Sysctl, out *api.Sysctl, s conversion.Scope) error { + out.Name = in.Name + out.Value = in.Value + return nil +} + +func Convert_v1_Sysctl_To_api_Sysctl(in *Sysctl, out *api.Sysctl, s conversion.Scope) error { + return autoConvert_v1_Sysctl_To_api_Sysctl(in, out, s) +} + +func autoConvert_api_Sysctl_To_v1_Sysctl(in *api.Sysctl, out *Sysctl, s conversion.Scope) error { + out.Name = in.Name + out.Value = in.Value + return nil +} + +func Convert_api_Sysctl_To_v1_Sysctl(in *api.Sysctl, out *Sysctl, s conversion.Scope) error { + return autoConvert_api_Sysctl_To_v1_Sysctl(in, out, s) +} + func autoConvert_v1_TCPSocketAction_To_api_TCPSocketAction(in *TCPSocketAction, out *api.TCPSocketAction, s conversion.Scope) error { - if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.Port, &out.Port, s); err != nil { - return err - } + out.Port = in.Port return nil } @@ -6576,9 +4461,7 @@ func Convert_v1_TCPSocketAction_To_api_TCPSocketAction(in *TCPSocketAction, out } 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 - } + out.Port = in.Port return nil } @@ -6590,6 +4473,7 @@ func autoConvert_v1_Taint_To_api_Taint(in *Taint, out *api.Taint, s conversion.S out.Key = in.Key out.Value = in.Value out.Effect = api.TaintEffect(in.Effect) + out.TimeAdded = in.TimeAdded return nil } @@ -6601,6 +4485,7 @@ func autoConvert_api_Taint_To_v1_Taint(in *api.Taint, out *Taint, s conversion.S out.Key = in.Key out.Value = in.Value out.Effect = TaintEffect(in.Effect) + out.TimeAdded = in.TimeAdded return nil } @@ -6613,6 +4498,7 @@ func autoConvert_v1_Toleration_To_api_Toleration(in *Toleration, out *api.Tolera out.Operator = api.TolerationOperator(in.Operator) out.Value = in.Value out.Effect = api.TaintEffect(in.Effect) + out.TolerationSeconds = (*int64)(unsafe.Pointer(in.TolerationSeconds)) return nil } @@ -6625,6 +4511,7 @@ func autoConvert_api_Toleration_To_v1_Toleration(in *api.Toleration, out *Tolera out.Operator = TolerationOperator(in.Operator) out.Value = in.Value out.Effect = TaintEffect(in.Effect) + out.TolerationSeconds = (*int64)(unsafe.Pointer(in.TolerationSeconds)) return nil } @@ -6633,7 +4520,6 @@ func Convert_api_Toleration_To_v1_Toleration(in *api.Toleration, out *Toleration } 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 @@ -6681,205 +4567,55 @@ func Convert_api_VolumeMount_To_v1_VolumeMount(in *api.VolumeMount, out *VolumeM return autoConvert_api_VolumeMount_To_v1_VolumeMount(in, out, s) } +func autoConvert_v1_VolumeProjection_To_api_VolumeProjection(in *VolumeProjection, out *api.VolumeProjection, s conversion.Scope) error { + out.Secret = (*api.SecretProjection)(unsafe.Pointer(in.Secret)) + out.DownwardAPI = (*api.DownwardAPIProjection)(unsafe.Pointer(in.DownwardAPI)) + out.ConfigMap = (*api.ConfigMapProjection)(unsafe.Pointer(in.ConfigMap)) + return nil +} + +func Convert_v1_VolumeProjection_To_api_VolumeProjection(in *VolumeProjection, out *api.VolumeProjection, s conversion.Scope) error { + return autoConvert_v1_VolumeProjection_To_api_VolumeProjection(in, out, s) +} + +func autoConvert_api_VolumeProjection_To_v1_VolumeProjection(in *api.VolumeProjection, out *VolumeProjection, s conversion.Scope) error { + out.Secret = (*SecretProjection)(unsafe.Pointer(in.Secret)) + out.DownwardAPI = (*DownwardAPIProjection)(unsafe.Pointer(in.DownwardAPI)) + out.ConfigMap = (*ConfigMapProjection)(unsafe.Pointer(in.ConfigMap)) + return nil +} + +func Convert_api_VolumeProjection_To_v1_VolumeProjection(in *api.VolumeProjection, out *VolumeProjection, s conversion.Scope) error { + return autoConvert_api_VolumeProjection_To_v1_VolumeProjection(in, out, s) +} + func autoConvert_v1_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.VolumeSource, s conversion.Scope) error { - 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 - } - if in.Quobyte != nil { - in, out := &in.Quobyte, &out.Quobyte - *out = new(api.QuobyteVolumeSource) - if err := Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(*in, *out, s); err != nil { - return err - } - } else { - out.Quobyte = nil - } - if in.AzureDisk != nil { - in, out := &in.AzureDisk, &out.AzureDisk - *out = new(api.AzureDiskVolumeSource) - if err := Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(*in, *out, s); err != nil { - return err - } - } else { - out.AzureDisk = nil - } + out.HostPath = (*api.HostPathVolumeSource)(unsafe.Pointer(in.HostPath)) + out.EmptyDir = (*api.EmptyDirVolumeSource)(unsafe.Pointer(in.EmptyDir)) + out.GCEPersistentDisk = (*api.GCEPersistentDiskVolumeSource)(unsafe.Pointer(in.GCEPersistentDisk)) + out.AWSElasticBlockStore = (*api.AWSElasticBlockStoreVolumeSource)(unsafe.Pointer(in.AWSElasticBlockStore)) + out.GitRepo = (*api.GitRepoVolumeSource)(unsafe.Pointer(in.GitRepo)) + out.Secret = (*api.SecretVolumeSource)(unsafe.Pointer(in.Secret)) + out.NFS = (*api.NFSVolumeSource)(unsafe.Pointer(in.NFS)) + out.ISCSI = (*api.ISCSIVolumeSource)(unsafe.Pointer(in.ISCSI)) + out.Glusterfs = (*api.GlusterfsVolumeSource)(unsafe.Pointer(in.Glusterfs)) + out.PersistentVolumeClaim = (*api.PersistentVolumeClaimVolumeSource)(unsafe.Pointer(in.PersistentVolumeClaim)) + out.RBD = (*api.RBDVolumeSource)(unsafe.Pointer(in.RBD)) + out.FlexVolume = (*api.FlexVolumeSource)(unsafe.Pointer(in.FlexVolume)) + out.Cinder = (*api.CinderVolumeSource)(unsafe.Pointer(in.Cinder)) + out.CephFS = (*api.CephFSVolumeSource)(unsafe.Pointer(in.CephFS)) + out.Flocker = (*api.FlockerVolumeSource)(unsafe.Pointer(in.Flocker)) + out.DownwardAPI = (*api.DownwardAPIVolumeSource)(unsafe.Pointer(in.DownwardAPI)) + out.FC = (*api.FCVolumeSource)(unsafe.Pointer(in.FC)) + out.AzureFile = (*api.AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile)) + out.ConfigMap = (*api.ConfigMapVolumeSource)(unsafe.Pointer(in.ConfigMap)) + out.VsphereVolume = (*api.VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume)) + out.Quobyte = (*api.QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte)) + out.AzureDisk = (*api.AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk)) + out.PhotonPersistentDisk = (*api.PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk)) + out.Projected = (*api.ProjectedVolumeSource)(unsafe.Pointer(in.Projected)) + out.PortworxVolume = (*api.PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume)) + out.ScaleIO = (*api.ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO)) return nil } @@ -6888,204 +4624,32 @@ func Convert_v1_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.Volu } 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.Quobyte != nil { - in, out := &in.Quobyte, &out.Quobyte - *out = new(QuobyteVolumeSource) - if err := Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(*in, *out, s); err != nil { - return err - } - } else { - out.Quobyte = 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 - } - if in.AzureDisk != nil { - in, out := &in.AzureDisk, &out.AzureDisk - *out = new(AzureDiskVolumeSource) - if err := Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(*in, *out, s); err != nil { - return err - } - } else { - out.AzureDisk = nil - } + out.HostPath = (*HostPathVolumeSource)(unsafe.Pointer(in.HostPath)) + out.EmptyDir = (*EmptyDirVolumeSource)(unsafe.Pointer(in.EmptyDir)) + out.GCEPersistentDisk = (*GCEPersistentDiskVolumeSource)(unsafe.Pointer(in.GCEPersistentDisk)) + out.AWSElasticBlockStore = (*AWSElasticBlockStoreVolumeSource)(unsafe.Pointer(in.AWSElasticBlockStore)) + out.GitRepo = (*GitRepoVolumeSource)(unsafe.Pointer(in.GitRepo)) + out.Secret = (*SecretVolumeSource)(unsafe.Pointer(in.Secret)) + out.NFS = (*NFSVolumeSource)(unsafe.Pointer(in.NFS)) + out.ISCSI = (*ISCSIVolumeSource)(unsafe.Pointer(in.ISCSI)) + out.Glusterfs = (*GlusterfsVolumeSource)(unsafe.Pointer(in.Glusterfs)) + out.PersistentVolumeClaim = (*PersistentVolumeClaimVolumeSource)(unsafe.Pointer(in.PersistentVolumeClaim)) + out.RBD = (*RBDVolumeSource)(unsafe.Pointer(in.RBD)) + out.Quobyte = (*QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte)) + out.FlexVolume = (*FlexVolumeSource)(unsafe.Pointer(in.FlexVolume)) + out.Cinder = (*CinderVolumeSource)(unsafe.Pointer(in.Cinder)) + out.CephFS = (*CephFSVolumeSource)(unsafe.Pointer(in.CephFS)) + out.Flocker = (*FlockerVolumeSource)(unsafe.Pointer(in.Flocker)) + out.DownwardAPI = (*DownwardAPIVolumeSource)(unsafe.Pointer(in.DownwardAPI)) + out.FC = (*FCVolumeSource)(unsafe.Pointer(in.FC)) + out.AzureFile = (*AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile)) + out.ConfigMap = (*ConfigMapVolumeSource)(unsafe.Pointer(in.ConfigMap)) + out.VsphereVolume = (*VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume)) + out.AzureDisk = (*AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk)) + out.PhotonPersistentDisk = (*PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk)) + out.Projected = (*ProjectedVolumeSource)(unsafe.Pointer(in.Projected)) + out.PortworxVolume = (*PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume)) + out.ScaleIO = (*ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO)) return nil } @@ -7114,7 +4678,7 @@ func Convert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSo } func autoConvert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm(in *WeightedPodAffinityTerm, out *api.WeightedPodAffinityTerm, s conversion.Scope) error { - out.Weight = int(in.Weight) + out.Weight = in.Weight if err := Convert_v1_PodAffinityTerm_To_api_PodAffinityTerm(&in.PodAffinityTerm, &out.PodAffinityTerm, s); err != nil { return err } @@ -7126,7 +4690,7 @@ func Convert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm(in *Weigh } func autoConvert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm(in *api.WeightedPodAffinityTerm, out *WeightedPodAffinityTerm, s conversion.Scope) error { - out.Weight = int32(in.Weight) + out.Weight = in.Weight if err := Convert_api_PodAffinityTerm_To_v1_PodAffinityTerm(&in.PodAffinityTerm, &out.PodAffinityTerm, s); err != nil { return err } diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.deepcopy.go similarity index 80% rename from vendor/k8s.io/client-go/1.5/pkg/api/v1/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/api/v1/zz_generated.deepcopy.go index d25a36fe1..463e94680 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ limitations under the License. package v1 import ( - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" - types "k8s.io/client-go/1.5/pkg/types" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" reflect "reflect" ) @@ -50,8 +50,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ComponentStatus, InType: reflect.TypeOf(&ComponentStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ComponentStatusList, InType: reflect.TypeOf(&ComponentStatusList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMap, InType: reflect.TypeOf(&ConfigMap{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapEnvSource, InType: reflect.TypeOf(&ConfigMapEnvSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapKeySelector, InType: reflect.TypeOf(&ConfigMapKeySelector{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapList, InType: reflect.TypeOf(&ConfigMapList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapProjection, InType: reflect.TypeOf(&ConfigMapProjection{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapVolumeSource, InType: reflect.TypeOf(&ConfigMapVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Container, InType: reflect.TypeOf(&Container{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerImage, InType: reflect.TypeOf(&ContainerImage{})}, @@ -63,6 +65,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerStatus, InType: reflect.TypeOf(&ContainerStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DaemonEndpoint, InType: reflect.TypeOf(&DaemonEndpoint{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DeleteOptions, InType: reflect.TypeOf(&DeleteOptions{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DownwardAPIProjection, InType: reflect.TypeOf(&DownwardAPIProjection{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DownwardAPIVolumeFile, InType: reflect.TypeOf(&DownwardAPIVolumeFile{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DownwardAPIVolumeSource, InType: reflect.TypeOf(&DownwardAPIVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EmptyDirVolumeSource, InType: reflect.TypeOf(&EmptyDirVolumeSource{})}, @@ -71,13 +74,13 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EndpointSubset, InType: reflect.TypeOf(&EndpointSubset{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Endpoints, InType: reflect.TypeOf(&Endpoints{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EndpointsList, InType: reflect.TypeOf(&EndpointsList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EnvFromSource, InType: reflect.TypeOf(&EnvFromSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EnvVar, InType: reflect.TypeOf(&EnvVar{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EnvVarSource, InType: reflect.TypeOf(&EnvVarSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Event, InType: reflect.TypeOf(&Event{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EventList, InType: reflect.TypeOf(&EventList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EventSource, InType: reflect.TypeOf(&EventSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ExecAction, InType: reflect.TypeOf(&ExecAction{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ExportOptions, InType: reflect.TypeOf(&ExportOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_FCVolumeSource, InType: reflect.TypeOf(&FCVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_FlexVolumeSource, InType: reflect.TypeOf(&FlexVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_FlockerVolumeSource, InType: reflect.TypeOf(&FlockerVolumeSource{})}, @@ -112,6 +115,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeDaemonEndpoints, InType: reflect.TypeOf(&NodeDaemonEndpoints{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeList, InType: reflect.TypeOf(&NodeList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeProxyOptions, InType: reflect.TypeOf(&NodeProxyOptions{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeResources, InType: reflect.TypeOf(&NodeResources{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeSelector, InType: reflect.TypeOf(&NodeSelector{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeSelectorRequirement, InType: reflect.TypeOf(&NodeSelectorRequirement{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeSelectorTerm, InType: reflect.TypeOf(&NodeSelectorTerm{})}, @@ -121,7 +125,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectFieldSelector, InType: reflect.TypeOf(&ObjectFieldSelector{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectMeta, InType: reflect.TypeOf(&ObjectMeta{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectReference, InType: reflect.TypeOf(&ObjectReference{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_OwnerReference, InType: reflect.TypeOf(&OwnerReference{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolume, InType: reflect.TypeOf(&PersistentVolume{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeClaim, InType: reflect.TypeOf(&PersistentVolumeClaim{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeClaimList, InType: reflect.TypeOf(&PersistentVolumeClaimList{})}, @@ -132,6 +135,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeSource, InType: reflect.TypeOf(&PersistentVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeSpec, InType: reflect.TypeOf(&PersistentVolumeSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeStatus, InType: reflect.TypeOf(&PersistentVolumeStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PhotonPersistentDiskVolumeSource, InType: reflect.TypeOf(&PhotonPersistentDiskVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Pod, InType: reflect.TypeOf(&Pod{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodAffinity, InType: reflect.TypeOf(&PodAffinity{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodAffinityTerm, InType: reflect.TypeOf(&PodAffinityTerm{})}, @@ -141,6 +145,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodExecOptions, InType: reflect.TypeOf(&PodExecOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodList, InType: reflect.TypeOf(&PodList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodLogOptions, InType: reflect.TypeOf(&PodLogOptions{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodPortForwardOptions, InType: reflect.TypeOf(&PodPortForwardOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodProxyOptions, InType: reflect.TypeOf(&PodProxyOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodSecurityContext, InType: reflect.TypeOf(&PodSecurityContext{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodSignature, InType: reflect.TypeOf(&PodSignature{})}, @@ -150,14 +155,17 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodTemplate, InType: reflect.TypeOf(&PodTemplate{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodTemplateList, InType: reflect.TypeOf(&PodTemplateList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodTemplateSpec, InType: reflect.TypeOf(&PodTemplateSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PortworxVolumeSource, InType: reflect.TypeOf(&PortworxVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Preconditions, InType: reflect.TypeOf(&Preconditions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PreferAvoidPodsEntry, InType: reflect.TypeOf(&PreferAvoidPodsEntry{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PreferredSchedulingTerm, InType: reflect.TypeOf(&PreferredSchedulingTerm{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Probe, InType: reflect.TypeOf(&Probe{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ProjectedVolumeSource, InType: reflect.TypeOf(&ProjectedVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_QuobyteVolumeSource, InType: reflect.TypeOf(&QuobyteVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_RBDVolumeSource, InType: reflect.TypeOf(&RBDVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_RangeAllocation, InType: reflect.TypeOf(&RangeAllocation{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationController, InType: reflect.TypeOf(&ReplicationController{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationControllerCondition, InType: reflect.TypeOf(&ReplicationControllerCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationControllerList, InType: reflect.TypeOf(&ReplicationControllerList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationControllerSpec, InType: reflect.TypeOf(&ReplicationControllerSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationControllerStatus, InType: reflect.TypeOf(&ReplicationControllerStatus{})}, @@ -168,9 +176,12 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceQuotaStatus, InType: reflect.TypeOf(&ResourceQuotaStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceRequirements, InType: reflect.TypeOf(&ResourceRequirements{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SELinuxOptions, InType: reflect.TypeOf(&SELinuxOptions{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleIOVolumeSource, InType: reflect.TypeOf(&ScaleIOVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Secret, InType: reflect.TypeOf(&Secret{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretEnvSource, InType: reflect.TypeOf(&SecretEnvSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretKeySelector, InType: reflect.TypeOf(&SecretKeySelector{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretList, InType: reflect.TypeOf(&SecretList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretProjection, InType: reflect.TypeOf(&SecretProjection{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretVolumeSource, InType: reflect.TypeOf(&SecretVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecurityContext, InType: reflect.TypeOf(&SecurityContext{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SerializedReference, InType: reflect.TypeOf(&SerializedReference{})}, @@ -182,11 +193,13 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceProxyOptions, InType: reflect.TypeOf(&ServiceProxyOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceSpec, InType: reflect.TypeOf(&ServiceSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceStatus, InType: reflect.TypeOf(&ServiceStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Sysctl, InType: reflect.TypeOf(&Sysctl{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TCPSocketAction, InType: reflect.TypeOf(&TCPSocketAction{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Taint, InType: reflect.TypeOf(&Taint{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Toleration, InType: reflect.TypeOf(&Toleration{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Volume, InType: reflect.TypeOf(&Volume{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VolumeMount, InType: reflect.TypeOf(&VolumeMount{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VolumeProjection, InType: reflect.TypeOf(&VolumeProjection{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VolumeSource, InType: reflect.TypeOf(&VolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VsphereVirtualDiskVolumeSource, InType: reflect.TypeOf(&VsphereVirtualDiskVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_WeightedPodAffinityTerm, InType: reflect.TypeOf(&WeightedPodAffinityTerm{})}, @@ -197,10 +210,7 @@ func DeepCopy_v1_AWSElasticBlockStoreVolumeSource(in interface{}, out interface{ { in := in.(*AWSElasticBlockStoreVolumeSource) out := out.(*AWSElasticBlockStoreVolumeSource) - out.VolumeID = in.VolumeID - out.FSType = in.FSType - out.Partition = in.Partition - out.ReadOnly = in.ReadOnly + *out = *in return nil } } @@ -209,14 +219,13 @@ func DeepCopy_v1_Affinity(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*Affinity) out := out.(*Affinity) + *out = *in if in.NodeAffinity != nil { in, out := &in.NodeAffinity, &out.NodeAffinity *out = new(NodeAffinity) if err := DeepCopy_v1_NodeAffinity(*in, *out, c); err != nil { return err } - } else { - out.NodeAffinity = nil } if in.PodAffinity != nil { in, out := &in.PodAffinity, &out.PodAffinity @@ -224,8 +233,6 @@ func DeepCopy_v1_Affinity(in interface{}, out interface{}, c *conversion.Cloner) 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 @@ -233,8 +240,6 @@ func DeepCopy_v1_Affinity(in interface{}, out interface{}, c *conversion.Cloner) if err := DeepCopy_v1_PodAntiAffinity(*in, *out, c); err != nil { return err } - } else { - out.PodAntiAffinity = nil } return nil } @@ -244,8 +249,7 @@ func DeepCopy_v1_AttachedVolume(in interface{}, out interface{}, c *conversion.C { in := in.(*AttachedVolume) out := out.(*AttachedVolume) - out.Name = in.Name - out.DevicePath = in.DevicePath + *out = *in return nil } } @@ -254,6 +258,7 @@ func DeepCopy_v1_AvoidPods(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*AvoidPods) out := out.(*AvoidPods) + *out = *in if in.PreferAvoidPods != nil { in, out := &in.PreferAvoidPods, &out.PreferAvoidPods *out = make([]PreferAvoidPodsEntry, len(*in)) @@ -262,8 +267,6 @@ func DeepCopy_v1_AvoidPods(in interface{}, out interface{}, c *conversion.Cloner return err } } - } else { - out.PreferAvoidPods = nil } return nil } @@ -273,28 +276,21 @@ func DeepCopy_v1_AzureDiskVolumeSource(in interface{}, out interface{}, c *conve { in := in.(*AzureDiskVolumeSource) out := out.(*AzureDiskVolumeSource) - out.DiskName = in.DiskName - out.DataDiskURI = in.DataDiskURI + *out = *in if in.CachingMode != nil { in, out := &in.CachingMode, &out.CachingMode *out = new(AzureDataDiskCachingMode) **out = **in - } else { - out.CachingMode = nil } if in.FSType != nil { in, out := &in.FSType, &out.FSType *out = new(string) **out = **in - } else { - out.FSType = nil } if in.ReadOnly != nil { in, out := &in.ReadOnly, &out.ReadOnly *out = new(bool) **out = **in - } else { - out.ReadOnly = nil } return nil } @@ -304,9 +300,7 @@ func DeepCopy_v1_AzureFileVolumeSource(in interface{}, out interface{}, c *conve { in := in.(*AzureFileVolumeSource) out := out.(*AzureFileVolumeSource) - out.SecretName = in.SecretName - out.ShareName = in.ShareName - out.ReadOnly = in.ReadOnly + *out = *in return nil } } @@ -315,11 +309,12 @@ func DeepCopy_v1_Binding(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*Binding) out := out.(*Binding) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } - out.Target = in.Target return nil } } @@ -328,23 +323,16 @@ func DeepCopy_v1_Capabilities(in interface{}, out interface{}, c *conversion.Clo { in := in.(*Capabilities) out := out.(*Capabilities) + *out = *in 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 + copy(*out, *in) } 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 + copy(*out, *in) } return nil } @@ -354,24 +342,17 @@ func DeepCopy_v1_CephFSVolumeSource(in interface{}, out interface{}, c *conversi { in := in.(*CephFSVolumeSource) out := out.(*CephFSVolumeSource) + *out = *in if in.Monitors != nil { in, out := &in.Monitors, &out.Monitors *out = make([]string, len(*in)) copy(*out, *in) - } 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 } } @@ -380,9 +361,7 @@ func DeepCopy_v1_CinderVolumeSource(in interface{}, out interface{}, c *conversi { in := in.(*CinderVolumeSource) out := out.(*CinderVolumeSource) - out.VolumeID = in.VolumeID - out.FSType = in.FSType - out.ReadOnly = in.ReadOnly + *out = *in return nil } } @@ -391,10 +370,7 @@ func DeepCopy_v1_ComponentCondition(in interface{}, out interface{}, c *conversi { in := in.(*ComponentCondition) out := out.(*ComponentCondition) - out.Type = in.Type - out.Status = in.Status - out.Message = in.Message - out.Error = in.Error + *out = *in return nil } } @@ -403,18 +379,16 @@ func DeepCopy_v1_ComponentStatus(in interface{}, out interface{}, c *conversion. { in := in.(*ComponentStatus) out := out.(*ComponentStatus) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]ComponentCondition, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Conditions = nil + copy(*out, *in) } return nil } @@ -424,8 +398,7 @@ func DeepCopy_v1_ComponentStatusList(in interface{}, out interface{}, c *convers { in := in.(*ComponentStatusList) out := out.(*ComponentStatusList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ComponentStatus, len(*in)) @@ -434,8 +407,6 @@ func DeepCopy_v1_ComponentStatusList(in interface{}, out interface{}, c *convers return err } } - } else { - out.Items = nil } return nil } @@ -445,9 +416,11 @@ func DeepCopy_v1_ConfigMap(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*ConfigMap) out := out.(*ConfigMap) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -455,8 +428,20 @@ func DeepCopy_v1_ConfigMap(in interface{}, out interface{}, c *conversion.Cloner for key, val := range *in { (*out)[key] = val } - } else { - out.Data = nil + } + return nil + } +} + +func DeepCopy_v1_ConfigMapEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ConfigMapEnvSource) + out := out.(*ConfigMapEnvSource) + *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in } return nil } @@ -466,8 +451,12 @@ func DeepCopy_v1_ConfigMapKeySelector(in interface{}, out interface{}, c *conver { in := in.(*ConfigMapKeySelector) out := out.(*ConfigMapKeySelector) - out.LocalObjectReference = in.LocalObjectReference - out.Key = in.Key + *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -476,8 +465,7 @@ func DeepCopy_v1_ConfigMapList(in interface{}, out interface{}, c *conversion.Cl { in := in.(*ConfigMapList) out := out.(*ConfigMapList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ConfigMap, len(*in)) @@ -486,8 +474,29 @@ func DeepCopy_v1_ConfigMapList(in interface{}, out interface{}, c *conversion.Cl return err } } - } else { - out.Items = nil + } + return nil + } +} + +func DeepCopy_v1_ConfigMapProjection(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ConfigMapProjection) + out := out.(*ConfigMapProjection) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KeyToPath, len(*in)) + for i := range *in { + if err := DeepCopy_v1_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in } return nil } @@ -497,7 +506,7 @@ func DeepCopy_v1_ConfigMapVolumeSource(in interface{}, out interface{}, c *conve { in := in.(*ConfigMapVolumeSource) out := out.(*ConfigMapVolumeSource) - out.LocalObjectReference = in.LocalObjectReference + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]KeyToPath, len(*in)) @@ -506,15 +515,16 @@ func DeepCopy_v1_ConfigMapVolumeSource(in interface{}, out interface{}, c *conve return err } } - } else { - out.Items = nil } if in.DefaultMode != nil { in, out := &in.DefaultMode, &out.DefaultMode *out = new(int32) **out = **in - } else { - out.DefaultMode = nil + } + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in } return nil } @@ -524,31 +534,30 @@ func DeepCopy_v1_Container(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*Container) out := out.(*Container) - out.Name = in.Name - out.Image = in.Image + *out = *in 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)) + copy(*out, *in) + } + if in.EnvFrom != nil { + in, out := &in.EnvFrom, &out.EnvFrom + *out = make([]EnvFromSource, len(*in)) for i := range *in { - (*out)[i] = (*in)[i] + if err := DeepCopy_v1_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil { + return err + } } - } else { - out.Ports = nil } if in.Env != nil { in, out := &in.Env, &out.Env @@ -558,8 +567,6 @@ func DeepCopy_v1_Container(in interface{}, out interface{}, c *conversion.Cloner return err } } - } else { - out.Env = nil } if err := DeepCopy_v1_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil { return err @@ -567,11 +574,7 @@ func DeepCopy_v1_Container(in interface{}, out interface{}, c *conversion.Cloner 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 + copy(*out, *in) } if in.LivenessProbe != nil { in, out := &in.LivenessProbe, &out.LivenessProbe @@ -579,8 +582,6 @@ func DeepCopy_v1_Container(in interface{}, out interface{}, c *conversion.Cloner 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 @@ -588,8 +589,6 @@ func DeepCopy_v1_Container(in interface{}, out interface{}, c *conversion.Cloner 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 @@ -597,23 +596,14 @@ func DeepCopy_v1_Container(in interface{}, out interface{}, c *conversion.Cloner 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 } } @@ -622,14 +612,12 @@ func DeepCopy_v1_ContainerImage(in interface{}, out interface{}, c *conversion.C { in := in.(*ContainerImage) out := out.(*ContainerImage) + *out = *in if in.Names != nil { in, out := &in.Names, &out.Names *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Names = nil } - out.SizeBytes = in.SizeBytes return nil } } @@ -638,11 +626,7 @@ func DeepCopy_v1_ContainerPort(in interface{}, out interface{}, c *conversion.Cl { in := in.(*ContainerPort) out := out.(*ContainerPort) - out.Name = in.Name - out.HostPort = in.HostPort - out.ContainerPort = in.ContainerPort - out.Protocol = in.Protocol - out.HostIP = in.HostIP + *out = *in return nil } } @@ -651,12 +635,11 @@ func DeepCopy_v1_ContainerState(in interface{}, out interface{}, c *conversion.C { in := in.(*ContainerState) out := out.(*ContainerState) + *out = *in 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 @@ -664,8 +647,6 @@ func DeepCopy_v1_ContainerState(in interface{}, out interface{}, c *conversion.C 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 @@ -673,8 +654,6 @@ func DeepCopy_v1_ContainerState(in interface{}, out interface{}, c *conversion.C if err := DeepCopy_v1_ContainerStateTerminated(*in, *out, c); err != nil { return err } - } else { - out.Terminated = nil } return nil } @@ -684,6 +663,7 @@ func DeepCopy_v1_ContainerStateRunning(in interface{}, out interface{}, c *conve { in := in.(*ContainerStateRunning) out := out.(*ContainerStateRunning) + *out = *in out.StartedAt = in.StartedAt.DeepCopy() return nil } @@ -693,13 +673,9 @@ func DeepCopy_v1_ContainerStateTerminated(in interface{}, out interface{}, c *co { in := in.(*ContainerStateTerminated) out := out.(*ContainerStateTerminated) - out.ExitCode = in.ExitCode - out.Signal = in.Signal - out.Reason = in.Reason - out.Message = in.Message + *out = *in out.StartedAt = in.StartedAt.DeepCopy() out.FinishedAt = in.FinishedAt.DeepCopy() - out.ContainerID = in.ContainerID return nil } } @@ -708,8 +684,7 @@ func DeepCopy_v1_ContainerStateWaiting(in interface{}, out interface{}, c *conve { in := in.(*ContainerStateWaiting) out := out.(*ContainerStateWaiting) - out.Reason = in.Reason - out.Message = in.Message + *out = *in return nil } } @@ -718,18 +693,13 @@ func DeepCopy_v1_ContainerStatus(in interface{}, out interface{}, c *conversion. { in := in.(*ContainerStatus) out := out.(*ContainerStatus) - out.Name = in.Name + *out = *in if err := DeepCopy_v1_ContainerState(&in.State, &out.State, c); err != nil { return err } if err := DeepCopy_v1_ContainerState(&in.LastTerminationState, &out.LastTerminationState, c); err != nil { return err } - out.Ready = in.Ready - out.RestartCount = in.RestartCount - out.Image = in.Image - out.ImageID = in.ImageID - out.ContainerID = in.ContainerID return nil } } @@ -738,7 +708,7 @@ func DeepCopy_v1_DaemonEndpoint(in interface{}, out interface{}, c *conversion.C { in := in.(*DaemonEndpoint) out := out.(*DaemonEndpoint) - out.Port = in.Port + *out = *in return nil } } @@ -747,13 +717,11 @@ func DeepCopy_v1_DeleteOptions(in interface{}, out interface{}, c *conversion.Cl { in := in.(*DeleteOptions) out := out.(*DeleteOptions) - out.TypeMeta = in.TypeMeta + *out = *in 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 @@ -761,15 +729,34 @@ func DeepCopy_v1_DeleteOptions(in interface{}, out interface{}, c *conversion.Cl 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 + } + if in.PropagationPolicy != nil { + in, out := &in.PropagationPolicy, &out.PropagationPolicy + *out = new(DeletionPropagation) + **out = **in + } + return nil + } +} + +func DeepCopy_v1_DownwardAPIProjection(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*DownwardAPIProjection) + out := out.(*DownwardAPIProjection) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DownwardAPIVolumeFile, len(*in)) + for i := range *in { + if err := DeepCopy_v1_DownwardAPIVolumeFile(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } } return nil } @@ -779,13 +766,11 @@ func DeepCopy_v1_DownwardAPIVolumeFile(in interface{}, out interface{}, c *conve { in := in.(*DownwardAPIVolumeFile) out := out.(*DownwardAPIVolumeFile) - out.Path = in.Path + *out = *in 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 @@ -793,15 +778,11 @@ func DeepCopy_v1_DownwardAPIVolumeFile(in interface{}, out interface{}, c *conve if err := DeepCopy_v1_ResourceFieldSelector(*in, *out, c); err != nil { return err } - } else { - out.ResourceFieldRef = nil } if in.Mode != nil { in, out := &in.Mode, &out.Mode *out = new(int32) **out = **in - } else { - out.Mode = nil } return nil } @@ -811,6 +792,7 @@ func DeepCopy_v1_DownwardAPIVolumeSource(in interface{}, out interface{}, c *con { in := in.(*DownwardAPIVolumeSource) out := out.(*DownwardAPIVolumeSource) + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]DownwardAPIVolumeFile, len(*in)) @@ -819,15 +801,11 @@ func DeepCopy_v1_DownwardAPIVolumeSource(in interface{}, out interface{}, c *con return err } } - } else { - out.Items = nil } if in.DefaultMode != nil { in, out := &in.DefaultMode, &out.DefaultMode *out = new(int32) **out = **in - } else { - out.DefaultMode = nil } return nil } @@ -837,7 +815,7 @@ func DeepCopy_v1_EmptyDirVolumeSource(in interface{}, out interface{}, c *conver { in := in.(*EmptyDirVolumeSource) out := out.(*EmptyDirVolumeSource) - out.Medium = in.Medium + *out = *in return nil } } @@ -846,21 +824,16 @@ func DeepCopy_v1_EndpointAddress(in interface{}, out interface{}, c *conversion. { in := in.(*EndpointAddress) out := out.(*EndpointAddress) - out.IP = in.IP - out.Hostname = in.Hostname + *out = *in if in.NodeName != nil { in, out := &in.NodeName, &out.NodeName *out = new(string) **out = **in - } else { - out.NodeName = nil } if in.TargetRef != nil { in, out := &in.TargetRef, &out.TargetRef *out = new(ObjectReference) **out = **in - } else { - out.TargetRef = nil } return nil } @@ -870,9 +843,7 @@ func DeepCopy_v1_EndpointPort(in interface{}, out interface{}, c *conversion.Clo { in := in.(*EndpointPort) out := out.(*EndpointPort) - out.Name = in.Name - out.Port = in.Port - out.Protocol = in.Protocol + *out = *in return nil } } @@ -881,6 +852,7 @@ func DeepCopy_v1_EndpointSubset(in interface{}, out interface{}, c *conversion.C { in := in.(*EndpointSubset) out := out.(*EndpointSubset) + *out = *in if in.Addresses != nil { in, out := &in.Addresses, &out.Addresses *out = make([]EndpointAddress, len(*in)) @@ -889,8 +861,6 @@ func DeepCopy_v1_EndpointSubset(in interface{}, out interface{}, c *conversion.C return err } } - } else { - out.Addresses = nil } if in.NotReadyAddresses != nil { in, out := &in.NotReadyAddresses, &out.NotReadyAddresses @@ -900,17 +870,11 @@ func DeepCopy_v1_EndpointSubset(in interface{}, out interface{}, c *conversion.C 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 + copy(*out, *in) } return nil } @@ -920,9 +884,11 @@ func DeepCopy_v1_Endpoints(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*Endpoints) out := out.(*Endpoints) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Subsets != nil { in, out := &in.Subsets, &out.Subsets @@ -932,8 +898,6 @@ func DeepCopy_v1_Endpoints(in interface{}, out interface{}, c *conversion.Cloner return err } } - } else { - out.Subsets = nil } return nil } @@ -943,8 +907,7 @@ func DeepCopy_v1_EndpointsList(in interface{}, out interface{}, c *conversion.Cl { in := in.(*EndpointsList) out := out.(*EndpointsList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Endpoints, len(*in)) @@ -953,8 +916,29 @@ func DeepCopy_v1_EndpointsList(in interface{}, out interface{}, c *conversion.Cl return err } } - } else { - out.Items = nil + } + return nil + } +} + +func DeepCopy_v1_EnvFromSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*EnvFromSource) + out := out.(*EnvFromSource) + *out = *in + if in.ConfigMapRef != nil { + in, out := &in.ConfigMapRef, &out.ConfigMapRef + *out = new(ConfigMapEnvSource) + if err := DeepCopy_v1_ConfigMapEnvSource(*in, *out, c); err != nil { + return err + } + } + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(SecretEnvSource) + if err := DeepCopy_v1_SecretEnvSource(*in, *out, c); err != nil { + return err + } } return nil } @@ -964,16 +948,13 @@ func DeepCopy_v1_EnvVar(in interface{}, out interface{}, c *conversion.Cloner) e { in := in.(*EnvVar) out := out.(*EnvVar) - out.Name = in.Name - out.Value = in.Value + *out = *in if in.ValueFrom != nil { in, out := &in.ValueFrom, &out.ValueFrom *out = new(EnvVarSource) if err := DeepCopy_v1_EnvVarSource(*in, *out, c); err != nil { return err } - } else { - out.ValueFrom = nil } return nil } @@ -983,12 +964,11 @@ func DeepCopy_v1_EnvVarSource(in interface{}, out interface{}, c *conversion.Clo { in := in.(*EnvVarSource) out := out.(*EnvVarSource) + *out = *in 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 @@ -996,22 +976,20 @@ func DeepCopy_v1_EnvVarSource(in interface{}, out interface{}, c *conversion.Clo 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 err := DeepCopy_v1_ConfigMapKeySelector(*in, *out, c); err != nil { + return err + } } if in.SecretKeyRef != nil { in, out := &in.SecretKeyRef, &out.SecretKeyRef *out = new(SecretKeySelector) - **out = **in - } else { - out.SecretKeyRef = nil + if err := DeepCopy_v1_SecretKeySelector(*in, *out, c); err != nil { + return err + } } return nil } @@ -1021,18 +999,14 @@ func DeepCopy_v1_Event(in interface{}, out interface{}, c *conversion.Cloner) er { in := in.(*Event) out := out.(*Event) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } - 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 } } @@ -1041,8 +1015,7 @@ func DeepCopy_v1_EventList(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*EventList) out := out.(*EventList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Event, len(*in)) @@ -1051,8 +1024,6 @@ func DeepCopy_v1_EventList(in interface{}, out interface{}, c *conversion.Cloner return err } } - } else { - out.Items = nil } return nil } @@ -1062,8 +1033,7 @@ func DeepCopy_v1_EventSource(in interface{}, out interface{}, c *conversion.Clon { in := in.(*EventSource) out := out.(*EventSource) - out.Component = in.Component - out.Host = in.Host + *out = *in return nil } } @@ -1072,48 +1042,31 @@ func DeepCopy_v1_ExecAction(in interface{}, out interface{}, c *conversion.Clone { in := in.(*ExecAction) out := out.(*ExecAction) + *out = *in if in.Command != nil { in, out := &in.Command, &out.Command *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Command = nil } return nil } } -func DeepCopy_v1_ExportOptions(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ExportOptions) - out := out.(*ExportOptions) - out.TypeMeta = in.TypeMeta - out.Export = in.Export - out.Exact = in.Exact - return nil - } -} - func DeepCopy_v1_FCVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*FCVolumeSource) out := out.(*FCVolumeSource) + *out = *in if in.TargetWWNs != nil { in, out := &in.TargetWWNs, &out.TargetWWNs *out = make([]string, len(*in)) copy(*out, *in) - } 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 } } @@ -1122,24 +1075,18 @@ func DeepCopy_v1_FlexVolumeSource(in interface{}, out interface{}, c *conversion { in := in.(*FlexVolumeSource) out := out.(*FlexVolumeSource) - out.Driver = in.Driver - out.FSType = in.FSType + *out = *in 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 } @@ -1149,7 +1096,7 @@ func DeepCopy_v1_FlockerVolumeSource(in interface{}, out interface{}, c *convers { in := in.(*FlockerVolumeSource) out := out.(*FlockerVolumeSource) - out.DatasetName = in.DatasetName + *out = *in return nil } } @@ -1158,10 +1105,7 @@ func DeepCopy_v1_GCEPersistentDiskVolumeSource(in interface{}, out interface{}, { in := in.(*GCEPersistentDiskVolumeSource) out := out.(*GCEPersistentDiskVolumeSource) - out.PDName = in.PDName - out.FSType = in.FSType - out.Partition = in.Partition - out.ReadOnly = in.ReadOnly + *out = *in return nil } } @@ -1170,9 +1114,7 @@ func DeepCopy_v1_GitRepoVolumeSource(in interface{}, out interface{}, c *convers { in := in.(*GitRepoVolumeSource) out := out.(*GitRepoVolumeSource) - out.Repository = in.Repository - out.Revision = in.Revision - out.Directory = in.Directory + *out = *in return nil } } @@ -1181,9 +1123,7 @@ func DeepCopy_v1_GlusterfsVolumeSource(in interface{}, out interface{}, c *conve { in := in.(*GlusterfsVolumeSource) out := out.(*GlusterfsVolumeSource) - out.EndpointsName = in.EndpointsName - out.Path = in.Path - out.ReadOnly = in.ReadOnly + *out = *in return nil } } @@ -1192,18 +1132,11 @@ func DeepCopy_v1_HTTPGetAction(in interface{}, out interface{}, c *conversion.Cl { in := in.(*HTTPGetAction) out := out.(*HTTPGetAction) - out.Path = in.Path - out.Port = in.Port - out.Host = in.Host - out.Scheme = in.Scheme + *out = *in 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 + copy(*out, *in) } return nil } @@ -1213,8 +1146,7 @@ func DeepCopy_v1_HTTPHeader(in interface{}, out interface{}, c *conversion.Clone { in := in.(*HTTPHeader) out := out.(*HTTPHeader) - out.Name = in.Name - out.Value = in.Value + *out = *in return nil } } @@ -1223,14 +1155,13 @@ func DeepCopy_v1_Handler(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*Handler) out := out.(*Handler) + *out = *in if in.Exec != nil { in, out := &in.Exec, &out.Exec *out = new(ExecAction) if err := DeepCopy_v1_ExecAction(*in, *out, c); err != nil { return err } - } else { - out.Exec = nil } if in.HTTPGet != nil { in, out := &in.HTTPGet, &out.HTTPGet @@ -1238,15 +1169,11 @@ func DeepCopy_v1_Handler(in interface{}, out interface{}, c *conversion.Cloner) 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 } @@ -1256,7 +1183,7 @@ func DeepCopy_v1_HostPathVolumeSource(in interface{}, out interface{}, c *conver { in := in.(*HostPathVolumeSource) out := out.(*HostPathVolumeSource) - out.Path = in.Path + *out = *in return nil } } @@ -1265,12 +1192,12 @@ func DeepCopy_v1_ISCSIVolumeSource(in interface{}, out interface{}, c *conversio { in := in.(*ISCSIVolumeSource) out := out.(*ISCSIVolumeSource) - out.TargetPortal = in.TargetPortal - out.IQN = in.IQN - out.Lun = in.Lun - out.ISCSIInterface = in.ISCSIInterface - out.FSType = in.FSType - out.ReadOnly = in.ReadOnly + *out = *in + if in.Portals != nil { + in, out := &in.Portals, &out.Portals + *out = make([]string, len(*in)) + copy(*out, *in) + } return nil } } @@ -1279,14 +1206,11 @@ func DeepCopy_v1_KeyToPath(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*KeyToPath) out := out.(*KeyToPath) - out.Key = in.Key - out.Path = in.Path + *out = *in if in.Mode != nil { in, out := &in.Mode, &out.Mode *out = new(int32) **out = **in - } else { - out.Mode = nil } return nil } @@ -1296,14 +1220,13 @@ func DeepCopy_v1_Lifecycle(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*Lifecycle) out := out.(*Lifecycle) + *out = *in if in.PostStart != nil { in, out := &in.PostStart, &out.PostStart *out = new(Handler) if err := DeepCopy_v1_Handler(*in, *out, c); err != nil { return err } - } else { - out.PostStart = nil } if in.PreStop != nil { in, out := &in.PreStop, &out.PreStop @@ -1311,8 +1234,6 @@ func DeepCopy_v1_Lifecycle(in interface{}, out interface{}, c *conversion.Cloner if err := DeepCopy_v1_Handler(*in, *out, c); err != nil { return err } - } else { - out.PreStop = nil } return nil } @@ -1322,9 +1243,11 @@ func DeepCopy_v1_LimitRange(in interface{}, out interface{}, c *conversion.Clone { in := in.(*LimitRange) out := out.(*LimitRange) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_LimitRangeSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1337,15 +1260,13 @@ func DeepCopy_v1_LimitRangeItem(in interface{}, out interface{}, c *conversion.C { in := in.(*LimitRangeItem) out := out.(*LimitRangeItem) - out.Type = in.Type + *out = *in 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 @@ -1353,8 +1274,6 @@ func DeepCopy_v1_LimitRangeItem(in interface{}, out interface{}, c *conversion.C for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Min = nil } if in.Default != nil { in, out := &in.Default, &out.Default @@ -1362,8 +1281,6 @@ func DeepCopy_v1_LimitRangeItem(in interface{}, out interface{}, c *conversion.C for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Default = nil } if in.DefaultRequest != nil { in, out := &in.DefaultRequest, &out.DefaultRequest @@ -1371,8 +1288,6 @@ func DeepCopy_v1_LimitRangeItem(in interface{}, out interface{}, c *conversion.C for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.DefaultRequest = nil } if in.MaxLimitRequestRatio != nil { in, out := &in.MaxLimitRequestRatio, &out.MaxLimitRequestRatio @@ -1380,8 +1295,6 @@ func DeepCopy_v1_LimitRangeItem(in interface{}, out interface{}, c *conversion.C for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.MaxLimitRequestRatio = nil } return nil } @@ -1391,8 +1304,7 @@ func DeepCopy_v1_LimitRangeList(in interface{}, out interface{}, c *conversion.C { in := in.(*LimitRangeList) out := out.(*LimitRangeList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]LimitRange, len(*in)) @@ -1401,8 +1313,6 @@ func DeepCopy_v1_LimitRangeList(in interface{}, out interface{}, c *conversion.C return err } } - } else { - out.Items = nil } return nil } @@ -1412,6 +1322,7 @@ func DeepCopy_v1_LimitRangeSpec(in interface{}, out interface{}, c *conversion.C { in := in.(*LimitRangeSpec) out := out.(*LimitRangeSpec) + *out = *in if in.Limits != nil { in, out := &in.Limits, &out.Limits *out = make([]LimitRangeItem, len(*in)) @@ -1420,8 +1331,6 @@ func DeepCopy_v1_LimitRangeSpec(in interface{}, out interface{}, c *conversion.C return err } } - } else { - out.Limits = nil } return nil } @@ -1431,18 +1340,17 @@ func DeepCopy_v1_List(in interface{}, out interface{}, c *conversion.Cloner) err { in := in.(*List) out := out.(*List) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in 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 { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { return err + } else { + (*out)[i] = *newVal.(*runtime.RawExtension) } } - } else { - out.Items = nil } return nil } @@ -1452,17 +1360,11 @@ func DeepCopy_v1_ListOptions(in interface{}, out interface{}, c *conversion.Clon { in := in.(*ListOptions) out := out.(*ListOptions) - out.TypeMeta = in.TypeMeta - out.LabelSelector = in.LabelSelector - out.FieldSelector = in.FieldSelector - out.Watch = in.Watch - out.ResourceVersion = in.ResourceVersion + *out = *in if in.TimeoutSeconds != nil { in, out := &in.TimeoutSeconds, &out.TimeoutSeconds *out = new(int64) **out = **in - } else { - out.TimeoutSeconds = nil } return nil } @@ -1472,8 +1374,7 @@ func DeepCopy_v1_LoadBalancerIngress(in interface{}, out interface{}, c *convers { in := in.(*LoadBalancerIngress) out := out.(*LoadBalancerIngress) - out.IP = in.IP - out.Hostname = in.Hostname + *out = *in return nil } } @@ -1482,14 +1383,11 @@ func DeepCopy_v1_LoadBalancerStatus(in interface{}, out interface{}, c *conversi { in := in.(*LoadBalancerStatus) out := out.(*LoadBalancerStatus) + *out = *in 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 + copy(*out, *in) } return nil } @@ -1499,7 +1397,7 @@ func DeepCopy_v1_LocalObjectReference(in interface{}, out interface{}, c *conver { in := in.(*LocalObjectReference) out := out.(*LocalObjectReference) - out.Name = in.Name + *out = *in return nil } } @@ -1508,9 +1406,7 @@ func DeepCopy_v1_NFSVolumeSource(in interface{}, out interface{}, c *conversion. { in := in.(*NFSVolumeSource) out := out.(*NFSVolumeSource) - out.Server = in.Server - out.Path = in.Path - out.ReadOnly = in.ReadOnly + *out = *in return nil } } @@ -1519,14 +1415,15 @@ func DeepCopy_v1_Namespace(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*Namespace) out := out.(*Namespace) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_NamespaceSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status return nil } } @@ -1535,8 +1432,7 @@ func DeepCopy_v1_NamespaceList(in interface{}, out interface{}, c *conversion.Cl { in := in.(*NamespaceList) out := out.(*NamespaceList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Namespace, len(*in)) @@ -1545,8 +1441,6 @@ func DeepCopy_v1_NamespaceList(in interface{}, out interface{}, c *conversion.Cl return err } } - } else { - out.Items = nil } return nil } @@ -1556,14 +1450,11 @@ func DeepCopy_v1_NamespaceSpec(in interface{}, out interface{}, c *conversion.Cl { in := in.(*NamespaceSpec) out := out.(*NamespaceSpec) + *out = *in 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 + copy(*out, *in) } return nil } @@ -1573,7 +1464,7 @@ func DeepCopy_v1_NamespaceStatus(in interface{}, out interface{}, c *conversion. { in := in.(*NamespaceStatus) out := out.(*NamespaceStatus) - out.Phase = in.Phase + *out = *in return nil } } @@ -1582,11 +1473,15 @@ func DeepCopy_v1_Node(in interface{}, out interface{}, c *conversion.Cloner) err { in := in.(*Node) out := out.(*Node) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) + } + if err := DeepCopy_v1_NodeSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Spec = in.Spec if err := DeepCopy_v1_NodeStatus(&in.Status, &out.Status, c); err != nil { return err } @@ -1598,8 +1493,7 @@ func DeepCopy_v1_NodeAddress(in interface{}, out interface{}, c *conversion.Clon { in := in.(*NodeAddress) out := out.(*NodeAddress) - out.Type = in.Type - out.Address = in.Address + *out = *in return nil } } @@ -1608,14 +1502,13 @@ func DeepCopy_v1_NodeAffinity(in interface{}, out interface{}, c *conversion.Clo { in := in.(*NodeAffinity) out := out.(*NodeAffinity) + *out = *in if in.RequiredDuringSchedulingIgnoredDuringExecution != nil { in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution *out = new(NodeSelector) if err := DeepCopy_v1_NodeSelector(*in, *out, c); err != nil { return err } - } else { - out.RequiredDuringSchedulingIgnoredDuringExecution = nil } if in.PreferredDuringSchedulingIgnoredDuringExecution != nil { in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution @@ -1625,8 +1518,6 @@ func DeepCopy_v1_NodeAffinity(in interface{}, out interface{}, c *conversion.Clo return err } } - } else { - out.PreferredDuringSchedulingIgnoredDuringExecution = nil } return nil } @@ -1636,12 +1527,9 @@ func DeepCopy_v1_NodeCondition(in interface{}, out interface{}, c *conversion.Cl { in := in.(*NodeCondition) out := out.(*NodeCondition) - out.Type = in.Type - out.Status = in.Status + *out = *in out.LastHeartbeatTime = in.LastHeartbeatTime.DeepCopy() out.LastTransitionTime = in.LastTransitionTime.DeepCopy() - out.Reason = in.Reason - out.Message = in.Message return nil } } @@ -1650,7 +1538,7 @@ func DeepCopy_v1_NodeDaemonEndpoints(in interface{}, out interface{}, c *convers { in := in.(*NodeDaemonEndpoints) out := out.(*NodeDaemonEndpoints) - out.KubeletEndpoint = in.KubeletEndpoint + *out = *in return nil } } @@ -1659,8 +1547,7 @@ func DeepCopy_v1_NodeList(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*NodeList) out := out.(*NodeList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Node, len(*in)) @@ -1669,8 +1556,6 @@ func DeepCopy_v1_NodeList(in interface{}, out interface{}, c *conversion.Cloner) return err } } - } else { - out.Items = nil } return nil } @@ -1680,8 +1565,23 @@ func DeepCopy_v1_NodeProxyOptions(in interface{}, out interface{}, c *conversion { in := in.(*NodeProxyOptions) out := out.(*NodeProxyOptions) - out.TypeMeta = in.TypeMeta - out.Path = in.Path + *out = *in + return nil + } +} + +func DeepCopy_v1_NodeResources(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*NodeResources) + out := out.(*NodeResources) + *out = *in + if in.Capacity != nil { + in, out := &in.Capacity, &out.Capacity + *out = make(ResourceList) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } return nil } } @@ -1690,6 +1590,7 @@ func DeepCopy_v1_NodeSelector(in interface{}, out interface{}, c *conversion.Clo { in := in.(*NodeSelector) out := out.(*NodeSelector) + *out = *in if in.NodeSelectorTerms != nil { in, out := &in.NodeSelectorTerms, &out.NodeSelectorTerms *out = make([]NodeSelectorTerm, len(*in)) @@ -1698,8 +1599,6 @@ func DeepCopy_v1_NodeSelector(in interface{}, out interface{}, c *conversion.Clo return err } } - } else { - out.NodeSelectorTerms = nil } return nil } @@ -1709,14 +1608,11 @@ func DeepCopy_v1_NodeSelectorRequirement(in interface{}, out interface{}, c *con { in := in.(*NodeSelectorRequirement) out := out.(*NodeSelectorRequirement) - out.Key = in.Key - out.Operator = in.Operator + *out = *in if in.Values != nil { in, out := &in.Values, &out.Values *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Values = nil } return nil } @@ -1726,6 +1622,7 @@ func DeepCopy_v1_NodeSelectorTerm(in interface{}, out interface{}, c *conversion { in := in.(*NodeSelectorTerm) out := out.(*NodeSelectorTerm) + *out = *in if in.MatchExpressions != nil { in, out := &in.MatchExpressions, &out.MatchExpressions *out = make([]NodeSelectorRequirement, len(*in)) @@ -1734,8 +1631,6 @@ func DeepCopy_v1_NodeSelectorTerm(in interface{}, out interface{}, c *conversion return err } } - } else { - out.MatchExpressions = nil } return nil } @@ -1745,10 +1640,16 @@ func DeepCopy_v1_NodeSpec(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*NodeSpec) out := out.(*NodeSpec) - out.PodCIDR = in.PodCIDR - out.ExternalID = in.ExternalID - out.ProviderID = in.ProviderID - out.Unschedulable = in.Unschedulable + *out = *in + if in.Taints != nil { + in, out := &in.Taints, &out.Taints + *out = make([]Taint, len(*in)) + for i := range *in { + if err := DeepCopy_v1_Taint(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } return nil } } @@ -1757,14 +1658,13 @@ func DeepCopy_v1_NodeStatus(in interface{}, out interface{}, c *conversion.Clone { in := in.(*NodeStatus) out := out.(*NodeStatus) + *out = *in if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity *out = make(ResourceList) for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Capacity = nil } if in.Allocatable != nil { in, out := &in.Allocatable, &out.Allocatable @@ -1772,10 +1672,7 @@ func DeepCopy_v1_NodeStatus(in interface{}, out interface{}, c *conversion.Clone 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)) @@ -1784,20 +1681,12 @@ func DeepCopy_v1_NodeStatus(in interface{}, out interface{}, c *conversion.Clone 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 + copy(*out, *in) } - out.DaemonEndpoints = in.DaemonEndpoints - out.NodeInfo = in.NodeInfo if in.Images != nil { in, out := &in.Images, &out.Images *out = make([]ContainerImage, len(*in)) @@ -1806,26 +1695,16 @@ func DeepCopy_v1_NodeStatus(in interface{}, out interface{}, c *conversion.Clone 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 + copy(*out, *in) } 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 + copy(*out, *in) } return nil } @@ -1835,16 +1714,7 @@ func DeepCopy_v1_NodeSystemInfo(in interface{}, out interface{}, c *conversion.C { in := in.(*NodeSystemInfo) out := out.(*NodeSystemInfo) - 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 + *out = *in return nil } } @@ -1853,8 +1723,7 @@ func DeepCopy_v1_ObjectFieldSelector(in interface{}, out interface{}, c *convers { in := in.(*ObjectFieldSelector) out := out.(*ObjectFieldSelector) - out.APIVersion = in.APIVersion - out.FieldPath = in.FieldPath + *out = *in return nil } } @@ -1863,27 +1732,17 @@ func DeepCopy_v1_ObjectMeta(in interface{}, out interface{}, c *conversion.Clone { in := in.(*ObjectMeta) out := out.(*ObjectMeta) - 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 = *in out.CreationTimestamp = in.CreationTimestamp.DeepCopy() if in.DeletionTimestamp != nil { in, out := &in.DeletionTimestamp, &out.DeletionTimestamp - *out = new(unversioned.Time) + *out = new(meta_v1.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 @@ -1891,8 +1750,6 @@ func DeepCopy_v1_ObjectMeta(in interface{}, out interface{}, c *conversion.Clone for key, val := range *in { (*out)[key] = val } - } else { - out.Labels = nil } if in.Annotations != nil { in, out := &in.Annotations, &out.Annotations @@ -1900,28 +1757,23 @@ func DeepCopy_v1_ObjectMeta(in interface{}, out interface{}, c *conversion.Clone 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)) + *out = make([]meta_v1.OwnerReference, len(*in)) for i := range *in { - if err := DeepCopy_v1_OwnerReference(&(*in)[i], &(*out)[i], c); err != nil { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { return err + } else { + (*out)[i] = *newVal.(*meta_v1.OwnerReference) } } - } 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 } - out.ClusterName = in.ClusterName return nil } } @@ -1930,32 +1782,7 @@ func DeepCopy_v1_ObjectReference(in interface{}, out interface{}, c *conversion. { in := in.(*ObjectReference) out := out.(*ObjectReference) - 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 interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*OwnerReference) - out := out.(*OwnerReference) - 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 - } + *out = *in return nil } } @@ -1964,14 +1791,15 @@ func DeepCopy_v1_PersistentVolume(in interface{}, out interface{}, c *conversion { in := in.(*PersistentVolume) out := out.(*PersistentVolume) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PersistentVolumeSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status return nil } } @@ -1980,9 +1808,11 @@ func DeepCopy_v1_PersistentVolumeClaim(in interface{}, out interface{}, c *conve { in := in.(*PersistentVolumeClaim) out := out.(*PersistentVolumeClaim) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1998,8 +1828,7 @@ func DeepCopy_v1_PersistentVolumeClaimList(in interface{}, out interface{}, c *c { in := in.(*PersistentVolumeClaimList) out := out.(*PersistentVolumeClaimList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PersistentVolumeClaim, len(*in)) @@ -2008,8 +1837,6 @@ func DeepCopy_v1_PersistentVolumeClaimList(in interface{}, out interface{}, c *c return err } } - } else { - out.Items = nil } return nil } @@ -2019,28 +1846,28 @@ func DeepCopy_v1_PersistentVolumeClaimSpec(in interface{}, out interface{}, c *c { in := in.(*PersistentVolumeClaimSpec) out := out.(*PersistentVolumeClaimSpec) + *out = *in 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 + copy(*out, *in) } 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 { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*meta_v1.LabelSelector) } - } else { - out.Selector = nil } if err := DeepCopy_v1_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil { return err } - out.VolumeName = in.VolumeName + if in.StorageClassName != nil { + in, out := &in.StorageClassName, &out.StorageClassName + *out = new(string) + **out = **in + } return nil } } @@ -2049,15 +1876,11 @@ func DeepCopy_v1_PersistentVolumeClaimStatus(in interface{}, out interface{}, c { in := in.(*PersistentVolumeClaimStatus) out := out.(*PersistentVolumeClaimStatus) - out.Phase = in.Phase + *out = *in 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 + copy(*out, *in) } if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity @@ -2065,8 +1888,6 @@ func DeepCopy_v1_PersistentVolumeClaimStatus(in interface{}, out interface{}, c for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Capacity = nil } return nil } @@ -2076,8 +1897,7 @@ func DeepCopy_v1_PersistentVolumeClaimVolumeSource(in interface{}, out interface { in := in.(*PersistentVolumeClaimVolumeSource) out := out.(*PersistentVolumeClaimVolumeSource) - out.ClaimName = in.ClaimName - out.ReadOnly = in.ReadOnly + *out = *in return nil } } @@ -2086,8 +1906,7 @@ func DeepCopy_v1_PersistentVolumeList(in interface{}, out interface{}, c *conver { in := in.(*PersistentVolumeList) out := out.(*PersistentVolumeList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PersistentVolume, len(*in)) @@ -2096,8 +1915,6 @@ func DeepCopy_v1_PersistentVolumeList(in interface{}, out interface{}, c *conver return err } } - } else { - out.Items = nil } return nil } @@ -2107,40 +1924,31 @@ func DeepCopy_v1_PersistentVolumeSource(in interface{}, out interface{}, c *conv { in := in.(*PersistentVolumeSource) out := out.(*PersistentVolumeSource) + *out = *in 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 @@ -2148,22 +1956,18 @@ func DeepCopy_v1_PersistentVolumeSource(in interface{}, out interface{}, c *conv 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 err := DeepCopy_v1_ISCSIVolumeSource(*in, *out, c); err != nil { + return err + } } if in.Cinder != nil { in, out := &in.Cinder, &out.Cinder *out = new(CinderVolumeSource) **out = **in - } else { - out.Cinder = nil } if in.CephFS != nil { in, out := &in.CephFS, &out.CephFS @@ -2171,8 +1975,6 @@ func DeepCopy_v1_PersistentVolumeSource(in interface{}, out interface{}, c *conv 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 @@ -2180,15 +1982,11 @@ func DeepCopy_v1_PersistentVolumeSource(in interface{}, out interface{}, c *conv 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 @@ -2196,29 +1994,21 @@ func DeepCopy_v1_PersistentVolumeSource(in interface{}, out interface{}, c *conv 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 } if in.Quobyte != nil { in, out := &in.Quobyte, &out.Quobyte *out = new(QuobyteVolumeSource) **out = **in - } else { - out.Quobyte = nil } if in.AzureDisk != nil { in, out := &in.AzureDisk, &out.AzureDisk @@ -2226,8 +2016,23 @@ func DeepCopy_v1_PersistentVolumeSource(in interface{}, out interface{}, c *conv if err := DeepCopy_v1_AzureDiskVolumeSource(*in, *out, c); err != nil { return err } - } else { - out.AzureDisk = nil + } + if in.PhotonPersistentDisk != nil { + in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk + *out = new(PhotonPersistentDiskVolumeSource) + **out = **in + } + if in.PortworxVolume != nil { + in, out := &in.PortworxVolume, &out.PortworxVolume + *out = new(PortworxVolumeSource) + **out = **in + } + if in.ScaleIO != nil { + in, out := &in.ScaleIO, &out.ScaleIO + *out = new(ScaleIOVolumeSource) + if err := DeepCopy_v1_ScaleIOVolumeSource(*in, *out, c); err != nil { + return err + } } return nil } @@ -2237,14 +2042,13 @@ func DeepCopy_v1_PersistentVolumeSpec(in interface{}, out interface{}, c *conver { in := in.(*PersistentVolumeSpec) out := out.(*PersistentVolumeSpec) + *out = *in if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity *out = make(ResourceList) for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Capacity = nil } if err := DeepCopy_v1_PersistentVolumeSource(&in.PersistentVolumeSource, &out.PersistentVolumeSource, c); err != nil { return err @@ -2252,20 +2056,13 @@ func DeepCopy_v1_PersistentVolumeSpec(in interface{}, out interface{}, c *conver 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 + copy(*out, *in) } 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 } } @@ -2274,9 +2071,16 @@ func DeepCopy_v1_PersistentVolumeStatus(in interface{}, out interface{}, c *conv { in := in.(*PersistentVolumeStatus) out := out.(*PersistentVolumeStatus) - out.Phase = in.Phase - out.Message = in.Message - out.Reason = in.Reason + *out = *in + return nil + } +} + +func DeepCopy_v1_PhotonPersistentDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PhotonPersistentDiskVolumeSource) + out := out.(*PhotonPersistentDiskVolumeSource) + *out = *in return nil } } @@ -2285,9 +2089,11 @@ func DeepCopy_v1_Pod(in interface{}, out interface{}, c *conversion.Cloner) erro { in := in.(*Pod) out := out.(*Pod) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2303,6 +2109,7 @@ func DeepCopy_v1_PodAffinity(in interface{}, out interface{}, c *conversion.Clon { in := in.(*PodAffinity) out := out.(*PodAffinity) + *out = *in if in.RequiredDuringSchedulingIgnoredDuringExecution != nil { in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution *out = make([]PodAffinityTerm, len(*in)) @@ -2311,8 +2118,6 @@ func DeepCopy_v1_PodAffinity(in interface{}, out interface{}, c *conversion.Clon return err } } - } else { - out.RequiredDuringSchedulingIgnoredDuringExecution = nil } if in.PreferredDuringSchedulingIgnoredDuringExecution != nil { in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution @@ -2322,8 +2127,6 @@ func DeepCopy_v1_PodAffinity(in interface{}, out interface{}, c *conversion.Clon return err } } - } else { - out.PreferredDuringSchedulingIgnoredDuringExecution = nil } return nil } @@ -2333,23 +2136,20 @@ func DeepCopy_v1_PodAffinityTerm(in interface{}, out interface{}, c *conversion. { in := in.(*PodAffinityTerm) out := out.(*PodAffinityTerm) + *out = *in 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 { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*meta_v1.LabelSelector) } - } 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 } } @@ -2358,6 +2158,7 @@ func DeepCopy_v1_PodAntiAffinity(in interface{}, out interface{}, c *conversion. { in := in.(*PodAntiAffinity) out := out.(*PodAntiAffinity) + *out = *in if in.RequiredDuringSchedulingIgnoredDuringExecution != nil { in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution *out = make([]PodAffinityTerm, len(*in)) @@ -2366,8 +2167,6 @@ func DeepCopy_v1_PodAntiAffinity(in interface{}, out interface{}, c *conversion. return err } } - } else { - out.RequiredDuringSchedulingIgnoredDuringExecution = nil } if in.PreferredDuringSchedulingIgnoredDuringExecution != nil { in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution @@ -2377,8 +2176,6 @@ func DeepCopy_v1_PodAntiAffinity(in interface{}, out interface{}, c *conversion. return err } } - } else { - out.PreferredDuringSchedulingIgnoredDuringExecution = nil } return nil } @@ -2388,12 +2185,7 @@ func DeepCopy_v1_PodAttachOptions(in interface{}, out interface{}, c *conversion { in := in.(*PodAttachOptions) out := out.(*PodAttachOptions) - out.TypeMeta = in.TypeMeta - out.Stdin = in.Stdin - out.Stdout = in.Stdout - out.Stderr = in.Stderr - out.TTY = in.TTY - out.Container = in.Container + *out = *in return nil } } @@ -2402,12 +2194,9 @@ func DeepCopy_v1_PodCondition(in interface{}, out interface{}, c *conversion.Clo { in := in.(*PodCondition) out := out.(*PodCondition) - out.Type = in.Type - out.Status = in.Status + *out = *in out.LastProbeTime = in.LastProbeTime.DeepCopy() out.LastTransitionTime = in.LastTransitionTime.DeepCopy() - out.Reason = in.Reason - out.Message = in.Message return nil } } @@ -2416,18 +2205,11 @@ func DeepCopy_v1_PodExecOptions(in interface{}, out interface{}, c *conversion.C { in := in.(*PodExecOptions) out := out.(*PodExecOptions) - out.TypeMeta = in.TypeMeta - out.Stdin = in.Stdin - out.Stdout = in.Stdout - out.Stderr = in.Stderr - out.TTY = in.TTY - out.Container = in.Container + *out = *in if in.Command != nil { in, out := &in.Command, &out.Command *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Command = nil } return nil } @@ -2437,8 +2219,7 @@ func DeepCopy_v1_PodList(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*PodList) out := out.(*PodList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Pod, len(*in)) @@ -2447,8 +2228,6 @@ func DeepCopy_v1_PodList(in interface{}, out interface{}, c *conversion.Cloner) return err } } - } else { - out.Items = nil } return nil } @@ -2458,38 +2237,40 @@ func DeepCopy_v1_PodLogOptions(in interface{}, out interface{}, c *conversion.Cl { in := in.(*PodLogOptions) out := out.(*PodLogOptions) - out.TypeMeta = in.TypeMeta - out.Container = in.Container - out.Follow = in.Follow - out.Previous = in.Previous + *out = *in 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 = new(meta_v1.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_PodPortForwardOptions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodPortForwardOptions) + out := out.(*PodPortForwardOptions) + *out = *in + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]int32, len(*in)) + copy(*out, *in) } return nil } @@ -2499,8 +2280,7 @@ func DeepCopy_v1_PodProxyOptions(in interface{}, out interface{}, c *conversion. { in := in.(*PodProxyOptions) out := out.(*PodProxyOptions) - out.TypeMeta = in.TypeMeta - out.Path = in.Path + *out = *in return nil } } @@ -2509,40 +2289,31 @@ func DeepCopy_v1_PodSecurityContext(in interface{}, out interface{}, c *conversi { in := in.(*PodSecurityContext) out := out.(*PodSecurityContext) + *out = *in 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 } @@ -2552,14 +2323,14 @@ func DeepCopy_v1_PodSignature(in interface{}, out interface{}, c *conversion.Clo { in := in.(*PodSignature) out := out.(*PodSignature) + *out = *in if in.PodController != nil { in, out := &in.PodController, &out.PodController - *out = new(OwnerReference) - if err := DeepCopy_v1_OwnerReference(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*meta_v1.OwnerReference) } - } else { - out.PodController = nil } return nil } @@ -2569,6 +2340,7 @@ func DeepCopy_v1_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*PodSpec) out := out.(*PodSpec) + *out = *in if in.Volumes != nil { in, out := &in.Volumes, &out.Volumes *out = make([]Volume, len(*in)) @@ -2577,8 +2349,6 @@ func DeepCopy_v1_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) return err } } - } else { - out.Volumes = nil } if in.InitContainers != nil { in, out := &in.InitContainers, &out.InitContainers @@ -2588,8 +2358,6 @@ func DeepCopy_v1_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) return err } } - } else { - out.InitContainers = nil } if in.Containers != nil { in, out := &in.Containers, &out.Containers @@ -2599,60 +2367,57 @@ func DeepCopy_v1_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) 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.AutomountServiceAccountToken != nil { + in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken + *out = new(bool) + **out = **in + } if in.SecurityContext != nil { in, out := &in.SecurityContext, &out.SecurityContext *out = new(PodSecurityContext) if err := DeepCopy_v1_PodSecurityContext(*in, *out, c); err != nil { return err } - } 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 + copy(*out, *in) + } + if in.Affinity != nil { + in, out := &in.Affinity, &out.Affinity + *out = new(Affinity) + if err := DeepCopy_v1_Affinity(*in, *out, c); err != nil { + return err + } + } + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]Toleration, len(*in)) + for i := range *in { + if err := DeepCopy_v1_Toleration(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } } - out.Hostname = in.Hostname - out.Subdomain = in.Subdomain return nil } } @@ -2661,7 +2426,7 @@ func DeepCopy_v1_PodStatus(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*PodStatus) out := out.(*PodStatus) - out.Phase = in.Phase + *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]PodCondition, len(*in)) @@ -2670,19 +2435,11 @@ func DeepCopy_v1_PodStatus(in interface{}, out interface{}, c *conversion.Cloner 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 = new(meta_v1.Time) **out = (*in).DeepCopy() - } else { - out.StartTime = nil } if in.InitContainerStatuses != nil { in, out := &in.InitContainerStatuses, &out.InitContainerStatuses @@ -2692,8 +2449,6 @@ func DeepCopy_v1_PodStatus(in interface{}, out interface{}, c *conversion.Cloner return err } } - } else { - out.InitContainerStatuses = nil } if in.ContainerStatuses != nil { in, out := &in.ContainerStatuses, &out.ContainerStatuses @@ -2703,8 +2458,6 @@ func DeepCopy_v1_PodStatus(in interface{}, out interface{}, c *conversion.Cloner return err } } - } else { - out.ContainerStatuses = nil } return nil } @@ -2714,9 +2467,11 @@ func DeepCopy_v1_PodStatusResult(in interface{}, out interface{}, c *conversion. { in := in.(*PodStatusResult) out := out.(*PodStatusResult) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodStatus(&in.Status, &out.Status, c); err != nil { return err @@ -2729,9 +2484,11 @@ func DeepCopy_v1_PodTemplate(in interface{}, out interface{}, c *conversion.Clon { in := in.(*PodTemplate) out := out.(*PodTemplate) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -2744,8 +2501,7 @@ func DeepCopy_v1_PodTemplateList(in interface{}, out interface{}, c *conversion. { in := in.(*PodTemplateList) out := out.(*PodTemplateList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PodTemplate, len(*in)) @@ -2754,8 +2510,6 @@ func DeepCopy_v1_PodTemplateList(in interface{}, out interface{}, c *conversion. return err } } - } else { - out.Items = nil } return nil } @@ -2765,8 +2519,11 @@ func DeepCopy_v1_PodTemplateSpec(in interface{}, out interface{}, c *conversion. { in := in.(*PodTemplateSpec) out := out.(*PodTemplateSpec) - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2775,16 +2532,24 @@ func DeepCopy_v1_PodTemplateSpec(in interface{}, out interface{}, c *conversion. } } +func DeepCopy_v1_PortworxVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PortworxVolumeSource) + out := out.(*PortworxVolumeSource) + *out = *in + return nil + } +} + func DeepCopy_v1_Preconditions(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*Preconditions) out := out.(*Preconditions) + *out = *in if in.UID != nil { in, out := &in.UID, &out.UID *out = new(types.UID) **out = **in - } else { - out.UID = nil } return nil } @@ -2794,12 +2559,11 @@ func DeepCopy_v1_PreferAvoidPodsEntry(in interface{}, out interface{}, c *conver { in := in.(*PreferAvoidPodsEntry) out := out.(*PreferAvoidPodsEntry) + *out = *in if err := DeepCopy_v1_PodSignature(&in.PodSignature, &out.PodSignature, c); err != nil { return err } out.EvictionTime = in.EvictionTime.DeepCopy() - out.Reason = in.Reason - out.Message = in.Message return nil } } @@ -2808,7 +2572,7 @@ func DeepCopy_v1_PreferredSchedulingTerm(in interface{}, out interface{}, c *con { in := in.(*PreferredSchedulingTerm) out := out.(*PreferredSchedulingTerm) - out.Weight = in.Weight + *out = *in if err := DeepCopy_v1_NodeSelectorTerm(&in.Preference, &out.Preference, c); err != nil { return err } @@ -2820,14 +2584,33 @@ func DeepCopy_v1_Probe(in interface{}, out interface{}, c *conversion.Cloner) er { in := in.(*Probe) out := out.(*Probe) + *out = *in 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_ProjectedVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ProjectedVolumeSource) + out := out.(*ProjectedVolumeSource) + *out = *in + if in.Sources != nil { + in, out := &in.Sources, &out.Sources + *out = make([]VolumeProjection, len(*in)) + for i := range *in { + if err := DeepCopy_v1_VolumeProjection(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + if in.DefaultMode != nil { + in, out := &in.DefaultMode, &out.DefaultMode + *out = new(int32) + **out = **in + } return nil } } @@ -2836,11 +2619,7 @@ func DeepCopy_v1_QuobyteVolumeSource(in interface{}, out interface{}, c *convers { in := in.(*QuobyteVolumeSource) out := out.(*QuobyteVolumeSource) - out.Registry = in.Registry - out.Volume = in.Volume - out.ReadOnly = in.ReadOnly - out.User = in.User - out.Group = in.Group + *out = *in return nil } } @@ -2849,26 +2628,17 @@ func DeepCopy_v1_RBDVolumeSource(in interface{}, out interface{}, c *conversion. { in := in.(*RBDVolumeSource) out := out.(*RBDVolumeSource) + *out = *in if in.CephMonitors != nil { in, out := &in.CephMonitors, &out.CephMonitors *out = make([]string, len(*in)) copy(*out, *in) - } 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 } } @@ -2877,17 +2647,16 @@ func DeepCopy_v1_RangeAllocation(in interface{}, out interface{}, c *conversion. { in := in.(*RangeAllocation) out := out.(*RangeAllocation) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } - 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 } @@ -2897,14 +2666,28 @@ func DeepCopy_v1_ReplicationController(in interface{}, out interface{}, c *conve { in := in.(*ReplicationController) out := out.(*ReplicationController) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status + if err := DeepCopy_v1_ReplicationControllerStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1_ReplicationControllerCondition(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ReplicationControllerCondition) + out := out.(*ReplicationControllerCondition) + *out = *in + out.LastTransitionTime = in.LastTransitionTime.DeepCopy() return nil } } @@ -2913,8 +2696,7 @@ func DeepCopy_v1_ReplicationControllerList(in interface{}, out interface{}, c *c { in := in.(*ReplicationControllerList) out := out.(*ReplicationControllerList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ReplicationController, len(*in)) @@ -2923,8 +2705,6 @@ func DeepCopy_v1_ReplicationControllerList(in interface{}, out interface{}, c *c return err } } - } else { - out.Items = nil } return nil } @@ -2934,12 +2714,11 @@ func DeepCopy_v1_ReplicationControllerSpec(in interface{}, out interface{}, c *c { in := in.(*ReplicationControllerSpec) out := out.(*ReplicationControllerSpec) + *out = *in 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 @@ -2947,8 +2726,6 @@ func DeepCopy_v1_ReplicationControllerSpec(in interface{}, out interface{}, c *c for key, val := range *in { (*out)[key] = val } - } else { - out.Selector = nil } if in.Template != nil { in, out := &in.Template, &out.Template @@ -2956,8 +2733,6 @@ func DeepCopy_v1_ReplicationControllerSpec(in interface{}, out interface{}, c *c if err := DeepCopy_v1_PodTemplateSpec(*in, *out, c); err != nil { return err } - } else { - out.Template = nil } return nil } @@ -2967,10 +2742,16 @@ func DeepCopy_v1_ReplicationControllerStatus(in interface{}, out interface{}, c { in := in.(*ReplicationControllerStatus) out := out.(*ReplicationControllerStatus) - out.Replicas = in.Replicas - out.FullyLabeledReplicas = in.FullyLabeledReplicas - out.ReadyReplicas = in.ReadyReplicas - out.ObservedGeneration = in.ObservedGeneration + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]ReplicationControllerCondition, len(*in)) + for i := range *in { + if err := DeepCopy_v1_ReplicationControllerCondition(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } return nil } } @@ -2979,8 +2760,7 @@ func DeepCopy_v1_ResourceFieldSelector(in interface{}, out interface{}, c *conve { in := in.(*ResourceFieldSelector) out := out.(*ResourceFieldSelector) - out.ContainerName = in.ContainerName - out.Resource = in.Resource + *out = *in out.Divisor = in.Divisor.DeepCopy() return nil } @@ -2990,9 +2770,11 @@ func DeepCopy_v1_ResourceQuota(in interface{}, out interface{}, c *conversion.Cl { in := in.(*ResourceQuota) out := out.(*ResourceQuota) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_ResourceQuotaSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -3008,8 +2790,7 @@ func DeepCopy_v1_ResourceQuotaList(in interface{}, out interface{}, c *conversio { in := in.(*ResourceQuotaList) out := out.(*ResourceQuotaList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ResourceQuota, len(*in)) @@ -3018,8 +2799,6 @@ func DeepCopy_v1_ResourceQuotaList(in interface{}, out interface{}, c *conversio return err } } - } else { - out.Items = nil } return nil } @@ -3029,23 +2808,18 @@ func DeepCopy_v1_ResourceQuotaSpec(in interface{}, out interface{}, c *conversio { in := in.(*ResourceQuotaSpec) out := out.(*ResourceQuotaSpec) + *out = *in if in.Hard != nil { in, out := &in.Hard, &out.Hard *out = make(ResourceList) for key, val := range *in { (*out)[key] = val.DeepCopy() } - } 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 + copy(*out, *in) } return nil } @@ -3055,14 +2829,13 @@ func DeepCopy_v1_ResourceQuotaStatus(in interface{}, out interface{}, c *convers { in := in.(*ResourceQuotaStatus) out := out.(*ResourceQuotaStatus) + *out = *in if in.Hard != nil { in, out := &in.Hard, &out.Hard *out = make(ResourceList) for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Hard = nil } if in.Used != nil { in, out := &in.Used, &out.Used @@ -3070,8 +2843,6 @@ func DeepCopy_v1_ResourceQuotaStatus(in interface{}, out interface{}, c *convers for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Used = nil } return nil } @@ -3081,14 +2852,13 @@ func DeepCopy_v1_ResourceRequirements(in interface{}, out interface{}, c *conver { in := in.(*ResourceRequirements) out := out.(*ResourceRequirements) + *out = *in if in.Limits != nil { in, out := &in.Limits, &out.Limits *out = make(ResourceList) for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Limits = nil } if in.Requests != nil { in, out := &in.Requests, &out.Requests @@ -3096,8 +2866,6 @@ func DeepCopy_v1_ResourceRequirements(in interface{}, out interface{}, c *conver for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Requests = nil } return nil } @@ -3107,10 +2875,21 @@ func DeepCopy_v1_SELinuxOptions(in interface{}, out interface{}, c *conversion.C { in := in.(*SELinuxOptions) out := out.(*SELinuxOptions) - out.User = in.User - out.Role = in.Role - out.Type = in.Type - out.Level = in.Level + *out = *in + return nil + } +} + +func DeepCopy_v1_ScaleIOVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ScaleIOVolumeSource) + out := out.(*ScaleIOVolumeSource) + *out = *in + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(LocalObjectReference) + **out = **in + } return nil } } @@ -3119,9 +2898,11 @@ func DeepCopy_v1_Secret(in interface{}, out interface{}, c *conversion.Cloner) e { in := in.(*Secret) out := out.(*Secret) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -3133,8 +2914,6 @@ func DeepCopy_v1_Secret(in interface{}, out interface{}, c *conversion.Cloner) e (*out)[key] = *newVal.(*[]byte) } } - } else { - out.Data = nil } if in.StringData != nil { in, out := &in.StringData, &out.StringData @@ -3142,10 +2921,21 @@ func DeepCopy_v1_Secret(in interface{}, out interface{}, c *conversion.Cloner) e for key, val := range *in { (*out)[key] = val } - } else { - out.StringData = nil } - out.Type = in.Type + return nil + } +} + +func DeepCopy_v1_SecretEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*SecretEnvSource) + out := out.(*SecretEnvSource) + *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -3154,8 +2944,12 @@ func DeepCopy_v1_SecretKeySelector(in interface{}, out interface{}, c *conversio { in := in.(*SecretKeySelector) out := out.(*SecretKeySelector) - out.LocalObjectReference = in.LocalObjectReference - out.Key = in.Key + *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -3164,8 +2958,7 @@ func DeepCopy_v1_SecretList(in interface{}, out interface{}, c *conversion.Clone { in := in.(*SecretList) out := out.(*SecretList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Secret, len(*in)) @@ -3174,8 +2967,29 @@ func DeepCopy_v1_SecretList(in interface{}, out interface{}, c *conversion.Clone return err } } - } else { - out.Items = nil + } + return nil + } +} + +func DeepCopy_v1_SecretProjection(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*SecretProjection) + out := out.(*SecretProjection) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KeyToPath, len(*in)) + for i := range *in { + if err := DeepCopy_v1_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in } return nil } @@ -3185,7 +2999,7 @@ func DeepCopy_v1_SecretVolumeSource(in interface{}, out interface{}, c *conversi { in := in.(*SecretVolumeSource) out := out.(*SecretVolumeSource) - out.SecretName = in.SecretName + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]KeyToPath, len(*in)) @@ -3194,15 +3008,16 @@ func DeepCopy_v1_SecretVolumeSource(in interface{}, out interface{}, c *conversi return err } } - } else { - out.Items = nil } if in.DefaultMode != nil { in, out := &in.DefaultMode, &out.DefaultMode *out = new(int32) **out = **in - } else { - out.DefaultMode = nil + } + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in } return nil } @@ -3212,49 +3027,38 @@ func DeepCopy_v1_SecurityContext(in interface{}, out interface{}, c *conversion. { in := in.(*SecurityContext) out := out.(*SecurityContext) + *out = *in if in.Capabilities != nil { in, out := &in.Capabilities, &out.Capabilities *out = new(Capabilities) if err := DeepCopy_v1_Capabilities(*in, *out, c); err != nil { return err } - } 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 } @@ -3264,8 +3068,7 @@ func DeepCopy_v1_SerializedReference(in interface{}, out interface{}, c *convers { in := in.(*SerializedReference) out := out.(*SerializedReference) - out.TypeMeta = in.TypeMeta - out.Reference = in.Reference + *out = *in return nil } } @@ -3274,9 +3077,11 @@ func DeepCopy_v1_Service(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*Service) out := out.(*Service) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_ServiceSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -3292,27 +3097,26 @@ func DeepCopy_v1_ServiceAccount(in interface{}, out interface{}, c *conversion.C { in := in.(*ServiceAccount) out := out.(*ServiceAccount) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Secrets != nil { in, out := &in.Secrets, &out.Secrets *out = make([]ObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Secrets = nil + copy(*out, *in) } 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 + copy(*out, *in) + } + if in.AutomountServiceAccountToken != nil { + in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken + *out = new(bool) + **out = **in } return nil } @@ -3322,8 +3126,7 @@ func DeepCopy_v1_ServiceAccountList(in interface{}, out interface{}, c *conversi { in := in.(*ServiceAccountList) out := out.(*ServiceAccountList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ServiceAccount, len(*in)) @@ -3332,8 +3135,6 @@ func DeepCopy_v1_ServiceAccountList(in interface{}, out interface{}, c *conversi return err } } - } else { - out.Items = nil } return nil } @@ -3343,8 +3144,7 @@ func DeepCopy_v1_ServiceList(in interface{}, out interface{}, c *conversion.Clon { in := in.(*ServiceList) out := out.(*ServiceList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Service, len(*in)) @@ -3353,8 +3153,6 @@ func DeepCopy_v1_ServiceList(in interface{}, out interface{}, c *conversion.Clon return err } } - } else { - out.Items = nil } return nil } @@ -3364,11 +3162,7 @@ func DeepCopy_v1_ServicePort(in interface{}, out interface{}, c *conversion.Clon { in := in.(*ServicePort) out := out.(*ServicePort) - out.Name = in.Name - out.Protocol = in.Protocol - out.Port = in.Port - out.TargetPort = in.TargetPort - out.NodePort = in.NodePort + *out = *in return nil } } @@ -3377,8 +3171,7 @@ func DeepCopy_v1_ServiceProxyOptions(in interface{}, out interface{}, c *convers { in := in.(*ServiceProxyOptions) out := out.(*ServiceProxyOptions) - out.TypeMeta = in.TypeMeta - out.Path = in.Path + *out = *in return nil } } @@ -3387,14 +3180,11 @@ func DeepCopy_v1_ServiceSpec(in interface{}, out interface{}, c *conversion.Clon { in := in.(*ServiceSpec) out := out.(*ServiceSpec) + *out = *in 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 + copy(*out, *in) } if in.Selector != nil { in, out := &in.Selector, &out.Selector @@ -3402,35 +3192,22 @@ func DeepCopy_v1_ServiceSpec(in interface{}, out interface{}, c *conversion.Clon 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 } - out.ExternalName = in.ExternalName return nil } } @@ -3439,6 +3216,7 @@ func DeepCopy_v1_ServiceStatus(in interface{}, out interface{}, c *conversion.Cl { in := in.(*ServiceStatus) out := out.(*ServiceStatus) + *out = *in if err := DeepCopy_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil { return err } @@ -3446,11 +3224,20 @@ func DeepCopy_v1_ServiceStatus(in interface{}, out interface{}, c *conversion.Cl } } +func DeepCopy_v1_Sysctl(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Sysctl) + out := out.(*Sysctl) + *out = *in + return nil + } +} + func DeepCopy_v1_TCPSocketAction(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*TCPSocketAction) out := out.(*TCPSocketAction) - out.Port = in.Port + *out = *in return nil } } @@ -3459,9 +3246,8 @@ func DeepCopy_v1_Taint(in interface{}, out interface{}, c *conversion.Cloner) er { in := in.(*Taint) out := out.(*Taint) - out.Key = in.Key - out.Value = in.Value - out.Effect = in.Effect + *out = *in + out.TimeAdded = in.TimeAdded.DeepCopy() return nil } } @@ -3470,10 +3256,12 @@ func DeepCopy_v1_Toleration(in interface{}, out interface{}, c *conversion.Clone { in := in.(*Toleration) out := out.(*Toleration) - out.Key = in.Key - out.Operator = in.Operator - out.Value = in.Value - out.Effect = in.Effect + *out = *in + if in.TolerationSeconds != nil { + in, out := &in.TolerationSeconds, &out.TolerationSeconds + *out = new(int64) + **out = **in + } return nil } } @@ -3482,7 +3270,7 @@ func DeepCopy_v1_Volume(in interface{}, out interface{}, c *conversion.Cloner) e { in := in.(*Volume) out := out.(*Volume) - out.Name = in.Name + *out = *in if err := DeepCopy_v1_VolumeSource(&in.VolumeSource, &out.VolumeSource, c); err != nil { return err } @@ -3494,10 +3282,37 @@ func DeepCopy_v1_VolumeMount(in interface{}, out interface{}, c *conversion.Clon { in := in.(*VolumeMount) out := out.(*VolumeMount) - out.Name = in.Name - out.ReadOnly = in.ReadOnly - out.MountPath = in.MountPath - out.SubPath = in.SubPath + *out = *in + return nil + } +} + +func DeepCopy_v1_VolumeProjection(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*VolumeProjection) + out := out.(*VolumeProjection) + *out = *in + if in.Secret != nil { + in, out := &in.Secret, &out.Secret + *out = new(SecretProjection) + if err := DeepCopy_v1_SecretProjection(*in, *out, c); err != nil { + return err + } + } + if in.DownwardAPI != nil { + in, out := &in.DownwardAPI, &out.DownwardAPI + *out = new(DownwardAPIProjection) + if err := DeepCopy_v1_DownwardAPIProjection(*in, *out, c); err != nil { + return err + } + } + if in.ConfigMap != nil { + in, out := &in.ConfigMap, &out.ConfigMap + *out = new(ConfigMapProjection) + if err := DeepCopy_v1_ConfigMapProjection(*in, *out, c); err != nil { + return err + } + } return nil } } @@ -3506,40 +3321,31 @@ func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Clo { in := in.(*VolumeSource) out := out.(*VolumeSource) + *out = *in 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 @@ -3547,36 +3353,28 @@ func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Clo 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 err := DeepCopy_v1_ISCSIVolumeSource(*in, *out, c); err != nil { + return err + } } if in.Glusterfs != nil { in, out := &in.Glusterfs, &out.Glusterfs *out = new(GlusterfsVolumeSource) **out = **in - } 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 @@ -3584,8 +3382,6 @@ func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Clo 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 @@ -3593,15 +3389,11 @@ func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Clo 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 @@ -3609,15 +3401,11 @@ func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Clo 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 @@ -3625,8 +3413,6 @@ func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Clo 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 @@ -3634,15 +3420,11 @@ func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Clo 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 @@ -3650,22 +3432,16 @@ func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Clo 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 } if in.Quobyte != nil { in, out := &in.Quobyte, &out.Quobyte *out = new(QuobyteVolumeSource) **out = **in - } else { - out.Quobyte = nil } if in.AzureDisk != nil { in, out := &in.AzureDisk, &out.AzureDisk @@ -3673,8 +3449,30 @@ func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Clo if err := DeepCopy_v1_AzureDiskVolumeSource(*in, *out, c); err != nil { return err } - } else { - out.AzureDisk = nil + } + if in.PhotonPersistentDisk != nil { + in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk + *out = new(PhotonPersistentDiskVolumeSource) + **out = **in + } + if in.Projected != nil { + in, out := &in.Projected, &out.Projected + *out = new(ProjectedVolumeSource) + if err := DeepCopy_v1_ProjectedVolumeSource(*in, *out, c); err != nil { + return err + } + } + if in.PortworxVolume != nil { + in, out := &in.PortworxVolume, &out.PortworxVolume + *out = new(PortworxVolumeSource) + **out = **in + } + if in.ScaleIO != nil { + in, out := &in.ScaleIO, &out.ScaleIO + *out = new(ScaleIOVolumeSource) + if err := DeepCopy_v1_ScaleIOVolumeSource(*in, *out, c); err != nil { + return err + } } return nil } @@ -3684,8 +3482,7 @@ func DeepCopy_v1_VsphereVirtualDiskVolumeSource(in interface{}, out interface{}, { in := in.(*VsphereVirtualDiskVolumeSource) out := out.(*VsphereVirtualDiskVolumeSource) - out.VolumePath = in.VolumePath - out.FSType = in.FSType + *out = *in return nil } } @@ -3694,7 +3491,7 @@ func DeepCopy_v1_WeightedPodAffinityTerm(in interface{}, out interface{}, c *con { in := in.(*WeightedPodAffinityTerm) out := out.(*WeightedPodAffinityTerm) - out.Weight = in.Weight + *out = *in if err := DeepCopy_v1_PodAffinityTerm(&in.PodAffinityTerm, &out.PodAffinityTerm, c); err != nil { return err } diff --git a/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.defaults.go new file mode 100644 index 000000000..121b39185 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.defaults.go @@ -0,0 +1,631 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&ConfigMap{}, func(obj interface{}) { SetObjectDefaults_ConfigMap(obj.(*ConfigMap)) }) + scheme.AddTypeDefaultingFunc(&ConfigMapList{}, func(obj interface{}) { SetObjectDefaults_ConfigMapList(obj.(*ConfigMapList)) }) + scheme.AddTypeDefaultingFunc(&Endpoints{}, func(obj interface{}) { SetObjectDefaults_Endpoints(obj.(*Endpoints)) }) + scheme.AddTypeDefaultingFunc(&EndpointsList{}, func(obj interface{}) { SetObjectDefaults_EndpointsList(obj.(*EndpointsList)) }) + scheme.AddTypeDefaultingFunc(&LimitRange{}, func(obj interface{}) { SetObjectDefaults_LimitRange(obj.(*LimitRange)) }) + scheme.AddTypeDefaultingFunc(&LimitRangeList{}, func(obj interface{}) { SetObjectDefaults_LimitRangeList(obj.(*LimitRangeList)) }) + scheme.AddTypeDefaultingFunc(&Namespace{}, func(obj interface{}) { SetObjectDefaults_Namespace(obj.(*Namespace)) }) + scheme.AddTypeDefaultingFunc(&NamespaceList{}, func(obj interface{}) { SetObjectDefaults_NamespaceList(obj.(*NamespaceList)) }) + scheme.AddTypeDefaultingFunc(&Node{}, func(obj interface{}) { SetObjectDefaults_Node(obj.(*Node)) }) + scheme.AddTypeDefaultingFunc(&NodeList{}, func(obj interface{}) { SetObjectDefaults_NodeList(obj.(*NodeList)) }) + scheme.AddTypeDefaultingFunc(&PersistentVolume{}, func(obj interface{}) { SetObjectDefaults_PersistentVolume(obj.(*PersistentVolume)) }) + scheme.AddTypeDefaultingFunc(&PersistentVolumeClaim{}, func(obj interface{}) { SetObjectDefaults_PersistentVolumeClaim(obj.(*PersistentVolumeClaim)) }) + scheme.AddTypeDefaultingFunc(&PersistentVolumeClaimList{}, func(obj interface{}) { SetObjectDefaults_PersistentVolumeClaimList(obj.(*PersistentVolumeClaimList)) }) + scheme.AddTypeDefaultingFunc(&PersistentVolumeList{}, func(obj interface{}) { SetObjectDefaults_PersistentVolumeList(obj.(*PersistentVolumeList)) }) + scheme.AddTypeDefaultingFunc(&Pod{}, func(obj interface{}) { SetObjectDefaults_Pod(obj.(*Pod)) }) + scheme.AddTypeDefaultingFunc(&PodAttachOptions{}, func(obj interface{}) { SetObjectDefaults_PodAttachOptions(obj.(*PodAttachOptions)) }) + scheme.AddTypeDefaultingFunc(&PodExecOptions{}, func(obj interface{}) { SetObjectDefaults_PodExecOptions(obj.(*PodExecOptions)) }) + scheme.AddTypeDefaultingFunc(&PodList{}, func(obj interface{}) { SetObjectDefaults_PodList(obj.(*PodList)) }) + scheme.AddTypeDefaultingFunc(&PodTemplate{}, func(obj interface{}) { SetObjectDefaults_PodTemplate(obj.(*PodTemplate)) }) + scheme.AddTypeDefaultingFunc(&PodTemplateList{}, func(obj interface{}) { SetObjectDefaults_PodTemplateList(obj.(*PodTemplateList)) }) + scheme.AddTypeDefaultingFunc(&ReplicationController{}, func(obj interface{}) { SetObjectDefaults_ReplicationController(obj.(*ReplicationController)) }) + scheme.AddTypeDefaultingFunc(&ReplicationControllerList{}, func(obj interface{}) { SetObjectDefaults_ReplicationControllerList(obj.(*ReplicationControllerList)) }) + scheme.AddTypeDefaultingFunc(&ResourceQuota{}, func(obj interface{}) { SetObjectDefaults_ResourceQuota(obj.(*ResourceQuota)) }) + scheme.AddTypeDefaultingFunc(&ResourceQuotaList{}, func(obj interface{}) { SetObjectDefaults_ResourceQuotaList(obj.(*ResourceQuotaList)) }) + scheme.AddTypeDefaultingFunc(&Secret{}, func(obj interface{}) { SetObjectDefaults_Secret(obj.(*Secret)) }) + scheme.AddTypeDefaultingFunc(&SecretList{}, func(obj interface{}) { SetObjectDefaults_SecretList(obj.(*SecretList)) }) + scheme.AddTypeDefaultingFunc(&Service{}, func(obj interface{}) { SetObjectDefaults_Service(obj.(*Service)) }) + scheme.AddTypeDefaultingFunc(&ServiceList{}, func(obj interface{}) { SetObjectDefaults_ServiceList(obj.(*ServiceList)) }) + return nil +} + +func SetObjectDefaults_ConfigMap(in *ConfigMap) { + SetDefaults_ConfigMap(in) +} + +func SetObjectDefaults_ConfigMapList(in *ConfigMapList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ConfigMap(a) + } +} + +func SetObjectDefaults_Endpoints(in *Endpoints) { + SetDefaults_Endpoints(in) +} + +func SetObjectDefaults_EndpointsList(in *EndpointsList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_Endpoints(a) + } +} + +func SetObjectDefaults_LimitRange(in *LimitRange) { + for i := range in.Spec.Limits { + a := &in.Spec.Limits[i] + SetDefaults_LimitRangeItem(a) + SetDefaults_ResourceList(&a.Max) + SetDefaults_ResourceList(&a.Min) + SetDefaults_ResourceList(&a.Default) + SetDefaults_ResourceList(&a.DefaultRequest) + SetDefaults_ResourceList(&a.MaxLimitRequestRatio) + } +} + +func SetObjectDefaults_LimitRangeList(in *LimitRangeList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_LimitRange(a) + } +} + +func SetObjectDefaults_Namespace(in *Namespace) { + SetDefaults_NamespaceStatus(&in.Status) +} + +func SetObjectDefaults_NamespaceList(in *NamespaceList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_Namespace(a) + } +} + +func SetObjectDefaults_Node(in *Node) { + SetDefaults_Node(in) + SetDefaults_NodeStatus(&in.Status) + SetDefaults_ResourceList(&in.Status.Capacity) + SetDefaults_ResourceList(&in.Status.Allocatable) +} + +func SetObjectDefaults_NodeList(in *NodeList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_Node(a) + } +} + +func SetObjectDefaults_PersistentVolume(in *PersistentVolume) { + SetDefaults_PersistentVolume(in) + SetDefaults_ResourceList(&in.Spec.Capacity) + if in.Spec.PersistentVolumeSource.RBD != nil { + SetDefaults_RBDVolumeSource(in.Spec.PersistentVolumeSource.RBD) + } + if in.Spec.PersistentVolumeSource.ISCSI != nil { + SetDefaults_ISCSIVolumeSource(in.Spec.PersistentVolumeSource.ISCSI) + } + if in.Spec.PersistentVolumeSource.AzureDisk != nil { + SetDefaults_AzureDiskVolumeSource(in.Spec.PersistentVolumeSource.AzureDisk) + } + if in.Spec.PersistentVolumeSource.ScaleIO != nil { + SetDefaults_ScaleIOVolumeSource(in.Spec.PersistentVolumeSource.ScaleIO) + } +} + +func SetObjectDefaults_PersistentVolumeClaim(in *PersistentVolumeClaim) { + SetDefaults_PersistentVolumeClaim(in) + SetDefaults_ResourceList(&in.Spec.Resources.Limits) + SetDefaults_ResourceList(&in.Spec.Resources.Requests) + SetDefaults_ResourceList(&in.Status.Capacity) +} + +func SetObjectDefaults_PersistentVolumeClaimList(in *PersistentVolumeClaimList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_PersistentVolumeClaim(a) + } +} + +func SetObjectDefaults_PersistentVolumeList(in *PersistentVolumeList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_PersistentVolume(a) + } +} + +func SetObjectDefaults_Pod(in *Pod) { + SetDefaults_Pod(in) + SetDefaults_PodSpec(&in.Spec) + for i := range in.Spec.Volumes { + a := &in.Spec.Volumes[i] + SetDefaults_Volume(a) + if a.VolumeSource.Secret != nil { + SetDefaults_SecretVolumeSource(a.VolumeSource.Secret) + } + if a.VolumeSource.ISCSI != nil { + SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI) + } + if a.VolumeSource.RBD != nil { + SetDefaults_RBDVolumeSource(a.VolumeSource.RBD) + } + if a.VolumeSource.DownwardAPI != nil { + SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI) + for j := range a.VolumeSource.DownwardAPI.Items { + b := &a.VolumeSource.DownwardAPI.Items[j] + if b.FieldRef != nil { + SetDefaults_ObjectFieldSelector(b.FieldRef) + } + } + } + if a.VolumeSource.ConfigMap != nil { + SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap) + } + if a.VolumeSource.AzureDisk != nil { + SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk) + } + if a.VolumeSource.Projected != nil { + SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected) + for j := range a.VolumeSource.Projected.Sources { + b := &a.VolumeSource.Projected.Sources[j] + if b.DownwardAPI != nil { + for k := range b.DownwardAPI.Items { + c := &b.DownwardAPI.Items[k] + if c.FieldRef != nil { + SetDefaults_ObjectFieldSelector(c.FieldRef) + } + } + } + } + } + if a.VolumeSource.ScaleIO != nil { + SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + } + } + for i := range in.Spec.InitContainers { + a := &in.Spec.InitContainers[i] + SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + SetDefaults_ResourceList(&a.Resources.Limits) + SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } + for i := range in.Spec.Containers { + a := &in.Spec.Containers[i] + SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + SetDefaults_ResourceList(&a.Resources.Limits) + SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } +} + +func SetObjectDefaults_PodAttachOptions(in *PodAttachOptions) { + SetDefaults_PodAttachOptions(in) +} + +func SetObjectDefaults_PodExecOptions(in *PodExecOptions) { + SetDefaults_PodExecOptions(in) +} + +func SetObjectDefaults_PodList(in *PodList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_Pod(a) + } +} + +func SetObjectDefaults_PodTemplate(in *PodTemplate) { + SetDefaults_PodSpec(&in.Template.Spec) + for i := range in.Template.Spec.Volumes { + a := &in.Template.Spec.Volumes[i] + SetDefaults_Volume(a) + if a.VolumeSource.Secret != nil { + SetDefaults_SecretVolumeSource(a.VolumeSource.Secret) + } + if a.VolumeSource.ISCSI != nil { + SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI) + } + if a.VolumeSource.RBD != nil { + SetDefaults_RBDVolumeSource(a.VolumeSource.RBD) + } + if a.VolumeSource.DownwardAPI != nil { + SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI) + for j := range a.VolumeSource.DownwardAPI.Items { + b := &a.VolumeSource.DownwardAPI.Items[j] + if b.FieldRef != nil { + SetDefaults_ObjectFieldSelector(b.FieldRef) + } + } + } + if a.VolumeSource.ConfigMap != nil { + SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap) + } + if a.VolumeSource.AzureDisk != nil { + SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk) + } + if a.VolumeSource.Projected != nil { + SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected) + for j := range a.VolumeSource.Projected.Sources { + b := &a.VolumeSource.Projected.Sources[j] + if b.DownwardAPI != nil { + for k := range b.DownwardAPI.Items { + c := &b.DownwardAPI.Items[k] + if c.FieldRef != nil { + SetDefaults_ObjectFieldSelector(c.FieldRef) + } + } + } + } + } + if a.VolumeSource.ScaleIO != nil { + SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + } + } + for i := range in.Template.Spec.InitContainers { + a := &in.Template.Spec.InitContainers[i] + SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + SetDefaults_ResourceList(&a.Resources.Limits) + SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } + for i := range in.Template.Spec.Containers { + a := &in.Template.Spec.Containers[i] + SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + SetDefaults_ResourceList(&a.Resources.Limits) + SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } +} + +func SetObjectDefaults_PodTemplateList(in *PodTemplateList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_PodTemplate(a) + } +} + +func SetObjectDefaults_ReplicationController(in *ReplicationController) { + SetDefaults_ReplicationController(in) + if in.Spec.Template != nil { + SetDefaults_PodSpec(&in.Spec.Template.Spec) + for i := range in.Spec.Template.Spec.Volumes { + a := &in.Spec.Template.Spec.Volumes[i] + SetDefaults_Volume(a) + if a.VolumeSource.Secret != nil { + SetDefaults_SecretVolumeSource(a.VolumeSource.Secret) + } + if a.VolumeSource.ISCSI != nil { + SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI) + } + if a.VolumeSource.RBD != nil { + SetDefaults_RBDVolumeSource(a.VolumeSource.RBD) + } + if a.VolumeSource.DownwardAPI != nil { + SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI) + for j := range a.VolumeSource.DownwardAPI.Items { + b := &a.VolumeSource.DownwardAPI.Items[j] + if b.FieldRef != nil { + SetDefaults_ObjectFieldSelector(b.FieldRef) + } + } + } + if a.VolumeSource.ConfigMap != nil { + SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap) + } + if a.VolumeSource.AzureDisk != nil { + SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk) + } + if a.VolumeSource.Projected != nil { + SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected) + for j := range a.VolumeSource.Projected.Sources { + b := &a.VolumeSource.Projected.Sources[j] + if b.DownwardAPI != nil { + for k := range b.DownwardAPI.Items { + c := &b.DownwardAPI.Items[k] + if c.FieldRef != nil { + SetDefaults_ObjectFieldSelector(c.FieldRef) + } + } + } + } + } + if a.VolumeSource.ScaleIO != nil { + SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + } + } + for i := range in.Spec.Template.Spec.InitContainers { + a := &in.Spec.Template.Spec.InitContainers[i] + SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + SetDefaults_ResourceList(&a.Resources.Limits) + SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } + for i := range in.Spec.Template.Spec.Containers { + a := &in.Spec.Template.Spec.Containers[i] + SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + SetDefaults_ResourceList(&a.Resources.Limits) + SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } + } +} + +func SetObjectDefaults_ReplicationControllerList(in *ReplicationControllerList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ReplicationController(a) + } +} + +func SetObjectDefaults_ResourceQuota(in *ResourceQuota) { + SetDefaults_ResourceList(&in.Spec.Hard) + SetDefaults_ResourceList(&in.Status.Hard) + SetDefaults_ResourceList(&in.Status.Used) +} + +func SetObjectDefaults_ResourceQuotaList(in *ResourceQuotaList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ResourceQuota(a) + } +} + +func SetObjectDefaults_Secret(in *Secret) { + SetDefaults_Secret(in) +} + +func SetObjectDefaults_SecretList(in *SecretList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_Secret(a) + } +} + +func SetObjectDefaults_Service(in *Service) { + SetDefaults_ServiceSpec(&in.Spec) +} + +func SetObjectDefaults_ServiceList(in *ServiceList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_Service(a) + } +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/api/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go similarity index 80% rename from vendor/k8s.io/client-go/1.5/pkg/api/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go index 699f073d1..c018bcc4e 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/api/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,12 +21,12 @@ limitations under the License. package api import ( - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - conversion "k8s.io/client-go/1.5/pkg/conversion" - fields "k8s.io/client-go/1.5/pkg/fields" - labels "k8s.io/client-go/1.5/pkg/labels" - runtime "k8s.io/client-go/1.5/pkg/runtime" - types "k8s.io/client-go/1.5/pkg/types" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + fields "k8s.io/apimachinery/pkg/fields" + labels "k8s.io/apimachinery/pkg/labels" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" reflect "reflect" ) @@ -52,8 +52,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ComponentStatus, InType: reflect.TypeOf(&ComponentStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ComponentStatusList, InType: reflect.TypeOf(&ComponentStatusList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMap, InType: reflect.TypeOf(&ConfigMap{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapEnvSource, InType: reflect.TypeOf(&ConfigMapEnvSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapKeySelector, InType: reflect.TypeOf(&ConfigMapKeySelector{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapList, InType: reflect.TypeOf(&ConfigMapList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapProjection, InType: reflect.TypeOf(&ConfigMapProjection{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapVolumeSource, InType: reflect.TypeOf(&ConfigMapVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Container, InType: reflect.TypeOf(&Container{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerImage, InType: reflect.TypeOf(&ContainerImage{})}, @@ -66,6 +68,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConversionError, InType: reflect.TypeOf(&ConversionError{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DaemonEndpoint, InType: reflect.TypeOf(&DaemonEndpoint{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DeleteOptions, InType: reflect.TypeOf(&DeleteOptions{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DownwardAPIProjection, InType: reflect.TypeOf(&DownwardAPIProjection{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DownwardAPIVolumeFile, InType: reflect.TypeOf(&DownwardAPIVolumeFile{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DownwardAPIVolumeSource, InType: reflect.TypeOf(&DownwardAPIVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EmptyDirVolumeSource, InType: reflect.TypeOf(&EmptyDirVolumeSource{})}, @@ -74,13 +77,13 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EndpointSubset, InType: reflect.TypeOf(&EndpointSubset{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Endpoints, InType: reflect.TypeOf(&Endpoints{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EndpointsList, InType: reflect.TypeOf(&EndpointsList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EnvFromSource, InType: reflect.TypeOf(&EnvFromSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EnvVar, InType: reflect.TypeOf(&EnvVar{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EnvVarSource, InType: reflect.TypeOf(&EnvVarSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Event, InType: reflect.TypeOf(&Event{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EventList, InType: reflect.TypeOf(&EventList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EventSource, InType: reflect.TypeOf(&EventSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ExecAction, InType: reflect.TypeOf(&ExecAction{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ExportOptions, InType: reflect.TypeOf(&ExportOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_FCVolumeSource, InType: reflect.TypeOf(&FCVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_FlexVolumeSource, InType: reflect.TypeOf(&FlexVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_FlockerVolumeSource, InType: reflect.TypeOf(&FlockerVolumeSource{})}, @@ -125,7 +128,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ObjectFieldSelector, InType: reflect.TypeOf(&ObjectFieldSelector{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ObjectMeta, InType: reflect.TypeOf(&ObjectMeta{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ObjectReference, InType: reflect.TypeOf(&ObjectReference{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_OwnerReference, InType: reflect.TypeOf(&OwnerReference{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolume, InType: reflect.TypeOf(&PersistentVolume{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeClaim, InType: reflect.TypeOf(&PersistentVolumeClaim{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeClaimList, InType: reflect.TypeOf(&PersistentVolumeClaimList{})}, @@ -136,6 +138,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeSource, InType: reflect.TypeOf(&PersistentVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeSpec, InType: reflect.TypeOf(&PersistentVolumeSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeStatus, InType: reflect.TypeOf(&PersistentVolumeStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PhotonPersistentDiskVolumeSource, InType: reflect.TypeOf(&PhotonPersistentDiskVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Pod, InType: reflect.TypeOf(&Pod{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodAffinity, InType: reflect.TypeOf(&PodAffinity{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodAffinityTerm, InType: reflect.TypeOf(&PodAffinityTerm{})}, @@ -145,6 +148,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodExecOptions, InType: reflect.TypeOf(&PodExecOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodList, InType: reflect.TypeOf(&PodList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodLogOptions, InType: reflect.TypeOf(&PodLogOptions{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodPortForwardOptions, InType: reflect.TypeOf(&PodPortForwardOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodProxyOptions, InType: reflect.TypeOf(&PodProxyOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodSecurityContext, InType: reflect.TypeOf(&PodSecurityContext{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodSignature, InType: reflect.TypeOf(&PodSignature{})}, @@ -154,14 +158,17 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodTemplate, InType: reflect.TypeOf(&PodTemplate{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodTemplateList, InType: reflect.TypeOf(&PodTemplateList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodTemplateSpec, InType: reflect.TypeOf(&PodTemplateSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PortworxVolumeSource, InType: reflect.TypeOf(&PortworxVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Preconditions, InType: reflect.TypeOf(&Preconditions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PreferAvoidPodsEntry, InType: reflect.TypeOf(&PreferAvoidPodsEntry{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PreferredSchedulingTerm, InType: reflect.TypeOf(&PreferredSchedulingTerm{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Probe, InType: reflect.TypeOf(&Probe{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ProjectedVolumeSource, InType: reflect.TypeOf(&ProjectedVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_QuobyteVolumeSource, InType: reflect.TypeOf(&QuobyteVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_RBDVolumeSource, InType: reflect.TypeOf(&RBDVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_RangeAllocation, InType: reflect.TypeOf(&RangeAllocation{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationController, InType: reflect.TypeOf(&ReplicationController{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationControllerCondition, InType: reflect.TypeOf(&ReplicationControllerCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationControllerList, InType: reflect.TypeOf(&ReplicationControllerList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationControllerSpec, InType: reflect.TypeOf(&ReplicationControllerSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationControllerStatus, InType: reflect.TypeOf(&ReplicationControllerStatus{})}, @@ -172,9 +179,12 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceQuotaStatus, InType: reflect.TypeOf(&ResourceQuotaStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceRequirements, InType: reflect.TypeOf(&ResourceRequirements{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SELinuxOptions, InType: reflect.TypeOf(&SELinuxOptions{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ScaleIOVolumeSource, InType: reflect.TypeOf(&ScaleIOVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Secret, InType: reflect.TypeOf(&Secret{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretEnvSource, InType: reflect.TypeOf(&SecretEnvSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretKeySelector, InType: reflect.TypeOf(&SecretKeySelector{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretList, InType: reflect.TypeOf(&SecretList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretProjection, InType: reflect.TypeOf(&SecretProjection{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretVolumeSource, InType: reflect.TypeOf(&SecretVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecurityContext, InType: reflect.TypeOf(&SecurityContext{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SerializedReference, InType: reflect.TypeOf(&SerializedReference{})}, @@ -192,6 +202,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Toleration, InType: reflect.TypeOf(&Toleration{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Volume, InType: reflect.TypeOf(&Volume{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VolumeMount, InType: reflect.TypeOf(&VolumeMount{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VolumeProjection, InType: reflect.TypeOf(&VolumeProjection{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VolumeSource, InType: reflect.TypeOf(&VolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VsphereVirtualDiskVolumeSource, InType: reflect.TypeOf(&VsphereVirtualDiskVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_WeightedPodAffinityTerm, InType: reflect.TypeOf(&WeightedPodAffinityTerm{})}, @@ -202,10 +213,7 @@ func DeepCopy_api_AWSElasticBlockStoreVolumeSource(in interface{}, out interface { in := in.(*AWSElasticBlockStoreVolumeSource) out := out.(*AWSElasticBlockStoreVolumeSource) - out.VolumeID = in.VolumeID - out.FSType = in.FSType - out.Partition = in.Partition - out.ReadOnly = in.ReadOnly + *out = *in return nil } } @@ -214,14 +222,13 @@ func DeepCopy_api_Affinity(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*Affinity) out := out.(*Affinity) + *out = *in if in.NodeAffinity != nil { in, out := &in.NodeAffinity, &out.NodeAffinity *out = new(NodeAffinity) if err := DeepCopy_api_NodeAffinity(*in, *out, c); err != nil { return err } - } else { - out.NodeAffinity = nil } if in.PodAffinity != nil { in, out := &in.PodAffinity, &out.PodAffinity @@ -229,8 +236,6 @@ func DeepCopy_api_Affinity(in interface{}, out interface{}, c *conversion.Cloner 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 @@ -238,8 +243,6 @@ func DeepCopy_api_Affinity(in interface{}, out interface{}, c *conversion.Cloner if err := DeepCopy_api_PodAntiAffinity(*in, *out, c); err != nil { return err } - } else { - out.PodAntiAffinity = nil } return nil } @@ -249,8 +252,7 @@ func DeepCopy_api_AttachedVolume(in interface{}, out interface{}, c *conversion. { in := in.(*AttachedVolume) out := out.(*AttachedVolume) - out.Name = in.Name - out.DevicePath = in.DevicePath + *out = *in return nil } } @@ -259,6 +261,7 @@ func DeepCopy_api_AvoidPods(in interface{}, out interface{}, c *conversion.Clone { in := in.(*AvoidPods) out := out.(*AvoidPods) + *out = *in if in.PreferAvoidPods != nil { in, out := &in.PreferAvoidPods, &out.PreferAvoidPods *out = make([]PreferAvoidPodsEntry, len(*in)) @@ -267,8 +270,6 @@ func DeepCopy_api_AvoidPods(in interface{}, out interface{}, c *conversion.Clone return err } } - } else { - out.PreferAvoidPods = nil } return nil } @@ -278,28 +279,21 @@ func DeepCopy_api_AzureDiskVolumeSource(in interface{}, out interface{}, c *conv { in := in.(*AzureDiskVolumeSource) out := out.(*AzureDiskVolumeSource) - out.DiskName = in.DiskName - out.DataDiskURI = in.DataDiskURI + *out = *in if in.CachingMode != nil { in, out := &in.CachingMode, &out.CachingMode *out = new(AzureDataDiskCachingMode) **out = **in - } else { - out.CachingMode = nil } if in.FSType != nil { in, out := &in.FSType, &out.FSType *out = new(string) **out = **in - } else { - out.FSType = nil } if in.ReadOnly != nil { in, out := &in.ReadOnly, &out.ReadOnly *out = new(bool) **out = **in - } else { - out.ReadOnly = nil } return nil } @@ -309,9 +303,7 @@ func DeepCopy_api_AzureFileVolumeSource(in interface{}, out interface{}, c *conv { in := in.(*AzureFileVolumeSource) out := out.(*AzureFileVolumeSource) - out.SecretName = in.SecretName - out.ShareName = in.ShareName - out.ReadOnly = in.ReadOnly + *out = *in return nil } } @@ -320,11 +312,12 @@ func DeepCopy_api_Binding(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*Binding) out := out.(*Binding) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } - out.Target = in.Target return nil } } @@ -333,23 +326,16 @@ func DeepCopy_api_Capabilities(in interface{}, out interface{}, c *conversion.Cl { in := in.(*Capabilities) out := out.(*Capabilities) + *out = *in 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 + copy(*out, *in) } 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 + copy(*out, *in) } return nil } @@ -359,24 +345,17 @@ func DeepCopy_api_CephFSVolumeSource(in interface{}, out interface{}, c *convers { in := in.(*CephFSVolumeSource) out := out.(*CephFSVolumeSource) + *out = *in if in.Monitors != nil { in, out := &in.Monitors, &out.Monitors *out = make([]string, len(*in)) copy(*out, *in) - } 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 } } @@ -385,9 +364,7 @@ func DeepCopy_api_CinderVolumeSource(in interface{}, out interface{}, c *convers { in := in.(*CinderVolumeSource) out := out.(*CinderVolumeSource) - out.VolumeID = in.VolumeID - out.FSType = in.FSType - out.ReadOnly = in.ReadOnly + *out = *in return nil } } @@ -396,10 +373,7 @@ func DeepCopy_api_ComponentCondition(in interface{}, out interface{}, c *convers { in := in.(*ComponentCondition) out := out.(*ComponentCondition) - out.Type = in.Type - out.Status = in.Status - out.Message = in.Message - out.Error = in.Error + *out = *in return nil } } @@ -408,18 +382,16 @@ func DeepCopy_api_ComponentStatus(in interface{}, out interface{}, c *conversion { in := in.(*ComponentStatus) out := out.(*ComponentStatus) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]ComponentCondition, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Conditions = nil + copy(*out, *in) } return nil } @@ -429,8 +401,7 @@ func DeepCopy_api_ComponentStatusList(in interface{}, out interface{}, c *conver { in := in.(*ComponentStatusList) out := out.(*ComponentStatusList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ComponentStatus, len(*in)) @@ -439,8 +410,6 @@ func DeepCopy_api_ComponentStatusList(in interface{}, out interface{}, c *conver return err } } - } else { - out.Items = nil } return nil } @@ -450,9 +419,11 @@ func DeepCopy_api_ConfigMap(in interface{}, out interface{}, c *conversion.Clone { in := in.(*ConfigMap) out := out.(*ConfigMap) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -460,8 +431,20 @@ func DeepCopy_api_ConfigMap(in interface{}, out interface{}, c *conversion.Clone for key, val := range *in { (*out)[key] = val } - } else { - out.Data = nil + } + return nil + } +} + +func DeepCopy_api_ConfigMapEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ConfigMapEnvSource) + out := out.(*ConfigMapEnvSource) + *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in } return nil } @@ -471,8 +454,12 @@ func DeepCopy_api_ConfigMapKeySelector(in interface{}, out interface{}, c *conve { in := in.(*ConfigMapKeySelector) out := out.(*ConfigMapKeySelector) - out.LocalObjectReference = in.LocalObjectReference - out.Key = in.Key + *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -481,8 +468,7 @@ func DeepCopy_api_ConfigMapList(in interface{}, out interface{}, c *conversion.C { in := in.(*ConfigMapList) out := out.(*ConfigMapList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ConfigMap, len(*in)) @@ -491,8 +477,29 @@ func DeepCopy_api_ConfigMapList(in interface{}, out interface{}, c *conversion.C return err } } - } else { - out.Items = nil + } + return nil + } +} + +func DeepCopy_api_ConfigMapProjection(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ConfigMapProjection) + out := out.(*ConfigMapProjection) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KeyToPath, len(*in)) + for i := range *in { + if err := DeepCopy_api_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in } return nil } @@ -502,7 +509,7 @@ func DeepCopy_api_ConfigMapVolumeSource(in interface{}, out interface{}, c *conv { in := in.(*ConfigMapVolumeSource) out := out.(*ConfigMapVolumeSource) - out.LocalObjectReference = in.LocalObjectReference + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]KeyToPath, len(*in)) @@ -511,15 +518,16 @@ func DeepCopy_api_ConfigMapVolumeSource(in interface{}, out interface{}, c *conv return err } } - } else { - out.Items = nil } if in.DefaultMode != nil { in, out := &in.DefaultMode, &out.DefaultMode *out = new(int32) **out = **in - } else { - out.DefaultMode = nil + } + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in } return nil } @@ -529,31 +537,30 @@ func DeepCopy_api_Container(in interface{}, out interface{}, c *conversion.Clone { in := in.(*Container) out := out.(*Container) - out.Name = in.Name - out.Image = in.Image + *out = *in 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)) + copy(*out, *in) + } + if in.EnvFrom != nil { + in, out := &in.EnvFrom, &out.EnvFrom + *out = make([]EnvFromSource, len(*in)) for i := range *in { - (*out)[i] = (*in)[i] + if err := DeepCopy_api_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil { + return err + } } - } else { - out.Ports = nil } if in.Env != nil { in, out := &in.Env, &out.Env @@ -563,8 +570,6 @@ func DeepCopy_api_Container(in interface{}, out interface{}, c *conversion.Clone return err } } - } else { - out.Env = nil } if err := DeepCopy_api_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil { return err @@ -572,11 +577,7 @@ func DeepCopy_api_Container(in interface{}, out interface{}, c *conversion.Clone 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 + copy(*out, *in) } if in.LivenessProbe != nil { in, out := &in.LivenessProbe, &out.LivenessProbe @@ -584,8 +585,6 @@ func DeepCopy_api_Container(in interface{}, out interface{}, c *conversion.Clone 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 @@ -593,8 +592,6 @@ func DeepCopy_api_Container(in interface{}, out interface{}, c *conversion.Clone 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 @@ -602,23 +599,14 @@ func DeepCopy_api_Container(in interface{}, out interface{}, c *conversion.Clone 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 } } @@ -627,14 +615,12 @@ func DeepCopy_api_ContainerImage(in interface{}, out interface{}, c *conversion. { in := in.(*ContainerImage) out := out.(*ContainerImage) + *out = *in if in.Names != nil { in, out := &in.Names, &out.Names *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Names = nil } - out.SizeBytes = in.SizeBytes return nil } } @@ -643,11 +629,7 @@ func DeepCopy_api_ContainerPort(in interface{}, out interface{}, c *conversion.C { in := in.(*ContainerPort) out := out.(*ContainerPort) - out.Name = in.Name - out.HostPort = in.HostPort - out.ContainerPort = in.ContainerPort - out.Protocol = in.Protocol - out.HostIP = in.HostIP + *out = *in return nil } } @@ -656,12 +638,11 @@ func DeepCopy_api_ContainerState(in interface{}, out interface{}, c *conversion. { in := in.(*ContainerState) out := out.(*ContainerState) + *out = *in 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 @@ -669,8 +650,6 @@ func DeepCopy_api_ContainerState(in interface{}, out interface{}, c *conversion. 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 @@ -678,8 +657,6 @@ func DeepCopy_api_ContainerState(in interface{}, out interface{}, c *conversion. if err := DeepCopy_api_ContainerStateTerminated(*in, *out, c); err != nil { return err } - } else { - out.Terminated = nil } return nil } @@ -689,6 +666,7 @@ func DeepCopy_api_ContainerStateRunning(in interface{}, out interface{}, c *conv { in := in.(*ContainerStateRunning) out := out.(*ContainerStateRunning) + *out = *in out.StartedAt = in.StartedAt.DeepCopy() return nil } @@ -698,13 +676,9 @@ func DeepCopy_api_ContainerStateTerminated(in interface{}, out interface{}, c *c { in := in.(*ContainerStateTerminated) out := out.(*ContainerStateTerminated) - out.ExitCode = in.ExitCode - out.Signal = in.Signal - out.Reason = in.Reason - out.Message = in.Message + *out = *in out.StartedAt = in.StartedAt.DeepCopy() out.FinishedAt = in.FinishedAt.DeepCopy() - out.ContainerID = in.ContainerID return nil } } @@ -713,8 +687,7 @@ func DeepCopy_api_ContainerStateWaiting(in interface{}, out interface{}, c *conv { in := in.(*ContainerStateWaiting) out := out.(*ContainerStateWaiting) - out.Reason = in.Reason - out.Message = in.Message + *out = *in return nil } } @@ -723,18 +696,13 @@ func DeepCopy_api_ContainerStatus(in interface{}, out interface{}, c *conversion { in := in.(*ContainerStatus) out := out.(*ContainerStatus) - out.Name = in.Name + *out = *in if err := DeepCopy_api_ContainerState(&in.State, &out.State, c); err != nil { return err } if err := DeepCopy_api_ContainerState(&in.LastTerminationState, &out.LastTerminationState, c); err != nil { return err } - out.Ready = in.Ready - out.RestartCount = in.RestartCount - out.Image = in.Image - out.ImageID = in.ImageID - out.ContainerID = in.ContainerID return nil } } @@ -743,21 +711,23 @@ func DeepCopy_api_ConversionError(in interface{}, out interface{}, c *conversion { in := in.(*ConversionError) out := out.(*ConversionError) - if in.In == nil { - out.In = nil - } else if newVal, err := c.DeepCopy(&in.In); err != nil { - return err - } else { - out.In = *newVal.(*interface{}) + *out = *in + // in.In is kind 'Interface' + if in.In != nil { + 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{}) + // in.Out is kind 'Interface' + if in.Out != nil { + if newVal, err := c.DeepCopy(&in.Out); err != nil { + return err + } else { + out.Out = *newVal.(*interface{}) + } } - out.Message = in.Message return nil } } @@ -766,7 +736,7 @@ func DeepCopy_api_DaemonEndpoint(in interface{}, out interface{}, c *conversion. { in := in.(*DaemonEndpoint) out := out.(*DaemonEndpoint) - out.Port = in.Port + *out = *in return nil } } @@ -775,13 +745,11 @@ func DeepCopy_api_DeleteOptions(in interface{}, out interface{}, c *conversion.C { in := in.(*DeleteOptions) out := out.(*DeleteOptions) - out.TypeMeta = in.TypeMeta + *out = *in 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 @@ -789,15 +757,34 @@ func DeepCopy_api_DeleteOptions(in interface{}, out interface{}, c *conversion.C 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 + } + if in.PropagationPolicy != nil { + in, out := &in.PropagationPolicy, &out.PropagationPolicy + *out = new(DeletionPropagation) + **out = **in + } + return nil + } +} + +func DeepCopy_api_DownwardAPIProjection(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*DownwardAPIProjection) + out := out.(*DownwardAPIProjection) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DownwardAPIVolumeFile, len(*in)) + for i := range *in { + if err := DeepCopy_api_DownwardAPIVolumeFile(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } } return nil } @@ -807,13 +794,11 @@ func DeepCopy_api_DownwardAPIVolumeFile(in interface{}, out interface{}, c *conv { in := in.(*DownwardAPIVolumeFile) out := out.(*DownwardAPIVolumeFile) - out.Path = in.Path + *out = *in 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 @@ -821,15 +806,11 @@ func DeepCopy_api_DownwardAPIVolumeFile(in interface{}, out interface{}, c *conv if err := DeepCopy_api_ResourceFieldSelector(*in, *out, c); err != nil { return err } - } else { - out.ResourceFieldRef = nil } if in.Mode != nil { in, out := &in.Mode, &out.Mode *out = new(int32) **out = **in - } else { - out.Mode = nil } return nil } @@ -839,6 +820,7 @@ func DeepCopy_api_DownwardAPIVolumeSource(in interface{}, out interface{}, c *co { in := in.(*DownwardAPIVolumeSource) out := out.(*DownwardAPIVolumeSource) + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]DownwardAPIVolumeFile, len(*in)) @@ -847,15 +829,11 @@ func DeepCopy_api_DownwardAPIVolumeSource(in interface{}, out interface{}, c *co return err } } - } else { - out.Items = nil } if in.DefaultMode != nil { in, out := &in.DefaultMode, &out.DefaultMode *out = new(int32) **out = **in - } else { - out.DefaultMode = nil } return nil } @@ -865,7 +843,7 @@ func DeepCopy_api_EmptyDirVolumeSource(in interface{}, out interface{}, c *conve { in := in.(*EmptyDirVolumeSource) out := out.(*EmptyDirVolumeSource) - out.Medium = in.Medium + *out = *in return nil } } @@ -874,21 +852,16 @@ func DeepCopy_api_EndpointAddress(in interface{}, out interface{}, c *conversion { in := in.(*EndpointAddress) out := out.(*EndpointAddress) - out.IP = in.IP - out.Hostname = in.Hostname + *out = *in if in.NodeName != nil { in, out := &in.NodeName, &out.NodeName *out = new(string) **out = **in - } else { - out.NodeName = nil } if in.TargetRef != nil { in, out := &in.TargetRef, &out.TargetRef *out = new(ObjectReference) **out = **in - } else { - out.TargetRef = nil } return nil } @@ -898,9 +871,7 @@ func DeepCopy_api_EndpointPort(in interface{}, out interface{}, c *conversion.Cl { in := in.(*EndpointPort) out := out.(*EndpointPort) - out.Name = in.Name - out.Port = in.Port - out.Protocol = in.Protocol + *out = *in return nil } } @@ -909,6 +880,7 @@ func DeepCopy_api_EndpointSubset(in interface{}, out interface{}, c *conversion. { in := in.(*EndpointSubset) out := out.(*EndpointSubset) + *out = *in if in.Addresses != nil { in, out := &in.Addresses, &out.Addresses *out = make([]EndpointAddress, len(*in)) @@ -917,8 +889,6 @@ func DeepCopy_api_EndpointSubset(in interface{}, out interface{}, c *conversion. return err } } - } else { - out.Addresses = nil } if in.NotReadyAddresses != nil { in, out := &in.NotReadyAddresses, &out.NotReadyAddresses @@ -928,17 +898,11 @@ func DeepCopy_api_EndpointSubset(in interface{}, out interface{}, c *conversion. 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 + copy(*out, *in) } return nil } @@ -948,9 +912,11 @@ func DeepCopy_api_Endpoints(in interface{}, out interface{}, c *conversion.Clone { in := in.(*Endpoints) out := out.(*Endpoints) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subsets != nil { in, out := &in.Subsets, &out.Subsets @@ -960,8 +926,6 @@ func DeepCopy_api_Endpoints(in interface{}, out interface{}, c *conversion.Clone return err } } - } else { - out.Subsets = nil } return nil } @@ -971,8 +935,7 @@ func DeepCopy_api_EndpointsList(in interface{}, out interface{}, c *conversion.C { in := in.(*EndpointsList) out := out.(*EndpointsList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Endpoints, len(*in)) @@ -981,8 +944,29 @@ func DeepCopy_api_EndpointsList(in interface{}, out interface{}, c *conversion.C return err } } - } else { - out.Items = nil + } + return nil + } +} + +func DeepCopy_api_EnvFromSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*EnvFromSource) + out := out.(*EnvFromSource) + *out = *in + if in.ConfigMapRef != nil { + in, out := &in.ConfigMapRef, &out.ConfigMapRef + *out = new(ConfigMapEnvSource) + if err := DeepCopy_api_ConfigMapEnvSource(*in, *out, c); err != nil { + return err + } + } + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(SecretEnvSource) + if err := DeepCopy_api_SecretEnvSource(*in, *out, c); err != nil { + return err + } } return nil } @@ -992,16 +976,13 @@ func DeepCopy_api_EnvVar(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*EnvVar) out := out.(*EnvVar) - out.Name = in.Name - out.Value = in.Value + *out = *in if in.ValueFrom != nil { in, out := &in.ValueFrom, &out.ValueFrom *out = new(EnvVarSource) if err := DeepCopy_api_EnvVarSource(*in, *out, c); err != nil { return err } - } else { - out.ValueFrom = nil } return nil } @@ -1011,12 +992,11 @@ func DeepCopy_api_EnvVarSource(in interface{}, out interface{}, c *conversion.Cl { in := in.(*EnvVarSource) out := out.(*EnvVarSource) + *out = *in 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 @@ -1024,22 +1004,20 @@ func DeepCopy_api_EnvVarSource(in interface{}, out interface{}, c *conversion.Cl 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 err := DeepCopy_api_ConfigMapKeySelector(*in, *out, c); err != nil { + return err + } } if in.SecretKeyRef != nil { in, out := &in.SecretKeyRef, &out.SecretKeyRef *out = new(SecretKeySelector) - **out = **in - } else { - out.SecretKeyRef = nil + if err := DeepCopy_api_SecretKeySelector(*in, *out, c); err != nil { + return err + } } return nil } @@ -1049,18 +1027,14 @@ func DeepCopy_api_Event(in interface{}, out interface{}, c *conversion.Cloner) e { in := in.(*Event) out := out.(*Event) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } - 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 } } @@ -1069,8 +1043,7 @@ func DeepCopy_api_EventList(in interface{}, out interface{}, c *conversion.Clone { in := in.(*EventList) out := out.(*EventList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Event, len(*in)) @@ -1079,8 +1052,6 @@ func DeepCopy_api_EventList(in interface{}, out interface{}, c *conversion.Clone return err } } - } else { - out.Items = nil } return nil } @@ -1090,8 +1061,7 @@ func DeepCopy_api_EventSource(in interface{}, out interface{}, c *conversion.Clo { in := in.(*EventSource) out := out.(*EventSource) - out.Component = in.Component - out.Host = in.Host + *out = *in return nil } } @@ -1100,48 +1070,31 @@ func DeepCopy_api_ExecAction(in interface{}, out interface{}, c *conversion.Clon { in := in.(*ExecAction) out := out.(*ExecAction) + *out = *in if in.Command != nil { in, out := &in.Command, &out.Command *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Command = nil } return nil } } -func DeepCopy_api_ExportOptions(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ExportOptions) - out := out.(*ExportOptions) - out.TypeMeta = in.TypeMeta - out.Export = in.Export - out.Exact = in.Exact - return nil - } -} - func DeepCopy_api_FCVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*FCVolumeSource) out := out.(*FCVolumeSource) + *out = *in if in.TargetWWNs != nil { in, out := &in.TargetWWNs, &out.TargetWWNs *out = make([]string, len(*in)) copy(*out, *in) - } 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 } } @@ -1150,24 +1103,18 @@ func DeepCopy_api_FlexVolumeSource(in interface{}, out interface{}, c *conversio { in := in.(*FlexVolumeSource) out := out.(*FlexVolumeSource) - out.Driver = in.Driver - out.FSType = in.FSType + *out = *in 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 } @@ -1177,7 +1124,7 @@ func DeepCopy_api_FlockerVolumeSource(in interface{}, out interface{}, c *conver { in := in.(*FlockerVolumeSource) out := out.(*FlockerVolumeSource) - out.DatasetName = in.DatasetName + *out = *in return nil } } @@ -1186,10 +1133,7 @@ func DeepCopy_api_GCEPersistentDiskVolumeSource(in interface{}, out interface{}, { in := in.(*GCEPersistentDiskVolumeSource) out := out.(*GCEPersistentDiskVolumeSource) - out.PDName = in.PDName - out.FSType = in.FSType - out.Partition = in.Partition - out.ReadOnly = in.ReadOnly + *out = *in return nil } } @@ -1198,9 +1142,7 @@ func DeepCopy_api_GitRepoVolumeSource(in interface{}, out interface{}, c *conver { in := in.(*GitRepoVolumeSource) out := out.(*GitRepoVolumeSource) - out.Repository = in.Repository - out.Revision = in.Revision - out.Directory = in.Directory + *out = *in return nil } } @@ -1209,9 +1151,7 @@ func DeepCopy_api_GlusterfsVolumeSource(in interface{}, out interface{}, c *conv { in := in.(*GlusterfsVolumeSource) out := out.(*GlusterfsVolumeSource) - out.EndpointsName = in.EndpointsName - out.Path = in.Path - out.ReadOnly = in.ReadOnly + *out = *in return nil } } @@ -1220,18 +1160,11 @@ func DeepCopy_api_HTTPGetAction(in interface{}, out interface{}, c *conversion.C { in := in.(*HTTPGetAction) out := out.(*HTTPGetAction) - out.Path = in.Path - out.Port = in.Port - out.Host = in.Host - out.Scheme = in.Scheme + *out = *in 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 + copy(*out, *in) } return nil } @@ -1241,8 +1174,7 @@ func DeepCopy_api_HTTPHeader(in interface{}, out interface{}, c *conversion.Clon { in := in.(*HTTPHeader) out := out.(*HTTPHeader) - out.Name = in.Name - out.Value = in.Value + *out = *in return nil } } @@ -1251,14 +1183,13 @@ func DeepCopy_api_Handler(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*Handler) out := out.(*Handler) + *out = *in if in.Exec != nil { in, out := &in.Exec, &out.Exec *out = new(ExecAction) if err := DeepCopy_api_ExecAction(*in, *out, c); err != nil { return err } - } else { - out.Exec = nil } if in.HTTPGet != nil { in, out := &in.HTTPGet, &out.HTTPGet @@ -1266,15 +1197,11 @@ func DeepCopy_api_Handler(in interface{}, out interface{}, c *conversion.Cloner) 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 } @@ -1284,7 +1211,7 @@ func DeepCopy_api_HostPathVolumeSource(in interface{}, out interface{}, c *conve { in := in.(*HostPathVolumeSource) out := out.(*HostPathVolumeSource) - out.Path = in.Path + *out = *in return nil } } @@ -1293,12 +1220,12 @@ func DeepCopy_api_ISCSIVolumeSource(in interface{}, out interface{}, c *conversi { in := in.(*ISCSIVolumeSource) out := out.(*ISCSIVolumeSource) - out.TargetPortal = in.TargetPortal - out.IQN = in.IQN - out.Lun = in.Lun - out.ISCSIInterface = in.ISCSIInterface - out.FSType = in.FSType - out.ReadOnly = in.ReadOnly + *out = *in + if in.Portals != nil { + in, out := &in.Portals, &out.Portals + *out = make([]string, len(*in)) + copy(*out, *in) + } return nil } } @@ -1307,14 +1234,11 @@ func DeepCopy_api_KeyToPath(in interface{}, out interface{}, c *conversion.Clone { in := in.(*KeyToPath) out := out.(*KeyToPath) - out.Key = in.Key - out.Path = in.Path + *out = *in if in.Mode != nil { in, out := &in.Mode, &out.Mode *out = new(int32) **out = **in - } else { - out.Mode = nil } return nil } @@ -1324,14 +1248,13 @@ func DeepCopy_api_Lifecycle(in interface{}, out interface{}, c *conversion.Clone { in := in.(*Lifecycle) out := out.(*Lifecycle) + *out = *in if in.PostStart != nil { in, out := &in.PostStart, &out.PostStart *out = new(Handler) if err := DeepCopy_api_Handler(*in, *out, c); err != nil { return err } - } else { - out.PostStart = nil } if in.PreStop != nil { in, out := &in.PreStop, &out.PreStop @@ -1339,8 +1262,6 @@ func DeepCopy_api_Lifecycle(in interface{}, out interface{}, c *conversion.Clone if err := DeepCopy_api_Handler(*in, *out, c); err != nil { return err } - } else { - out.PreStop = nil } return nil } @@ -1350,9 +1271,11 @@ func DeepCopy_api_LimitRange(in interface{}, out interface{}, c *conversion.Clon { in := in.(*LimitRange) out := out.(*LimitRange) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_LimitRangeSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1365,15 +1288,13 @@ func DeepCopy_api_LimitRangeItem(in interface{}, out interface{}, c *conversion. { in := in.(*LimitRangeItem) out := out.(*LimitRangeItem) - out.Type = in.Type + *out = *in 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 @@ -1381,8 +1302,6 @@ func DeepCopy_api_LimitRangeItem(in interface{}, out interface{}, c *conversion. for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Min = nil } if in.Default != nil { in, out := &in.Default, &out.Default @@ -1390,8 +1309,6 @@ func DeepCopy_api_LimitRangeItem(in interface{}, out interface{}, c *conversion. for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Default = nil } if in.DefaultRequest != nil { in, out := &in.DefaultRequest, &out.DefaultRequest @@ -1399,8 +1316,6 @@ func DeepCopy_api_LimitRangeItem(in interface{}, out interface{}, c *conversion. for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.DefaultRequest = nil } if in.MaxLimitRequestRatio != nil { in, out := &in.MaxLimitRequestRatio, &out.MaxLimitRequestRatio @@ -1408,8 +1323,6 @@ func DeepCopy_api_LimitRangeItem(in interface{}, out interface{}, c *conversion. for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.MaxLimitRequestRatio = nil } return nil } @@ -1419,8 +1332,7 @@ func DeepCopy_api_LimitRangeList(in interface{}, out interface{}, c *conversion. { in := in.(*LimitRangeList) out := out.(*LimitRangeList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]LimitRange, len(*in)) @@ -1429,8 +1341,6 @@ func DeepCopy_api_LimitRangeList(in interface{}, out interface{}, c *conversion. return err } } - } else { - out.Items = nil } return nil } @@ -1440,6 +1350,7 @@ func DeepCopy_api_LimitRangeSpec(in interface{}, out interface{}, c *conversion. { in := in.(*LimitRangeSpec) out := out.(*LimitRangeSpec) + *out = *in if in.Limits != nil { in, out := &in.Limits, &out.Limits *out = make([]LimitRangeItem, len(*in)) @@ -1448,8 +1359,6 @@ func DeepCopy_api_LimitRangeSpec(in interface{}, out interface{}, c *conversion. return err } } - } else { - out.Limits = nil } return nil } @@ -1459,8 +1368,7 @@ func DeepCopy_api_List(in interface{}, out interface{}, c *conversion.Cloner) er { in := in.(*List) out := out.(*List) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]runtime.Object, len(*in)) @@ -1471,8 +1379,6 @@ func DeepCopy_api_List(in interface{}, out interface{}, c *conversion.Cloner) er (*out)[i] = *newVal.(*runtime.Object) } } - } else { - out.Items = nil } return nil } @@ -1482,29 +1388,27 @@ func DeepCopy_api_ListOptions(in interface{}, out interface{}, c *conversion.Clo { in := in.(*ListOptions) out := out.(*ListOptions) - 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) + *out = *in + // in.LabelSelector is kind 'Interface' + if in.LabelSelector != nil { + if newVal, err := c.DeepCopy(&in.LabelSelector); err != nil { + return err + } else { + out.LabelSelector = *newVal.(*labels.Selector) + } } - 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) + // in.FieldSelector is kind 'Interface' + if in.FieldSelector != nil { + if newVal, err := c.DeepCopy(&in.FieldSelector); err != nil { + return err + } else { + out.FieldSelector = *newVal.(*fields.Selector) + } } - 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 } @@ -1514,8 +1418,7 @@ func DeepCopy_api_LoadBalancerIngress(in interface{}, out interface{}, c *conver { in := in.(*LoadBalancerIngress) out := out.(*LoadBalancerIngress) - out.IP = in.IP - out.Hostname = in.Hostname + *out = *in return nil } } @@ -1524,14 +1427,11 @@ func DeepCopy_api_LoadBalancerStatus(in interface{}, out interface{}, c *convers { in := in.(*LoadBalancerStatus) out := out.(*LoadBalancerStatus) + *out = *in 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 + copy(*out, *in) } return nil } @@ -1541,7 +1441,7 @@ func DeepCopy_api_LocalObjectReference(in interface{}, out interface{}, c *conve { in := in.(*LocalObjectReference) out := out.(*LocalObjectReference) - out.Name = in.Name + *out = *in return nil } } @@ -1550,9 +1450,7 @@ func DeepCopy_api_NFSVolumeSource(in interface{}, out interface{}, c *conversion { in := in.(*NFSVolumeSource) out := out.(*NFSVolumeSource) - out.Server = in.Server - out.Path = in.Path - out.ReadOnly = in.ReadOnly + *out = *in return nil } } @@ -1561,14 +1459,15 @@ func DeepCopy_api_Namespace(in interface{}, out interface{}, c *conversion.Clone { in := in.(*Namespace) out := out.(*Namespace) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_NamespaceSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status return nil } } @@ -1577,8 +1476,7 @@ func DeepCopy_api_NamespaceList(in interface{}, out interface{}, c *conversion.C { in := in.(*NamespaceList) out := out.(*NamespaceList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Namespace, len(*in)) @@ -1587,8 +1485,6 @@ func DeepCopy_api_NamespaceList(in interface{}, out interface{}, c *conversion.C return err } } - } else { - out.Items = nil } return nil } @@ -1598,14 +1494,11 @@ func DeepCopy_api_NamespaceSpec(in interface{}, out interface{}, c *conversion.C { in := in.(*NamespaceSpec) out := out.(*NamespaceSpec) + *out = *in 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 + copy(*out, *in) } return nil } @@ -1615,7 +1508,7 @@ func DeepCopy_api_NamespaceStatus(in interface{}, out interface{}, c *conversion { in := in.(*NamespaceStatus) out := out.(*NamespaceStatus) - out.Phase = in.Phase + *out = *in return nil } } @@ -1624,11 +1517,15 @@ func DeepCopy_api_Node(in interface{}, out interface{}, c *conversion.Cloner) er { in := in.(*Node) out := out.(*Node) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_api_NodeSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Spec = in.Spec if err := DeepCopy_api_NodeStatus(&in.Status, &out.Status, c); err != nil { return err } @@ -1640,8 +1537,7 @@ func DeepCopy_api_NodeAddress(in interface{}, out interface{}, c *conversion.Clo { in := in.(*NodeAddress) out := out.(*NodeAddress) - out.Type = in.Type - out.Address = in.Address + *out = *in return nil } } @@ -1650,14 +1546,13 @@ func DeepCopy_api_NodeAffinity(in interface{}, out interface{}, c *conversion.Cl { in := in.(*NodeAffinity) out := out.(*NodeAffinity) + *out = *in if in.RequiredDuringSchedulingIgnoredDuringExecution != nil { in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution *out = new(NodeSelector) if err := DeepCopy_api_NodeSelector(*in, *out, c); err != nil { return err } - } else { - out.RequiredDuringSchedulingIgnoredDuringExecution = nil } if in.PreferredDuringSchedulingIgnoredDuringExecution != nil { in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution @@ -1667,8 +1562,6 @@ func DeepCopy_api_NodeAffinity(in interface{}, out interface{}, c *conversion.Cl return err } } - } else { - out.PreferredDuringSchedulingIgnoredDuringExecution = nil } return nil } @@ -1678,12 +1571,9 @@ func DeepCopy_api_NodeCondition(in interface{}, out interface{}, c *conversion.C { in := in.(*NodeCondition) out := out.(*NodeCondition) - out.Type = in.Type - out.Status = in.Status + *out = *in out.LastHeartbeatTime = in.LastHeartbeatTime.DeepCopy() out.LastTransitionTime = in.LastTransitionTime.DeepCopy() - out.Reason = in.Reason - out.Message = in.Message return nil } } @@ -1692,7 +1582,7 @@ func DeepCopy_api_NodeDaemonEndpoints(in interface{}, out interface{}, c *conver { in := in.(*NodeDaemonEndpoints) out := out.(*NodeDaemonEndpoints) - out.KubeletEndpoint = in.KubeletEndpoint + *out = *in return nil } } @@ -1701,8 +1591,7 @@ func DeepCopy_api_NodeList(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*NodeList) out := out.(*NodeList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Node, len(*in)) @@ -1711,8 +1600,6 @@ func DeepCopy_api_NodeList(in interface{}, out interface{}, c *conversion.Cloner return err } } - } else { - out.Items = nil } return nil } @@ -1722,8 +1609,7 @@ func DeepCopy_api_NodeProxyOptions(in interface{}, out interface{}, c *conversio { in := in.(*NodeProxyOptions) out := out.(*NodeProxyOptions) - out.TypeMeta = in.TypeMeta - out.Path = in.Path + *out = *in return nil } } @@ -1732,14 +1618,13 @@ func DeepCopy_api_NodeResources(in interface{}, out interface{}, c *conversion.C { in := in.(*NodeResources) out := out.(*NodeResources) + *out = *in if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity *out = make(ResourceList) for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Capacity = nil } return nil } @@ -1749,6 +1634,7 @@ func DeepCopy_api_NodeSelector(in interface{}, out interface{}, c *conversion.Cl { in := in.(*NodeSelector) out := out.(*NodeSelector) + *out = *in if in.NodeSelectorTerms != nil { in, out := &in.NodeSelectorTerms, &out.NodeSelectorTerms *out = make([]NodeSelectorTerm, len(*in)) @@ -1757,8 +1643,6 @@ func DeepCopy_api_NodeSelector(in interface{}, out interface{}, c *conversion.Cl return err } } - } else { - out.NodeSelectorTerms = nil } return nil } @@ -1768,14 +1652,11 @@ func DeepCopy_api_NodeSelectorRequirement(in interface{}, out interface{}, c *co { in := in.(*NodeSelectorRequirement) out := out.(*NodeSelectorRequirement) - out.Key = in.Key - out.Operator = in.Operator + *out = *in if in.Values != nil { in, out := &in.Values, &out.Values *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Values = nil } return nil } @@ -1785,6 +1666,7 @@ func DeepCopy_api_NodeSelectorTerm(in interface{}, out interface{}, c *conversio { in := in.(*NodeSelectorTerm) out := out.(*NodeSelectorTerm) + *out = *in if in.MatchExpressions != nil { in, out := &in.MatchExpressions, &out.MatchExpressions *out = make([]NodeSelectorRequirement, len(*in)) @@ -1793,8 +1675,6 @@ func DeepCopy_api_NodeSelectorTerm(in interface{}, out interface{}, c *conversio return err } } - } else { - out.MatchExpressions = nil } return nil } @@ -1804,10 +1684,16 @@ func DeepCopy_api_NodeSpec(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*NodeSpec) out := out.(*NodeSpec) - out.PodCIDR = in.PodCIDR - out.ExternalID = in.ExternalID - out.ProviderID = in.ProviderID - out.Unschedulable = in.Unschedulable + *out = *in + if in.Taints != nil { + in, out := &in.Taints, &out.Taints + *out = make([]Taint, len(*in)) + for i := range *in { + if err := DeepCopy_api_Taint(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } return nil } } @@ -1816,14 +1702,13 @@ func DeepCopy_api_NodeStatus(in interface{}, out interface{}, c *conversion.Clon { in := in.(*NodeStatus) out := out.(*NodeStatus) + *out = *in if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity *out = make(ResourceList) for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Capacity = nil } if in.Allocatable != nil { in, out := &in.Allocatable, &out.Allocatable @@ -1831,10 +1716,7 @@ func DeepCopy_api_NodeStatus(in interface{}, out interface{}, c *conversion.Clon 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)) @@ -1843,20 +1725,12 @@ func DeepCopy_api_NodeStatus(in interface{}, out interface{}, c *conversion.Clon 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 + copy(*out, *in) } - out.DaemonEndpoints = in.DaemonEndpoints - out.NodeInfo = in.NodeInfo if in.Images != nil { in, out := &in.Images, &out.Images *out = make([]ContainerImage, len(*in)) @@ -1865,26 +1739,16 @@ func DeepCopy_api_NodeStatus(in interface{}, out interface{}, c *conversion.Clon 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 + copy(*out, *in) } 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 + copy(*out, *in) } return nil } @@ -1894,16 +1758,7 @@ func DeepCopy_api_NodeSystemInfo(in interface{}, out interface{}, c *conversion. { in := in.(*NodeSystemInfo) out := out.(*NodeSystemInfo) - 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 + *out = *in return nil } } @@ -1912,8 +1767,7 @@ func DeepCopy_api_ObjectFieldSelector(in interface{}, out interface{}, c *conver { in := in.(*ObjectFieldSelector) out := out.(*ObjectFieldSelector) - out.APIVersion = in.APIVersion - out.FieldPath = in.FieldPath + *out = *in return nil } } @@ -1922,27 +1776,17 @@ func DeepCopy_api_ObjectMeta(in interface{}, out interface{}, c *conversion.Clon { in := in.(*ObjectMeta) out := out.(*ObjectMeta) - 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 = *in out.CreationTimestamp = in.CreationTimestamp.DeepCopy() if in.DeletionTimestamp != nil { in, out := &in.DeletionTimestamp, &out.DeletionTimestamp - *out = new(unversioned.Time) + *out = new(v1.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 @@ -1950,8 +1794,6 @@ func DeepCopy_api_ObjectMeta(in interface{}, out interface{}, c *conversion.Clon for key, val := range *in { (*out)[key] = val } - } else { - out.Labels = nil } if in.Annotations != nil { in, out := &in.Annotations, &out.Annotations @@ -1959,28 +1801,23 @@ func DeepCopy_api_ObjectMeta(in interface{}, out interface{}, c *conversion.Clon 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)) + *out = make([]v1.OwnerReference, len(*in)) for i := range *in { - if err := DeepCopy_api_OwnerReference(&(*in)[i], &(*out)[i], c); err != nil { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { return err + } else { + (*out)[i] = *newVal.(*v1.OwnerReference) } } - } 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 } - out.ClusterName = in.ClusterName return nil } } @@ -1989,32 +1826,7 @@ func DeepCopy_api_ObjectReference(in interface{}, out interface{}, c *conversion { in := in.(*ObjectReference) out := out.(*ObjectReference) - 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 interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*OwnerReference) - out := out.(*OwnerReference) - 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 - } + *out = *in return nil } } @@ -2023,14 +1835,15 @@ func DeepCopy_api_PersistentVolume(in interface{}, out interface{}, c *conversio { in := in.(*PersistentVolume) out := out.(*PersistentVolume) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PersistentVolumeSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status return nil } } @@ -2039,9 +1852,11 @@ func DeepCopy_api_PersistentVolumeClaim(in interface{}, out interface{}, c *conv { in := in.(*PersistentVolumeClaim) out := out.(*PersistentVolumeClaim) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2057,8 +1872,7 @@ func DeepCopy_api_PersistentVolumeClaimList(in interface{}, out interface{}, c * { in := in.(*PersistentVolumeClaimList) out := out.(*PersistentVolumeClaimList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PersistentVolumeClaim, len(*in)) @@ -2067,8 +1881,6 @@ func DeepCopy_api_PersistentVolumeClaimList(in interface{}, out interface{}, c * return err } } - } else { - out.Items = nil } return nil } @@ -2078,28 +1890,28 @@ func DeepCopy_api_PersistentVolumeClaimSpec(in interface{}, out interface{}, c * { in := in.(*PersistentVolumeClaimSpec) out := out.(*PersistentVolumeClaimSpec) + *out = *in 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 + copy(*out, *in) } 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 { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } else { - out.Selector = nil } if err := DeepCopy_api_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil { return err } - out.VolumeName = in.VolumeName + if in.StorageClassName != nil { + in, out := &in.StorageClassName, &out.StorageClassName + *out = new(string) + **out = **in + } return nil } } @@ -2108,15 +1920,11 @@ func DeepCopy_api_PersistentVolumeClaimStatus(in interface{}, out interface{}, c { in := in.(*PersistentVolumeClaimStatus) out := out.(*PersistentVolumeClaimStatus) - out.Phase = in.Phase + *out = *in 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 + copy(*out, *in) } if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity @@ -2124,8 +1932,6 @@ func DeepCopy_api_PersistentVolumeClaimStatus(in interface{}, out interface{}, c for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Capacity = nil } return nil } @@ -2135,8 +1941,7 @@ func DeepCopy_api_PersistentVolumeClaimVolumeSource(in interface{}, out interfac { in := in.(*PersistentVolumeClaimVolumeSource) out := out.(*PersistentVolumeClaimVolumeSource) - out.ClaimName = in.ClaimName - out.ReadOnly = in.ReadOnly + *out = *in return nil } } @@ -2145,8 +1950,7 @@ func DeepCopy_api_PersistentVolumeList(in interface{}, out interface{}, c *conve { in := in.(*PersistentVolumeList) out := out.(*PersistentVolumeList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PersistentVolume, len(*in)) @@ -2155,8 +1959,6 @@ func DeepCopy_api_PersistentVolumeList(in interface{}, out interface{}, c *conve return err } } - } else { - out.Items = nil } return nil } @@ -2166,40 +1968,31 @@ func DeepCopy_api_PersistentVolumeSource(in interface{}, out interface{}, c *con { in := in.(*PersistentVolumeSource) out := out.(*PersistentVolumeSource) + *out = *in 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 @@ -2207,22 +2000,18 @@ func DeepCopy_api_PersistentVolumeSource(in interface{}, out interface{}, c *con if err := DeepCopy_api_RBDVolumeSource(*in, *out, c); err != nil { return err } - } else { - out.RBD = nil } if in.Quobyte != nil { in, out := &in.Quobyte, &out.Quobyte *out = new(QuobyteVolumeSource) **out = **in - } else { - out.Quobyte = nil } if in.ISCSI != nil { in, out := &in.ISCSI, &out.ISCSI *out = new(ISCSIVolumeSource) - **out = **in - } else { - out.ISCSI = nil + if err := DeepCopy_api_ISCSIVolumeSource(*in, *out, c); err != nil { + return err + } } if in.FlexVolume != nil { in, out := &in.FlexVolume, &out.FlexVolume @@ -2230,15 +2019,11 @@ func DeepCopy_api_PersistentVolumeSource(in interface{}, out interface{}, c *con 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 @@ -2246,8 +2031,6 @@ func DeepCopy_api_PersistentVolumeSource(in interface{}, out interface{}, c *con 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 @@ -2255,29 +2038,21 @@ func DeepCopy_api_PersistentVolumeSource(in interface{}, out interface{}, c *con 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 } if in.AzureDisk != nil { in, out := &in.AzureDisk, &out.AzureDisk @@ -2285,8 +2060,23 @@ func DeepCopy_api_PersistentVolumeSource(in interface{}, out interface{}, c *con if err := DeepCopy_api_AzureDiskVolumeSource(*in, *out, c); err != nil { return err } - } else { - out.AzureDisk = nil + } + if in.PhotonPersistentDisk != nil { + in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk + *out = new(PhotonPersistentDiskVolumeSource) + **out = **in + } + if in.PortworxVolume != nil { + in, out := &in.PortworxVolume, &out.PortworxVolume + *out = new(PortworxVolumeSource) + **out = **in + } + if in.ScaleIO != nil { + in, out := &in.ScaleIO, &out.ScaleIO + *out = new(ScaleIOVolumeSource) + if err := DeepCopy_api_ScaleIOVolumeSource(*in, *out, c); err != nil { + return err + } } return nil } @@ -2296,14 +2086,13 @@ func DeepCopy_api_PersistentVolumeSpec(in interface{}, out interface{}, c *conve { in := in.(*PersistentVolumeSpec) out := out.(*PersistentVolumeSpec) + *out = *in if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity *out = make(ResourceList) for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Capacity = nil } if err := DeepCopy_api_PersistentVolumeSource(&in.PersistentVolumeSource, &out.PersistentVolumeSource, c); err != nil { return err @@ -2311,20 +2100,13 @@ func DeepCopy_api_PersistentVolumeSpec(in interface{}, out interface{}, c *conve 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 + copy(*out, *in) } 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 } } @@ -2333,9 +2115,16 @@ func DeepCopy_api_PersistentVolumeStatus(in interface{}, out interface{}, c *con { in := in.(*PersistentVolumeStatus) out := out.(*PersistentVolumeStatus) - out.Phase = in.Phase - out.Message = in.Message - out.Reason = in.Reason + *out = *in + return nil + } +} + +func DeepCopy_api_PhotonPersistentDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PhotonPersistentDiskVolumeSource) + out := out.(*PhotonPersistentDiskVolumeSource) + *out = *in return nil } } @@ -2344,9 +2133,11 @@ func DeepCopy_api_Pod(in interface{}, out interface{}, c *conversion.Cloner) err { in := in.(*Pod) out := out.(*Pod) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PodSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2362,6 +2153,7 @@ func DeepCopy_api_PodAffinity(in interface{}, out interface{}, c *conversion.Clo { in := in.(*PodAffinity) out := out.(*PodAffinity) + *out = *in if in.RequiredDuringSchedulingIgnoredDuringExecution != nil { in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution *out = make([]PodAffinityTerm, len(*in)) @@ -2370,8 +2162,6 @@ func DeepCopy_api_PodAffinity(in interface{}, out interface{}, c *conversion.Clo return err } } - } else { - out.RequiredDuringSchedulingIgnoredDuringExecution = nil } if in.PreferredDuringSchedulingIgnoredDuringExecution != nil { in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution @@ -2381,8 +2171,6 @@ func DeepCopy_api_PodAffinity(in interface{}, out interface{}, c *conversion.Clo return err } } - } else { - out.PreferredDuringSchedulingIgnoredDuringExecution = nil } return nil } @@ -2392,23 +2180,20 @@ func DeepCopy_api_PodAffinityTerm(in interface{}, out interface{}, c *conversion { in := in.(*PodAffinityTerm) out := out.(*PodAffinityTerm) + *out = *in 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 { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } 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 } } @@ -2417,6 +2202,7 @@ func DeepCopy_api_PodAntiAffinity(in interface{}, out interface{}, c *conversion { in := in.(*PodAntiAffinity) out := out.(*PodAntiAffinity) + *out = *in if in.RequiredDuringSchedulingIgnoredDuringExecution != nil { in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution *out = make([]PodAffinityTerm, len(*in)) @@ -2425,8 +2211,6 @@ func DeepCopy_api_PodAntiAffinity(in interface{}, out interface{}, c *conversion return err } } - } else { - out.RequiredDuringSchedulingIgnoredDuringExecution = nil } if in.PreferredDuringSchedulingIgnoredDuringExecution != nil { in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution @@ -2436,8 +2220,6 @@ func DeepCopy_api_PodAntiAffinity(in interface{}, out interface{}, c *conversion return err } } - } else { - out.PreferredDuringSchedulingIgnoredDuringExecution = nil } return nil } @@ -2447,12 +2229,7 @@ func DeepCopy_api_PodAttachOptions(in interface{}, out interface{}, c *conversio { in := in.(*PodAttachOptions) out := out.(*PodAttachOptions) - out.TypeMeta = in.TypeMeta - out.Stdin = in.Stdin - out.Stdout = in.Stdout - out.Stderr = in.Stderr - out.TTY = in.TTY - out.Container = in.Container + *out = *in return nil } } @@ -2461,12 +2238,9 @@ func DeepCopy_api_PodCondition(in interface{}, out interface{}, c *conversion.Cl { in := in.(*PodCondition) out := out.(*PodCondition) - out.Type = in.Type - out.Status = in.Status + *out = *in out.LastProbeTime = in.LastProbeTime.DeepCopy() out.LastTransitionTime = in.LastTransitionTime.DeepCopy() - out.Reason = in.Reason - out.Message = in.Message return nil } } @@ -2475,18 +2249,11 @@ func DeepCopy_api_PodExecOptions(in interface{}, out interface{}, c *conversion. { in := in.(*PodExecOptions) out := out.(*PodExecOptions) - out.TypeMeta = in.TypeMeta - out.Stdin = in.Stdin - out.Stdout = in.Stdout - out.Stderr = in.Stderr - out.TTY = in.TTY - out.Container = in.Container + *out = *in if in.Command != nil { in, out := &in.Command, &out.Command *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Command = nil } return nil } @@ -2496,8 +2263,7 @@ func DeepCopy_api_PodList(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*PodList) out := out.(*PodList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Pod, len(*in)) @@ -2506,8 +2272,6 @@ func DeepCopy_api_PodList(in interface{}, out interface{}, c *conversion.Cloner) return err } } - } else { - out.Items = nil } return nil } @@ -2517,38 +2281,40 @@ func DeepCopy_api_PodLogOptions(in interface{}, out interface{}, c *conversion.C { in := in.(*PodLogOptions) out := out.(*PodLogOptions) - out.TypeMeta = in.TypeMeta - out.Container = in.Container - out.Follow = in.Follow - out.Previous = in.Previous + *out = *in 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 = new(v1.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_PodPortForwardOptions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodPortForwardOptions) + out := out.(*PodPortForwardOptions) + *out = *in + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]int32, len(*in)) + copy(*out, *in) } return nil } @@ -2558,8 +2324,7 @@ func DeepCopy_api_PodProxyOptions(in interface{}, out interface{}, c *conversion { in := in.(*PodProxyOptions) out := out.(*PodProxyOptions) - out.TypeMeta = in.TypeMeta - out.Path = in.Path + *out = *in return nil } } @@ -2568,43 +2333,31 @@ func DeepCopy_api_PodSecurityContext(in interface{}, out interface{}, c *convers { in := in.(*PodSecurityContext) out := out.(*PodSecurityContext) - out.HostNetwork = in.HostNetwork - out.HostPID = in.HostPID - out.HostIPC = in.HostIPC + *out = *in 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 } @@ -2614,14 +2367,14 @@ func DeepCopy_api_PodSignature(in interface{}, out interface{}, c *conversion.Cl { in := in.(*PodSignature) out := out.(*PodSignature) + *out = *in if in.PodController != nil { in, out := &in.PodController, &out.PodController - *out = new(OwnerReference) - if err := DeepCopy_api_OwnerReference(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.OwnerReference) } - } else { - out.PodController = nil } return nil } @@ -2631,6 +2384,7 @@ func DeepCopy_api_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*PodSpec) out := out.(*PodSpec) + *out = *in if in.Volumes != nil { in, out := &in.Volumes, &out.Volumes *out = make([]Volume, len(*in)) @@ -2639,8 +2393,6 @@ func DeepCopy_api_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) return err } } - } else { - out.Volumes = nil } if in.InitContainers != nil { in, out := &in.InitContainers, &out.InitContainers @@ -2650,8 +2402,6 @@ func DeepCopy_api_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) return err } } - } else { - out.InitContainers = nil } if in.Containers != nil { in, out := &in.Containers, &out.Containers @@ -2661,56 +2411,57 @@ func DeepCopy_api_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) 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.AutomountServiceAccountToken != nil { + in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken + *out = new(bool) + **out = **in + } if in.SecurityContext != nil { in, out := &in.SecurityContext, &out.SecurityContext *out = new(PodSecurityContext) if err := DeepCopy_api_PodSecurityContext(*in, *out, c); err != nil { return err } - } 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 + copy(*out, *in) + } + if in.Affinity != nil { + in, out := &in.Affinity, &out.Affinity + *out = new(Affinity) + if err := DeepCopy_api_Affinity(*in, *out, c); err != nil { + return err + } + } + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]Toleration, len(*in)) + for i := range *in { + if err := DeepCopy_api_Toleration(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } } - out.Hostname = in.Hostname - out.Subdomain = in.Subdomain return nil } } @@ -2719,7 +2470,7 @@ func DeepCopy_api_PodStatus(in interface{}, out interface{}, c *conversion.Clone { in := in.(*PodStatus) out := out.(*PodStatus) - out.Phase = in.Phase + *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]PodCondition, len(*in)) @@ -2728,19 +2479,11 @@ func DeepCopy_api_PodStatus(in interface{}, out interface{}, c *conversion.Clone 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 = new(v1.Time) **out = (*in).DeepCopy() - } else { - out.StartTime = nil } if in.InitContainerStatuses != nil { in, out := &in.InitContainerStatuses, &out.InitContainerStatuses @@ -2750,8 +2493,6 @@ func DeepCopy_api_PodStatus(in interface{}, out interface{}, c *conversion.Clone return err } } - } else { - out.InitContainerStatuses = nil } if in.ContainerStatuses != nil { in, out := &in.ContainerStatuses, &out.ContainerStatuses @@ -2761,8 +2502,6 @@ func DeepCopy_api_PodStatus(in interface{}, out interface{}, c *conversion.Clone return err } } - } else { - out.ContainerStatuses = nil } return nil } @@ -2772,9 +2511,11 @@ func DeepCopy_api_PodStatusResult(in interface{}, out interface{}, c *conversion { in := in.(*PodStatusResult) out := out.(*PodStatusResult) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PodStatus(&in.Status, &out.Status, c); err != nil { return err @@ -2787,9 +2528,11 @@ func DeepCopy_api_PodTemplate(in interface{}, out interface{}, c *conversion.Clo { in := in.(*PodTemplate) out := out.(*PodTemplate) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -2802,8 +2545,7 @@ func DeepCopy_api_PodTemplateList(in interface{}, out interface{}, c *conversion { in := in.(*PodTemplateList) out := out.(*PodTemplateList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PodTemplate, len(*in)) @@ -2812,8 +2554,6 @@ func DeepCopy_api_PodTemplateList(in interface{}, out interface{}, c *conversion return err } } - } else { - out.Items = nil } return nil } @@ -2823,8 +2563,11 @@ func DeepCopy_api_PodTemplateSpec(in interface{}, out interface{}, c *conversion { in := in.(*PodTemplateSpec) out := out.(*PodTemplateSpec) - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PodSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2833,16 +2576,24 @@ func DeepCopy_api_PodTemplateSpec(in interface{}, out interface{}, c *conversion } } +func DeepCopy_api_PortworxVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PortworxVolumeSource) + out := out.(*PortworxVolumeSource) + *out = *in + return nil + } +} + func DeepCopy_api_Preconditions(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*Preconditions) out := out.(*Preconditions) + *out = *in if in.UID != nil { in, out := &in.UID, &out.UID *out = new(types.UID) **out = **in - } else { - out.UID = nil } return nil } @@ -2852,12 +2603,11 @@ func DeepCopy_api_PreferAvoidPodsEntry(in interface{}, out interface{}, c *conve { in := in.(*PreferAvoidPodsEntry) out := out.(*PreferAvoidPodsEntry) + *out = *in if err := DeepCopy_api_PodSignature(&in.PodSignature, &out.PodSignature, c); err != nil { return err } out.EvictionTime = in.EvictionTime.DeepCopy() - out.Reason = in.Reason - out.Message = in.Message return nil } } @@ -2866,7 +2616,7 @@ func DeepCopy_api_PreferredSchedulingTerm(in interface{}, out interface{}, c *co { in := in.(*PreferredSchedulingTerm) out := out.(*PreferredSchedulingTerm) - out.Weight = in.Weight + *out = *in if err := DeepCopy_api_NodeSelectorTerm(&in.Preference, &out.Preference, c); err != nil { return err } @@ -2878,14 +2628,33 @@ func DeepCopy_api_Probe(in interface{}, out interface{}, c *conversion.Cloner) e { in := in.(*Probe) out := out.(*Probe) + *out = *in 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_ProjectedVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ProjectedVolumeSource) + out := out.(*ProjectedVolumeSource) + *out = *in + if in.Sources != nil { + in, out := &in.Sources, &out.Sources + *out = make([]VolumeProjection, len(*in)) + for i := range *in { + if err := DeepCopy_api_VolumeProjection(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + if in.DefaultMode != nil { + in, out := &in.DefaultMode, &out.DefaultMode + *out = new(int32) + **out = **in + } return nil } } @@ -2894,11 +2663,7 @@ func DeepCopy_api_QuobyteVolumeSource(in interface{}, out interface{}, c *conver { in := in.(*QuobyteVolumeSource) out := out.(*QuobyteVolumeSource) - out.Registry = in.Registry - out.Volume = in.Volume - out.ReadOnly = in.ReadOnly - out.User = in.User - out.Group = in.Group + *out = *in return nil } } @@ -2907,26 +2672,17 @@ func DeepCopy_api_RBDVolumeSource(in interface{}, out interface{}, c *conversion { in := in.(*RBDVolumeSource) out := out.(*RBDVolumeSource) + *out = *in if in.CephMonitors != nil { in, out := &in.CephMonitors, &out.CephMonitors *out = make([]string, len(*in)) copy(*out, *in) - } 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 } } @@ -2935,17 +2691,16 @@ func DeepCopy_api_RangeAllocation(in interface{}, out interface{}, c *conversion { in := in.(*RangeAllocation) out := out.(*RangeAllocation) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } - 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 } @@ -2955,14 +2710,28 @@ func DeepCopy_api_ReplicationController(in interface{}, out interface{}, c *conv { in := in.(*ReplicationController) out := out.(*ReplicationController) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_ReplicationControllerSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status + if err := DeepCopy_api_ReplicationControllerStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_api_ReplicationControllerCondition(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ReplicationControllerCondition) + out := out.(*ReplicationControllerCondition) + *out = *in + out.LastTransitionTime = in.LastTransitionTime.DeepCopy() return nil } } @@ -2971,8 +2740,7 @@ func DeepCopy_api_ReplicationControllerList(in interface{}, out interface{}, c * { in := in.(*ReplicationControllerList) out := out.(*ReplicationControllerList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ReplicationController, len(*in)) @@ -2981,8 +2749,6 @@ func DeepCopy_api_ReplicationControllerList(in interface{}, out interface{}, c * return err } } - } else { - out.Items = nil } return nil } @@ -2992,15 +2758,13 @@ func DeepCopy_api_ReplicationControllerSpec(in interface{}, out interface{}, c * { in := in.(*ReplicationControllerSpec) out := out.(*ReplicationControllerSpec) - out.Replicas = in.Replicas + *out = *in if in.Selector != nil { in, out := &in.Selector, &out.Selector *out = make(map[string]string) for key, val := range *in { (*out)[key] = val } - } else { - out.Selector = nil } if in.Template != nil { in, out := &in.Template, &out.Template @@ -3008,8 +2772,6 @@ func DeepCopy_api_ReplicationControllerSpec(in interface{}, out interface{}, c * if err := DeepCopy_api_PodTemplateSpec(*in, *out, c); err != nil { return err } - } else { - out.Template = nil } return nil } @@ -3019,10 +2781,16 @@ func DeepCopy_api_ReplicationControllerStatus(in interface{}, out interface{}, c { in := in.(*ReplicationControllerStatus) out := out.(*ReplicationControllerStatus) - out.Replicas = in.Replicas - out.FullyLabeledReplicas = in.FullyLabeledReplicas - out.ReadyReplicas = in.ReadyReplicas - out.ObservedGeneration = in.ObservedGeneration + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]ReplicationControllerCondition, len(*in)) + for i := range *in { + if err := DeepCopy_api_ReplicationControllerCondition(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } return nil } } @@ -3031,8 +2799,7 @@ func DeepCopy_api_ResourceFieldSelector(in interface{}, out interface{}, c *conv { in := in.(*ResourceFieldSelector) out := out.(*ResourceFieldSelector) - out.ContainerName = in.ContainerName - out.Resource = in.Resource + *out = *in out.Divisor = in.Divisor.DeepCopy() return nil } @@ -3042,9 +2809,11 @@ func DeepCopy_api_ResourceQuota(in interface{}, out interface{}, c *conversion.C { in := in.(*ResourceQuota) out := out.(*ResourceQuota) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_ResourceQuotaSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -3060,8 +2829,7 @@ func DeepCopy_api_ResourceQuotaList(in interface{}, out interface{}, c *conversi { in := in.(*ResourceQuotaList) out := out.(*ResourceQuotaList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ResourceQuota, len(*in)) @@ -3070,8 +2838,6 @@ func DeepCopy_api_ResourceQuotaList(in interface{}, out interface{}, c *conversi return err } } - } else { - out.Items = nil } return nil } @@ -3081,23 +2847,18 @@ func DeepCopy_api_ResourceQuotaSpec(in interface{}, out interface{}, c *conversi { in := in.(*ResourceQuotaSpec) out := out.(*ResourceQuotaSpec) + *out = *in if in.Hard != nil { in, out := &in.Hard, &out.Hard *out = make(ResourceList) for key, val := range *in { (*out)[key] = val.DeepCopy() } - } 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 + copy(*out, *in) } return nil } @@ -3107,14 +2868,13 @@ func DeepCopy_api_ResourceQuotaStatus(in interface{}, out interface{}, c *conver { in := in.(*ResourceQuotaStatus) out := out.(*ResourceQuotaStatus) + *out = *in if in.Hard != nil { in, out := &in.Hard, &out.Hard *out = make(ResourceList) for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Hard = nil } if in.Used != nil { in, out := &in.Used, &out.Used @@ -3122,8 +2882,6 @@ func DeepCopy_api_ResourceQuotaStatus(in interface{}, out interface{}, c *conver for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Used = nil } return nil } @@ -3133,14 +2891,13 @@ func DeepCopy_api_ResourceRequirements(in interface{}, out interface{}, c *conve { in := in.(*ResourceRequirements) out := out.(*ResourceRequirements) + *out = *in if in.Limits != nil { in, out := &in.Limits, &out.Limits *out = make(ResourceList) for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Limits = nil } if in.Requests != nil { in, out := &in.Requests, &out.Requests @@ -3148,8 +2905,6 @@ func DeepCopy_api_ResourceRequirements(in interface{}, out interface{}, c *conve for key, val := range *in { (*out)[key] = val.DeepCopy() } - } else { - out.Requests = nil } return nil } @@ -3159,10 +2914,21 @@ func DeepCopy_api_SELinuxOptions(in interface{}, out interface{}, c *conversion. { in := in.(*SELinuxOptions) out := out.(*SELinuxOptions) - out.User = in.User - out.Role = in.Role - out.Type = in.Type - out.Level = in.Level + *out = *in + return nil + } +} + +func DeepCopy_api_ScaleIOVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ScaleIOVolumeSource) + out := out.(*ScaleIOVolumeSource) + *out = *in + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(LocalObjectReference) + **out = **in + } return nil } } @@ -3171,9 +2937,11 @@ func DeepCopy_api_Secret(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*Secret) out := out.(*Secret) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -3185,10 +2953,21 @@ func DeepCopy_api_Secret(in interface{}, out interface{}, c *conversion.Cloner) (*out)[key] = *newVal.(*[]byte) } } - } else { - out.Data = nil } - out.Type = in.Type + return nil + } +} + +func DeepCopy_api_SecretEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*SecretEnvSource) + out := out.(*SecretEnvSource) + *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -3197,8 +2976,12 @@ func DeepCopy_api_SecretKeySelector(in interface{}, out interface{}, c *conversi { in := in.(*SecretKeySelector) out := out.(*SecretKeySelector) - out.LocalObjectReference = in.LocalObjectReference - out.Key = in.Key + *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -3207,8 +2990,7 @@ func DeepCopy_api_SecretList(in interface{}, out interface{}, c *conversion.Clon { in := in.(*SecretList) out := out.(*SecretList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Secret, len(*in)) @@ -3217,8 +2999,29 @@ func DeepCopy_api_SecretList(in interface{}, out interface{}, c *conversion.Clon return err } } - } else { - out.Items = nil + } + return nil + } +} + +func DeepCopy_api_SecretProjection(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*SecretProjection) + out := out.(*SecretProjection) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KeyToPath, len(*in)) + for i := range *in { + if err := DeepCopy_api_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in } return nil } @@ -3228,7 +3031,7 @@ func DeepCopy_api_SecretVolumeSource(in interface{}, out interface{}, c *convers { in := in.(*SecretVolumeSource) out := out.(*SecretVolumeSource) - out.SecretName = in.SecretName + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]KeyToPath, len(*in)) @@ -3237,15 +3040,16 @@ func DeepCopy_api_SecretVolumeSource(in interface{}, out interface{}, c *convers return err } } - } else { - out.Items = nil } if in.DefaultMode != nil { in, out := &in.DefaultMode, &out.DefaultMode *out = new(int32) **out = **in - } else { - out.DefaultMode = nil + } + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in } return nil } @@ -3255,49 +3059,38 @@ func DeepCopy_api_SecurityContext(in interface{}, out interface{}, c *conversion { in := in.(*SecurityContext) out := out.(*SecurityContext) + *out = *in if in.Capabilities != nil { in, out := &in.Capabilities, &out.Capabilities *out = new(Capabilities) if err := DeepCopy_api_Capabilities(*in, *out, c); err != nil { return err } - } 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 } @@ -3307,8 +3100,7 @@ func DeepCopy_api_SerializedReference(in interface{}, out interface{}, c *conver { in := in.(*SerializedReference) out := out.(*SerializedReference) - out.TypeMeta = in.TypeMeta - out.Reference = in.Reference + *out = *in return nil } } @@ -3317,9 +3109,11 @@ func DeepCopy_api_Service(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*Service) out := out.(*Service) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_ServiceSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -3335,27 +3129,26 @@ func DeepCopy_api_ServiceAccount(in interface{}, out interface{}, c *conversion. { in := in.(*ServiceAccount) out := out.(*ServiceAccount) - out.TypeMeta = in.TypeMeta - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Secrets != nil { in, out := &in.Secrets, &out.Secrets *out = make([]ObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Secrets = nil + copy(*out, *in) } 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 + copy(*out, *in) + } + if in.AutomountServiceAccountToken != nil { + in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken + *out = new(bool) + **out = **in } return nil } @@ -3365,8 +3158,7 @@ func DeepCopy_api_ServiceAccountList(in interface{}, out interface{}, c *convers { in := in.(*ServiceAccountList) out := out.(*ServiceAccountList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ServiceAccount, len(*in)) @@ -3375,8 +3167,6 @@ func DeepCopy_api_ServiceAccountList(in interface{}, out interface{}, c *convers return err } } - } else { - out.Items = nil } return nil } @@ -3386,8 +3176,7 @@ func DeepCopy_api_ServiceList(in interface{}, out interface{}, c *conversion.Clo { in := in.(*ServiceList) out := out.(*ServiceList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Service, len(*in)) @@ -3396,8 +3185,6 @@ func DeepCopy_api_ServiceList(in interface{}, out interface{}, c *conversion.Clo return err } } - } else { - out.Items = nil } return nil } @@ -3407,11 +3194,7 @@ func DeepCopy_api_ServicePort(in interface{}, out interface{}, c *conversion.Clo { in := in.(*ServicePort) out := out.(*ServicePort) - out.Name = in.Name - out.Protocol = in.Protocol - out.Port = in.Port - out.TargetPort = in.TargetPort - out.NodePort = in.NodePort + *out = *in return nil } } @@ -3420,8 +3203,7 @@ func DeepCopy_api_ServiceProxyOptions(in interface{}, out interface{}, c *conver { in := in.(*ServiceProxyOptions) out := out.(*ServiceProxyOptions) - out.TypeMeta = in.TypeMeta - out.Path = in.Path + *out = *in return nil } } @@ -3430,15 +3212,11 @@ func DeepCopy_api_ServiceSpec(in interface{}, out interface{}, c *conversion.Clo { in := in.(*ServiceSpec) out := out.(*ServiceSpec) - out.Type = in.Type + *out = *in 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 + copy(*out, *in) } if in.Selector != nil { in, out := &in.Selector, &out.Selector @@ -3446,26 +3224,16 @@ func DeepCopy_api_ServiceSpec(in interface{}, out interface{}, c *conversion.Clo for key, val := range *in { (*out)[key] = val } - } else { - out.Selector = nil } - out.ClusterIP = in.ClusterIP - out.ExternalName = in.ExternalName 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 } @@ -3475,6 +3243,7 @@ func DeepCopy_api_ServiceStatus(in interface{}, out interface{}, c *conversion.C { in := in.(*ServiceStatus) out := out.(*ServiceStatus) + *out = *in if err := DeepCopy_api_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil { return err } @@ -3486,8 +3255,7 @@ func DeepCopy_api_Sysctl(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*Sysctl) out := out.(*Sysctl) - out.Name = in.Name - out.Value = in.Value + *out = *in return nil } } @@ -3496,7 +3264,7 @@ func DeepCopy_api_TCPSocketAction(in interface{}, out interface{}, c *conversion { in := in.(*TCPSocketAction) out := out.(*TCPSocketAction) - out.Port = in.Port + *out = *in return nil } } @@ -3505,9 +3273,8 @@ func DeepCopy_api_Taint(in interface{}, out interface{}, c *conversion.Cloner) e { in := in.(*Taint) out := out.(*Taint) - out.Key = in.Key - out.Value = in.Value - out.Effect = in.Effect + *out = *in + out.TimeAdded = in.TimeAdded.DeepCopy() return nil } } @@ -3516,10 +3283,12 @@ func DeepCopy_api_Toleration(in interface{}, out interface{}, c *conversion.Clon { in := in.(*Toleration) out := out.(*Toleration) - out.Key = in.Key - out.Operator = in.Operator - out.Value = in.Value - out.Effect = in.Effect + *out = *in + if in.TolerationSeconds != nil { + in, out := &in.TolerationSeconds, &out.TolerationSeconds + *out = new(int64) + **out = **in + } return nil } } @@ -3528,7 +3297,7 @@ func DeepCopy_api_Volume(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*Volume) out := out.(*Volume) - out.Name = in.Name + *out = *in if err := DeepCopy_api_VolumeSource(&in.VolumeSource, &out.VolumeSource, c); err != nil { return err } @@ -3540,10 +3309,37 @@ func DeepCopy_api_VolumeMount(in interface{}, out interface{}, c *conversion.Clo { in := in.(*VolumeMount) out := out.(*VolumeMount) - out.Name = in.Name - out.ReadOnly = in.ReadOnly - out.MountPath = in.MountPath - out.SubPath = in.SubPath + *out = *in + return nil + } +} + +func DeepCopy_api_VolumeProjection(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*VolumeProjection) + out := out.(*VolumeProjection) + *out = *in + if in.Secret != nil { + in, out := &in.Secret, &out.Secret + *out = new(SecretProjection) + if err := DeepCopy_api_SecretProjection(*in, *out, c); err != nil { + return err + } + } + if in.DownwardAPI != nil { + in, out := &in.DownwardAPI, &out.DownwardAPI + *out = new(DownwardAPIProjection) + if err := DeepCopy_api_DownwardAPIProjection(*in, *out, c); err != nil { + return err + } + } + if in.ConfigMap != nil { + in, out := &in.ConfigMap, &out.ConfigMap + *out = new(ConfigMapProjection) + if err := DeepCopy_api_ConfigMapProjection(*in, *out, c); err != nil { + return err + } + } return nil } } @@ -3552,40 +3348,31 @@ func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cl { in := in.(*VolumeSource) out := out.(*VolumeSource) + *out = *in 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 @@ -3593,36 +3380,28 @@ func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cl 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 err := DeepCopy_api_ISCSIVolumeSource(*in, *out, c); err != nil { + return err + } } if in.Glusterfs != nil { in, out := &in.Glusterfs, &out.Glusterfs *out = new(GlusterfsVolumeSource) **out = **in - } 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 @@ -3630,15 +3409,11 @@ func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cl if err := DeepCopy_api_RBDVolumeSource(*in, *out, c); err != nil { return err } - } else { - out.RBD = nil } if in.Quobyte != nil { in, out := &in.Quobyte, &out.Quobyte *out = new(QuobyteVolumeSource) **out = **in - } else { - out.Quobyte = nil } if in.FlexVolume != nil { in, out := &in.FlexVolume, &out.FlexVolume @@ -3646,15 +3421,11 @@ func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cl 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 @@ -3662,15 +3433,11 @@ func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cl 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 @@ -3678,8 +3445,6 @@ func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cl 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 @@ -3687,15 +3452,11 @@ func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cl 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 @@ -3703,15 +3464,11 @@ func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cl 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 } if in.AzureDisk != nil { in, out := &in.AzureDisk, &out.AzureDisk @@ -3719,8 +3476,30 @@ func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cl if err := DeepCopy_api_AzureDiskVolumeSource(*in, *out, c); err != nil { return err } - } else { - out.AzureDisk = nil + } + if in.PhotonPersistentDisk != nil { + in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk + *out = new(PhotonPersistentDiskVolumeSource) + **out = **in + } + if in.Projected != nil { + in, out := &in.Projected, &out.Projected + *out = new(ProjectedVolumeSource) + if err := DeepCopy_api_ProjectedVolumeSource(*in, *out, c); err != nil { + return err + } + } + if in.PortworxVolume != nil { + in, out := &in.PortworxVolume, &out.PortworxVolume + *out = new(PortworxVolumeSource) + **out = **in + } + if in.ScaleIO != nil { + in, out := &in.ScaleIO, &out.ScaleIO + *out = new(ScaleIOVolumeSource) + if err := DeepCopy_api_ScaleIOVolumeSource(*in, *out, c); err != nil { + return err + } } return nil } @@ -3730,8 +3509,7 @@ func DeepCopy_api_VsphereVirtualDiskVolumeSource(in interface{}, out interface{} { in := in.(*VsphereVirtualDiskVolumeSource) out := out.(*VsphereVirtualDiskVolumeSource) - out.VolumePath = in.VolumePath - out.FSType = in.FSType + *out = *in return nil } } @@ -3740,7 +3518,7 @@ func DeepCopy_api_WeightedPodAffinityTerm(in interface{}, out interface{}, c *co { in := in.(*WeightedPodAffinityTerm) out := out.(*WeightedPodAffinityTerm) - out.Weight = in.Weight + *out = *in if err := DeepCopy_api_PodAffinityTerm(&in.PodAffinityTerm, &out.PodAffinityTerm, c); err != nil { return err } diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/OWNERS b/vendor/k8s.io/client-go/pkg/apis/apps/OWNERS new file mode 100755 index 000000000..1cdc56eec --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/apps/OWNERS @@ -0,0 +1,21 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- deads2k +- caesarxuchao +- bprashanth +- pmorie +- sttts +- saad-ali +- ncdc +- timstclair +- timothysc +- dims +- errordeveloper +- mml +- m1093782566 +- mbohlool +- david-mcmahon +- kevin-wangzefeng +- jianhuiz diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/doc.go b/vendor/k8s.io/client-go/pkg/apis/apps/doc.go new file mode 100644 index 000000000..d27cee51c --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/apps/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package apps diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/install/install.go b/vendor/k8s.io/client-go/pkg/apis/apps/install/install.go similarity index 55% rename from vendor/k8s.io/client-go/1.5/pkg/apis/apps/install/install.go rename to vendor/k8s.io/client-go/pkg/apis/apps/install/install.go index ef8f7e7ad..ca50f3ea4 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/install/install.go +++ b/vendor/k8s.io/client-go/pkg/apis/apps/install/install.go @@ -19,23 +19,31 @@ limitations under the License. package install import ( - "k8s.io/client-go/1.5/pkg/apimachinery/announced" - "k8s.io/client-go/1.5/pkg/apis/apps" - "k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/apis/apps" + "k8s.io/client-go/pkg/apis/apps/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: apps.GroupName, - VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version}, - ImportPrefix: "k8s.io/client-go/1.5/pkg/apis/apps", + VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version}, + ImportPrefix: "k8s.io/client-go/pkg/apis/apps", AddInternalObjectsToScheme: apps.AddToScheme, }, announced.VersionToSchemeFunc{ - v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, + v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/register.go b/vendor/k8s.io/client-go/pkg/apis/apps/register.go similarity index 74% rename from vendor/k8s.io/client-go/1.5/pkg/apis/apps/register.go rename to vendor/k8s.io/client-go/pkg/apis/apps/register.go index 26305ac46..d1d3bab26 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/apps/register.go @@ -17,9 +17,9 @@ limitations under the License. package apps import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/pkg/apis/extensions" ) var ( @@ -31,15 +31,15 @@ var ( const GroupName = "apps" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} // Kind takes an unqualified kind and returns a Group qualified GroupKind -func Kind(kind string) unversioned.GroupKind { +func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) unversioned.GroupResource { +func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } @@ -47,10 +47,12 @@ func Resource(resource string) unversioned.GroupResource { func addKnownTypes(scheme *runtime.Scheme) error { // TODO this will get cleaned up with the scheme types are fixed scheme.AddKnownTypes(SchemeGroupVersion, - &PetSet{}, - &PetSetList{}, - &api.ListOptions{}, - &api.DeleteOptions{}, + &extensions.Deployment{}, + &extensions.DeploymentList{}, + &extensions.DeploymentRollback{}, + &extensions.Scale{}, + &StatefulSet{}, + &StatefulSetList{}, ) return nil } diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/types.go b/vendor/k8s.io/client-go/pkg/apis/apps/types.go new file mode 100644 index 000000000..cd5ce8284 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/apps/types.go @@ -0,0 +1,103 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package apps + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/pkg/api" +) + +// +genclient=true + +// StatefulSet represents a set of pods with consistent identities. +// Identities are defined as: +// - Network: A single stable DNS and hostname. +// - Storage: As many VolumeClaims as requested. +// The StatefulSet guarantees that a given network identity will always +// map to the same storage identity. +type StatefulSet struct { + metav1.TypeMeta + // +optional + metav1.ObjectMeta + + // Spec defines the desired identities of pods in this set. + // +optional + Spec StatefulSetSpec + + // Status is the current status of Pods in this StatefulSet. This data + // may be out of date by some window of time. + // +optional + Status StatefulSetStatus +} + +// A StatefulSetSpec is the specification of a StatefulSet. +type StatefulSetSpec struct { + // Replicas is the desired number of replicas of the given Template. + // These are replicas in the sense that they are instantiations of the + // same Template, but individual replicas also have a consistent identity. + // If unspecified, defaults to 1. + // TODO: Consider a rename of this field. + // +optional + Replicas int32 + + // Selector is a label query over pods that should match the replica count. + // If empty, defaulted to labels on the pod template. + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + Selector *metav1.LabelSelector + + // Template is the object that describes the pod that will be created if + // insufficient replicas are detected. Each pod stamped out by the StatefulSet + // will fulfill this Template, but have a unique identity from the rest + // of the StatefulSet. + Template api.PodTemplateSpec + + // VolumeClaimTemplates is a list of claims that pods are allowed to reference. + // The StatefulSet controller is responsible for mapping network identities to + // claims in a way that maintains the identity of a pod. Every claim in + // this list must have at least one matching (by name) volumeMount in one + // container in the template. A claim in this list takes precedence over + // any volumes in the template, with the same name. + // TODO: Define the behavior if a claim already exists with the same name. + // +optional + VolumeClaimTemplates []api.PersistentVolumeClaim + + // ServiceName is the name of the service that governs this StatefulSet. + // This service must exist before the StatefulSet, and is responsible for + // the network identity of the set. Pods get DNS/hostnames that follow the + // pattern: pod-specific-string.serviceName.default.svc.cluster.local + // where "pod-specific-string" is managed by the StatefulSet controller. + ServiceName string +} + +// StatefulSetStatus represents the current state of a StatefulSet. +type StatefulSetStatus struct { + // most recent generation observed by this StatefulSet. + // +optional + ObservedGeneration *int64 + + // Replicas is the number of actual replicas. + Replicas int32 +} + +// StatefulSetList is a collection of StatefulSets. +type StatefulSetList struct { + metav1.TypeMeta + // +optional + metav1.ListMeta + Items []StatefulSet +} diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/conversion.go new file mode 100644 index 000000000..96d3330f8 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/conversion.go @@ -0,0 +1,297 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/pkg/apis/apps" + "k8s.io/client-go/pkg/apis/extensions" +) + +func addConversionFuncs(scheme *runtime.Scheme) error { + // Add non-generated conversion functions to handle the *int32 -> int32 + // conversion. A pointer is useful in the versioned type so we can default + // it, but a plain int32 is more convenient in the internal type. These + // functions are the same as the autogenerated ones in every other way. + err := scheme.AddConversionFuncs( + Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec, + Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec, + // extensions + // TODO: below conversions should be dropped in favor of auto-generated + // ones, see https://github.com/kubernetes/kubernetextensionsssues/39865 + Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus, + Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus, + Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec, + Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec, + Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy, + Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy, + Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment, + Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment, + ) + if err != nil { + return err + } + + // Add field label conversions for kinds having selectable nothing but ObjectMeta fields. + err = scheme.AddFieldLabelConversionFunc("apps/v1beta1", "StatefulSet", + func(label, value string) (string, string, error) { + switch label { + case "metadata.name", "metadata.namespace", "status.successful": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported for StatefulSet: %s", label) + } + }) + if err != nil { + return err + } + err = api.Scheme.AddFieldLabelConversionFunc("apps/v1beta1", "Deployment", + func(label, value string) (string, string, error) { + switch label { + case "metadata.name", "metadata.namespace": + return label, value, nil + default: + return "", "", fmt.Errorf("field label %q not supported for Deployment", label) + } + }) + if err != nil { + return err + } + + return nil +} + +func Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec, out *apps.StatefulSetSpec, s conversion.Scope) error { + if in.Replicas != nil { + out.Replicas = *in.Replicas + } + if in.Selector != nil { + in, out := &in.Selector, &out.Selector + *out = new(metav1.LabelSelector) + if err := s.Convert(*in, *out, 0); err != nil { + return err + } + } else { + out.Selector = nil + } + if err := s.Convert(&in.Template, &out.Template, 0); err != nil { + return err + } + if in.VolumeClaimTemplates != nil { + in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates + *out = make([]api.PersistentVolumeClaim, len(*in)) + for i := range *in { + if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil { + return err + } + } + } else { + out.VolumeClaimTemplates = nil + } + out.ServiceName = in.ServiceName + return nil +} + +func Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.StatefulSetSpec, out *StatefulSetSpec, s conversion.Scope) error { + out.Replicas = new(int32) + *out.Replicas = in.Replicas + if in.Selector != nil { + in, out := &in.Selector, &out.Selector + *out = new(metav1.LabelSelector) + if err := s.Convert(*in, *out, 0); err != nil { + return err + } + } else { + out.Selector = nil + } + if err := s.Convert(&in.Template, &out.Template, 0); err != nil { + return err + } + if in.VolumeClaimTemplates != nil { + in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates + *out = make([]v1.PersistentVolumeClaim, len(*in)) + for i := range *in { + if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil { + return err + } + } + } else { + out.VolumeClaimTemplates = nil + } + out.ServiceName = in.ServiceName + return nil +} + +func Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(in *extensions.ScaleStatus, out *ScaleStatus, s conversion.Scope) error { + out.Replicas = int32(in.Replicas) + + out.Selector = nil + out.TargetSelector = "" + if in.Selector != nil { + if in.Selector.MatchExpressions == nil || len(in.Selector.MatchExpressions) == 0 { + out.Selector = in.Selector.MatchLabels + } + + selector, err := metav1.LabelSelectorAsSelector(in.Selector) + if err != nil { + return fmt.Errorf("invalid label selector: %v", err) + } + out.TargetSelector = selector.String() + } + return nil +} + +func Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(in *ScaleStatus, out *extensions.ScaleStatus, s conversion.Scope) error { + out.Replicas = in.Replicas + + // Normally when 2 fields map to the same internal value we favor the old field, since + // old clients can't be expected to know about new fields but clients that know about the + // new field can be expected to know about the old field (though that's not quite true, due + // to kubectl apply). However, these fields are readonly, so any non-nil value should work. + if in.TargetSelector != "" { + labelSelector, err := metav1.ParseToLabelSelector(in.TargetSelector) + if err != nil { + out.Selector = nil + return fmt.Errorf("failed to parse target selector: %v", err) + } + out.Selector = labelSelector + } else if in.Selector != nil { + out.Selector = new(metav1.LabelSelector) + selector := make(map[string]string) + for key, val := range in.Selector { + selector[key] = val + } + out.Selector.MatchLabels = selector + } else { + out.Selector = nil + } + return nil +} + +func Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(in *DeploymentSpec, out *extensions.DeploymentSpec, s conversion.Scope) error { + if in.Replicas != nil { + out.Replicas = *in.Replicas + } + out.Selector = in.Selector + if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + if err := Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil { + return err + } + out.RevisionHistoryLimit = in.RevisionHistoryLimit + out.MinReadySeconds = in.MinReadySeconds + out.Paused = in.Paused + if in.RollbackTo != nil { + out.RollbackTo = new(extensions.RollbackConfig) + out.RollbackTo.Revision = in.RollbackTo.Revision + } else { + out.RollbackTo = nil + } + if in.ProgressDeadlineSeconds != nil { + out.ProgressDeadlineSeconds = new(int32) + *out.ProgressDeadlineSeconds = *in.ProgressDeadlineSeconds + } + return nil +} + +func Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(in *extensions.DeploymentSpec, out *DeploymentSpec, s conversion.Scope) error { + out.Replicas = &in.Replicas + out.Selector = in.Selector + if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + if err := Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil { + return err + } + if in.RevisionHistoryLimit != nil { + out.RevisionHistoryLimit = new(int32) + *out.RevisionHistoryLimit = int32(*in.RevisionHistoryLimit) + } + out.MinReadySeconds = int32(in.MinReadySeconds) + out.Paused = in.Paused + if in.RollbackTo != nil { + out.RollbackTo = new(RollbackConfig) + out.RollbackTo.Revision = int64(in.RollbackTo.Revision) + } else { + out.RollbackTo = nil + } + if in.ProgressDeadlineSeconds != nil { + out.ProgressDeadlineSeconds = new(int32) + *out.ProgressDeadlineSeconds = *in.ProgressDeadlineSeconds + } + return nil +} + +func Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(in *extensions.DeploymentStrategy, out *DeploymentStrategy, s conversion.Scope) error { + out.Type = DeploymentStrategyType(in.Type) + if in.RollingUpdate != nil { + out.RollingUpdate = new(RollingUpdateDeployment) + if err := Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(in.RollingUpdate, out.RollingUpdate, s); err != nil { + return err + } + } else { + out.RollingUpdate = nil + } + return nil +} + +func Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(in *DeploymentStrategy, out *extensions.DeploymentStrategy, s conversion.Scope) error { + out.Type = extensions.DeploymentStrategyType(in.Type) + if in.RollingUpdate != nil { + out.RollingUpdate = new(extensions.RollingUpdateDeployment) + if err := Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(in.RollingUpdate, out.RollingUpdate, s); err != nil { + return err + } + } else { + out.RollingUpdate = nil + } + return nil +} + +func Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(in *RollingUpdateDeployment, out *extensions.RollingUpdateDeployment, s conversion.Scope) error { + if err := s.Convert(in.MaxUnavailable, &out.MaxUnavailable, 0); err != nil { + return err + } + if err := s.Convert(in.MaxSurge, &out.MaxSurge, 0); err != nil { + return err + } + return nil +} + +func Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(in *extensions.RollingUpdateDeployment, out *RollingUpdateDeployment, s conversion.Scope) error { + if out.MaxUnavailable == nil { + out.MaxUnavailable = &intstr.IntOrString{} + } + if err := s.Convert(&in.MaxUnavailable, out.MaxUnavailable, 0); err != nil { + return err + } + if out.MaxSurge == nil { + out.MaxSurge = &intstr.IntOrString{} + } + if err := s.Convert(&in.MaxSurge, out.MaxSurge, 0); err != nil { + return err + } + return nil +} diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/defaults.go new file mode 100644 index 000000000..004cecd3f --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/defaults.go @@ -0,0 +1,103 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + RegisterDefaults(scheme) + return scheme.AddDefaultingFuncs( + SetDefaults_StatefulSet, + SetDefaults_Deployment, + ) +} + +func SetDefaults_StatefulSet(obj *StatefulSet) { + labels := obj.Spec.Template.Labels + if labels != nil { + if obj.Spec.Selector == nil { + obj.Spec.Selector = &metav1.LabelSelector{ + MatchLabels: labels, + } + } + if len(obj.Labels) == 0 { + obj.Labels = labels + } + } + if obj.Spec.Replicas == nil { + obj.Spec.Replicas = new(int32) + *obj.Spec.Replicas = 1 + } +} + +// SetDefaults_Deployment sets additional defaults compared to its counterpart +// in extensions. These addons are: +// - MaxUnavailable during rolling update set to 25% (1 in extensions) +// - MaxSurge value during rolling update set to 25% (1 in extensions) +// - RevisionHistoryLimit set to 2 (not set in extensions) +// - ProgressDeadlineSeconds set to 600s (not set in extensions) +func SetDefaults_Deployment(obj *Deployment) { + // Default labels and selector to labels from pod template spec. + labels := obj.Spec.Template.Labels + + if labels != nil { + if obj.Spec.Selector == nil { + obj.Spec.Selector = &metav1.LabelSelector{MatchLabels: labels} + } + if len(obj.Labels) == 0 { + obj.Labels = labels + } + } + // Set DeploymentSpec.Replicas to 1 if it is not set. + if obj.Spec.Replicas == nil { + obj.Spec.Replicas = new(int32) + *obj.Spec.Replicas = 1 + } + strategy := &obj.Spec.Strategy + // Set default DeploymentStrategyType as RollingUpdate. + if strategy.Type == "" { + strategy.Type = RollingUpdateDeploymentStrategyType + } + if strategy.Type == RollingUpdateDeploymentStrategyType { + if strategy.RollingUpdate == nil { + rollingUpdate := RollingUpdateDeployment{} + strategy.RollingUpdate = &rollingUpdate + } + if strategy.RollingUpdate.MaxUnavailable == nil { + // Set default MaxUnavailable as 25% by default. + maxUnavailable := intstr.FromString("25%") + strategy.RollingUpdate.MaxUnavailable = &maxUnavailable + } + if strategy.RollingUpdate.MaxSurge == nil { + // Set default MaxSurge as 25% by default. + maxSurge := intstr.FromString("25%") + strategy.RollingUpdate.MaxSurge = &maxSurge + } + } + if obj.Spec.RevisionHistoryLimit == nil { + obj.Spec.RevisionHistoryLimit = new(int32) + *obj.Spec.RevisionHistoryLimit = 2 + } + if obj.Spec.ProgressDeadlineSeconds == nil { + obj.Spec.ProgressDeadlineSeconds = new(int32) + *obj.Spec.ProgressDeadlineSeconds = 600 + } +} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/doc.go similarity index 93% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/generated_expansion.go rename to vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/doc.go index f30710029..a397b30e9 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1/generated_expansion.go +++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/doc.go @@ -15,5 +15,3 @@ limitations under the License. */ package v1beta1 - -type TokenReviewExpansion interface{} diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go new file mode 100644 index 000000000..3e215241b --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go @@ -0,0 +1,3939 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. +// source: k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto +// DO NOT EDIT! + +/* + Package v1beta1 is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto + + It has these top-level messages: + Deployment + DeploymentCondition + DeploymentList + DeploymentRollback + DeploymentSpec + DeploymentStatus + DeploymentStrategy + RollbackConfig + RollingUpdateDeployment + Scale + ScaleSpec + ScaleStatus + StatefulSet + StatefulSetList + StatefulSetSpec + StatefulSetStatus +*/ +package v1beta1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr" + +import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +const _ = proto.GoGoProtoPackageIsVersion1 + +func (m *Deployment) Reset() { *m = Deployment{} } +func (*Deployment) ProtoMessage() {} +func (*Deployment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } +func (*DeploymentCondition) ProtoMessage() {} +func (*DeploymentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func (m *DeploymentList) Reset() { *m = DeploymentList{} } +func (*DeploymentList) ProtoMessage() {} +func (*DeploymentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } + +func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} } +func (*DeploymentRollback) ProtoMessage() {} +func (*DeploymentRollback) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } + +func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } +func (*DeploymentSpec) ProtoMessage() {} +func (*DeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } + +func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } +func (*DeploymentStatus) ProtoMessage() {} +func (*DeploymentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + +func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } +func (*DeploymentStrategy) ProtoMessage() {} +func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } + +func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } +func (*RollbackConfig) ProtoMessage() {} +func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } + +func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } +func (*RollingUpdateDeployment) ProtoMessage() {} +func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } + +func (m *Scale) Reset() { *m = Scale{} } +func (*Scale) ProtoMessage() {} +func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } + +func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } +func (*ScaleSpec) ProtoMessage() {} +func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } + +func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } +func (*ScaleStatus) ProtoMessage() {} +func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } + +func (m *StatefulSet) Reset() { *m = StatefulSet{} } +func (*StatefulSet) ProtoMessage() {} +func (*StatefulSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } + +func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } +func (*StatefulSetList) ProtoMessage() {} +func (*StatefulSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } + +func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } +func (*StatefulSetSpec) ProtoMessage() {} +func (*StatefulSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } + +func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } +func (*StatefulSetStatus) ProtoMessage() {} +func (*StatefulSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } + +func init() { + proto.RegisterType((*Deployment)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.Deployment") + proto.RegisterType((*DeploymentCondition)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentCondition") + proto.RegisterType((*DeploymentList)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentList") + proto.RegisterType((*DeploymentRollback)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentRollback") + proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentSpec") + proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentStatus") + proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentStrategy") + proto.RegisterType((*RollbackConfig)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.RollbackConfig") + proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.RollingUpdateDeployment") + proto.RegisterType((*Scale)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.Scale") + proto.RegisterType((*ScaleSpec)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.ScaleSpec") + proto.RegisterType((*ScaleStatus)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.ScaleStatus") + proto.RegisterType((*StatefulSet)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.StatefulSet") + proto.RegisterType((*StatefulSetList)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.StatefulSetList") + proto.RegisterType((*StatefulSetSpec)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.StatefulSetSpec") + proto.RegisterType((*StatefulSetStatus)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.StatefulSetStatus") +} +func (m *Deployment) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Deployment) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n1, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n2, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n3, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + return i, nil +} + +func (m *DeploymentCondition) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeploymentCondition) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Status))) + i += copy(data[i:], m.Status) + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) + i += copy(data[i:], m.Reason) + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Message))) + i += copy(data[i:], m.Message) + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastUpdateTime.Size())) + n4, err := m.LastUpdateTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + data[i] = 0x3a + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) + n5, err := m.LastTransitionTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + return i, nil +} + +func (m *DeploymentList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeploymentList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n6, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *DeploymentRollback) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeploymentRollback) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + if len(m.UpdatedAnnotations) > 0 { + for k := range m.UpdatedAnnotations { + data[i] = 0x12 + i++ + v := m.UpdatedAnnotations[k] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.RollbackTo.Size())) + n7, err := m.RollbackTo.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + return i, nil +} + +func (m *DeploymentSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeploymentSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Replicas != nil { + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.Replicas)) + } + if m.Selector != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Selector.Size())) + n8, err := m.Selector.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n8 + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) + n9, err := m.Template.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Strategy.Size())) + n10, err := m.Strategy.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n10 + data[i] = 0x28 + i++ + i = encodeVarintGenerated(data, i, uint64(m.MinReadySeconds)) + if m.RevisionHistoryLimit != nil { + data[i] = 0x30 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.RevisionHistoryLimit)) + } + data[i] = 0x38 + i++ + if m.Paused { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + if m.RollbackTo != nil { + data[i] = 0x42 + i++ + i = encodeVarintGenerated(data, i, uint64(m.RollbackTo.Size())) + n11, err := m.RollbackTo.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.ProgressDeadlineSeconds != nil { + data[i] = 0x48 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.ProgressDeadlineSeconds)) + } + return i, nil +} + +func (m *DeploymentStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeploymentStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObservedGeneration)) + data[i] = 0x10 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Replicas)) + data[i] = 0x18 + i++ + i = encodeVarintGenerated(data, i, uint64(m.UpdatedReplicas)) + data[i] = 0x20 + i++ + i = encodeVarintGenerated(data, i, uint64(m.AvailableReplicas)) + data[i] = 0x28 + i++ + i = encodeVarintGenerated(data, i, uint64(m.UnavailableReplicas)) + if len(m.Conditions) > 0 { + for _, msg := range m.Conditions { + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + data[i] = 0x38 + i++ + i = encodeVarintGenerated(data, i, uint64(m.ReadyReplicas)) + return i, nil +} + +func (m *DeploymentStrategy) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeploymentStrategy) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + if m.RollingUpdate != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.RollingUpdate.Size())) + n12, err := m.RollingUpdate.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n12 + } + return i, nil +} + +func (m *RollbackConfig) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RollbackConfig) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Revision)) + return i, nil +} + +func (m *RollingUpdateDeployment) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RollingUpdateDeployment) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MaxUnavailable != nil { + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.MaxUnavailable.Size())) + n13, err := m.MaxUnavailable.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n13 + } + if m.MaxSurge != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.MaxSurge.Size())) + n14, err := m.MaxSurge.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n14 + } + return i, nil +} + +func (m *Scale) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Scale) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n15, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n15 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n16, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n16 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n17, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n17 + return i, nil +} + +func (m *ScaleSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ScaleSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Replicas)) + return i, nil +} + +func (m *ScaleStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ScaleStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Replicas)) + if len(m.Selector) > 0 { + for k := range m.Selector { + data[i] = 0x12 + i++ + v := m.Selector[k] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.TargetSelector))) + i += copy(data[i:], m.TargetSelector) + return i, nil +} + +func (m *StatefulSet) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *StatefulSet) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n18, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n18 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n19, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n19 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n20, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n20 + return i, nil +} + +func (m *StatefulSetList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *StatefulSetList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n21, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n21 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *StatefulSetSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *StatefulSetSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Replicas != nil { + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.Replicas)) + } + if m.Selector != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Selector.Size())) + n22, err := m.Selector.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n22 + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) + n23, err := m.Template.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n23 + if len(m.VolumeClaimTemplates) > 0 { + for _, msg := range m.VolumeClaimTemplates { + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ServiceName))) + i += copy(data[i:], m.ServiceName) + return i, nil +} + +func (m *StatefulSetStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *StatefulSetStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ObservedGeneration != nil { + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.ObservedGeneration)) + } + data[i] = 0x10 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Replicas)) + 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 *Deployment) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *DeploymentCondition) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Status) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + l = m.LastUpdateTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.LastTransitionTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *DeploymentList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *DeploymentRollback) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.UpdatedAnnotations) > 0 { + for k, v := range m.UpdatedAnnotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + l = m.RollbackTo.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *DeploymentSpec) Size() (n int) { + var l int + _ = l + if m.Replicas != nil { + n += 1 + sovGenerated(uint64(*m.Replicas)) + } + if m.Selector != nil { + l = m.Selector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = m.Template.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Strategy.Size() + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.MinReadySeconds)) + if m.RevisionHistoryLimit != nil { + n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit)) + } + n += 2 + if m.RollbackTo != nil { + l = m.RollbackTo.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ProgressDeadlineSeconds != nil { + n += 1 + sovGenerated(uint64(*m.ProgressDeadlineSeconds)) + } + return n +} + +func (m *DeploymentStatus) Size() (n int) { + var l int + _ = l + n += 1 + sovGenerated(uint64(m.ObservedGeneration)) + n += 1 + sovGenerated(uint64(m.Replicas)) + n += 1 + sovGenerated(uint64(m.UpdatedReplicas)) + n += 1 + sovGenerated(uint64(m.AvailableReplicas)) + n += 1 + sovGenerated(uint64(m.UnavailableReplicas)) + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + n += 1 + sovGenerated(uint64(m.ReadyReplicas)) + return n +} + +func (m *DeploymentStrategy) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + if m.RollingUpdate != nil { + l = m.RollingUpdate.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *RollbackConfig) Size() (n int) { + var l int + _ = l + n += 1 + sovGenerated(uint64(m.Revision)) + return n +} + +func (m *RollingUpdateDeployment) Size() (n int) { + var l int + _ = l + if m.MaxUnavailable != nil { + l = m.MaxUnavailable.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.MaxSurge != nil { + l = m.MaxSurge.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *Scale) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ScaleSpec) Size() (n int) { + var l int + _ = l + n += 1 + sovGenerated(uint64(m.Replicas)) + return n +} + +func (m *ScaleStatus) Size() (n int) { + var l int + _ = l + n += 1 + sovGenerated(uint64(m.Replicas)) + if len(m.Selector) > 0 { + for k, v := range m.Selector { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + l = len(m.TargetSelector) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *StatefulSet) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *StatefulSetList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *StatefulSetSpec) Size() (n int) { + var l int + _ = l + if m.Replicas != nil { + n += 1 + sovGenerated(uint64(*m.Replicas)) + } + if m.Selector != nil { + l = m.Selector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = m.Template.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.VolumeClaimTemplates) > 0 { + for _, e := range m.VolumeClaimTemplates { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.ServiceName) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *StatefulSetStatus) Size() (n int) { + var l int + _ = l + if m.ObservedGeneration != nil { + n += 1 + sovGenerated(uint64(*m.ObservedGeneration)) + } + n += 1 + sovGenerated(uint64(m.Replicas)) + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Deployment) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Deployment{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentSpec", "DeploymentSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeploymentStatus", "DeploymentStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeploymentCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeploymentCondition{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, + `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeploymentList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeploymentList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Deployment", "Deployment", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeploymentRollback) String() string { + if this == nil { + return "nil" + } + keysForUpdatedAnnotations := make([]string, 0, len(this.UpdatedAnnotations)) + for k := range this.UpdatedAnnotations { + keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations) + mapStringForUpdatedAnnotations := "map[string]string{" + for _, k := range keysForUpdatedAnnotations { + mapStringForUpdatedAnnotations += fmt.Sprintf("%v: %v,", k, this.UpdatedAnnotations[k]) + } + mapStringForUpdatedAnnotations += "}" + s := strings.Join([]string{`&DeploymentRollback{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `UpdatedAnnotations:` + mapStringForUpdatedAnnotations + `,`, + `RollbackTo:` + strings.Replace(strings.Replace(this.RollbackTo.String(), "RollbackConfig", "RollbackConfig", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeploymentSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeploymentSpec{`, + `Replicas:` + valueToStringGenerated(this.Replicas) + `,`, + `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, + `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`, + `Strategy:` + strings.Replace(strings.Replace(this.Strategy.String(), "DeploymentStrategy", "DeploymentStrategy", 1), `&`, ``, 1) + `,`, + `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`, + `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`, + `Paused:` + fmt.Sprintf("%v", this.Paused) + `,`, + `RollbackTo:` + strings.Replace(fmt.Sprintf("%v", this.RollbackTo), "RollbackConfig", "RollbackConfig", 1) + `,`, + `ProgressDeadlineSeconds:` + valueToStringGenerated(this.ProgressDeadlineSeconds) + `,`, + `}`, + }, "") + return s +} +func (this *DeploymentStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeploymentStatus{`, + `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, + `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, + `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`, + `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`, + `UnavailableReplicas:` + fmt.Sprintf("%v", this.UnavailableReplicas) + `,`, + `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "DeploymentCondition", "DeploymentCondition", 1), `&`, ``, 1) + `,`, + `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`, + `}`, + }, "") + return s +} +func (this *DeploymentStrategy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeploymentStrategy{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDeployment", "RollingUpdateDeployment", 1) + `,`, + `}`, + }, "") + return s +} +func (this *RollbackConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RollbackConfig{`, + `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`, + `}`, + }, "") + return s +} +func (this *RollingUpdateDeployment) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RollingUpdateDeployment{`, + `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`, + `MaxSurge:` + strings.Replace(fmt.Sprintf("%v", this.MaxSurge), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Scale) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Scale{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ScaleSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ScaleSpec{`, + `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, + `}`, + }, "") + return s +} +func (this *ScaleStatus) String() string { + if this == nil { + return "nil" + } + keysForSelector := make([]string, 0, len(this.Selector)) + for k := range this.Selector { + keysForSelector = append(keysForSelector, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForSelector) + mapStringForSelector := "map[string]string{" + for _, k := range keysForSelector { + mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k]) + } + mapStringForSelector += "}" + s := strings.Join([]string{`&ScaleStatus{`, + `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, + `Selector:` + mapStringForSelector + `,`, + `TargetSelector:` + fmt.Sprintf("%v", this.TargetSelector) + `,`, + `}`, + }, "") + return s +} +func (this *StatefulSet) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StatefulSet{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StatefulSetSpec", "StatefulSetSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StatefulSetStatus", "StatefulSetStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *StatefulSetList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StatefulSetList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StatefulSet", "StatefulSet", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *StatefulSetSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StatefulSetSpec{`, + `Replicas:` + valueToStringGenerated(this.Replicas) + `,`, + `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, + `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`, + `VolumeClaimTemplates:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeClaimTemplates), "PersistentVolumeClaim", "k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim", 1), `&`, ``, 1) + `,`, + `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`, + `}`, + }, "") + return s +} +func (this *StatefulSetStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StatefulSetStatus{`, + `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`, + `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Deployment) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Deployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Deployment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeploymentCondition) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeploymentCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeploymentCondition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = DeploymentConditionType(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastUpdateTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTransitionTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeploymentList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeploymentList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeploymentList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Deployment{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeploymentRollback) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeploymentRollback: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeploymentRollback: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAnnotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.UpdatedAnnotations == nil { + m.UpdatedAnnotations = make(map[string]string) + } + m.UpdatedAnnotations[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RollbackTo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RollbackTo.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeploymentSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeploymentSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeploymentSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Replicas = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Selector == nil { + m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} + } + if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Template.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Strategy.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType) + } + m.MinReadySeconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.MinReadySeconds |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.RevisionHistoryLimit = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Paused = bool(v != 0) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RollbackTo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RollbackTo == nil { + m.RollbackTo = &RollbackConfig{} + } + if err := m.RollbackTo.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProgressDeadlineSeconds", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ProgressDeadlineSeconds = &v + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeploymentStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeploymentStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeploymentStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) + } + m.ObservedGeneration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.ObservedGeneration |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) + } + m.Replicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Replicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType) + } + m.UpdatedReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.UpdatedReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType) + } + m.AvailableReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.AvailableReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnavailableReplicas", wireType) + } + m.UnavailableReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.UnavailableReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, DeploymentCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType) + } + m.ReadyReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.ReadyReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeploymentStrategy) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeploymentStrategy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeploymentStrategy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = DeploymentStrategyType(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RollingUpdate == nil { + m.RollingUpdate = &RollingUpdateDeployment{} + } + if err := m.RollingUpdate.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RollbackConfig) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RollbackConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RollbackConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) + } + m.Revision = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Revision |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RollingUpdateDeployment) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RollingUpdateDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RollingUpdateDeployment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MaxUnavailable == nil { + m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{} + } + if err := m.MaxUnavailable.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxSurge", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MaxSurge == nil { + m.MaxSurge = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{} + } + if err := m.MaxSurge.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Scale) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Scale: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Scale: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ScaleSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ScaleSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ScaleSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) + } + m.Replicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Replicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ScaleStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ScaleStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ScaleStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) + } + m.Replicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Replicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Selector == nil { + m.Selector = make(map[string]string) + } + m.Selector[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetSelector", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TargetSelector = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatefulSet) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatefulSet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatefulSet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatefulSetList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatefulSetList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatefulSetList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, StatefulSet{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatefulSetSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatefulSetSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatefulSetSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Replicas = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Selector == nil { + m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} + } + if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Template.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VolumeClaimTemplates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VolumeClaimTemplates = append(m.VolumeClaimTemplates, k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim{}) + if err := m.VolumeClaimTemplates[len(m.VolumeClaimTemplates)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatefulSetStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatefulSetStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatefulSetStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ObservedGeneration = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) + } + m.Replicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Replicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return 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") +) + +var fileDescriptorGenerated = []byte{ + // 1525 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe4, 0x58, 0xcb, 0x6f, 0x5b, 0xc5, + 0x17, 0xce, 0x4d, 0xec, 0xc4, 0x99, 0x34, 0x4e, 0x33, 0xc9, 0xaf, 0xf1, 0x2f, 0x45, 0x4e, 0xe5, + 0x45, 0x1f, 0xa8, 0xbd, 0xa6, 0x69, 0xa1, 0x8f, 0x40, 0x45, 0xdc, 0x96, 0x52, 0x94, 0xd0, 0x6a, + 0xec, 0x54, 0xb4, 0x14, 0x89, 0xb1, 0x3d, 0xbd, 0x9d, 0xfa, 0xbe, 0x74, 0x67, 0x6c, 0xc5, 0x3b, + 0x36, 0x2c, 0x90, 0x58, 0xb0, 0x62, 0x87, 0xd8, 0x23, 0x24, 0x76, 0xfc, 0x0d, 0x11, 0x6c, 0xba, + 0x44, 0x2c, 0x22, 0xe2, 0xfe, 0x17, 0x5d, 0xa1, 0x99, 0x3b, 0xf7, 0xe5, 0x6b, 0x27, 0x8e, 0x11, + 0xdd, 0xb0, 0xf3, 0x9d, 0x39, 0xdf, 0x77, 0xce, 0xcc, 0x7c, 0xe7, 0xcc, 0x19, 0x83, 0x6b, 0xad, + 0xeb, 0x4c, 0xa7, 0x4e, 0xb9, 0xd5, 0xae, 0x13, 0xcf, 0x26, 0x9c, 0xb0, 0xb2, 0xdb, 0x32, 0xca, + 0xd8, 0xa5, 0xac, 0x8c, 0x5d, 0x97, 0x95, 0x3b, 0x97, 0xeb, 0x84, 0xe3, 0xcb, 0x65, 0x83, 0xd8, + 0xc4, 0xc3, 0x9c, 0x34, 0x75, 0xd7, 0x73, 0xb8, 0x03, 0xcf, 0xf9, 0x40, 0x3d, 0x02, 0xea, 0x6e, + 0xcb, 0xd0, 0x05, 0x50, 0x17, 0x40, 0x5d, 0x01, 0x57, 0x2f, 0x19, 0x94, 0x3f, 0x6f, 0xd7, 0xf5, + 0x86, 0x63, 0x95, 0x0d, 0xc7, 0x70, 0xca, 0x12, 0x5f, 0x6f, 0x3f, 0x93, 0x5f, 0xf2, 0x43, 0xfe, + 0xf2, 0x79, 0x57, 0xaf, 0xaa, 0x80, 0xb0, 0x4b, 0x2d, 0xdc, 0x78, 0x4e, 0x6d, 0xe2, 0x75, 0xa3, + 0x90, 0x2c, 0xc2, 0x71, 0xb9, 0x93, 0x8a, 0x66, 0xb5, 0x3c, 0x0c, 0xe5, 0xb5, 0x6d, 0x4e, 0x2d, + 0x92, 0x02, 0xbc, 0x77, 0x14, 0x80, 0x35, 0x9e, 0x13, 0x0b, 0xa7, 0x70, 0x57, 0x86, 0xe1, 0xda, + 0x9c, 0x9a, 0x65, 0x6a, 0x73, 0xc6, 0xbd, 0x14, 0x28, 0xb6, 0x26, 0x46, 0xbc, 0x0e, 0xf1, 0xa2, + 0x05, 0x91, 0x5d, 0x6c, 0xb9, 0x26, 0x19, 0xb4, 0xa6, 0x8b, 0x43, 0x8f, 0x66, 0x90, 0xf5, 0x07, + 0x87, 0x1c, 0x24, 0xd9, 0xe5, 0xc4, 0x66, 0xd4, 0xb1, 0x87, 0x1e, 0x67, 0xe9, 0xe7, 0x49, 0x00, + 0xee, 0x10, 0xd7, 0x74, 0xba, 0x16, 0xb1, 0x39, 0xfc, 0x12, 0xe4, 0xc4, 0x56, 0x37, 0x31, 0xc7, + 0x05, 0xed, 0x8c, 0x76, 0x7e, 0x6e, 0xfd, 0x1d, 0x5d, 0x1d, 0x78, 0x7c, 0xe5, 0xd1, 0x91, 0x0b, + 0x6b, 0xbd, 0x73, 0x59, 0x7f, 0x50, 0x7f, 0x41, 0x1a, 0x7c, 0x9b, 0x70, 0x5c, 0x81, 0x7b, 0xfb, + 0x6b, 0x13, 0xbd, 0xfd, 0x35, 0x10, 0x8d, 0xa1, 0x90, 0x15, 0x3e, 0x06, 0x19, 0xe6, 0x92, 0x46, + 0x61, 0x52, 0xb2, 0x5f, 0xd3, 0x47, 0x94, 0x93, 0x1e, 0x05, 0x59, 0x75, 0x49, 0xa3, 0x72, 0x42, + 0x39, 0xc9, 0x88, 0x2f, 0x24, 0x29, 0x21, 0x06, 0xd3, 0x8c, 0x63, 0xde, 0x66, 0x85, 0x29, 0x49, + 0x7e, 0x63, 0x1c, 0x72, 0x49, 0x50, 0xc9, 0x2b, 0xfa, 0x69, 0xff, 0x1b, 0x29, 0xe2, 0xd2, 0xc1, + 0x14, 0x58, 0x8a, 0x8c, 0x6f, 0x3b, 0x76, 0x93, 0x72, 0xea, 0xd8, 0x70, 0x03, 0x64, 0x78, 0xd7, + 0x25, 0x72, 0xcf, 0x66, 0x2b, 0xe7, 0x82, 0xe0, 0x6a, 0x5d, 0x97, 0xbc, 0xde, 0x5f, 0x5b, 0x19, + 0x00, 0x11, 0x53, 0x48, 0x82, 0xe0, 0xa3, 0x30, 0xee, 0x49, 0x09, 0xbf, 0x95, 0x74, 0xfe, 0x7a, + 0x7f, 0xed, 0x50, 0x49, 0xe8, 0x21, 0x67, 0x32, 0x58, 0x78, 0x16, 0x4c, 0x7b, 0x04, 0x33, 0xc7, + 0x2e, 0x64, 0x24, 0x6f, 0xb8, 0x28, 0x24, 0x47, 0x91, 0x9a, 0x85, 0x17, 0xc0, 0x8c, 0x45, 0x18, + 0xc3, 0x06, 0x29, 0x64, 0xa5, 0xe1, 0x82, 0x32, 0x9c, 0xd9, 0xf6, 0x87, 0x51, 0x30, 0x0f, 0x5f, + 0x80, 0xbc, 0x89, 0x19, 0xdf, 0x71, 0x9b, 0x98, 0x93, 0x1a, 0xb5, 0x48, 0x61, 0x5a, 0x6e, 0xf5, + 0xdb, 0xa3, 0xa9, 0x44, 0x20, 0x2a, 0xa7, 0x14, 0x7b, 0x7e, 0x2b, 0xc1, 0x84, 0xfa, 0x98, 0x61, + 0x07, 0x40, 0x31, 0x52, 0xf3, 0xb0, 0xcd, 0xfc, 0x2d, 0x13, 0xfe, 0x66, 0x8e, 0xed, 0x6f, 0x55, + 0xf9, 0x83, 0x5b, 0x29, 0x36, 0x34, 0xc0, 0x43, 0x69, 0x4f, 0x03, 0xf9, 0xe8, 0xc0, 0xb6, 0x28, + 0xe3, 0xf0, 0x69, 0x2a, 0x2d, 0xf4, 0xd1, 0x02, 0x10, 0x68, 0x99, 0x14, 0x27, 0x55, 0x10, 0xb9, + 0x60, 0x24, 0x96, 0x12, 0x9f, 0x81, 0x2c, 0xe5, 0xc4, 0x12, 0xc7, 0x3f, 0x75, 0x7e, 0x6e, 0xfd, + 0xca, 0x18, 0xb2, 0xad, 0xcc, 0x2b, 0xfe, 0xec, 0x7d, 0xc1, 0x84, 0x7c, 0xc2, 0xd2, 0xb7, 0x53, + 0x00, 0x46, 0x46, 0xc8, 0x31, 0xcd, 0x3a, 0x6e, 0xb4, 0xe0, 0x19, 0x90, 0xb1, 0xb1, 0x15, 0xa8, + 0x35, 0x4c, 0xa5, 0x4f, 0xb1, 0x45, 0x90, 0x9c, 0x81, 0x3f, 0x6a, 0x00, 0xb6, 0xe5, 0x51, 0x34, + 0x37, 0x6d, 0xdb, 0xe1, 0x58, 0xec, 0x4e, 0x10, 0x60, 0x75, 0x8c, 0x00, 0x03, 0xdf, 0xfa, 0x4e, + 0x8a, 0xf5, 0xae, 0xcd, 0xbd, 0x6e, 0x74, 0x4a, 0x69, 0x03, 0x34, 0x20, 0x14, 0xd8, 0x02, 0xc0, + 0x53, 0x9c, 0x35, 0x47, 0x25, 0xfc, 0xe8, 0xd5, 0x24, 0x08, 0xe7, 0xb6, 0x63, 0x3f, 0xa3, 0x46, + 0x54, 0xb2, 0x50, 0x48, 0x89, 0x62, 0xf4, 0xab, 0x77, 0xc1, 0xca, 0x90, 0xb8, 0xe1, 0x49, 0x30, + 0xd5, 0x22, 0x5d, 0x7f, 0x2b, 0x91, 0xf8, 0x09, 0x97, 0x41, 0xb6, 0x83, 0xcd, 0x36, 0xf1, 0xb3, + 0x19, 0xf9, 0x1f, 0x37, 0x27, 0xaf, 0x6b, 0xa5, 0x3f, 0xb3, 0x71, 0x65, 0x89, 0xca, 0x05, 0xcf, + 0x83, 0x9c, 0x47, 0x5c, 0x93, 0x36, 0x30, 0x93, 0x1c, 0xd9, 0xca, 0x09, 0xa1, 0x12, 0xa4, 0xc6, + 0x50, 0x38, 0x0b, 0xbf, 0x00, 0x39, 0x46, 0x4c, 0xd2, 0xe0, 0x8e, 0xa7, 0x8a, 0xe7, 0x95, 0x11, + 0x35, 0x88, 0xeb, 0xc4, 0xac, 0x2a, 0xa8, 0x4f, 0x1f, 0x7c, 0xa1, 0x90, 0x12, 0x7e, 0x0e, 0x72, + 0x9c, 0x58, 0xae, 0x89, 0x39, 0x51, 0xbb, 0x79, 0x69, 0xf8, 0x6e, 0x0a, 0xda, 0x87, 0x4e, 0xb3, + 0xa6, 0x00, 0xb2, 0x22, 0x87, 0x0a, 0x0f, 0x46, 0x51, 0x48, 0x08, 0x29, 0xc8, 0x31, 0x2e, 0xae, + 0x1d, 0xa3, 0x2b, 0x6b, 0xd1, 0xdc, 0xfa, 0xc6, 0x58, 0xb5, 0xd9, 0xa7, 0x88, 0x5c, 0x05, 0x23, + 0x28, 0xa4, 0x87, 0x9b, 0x60, 0xc1, 0xa2, 0x36, 0x22, 0xb8, 0xd9, 0xad, 0x92, 0x86, 0x63, 0x37, + 0x99, 0x2c, 0x6a, 0xd9, 0xca, 0x8a, 0x02, 0x2d, 0x6c, 0x27, 0xa7, 0x51, 0xbf, 0x3d, 0xdc, 0x02, + 0xcb, 0x1e, 0xe9, 0x50, 0x71, 0x71, 0x7e, 0x4c, 0x19, 0x77, 0xbc, 0xee, 0x16, 0xb5, 0x28, 0x97, + 0xa5, 0x2e, 0x5b, 0x29, 0xf4, 0xf6, 0xd7, 0x96, 0xd1, 0x80, 0x79, 0x34, 0x10, 0x25, 0xaa, 0xb0, + 0x8b, 0xdb, 0x8c, 0x34, 0x65, 0xe9, 0xca, 0x45, 0x55, 0xf8, 0xa1, 0x1c, 0x45, 0x6a, 0x16, 0x1a, + 0x09, 0x41, 0xe7, 0xfe, 0x99, 0xa0, 0xf3, 0xc3, 0xc5, 0x0c, 0x77, 0xc0, 0x8a, 0xeb, 0x39, 0x86, + 0x47, 0x18, 0xbb, 0x43, 0x70, 0xd3, 0xa4, 0x36, 0x09, 0x76, 0x6a, 0x56, 0xae, 0xf0, 0x74, 0x6f, + 0x7f, 0x6d, 0xe5, 0xe1, 0x60, 0x13, 0x34, 0x0c, 0x5b, 0xfa, 0x3e, 0x03, 0x4e, 0xf6, 0xdf, 0xa3, + 0xf0, 0x13, 0x00, 0x9d, 0xba, 0xec, 0x7d, 0x9a, 0xf7, 0xfc, 0xce, 0x83, 0x3a, 0xb6, 0x14, 0xfa, + 0x54, 0x94, 0xf1, 0x0f, 0x52, 0x16, 0x68, 0x00, 0x0a, 0x5e, 0x8c, 0xa5, 0xca, 0xa4, 0x0c, 0x34, + 0xd4, 0xc1, 0x80, 0x74, 0xd9, 0x04, 0x0b, 0xaa, 0x6a, 0x04, 0x93, 0x52, 0xd6, 0x31, 0x1d, 0xec, + 0x24, 0xa7, 0x51, 0xbf, 0x3d, 0xbc, 0x07, 0x16, 0x71, 0x07, 0x53, 0x13, 0xd7, 0x4d, 0x12, 0x92, + 0x64, 0x24, 0xc9, 0xff, 0x15, 0xc9, 0xe2, 0x66, 0xbf, 0x01, 0x4a, 0x63, 0xe0, 0x36, 0x58, 0x6a, + 0xdb, 0x69, 0x2a, 0x5f, 0x97, 0xa7, 0x15, 0xd5, 0xd2, 0x4e, 0xda, 0x04, 0x0d, 0xc2, 0x41, 0x17, + 0x80, 0x46, 0x70, 0xe5, 0xb3, 0xc2, 0xb4, 0xac, 0xc9, 0xef, 0x8f, 0x91, 0x4f, 0x61, 0xdf, 0x10, + 0xd5, 0xbf, 0x70, 0x88, 0xa1, 0x98, 0x0f, 0xb8, 0x01, 0xe6, 0x3d, 0x91, 0x21, 0x61, 0xe8, 0x33, + 0x32, 0xf4, 0xff, 0x29, 0xd8, 0x3c, 0x8a, 0x4f, 0xa2, 0xa4, 0x6d, 0xe9, 0x77, 0x2d, 0x7e, 0x09, + 0x05, 0x29, 0x0b, 0x6f, 0x26, 0x5a, 0xa6, 0xb3, 0x7d, 0x2d, 0xd3, 0xa9, 0x34, 0x22, 0xd6, 0x31, + 0x75, 0xc1, 0xbc, 0x10, 0x34, 0xb5, 0x0d, 0xff, 0x10, 0x55, 0x41, 0xfc, 0xf0, 0x58, 0xe9, 0x12, + 0xa2, 0x63, 0xd7, 0xe8, 0xa2, 0x5c, 0x4d, 0x7c, 0x12, 0x25, 0x3d, 0x95, 0x6e, 0x81, 0x7c, 0x32, + 0xd7, 0x7c, 0x5d, 0xfa, 0x89, 0xaf, 0x94, 0x1d, 0xd3, 0xa5, 0x3f, 0x8e, 0x42, 0x8b, 0xd2, 0x2b, + 0x0d, 0xac, 0x0c, 0xf1, 0x0e, 0x4d, 0x90, 0xb7, 0xf0, 0x6e, 0x4c, 0x07, 0x47, 0xf6, 0xe0, 0xe2, + 0xf5, 0xa1, 0xfb, 0xaf, 0x0f, 0xfd, 0xbe, 0xcd, 0x1f, 0x78, 0x55, 0xee, 0x51, 0xdb, 0xa8, 0x40, + 0xd1, 0x5f, 0x6d, 0x27, 0xb8, 0x50, 0x1f, 0x37, 0x7c, 0x02, 0x72, 0x16, 0xde, 0xad, 0xb6, 0x3d, + 0x23, 0xd8, 0xbf, 0xe3, 0xfb, 0x91, 0xb7, 0xc9, 0xb6, 0x62, 0x41, 0x21, 0x5f, 0xe9, 0x87, 0x49, + 0x90, 0xad, 0x36, 0xb0, 0x49, 0xde, 0xc0, 0x8b, 0xa2, 0x96, 0x78, 0x51, 0xac, 0x8f, 0xac, 0x01, + 0x19, 0xdf, 0xd0, 0xc7, 0xc4, 0xd3, 0xbe, 0xc7, 0xc4, 0xd5, 0x63, 0xf2, 0x1e, 0xfe, 0x8e, 0xb8, + 0x01, 0x66, 0x43, 0xf7, 0x89, 0xc2, 0xa6, 0x1d, 0x55, 0xd8, 0x4a, 0x3f, 0x4d, 0x82, 0xb9, 0x98, + 0x8b, 0xe3, 0xa1, 0xa1, 0x9b, 0xe8, 0x22, 0x44, 0xe5, 0xa8, 0x8c, 0xb3, 0x30, 0x3d, 0xe8, 0x20, + 0xfc, 0xe6, 0x2d, 0xba, 0x90, 0xd3, 0x8d, 0xc5, 0x2d, 0x90, 0xe7, 0xd8, 0x33, 0x08, 0x0f, 0xe6, + 0xe4, 0x86, 0xce, 0x46, 0xcf, 0x80, 0x5a, 0x62, 0x16, 0xf5, 0x59, 0xaf, 0x6e, 0x80, 0xf9, 0x84, + 0xb3, 0x63, 0x75, 0x5c, 0xbf, 0x88, 0xcd, 0xe2, 0x98, 0x93, 0x67, 0x6d, 0xb3, 0x4a, 0xde, 0xc4, + 0xfb, 0xf6, 0x49, 0x42, 0x8d, 0xd7, 0x47, 0xdf, 0xdc, 0x28, 0xca, 0xa1, 0x9a, 0xac, 0xf7, 0x69, + 0xf2, 0xe6, 0x58, 0xec, 0x87, 0x2b, 0xf3, 0x37, 0x0d, 0x2c, 0xc4, 0xac, 0xdf, 0xc0, 0xf3, 0xe7, + 0x71, 0xf2, 0xf9, 0x73, 0x75, 0x9c, 0x45, 0x0d, 0x79, 0xff, 0xfc, 0x3a, 0x95, 0x58, 0xcc, 0x7f, + 0xa8, 0xe3, 0xfe, 0x5a, 0x03, 0xcb, 0x1d, 0xc7, 0x6c, 0x5b, 0xe4, 0xb6, 0x89, 0xa9, 0x15, 0x58, + 0x88, 0xfe, 0xe5, 0x88, 0x37, 0xa6, 0xf4, 0x44, 0x3c, 0x46, 0x19, 0x27, 0x36, 0x7f, 0x14, 0x71, + 0x54, 0xde, 0x52, 0xfe, 0x96, 0x1f, 0x0d, 0x20, 0x46, 0x03, 0xdd, 0xc1, 0x77, 0xc1, 0x9c, 0x68, + 0xe4, 0x68, 0x83, 0x88, 0xd7, 0xa5, 0xfa, 0x7f, 0x61, 0x49, 0x11, 0xcd, 0x55, 0xa3, 0x29, 0x14, + 0xb7, 0x2b, 0x7d, 0xa3, 0x81, 0xc5, 0x94, 0x66, 0xe1, 0x47, 0x87, 0x74, 0x93, 0xa7, 0xfe, 0xad, + 0x4e, 0xb2, 0x72, 0x61, 0xef, 0xa0, 0x38, 0xf1, 0xf2, 0xa0, 0x38, 0xf1, 0xc7, 0x41, 0x71, 0xe2, + 0xab, 0x5e, 0x51, 0xdb, 0xeb, 0x15, 0xb5, 0x97, 0xbd, 0xa2, 0xf6, 0x57, 0xaf, 0xa8, 0x7d, 0xf7, + 0xaa, 0x38, 0xf1, 0x64, 0x46, 0x29, 0xf2, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd6, 0xb9, 0xde, + 0x1a, 0x56, 0x15, 0x00, 0x00, +} diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto new file mode 100644 index 000000000..8ca77b2e6 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto @@ -0,0 +1,342 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.kubernetes.pkg.apis.apps.v1beta1; + +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1beta1"; + +// Deployment enables declarative updates for Pods and ReplicaSets. +message Deployment { + // Standard object metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the desired behavior of the Deployment. + // +optional + optional DeploymentSpec spec = 2; + + // Most recently observed status of the Deployment. + // +optional + optional DeploymentStatus status = 3; +} + +// DeploymentCondition describes the state of a deployment at a certain point. +message DeploymentCondition { + // Type of deployment condition. + optional string type = 1; + + // Status of the condition, one of True, False, Unknown. + optional string status = 2; + + // The last time this condition was updated. + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6; + + // Last time the condition transitioned from one status to another. + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7; + + // The reason for the condition's last transition. + optional string reason = 4; + + // A human readable message indicating details about the transition. + optional string message = 5; +} + +// DeploymentList is a list of Deployments. +message DeploymentList { + // Standard list metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of Deployments. + repeated Deployment items = 2; +} + +// DeploymentRollback stores the information required to rollback a deployment. +message DeploymentRollback { + // Required: This must match the Name of a deployment. + optional string name = 1; + + // The annotations to be updated to a deployment + // +optional + map updatedAnnotations = 2; + + // The config of this deployment rollback. + optional RollbackConfig rollbackTo = 3; +} + +// DeploymentSpec is the specification of the desired behavior of the Deployment. +message DeploymentSpec { + // Number of desired pods. This is a pointer to distinguish between explicit + // zero and not specified. Defaults to 1. + // +optional + optional int32 replicas = 1; + + // Label selector for pods. Existing ReplicaSets whose pods are + // selected by this will be the ones affected by this deployment. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; + + // Template describes the pods that will be created. + optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3; + + // The deployment strategy to use to replace existing pods with new ones. + // +optional + optional DeploymentStrategy strategy = 4; + + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + // +optional + optional int32 minReadySeconds = 5; + + // The number of old ReplicaSets to retain to allow rollback. + // This is a pointer to distinguish between explicit zero and not specified. + // Defaults to 2. + // +optional + optional int32 revisionHistoryLimit = 6; + + // Indicates that the deployment is paused. + // +optional + optional bool paused = 7; + + // The config this deployment is rolling back to. Will be cleared after rollback is done. + // +optional + optional RollbackConfig rollbackTo = 8; + + // The maximum time in seconds for a deployment to make progress before it + // is considered to be failed. The deployment controller will continue to + // process failed deployments and a condition with a ProgressDeadlineExceeded + // reason will be surfaced in the deployment status. Once autoRollback is + // implemented, the deployment controller will automatically rollback failed + // deployments. Note that progress will not be estimated during the time a + // deployment is paused. Defaults to 600s. + optional int32 progressDeadlineSeconds = 9; +} + +// DeploymentStatus is the most recently observed status of the Deployment. +message DeploymentStatus { + // The generation observed by the deployment controller. + // +optional + optional int64 observedGeneration = 1; + + // Total number of non-terminated pods targeted by this deployment (their labels match the selector). + // +optional + optional int32 replicas = 2; + + // Total number of non-terminated pods targeted by this deployment that have the desired template spec. + // +optional + optional int32 updatedReplicas = 3; + + // Total number of ready pods targeted by this deployment. + // +optional + optional int32 readyReplicas = 7; + + // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. + // +optional + optional int32 availableReplicas = 4; + + // Total number of unavailable pods targeted by this deployment. + // +optional + optional int32 unavailableReplicas = 5; + + // Represents the latest available observations of a deployment's current state. + repeated DeploymentCondition conditions = 6; +} + +// DeploymentStrategy describes how to replace existing pods with new ones. +message DeploymentStrategy { + // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. + // +optional + optional string type = 1; + + // Rolling update config params. Present only if DeploymentStrategyType = + // RollingUpdate. + // --- + // TODO: Update this to follow our convention for oneOf, whatever we decide it + // to be. + // +optional + optional RollingUpdateDeployment rollingUpdate = 2; +} + +message RollbackConfig { + // The revision to rollback to. If set to 0, rollbck to the last revision. + // +optional + optional int64 revision = 1; +} + +// Spec to control the desired behavior of rolling update. +message RollingUpdateDeployment { + // The maximum number of pods that can be unavailable during the update. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // Absolute number is calculated from percentage by rounding down. + // This can not be 0 if MaxSurge is 0. + // Defaults to 25%. + // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods + // immediately when the rolling update starts. Once new pods are ready, old RC + // can be scaled down further, followed by scaling up the new RC, ensuring + // that the total number of pods available at all times during the update is at + // least 70% of desired pods. + // +optional + optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1; + + // The maximum number of pods that can be scheduled above the desired number of + // pods. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // This can not be 0 if MaxUnavailable is 0. + // Absolute number is calculated from percentage by rounding up. + // Defaults to 25%. + // Example: when this is set to 30%, the new RC can be scaled up immediately when + // the rolling update starts, such that the total number of old and new pods do not exceed + // 130% of desired pods. Once old pods have been killed, + // new RC can be scaled up further, ensuring that total number of pods running + // at any time during the update is atmost 130% of desired pods. + // +optional + optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2; +} + +// Scale represents a scaling request for a resource. +message Scale { + // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + // +optional + optional ScaleSpec spec = 2; + + // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only. + // +optional + optional ScaleStatus status = 3; +} + +// ScaleSpec describes the attributes of a scale subresource +message ScaleSpec { + // desired number of instances for the scaled object. + // +optional + optional int32 replicas = 1; +} + +// ScaleStatus represents the current status of a scale subresource. +message ScaleStatus { + // actual number of observed instances of the scaled object. + optional int32 replicas = 1; + + // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + map selector = 2; + + // label selector for pods that should match the replicas count. This is a serializated + // version of both map-based and more expressive set-based selectors. This is done to + // avoid introspection in the clients. The string will be in the same format as the + // query-param syntax. If the target type only supports map-based selectors, both this + // field and map-based selector field are populated. + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + optional string targetSelector = 3; +} + +// StatefulSet represents a set of pods with consistent identities. +// Identities are defined as: +// - Network: A single stable DNS and hostname. +// - Storage: As many VolumeClaims as requested. +// The StatefulSet guarantees that a given network identity will always +// map to the same storage identity. +message StatefulSet { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec defines the desired identities of pods in this set. + // +optional + optional StatefulSetSpec spec = 2; + + // Status is the current status of Pods in this StatefulSet. This data + // may be out of date by some window of time. + // +optional + optional StatefulSetStatus status = 3; +} + +// StatefulSetList is a collection of StatefulSets. +message StatefulSetList { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + repeated StatefulSet items = 2; +} + +// A StatefulSetSpec is the specification of a StatefulSet. +message StatefulSetSpec { + // Replicas is the desired number of replicas of the given Template. + // These are replicas in the sense that they are instantiations of the + // same Template, but individual replicas also have a consistent identity. + // If unspecified, defaults to 1. + // TODO: Consider a rename of this field. + // +optional + optional int32 replicas = 1; + + // Selector is a label query over pods that should match the replica count. + // If empty, defaulted to labels on the pod template. + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; + + // Template is the object that describes the pod that will be created if + // insufficient replicas are detected. Each pod stamped out by the StatefulSet + // will fulfill this Template, but have a unique identity from the rest + // of the StatefulSet. + optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3; + + // VolumeClaimTemplates is a list of claims that pods are allowed to reference. + // The StatefulSet controller is responsible for mapping network identities to + // claims in a way that maintains the identity of a pod. Every claim in + // this list must have at least one matching (by name) volumeMount in one + // container in the template. A claim in this list takes precedence over + // any volumes in the template, with the same name. + // TODO: Define the behavior if a claim already exists with the same name. + // +optional + repeated k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaim volumeClaimTemplates = 4; + + // ServiceName is the name of the service that governs this StatefulSet. + // This service must exist before the StatefulSet, and is responsible for + // the network identity of the set. Pods get DNS/hostnames that follow the + // pattern: pod-specific-string.serviceName.default.svc.cluster.local + // where "pod-specific-string" is managed by the StatefulSet controller. + optional string serviceName = 5; +} + +// StatefulSetStatus represents the current state of a StatefulSet. +message StatefulSetStatus { + // most recent generation observed by this StatefulSet. + // +optional + optional int64 observedGeneration = 1; + + // Replicas is the number of actual replicas. + optional int32 replicas = 2; +} + diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/register.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/register.go similarity index 63% rename from vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/register.go rename to vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/register.go index 9a6bb3803..6e618e1d8 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/register.go @@ -14,20 +14,24 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/runtime" - versionedwatch "k8s.io/client-go/1.5/pkg/watch/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "apps" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs) @@ -37,14 +41,13 @@ var ( // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &PetSet{}, - &PetSetList{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, + &Deployment{}, + &DeploymentList{}, + &DeploymentRollback{}, + &Scale{}, + &StatefulSet{}, + &StatefulSetList{}, ) - versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } - -func (obj *PetSet) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } -func (obj *PetSetList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go new file mode 100644 index 000000000..409504120 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go @@ -0,0 +1,6485 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1beta1 + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg4_resource "k8s.io/apimachinery/pkg/api/resource" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + pkg5_intstr "k8s.io/apimachinery/pkg/util/intstr" + pkg3_v1 "k8s.io/client-go/pkg/api/v1" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81234 = 1 + codecSelferC_RAW1234 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1234 = 10 + codecSelferValueTypeMap1234 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1234 = 2 + codecSelfer_containerMapValue1234 = 3 + codecSelfer_containerMapEnd1234 = 4 + codecSelfer_containerArrayElem1234 = 6 + codecSelfer_containerArrayEnd1234 = 7 +) + +var ( + codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1234 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg4_resource.Quantity + var v1 pkg1_v1.TypeMeta + var v2 pkg2_types.UID + var v3 pkg5_intstr.IntOrString + var v4 pkg3_v1.PodTemplateSpec + var v5 time.Time + _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 + } +} + +func (x *ScaleSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [1]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Replicas != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(1) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ScaleSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ScaleSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "replicas": + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv4 := &x.Replicas + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ScaleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv7 := &x.Replicas + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*int32)(yyv7)) = int32(r.DecodeInt(32)) + } + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj6-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ScaleStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = len(x.Selector) != 0 + yyq2[2] = x.TargetSelector != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Selector == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + z.F.EncMapStringStringV(x.Selector, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("selector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Selector == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + z.F.EncMapStringStringV(x.Selector, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.TargetSelector)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("targetSelector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.TargetSelector)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ScaleStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ScaleStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "replicas": + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv4 := &x.Replicas + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } + } + case "selector": + if r.TryDecodeAsNil() { + x.Selector = nil + } else { + yyv6 := &x.Selector + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + z.F.DecMapStringStringX(yyv6, false, d) + } + } + case "targetSelector": + if r.TryDecodeAsNil() { + x.TargetSelector = "" + } else { + yyv8 := &x.TargetSelector + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ScaleStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv11 := &x.Replicas + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*int32)(yyv11)) = int32(r.DecodeInt(32)) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Selector = nil + } else { + yyv13 := &x.Selector + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + z.F.DecMapStringStringX(yyv13, false, d) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TargetSelector = "" + } else { + yyv15 := &x.TargetSelector + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Scale) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = ScaleSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = ScaleStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = ScaleSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = ScaleStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *StatefulSet) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *StatefulSet) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *StatefulSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = StatefulSetSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = StatefulSetStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = StatefulSetSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = StatefulSetStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Replicas != nil + yyq2[1] = x.Selector != nil + yyq2[3] = len(x.VolumeClaimTemplates) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.Replicas == nil { + r.EncodeNil() + } else { + yy4 := *x.Replicas + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(yy4)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Replicas == nil { + r.EncodeNil() + } else { + yy6 := *x.Replicas + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeInt(int64(yy6)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Selector == nil { + r.EncodeNil() + } else { + yym9 := z.EncBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.EncExt(x.Selector) { + } else { + z.EncFallback(x.Selector) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("selector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Selector == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else if z.HasExtensions() && z.EncExt(x.Selector) { + } else { + z.EncFallback(x.Selector) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy12 := &x.Template + yy12.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("template")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy14 := &x.Template + yy14.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.VolumeClaimTemplates == nil { + r.EncodeNil() + } else { + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + h.encSlicev1_PersistentVolumeClaim(([]pkg3_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("volumeClaimTemplates")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.VolumeClaimTemplates == nil { + r.EncodeNil() + } else { + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + h.encSlicev1_PersistentVolumeClaim(([]pkg3_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("serviceName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym21 := z.EncBinary() + _ = yym21 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *StatefulSetSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "replicas": + if r.TryDecodeAsNil() { + if x.Replicas != nil { + x.Replicas = nil + } + } else { + if x.Replicas == nil { + x.Replicas = new(int32) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) + } + } + case "selector": + if r.TryDecodeAsNil() { + if x.Selector != nil { + x.Selector = nil + } + } else { + if x.Selector == nil { + x.Selector = new(pkg1_v1.LabelSelector) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(x.Selector) { + } else { + z.DecFallback(x.Selector, false) + } + } + case "template": + if r.TryDecodeAsNil() { + x.Template = pkg3_v1.PodTemplateSpec{} + } else { + yyv8 := &x.Template + yyv8.CodecDecodeSelf(d) + } + case "volumeClaimTemplates": + if r.TryDecodeAsNil() { + x.VolumeClaimTemplates = nil + } else { + yyv9 := &x.VolumeClaimTemplates + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv9), d) + } + } + case "serviceName": + if r.TryDecodeAsNil() { + x.ServiceName = "" + } else { + yyv11 := &x.ServiceName + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var 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.Replicas != nil { + x.Replicas = nil + } + } else { + if x.Replicas == nil { + x.Replicas = new(int32) + } + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*int32)(x.Replicas)) = 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() { + if x.Selector != nil { + x.Selector = nil + } + } else { + if x.Selector == nil { + x.Selector = new(pkg1_v1.LabelSelector) + } + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(x.Selector) { + } else { + z.DecFallback(x.Selector, false) + } + } + 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.Template = pkg3_v1.PodTemplateSpec{} + } else { + yyv18 := &x.Template + yyv18.CodecDecodeSelf(d) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.VolumeClaimTemplates = nil + } else { + yyv19 := &x.VolumeClaimTemplates + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv19), 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.ServiceName = "" + } else { + yyv21 := &x.ServiceName + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } + } + for { + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj13-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *StatefulSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.ObservedGeneration != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.ObservedGeneration == nil { + r.EncodeNil() + } else { + yy4 := *x.ObservedGeneration + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(yy4)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ObservedGeneration == nil { + r.EncodeNil() + } else { + yy6 := *x.ObservedGeneration + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeInt(int64(yy6)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym9 := z.EncBinary() + _ = yym9 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *StatefulSetStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *StatefulSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "observedGeneration": + if r.TryDecodeAsNil() { + if x.ObservedGeneration != nil { + x.ObservedGeneration = nil + } + } else { + if x.ObservedGeneration == nil { + x.ObservedGeneration = new(int64) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) + } + } + case "replicas": + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv6 := &x.Replicas + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(yyv6)) = int32(r.DecodeInt(32)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *StatefulSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var 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.ObservedGeneration != nil { + x.ObservedGeneration = nil + } + } else { + if x.ObservedGeneration == nil { + x.ObservedGeneration = new(int64) + } + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv11 := &x.Replicas + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*int32)(yyv11)) = int32(r.DecodeInt(32)) + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *StatefulSetList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceStatefulSet(([]StatefulSet)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceStatefulSet(([]StatefulSet)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *StatefulSetList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *StatefulSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceStatefulSet((*[]StatefulSet)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *StatefulSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceStatefulSet((*[]StatefulSet)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Deployment) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Deployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = DeploymentSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = DeploymentStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = DeploymentSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = DeploymentStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [9]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Replicas != nil + yyq2[1] = x.Selector != nil + yyq2[3] = true + yyq2[4] = x.MinReadySeconds != 0 + yyq2[5] = x.RevisionHistoryLimit != nil + yyq2[6] = x.Paused != false + yyq2[7] = x.RollbackTo != nil + yyq2[8] = x.ProgressDeadlineSeconds != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(9) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.Replicas == nil { + r.EncodeNil() + } else { + yy4 := *x.Replicas + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(yy4)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Replicas == nil { + r.EncodeNil() + } else { + yy6 := *x.Replicas + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeInt(int64(yy6)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Selector == nil { + r.EncodeNil() + } else { + yym9 := z.EncBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.EncExt(x.Selector) { + } else { + z.EncFallback(x.Selector) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("selector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Selector == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else if z.HasExtensions() && z.EncExt(x.Selector) { + } else { + z.EncFallback(x.Selector) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy12 := &x.Template + yy12.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("template")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy14 := &x.Template + yy14.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy17 := &x.Strategy + yy17.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("strategy")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy19 := &x.Strategy + yy19.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + r.EncodeInt(int64(x.MinReadySeconds)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeInt(int64(x.MinReadySeconds)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + if x.RevisionHistoryLimit == nil { + r.EncodeNil() + } else { + yy25 := *x.RevisionHistoryLimit + yym26 := z.EncBinary() + _ = yym26 + if false { + } else { + r.EncodeInt(int64(yy25)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.RevisionHistoryLimit == nil { + r.EncodeNil() + } else { + yy27 := *x.RevisionHistoryLimit + yym28 := z.EncBinary() + _ = yym28 + if false { + } else { + r.EncodeInt(int64(yy27)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[6] { + yym30 := z.EncBinary() + _ = yym30 + if false { + } else { + r.EncodeBool(bool(x.Paused)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("paused")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym31 := z.EncBinary() + _ = yym31 + if false { + } else { + r.EncodeBool(bool(x.Paused)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[7] { + if x.RollbackTo == nil { + r.EncodeNil() + } else { + x.RollbackTo.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[7] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("rollbackTo")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.RollbackTo == nil { + r.EncodeNil() + } else { + x.RollbackTo.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[8] { + if x.ProgressDeadlineSeconds == nil { + r.EncodeNil() + } else { + yy36 := *x.ProgressDeadlineSeconds + yym37 := z.EncBinary() + _ = yym37 + if false { + } else { + r.EncodeInt(int64(yy36)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[8] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("progressDeadlineSeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ProgressDeadlineSeconds == nil { + r.EncodeNil() + } else { + yy38 := *x.ProgressDeadlineSeconds + yym39 := z.EncBinary() + _ = yym39 + if false { + } else { + r.EncodeInt(int64(yy38)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *DeploymentSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "replicas": + if r.TryDecodeAsNil() { + if x.Replicas != nil { + x.Replicas = nil + } + } else { + if x.Replicas == nil { + x.Replicas = new(int32) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) + } + } + case "selector": + if r.TryDecodeAsNil() { + if x.Selector != nil { + x.Selector = nil + } + } else { + if x.Selector == nil { + x.Selector = new(pkg1_v1.LabelSelector) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(x.Selector) { + } else { + z.DecFallback(x.Selector, false) + } + } + case "template": + if r.TryDecodeAsNil() { + x.Template = pkg3_v1.PodTemplateSpec{} + } else { + yyv8 := &x.Template + yyv8.CodecDecodeSelf(d) + } + case "strategy": + if r.TryDecodeAsNil() { + x.Strategy = DeploymentStrategy{} + } else { + yyv9 := &x.Strategy + yyv9.CodecDecodeSelf(d) + } + case "minReadySeconds": + if r.TryDecodeAsNil() { + x.MinReadySeconds = 0 + } else { + yyv10 := &x.MinReadySeconds + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int32)(yyv10)) = int32(r.DecodeInt(32)) + } + } + case "revisionHistoryLimit": + if r.TryDecodeAsNil() { + if x.RevisionHistoryLimit != nil { + x.RevisionHistoryLimit = nil + } + } else { + if x.RevisionHistoryLimit == nil { + x.RevisionHistoryLimit = new(int32) + } + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32)) + } + } + case "paused": + if r.TryDecodeAsNil() { + x.Paused = false + } else { + yyv14 := &x.Paused + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*bool)(yyv14)) = r.DecodeBool() + } + } + case "rollbackTo": + if r.TryDecodeAsNil() { + if x.RollbackTo != nil { + x.RollbackTo = nil + } + } else { + if x.RollbackTo == nil { + x.RollbackTo = new(RollbackConfig) + } + x.RollbackTo.CodecDecodeSelf(d) + } + case "progressDeadlineSeconds": + if r.TryDecodeAsNil() { + if x.ProgressDeadlineSeconds != nil { + x.ProgressDeadlineSeconds = nil + } + } else { + if x.ProgressDeadlineSeconds == nil { + x.ProgressDeadlineSeconds = new(int32) + } + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*int32)(x.ProgressDeadlineSeconds)) = int32(r.DecodeInt(32)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj19 int + var yyb19 bool + var yyhl19 bool = l >= 0 + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Replicas != nil { + x.Replicas = nil + } + } else { + if x.Replicas == nil { + x.Replicas = new(int32) + } + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) + } + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Selector != nil { + x.Selector = nil + } + } else { + if x.Selector == nil { + x.Selector = new(pkg1_v1.LabelSelector) + } + yym23 := z.DecBinary() + _ = yym23 + if false { + } else if z.HasExtensions() && z.DecExt(x.Selector) { + } else { + z.DecFallback(x.Selector, false) + } + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Template = pkg3_v1.PodTemplateSpec{} + } else { + yyv24 := &x.Template + yyv24.CodecDecodeSelf(d) + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Strategy = DeploymentStrategy{} + } else { + yyv25 := &x.Strategy + yyv25.CodecDecodeSelf(d) + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MinReadySeconds = 0 + } else { + yyv26 := &x.MinReadySeconds + yym27 := z.DecBinary() + _ = yym27 + if false { + } else { + *((*int32)(yyv26)) = int32(r.DecodeInt(32)) + } + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.RevisionHistoryLimit != nil { + x.RevisionHistoryLimit = nil + } + } else { + if x.RevisionHistoryLimit == nil { + x.RevisionHistoryLimit = new(int32) + } + yym29 := z.DecBinary() + _ = yym29 + if false { + } else { + *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32)) + } + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Paused = false + } else { + yyv30 := &x.Paused + yym31 := z.DecBinary() + _ = yym31 + if false { + } else { + *((*bool)(yyv30)) = r.DecodeBool() + } + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.RollbackTo != nil { + x.RollbackTo = nil + } + } else { + if x.RollbackTo == nil { + x.RollbackTo = new(RollbackConfig) + } + x.RollbackTo.CodecDecodeSelf(d) + } + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ProgressDeadlineSeconds != nil { + x.ProgressDeadlineSeconds = nil + } + } else { + if x.ProgressDeadlineSeconds == nil { + x.ProgressDeadlineSeconds = new(int32) + } + yym34 := z.DecBinary() + _ = yym34 + if false { + } else { + *((*int32)(x.ProgressDeadlineSeconds)) = int32(r.DecodeInt(32)) + } + } + for { + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj19-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[3] = len(x.UpdatedAnnotations) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.UpdatedAnnotations == nil { + r.EncodeNil() + } else { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("updatedAnnotations")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.UpdatedAnnotations == nil { + r.EncodeNil() + } else { + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy16 := &x.RollbackTo + yy16.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("rollbackTo")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy18 := &x.RollbackTo + yy18.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *DeploymentRollback) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *DeploymentRollback) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv8 := &x.Name + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "updatedAnnotations": + if r.TryDecodeAsNil() { + x.UpdatedAnnotations = nil + } else { + yyv10 := &x.UpdatedAnnotations + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + z.F.DecMapStringStringX(yyv10, false, d) + } + } + case "rollbackTo": + if r.TryDecodeAsNil() { + x.RollbackTo = RollbackConfig{} + } else { + yyv12 := &x.RollbackTo + yyv12.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv18 := &x.Name + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *((*string)(yyv18)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.UpdatedAnnotations = nil + } else { + yyv20 := &x.UpdatedAnnotations + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + z.F.DecMapStringStringX(yyv20, false, d) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RollbackTo = RollbackConfig{} + } else { + yyv22 := &x.RollbackTo + yyv22.CodecDecodeSelf(d) + } + for { + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj13-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *RollbackConfig) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [1]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Revision != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(1) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeInt(int64(x.Revision)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("revision")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(x.Revision)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RollbackConfig) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RollbackConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "revision": + if r.TryDecodeAsNil() { + x.Revision = 0 + } else { + yyv4 := &x.Revision + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int64)(yyv4)) = int64(r.DecodeInt(64)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RollbackConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Revision = 0 + } else { + yyv7 := &x.Revision + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*int64)(yyv7)) = int64(r.DecodeInt(64)) + } + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj6-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Type != "" + yyq2[1] = x.RollingUpdate != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + x.Type.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.RollingUpdate == nil { + r.EncodeNil() + } else { + x.RollingUpdate.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("rollingUpdate")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.RollingUpdate == nil { + r.EncodeNil() + } else { + x.RollingUpdate.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *DeploymentStrategy) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) + } + case "rollingUpdate": + if r.TryDecodeAsNil() { + if x.RollingUpdate != nil { + x.RollingUpdate = nil + } + } else { + if x.RollingUpdate == nil { + x.RollingUpdate = new(RollingUpdateDeployment) + } + x.RollingUpdate.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv7 := &x.Type + yyv7.CodecDecodeSelf(d) + } + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.RollingUpdate != nil { + x.RollingUpdate = nil + } + } else { + if x.RollingUpdate == nil { + x.RollingUpdate = new(RollingUpdateDeployment) + } + x.RollingUpdate.CodecDecodeSelf(d) + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj6-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x DeploymentStrategyType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *DeploymentStrategyType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.MaxUnavailable != nil + yyq2[1] = x.MaxSurge != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.MaxUnavailable == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) { + } else if !yym4 && z.IsJSONHandle() { + z.EncJSONMarshal(x.MaxUnavailable) + } else { + z.EncFallback(x.MaxUnavailable) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.MaxUnavailable == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) { + } else if !yym5 && z.IsJSONHandle() { + z.EncJSONMarshal(x.MaxUnavailable) + } else { + z.EncFallback(x.MaxUnavailable) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.MaxSurge == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(x.MaxSurge) { + } else if !yym7 && z.IsJSONHandle() { + z.EncJSONMarshal(x.MaxSurge) + } else { + z.EncFallback(x.MaxSurge) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("maxSurge")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.MaxSurge == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.EncExt(x.MaxSurge) { + } else if !yym8 && z.IsJSONHandle() { + z.EncJSONMarshal(x.MaxSurge) + } else { + z.EncFallback(x.MaxSurge) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RollingUpdateDeployment) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "maxUnavailable": + if r.TryDecodeAsNil() { + if x.MaxUnavailable != nil { + x.MaxUnavailable = nil + } + } else { + if x.MaxUnavailable == nil { + x.MaxUnavailable = new(pkg5_intstr.IntOrString) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) { + } else if !yym5 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.MaxUnavailable) + } else { + z.DecFallback(x.MaxUnavailable, false) + } + } + case "maxSurge": + if r.TryDecodeAsNil() { + if x.MaxSurge != nil { + x.MaxSurge = nil + } + } else { + if x.MaxSurge == nil { + x.MaxSurge = new(pkg5_intstr.IntOrString) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(x.MaxSurge) { + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.MaxSurge) + } else { + z.DecFallback(x.MaxSurge, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RollingUpdateDeployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.MaxUnavailable != nil { + x.MaxUnavailable = nil + } + } else { + if x.MaxUnavailable == nil { + x.MaxUnavailable = new(pkg5_intstr.IntOrString) + } + yym10 := z.DecBinary() + _ = yym10 + if false { + } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) { + } else if !yym10 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.MaxUnavailable) + } else { + z.DecFallback(x.MaxUnavailable, false) + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.MaxSurge != nil { + x.MaxSurge = nil + } + } else { + if x.MaxSurge == nil { + x.MaxSurge = new(pkg5_intstr.IntOrString) + } + yym12 := z.DecBinary() + _ = yym12 + if false { + } else if z.HasExtensions() && z.DecExt(x.MaxSurge) { + } else if !yym12 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.MaxSurge) + } else { + z.DecFallback(x.MaxSurge, false) + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *DeploymentStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [7]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.ObservedGeneration != 0 + yyq2[1] = x.Replicas != 0 + yyq2[2] = x.UpdatedReplicas != 0 + yyq2[3] = x.ReadyReplicas != 0 + yyq2[4] = x.AvailableReplicas != 0 + yyq2[5] = x.UnavailableReplicas != 0 + yyq2[6] = len(x.Conditions) != 0 + 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.EncodeInt(int64(x.ObservedGeneration)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(x.ObservedGeneration)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(x.UpdatedReplicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("updatedReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeInt(int64(x.UpdatedReplicas)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeInt(int64(x.ReadyReplicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("readyReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeInt(int64(x.ReadyReplicas)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeInt(int64(x.AvailableReplicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("availableReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeInt(int64(x.AvailableReplicas)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeInt(int64(x.UnavailableReplicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("unavailableReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeInt(int64(x.UnavailableReplicas)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[6] { + if x.Conditions == nil { + r.EncodeNil() + } else { + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + h.encSliceDeploymentCondition(([]DeploymentCondition)(x.Conditions), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("conditions")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Conditions == nil { + r.EncodeNil() + } else { + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + h.encSliceDeploymentCondition(([]DeploymentCondition)(x.Conditions), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *DeploymentStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *DeploymentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "observedGeneration": + if r.TryDecodeAsNil() { + x.ObservedGeneration = 0 + } else { + yyv4 := &x.ObservedGeneration + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int64)(yyv4)) = int64(r.DecodeInt(64)) + } + } + case "replicas": + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv6 := &x.Replicas + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(yyv6)) = int32(r.DecodeInt(32)) + } + } + case "updatedReplicas": + if r.TryDecodeAsNil() { + x.UpdatedReplicas = 0 + } else { + yyv8 := &x.UpdatedReplicas + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } + } + case "readyReplicas": + if r.TryDecodeAsNil() { + x.ReadyReplicas = 0 + } else { + yyv10 := &x.ReadyReplicas + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int32)(yyv10)) = int32(r.DecodeInt(32)) + } + } + case "availableReplicas": + if r.TryDecodeAsNil() { + x.AvailableReplicas = 0 + } else { + yyv12 := &x.AvailableReplicas + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int32)(yyv12)) = int32(r.DecodeInt(32)) + } + } + case "unavailableReplicas": + if r.TryDecodeAsNil() { + x.UnavailableReplicas = 0 + } else { + yyv14 := &x.UnavailableReplicas + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*int32)(yyv14)) = int32(r.DecodeInt(32)) + } + } + case "conditions": + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv16 := &x.Conditions + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + h.decSliceDeploymentCondition((*[]DeploymentCondition)(yyv16), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *DeploymentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var 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.ObservedGeneration = 0 + } else { + yyv19 := &x.ObservedGeneration + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*int64)(yyv19)) = int64(r.DecodeInt(64)) + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv21 := &x.Replicas + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*int32)(yyv21)) = int32(r.DecodeInt(32)) + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.UpdatedReplicas = 0 + } else { + yyv23 := &x.UpdatedReplicas + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*int32)(yyv23)) = int32(r.DecodeInt(32)) + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReadyReplicas = 0 + } else { + yyv25 := &x.ReadyReplicas + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*int32)(yyv25)) = int32(r.DecodeInt(32)) + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.AvailableReplicas = 0 + } else { + yyv27 := &x.AvailableReplicas + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*int32)(yyv27)) = int32(r.DecodeInt(32)) + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.UnavailableReplicas = 0 + } else { + yyv29 := &x.UnavailableReplicas + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*int32)(yyv29)) = int32(r.DecodeInt(32)) + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv31 := &x.Conditions + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + h.decSliceDeploymentCondition((*[]DeploymentCondition)(yyv31), 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 DeploymentConditionType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *DeploymentConditionType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *DeploymentCondition) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [6]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[2] = true + yyq2[3] = true + yyq2[4] = x.Reason != "" + yyq2[5] = x.Message != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(6) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yysf7 := &x.Status + yysf7.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yysf8 := &x.Status + yysf8.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.LastUpdateTime + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else if yym11 { + z.EncBinaryMarshal(yy10) + } else if !yym11 && z.IsJSONHandle() { + z.EncJSONMarshal(yy10) + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastUpdateTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.LastUpdateTime + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else if yym13 { + z.EncBinaryMarshal(yy12) + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(yy12) + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy15 := &x.LastTransitionTime + yym16 := z.EncBinary() + _ = yym16 + if false { + } else if z.HasExtensions() && z.EncExt(yy15) { + } else if yym16 { + z.EncBinaryMarshal(yy15) + } else if !yym16 && z.IsJSONHandle() { + z.EncJSONMarshal(yy15) + } else { + z.EncFallback(yy15) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.LastTransitionTime + yym18 := z.EncBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.EncExt(yy17) { + } else if yym18 { + z.EncBinaryMarshal(yy17) + } else if !yym18 && z.IsJSONHandle() { + z.EncJSONMarshal(yy17) + } else { + z.EncFallback(yy17) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym21 := z.EncBinary() + _ = yym21 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("message")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym24 := z.EncBinary() + _ = yym24 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *DeploymentCondition) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *DeploymentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = "" + } else { + yyv5 := &x.Status + yyv5.CodecDecodeSelf(d) + } + case "lastUpdateTime": + if r.TryDecodeAsNil() { + x.LastUpdateTime = pkg1_v1.Time{} + } else { + yyv6 := &x.LastUpdateTime + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if yym7 { + z.DecBinaryUnmarshal(yyv6) + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) + } else { + z.DecFallback(yyv6, false) + } + } + case "lastTransitionTime": + if r.TryDecodeAsNil() { + x.LastTransitionTime = pkg1_v1.Time{} + } else { + yyv8 := &x.LastTransitionTime + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else if yym9 { + z.DecBinaryUnmarshal(yyv8) + } else if !yym9 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv8) + } else { + z.DecFallback(yyv8, false) + } + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv10 := &x.Reason + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + case "message": + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv12 := &x.Message + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *DeploymentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv15 := &x.Type + yyv15.CodecDecodeSelf(d) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = "" + } else { + yyv16 := &x.Status + yyv16.CodecDecodeSelf(d) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastUpdateTime = pkg1_v1.Time{} + } else { + yyv17 := &x.LastUpdateTime + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else if yym18 { + z.DecBinaryUnmarshal(yyv17) + } else if !yym18 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv17) + } else { + z.DecFallback(yyv17, false) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastTransitionTime = pkg1_v1.Time{} + } else { + yyv19 := &x.LastTransitionTime + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else if yym20 { + z.DecBinaryUnmarshal(yyv19) + } else if !yym20 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv19) + } else { + z.DecFallback(yyv19, false) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv21 := &x.Reason + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv23 := &x.Message + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*string)(yyv23)) = r.DecodeString() + } + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj14-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *DeploymentList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceDeployment(([]Deployment)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceDeployment(([]Deployment)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *DeploymentList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *DeploymentList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceDeployment((*[]Deployment)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *DeploymentList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceDeployment((*[]Deployment)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) encSlicev1_PersistentVolumeClaim(v []pkg3_v1.PersistentVolumeClaim, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg3_v1.PersistentVolumeClaim, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []pkg3_v1.PersistentVolumeClaim{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 376) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]pkg3_v1.PersistentVolumeClaim, yyrl1) + } + } else { + yyv1 = make([]pkg3_v1.PersistentVolumeClaim, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, pkg3_v1.PersistentVolumeClaim{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, pkg3_v1.PersistentVolumeClaim{}) // var yyz1 pkg3_v1.PersistentVolumeClaim + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []pkg3_v1.PersistentVolumeClaim{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceStatefulSet(v []StatefulSet, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []StatefulSet{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 856) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]StatefulSet, yyrl1) + } + } else { + yyv1 = make([]StatefulSet, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = StatefulSet{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, StatefulSet{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = StatefulSet{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, StatefulSet{}) // var yyz1 StatefulSet + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = StatefulSet{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []StatefulSet{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceDeploymentCondition(v []DeploymentCondition, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceDeploymentCondition(v *[]DeploymentCondition, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []DeploymentCondition{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 112) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]DeploymentCondition, yyrl1) + } + } else { + yyv1 = make([]DeploymentCondition, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = DeploymentCondition{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, DeploymentCondition{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = DeploymentCondition{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, DeploymentCondition{}) // var yyz1 DeploymentCondition + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = DeploymentCondition{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []DeploymentCondition{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceDeployment(v []Deployment, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []Deployment{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 920) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]Deployment, yyrl1) + } + } else { + yyv1 = make([]Deployment, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Deployment{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Deployment{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Deployment{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Deployment{}) // var yyz1 Deployment + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = Deployment{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Deployment{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go new file mode 100644 index 000000000..a5675d5d3 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go @@ -0,0 +1,375 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/client-go/pkg/api/v1" +) + +const ( + // StatefulSetInitAnnotation if present, and set to false, indicates that a Pod's readiness should be ignored. + StatefulSetInitAnnotation = "pod.alpha.kubernetes.io/initialized" +) + +// ScaleSpec describes the attributes of a scale subresource +type ScaleSpec struct { + // desired number of instances for the scaled object. + // +optional + Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` +} + +// ScaleStatus represents the current status of a scale subresource. +type ScaleStatus struct { + // actual number of observed instances of the scaled object. + Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"` + + // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"` + + // label selector for pods that should match the replicas count. This is a serializated + // version of both map-based and more expressive set-based selectors. This is done to + // avoid introspection in the clients. The string will be in the same format as the + // query-param syntax. If the target type only supports map-based selectors, both this + // field and map-based selector field are populated. + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + TargetSelector string `json:"targetSelector,omitempty" protobuf:"bytes,3,opt,name=targetSelector"` +} + +// +genclient=true +// +noMethods=true + +// Scale represents a scaling request for a resource. +type Scale struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + // +optional + Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + + // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only. + // +optional + Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// +genclient=true + +// StatefulSet represents a set of pods with consistent identities. +// Identities are defined as: +// - Network: A single stable DNS and hostname. +// - Storage: As many VolumeClaims as requested. +// The StatefulSet guarantees that a given network identity will always +// map to the same storage identity. +type StatefulSet struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec defines the desired identities of pods in this set. + // +optional + Spec StatefulSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + + // Status is the current status of Pods in this StatefulSet. This data + // may be out of date by some window of time. + // +optional + Status StatefulSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// A StatefulSetSpec is the specification of a StatefulSet. +type StatefulSetSpec struct { + // Replicas is the desired number of replicas of the given Template. + // These are replicas in the sense that they are instantiations of the + // same Template, but individual replicas also have a consistent identity. + // If unspecified, defaults to 1. + // TODO: Consider a rename of this field. + // +optional + Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` + + // Selector is a label query over pods that should match the replica count. + // If empty, defaulted to labels on the pod template. + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` + + // Template is the object that describes the pod that will be created if + // insufficient replicas are detected. Each pod stamped out by the StatefulSet + // will fulfill this Template, but have a unique identity from the rest + // of the StatefulSet. + Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"` + + // VolumeClaimTemplates is a list of claims that pods are allowed to reference. + // The StatefulSet controller is responsible for mapping network identities to + // claims in a way that maintains the identity of a pod. Every claim in + // this list must have at least one matching (by name) volumeMount in one + // container in the template. A claim in this list takes precedence over + // any volumes in the template, with the same name. + // TODO: Define the behavior if a claim already exists with the same name. + // +optional + VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"` + + // ServiceName is the name of the service that governs this StatefulSet. + // This service must exist before the StatefulSet, and is responsible for + // the network identity of the set. Pods get DNS/hostnames that follow the + // pattern: pod-specific-string.serviceName.default.svc.cluster.local + // where "pod-specific-string" is managed by the StatefulSet controller. + ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"` +} + +// StatefulSetStatus represents the current state of a StatefulSet. +type StatefulSetStatus struct { + // most recent generation observed by this StatefulSet. + // +optional + ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` + + // Replicas is the number of actual replicas. + Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"` +} + +// StatefulSetList is a collection of StatefulSets. +type StatefulSetList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + Items []StatefulSet `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient=true + +// Deployment enables declarative updates for Pods and ReplicaSets. +type Deployment struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Specification of the desired behavior of the Deployment. + // +optional + Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + + // Most recently observed status of the Deployment. + // +optional + Status DeploymentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// DeploymentSpec is the specification of the desired behavior of the Deployment. +type DeploymentSpec struct { + // Number of desired pods. This is a pointer to distinguish between explicit + // zero and not specified. Defaults to 1. + // +optional + Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` + + // Label selector for pods. Existing ReplicaSets whose pods are + // selected by this will be the ones affected by this deployment. + // +optional + Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` + + // Template describes the pods that will be created. + Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"` + + // The deployment strategy to use to replace existing pods with new ones. + // +optional + Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"` + + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + // +optional + MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,5,opt,name=minReadySeconds"` + + // The number of old ReplicaSets to retain to allow rollback. + // This is a pointer to distinguish between explicit zero and not specified. + // Defaults to 2. + // +optional + RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"` + + // Indicates that the deployment is paused. + // +optional + Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"` + + // The config this deployment is rolling back to. Will be cleared after rollback is done. + // +optional + RollbackTo *RollbackConfig `json:"rollbackTo,omitempty" protobuf:"bytes,8,opt,name=rollbackTo"` + + // The maximum time in seconds for a deployment to make progress before it + // is considered to be failed. The deployment controller will continue to + // process failed deployments and a condition with a ProgressDeadlineExceeded + // reason will be surfaced in the deployment status. Once autoRollback is + // implemented, the deployment controller will automatically rollback failed + // deployments. Note that progress will not be estimated during the time a + // deployment is paused. Defaults to 600s. + ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"` +} + +// DeploymentRollback stores the information required to rollback a deployment. +type DeploymentRollback struct { + metav1.TypeMeta `json:",inline"` + // Required: This must match the Name of a deployment. + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + // The annotations to be updated to a deployment + // +optional + UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty" protobuf:"bytes,2,rep,name=updatedAnnotations"` + // The config of this deployment rollback. + RollbackTo RollbackConfig `json:"rollbackTo" protobuf:"bytes,3,opt,name=rollbackTo"` +} + +type RollbackConfig struct { + // The revision to rollback to. If set to 0, rollbck to the last revision. + // +optional + Revision int64 `json:"revision,omitempty" protobuf:"varint,1,opt,name=revision"` +} + +const ( + // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added + // to existing RCs (and label key that is added to its pods) to prevent the existing RCs + // to select new pods (and old pods being select by new RC). + DefaultDeploymentUniqueLabelKey string = "pod-template-hash" +) + +// DeploymentStrategy describes how to replace existing pods with new ones. +type DeploymentStrategy struct { + // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. + // +optional + Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"` + + // Rolling update config params. Present only if DeploymentStrategyType = + // RollingUpdate. + //--- + // TODO: Update this to follow our convention for oneOf, whatever we decide it + // to be. + // +optional + RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"` +} + +type DeploymentStrategyType string + +const ( + // Kill all existing pods before creating new ones. + RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate" + + // Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one. + RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate" +) + +// Spec to control the desired behavior of rolling update. +type RollingUpdateDeployment struct { + // The maximum number of pods that can be unavailable during the update. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // Absolute number is calculated from percentage by rounding down. + // This can not be 0 if MaxSurge is 0. + // Defaults to 25%. + // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods + // immediately when the rolling update starts. Once new pods are ready, old RC + // can be scaled down further, followed by scaling up the new RC, ensuring + // that the total number of pods available at all times during the update is at + // least 70% of desired pods. + // +optional + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"` + + // The maximum number of pods that can be scheduled above the desired number of + // pods. + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + // This can not be 0 if MaxUnavailable is 0. + // Absolute number is calculated from percentage by rounding up. + // Defaults to 25%. + // Example: when this is set to 30%, the new RC can be scaled up immediately when + // the rolling update starts, such that the total number of old and new pods do not exceed + // 130% of desired pods. Once old pods have been killed, + // new RC can be scaled up further, ensuring that total number of pods running + // at any time during the update is atmost 130% of desired pods. + // +optional + MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"` +} + +// DeploymentStatus is the most recently observed status of the Deployment. +type DeploymentStatus struct { + // The generation observed by the deployment controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` + + // Total number of non-terminated pods targeted by this deployment (their labels match the selector). + // +optional + Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"` + + // Total number of non-terminated pods targeted by this deployment that have the desired template spec. + // +optional + UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"` + + // Total number of ready pods targeted by this deployment. + // +optional + ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"` + + // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. + // +optional + AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"` + + // Total number of unavailable pods targeted by this deployment. + // +optional + UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"` + + // Represents the latest available observations of a deployment's current state. + Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` +} + +type DeploymentConditionType string + +// These are valid conditions of a deployment. +const ( + // Available means the deployment is available, ie. at least the minimum available + // replicas required are up and running for at least minReadySeconds. + DeploymentAvailable DeploymentConditionType = "Available" + // Progressing means the deployment is progressing. Progress for a deployment is + // considered when a new replica set is created or adopted, and when new pods scale + // up or old pods scale down. Progress is not estimated for paused deployments or + // when progressDeadlineSeconds is not specified. + DeploymentProgressing DeploymentConditionType = "Progressing" + // ReplicaFailure is added in a deployment when one of its pods fails to be created + // or deleted. + DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure" +) + +// DeploymentCondition describes the state of a deployment at a certain point. +type DeploymentCondition struct { + // Type of deployment condition. + Type DeploymentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DeploymentConditionType"` + // Status of the condition, one of True, False, Unknown. + Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"` + // The last time this condition was updated. + LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,6,opt,name=lastUpdateTime"` + // Last time the condition transitioned from one status to another. + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,7,opt,name=lastTransitionTime"` + // The reason for the condition's last transition. + Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` + // A human readable message indicating details about the transition. + Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` +} + +// DeploymentList is a list of Deployments. +type DeploymentList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of Deployments. + Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go new file mode 100644 index 000000000..44e9f3e45 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go @@ -0,0 +1,208 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_Deployment = map[string]string{ + "": "Deployment enables declarative updates for Pods and ReplicaSets.", + "metadata": "Standard object metadata.", + "spec": "Specification of the desired behavior of the Deployment.", + "status": "Most recently observed status of the Deployment.", +} + +func (Deployment) SwaggerDoc() map[string]string { + return map_Deployment +} + +var map_DeploymentCondition = map[string]string{ + "": "DeploymentCondition describes the state of a deployment at a certain point.", + "type": "Type of deployment condition.", + "status": "Status of the condition, one of True, False, Unknown.", + "lastUpdateTime": "The last time this condition was updated.", + "lastTransitionTime": "Last time the condition transitioned from one status to another.", + "reason": "The reason for the condition's last transition.", + "message": "A human readable message indicating details about the transition.", +} + +func (DeploymentCondition) SwaggerDoc() map[string]string { + return map_DeploymentCondition +} + +var map_DeploymentList = map[string]string{ + "": "DeploymentList is a list of Deployments.", + "metadata": "Standard list metadata.", + "items": "Items is the list of Deployments.", +} + +func (DeploymentList) SwaggerDoc() map[string]string { + return map_DeploymentList +} + +var map_DeploymentRollback = map[string]string{ + "": "DeploymentRollback stores the information required to rollback a deployment.", + "name": "Required: This must match the Name of a deployment.", + "updatedAnnotations": "The annotations to be updated to a deployment", + "rollbackTo": "The config of this deployment rollback.", +} + +func (DeploymentRollback) SwaggerDoc() map[string]string { + return map_DeploymentRollback +} + +var map_DeploymentSpec = map[string]string{ + "": "DeploymentSpec is the specification of the desired behavior of the Deployment.", + "replicas": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + "selector": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", + "template": "Template describes the pods that will be created.", + "strategy": "The deployment strategy to use to replace existing pods with new ones.", + "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.", + "paused": "Indicates that the deployment is paused.", + "rollbackTo": "The config this deployment is rolling back to. Will be cleared after rollback is done.", + "progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", +} + +func (DeploymentSpec) SwaggerDoc() map[string]string { + return map_DeploymentSpec +} + +var map_DeploymentStatus = map[string]string{ + "": "DeploymentStatus is the most recently observed status of the Deployment.", + "observedGeneration": "The generation observed by the deployment controller.", + "replicas": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", + "updatedReplicas": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", + "readyReplicas": "Total number of ready pods targeted by this deployment.", + "availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", + "unavailableReplicas": "Total number of unavailable pods targeted by this deployment.", + "conditions": "Represents the latest available observations of a deployment's current state.", +} + +func (DeploymentStatus) SwaggerDoc() map[string]string { + return map_DeploymentStatus +} + +var map_DeploymentStrategy = map[string]string{ + "": "DeploymentStrategy describes how to replace existing pods with new ones.", + "type": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", + "rollingUpdate": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", +} + +func (DeploymentStrategy) SwaggerDoc() map[string]string { + return map_DeploymentStrategy +} + +var map_RollbackConfig = map[string]string{ + "revision": "The revision to rollback to. If set to 0, rollbck to the last revision.", +} + +func (RollbackConfig) SwaggerDoc() map[string]string { + return map_RollbackConfig +} + +var map_RollingUpdateDeployment = map[string]string{ + "": "Spec to control the desired behavior of rolling update.", + "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", +} + +func (RollingUpdateDeployment) SwaggerDoc() map[string]string { + return map_RollingUpdateDeployment +} + +var map_Scale = map[string]string{ + "": "Scale represents a scaling request for a resource.", + "metadata": "Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.", + "spec": "defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", + "status": "current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.", +} + +func (Scale) SwaggerDoc() map[string]string { + return map_Scale +} + +var map_ScaleSpec = map[string]string{ + "": "ScaleSpec describes the attributes of a scale subresource", + "replicas": "desired number of instances for the scaled object.", +} + +func (ScaleSpec) SwaggerDoc() map[string]string { + return map_ScaleSpec +} + +var map_ScaleStatus = map[string]string{ + "": "ScaleStatus represents the current status of a scale subresource.", + "replicas": "actual number of observed instances of the scaled object.", + "selector": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "targetSelector": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", +} + +func (ScaleStatus) SwaggerDoc() map[string]string { + return map_ScaleStatus +} + +var map_StatefulSet = map[string]string{ + "": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", + "spec": "Spec defines the desired identities of pods in this set.", + "status": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", +} + +func (StatefulSet) SwaggerDoc() map[string]string { + return map_StatefulSet +} + +var map_StatefulSetList = map[string]string{ + "": "StatefulSetList is a collection of StatefulSets.", +} + +func (StatefulSetList) SwaggerDoc() map[string]string { + return map_StatefulSetList +} + +var map_StatefulSetSpec = map[string]string{ + "": "A StatefulSetSpec is the specification of a StatefulSet.", + "replicas": "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", + "selector": "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", + "volumeClaimTemplates": "VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", + "serviceName": "ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", +} + +func (StatefulSetSpec) SwaggerDoc() map[string]string { + return map_StatefulSetSpec +} + +var map_StatefulSetStatus = map[string]string{ + "": "StatefulSetStatus represents the current state of a StatefulSet.", + "observedGeneration": "most recent generation observed by this StatefulSet.", + "replicas": "Replicas is the number of actual replicas.", +} + +func (StatefulSetStatus) SwaggerDoc() map[string]string { + return map_StatefulSetStatus +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go new file mode 100644 index 000000000..9226c82d9 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go @@ -0,0 +1,166 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + api "k8s.io/client-go/pkg/api" + api_v1 "k8s.io/client-go/pkg/api/v1" + apps "k8s.io/client-go/pkg/apis/apps" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1beta1_StatefulSet_To_apps_StatefulSet, + Convert_apps_StatefulSet_To_v1beta1_StatefulSet, + Convert_v1beta1_StatefulSetList_To_apps_StatefulSetList, + Convert_apps_StatefulSetList_To_v1beta1_StatefulSetList, + Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec, + Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec, + Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus, + Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus, + ) +} + +func autoConvert_v1beta1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error { + return autoConvert_v1beta1_StatefulSet_To_apps_StatefulSet(in, out, s) +} + +func autoConvert_apps_StatefulSet_To_v1beta1_StatefulSet(in *apps.StatefulSet, out *StatefulSet, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_apps_StatefulSet_To_v1beta1_StatefulSet(in *apps.StatefulSet, out *StatefulSet, s conversion.Scope) error { + return autoConvert_apps_StatefulSet_To_v1beta1_StatefulSet(in, out, s) +} + +func autoConvert_v1beta1_StatefulSetList_To_apps_StatefulSetList(in *StatefulSetList, out *apps.StatefulSetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]apps.StatefulSet, len(*in)) + for i := range *in { + if err := Convert_v1beta1_StatefulSet_To_apps_StatefulSet(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_v1beta1_StatefulSetList_To_apps_StatefulSetList(in *StatefulSetList, out *apps.StatefulSetList, s conversion.Scope) error { + return autoConvert_v1beta1_StatefulSetList_To_apps_StatefulSetList(in, out, s) +} + +func autoConvert_apps_StatefulSetList_To_v1beta1_StatefulSetList(in *apps.StatefulSetList, out *StatefulSetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StatefulSet, len(*in)) + for i := range *in { + if err := Convert_apps_StatefulSet_To_v1beta1_StatefulSet(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = make([]StatefulSet, 0) + } + return nil +} + +func Convert_apps_StatefulSetList_To_v1beta1_StatefulSetList(in *apps.StatefulSetList, out *StatefulSetList, s conversion.Scope) error { + return autoConvert_apps_StatefulSetList_To_v1beta1_StatefulSetList(in, out, s) +} + +func autoConvert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec, out *apps.StatefulSetSpec, s conversion.Scope) error { + if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil { + return err + } + out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector)) + if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + out.VolumeClaimTemplates = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates)) + out.ServiceName = in.ServiceName + return nil +} + +func autoConvert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.StatefulSetSpec, out *StatefulSetSpec, s conversion.Scope) error { + if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil { + return err + } + out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector)) + if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + out.VolumeClaimTemplates = *(*[]api_v1.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates)) + out.ServiceName = in.ServiceName + return nil +} + +func autoConvert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(in *StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error { + out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) + out.Replicas = in.Replicas + return nil +} + +func Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(in *StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error { + return autoConvert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(in, out, s) +} + +func autoConvert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(in *apps.StatefulSetStatus, out *StatefulSetStatus, s conversion.Scope) error { + out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) + out.Replicas = in.Replicas + return nil +} + +func Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(in *apps.StatefulSetStatus, out *StatefulSetStatus, s conversion.Scope) error { + return autoConvert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(in, out, s) +} diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000..d9b9d3d3c --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,355 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + intstr "k8s.io/apimachinery/pkg/util/intstr" + api_v1 "k8s.io/client-go/pkg/api/v1" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Deployment, InType: reflect.TypeOf(&Deployment{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentCondition, InType: reflect.TypeOf(&DeploymentCondition{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentList, InType: reflect.TypeOf(&DeploymentList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentRollback, InType: reflect.TypeOf(&DeploymentRollback{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentSpec, InType: reflect.TypeOf(&DeploymentSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentStatus, InType: reflect.TypeOf(&DeploymentStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentStrategy, InType: reflect.TypeOf(&DeploymentStrategy{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollbackConfig, InType: reflect.TypeOf(&RollbackConfig{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollingUpdateDeployment, InType: reflect.TypeOf(&RollingUpdateDeployment{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Scale, InType: reflect.TypeOf(&Scale{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})}, + ) +} + +func DeepCopy_v1beta1_Deployment(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Deployment) + out := out.(*Deployment) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + if err := DeepCopy_v1beta1_DeploymentStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1beta1_DeploymentCondition(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*DeploymentCondition) + out := out.(*DeploymentCondition) + *out = *in + out.LastUpdateTime = in.LastUpdateTime.DeepCopy() + out.LastTransitionTime = in.LastTransitionTime.DeepCopy() + return nil + } +} + +func DeepCopy_v1beta1_DeploymentList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*DeploymentList) + out := out.(*DeploymentList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Deployment, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_Deployment(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_DeploymentRollback(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*DeploymentRollback) + out := out.(*DeploymentRollback) + *out = *in + if in.UpdatedAnnotations != nil { + in, out := &in.UpdatedAnnotations, &out.UpdatedAnnotations + *out = make(map[string]string) + for key, val := range *in { + (*out)[key] = val + } + } + return nil + } +} + +func DeepCopy_v1beta1_DeploymentSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*DeploymentSpec) + out := out.(*DeploymentSpec) + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.Selector != nil { + in, out := &in.Selector, &out.Selector + if newVal, err := c.DeepCopy(*in); err != nil { + return err + } else { + *out = newVal.(*v1.LabelSelector) + } + } + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + return err + } + if err := DeepCopy_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, c); err != nil { + return err + } + if in.RevisionHistoryLimit != nil { + in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit + *out = new(int32) + **out = **in + } + if in.RollbackTo != nil { + in, out := &in.RollbackTo, &out.RollbackTo + *out = new(RollbackConfig) + **out = **in + } + if in.ProgressDeadlineSeconds != nil { + in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds + *out = new(int32) + **out = **in + } + return nil + } +} + +func DeepCopy_v1beta1_DeploymentStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*DeploymentStatus) + out := out.(*DeploymentStatus) + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]DeploymentCondition, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_DeploymentCondition(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_DeploymentStrategy(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*DeploymentStrategy) + out := out.(*DeploymentStrategy) + *out = *in + if in.RollingUpdate != nil { + in, out := &in.RollingUpdate, &out.RollingUpdate + *out = new(RollingUpdateDeployment) + if err := DeepCopy_v1beta1_RollingUpdateDeployment(*in, *out, c); err != nil { + return err + } + } + return nil + } +} + +func DeepCopy_v1beta1_RollbackConfig(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RollbackConfig) + out := out.(*RollbackConfig) + *out = *in + return nil + } +} + +func DeepCopy_v1beta1_RollingUpdateDeployment(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RollingUpdateDeployment) + out := out.(*RollingUpdateDeployment) + *out = *in + if in.MaxUnavailable != nil { + in, out := &in.MaxUnavailable, &out.MaxUnavailable + *out = new(intstr.IntOrString) + **out = **in + } + if in.MaxSurge != nil { + in, out := &in.MaxSurge, &out.MaxSurge + *out = new(intstr.IntOrString) + **out = **in + } + return nil + } +} + +func DeepCopy_v1beta1_Scale(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Scale) + out := out.(*Scale) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_v1beta1_ScaleStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1beta1_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ScaleSpec) + out := out.(*ScaleSpec) + *out = *in + return nil + } +} + +func DeepCopy_v1beta1_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ScaleStatus) + out := out.(*ScaleStatus) + *out = *in + if in.Selector != nil { + in, out := &in.Selector, &out.Selector + *out = make(map[string]string) + for key, val := range *in { + (*out)[key] = val + } + } + return nil + } +} + +func DeepCopy_v1beta1_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*StatefulSet) + out := out.(*StatefulSet) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + if err := DeepCopy_v1beta1_StatefulSetStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1beta1_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*StatefulSetList) + out := out.(*StatefulSetList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StatefulSet, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*StatefulSetSpec) + out := out.(*StatefulSetSpec) + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.Selector != nil { + in, out := &in.Selector, &out.Selector + if newVal, err := c.DeepCopy(*in); err != nil { + return err + } else { + *out = newVal.(*v1.LabelSelector) + } + } + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + return err + } + if in.VolumeClaimTemplates != nil { + in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates + *out = make([]api_v1.PersistentVolumeClaim, len(*in)) + for i := range *in { + if err := api_v1.DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*StatefulSetStatus) + out := out.(*StatefulSetStatus) + *out = *in + if in.ObservedGeneration != nil { + in, out := &in.ObservedGeneration, &out.ObservedGeneration + *out = new(int64) + **out = **in + } + return nil + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.defaults.go new file mode 100644 index 000000000..9b822c84c --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.defaults.go @@ -0,0 +1,326 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" + v1 "k8s.io/client-go/pkg/api/v1" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&Deployment{}, func(obj interface{}) { SetObjectDefaults_Deployment(obj.(*Deployment)) }) + scheme.AddTypeDefaultingFunc(&DeploymentList{}, func(obj interface{}) { SetObjectDefaults_DeploymentList(obj.(*DeploymentList)) }) + scheme.AddTypeDefaultingFunc(&StatefulSet{}, func(obj interface{}) { SetObjectDefaults_StatefulSet(obj.(*StatefulSet)) }) + scheme.AddTypeDefaultingFunc(&StatefulSetList{}, func(obj interface{}) { SetObjectDefaults_StatefulSetList(obj.(*StatefulSetList)) }) + return nil +} + +func SetObjectDefaults_Deployment(in *Deployment) { + SetDefaults_Deployment(in) + v1.SetDefaults_PodSpec(&in.Spec.Template.Spec) + for i := range in.Spec.Template.Spec.Volumes { + a := &in.Spec.Template.Spec.Volumes[i] + v1.SetDefaults_Volume(a) + if a.VolumeSource.Secret != nil { + v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret) + } + if a.VolumeSource.ISCSI != nil { + v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI) + } + if a.VolumeSource.RBD != nil { + v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD) + } + if a.VolumeSource.DownwardAPI != nil { + v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI) + for j := range a.VolumeSource.DownwardAPI.Items { + b := &a.VolumeSource.DownwardAPI.Items[j] + if b.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.FieldRef) + } + } + } + if a.VolumeSource.ConfigMap != nil { + v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap) + } + if a.VolumeSource.AzureDisk != nil { + v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk) + } + if a.VolumeSource.Projected != nil { + v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected) + for j := range a.VolumeSource.Projected.Sources { + b := &a.VolumeSource.Projected.Sources[j] + if b.DownwardAPI != nil { + for k := range b.DownwardAPI.Items { + c := &b.DownwardAPI.Items[k] + if c.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(c.FieldRef) + } + } + } + } + } + if a.VolumeSource.ScaleIO != nil { + v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + } + } + for i := range in.Spec.Template.Spec.InitContainers { + a := &in.Spec.Template.Spec.InitContainers[i] + v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + v1.SetDefaults_ResourceList(&a.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } + for i := range in.Spec.Template.Spec.Containers { + a := &in.Spec.Template.Spec.Containers[i] + v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + v1.SetDefaults_ResourceList(&a.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } +} + +func SetObjectDefaults_DeploymentList(in *DeploymentList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_Deployment(a) + } +} + +func SetObjectDefaults_StatefulSet(in *StatefulSet) { + SetDefaults_StatefulSet(in) + v1.SetDefaults_PodSpec(&in.Spec.Template.Spec) + for i := range in.Spec.Template.Spec.Volumes { + a := &in.Spec.Template.Spec.Volumes[i] + v1.SetDefaults_Volume(a) + if a.VolumeSource.Secret != nil { + v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret) + } + if a.VolumeSource.ISCSI != nil { + v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI) + } + if a.VolumeSource.RBD != nil { + v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD) + } + if a.VolumeSource.DownwardAPI != nil { + v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI) + for j := range a.VolumeSource.DownwardAPI.Items { + b := &a.VolumeSource.DownwardAPI.Items[j] + if b.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.FieldRef) + } + } + } + if a.VolumeSource.ConfigMap != nil { + v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap) + } + if a.VolumeSource.AzureDisk != nil { + v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk) + } + if a.VolumeSource.Projected != nil { + v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected) + for j := range a.VolumeSource.Projected.Sources { + b := &a.VolumeSource.Projected.Sources[j] + if b.DownwardAPI != nil { + for k := range b.DownwardAPI.Items { + c := &b.DownwardAPI.Items[k] + if c.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(c.FieldRef) + } + } + } + } + } + if a.VolumeSource.ScaleIO != nil { + v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + } + } + for i := range in.Spec.Template.Spec.InitContainers { + a := &in.Spec.Template.Spec.InitContainers[i] + v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + v1.SetDefaults_ResourceList(&a.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } + for i := range in.Spec.Template.Spec.Containers { + a := &in.Spec.Template.Spec.Containers[i] + v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + v1.SetDefaults_ResourceList(&a.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } + for i := range in.Spec.VolumeClaimTemplates { + a := &in.Spec.VolumeClaimTemplates[i] + v1.SetDefaults_PersistentVolumeClaim(a) + v1.SetDefaults_ResourceList(&a.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Spec.Resources.Requests) + v1.SetDefaults_ResourceList(&a.Status.Capacity) + } +} + +func SetObjectDefaults_StatefulSetList(in *StatefulSetList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_StatefulSet(a) + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/apps/zz_generated.deepcopy.go new file mode 100644 index 000000000..5048531ca --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/apps/zz_generated.deepcopy.go @@ -0,0 +1,125 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package apps + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + api "k8s.io/client-go/pkg/api" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})}, + ) +} + +func DeepCopy_apps_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*StatefulSet) + out := out.(*StatefulSet) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_apps_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + if err := DeepCopy_apps_StatefulSetStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_apps_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*StatefulSetList) + out := out.(*StatefulSetList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StatefulSet, len(*in)) + for i := range *in { + if err := DeepCopy_apps_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_apps_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*StatefulSetSpec) + out := out.(*StatefulSetSpec) + *out = *in + if in.Selector != nil { + in, out := &in.Selector, &out.Selector + if newVal, err := c.DeepCopy(*in); err != nil { + return err + } else { + *out = newVal.(*v1.LabelSelector) + } + } + if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + return err + } + if in.VolumeClaimTemplates != nil { + in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates + *out = make([]api.PersistentVolumeClaim, len(*in)) + for i := range *in { + if err := api.DeepCopy_api_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_apps_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*StatefulSetStatus) + out := out.(*StatefulSetStatus) + *out = *in + if in.ObservedGeneration != nil { + in, out := &in.ObservedGeneration, &out.ObservedGeneration + *out = new(int64) + **out = **in + } + return nil + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/OWNERS b/vendor/k8s.io/client-go/pkg/apis/authentication/OWNERS new file mode 100755 index 000000000..4135522b2 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/OWNERS @@ -0,0 +1,9 @@ +reviewers: +- liggitt +- lavalamp +- wojtek-t +- deads2k +- sttts +- timothysc +- mbohlool +- jianhuiz diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/doc.go b/vendor/k8s.io/client-go/pkg/apis/authentication/doc.go similarity index 90% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/doc.go rename to vendor/k8s.io/client-go/pkg/apis/authentication/doc.go index 35cb18de8..194de434d 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/doc.go +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/doc.go @@ -14,7 +14,5 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register // +groupName=authentication.k8s.io -// +k8s:openapi-gen=true package authentication diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/install/install.go b/vendor/k8s.io/client-go/pkg/apis/authentication/install/install.go similarity index 54% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/install/install.go rename to vendor/k8s.io/client-go/pkg/apis/authentication/install/install.go index e4caa753d..b8a9521a6 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/install/install.go +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/install/install.go @@ -19,25 +19,35 @@ limitations under the License. package install import ( - "k8s.io/client-go/1.5/pkg/apimachinery/announced" - "k8s.io/client-go/1.5/pkg/apis/authentication" - "k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/apis/authentication" + "k8s.io/client-go/pkg/apis/authentication/v1" + "k8s.io/client-go/pkg/apis/authentication/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: authentication.GroupName, - VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version}, - ImportPrefix: "k8s.io/client-go/1.5/pkg/apis/authentication", + VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version, v1beta1.SchemeGroupVersion.Version}, + ImportPrefix: "k8s.io/client-go/pkg/apis/authentication", RootScopedKinds: sets.NewString("TokenReview"), AddInternalObjectsToScheme: authentication.AddToScheme, }, announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, + v1.SchemeGroupVersion.Version: v1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/register.go b/vendor/k8s.io/client-go/pkg/apis/authentication/register.go similarity index 76% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/register.go rename to vendor/k8s.io/client-go/pkg/apis/authentication/register.go index ffef35f18..b0ac3c28b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/register.go @@ -17,24 +17,23 @@ limitations under the License. package authentication import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "authentication.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} // Kind takes an unqualified kind and returns a Group qualified GroupKind -func Kind(kind string) unversioned.GroupKind { +func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) unversioned.GroupResource { +func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } @@ -45,10 +44,6 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &api.ListOptions{}, - &api.DeleteOptions{}, - &api.ExportOptions{}, - &TokenReview{}, ) return nil diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/types.go b/vendor/k8s.io/client-go/pkg/apis/authentication/types.go similarity index 93% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/types.go rename to vendor/k8s.io/client-go/pkg/apis/authentication/types.go index 16be10210..9c1e66b7b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/types.go +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/types.go @@ -17,8 +17,7 @@ limitations under the License. package authentication import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) const ( @@ -42,10 +41,10 @@ const ( // TokenReview attempts to authenticate a token to a known user. type TokenReview struct { - unversioned.TypeMeta - // ObjectMeta fulfills the meta.ObjectMetaAccessor interface so that the stock + metav1.TypeMeta + // ObjectMeta fulfills the metav1.ObjectMetaAccessor interface so that the stock // REST handler paths work - api.ObjectMeta + metav1.ObjectMeta // Spec holds information about the request being evaluated Spec TokenReviewSpec diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/conversion.go new file mode 100644 index 000000000..2ff5732d6 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/conversion.go @@ -0,0 +1,26 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addConversionFuncs(scheme *runtime.Scheme) error { + // Add non-generated conversion functions + return scheme.AddConversionFuncs() +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/defaults.go new file mode 100644 index 000000000..d63d91754 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/defaults.go @@ -0,0 +1,25 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return scheme.AddDefaultingFuncs() +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/doc.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/doc.go new file mode 100644 index 000000000..8140e47c5 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +groupName=authentication.k8s.io +package v1 diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/generated.pb.go new file mode 100644 index 000000000..e3dfb9d3a --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/generated.pb.go @@ -0,0 +1,1281 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. +// source: k8s.io/kubernetes/pkg/apis/authentication/v1/generated.proto +// DO NOT EDIT! + +/* + Package v1 is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/pkg/apis/authentication/v1/generated.proto + + It has these top-level messages: + ExtraValue + TokenReview + TokenReviewSpec + TokenReviewStatus + UserInfo +*/ +package v1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +const _ = proto.GoGoProtoPackageIsVersion1 + +func (m *ExtraValue) Reset() { *m = ExtraValue{} } +func (*ExtraValue) ProtoMessage() {} +func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func (m *TokenReview) Reset() { *m = TokenReview{} } +func (*TokenReview) ProtoMessage() {} +func (*TokenReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} } +func (*TokenReviewSpec) ProtoMessage() {} +func (*TokenReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } + +func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} } +func (*TokenReviewStatus) ProtoMessage() {} +func (*TokenReviewStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } + +func (m *UserInfo) Reset() { *m = UserInfo{} } +func (*UserInfo) ProtoMessage() {} +func (*UserInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } + +func init() { + proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.pkg.apis.authentication.v1.ExtraValue") + proto.RegisterType((*TokenReview)(nil), "k8s.io.client-go.pkg.apis.authentication.v1.TokenReview") + proto.RegisterType((*TokenReviewSpec)(nil), "k8s.io.client-go.pkg.apis.authentication.v1.TokenReviewSpec") + proto.RegisterType((*TokenReviewStatus)(nil), "k8s.io.client-go.pkg.apis.authentication.v1.TokenReviewStatus") + proto.RegisterType((*UserInfo)(nil), "k8s.io.client-go.pkg.apis.authentication.v1.UserInfo") +} +func (m ExtraValue) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m ExtraValue) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m) > 0 { + for _, s := range m { + data[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + return i, nil +} + +func (m *TokenReview) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *TokenReview) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n1, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n2, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n3, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + return i, nil +} + +func (m *TokenReviewSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *TokenReviewSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Token))) + i += copy(data[i:], m.Token) + return i, nil +} + +func (m *TokenReviewStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *TokenReviewStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + if m.Authenticated { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.User.Size())) + n4, err := m.User.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Error))) + i += copy(data[i:], m.Error) + return i, nil +} + +func (m *UserInfo) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UserInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Username))) + i += copy(data[i:], m.Username) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.UID))) + i += copy(data[i:], m.UID) + if len(m.Groups) > 0 { + for _, s := range m.Groups { + data[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.Extra) > 0 { + for k := range m.Extra { + data[i] = 0x22 + i++ + v := m.Extra[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())) + n5, err := (&v).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + } + } + return i, nil +} + +func encodeFixed64Generated(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Generated(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintGenerated(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} +func (m ExtraValue) Size() (n int) { + var l int + _ = l + if len(m) > 0 { + for _, s := range m { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *TokenReview) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *TokenReviewSpec) Size() (n int) { + var l int + _ = l + l = len(m.Token) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *TokenReviewStatus) Size() (n int) { + var l int + _ = l + n += 2 + l = m.User.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Error) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *UserInfo) Size() (n int) { + var l int + _ = l + l = len(m.Username) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Groups) > 0 { + for _, s := range m.Groups { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Extra) > 0 { + for k, v := range m.Extra { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *TokenReview) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TokenReview{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TokenReviewSpec", "TokenReviewSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TokenReviewStatus", "TokenReviewStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *TokenReviewSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TokenReviewSpec{`, + `Token:` + fmt.Sprintf("%v", this.Token) + `,`, + `}`, + }, "") + return s +} +func (this *TokenReviewStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TokenReviewStatus{`, + `Authenticated:` + fmt.Sprintf("%v", this.Authenticated) + `,`, + `User:` + strings.Replace(strings.Replace(this.User.String(), "UserInfo", "UserInfo", 1), `&`, ``, 1) + `,`, + `Error:` + fmt.Sprintf("%v", this.Error) + `,`, + `}`, + }, "") + return s +} +func (this *UserInfo) String() string { + if this == nil { + return "nil" + } + keysForExtra := make([]string, 0, len(this.Extra)) + for k := range this.Extra { + keysForExtra = append(keysForExtra, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + mapStringForExtra := "map[string]ExtraValue{" + for _, k := range keysForExtra { + mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k]) + } + mapStringForExtra += "}" + s := strings.Join([]string{`&UserInfo{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, + `Extra:` + mapStringForExtra + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *ExtraValue) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + *m = append(*m, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TokenReview) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TokenReview: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TokenReview: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TokenReviewSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TokenReviewSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TokenReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Token = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TokenReviewStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TokenReviewStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TokenReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Authenticated", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Authenticated = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.User.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Error = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UserInfo) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UserInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UserInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &ExtraValue{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.Extra == nil { + m.Extra = make(map[string]ExtraValue) + } + m.Extra[mapkey] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorGenerated = []byte{ + // 655 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x53, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0xb5, 0xf3, 0x53, 0x25, 0x93, 0xaf, 0x1f, 0x65, 0x24, 0xa4, 0x28, 0x12, 0x4e, 0x14, 0x58, + 0x74, 0x51, 0xc6, 0xa4, 0xa0, 0x52, 0x15, 0x10, 0xaa, 0x45, 0x85, 0xba, 0x00, 0xa4, 0x81, 0x22, + 0xc4, 0x06, 0x26, 0xce, 0xad, 0x63, 0x52, 0xff, 0x68, 0x3c, 0x36, 0xed, 0xae, 0x8f, 0xc0, 0x92, + 0x25, 0xaf, 0xc1, 0x1b, 0x74, 0x47, 0x77, 0xb0, 0x40, 0x15, 0x0d, 0x2f, 0x82, 0x66, 0x3c, 0xd4, + 0x2e, 0x69, 0x85, 0xda, 0xdd, 0xcc, 0x99, 0x7b, 0xce, 0xbd, 0xe7, 0xde, 0xb9, 0xe8, 0xc1, 0x64, + 0x35, 0x21, 0x7e, 0x64, 0x4f, 0xd2, 0x21, 0xf0, 0x10, 0x04, 0x24, 0x76, 0x3c, 0xf1, 0x6c, 0x16, + 0xfb, 0x89, 0xcd, 0x52, 0x31, 0x86, 0x50, 0xf8, 0x2e, 0x13, 0x7e, 0x14, 0xda, 0xd9, 0xc0, 0xf6, + 0x20, 0x04, 0xce, 0x04, 0x8c, 0x48, 0xcc, 0x23, 0x11, 0xe1, 0xa5, 0x9c, 0x4d, 0x0a, 0x36, 0x89, + 0x27, 0x1e, 0x91, 0x6c, 0x72, 0x9a, 0x4d, 0xb2, 0x41, 0xe7, 0x96, 0xe7, 0x8b, 0x71, 0x3a, 0x24, + 0x6e, 0x14, 0xd8, 0x5e, 0xe4, 0x45, 0xb6, 0x12, 0x19, 0xa6, 0xdb, 0xea, 0xa6, 0x2e, 0xea, 0x94, + 0x8b, 0x77, 0xee, 0xea, 0xd2, 0x58, 0xec, 0x07, 0xcc, 0x1d, 0xfb, 0x21, 0xf0, 0xbd, 0xa2, 0xb8, + 0x00, 0x04, 0x3b, 0xa3, 0xa4, 0x8e, 0x7d, 0x1e, 0x8b, 0xa7, 0xa1, 0xf0, 0x03, 0x98, 0x21, 0xac, + 0xfc, 0x8b, 0x90, 0xb8, 0x63, 0x08, 0xd8, 0x0c, 0xef, 0xce, 0x79, 0xbc, 0x54, 0xf8, 0x3b, 0xb6, + 0x1f, 0x8a, 0x44, 0xf0, 0x19, 0x52, 0xc9, 0x53, 0x02, 0x3c, 0x03, 0x5e, 0x18, 0x82, 0x5d, 0x16, + 0xc4, 0x3b, 0x70, 0x86, 0xa7, 0xfe, 0x3d, 0x84, 0x36, 0x76, 0x05, 0x67, 0xaf, 0xd8, 0x4e, 0x0a, + 0xb8, 0x8b, 0xea, 0xbe, 0x80, 0x20, 0x69, 0x9b, 0xbd, 0xea, 0x62, 0xd3, 0x69, 0x4e, 0x8f, 0xba, + 0xf5, 0x4d, 0x09, 0xd0, 0x1c, 0x5f, 0x6b, 0x7c, 0xfa, 0xdc, 0x35, 0xf6, 0x7f, 0xf4, 0x8c, 0xfe, + 0x97, 0x0a, 0x6a, 0xbd, 0x8c, 0x26, 0x10, 0x52, 0xc8, 0x7c, 0xf8, 0x80, 0xdf, 0xa1, 0x86, 0xec, + 0xdb, 0x88, 0x09, 0xd6, 0x36, 0x7b, 0xe6, 0x62, 0x6b, 0xf9, 0x36, 0xd1, 0x23, 0x2c, 0xdb, 0x28, + 0x86, 0x28, 0xa3, 0x49, 0x36, 0x20, 0xcf, 0x87, 0xef, 0xc1, 0x15, 0x4f, 0x41, 0x30, 0x07, 0x1f, + 0x1c, 0x75, 0x8d, 0xe9, 0x51, 0x17, 0x15, 0x18, 0x3d, 0x51, 0xc5, 0x6f, 0x51, 0x2d, 0x89, 0xc1, + 0x6d, 0x57, 0x94, 0xfa, 0x43, 0x72, 0x91, 0x0f, 0x42, 0x4a, 0xa5, 0xbe, 0x88, 0xc1, 0x75, 0xfe, + 0xd3, 0xa9, 0x6a, 0xf2, 0x46, 0x95, 0x30, 0xf6, 0xd0, 0x5c, 0x22, 0x98, 0x48, 0x93, 0x76, 0x55, + 0xa5, 0x78, 0x74, 0xf9, 0x14, 0x4a, 0xc6, 0xf9, 0x5f, 0x27, 0x99, 0xcb, 0xef, 0x54, 0xcb, 0xf7, + 0x57, 0xd0, 0x95, 0xbf, 0xea, 0xc1, 0x37, 0x50, 0x5d, 0x48, 0x48, 0xf5, 0xae, 0xe9, 0xcc, 0x6b, + 0x66, 0x3d, 0x8f, 0xcb, 0xdf, 0xfa, 0x5f, 0x4d, 0x74, 0x75, 0x26, 0x0b, 0xbe, 0x8f, 0xe6, 0x4b, + 0xc5, 0xc0, 0x48, 0x49, 0x34, 0x9c, 0x6b, 0x5a, 0x62, 0x7e, 0xbd, 0xfc, 0x48, 0x4f, 0xc7, 0xe2, + 0xd7, 0xa8, 0x96, 0x26, 0xc0, 0x75, 0x53, 0x57, 0x2e, 0xe6, 0x78, 0x2b, 0x01, 0xbe, 0x19, 0x6e, + 0x47, 0x45, 0x37, 0x25, 0x42, 0x95, 0xa2, 0x74, 0x04, 0x9c, 0x47, 0x5c, 0x35, 0xb3, 0xe4, 0x68, + 0x43, 0x82, 0x34, 0x7f, 0xeb, 0x7f, 0xab, 0xa0, 0xc6, 0x1f, 0x15, 0xbc, 0x84, 0x1a, 0x92, 0x19, + 0xb2, 0x00, 0x74, 0x1b, 0x16, 0x34, 0x49, 0xc5, 0x48, 0x9c, 0x9e, 0x44, 0xe0, 0xeb, 0xa8, 0x9a, + 0xfa, 0x23, 0x55, 0x78, 0xd3, 0x69, 0xe9, 0xc0, 0xea, 0xd6, 0xe6, 0x63, 0x2a, 0x71, 0xdc, 0x47, + 0x73, 0x1e, 0x8f, 0xd2, 0x58, 0x0e, 0x53, 0xfe, 0x65, 0x24, 0xe7, 0xf0, 0x44, 0x21, 0x54, 0xbf, + 0xe0, 0x6d, 0x54, 0x07, 0xf9, 0xf9, 0xdb, 0xb5, 0x5e, 0x75, 0xb1, 0xb5, 0xbc, 0x7e, 0x39, 0xf7, + 0x44, 0x2d, 0xd0, 0x46, 0x28, 0xf8, 0x5e, 0xc9, 0xa5, 0xc4, 0x68, 0x2e, 0xdf, 0xe1, 0x7a, 0xc9, + 0x54, 0x0c, 0x5e, 0x40, 0xd5, 0x09, 0xec, 0xe5, 0x0e, 0xa9, 0x3c, 0xe2, 0x67, 0xa8, 0x9e, 0xc9, + 0xfd, 0xd3, 0x53, 0x58, 0xbd, 0x58, 0x1d, 0xc5, 0xfe, 0xd2, 0x5c, 0x66, 0xad, 0xb2, 0x6a, 0x3a, + 0x37, 0x0f, 0x8e, 0x2d, 0xe3, 0xf0, 0xd8, 0x32, 0xbe, 0x1f, 0x5b, 0xc6, 0xfe, 0xd4, 0x32, 0x0f, + 0xa6, 0x96, 0x79, 0x38, 0xb5, 0xcc, 0x9f, 0x53, 0xcb, 0xfc, 0xf8, 0xcb, 0x32, 0xde, 0x54, 0xb2, + 0xc1, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x6b, 0x11, 0x20, 0xa4, 0x05, 0x00, 0x00, +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/generated.proto new file mode 100644 index 000000000..ea5203d37 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/generated.proto @@ -0,0 +1,100 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.kubernetes.pkg.apis.authentication.v1; + +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1"; + +// ExtraValue masks the value so protobuf can generate +// +protobuf.nullable=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +message ExtraValue { + // items, if empty, will result in an empty slice + + repeated string items = 1; +} + +// TokenReview attempts to authenticate a token to a known user. +// Note: TokenReview requests may be cached by the webhook token authenticator +// plugin in the kube-apiserver. +message TokenReview { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec holds information about the request being evaluated + optional TokenReviewSpec spec = 2; + + // Status is filled in by the server and indicates whether the request can be authenticated. + // +optional + optional TokenReviewStatus status = 3; +} + +// TokenReviewSpec is a description of the token authentication request. +message TokenReviewSpec { + // Token is the opaque bearer token. + // +optional + optional string token = 1; +} + +// TokenReviewStatus is the result of the token authentication request. +message TokenReviewStatus { + // Authenticated indicates that the token was associated with a known user. + // +optional + optional bool authenticated = 1; + + // User is the UserInfo associated with the provided token. + // +optional + optional UserInfo user = 2; + + // Error indicates that the token couldn't be checked + // +optional + optional string error = 3; +} + +// UserInfo holds the information about the user needed to implement the +// user.Info interface. +message UserInfo { + // The name that uniquely identifies this user among all active users. + // +optional + optional string username = 1; + + // A unique value that identifies this user across time. If this user is + // deleted and another user by the same name is added, they will have + // different UIDs. + // +optional + optional string uid = 2; + + // The names of groups this user is a part of. + // +optional + repeated string groups = 3; + + // Any additional information provided by the authenticator. + // +optional + map extra = 4; +} + diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/register.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/register.go new file mode 100644 index 000000000..8661169af --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/register.go @@ -0,0 +1,48 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "authentication.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &TokenReview{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/types.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/types.go new file mode 100644 index 000000000..e6ff58705 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/types.go @@ -0,0 +1,91 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient=true +// +nonNamespaced=true +// +noMethods=true + +// TokenReview attempts to authenticate a token to a known user. +// Note: TokenReview requests may be cached by the webhook token authenticator +// plugin in the kube-apiserver. +type TokenReview struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec holds information about the request being evaluated + Spec TokenReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + + // Status is filled in by the server and indicates whether the request can be authenticated. + // +optional + Status TokenReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// TokenReviewSpec is a description of the token authentication request. +type TokenReviewSpec struct { + // Token is the opaque bearer token. + // +optional + Token string `json:"token,omitempty" protobuf:"bytes,1,opt,name=token"` +} + +// TokenReviewStatus is the result of the token authentication request. +type TokenReviewStatus struct { + // Authenticated indicates that the token was associated with a known user. + // +optional + Authenticated bool `json:"authenticated,omitempty" protobuf:"varint,1,opt,name=authenticated"` + // User is the UserInfo associated with the provided token. + // +optional + User UserInfo `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"` + // Error indicates that the token couldn't be checked + // +optional + Error string `json:"error,omitempty" protobuf:"bytes,3,opt,name=error"` +} + +// UserInfo holds the information about the user needed to implement the +// user.Info interface. +type UserInfo struct { + // The name that uniquely identifies this user among all active users. + // +optional + Username string `json:"username,omitempty" protobuf:"bytes,1,opt,name=username"` + // A unique value that identifies this user across time. If this user is + // deleted and another user by the same name is added, they will have + // different UIDs. + // +optional + UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"` + // The names of groups this user is a part of. + // +optional + Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"` + // Any additional information provided by the authenticator. + // +optional + Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,4,rep,name=extra"` +} + +// ExtraValue masks the value so protobuf can generate +// +protobuf.nullable=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +type ExtraValue []string + +func (t ExtraValue) String() string { + return fmt.Sprintf("%v", []string(t)) +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/types_swagger_doc_generated.go new file mode 100644 index 000000000..bb235e4ea --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/types_swagger_doc_generated.go @@ -0,0 +1,72 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_TokenReview = map[string]string{ + "": "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.", + "spec": "Spec holds information about the request being evaluated", + "status": "Status is filled in by the server and indicates whether the request can be authenticated.", +} + +func (TokenReview) SwaggerDoc() map[string]string { + return map_TokenReview +} + +var map_TokenReviewSpec = map[string]string{ + "": "TokenReviewSpec is a description of the token authentication request.", + "token": "Token is the opaque bearer token.", +} + +func (TokenReviewSpec) SwaggerDoc() map[string]string { + return map_TokenReviewSpec +} + +var map_TokenReviewStatus = map[string]string{ + "": "TokenReviewStatus is the result of the token authentication request.", + "authenticated": "Authenticated indicates that the token was associated with a known user.", + "user": "User is the UserInfo associated with the provided token.", + "error": "Error indicates that the token couldn't be checked", +} + +func (TokenReviewStatus) SwaggerDoc() map[string]string { + return map_TokenReviewStatus +} + +var map_UserInfo = map[string]string{ + "": "UserInfo holds the information about the user needed to implement the user.Info interface.", + "username": "The name that uniquely identifies this user among all active users.", + "uid": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", + "groups": "The names of groups this user is a part of.", + "extra": "Any additional information provided by the authenticator.", +} + +func (UserInfo) SwaggerDoc() map[string]string { + return map_UserInfo +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.conversion.go new file mode 100644 index 000000000..9c1335e91 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.conversion.go @@ -0,0 +1,145 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1 + +import ( + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + authentication "k8s.io/client-go/pkg/apis/authentication" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1_TokenReview_To_authentication_TokenReview, + Convert_authentication_TokenReview_To_v1_TokenReview, + Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec, + Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec, + Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus, + Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus, + Convert_v1_UserInfo_To_authentication_UserInfo, + Convert_authentication_UserInfo_To_v1_UserInfo, + ) +} + +func autoConvert_v1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error { + return autoConvert_v1_TokenReview_To_authentication_TokenReview(in, out, s) +} + +func autoConvert_authentication_TokenReview_To_v1_TokenReview(in *authentication.TokenReview, out *TokenReview, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_authentication_TokenReview_To_v1_TokenReview(in *authentication.TokenReview, out *TokenReview, s conversion.Scope) error { + return autoConvert_authentication_TokenReview_To_v1_TokenReview(in, out, s) +} + +func autoConvert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(in *TokenReviewSpec, out *authentication.TokenReviewSpec, s conversion.Scope) error { + out.Token = in.Token + return nil +} + +func Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(in *TokenReviewSpec, out *authentication.TokenReviewSpec, s conversion.Scope) error { + return autoConvert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(in, out, s) +} + +func autoConvert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(in *authentication.TokenReviewSpec, out *TokenReviewSpec, s conversion.Scope) error { + out.Token = in.Token + return nil +} + +func Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(in *authentication.TokenReviewSpec, out *TokenReviewSpec, s conversion.Scope) error { + return autoConvert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(in, out, s) +} + +func autoConvert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(in *TokenReviewStatus, out *authentication.TokenReviewStatus, s conversion.Scope) error { + out.Authenticated = in.Authenticated + if err := Convert_v1_UserInfo_To_authentication_UserInfo(&in.User, &out.User, s); err != nil { + return err + } + out.Error = in.Error + return nil +} + +func Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(in *TokenReviewStatus, out *authentication.TokenReviewStatus, s conversion.Scope) error { + return autoConvert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(in, out, s) +} + +func autoConvert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(in *authentication.TokenReviewStatus, out *TokenReviewStatus, s conversion.Scope) error { + out.Authenticated = in.Authenticated + if err := Convert_authentication_UserInfo_To_v1_UserInfo(&in.User, &out.User, s); err != nil { + return err + } + out.Error = in.Error + return nil +} + +func Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(in *authentication.TokenReviewStatus, out *TokenReviewStatus, s conversion.Scope) error { + return autoConvert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(in, out, s) +} + +func autoConvert_v1_UserInfo_To_authentication_UserInfo(in *UserInfo, out *authentication.UserInfo, s conversion.Scope) error { + out.Username = in.Username + out.UID = in.UID + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.Extra = *(*map[string]authentication.ExtraValue)(unsafe.Pointer(&in.Extra)) + return nil +} + +func Convert_v1_UserInfo_To_authentication_UserInfo(in *UserInfo, out *authentication.UserInfo, s conversion.Scope) error { + return autoConvert_v1_UserInfo_To_authentication_UserInfo(in, out, s) +} + +func autoConvert_authentication_UserInfo_To_v1_UserInfo(in *authentication.UserInfo, out *UserInfo, s conversion.Scope) error { + out.Username = in.Username + out.UID = in.UID + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra)) + return nil +} + +func Convert_authentication_UserInfo_To_v1_UserInfo(in *authentication.UserInfo, out *UserInfo, s conversion.Scope) error { + return autoConvert_authentication_UserInfo_To_v1_UserInfo(in, out, s) +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..0bc564067 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.deepcopy.go @@ -0,0 +1,106 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TokenReview, InType: reflect.TypeOf(&TokenReview{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_UserInfo, InType: reflect.TypeOf(&UserInfo{})}, + ) +} + +func DeepCopy_v1_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*TokenReview) + out := out.(*TokenReview) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) + } + if err := DeepCopy_v1_TokenReviewStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1_TokenReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*TokenReviewSpec) + out := out.(*TokenReviewSpec) + *out = *in + return nil + } +} + +func DeepCopy_v1_TokenReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*TokenReviewStatus) + out := out.(*TokenReviewStatus) + *out = *in + if err := DeepCopy_v1_UserInfo(&in.User, &out.User, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1_UserInfo(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*UserInfo) + out := out.(*UserInfo) + *out = *in + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Extra != nil { + in, out := &in.Extra, &out.Extra + *out = make(map[string]ExtraValue) + for key, val := range *in { + if newVal, err := c.DeepCopy(&val); err != nil { + return err + } else { + (*out)[key] = *newVal.(*ExtraValue) + } + } + } + return nil + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.defaults.go new file mode 100644 index 000000000..6df448eb9 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/conversion.go similarity index 95% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/conversion.go rename to vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/conversion.go index 1f0001498..51f3adfc7 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/conversion.go +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/conversion.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" ) func addConversionFuncs(scheme *runtime.Scheme) error { diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/defaults.go similarity index 95% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/defaults.go rename to vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/defaults.go index d80bd84c0..1a4566479 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/defaults.go +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/defaults.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/doc.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/doc.go new file mode 100644 index 000000000..342f20126 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +groupName=authentication.k8s.io +package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.pb.go similarity index 85% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/generated.pb.go rename to vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.pb.go index 096d95586..760416e63 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/generated.pb.go +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -73,11 +73,11 @@ func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } func init() { - proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.1.5.pkg.apis.authentication.v1beta1.ExtraValue") - proto.RegisterType((*TokenReview)(nil), "k8s.io.client-go.1.5.pkg.apis.authentication.v1beta1.TokenReview") - proto.RegisterType((*TokenReviewSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.authentication.v1beta1.TokenReviewSpec") - proto.RegisterType((*TokenReviewStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.authentication.v1beta1.TokenReviewStatus") - proto.RegisterType((*UserInfo)(nil), "k8s.io.client-go.1.5.pkg.apis.authentication.v1beta1.UserInfo") + proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.pkg.apis.authentication.v1beta1.ExtraValue") + proto.RegisterType((*TokenReview)(nil), "k8s.io.client-go.pkg.apis.authentication.v1beta1.TokenReview") + proto.RegisterType((*TokenReviewSpec)(nil), "k8s.io.client-go.pkg.apis.authentication.v1beta1.TokenReviewSpec") + proto.RegisterType((*TokenReviewStatus)(nil), "k8s.io.client-go.pkg.apis.authentication.v1beta1.TokenReviewStatus") + proto.RegisterType((*UserInfo)(nil), "k8s.io.client-go.pkg.apis.authentication.v1beta1.UserInfo") } func (m ExtraValue) Marshal() (data []byte, err error) { size := m.Size() @@ -390,7 +390,7 @@ func (this *TokenReview) String() string { return "nil" } s := strings.Join([]string{`&TokenReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TokenReviewSpec", "TokenReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TokenReviewStatus", "TokenReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1236,45 +1236,47 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 632 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x53, 0x4f, 0x4f, 0x13, 0x41, - 0x14, 0xef, 0x5f, 0x6c, 0xa7, 0xa2, 0x38, 0x89, 0x49, 0xd3, 0x44, 0x4a, 0xd6, 0x0b, 0x26, 0x30, - 0x9b, 0x92, 0xa8, 0x04, 0xe2, 0x81, 0x0d, 0x68, 0x38, 0x18, 0x93, 0x41, 0x8c, 0x31, 0xf1, 0xb0, - 0xed, 0x3e, 0x96, 0x75, 0xdb, 0x9d, 0x66, 0x76, 0xa6, 0xc8, 0x8d, 0x8f, 0xe0, 0xd1, 0xa3, 0xdf, - 0xc3, 0x2f, 0xd0, 0x23, 0x07, 0x0f, 0x1e, 0x0c, 0x11, 0xfc, 0x22, 0xce, 0xcc, 0x8e, 0xb4, 0xb4, - 0xf4, 0x20, 0x1c, 0x26, 0xd9, 0xf9, 0xcd, 0xfb, 0xfd, 0xde, 0xef, 0xbd, 0xb7, 0x0f, 0x6d, 0xc5, - 0xeb, 0x29, 0x89, 0x98, 0x1b, 0xcb, 0x36, 0xf0, 0x04, 0x04, 0xa4, 0x6e, 0x3f, 0x0e, 0x5d, 0xbf, - 0x1f, 0xa5, 0xae, 0x2f, 0xc5, 0x21, 0x24, 0x22, 0xea, 0xf8, 0x22, 0x62, 0x89, 0x3b, 0x68, 0xb5, - 0x41, 0xf8, 0x2d, 0x37, 0x84, 0x04, 0xb8, 0x2f, 0x20, 0x20, 0x7d, 0xce, 0x04, 0xc3, 0xad, 0x4c, - 0x82, 0x8c, 0x24, 0x88, 0x92, 0x20, 0x5a, 0x82, 0x5c, 0x95, 0x20, 0x56, 0xa2, 0xb1, 0x1a, 0x46, - 0xe2, 0x50, 0xb6, 0x49, 0x87, 0xf5, 0xdc, 0x90, 0x85, 0xcc, 0x35, 0x4a, 0x6d, 0x79, 0x60, 0x6e, - 0xe6, 0x62, 0xbe, 0xb2, 0x0c, 0x8d, 0xb5, 0x99, 0x26, 0x5d, 0x0e, 0x29, 0x93, 0xbc, 0x03, 0x93, - 0xae, 0x1a, 0x4f, 0x67, 0x73, 0x64, 0x32, 0x00, 0x9e, 0x2a, 0x3f, 0x10, 0x4c, 0xd1, 0x56, 0x66, - 0xd3, 0x06, 0x53, 0xa5, 0x37, 0x56, 0xaf, 0x8f, 0xe6, 0x52, 0x95, 0xdc, 0x9b, 0xf6, 0xd4, 0xba, - 0x3e, 0x5c, 0x8a, 0xa8, 0xeb, 0x46, 0x89, 0x48, 0x05, 0x9f, 0xa4, 0x38, 0xcf, 0x11, 0xda, 0xf9, - 0x2c, 0xb8, 0xff, 0xce, 0xef, 0x4a, 0xc0, 0x4d, 0x54, 0x8e, 0x04, 0xf4, 0xd2, 0x7a, 0x7e, 0xa9, - 0xb8, 0x5c, 0xf5, 0xaa, 0x17, 0x67, 0xcd, 0xf2, 0xae, 0x06, 0x68, 0x86, 0x6f, 0x54, 0xbe, 0x7e, - 0x6b, 0xe6, 0x4e, 0x7e, 0x2d, 0xe5, 0x9c, 0xef, 0x05, 0x54, 0x7b, 0xcb, 0x62, 0x48, 0x28, 0x0c, - 0x22, 0x38, 0xc2, 0xef, 0x51, 0xa5, 0xa7, 0x7a, 0x1f, 0xf8, 0xc2, 0x57, 0xec, 0xfc, 0x72, 0x6d, - 0x6d, 0x99, 0xcc, 0x1c, 0x9c, 0x1a, 0x14, 0x79, 0xd3, 0xfe, 0x04, 0x1d, 0xf1, 0x5a, 0x71, 0x3c, - 0x3c, 0x3c, 0x6b, 0xe6, 0x54, 0x2e, 0x34, 0xc2, 0xe8, 0xa5, 0x1a, 0x0e, 0x50, 0x29, 0xed, 0x43, - 0xa7, 0x5e, 0x30, 0xaa, 0x1e, 0xf9, 0xef, 0xdf, 0x81, 0x8c, 0xf9, 0xdc, 0x53, 0x4a, 0xde, 0x5d, - 0x9b, 0xaf, 0xa4, 0x6f, 0xd4, 0xa8, 0xe3, 0x2e, 0x9a, 0x4b, 0x85, 0x2f, 0x64, 0x5a, 0x2f, 0x9a, - 0x3c, 0xdb, 0xb7, 0xcc, 0x63, 0xb4, 0xbc, 0x7b, 0x36, 0xd3, 0x5c, 0x76, 0xa7, 0x36, 0x87, 0xf3, - 0x0c, 0xdd, 0x9f, 0x30, 0x85, 0x1f, 0xa3, 0xb2, 0xd0, 0x90, 0xe9, 0x5e, 0xd5, 0x9b, 0xb7, 0xcc, - 0x72, 0x16, 0x97, 0xbd, 0x39, 0x3f, 0xf2, 0xe8, 0xc1, 0x54, 0x16, 0xbc, 0x89, 0xe6, 0xc7, 0x1c, - 0x41, 0x60, 0x24, 0x2a, 0xde, 0x43, 0x2b, 0x31, 0xbf, 0x35, 0xfe, 0x48, 0xaf, 0xc6, 0xe2, 0x8f, - 0xa8, 0x24, 0x53, 0xe0, 0xb6, 0xbd, 0x9b, 0x37, 0x28, 0x7b, 0x5f, 0xd1, 0x77, 0x93, 0x03, 0x36, - 0xea, 0xab, 0x46, 0xa8, 0x91, 0xd5, 0x65, 0x01, 0xe7, 0x8c, 0x9b, 0xb6, 0x8e, 0x95, 0xb5, 0xa3, - 0x41, 0x9a, 0xbd, 0x39, 0xe7, 0x05, 0x54, 0xf9, 0xa7, 0x82, 0x57, 0x50, 0x45, 0x33, 0x13, 0xbf, - 0x07, 0xb6, 0x17, 0x0b, 0x96, 0x64, 0x62, 0x34, 0x4e, 0x2f, 0x23, 0xf0, 0x23, 0x54, 0x94, 0x51, - 0x60, 0xdc, 0x57, 0xbd, 0x9a, 0x0d, 0x2c, 0xee, 0xef, 0x6e, 0x53, 0x8d, 0x63, 0x07, 0xcd, 0x85, - 0x9c, 0xc9, 0xbe, 0x1e, 0xab, 0xfe, 0xa5, 0x91, 0x1e, 0xc6, 0x2b, 0x83, 0x50, 0xfb, 0x82, 0x63, - 0x65, 0x51, 0xef, 0x40, 0xbd, 0xa4, 0x42, 0x6a, 0x6b, 0x2f, 0x6f, 0xd1, 0x02, 0x62, 0x96, 0x69, - 0x27, 0x11, 0xfc, 0x78, 0xac, 0x54, 0x8d, 0xd1, 0x2c, 0x47, 0xe3, 0xc8, 0x2e, 0x9c, 0x89, 0xc1, - 0x0b, 0xa8, 0x18, 0xc3, 0x71, 0x56, 0x26, 0xd5, 0x9f, 0x78, 0x0f, 0x95, 0x07, 0x7a, 0x17, 0xed, - 0x3c, 0x5e, 0xdc, 0xc0, 0xcc, 0x68, 0xa1, 0x69, 0xa6, 0xb5, 0x51, 0x58, 0xcf, 0x7b, 0x4f, 0x86, - 0xe7, 0x8b, 0xb9, 0x53, 0x75, 0x7e, 0xaa, 0x73, 0x72, 0xb1, 0x98, 0x1f, 0xaa, 0x73, 0xaa, 0xce, - 0x6f, 0x75, 0xbe, 0xfc, 0x59, 0xcc, 0x7d, 0xb8, 0x63, 0x05, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, - 0xca, 0xd0, 0x35, 0x8c, 0xb5, 0x05, 0x00, 0x00, + // 668 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x53, 0x4d, 0x6f, 0xd3, 0x4a, + 0x14, 0x8d, 0xf3, 0xd1, 0x97, 0x4c, 0x5e, 0xdf, 0xeb, 0x1b, 0xe9, 0x49, 0x51, 0x24, 0x9c, 0x28, + 0x6c, 0x8a, 0x54, 0xc6, 0xa4, 0xa0, 0x52, 0xb5, 0x62, 0x51, 0xab, 0x05, 0x75, 0x81, 0x90, 0xa6, + 0x94, 0x05, 0x12, 0x12, 0x13, 0xe7, 0xd6, 0x31, 0x8e, 0x3f, 0x34, 0x1e, 0xa7, 0xed, 0xae, 0x3f, + 0x81, 0x25, 0x4b, 0xfe, 0x0b, 0x9b, 0x2e, 0xbb, 0x60, 0xc1, 0x02, 0x55, 0x24, 0xfc, 0x11, 0x34, + 0xe3, 0xa1, 0x76, 0x49, 0x2b, 0x44, 0xbb, 0xf3, 0x9c, 0x7b, 0xcf, 0xb9, 0xf7, 0xdc, 0xeb, 0x8b, + 0xb6, 0xfc, 0xf5, 0x84, 0x78, 0x91, 0xe5, 0xa7, 0x03, 0xe0, 0x21, 0x08, 0x48, 0xac, 0xd8, 0x77, + 0x2d, 0x16, 0x7b, 0x89, 0xc5, 0x52, 0x31, 0x82, 0x50, 0x78, 0x0e, 0x13, 0x5e, 0x14, 0x5a, 0x93, + 0xfe, 0x00, 0x04, 0xeb, 0x5b, 0x2e, 0x84, 0xc0, 0x99, 0x80, 0x21, 0x89, 0x79, 0x24, 0x22, 0xdc, + 0xcf, 0x24, 0x48, 0x2e, 0x41, 0x62, 0xdf, 0x25, 0x52, 0x82, 0x5c, 0x96, 0x20, 0x5a, 0xa2, 0x7d, + 0xdf, 0xf5, 0xc4, 0x28, 0x1d, 0x10, 0x27, 0x0a, 0x2c, 0x37, 0x72, 0x23, 0x4b, 0x29, 0x0d, 0xd2, + 0x03, 0xf5, 0x52, 0x0f, 0xf5, 0x95, 0x55, 0x68, 0x3f, 0xd2, 0x4d, 0xb2, 0xd8, 0x0b, 0x98, 0x33, + 0xf2, 0x42, 0xe0, 0xc7, 0x79, 0x9b, 0x01, 0x08, 0x66, 0x4d, 0xe6, 0xfa, 0x6a, 0x5b, 0xd7, 0xb1, + 0x78, 0x1a, 0x0a, 0x2f, 0x80, 0x39, 0xc2, 0xda, 0xef, 0x08, 0x89, 0x33, 0x82, 0x80, 0xcd, 0xf1, + 0x1e, 0x5e, 0xc7, 0x4b, 0x85, 0x37, 0xb6, 0xbc, 0x50, 0x24, 0x82, 0xcf, 0x91, 0x0a, 0x9e, 0x12, + 0xe0, 0x13, 0xe0, 0xb9, 0x21, 0x38, 0x62, 0x41, 0x3c, 0x86, 0xab, 0x3c, 0xad, 0x5c, 0xbb, 0xae, + 0x2b, 0xb2, 0x7b, 0x8f, 0x11, 0xda, 0x39, 0x12, 0x9c, 0xbd, 0x62, 0xe3, 0x14, 0x70, 0x07, 0xd5, + 0x3c, 0x01, 0x41, 0xd2, 0x32, 0xba, 0x95, 0xe5, 0x86, 0xdd, 0x98, 0x9d, 0x77, 0x6a, 0xbb, 0x12, + 0xa0, 0x19, 0xbe, 0x51, 0xff, 0xf0, 0xb1, 0x53, 0x3a, 0xf9, 0xda, 0x2d, 0xf5, 0x3e, 0x95, 0x51, + 0xf3, 0x65, 0xe4, 0x43, 0x48, 0x61, 0xe2, 0xc1, 0x21, 0x7e, 0x8b, 0xea, 0x72, 0xca, 0x43, 0x26, + 0x58, 0xcb, 0xe8, 0x1a, 0xcb, 0xcd, 0xd5, 0x07, 0x44, 0x6f, 0xbd, 0x68, 0x3a, 0xdf, 0xbb, 0xcc, + 0x26, 0x93, 0x3e, 0x79, 0x31, 0x78, 0x07, 0x8e, 0x78, 0x0e, 0x82, 0xd9, 0xf8, 0xf4, 0xbc, 0x53, + 0x9a, 0x9d, 0x77, 0x50, 0x8e, 0xd1, 0x0b, 0x55, 0x3c, 0x44, 0xd5, 0x24, 0x06, 0xa7, 0x55, 0x56, + 0xea, 0x36, 0xf9, 0xe3, 0x7f, 0x8a, 0x14, 0xfa, 0xdd, 0x8b, 0xc1, 0xb1, 0xff, 0xd6, 0xf5, 0xaa, + 0xf2, 0x45, 0x95, 0x3a, 0x1e, 0xa3, 0x85, 0x44, 0x30, 0x91, 0x26, 0xad, 0x8a, 0xaa, 0xb3, 0x7d, + 0xcb, 0x3a, 0x4a, 0xcb, 0xfe, 0x47, 0x57, 0x5a, 0xc8, 0xde, 0x54, 0xd7, 0xe8, 0xad, 0xa1, 0x7f, + 0x7f, 0x69, 0x0a, 0xdf, 0x45, 0x35, 0x21, 0x21, 0x35, 0xc5, 0x86, 0xbd, 0xa8, 0x99, 0xb5, 0x2c, + 0x2f, 0x8b, 0xf5, 0x3e, 0x1b, 0xe8, 0xbf, 0xb9, 0x2a, 0x78, 0x13, 0x2d, 0x16, 0x3a, 0x82, 0xa1, + 0x92, 0xa8, 0xdb, 0xff, 0x6b, 0x89, 0xc5, 0xad, 0x62, 0x90, 0x5e, 0xce, 0xc5, 0x6f, 0x50, 0x35, + 0x4d, 0x80, 0xeb, 0xf1, 0x6e, 0xde, 0xc0, 0xf6, 0x7e, 0x02, 0x7c, 0x37, 0x3c, 0x88, 0xf2, 0xb9, + 0x4a, 0x84, 0x2a, 0x59, 0x69, 0x0b, 0x38, 0x8f, 0xb8, 0x1a, 0x6b, 0xc1, 0xd6, 0x8e, 0x04, 0x69, + 0x16, 0xeb, 0x4d, 0xcb, 0xa8, 0xfe, 0x53, 0x05, 0xaf, 0xa0, 0xba, 0x64, 0x86, 0x2c, 0x00, 0x3d, + 0x8b, 0x25, 0x4d, 0x52, 0x39, 0x12, 0xa7, 0x17, 0x19, 0xf8, 0x0e, 0xaa, 0xa4, 0xde, 0x50, 0x75, + 0xdf, 0xb0, 0x9b, 0x3a, 0xb1, 0xb2, 0xbf, 0xbb, 0x4d, 0x25, 0x8e, 0x7b, 0x68, 0xc1, 0xe5, 0x51, + 0x1a, 0xcb, 0xb5, 0xca, 0x5f, 0x1b, 0xc9, 0x65, 0x3c, 0x53, 0x08, 0xd5, 0x11, 0xec, 0xa3, 0x1a, + 0xc8, 0x5b, 0x68, 0x55, 0xbb, 0x95, 0xe5, 0xe6, 0xea, 0xd3, 0x5b, 0x8c, 0x80, 0xa8, 0xa3, 0xda, + 0x09, 0x05, 0x3f, 0x2e, 0x58, 0x95, 0x18, 0xcd, 0x6a, 0xb4, 0x0f, 0xf5, 0xe1, 0xa9, 0x1c, 0xbc, + 0x84, 0x2a, 0x3e, 0x1c, 0x67, 0x36, 0xa9, 0xfc, 0xc4, 0x7b, 0xa8, 0x36, 0x91, 0x37, 0xa9, 0xf7, + 0xf1, 0xe4, 0x06, 0xcd, 0xe4, 0x87, 0x4d, 0x33, 0xad, 0x8d, 0xf2, 0xba, 0x61, 0xdf, 0x3b, 0x9d, + 0x9a, 0xa5, 0xb3, 0xa9, 0x59, 0xfa, 0x32, 0x35, 0x4b, 0x27, 0x33, 0xd3, 0x38, 0x9d, 0x99, 0xc6, + 0xd9, 0xcc, 0x34, 0xbe, 0xcd, 0x4c, 0xe3, 0xfd, 0x77, 0xb3, 0xf4, 0xfa, 0x2f, 0x2d, 0xf0, 0x23, + 0x00, 0x00, 0xff, 0xff, 0xb9, 0x87, 0xc6, 0x94, 0xfa, 0x05, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.proto similarity index 82% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/generated.proto rename to vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.proto index ac148e207..cbc050970 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/generated.proto +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,11 +21,12 @@ syntax = 'proto2'; package k8s.io.kubernetes.pkg.apis.authentication.v1beta1; -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; -import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; @@ -43,30 +44,36 @@ message ExtraValue { // Note: TokenReview requests may be cached by the webhook token authenticator // plugin in the kube-apiserver. message TokenReview { - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated optional TokenReviewSpec spec = 2; // Status is filled in by the server and indicates whether the request can be authenticated. + // +optional optional TokenReviewStatus status = 3; } // TokenReviewSpec is a description of the token authentication request. message TokenReviewSpec { // Token is the opaque bearer token. + // +optional optional string token = 1; } // TokenReviewStatus is the result of the token authentication request. message TokenReviewStatus { // Authenticated indicates that the token was associated with a known user. + // +optional optional bool authenticated = 1; // User is the UserInfo associated with the provided token. + // +optional optional UserInfo user = 2; // Error indicates that the token couldn't be checked + // +optional optional string error = 3; } @@ -74,17 +81,21 @@ message TokenReviewStatus { // user.Info interface. message UserInfo { // The name that uniquely identifies this user among all active users. + // +optional optional string username = 1; // A unique value that identifies this user across time. If this user is // deleted and another user by the same name is added, they will have // different UIDs. + // +optional optional string uid = 2; // The names of groups this user is a part of. + // +optional repeated string groups = 3; // Any additional information provided by the authenticator. + // +optional map extra = 4; } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/register.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/register.go similarity index 69% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/register.go rename to vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/register.go index 430ff0527..ddaa19702 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/register.go @@ -17,16 +17,21 @@ limitations under the License. package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/runtime" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "authentication.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1beta1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs) @@ -36,11 +41,8 @@ var ( // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &v1.ExportOptions{}, - &TokenReview{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.generated.go similarity index 61% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/types.generated.go rename to vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.generated.go index 8076b845c..b8990af18 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/types.generated.go +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.generated.go @@ -25,9 +25,8 @@ import ( "errors" "fmt" codec1978 "github.com/ugorji/go/codec" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg2_v1 "k8s.io/client-go/1.5/pkg/api/v1" - pkg3_types "k8s.io/client-go/1.5/pkg/types" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -63,11 +62,10 @@ func init() { panic(err) } if false { // reference the types, but skip this branch at build/run time - var v0 pkg1_unversioned.TypeMeta - var v1 pkg2_v1.ObjectMeta - var v2 pkg3_types.UID - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v0 pkg1_v1.TypeMeta + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *TokenReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -168,26 +172,32 @@ func (x *TokenReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy11 := &x.ObjectMeta - yy11.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy13 := &x.Spec - yy13.CodecEncodeSelf(e) + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy14 := &x.Spec - yy14.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[4] { - yy16 := &x.Status - yy16.CodecEncodeSelf(e) + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } @@ -196,8 +206,8 @@ func (x *TokenReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy17 := &x.Status - yy17.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } if yyr2 || yy2arr2 { @@ -213,25 +223,25 @@ func (x *TokenReview) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym18 := z.DecBinary() - _ = yym18 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct19 := r.ContainerType() - if yyct19 == codecSelferValueTypeMap1234 { - yyl19 := r.ReadMapStart() - if yyl19 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl19, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct19 == codecSelferValueTypeArray1234 { - yyl19 := r.ReadArrayStart() - if yyl19 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl19, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -243,12 +253,12 @@ func (x *TokenReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys20Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys20Slc - var yyhl20 bool = l >= 0 - for yyj20 := 0; ; yyj20++ { - if yyhl20 { - if yyj20 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -257,47 +267,65 @@ func (x *TokenReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys20Slc = r.DecodeBytes(yys20Slc, true, true) - yys20 := string(yys20Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys20 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv23 := &x.ObjectMeta - yyv23.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = TokenReviewSpec{} } else { - yyv24 := &x.Spec - yyv24.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = TokenReviewStatus{} } else { - yyv25 := &x.Status - yyv25.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys20) - } // end switch yys20 - } // end for yyj20 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -305,16 +333,16 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj26 int - var yyb26 bool - var yyhl26 bool = l >= 0 - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb26 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb26 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -322,15 +350,21 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb26 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb26 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -338,32 +372,44 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb26 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb26 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv29 := &x.ObjectMeta - yyv29.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb26 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb26 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -371,16 +417,16 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = TokenReviewSpec{} } else { - yyv30 := &x.Spec - yyv30.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb26 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb26 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -388,21 +434,21 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = TokenReviewStatus{} } else { - yyv31 := &x.Status - yyv31.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb26 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb26 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj26-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -414,35 +460,35 @@ func (x *TokenReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym32 := z.EncBinary() - _ = yym32 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep33 := !z.EncBinary() - yy2arr33 := z.EncBasicHandle().StructToArray - var yyq33 [1]bool - _, _, _ = yysep33, yyq33, yy2arr33 - const yyr33 bool = false - yyq33[0] = x.Token != "" - var yynn33 int - if yyr33 || yy2arr33 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [1]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Token != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(1) } else { - yynn33 = 0 - for _, b := range yyq33 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn33++ + yynn2++ } } - r.EncodeMapStart(yynn33) - yynn33 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr33 || yy2arr33 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[0] { - yym35 := z.EncBinary() - _ = yym35 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Token)) @@ -451,19 +497,19 @@ func (x *TokenReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq33[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("token")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym36 := z.EncBinary() - _ = yym36 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Token)) } } } - if yyr33 || yy2arr33 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -476,25 +522,25 @@ func (x *TokenReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym37 := z.DecBinary() - _ = yym37 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct38 := r.ContainerType() - if yyct38 == codecSelferValueTypeMap1234 { - yyl38 := r.ReadMapStart() - if yyl38 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl38, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct38 == codecSelferValueTypeArray1234 { - yyl38 := r.ReadArrayStart() - if yyl38 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl38, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -506,12 +552,12 @@ func (x *TokenReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys39Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys39Slc - var yyhl39 bool = l >= 0 - for yyj39 := 0; ; yyj39++ { - if yyhl39 { - if yyj39 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -520,20 +566,26 @@ func (x *TokenReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys39Slc = r.DecodeBytes(yys39Slc, true, true) - yys39 := string(yys39Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys39 { + switch yys3 { case "token": if r.TryDecodeAsNil() { x.Token = "" } else { - x.Token = string(r.DecodeString()) + yyv4 := &x.Token + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys39) - } // end switch yys39 - } // end for yyj39 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -541,16 +593,16 @@ func (x *TokenReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj41 int - var yyb41 bool - var yyhl41 bool = l >= 0 - yyj41++ - if yyhl41 { - yyb41 = yyj41 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb41 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb41 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -558,20 +610,26 @@ func (x *TokenReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Token = "" } else { - x.Token = string(r.DecodeString()) + yyv7 := &x.Token + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*string)(yyv7)) = r.DecodeString() + } } for { - yyj41++ - if yyhl41 { - yyb41 = yyj41 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb41 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb41 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj41-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -583,37 +641,37 @@ func (x *TokenReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym43 := z.EncBinary() - _ = yym43 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep44 := !z.EncBinary() - yy2arr44 := z.EncBasicHandle().StructToArray - var yyq44 [3]bool - _, _, _ = yysep44, yyq44, yy2arr44 - const yyr44 bool = false - yyq44[0] = x.Authenticated != false - yyq44[1] = true - yyq44[2] = x.Error != "" - var yynn44 int - if yyr44 || yy2arr44 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Authenticated != false + yyq2[1] = true + yyq2[2] = x.Error != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(3) } else { - yynn44 = 0 - for _, b := range yyq44 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn44++ + yynn2++ } } - r.EncodeMapStart(yynn44) - yynn44 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr44 || yy2arr44 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq44[0] { - yym46 := z.EncBinary() - _ = yym46 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeBool(bool(x.Authenticated)) @@ -622,40 +680,40 @@ func (x *TokenReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq44[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("authenticated")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym47 := z.EncBinary() - _ = yym47 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeBool(bool(x.Authenticated)) } } } - if yyr44 || yy2arr44 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq44[1] { - yy49 := &x.User - yy49.CodecEncodeSelf(e) + if yyq2[1] { + yy7 := &x.User + yy7.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq44[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("user")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy50 := &x.User - yy50.CodecEncodeSelf(e) + yy9 := &x.User + yy9.CodecEncodeSelf(e) } } - if yyr44 || yy2arr44 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq44[2] { - yym52 := z.EncBinary() - _ = yym52 + if yyq2[2] { + yym12 := z.EncBinary() + _ = yym12 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Error)) @@ -664,19 +722,19 @@ func (x *TokenReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq44[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("error")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym53 := z.EncBinary() - _ = yym53 + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Error)) } } } - if yyr44 || yy2arr44 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -689,25 +747,25 @@ func (x *TokenReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym54 := z.DecBinary() - _ = yym54 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct55 := r.ContainerType() - if yyct55 == codecSelferValueTypeMap1234 { - yyl55 := r.ReadMapStart() - if yyl55 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl55, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct55 == codecSelferValueTypeArray1234 { - yyl55 := r.ReadArrayStart() - if yyl55 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl55, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -719,12 +777,12 @@ func (x *TokenReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys56Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys56Slc - var yyhl56 bool = l >= 0 - for yyj56 := 0; ; yyj56++ { - if yyhl56 { - if yyj56 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -733,33 +791,45 @@ func (x *TokenReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys56Slc = r.DecodeBytes(yys56Slc, true, true) - yys56 := string(yys56Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys56 { + switch yys3 { case "authenticated": if r.TryDecodeAsNil() { x.Authenticated = false } else { - x.Authenticated = bool(r.DecodeBool()) + yyv4 := &x.Authenticated + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*bool)(yyv4)) = r.DecodeBool() + } } case "user": if r.TryDecodeAsNil() { x.User = UserInfo{} } else { - yyv58 := &x.User - yyv58.CodecDecodeSelf(d) + yyv6 := &x.User + yyv6.CodecDecodeSelf(d) } case "error": if r.TryDecodeAsNil() { x.Error = "" } else { - x.Error = string(r.DecodeString()) + yyv7 := &x.Error + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*string)(yyv7)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys56) - } // end switch yys56 - } // end for yyj56 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -767,16 +837,16 @@ func (x *TokenReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj60 int - var yyb60 bool - var yyhl60 bool = l >= 0 - yyj60++ - if yyhl60 { - yyb60 = yyj60 > l + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb60 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb60 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -784,15 +854,21 @@ func (x *TokenReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Authenticated = false } else { - x.Authenticated = bool(r.DecodeBool()) + yyv10 := &x.Authenticated + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(yyv10)) = r.DecodeBool() + } } - yyj60++ - if yyhl60 { - yyb60 = yyj60 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb60 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb60 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -800,16 +876,16 @@ func (x *TokenReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.User = UserInfo{} } else { - yyv62 := &x.User - yyv62.CodecDecodeSelf(d) + yyv12 := &x.User + yyv12.CodecDecodeSelf(d) } - yyj60++ - if yyhl60 { - yyb60 = yyj60 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb60 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb60 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -817,20 +893,26 @@ func (x *TokenReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Error = "" } else { - x.Error = string(r.DecodeString()) + yyv13 := &x.Error + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } for { - yyj60++ - if yyhl60 { - yyb60 = yyj60 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb60 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb60 { + if yyb9 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj60-1, "") + z.DecStructFieldNotFound(yyj9-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -842,38 +924,38 @@ func (x *UserInfo) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym64 := z.EncBinary() - _ = yym64 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep65 := !z.EncBinary() - yy2arr65 := z.EncBasicHandle().StructToArray - var yyq65 [4]bool - _, _, _ = yysep65, yyq65, yy2arr65 - const yyr65 bool = false - yyq65[0] = x.Username != "" - yyq65[1] = x.UID != "" - yyq65[2] = len(x.Groups) != 0 - yyq65[3] = len(x.Extra) != 0 - var yynn65 int - if yyr65 || yy2arr65 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Username != "" + yyq2[1] = x.UID != "" + yyq2[2] = len(x.Groups) != 0 + yyq2[3] = len(x.Extra) != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn65 = 0 - for _, b := range yyq65 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn65++ + yynn2++ } } - r.EncodeMapStart(yynn65) - yynn65 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr65 || yy2arr65 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[0] { - yym67 := z.EncBinary() - _ = yym67 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Username)) @@ -882,23 +964,23 @@ func (x *UserInfo) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq65[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("username")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym68 := z.EncBinary() - _ = yym68 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Username)) } } } - if yyr65 || yy2arr65 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[1] { - yym70 := z.EncBinary() - _ = yym70 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.UID)) @@ -907,26 +989,26 @@ func (x *UserInfo) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq65[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("uid")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym71 := z.EncBinary() - _ = yym71 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.UID)) } } } - if yyr65 || yy2arr65 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[2] { + if yyq2[2] { if x.Groups == nil { r.EncodeNil() } else { - yym73 := z.EncBinary() - _ = yym73 + yym10 := z.EncBinary() + _ = yym10 if false { } else { z.F.EncSliceStringV(x.Groups, false, e) @@ -936,15 +1018,15 @@ func (x *UserInfo) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq65[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("groups")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Groups == nil { r.EncodeNil() } else { - yym74 := z.EncBinary() - _ = yym74 + yym11 := z.EncBinary() + _ = yym11 if false { } else { z.F.EncSliceStringV(x.Groups, false, e) @@ -952,14 +1034,14 @@ func (x *UserInfo) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr65 || yy2arr65 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq65[3] { + if yyq2[3] { if x.Extra == nil { r.EncodeNil() } else { - yym76 := z.EncBinary() - _ = yym76 + yym13 := z.EncBinary() + _ = yym13 if false { } else { h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e) @@ -969,15 +1051,15 @@ func (x *UserInfo) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq65[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("extra")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Extra == nil { r.EncodeNil() } else { - yym77 := z.EncBinary() - _ = yym77 + yym14 := z.EncBinary() + _ = yym14 if false { } else { h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e) @@ -985,7 +1067,7 @@ func (x *UserInfo) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr65 || yy2arr65 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -998,25 +1080,25 @@ func (x *UserInfo) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym78 := z.DecBinary() - _ = yym78 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct79 := r.ContainerType() - if yyct79 == codecSelferValueTypeMap1234 { - yyl79 := r.ReadMapStart() - if yyl79 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl79, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct79 == codecSelferValueTypeArray1234 { - yyl79 := r.ReadArrayStart() - if yyl79 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl79, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -1028,12 +1110,12 @@ func (x *UserInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys80Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys80Slc - var yyhl80 bool = l >= 0 - for yyj80 := 0; ; yyj80++ { - if yyhl80 { - if yyj80 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -1042,50 +1124,62 @@ func (x *UserInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys80Slc = r.DecodeBytes(yys80Slc, true, true) - yys80 := string(yys80Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys80 { + switch yys3 { case "username": if r.TryDecodeAsNil() { x.Username = "" } else { - x.Username = string(r.DecodeString()) + yyv4 := &x.Username + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "uid": if r.TryDecodeAsNil() { x.UID = "" } else { - x.UID = string(r.DecodeString()) + yyv6 := &x.UID + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "groups": if r.TryDecodeAsNil() { x.Groups = nil } else { - yyv83 := &x.Groups - yym84 := z.DecBinary() - _ = yym84 + yyv8 := &x.Groups + yym9 := z.DecBinary() + _ = yym9 if false { } else { - z.F.DecSliceStringX(yyv83, false, d) + z.F.DecSliceStringX(yyv8, false, d) } } case "extra": if r.TryDecodeAsNil() { x.Extra = nil } else { - yyv85 := &x.Extra - yym86 := z.DecBinary() - _ = yym86 + yyv10 := &x.Extra + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decMapstringExtraValue((*map[string]ExtraValue)(yyv85), d) + h.decMapstringExtraValue((*map[string]ExtraValue)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys80) - } // end switch yys80 - } // end for yyj80 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -1093,16 +1187,16 @@ func (x *UserInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj87 int - var yyb87 bool - var yyhl87 bool = l >= 0 - yyj87++ - if yyhl87 { - yyb87 = yyj87 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb87 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb87 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1110,15 +1204,21 @@ func (x *UserInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Username = "" } else { - x.Username = string(r.DecodeString()) + yyv13 := &x.Username + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj87++ - if yyhl87 { - yyb87 = yyj87 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb87 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb87 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1126,15 +1226,21 @@ func (x *UserInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.UID = "" } else { - x.UID = string(r.DecodeString()) + yyv15 := &x.UID + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj87++ - if yyhl87 { - yyb87 = yyj87 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb87 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb87 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1142,21 +1248,21 @@ func (x *UserInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Groups = nil } else { - yyv90 := &x.Groups - yym91 := z.DecBinary() - _ = yym91 + yyv17 := &x.Groups + yym18 := z.DecBinary() + _ = yym18 if false { } else { - z.F.DecSliceStringX(yyv90, false, d) + z.F.DecSliceStringX(yyv17, false, d) } } - yyj87++ - if yyhl87 { - yyb87 = yyj87 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb87 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb87 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1164,26 +1270,26 @@ func (x *UserInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Extra = nil } else { - yyv92 := &x.Extra - yym93 := z.DecBinary() - _ = yym93 + yyv19 := &x.Extra + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decMapstringExtraValue((*map[string]ExtraValue)(yyv92), d) + h.decMapstringExtraValue((*map[string]ExtraValue)(yyv19), d) } } for { - yyj87++ - if yyhl87 { - yyb87 = yyj87 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb87 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb87 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj87-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1195,8 +1301,8 @@ func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym94 := z.EncBinary() - _ = yym94 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -1209,8 +1315,8 @@ func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym95 := z.DecBinary() - _ = yym95 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -1223,19 +1329,19 @@ func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *code z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeMapStart(len(v)) - for yyk96, yyv96 := range v { + for yyk1, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerMapKey1234) - yym97 := z.EncBinary() - _ = yym97 + yym2 := z.EncBinary() + _ = yym2 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yyk96)) + r.EncodeString(codecSelferC_UTF81234, string(yyk1)) } z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyv96 == nil { + if yyv1 == nil { r.EncodeNil() } else { - yyv96.CodecEncodeSelf(e) + yyv1.CodecEncodeSelf(e) } } z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1246,70 +1352,82 @@ func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *cod z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv98 := *v - yyl98 := r.ReadMapStart() - yybh98 := z.DecBasicHandle() - if yyv98 == nil { - yyrl98, _ := z.DecInferLen(yyl98, yybh98.MaxInitLen, 40) - yyv98 = make(map[string]ExtraValue, yyrl98) - *v = yyv98 + yyv1 := *v + yyl1 := r.ReadMapStart() + yybh1 := z.DecBasicHandle() + if yyv1 == nil { + yyrl1, _ := z.DecInferLen(yyl1, yybh1.MaxInitLen, 40) + yyv1 = make(map[string]ExtraValue, yyrl1) + *v = yyv1 } - var yymk98 string - var yymv98 ExtraValue - var yymg98 bool - if yybh98.MapValueReset { - yymg98 = true + var yymk1 string + var yymv1 ExtraValue + var yymg1 bool + if yybh1.MapValueReset { + yymg1 = true } - if yyl98 > 0 { - for yyj98 := 0; yyj98 < yyl98; yyj98++ { + if yyl1 > 0 { + for yyj1 := 0; yyj1 < yyl1; yyj1++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk98 = "" + yymk1 = "" } else { - yymk98 = string(r.DecodeString()) + yyv2 := &yymk1 + yym3 := z.DecBinary() + _ = yym3 + if false { + } else { + *((*string)(yyv2)) = r.DecodeString() + } } - if yymg98 { - yymv98 = yyv98[yymk98] + if yymg1 { + yymv1 = yyv1[yymk1] } else { - yymv98 = nil + yymv1 = nil } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv98 = nil + yymv1 = nil } else { - yyv100 := &yymv98 - yyv100.CodecDecodeSelf(d) + yyv4 := &yymv1 + yyv4.CodecDecodeSelf(d) } - if yyv98 != nil { - yyv98[yymk98] = yymv98 + if yyv1 != nil { + yyv1[yymk1] = yymv1 } } - } else if yyl98 < 0 { - for yyj98 := 0; !r.CheckBreak(); yyj98++ { + } else if yyl1 < 0 { + for yyj1 := 0; !r.CheckBreak(); yyj1++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk98 = "" + yymk1 = "" } else { - yymk98 = string(r.DecodeString()) + yyv5 := &yymk1 + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } } - if yymg98 { - yymv98 = yyv98[yymk98] + if yymg1 { + yymv1 = yyv1[yymk1] } else { - yymv98 = nil + yymv1 = nil } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv98 = nil + yymv1 = nil } else { - yyv102 := &yymv98 - yyv102.CodecDecodeSelf(d) + yyv7 := &yymv1 + yyv7.CodecDecodeSelf(d) } - if yyv98 != nil { - yyv98[yymk98] = yymv98 + if yyv1 != nil { + yyv1[yymk1] = yymv1 } } } // else len==0: TODO: Should we clear map entries? @@ -1321,13 +1439,13 @@ func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv103 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym104 := z.EncBinary() - _ = yym104 + yym2 := z.EncBinary() + _ = yym2 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yyv103)) + r.EncodeString(codecSelferC_UTF81234, string(yyv1)) } } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) @@ -1338,75 +1456,96 @@ func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv105 := *v - yyh105, yyl105 := z.DecSliceHelperStart() - var yyc105 bool - if yyl105 == 0 { - if yyv105 == nil { - yyv105 = []string{} - yyc105 = true - } else if len(yyv105) != 0 { - yyv105 = yyv105[:0] - yyc105 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []string{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl105 > 0 { - var yyrr105, yyrl105 int - var yyrt105 bool - if yyl105 > cap(yyv105) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrl105, yyrt105 = z.DecInferLen(yyl105, z.DecBasicHandle().MaxInitLen, 16) - if yyrt105 { - if yyrl105 <= cap(yyv105) { - yyv105 = yyv105[:yyrl105] + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv105 = make([]string, yyrl105) + yyv1 = make([]string, yyrl1) } } else { - yyv105 = make([]string, yyrl105) + yyv1 = make([]string, yyrl1) } - yyc105 = true - yyrr105 = len(yyv105) - } else if yyl105 != len(yyv105) { - yyv105 = yyv105[:yyl105] - yyc105 = true + yyc1 = true + yyrr1 = len(yyv1) + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj105 := 0 - for ; yyj105 < yyrr105; yyj105++ { - yyh105.ElemContainerState(yyj105) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv105[yyj105] = "" + yyv1[yyj1] = "" } else { - yyv105[yyj105] = string(r.DecodeString()) + yyv2 := &yyv1[yyj1] + yym3 := z.DecBinary() + _ = yym3 + if false { + } else { + *((*string)(yyv2)) = r.DecodeString() + } } } - if yyrt105 { - for ; yyj105 < yyl105; yyj105++ { - yyv105 = append(yyv105, "") - yyh105.ElemContainerState(yyj105) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, "") + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv105[yyj105] = "" + yyv1[yyj1] = "" } else { - yyv105[yyj105] = string(r.DecodeString()) + yyv4 := &yyv1[yyj1] + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } } } } else { - yyj105 := 0 - for ; !r.CheckBreak(); yyj105++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj105 >= len(yyv105) { - yyv105 = append(yyv105, "") // var yyz105 string - yyc105 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, "") // var yyz1 string + yyc1 = true } - yyh105.ElemContainerState(yyj105) - if yyj105 < len(yyv105) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv105[yyj105] = "" + yyv1[yyj1] = "" } else { - yyv105[yyj105] = string(r.DecodeString()) + yyv6 := &yyv1[yyj1] + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } } else { @@ -1414,16 +1553,16 @@ func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) { } } - if yyj105 < len(yyv105) { - yyv105 = yyv105[:yyj105] - yyc105 = true - } else if yyj105 == 0 && yyv105 == nil { - yyv105 = []string{} - yyc105 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []string{} + yyc1 = true } } - yyh105.End() - if yyc105 { - *v = yyv105 + yyh1.End() + if yyc1 { + *v = yyv1 } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.go similarity index 90% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/types.go rename to vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.go index aa5943bcd..57c96e3bc 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/types.go +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.go @@ -19,8 +19,7 @@ package v1beta1 import ( "fmt" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // +genclient=true @@ -31,29 +30,35 @@ import ( // Note: TokenReview requests may be cached by the webhook token authenticator // plugin in the kube-apiserver. type TokenReview struct { - unversioned.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec holds information about the request being evaluated Spec TokenReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` // Status is filled in by the server and indicates whether the request can be authenticated. + // +optional Status TokenReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // TokenReviewSpec is a description of the token authentication request. type TokenReviewSpec struct { // Token is the opaque bearer token. + // +optional Token string `json:"token,omitempty" protobuf:"bytes,1,opt,name=token"` } // TokenReviewStatus is the result of the token authentication request. type TokenReviewStatus struct { // Authenticated indicates that the token was associated with a known user. + // +optional Authenticated bool `json:"authenticated,omitempty" protobuf:"varint,1,opt,name=authenticated"` // User is the UserInfo associated with the provided token. + // +optional User UserInfo `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"` // Error indicates that the token couldn't be checked + // +optional Error string `json:"error,omitempty" protobuf:"bytes,3,opt,name=error"` } @@ -61,14 +66,18 @@ type TokenReviewStatus struct { // user.Info interface. type UserInfo struct { // The name that uniquely identifies this user among all active users. + // +optional Username string `json:"username,omitempty" protobuf:"bytes,1,opt,name=username"` // A unique value that identifies this user across time. If this user is // deleted and another user by the same name is added, they will have // different UIDs. + // +optional UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"` // The names of groups this user is a part of. + // +optional Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"` // Any additional information provided by the authenticator. + // +optional Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,4,rep,name=extra"` } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types_swagger_doc_generated.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/types_swagger_doc_generated.go rename to vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types_swagger_doc_generated.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.conversion.go similarity index 78% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/zz_generated.conversion.go rename to vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.conversion.go index 9c952e0a1..5fc83362f 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ limitations under the License. package v1beta1 import ( - api "k8s.io/client-go/1.5/pkg/api" - authentication "k8s.io/client-go/1.5/pkg/apis/authentication" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + authentication "k8s.io/client-go/pkg/apis/authentication" + unsafe "unsafe" ) func init() { @@ -47,13 +47,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -68,13 +62,7 @@ func Convert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, } func autoConvert_authentication_TokenReview_To_v1beta1_TokenReview(in *authentication.TokenReview, out *TokenReview, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -135,21 +123,8 @@ func Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus(in *a func autoConvert_v1beta1_UserInfo_To_authentication_UserInfo(in *UserInfo, out *authentication.UserInfo, s conversion.Scope) error { out.Username = in.Username out.UID = in.UID - out.Groups = in.Groups - if in.Extra != nil { - in, out := &in.Extra, &out.Extra - *out = make(map[string]authentication.ExtraValue, len(*in)) - for key, val := range *in { - newVal := new(authentication.ExtraValue) - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&val, newVal, 0); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Extra = nil - } + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.Extra = *(*map[string]authentication.ExtraValue)(unsafe.Pointer(&in.Extra)) return nil } @@ -160,21 +135,8 @@ func Convert_v1beta1_UserInfo_To_authentication_UserInfo(in *UserInfo, out *auth func autoConvert_authentication_UserInfo_To_v1beta1_UserInfo(in *authentication.UserInfo, out *UserInfo, s conversion.Scope) error { out.Username = in.Username out.UID = in.UID - out.Groups = in.Groups - if in.Extra != nil { - in, out := &in.Extra, &out.Extra - *out = make(map[string]ExtraValue, len(*in)) - for key, val := range *in { - newVal := new(ExtraValue) - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&val, newVal, 0); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Extra = nil - } + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra)) return nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go similarity index 84% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go index 9f5281766..01260cc13 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,9 +21,9 @@ limitations under the License. package v1beta1 import ( - v1 "k8s.io/client-go/1.5/pkg/api/v1" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" reflect "reflect" ) @@ -46,11 +46,12 @@ func DeepCopy_v1beta1_TokenReview(in interface{}, out interface{}, c *conversion { in := in.(*TokenReview) out := out.(*TokenReview) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } - out.Spec = in.Spec if err := DeepCopy_v1beta1_TokenReviewStatus(&in.Status, &out.Status, c); err != nil { return err } @@ -62,7 +63,7 @@ func DeepCopy_v1beta1_TokenReviewSpec(in interface{}, out interface{}, c *conver { in := in.(*TokenReviewSpec) out := out.(*TokenReviewSpec) - out.Token = in.Token + *out = *in return nil } } @@ -71,11 +72,10 @@ func DeepCopy_v1beta1_TokenReviewStatus(in interface{}, out interface{}, c *conv { in := in.(*TokenReviewStatus) out := out.(*TokenReviewStatus) - out.Authenticated = in.Authenticated + *out = *in if err := DeepCopy_v1beta1_UserInfo(&in.User, &out.User, c); err != nil { return err } - out.Error = in.Error return nil } } @@ -84,14 +84,11 @@ func DeepCopy_v1beta1_UserInfo(in interface{}, out interface{}, c *conversion.Cl { in := in.(*UserInfo) out := out.(*UserInfo) - out.Username = in.Username - out.UID = in.UID + *out = *in if in.Groups != nil { in, out := &in.Groups, &out.Groups *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Groups = nil } if in.Extra != nil { in, out := &in.Extra, &out.Extra @@ -103,8 +100,6 @@ func DeepCopy_v1beta1_UserInfo(in interface{}, out interface{}, c *conversion.Cl (*out)[key] = *newVal.(*ExtraValue) } } - } else { - out.Extra = nil } return nil } diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.defaults.go new file mode 100644 index 000000000..e24e70be3 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/authentication/zz_generated.deepcopy.go similarity index 85% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authentication/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/apis/authentication/zz_generated.deepcopy.go index 8b1b0a728..ec322c5f8 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authentication/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/apis/authentication/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,9 +21,9 @@ limitations under the License. package authentication import ( - api "k8s.io/client-go/1.5/pkg/api" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" reflect "reflect" ) @@ -46,11 +46,12 @@ func DeepCopy_authentication_TokenReview(in interface{}, out interface{}, c *con { in := in.(*TokenReview) out := out.(*TokenReview) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } - out.Spec = in.Spec if err := DeepCopy_authentication_TokenReviewStatus(&in.Status, &out.Status, c); err != nil { return err } @@ -62,7 +63,7 @@ func DeepCopy_authentication_TokenReviewSpec(in interface{}, out interface{}, c { in := in.(*TokenReviewSpec) out := out.(*TokenReviewSpec) - out.Token = in.Token + *out = *in return nil } } @@ -71,11 +72,10 @@ func DeepCopy_authentication_TokenReviewStatus(in interface{}, out interface{}, { in := in.(*TokenReviewStatus) out := out.(*TokenReviewStatus) - out.Authenticated = in.Authenticated + *out = *in if err := DeepCopy_authentication_UserInfo(&in.User, &out.User, c); err != nil { return err } - out.Error = in.Error return nil } } @@ -84,14 +84,11 @@ func DeepCopy_authentication_UserInfo(in interface{}, out interface{}, c *conver { in := in.(*UserInfo) out := out.(*UserInfo) - out.Username = in.Username - out.UID = in.UID + *out = *in if in.Groups != nil { in, out := &in.Groups, &out.Groups *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Groups = nil } if in.Extra != nil { in, out := &in.Extra, &out.Extra @@ -103,8 +100,6 @@ func DeepCopy_authentication_UserInfo(in interface{}, out interface{}, c *conver (*out)[key] = *newVal.(*ExtraValue) } } - } else { - out.Extra = nil } return nil } diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/OWNERS b/vendor/k8s.io/client-go/pkg/apis/authorization/OWNERS new file mode 100755 index 000000000..2fef50443 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/OWNERS @@ -0,0 +1,17 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- liggitt +- nikhiljindal +- erictune +- sttts +- ncdc +- timothysc +- dims +- mml +- mbohlool +- david-mcmahon +- jianhuiz diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/doc.go b/vendor/k8s.io/client-go/pkg/apis/authorization/doc.go new file mode 100644 index 000000000..91344f674 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +groupName=authorization.k8s.io +package authorization diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/install/install.go b/vendor/k8s.io/client-go/pkg/apis/authorization/install/install.go new file mode 100644 index 000000000..33eee6618 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/install/install.go @@ -0,0 +1,53 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package install installs the experimental API group, making it available as +// an option to all of the API encoding/decoding machinery. +package install + +import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/apis/authorization" + "k8s.io/client-go/pkg/apis/authorization/v1" + "k8s.io/client-go/pkg/apis/authorization/v1beta1" +) + +func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { + if err := announced.NewGroupMetaFactory( + &announced.GroupMetaFactoryArgs{ + GroupName: authorization.GroupName, + VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version, v1beta1.SchemeGroupVersion.Version}, + ImportPrefix: "k8s.io/client-go/pkg/apis/authorization", + RootScopedKinds: sets.NewString("SubjectAccessReview", "SelfSubjectAccessReview"), + AddInternalObjectsToScheme: authorization.AddToScheme, + }, + announced.VersionToSchemeFunc{ + v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, + v1.SchemeGroupVersion.Version: v1.AddToScheme, + }, + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { + panic(err) + } +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/register.go b/vendor/k8s.io/client-go/pkg/apis/authorization/register.go similarity index 82% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/register.go rename to vendor/k8s.io/client-go/pkg/apis/authorization/register.go index b911d49bd..5693885e4 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/register.go @@ -17,23 +17,23 @@ limitations under the License. package authorization import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "authorization.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} // Kind takes an unqualified kind and returns a Group qualified GroupKind -func Kind(kind string) unversioned.GroupKind { +func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) unversioned.GroupResource { +func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/types.go b/vendor/k8s.io/client-go/pkg/apis/authorization/types.go similarity index 96% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/types.go rename to vendor/k8s.io/client-go/pkg/apis/authorization/types.go index 81070c7e8..d8ccfaf35 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/types.go +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/types.go @@ -17,8 +17,7 @@ limitations under the License. package authorization import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // +genclient=true @@ -28,8 +27,8 @@ import ( // SubjectAccessReview checks whether or not a user or group can perform an action. Not filling in a // spec.namespace means "in all namespaces". type SubjectAccessReview struct { - unversioned.TypeMeta - api.ObjectMeta + metav1.TypeMeta + metav1.ObjectMeta // Spec holds information about the request being evaluated Spec SubjectAccessReviewSpec @@ -46,8 +45,8 @@ type SubjectAccessReview struct { // spec.namespace means "in all namespaces". Self is a special case, because users should always be able // to check whether they can perform an action type SelfSubjectAccessReview struct { - unversioned.TypeMeta - api.ObjectMeta + metav1.TypeMeta + metav1.ObjectMeta // Spec holds information about the request being evaluated. Spec SelfSubjectAccessReviewSpec @@ -63,8 +62,8 @@ type SelfSubjectAccessReview struct { // Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions // checking. type LocalSubjectAccessReview struct { - unversioned.TypeMeta - api.ObjectMeta + metav1.TypeMeta + metav1.ObjectMeta // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace // you made the request against. If empty, it is defaulted. diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/conversion.go new file mode 100644 index 000000000..2ff5732d6 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/conversion.go @@ -0,0 +1,26 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addConversionFuncs(scheme *runtime.Scheme) error { + // Add non-generated conversion functions + return scheme.AddConversionFuncs() +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/defaults.go new file mode 100644 index 000000000..d63d91754 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/defaults.go @@ -0,0 +1,25 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return scheme.AddDefaultingFuncs() +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/doc.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/doc.go new file mode 100644 index 000000000..41741dd53 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +groupName=authorization.k8s.io +package v1 diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/generated.pb.go new file mode 100644 index 000000000..7bacc5169 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/generated.pb.go @@ -0,0 +1,2344 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. +// source: k8s.io/kubernetes/pkg/apis/authorization/v1/generated.proto +// DO NOT EDIT! + +/* + Package v1 is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/pkg/apis/authorization/v1/generated.proto + + It has these top-level messages: + ExtraValue + LocalSubjectAccessReview + NonResourceAttributes + ResourceAttributes + SelfSubjectAccessReview + SelfSubjectAccessReviewSpec + SubjectAccessReview + SubjectAccessReviewSpec + SubjectAccessReviewStatus +*/ +package v1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +const _ = proto.GoGoProtoPackageIsVersion1 + +func (m *ExtraValue) Reset() { *m = ExtraValue{} } +func (*ExtraValue) ProtoMessage() {} +func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} } +func (*LocalSubjectAccessReview) ProtoMessage() {} +func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{1} +} + +func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} } +func (*NonResourceAttributes) ProtoMessage() {} +func (*NonResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } + +func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} } +func (*ResourceAttributes) ProtoMessage() {} +func (*ResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } + +func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } +func (*SelfSubjectAccessReview) ProtoMessage() {} +func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } + +func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } +func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} +func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{5} +} + +func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} } +func (*SubjectAccessReview) ProtoMessage() {} +func (*SubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } + +func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} } +func (*SubjectAccessReviewSpec) ProtoMessage() {} +func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } + +func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} } +func (*SubjectAccessReviewStatus) ProtoMessage() {} +func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{8} +} + +func init() { + proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.ExtraValue") + proto.RegisterType((*LocalSubjectAccessReview)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.LocalSubjectAccessReview") + proto.RegisterType((*NonResourceAttributes)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.NonResourceAttributes") + proto.RegisterType((*ResourceAttributes)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.ResourceAttributes") + proto.RegisterType((*SelfSubjectAccessReview)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.SelfSubjectAccessReview") + proto.RegisterType((*SelfSubjectAccessReviewSpec)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.SelfSubjectAccessReviewSpec") + proto.RegisterType((*SubjectAccessReview)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.SubjectAccessReview") + proto.RegisterType((*SubjectAccessReviewSpec)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.SubjectAccessReviewSpec") + proto.RegisterType((*SubjectAccessReviewStatus)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.SubjectAccessReviewStatus") +} +func (m ExtraValue) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m ExtraValue) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m) > 0 { + for _, s := range m { + data[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + return i, nil +} + +func (m *LocalSubjectAccessReview) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *LocalSubjectAccessReview) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n1, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n2, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n3, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + return i, nil +} + +func (m *NonResourceAttributes) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NonResourceAttributes) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Path))) + i += copy(data[i:], m.Path) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Verb))) + i += copy(data[i:], m.Verb) + return i, nil +} + +func (m *ResourceAttributes) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ResourceAttributes) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Namespace))) + i += copy(data[i:], m.Namespace) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Verb))) + i += copy(data[i:], m.Verb) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Group))) + i += copy(data[i:], m.Group) + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Version))) + i += copy(data[i:], m.Version) + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Resource))) + i += copy(data[i:], m.Resource) + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Subresource))) + i += copy(data[i:], m.Subresource) + data[i] = 0x3a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + return i, nil +} + +func (m *SelfSubjectAccessReview) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SelfSubjectAccessReview) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n4, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n5, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n6, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + return i, nil +} + +func (m *SelfSubjectAccessReviewSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SelfSubjectAccessReviewSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ResourceAttributes != nil { + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ResourceAttributes.Size())) + n7, err := m.ResourceAttributes.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.NonResourceAttributes != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.NonResourceAttributes.Size())) + n8, err := m.NonResourceAttributes.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n8 + } + return i, nil +} + +func (m *SubjectAccessReview) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SubjectAccessReview) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n9, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n10, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n10 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n11, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n11 + return i, nil +} + +func (m *SubjectAccessReviewSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SubjectAccessReviewSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ResourceAttributes != nil { + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ResourceAttributes.Size())) + n12, err := m.ResourceAttributes.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n12 + } + if m.NonResourceAttributes != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.NonResourceAttributes.Size())) + n13, err := m.NonResourceAttributes.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n13 + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.User))) + i += copy(data[i:], m.User) + if len(m.Groups) > 0 { + for _, s := range m.Groups { + data[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.Extra) > 0 { + for k := range m.Extra { + data[i] = 0x2a + i++ + v := m.Extra[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())) + n14, err := (&v).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n14 + } + } + return i, nil +} + +func (m *SubjectAccessReviewStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SubjectAccessReviewStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + if m.Allowed { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) + i += copy(data[i:], m.Reason) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.EvaluationError))) + i += copy(data[i:], m.EvaluationError) + return i, nil +} + +func encodeFixed64Generated(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Generated(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintGenerated(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} +func (m ExtraValue) Size() (n int) { + var l int + _ = l + if len(m) > 0 { + for _, s := range m { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *LocalSubjectAccessReview) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *NonResourceAttributes) Size() (n int) { + var l int + _ = l + l = len(m.Path) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Verb) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceAttributes) Size() (n int) { + var l int + _ = l + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Verb) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Group) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Version) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Resource) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Subresource) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *SelfSubjectAccessReview) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *SelfSubjectAccessReviewSpec) Size() (n int) { + var l int + _ = l + if m.ResourceAttributes != nil { + l = m.ResourceAttributes.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.NonResourceAttributes != nil { + l = m.NonResourceAttributes.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *SubjectAccessReview) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *SubjectAccessReviewSpec) Size() (n int) { + var l int + _ = l + if m.ResourceAttributes != nil { + l = m.ResourceAttributes.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.NonResourceAttributes != nil { + l = m.NonResourceAttributes.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.User) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Groups) > 0 { + for _, s := range m.Groups { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Extra) > 0 { + for k, v := range m.Extra { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + return n +} + +func (m *SubjectAccessReviewStatus) Size() (n int) { + var l int + _ = l + n += 2 + l = len(m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.EvaluationError) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *LocalSubjectAccessReview) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LocalSubjectAccessReview{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *NonResourceAttributes) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NonResourceAttributes{`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceAttributes) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceAttributes{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`, + `Group:` + fmt.Sprintf("%v", this.Group) + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `Subresource:` + fmt.Sprintf("%v", this.Subresource) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *SelfSubjectAccessReview) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SelfSubjectAccessReview{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectAccessReviewSpec", "SelfSubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *SelfSubjectAccessReviewSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SelfSubjectAccessReviewSpec{`, + `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`, + `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`, + `}`, + }, "") + return s +} +func (this *SubjectAccessReview) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SubjectAccessReview{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *SubjectAccessReviewSpec) String() string { + if this == nil { + return "nil" + } + keysForExtra := make([]string, 0, len(this.Extra)) + for k := range this.Extra { + keysForExtra = append(keysForExtra, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + mapStringForExtra := "map[string]ExtraValue{" + for _, k := range keysForExtra { + mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k]) + } + mapStringForExtra += "}" + s := strings.Join([]string{`&SubjectAccessReviewSpec{`, + `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`, + `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`, + `User:` + fmt.Sprintf("%v", this.User) + `,`, + `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, + `Extra:` + mapStringForExtra + `,`, + `}`, + }, "") + return s +} +func (this *SubjectAccessReviewStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SubjectAccessReviewStatus{`, + `Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *ExtraValue) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + *m = append(*m, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LocalSubjectAccessReview) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LocalSubjectAccessReview: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LocalSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NonResourceAttributes) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NonResourceAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NonResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verb = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceAttributes) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verb = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subresource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subresource = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SelfSubjectAccessReview) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SelfSubjectAccessReview: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SelfSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SelfSubjectAccessReviewSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceAttributes == nil { + m.ResourceAttributes = &ResourceAttributes{} + } + if err := m.ResourceAttributes.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonResourceAttributes == nil { + m.NonResourceAttributes = &NonResourceAttributes{} + } + if err := m.NonResourceAttributes.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubjectAccessReview) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubjectAccessReview: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubjectAccessReviewSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubjectAccessReviewSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceAttributes == nil { + m.ResourceAttributes = &ResourceAttributes{} + } + if err := m.ResourceAttributes.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonResourceAttributes == nil { + m.NonResourceAttributes = &NonResourceAttributes{} + } + if err := m.NonResourceAttributes.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.User = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &ExtraValue{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.Extra == nil { + m.Extra = make(map[string]ExtraValue) + } + m.Extra[mapkey] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubjectAccessReviewStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubjectAccessReviewStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubjectAccessReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Allowed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Allowed = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EvaluationError", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EvaluationError = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorGenerated = []byte{ + // 904 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xfa, 0x5f, 0xec, 0x09, 0x90, 0x32, 0x55, 0xc9, 0x36, 0x48, 0xb6, 0x65, 0x10, 0x0a, + 0xa2, 0xec, 0x92, 0xf2, 0xa7, 0x55, 0x39, 0xa0, 0xac, 0x08, 0x7f, 0x24, 0xda, 0xa2, 0x89, 0xc8, + 0x01, 0x2e, 0x8c, 0x37, 0x2f, 0xf6, 0xd6, 0xde, 0x9d, 0x65, 0x66, 0x76, 0xdb, 0x70, 0xea, 0x8d, + 0x2b, 0x12, 0x17, 0x8e, 0x7c, 0x05, 0x3e, 0x00, 0x9c, 0x73, 0xa3, 0x07, 0x24, 0x38, 0x20, 0x8b, + 0x2c, 0x17, 0x3e, 0x06, 0x9a, 0xd9, 0x89, 0x37, 0xc6, 0x6b, 0x2a, 0x43, 0x25, 0x7a, 0xe8, 0x6d, + 0xe7, 0xbd, 0xdf, 0xef, 0xbd, 0xdf, 0xbc, 0x79, 0xb3, 0x6f, 0xd0, 0xdb, 0xe3, 0xeb, 0xc2, 0x09, + 0x98, 0x3b, 0x4e, 0x06, 0xc0, 0x23, 0x90, 0x20, 0xdc, 0x78, 0x3c, 0x74, 0x69, 0x1c, 0x08, 0x97, + 0x26, 0x72, 0xc4, 0x78, 0xf0, 0x25, 0x95, 0x01, 0x8b, 0xdc, 0x74, 0xc7, 0x1d, 0x42, 0x04, 0x9c, + 0x4a, 0x38, 0x74, 0x62, 0xce, 0x24, 0xc3, 0xaf, 0xe4, 0x64, 0xa7, 0x20, 0x3b, 0xf1, 0x78, 0xe8, + 0x28, 0xb2, 0x33, 0x47, 0x76, 0xd2, 0x9d, 0xad, 0x57, 0x87, 0x81, 0x1c, 0x25, 0x03, 0xc7, 0x67, + 0xa1, 0x3b, 0x64, 0x43, 0xe6, 0xea, 0x18, 0x83, 0xe4, 0x48, 0xaf, 0xf4, 0x42, 0x7f, 0xe5, 0xb1, + 0xb7, 0xde, 0x30, 0xc2, 0x68, 0x1c, 0x84, 0xd4, 0x1f, 0x05, 0x11, 0xf0, 0xe3, 0x42, 0x5a, 0x08, + 0x92, 0x96, 0x28, 0xda, 0x72, 0x97, 0xb1, 0x78, 0x12, 0xc9, 0x20, 0x84, 0x05, 0xc2, 0x5b, 0x0f, + 0x23, 0x08, 0x7f, 0x04, 0x21, 0x5d, 0xe0, 0xbd, 0xbe, 0x8c, 0x97, 0xc8, 0x60, 0xe2, 0x06, 0x91, + 0x14, 0x92, 0x2f, 0x90, 0xce, 0xed, 0x49, 0x00, 0x4f, 0x81, 0x17, 0x1b, 0x82, 0x7b, 0x34, 0x8c, + 0x27, 0x50, 0xb6, 0xa7, 0x2b, 0x4b, 0x8f, 0xa8, 0x04, 0xdd, 0xbf, 0x86, 0xd0, 0xde, 0x3d, 0xc9, + 0xe9, 0x01, 0x9d, 0x24, 0x80, 0xbb, 0xa8, 0x11, 0x48, 0x08, 0x85, 0x6d, 0xf5, 0x6a, 0xdb, 0x6d, + 0xaf, 0x9d, 0x4d, 0xbb, 0x8d, 0x0f, 0x95, 0x81, 0xe4, 0xf6, 0x1b, 0xad, 0x6f, 0xbf, 0xeb, 0x56, + 0xee, 0xff, 0xd6, 0xab, 0xf4, 0x7f, 0xae, 0x22, 0xfb, 0x23, 0xe6, 0xd3, 0xc9, 0x7e, 0x32, 0xb8, + 0x03, 0xbe, 0xdc, 0xf5, 0x7d, 0x10, 0x82, 0x40, 0x1a, 0xc0, 0x5d, 0xfc, 0x39, 0x6a, 0xa9, 0x92, + 0x1f, 0x52, 0x49, 0x6d, 0xab, 0x67, 0x6d, 0xaf, 0x5f, 0x7d, 0xcd, 0x31, 0x87, 0x7f, 0xbe, 0x02, + 0xc5, 0xf1, 0x2b, 0xb4, 0x93, 0xee, 0x38, 0xb7, 0x75, 0xac, 0x9b, 0x20, 0xa9, 0x87, 0x4f, 0xa6, + 0xdd, 0x4a, 0x36, 0xed, 0xa2, 0xc2, 0x46, 0x66, 0x51, 0xf1, 0x11, 0xaa, 0x8b, 0x18, 0x7c, 0xbb, + 0xaa, 0xa3, 0xbf, 0xeb, 0xac, 0xd0, 0x5a, 0x4e, 0x89, 0xe2, 0xfd, 0x18, 0x7c, 0xef, 0x29, 0x93, + 0xb1, 0xae, 0x56, 0x44, 0xc7, 0xc7, 0x11, 0x6a, 0x0a, 0x49, 0x65, 0x22, 0xec, 0x9a, 0xce, 0xf4, + 0xde, 0x7f, 0xce, 0xa4, 0xa3, 0x79, 0xcf, 0x98, 0x5c, 0xcd, 0x7c, 0x4d, 0x4c, 0x96, 0xfe, 0x67, + 0xe8, 0xd2, 0x2d, 0x16, 0x11, 0x10, 0x2c, 0xe1, 0x3e, 0xec, 0x4a, 0xc9, 0x83, 0x41, 0x22, 0x41, + 0xe0, 0x1e, 0xaa, 0xc7, 0x54, 0x8e, 0x74, 0x39, 0xdb, 0x85, 0xd4, 0x8f, 0xa9, 0x1c, 0x11, 0xed, + 0x51, 0x88, 0x14, 0xf8, 0x40, 0x97, 0xe4, 0x1c, 0xe2, 0x00, 0xf8, 0x80, 0x68, 0x4f, 0xff, 0xc7, + 0x2a, 0xc2, 0x25, 0xa1, 0x5d, 0xd4, 0x8e, 0x68, 0x08, 0x22, 0xa6, 0x3e, 0x98, 0xf8, 0xcf, 0x1a, + 0x76, 0xfb, 0xd6, 0x99, 0x83, 0x14, 0x98, 0x87, 0x67, 0xc2, 0x2f, 0xa0, 0xc6, 0x90, 0xb3, 0x24, + 0xd6, 0x55, 0x6b, 0x7b, 0x4f, 0x1b, 0x48, 0xe3, 0x7d, 0x65, 0x24, 0xb9, 0x0f, 0xbf, 0x8c, 0xd6, + 0x52, 0xe0, 0x22, 0x60, 0x91, 0x5d, 0xd7, 0xb0, 0x0d, 0x03, 0x5b, 0x3b, 0xc8, 0xcd, 0xe4, 0xcc, + 0x8f, 0xaf, 0xa0, 0x16, 0x37, 0xc2, 0xed, 0x86, 0xc6, 0x5e, 0x30, 0xd8, 0xd6, 0xd9, 0x86, 0xc8, + 0x0c, 0x81, 0xdf, 0x44, 0xeb, 0x22, 0x19, 0xcc, 0x08, 0x4d, 0x4d, 0xb8, 0x68, 0x08, 0xeb, 0xfb, + 0x85, 0x8b, 0x9c, 0xc7, 0xa9, 0x6d, 0xa9, 0x3d, 0xda, 0x6b, 0xf3, 0xdb, 0x52, 0x25, 0x20, 0xda, + 0xd3, 0xff, 0xa5, 0x8a, 0x36, 0xf7, 0x61, 0x72, 0xf4, 0xff, 0xf4, 0xfc, 0x9d, 0xb9, 0x9e, 0xff, + 0x60, 0xb5, 0x4e, 0x2c, 0x57, 0xfd, 0xd8, 0xf4, 0xfd, 0x0f, 0x55, 0xf4, 0xfc, 0x3f, 0x68, 0xc4, + 0x5f, 0x59, 0x08, 0xf3, 0x85, 0xd6, 0x35, 0x85, 0x7e, 0x67, 0x25, 0x71, 0x8b, 0x37, 0xc0, 0x7b, + 0x2e, 0x9b, 0x76, 0x4b, 0x6e, 0x06, 0x29, 0x49, 0x89, 0xbf, 0xb1, 0xd0, 0xa5, 0xa8, 0xec, 0x8a, + 0x9a, 0x73, 0xf1, 0x56, 0x12, 0x53, 0x7a, 0xd9, 0xbd, 0xcb, 0xd9, 0xb4, 0x5b, 0xfe, 0x1f, 0x20, + 0xe5, 0xb9, 0xfb, 0x3f, 0x55, 0xd1, 0xc5, 0x27, 0x7f, 0xe2, 0x47, 0xd9, 0x91, 0x7f, 0xd6, 0xd1, + 0xe6, 0x93, 0x6e, 0xfc, 0x57, 0xdd, 0x38, 0x1b, 0x10, 0xb5, 0xf9, 0x3f, 0xe9, 0x27, 0x02, 0xb8, + 0x19, 0x10, 0x7d, 0xd4, 0xd4, 0x43, 0x40, 0xd8, 0x75, 0xfd, 0xd4, 0x40, 0xea, 0x04, 0xf4, 0x74, + 0x10, 0xc4, 0x78, 0xb0, 0x44, 0x0d, 0x50, 0x6f, 0x13, 0xbb, 0xd1, 0xab, 0x6d, 0xaf, 0x5f, 0xbd, + 0xfd, 0x28, 0x5a, 0xcb, 0xd1, 0xaf, 0x9d, 0xbd, 0x48, 0xf2, 0xe3, 0x62, 0x2a, 0x69, 0x1b, 0xc9, + 0x93, 0x6d, 0x7d, 0x61, 0x5e, 0x44, 0x1a, 0x83, 0x2f, 0xa0, 0xda, 0x18, 0x8e, 0xf3, 0xa9, 0x48, + 0xd4, 0x27, 0xbe, 0x89, 0x1a, 0xa9, 0x7a, 0x2c, 0x99, 0x02, 0x5f, 0x5b, 0x49, 0x55, 0xf1, 0xd6, + 0x22, 0x79, 0x94, 0x1b, 0xd5, 0xeb, 0x56, 0xff, 0x7b, 0x0b, 0x5d, 0x5e, 0xda, 0xa0, 0x6a, 0x4c, + 0xd2, 0xc9, 0x84, 0xdd, 0x85, 0x43, 0x2d, 0xa3, 0x55, 0x8c, 0xc9, 0xdd, 0xdc, 0x4c, 0xce, 0xfc, + 0xf8, 0x25, 0xd4, 0xe4, 0x40, 0x05, 0x8b, 0xcc, 0x68, 0x9e, 0xf5, 0x36, 0xd1, 0x56, 0x62, 0xbc, + 0x78, 0x17, 0x6d, 0x80, 0x4a, 0xaf, 0x75, 0xed, 0x71, 0xce, 0xb8, 0x39, 0xaa, 0x4d, 0x43, 0xd8, + 0xd8, 0x9b, 0x77, 0x93, 0xbf, 0xe3, 0xbd, 0x17, 0x4f, 0x4e, 0x3b, 0x95, 0x07, 0xa7, 0x9d, 0xca, + 0xaf, 0xa7, 0x9d, 0xca, 0xfd, 0xac, 0x63, 0x9d, 0x64, 0x1d, 0xeb, 0x41, 0xd6, 0xb1, 0x7e, 0xcf, + 0x3a, 0xd6, 0xd7, 0x7f, 0x74, 0x2a, 0x9f, 0x56, 0xd3, 0x9d, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, + 0x8a, 0xc4, 0x1f, 0xd5, 0x30, 0x0c, 0x00, 0x00, +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/generated.proto new file mode 100644 index 000000000..7036b8eb3 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/generated.proto @@ -0,0 +1,185 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.kubernetes.pkg.apis.authorization.v1; + +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1"; + +// ExtraValue masks the value so protobuf can generate +// +protobuf.nullable=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +message ExtraValue { + // items, if empty, will result in an empty slice + + repeated string items = 1; +} + +// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. +// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions +// checking. +message LocalSubjectAccessReview { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace + // you made the request against. If empty, it is defaulted. + optional SubjectAccessReviewSpec spec = 2; + + // Status is filled in by the server and indicates whether the request is allowed or not + // +optional + optional SubjectAccessReviewStatus status = 3; +} + +// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface +message NonResourceAttributes { + // Path is the URL path of the request + // +optional + optional string path = 1; + + // Verb is the standard HTTP verb + // +optional + optional string verb = 2; +} + +// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface +message ResourceAttributes { + // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces + // "" (empty) is defaulted for LocalSubjectAccessReviews + // "" (empty) is empty for cluster-scoped resources + // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview + // +optional + optional string namespace = 1; + + // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. + // +optional + optional string verb = 2; + + // Group is the API Group of the Resource. "*" means all. + // +optional + optional string group = 3; + + // Version is the API Version of the Resource. "*" means all. + // +optional + optional string version = 4; + + // Resource is one of the existing resource types. "*" means all. + // +optional + optional string resource = 5; + + // Subresource is one of the existing resource types. "" means none. + // +optional + optional string subresource = 6; + + // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. + // +optional + optional string name = 7; +} + +// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a +// spec.namespace means "in all namespaces". Self is a special case, because users should always be able +// to check whether they can perform an action +message SelfSubjectAccessReview { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec holds information about the request being evaluated. user and groups must be empty + optional SelfSubjectAccessReviewSpec spec = 2; + + // Status is filled in by the server and indicates whether the request is allowed or not + // +optional + optional SubjectAccessReviewStatus status = 3; +} + +// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes +// and NonResourceAuthorizationAttributes must be set +message SelfSubjectAccessReviewSpec { + // ResourceAuthorizationAttributes describes information for a resource access request + // +optional + optional ResourceAttributes resourceAttributes = 1; + + // NonResourceAttributes describes information for a non-resource access request + // +optional + optional NonResourceAttributes nonResourceAttributes = 2; +} + +// SubjectAccessReview checks whether or not a user or group can perform an action. +message SubjectAccessReview { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec holds information about the request being evaluated + optional SubjectAccessReviewSpec spec = 2; + + // Status is filled in by the server and indicates whether the request is allowed or not + // +optional + optional SubjectAccessReviewStatus status = 3; +} + +// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes +// and NonResourceAuthorizationAttributes must be set +message SubjectAccessReviewSpec { + // ResourceAuthorizationAttributes describes information for a resource access request + // +optional + optional ResourceAttributes resourceAttributes = 1; + + // NonResourceAttributes describes information for a non-resource access request + // +optional + optional NonResourceAttributes nonResourceAttributes = 2; + + // User is the user you're testing for. + // If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups + // +optional + optional string verb = 3; + + // Groups is the groups you're testing for. + // +optional + repeated string groups = 4; + + // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer + // it needs a reflection here. + // +optional + map extra = 5; +} + +// SubjectAccessReviewStatus +message SubjectAccessReviewStatus { + // Allowed is required. True if the action would be allowed, false otherwise. + optional bool allowed = 1; + + // Reason is optional. It indicates why a request was allowed or denied. + // +optional + optional string reason = 2; + + // EvaluationError is an indication that some error occurred during the authorization check. + // It is entirely possible to get an error and be able to continue determine authorization status in spite of it. + // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. + // +optional + optional string evaluationError = 3; +} + diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/register.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/register.go new file mode 100644 index 000000000..909bc0a7d --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/register.go @@ -0,0 +1,55 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "authorization.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &SelfSubjectAccessReview{}, + &SubjectAccessReview{}, + &LocalSubjectAccessReview{}, + ) + + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +func (obj *LocalSubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } +func (obj *SubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } +func (obj *SelfSubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types.generated.go new file mode 100644 index 000000000..2528afa8e --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types.generated.go @@ -0,0 +1,3233 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1 + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81234 = 1 + codecSelferC_RAW1234 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1234 = 10 + codecSelferValueTypeMap1234 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1234 = 2 + codecSelfer_containerMapValue1234 = 3 + codecSelfer_containerMapEnd1234 = 4 + codecSelfer_containerArrayElem1234 = 6 + codecSelfer_containerArrayEnd1234 = 7 +) + +var ( + codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1234 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg1_v1.TypeMeta + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 + } +} + +func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *SubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = SubjectAccessReviewSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = SubjectAccessReviewStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = SubjectAccessReviewSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = SubjectAccessReviewStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *SelfSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = SelfSubjectAccessReviewSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = SubjectAccessReviewStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = SelfSubjectAccessReviewSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = SubjectAccessReviewStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *LocalSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = SubjectAccessReviewSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = SubjectAccessReviewStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = SubjectAccessReviewSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = SubjectAccessReviewStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [7]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Namespace != "" + yyq2[1] = x.Verb != "" + yyq2[2] = x.Group != "" + yyq2[3] = x.Version != "" + yyq2[4] = x.Resource != "" + yyq2[5] = x.Subresource != "" + yyq2[6] = x.Name != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(7) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("namespace")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Verb)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("verb")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Verb)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Group)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("group")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Group)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Version)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("version")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Version)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Resource)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resource")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Resource)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Subresource)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("subresource")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Subresource)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[6] { + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "namespace": + if r.TryDecodeAsNil() { + x.Namespace = "" + } else { + yyv4 := &x.Namespace + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "verb": + if r.TryDecodeAsNil() { + x.Verb = "" + } else { + yyv6 := &x.Verb + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "group": + if r.TryDecodeAsNil() { + x.Group = "" + } else { + yyv8 := &x.Group + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "version": + if r.TryDecodeAsNil() { + x.Version = "" + } else { + yyv10 := &x.Version + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + case "resource": + if r.TryDecodeAsNil() { + x.Resource = "" + } else { + yyv12 := &x.Resource + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } + } + case "subresource": + if r.TryDecodeAsNil() { + x.Subresource = "" + } else { + yyv14 := &x.Subresource + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } + } + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv16 := &x.Name + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj18 int + var yyb18 bool + var yyhl18 bool = l >= 0 + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Namespace = "" + } else { + yyv19 := &x.Namespace + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Verb = "" + } else { + yyv21 := &x.Verb + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Group = "" + } else { + yyv23 := &x.Group + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*string)(yyv23)) = r.DecodeString() + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Version = "" + } else { + yyv25 := &x.Version + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*string)(yyv25)) = r.DecodeString() + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Resource = "" + } else { + yyv27 := &x.Resource + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*string)(yyv27)) = r.DecodeString() + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Subresource = "" + } else { + yyv29 := &x.Subresource + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*string)(yyv29)) = r.DecodeString() + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv31 := &x.Name + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + *((*string)(yyv31)) = r.DecodeString() + } + } + for { + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj18-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *NonResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Path != "" + yyq2[1] = x.Verb != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("path")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Path)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Verb)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("verb")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Verb)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *NonResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *NonResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "path": + if r.TryDecodeAsNil() { + x.Path = "" + } else { + yyv4 := &x.Path + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "verb": + if r.TryDecodeAsNil() { + x.Verb = "" + } else { + yyv6 := &x.Verb + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *NonResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Path = "" + } else { + yyv9 := &x.Path + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Verb = "" + } else { + yyv11 := &x.Verb + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.ResourceAttributes != nil + yyq2[1] = x.NonResourceAttributes != nil + yyq2[2] = x.User != "" + yyq2[3] = len(x.Groups) != 0 + yyq2[4] = len(x.Extra) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.ResourceAttributes == nil { + r.EncodeNil() + } else { + x.ResourceAttributes.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resourceAttributes")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ResourceAttributes == nil { + r.EncodeNil() + } else { + x.ResourceAttributes.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.NonResourceAttributes == nil { + r.EncodeNil() + } else { + x.NonResourceAttributes.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nonResourceAttributes")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.NonResourceAttributes == nil { + r.EncodeNil() + } else { + x.NonResourceAttributes.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.User)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("user")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.User)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Groups == nil { + r.EncodeNil() + } else { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + z.F.EncSliceStringV(x.Groups, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("groups")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Groups == nil { + r.EncodeNil() + } else { + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + z.F.EncSliceStringV(x.Groups, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + if x.Extra == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("extra")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Extra == nil { + r.EncodeNil() + } else { + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *SubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *SubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "resourceAttributes": + if r.TryDecodeAsNil() { + if x.ResourceAttributes != nil { + x.ResourceAttributes = nil + } + } else { + if x.ResourceAttributes == nil { + x.ResourceAttributes = new(ResourceAttributes) + } + x.ResourceAttributes.CodecDecodeSelf(d) + } + case "nonResourceAttributes": + if r.TryDecodeAsNil() { + if x.NonResourceAttributes != nil { + x.NonResourceAttributes = nil + } + } else { + if x.NonResourceAttributes == nil { + x.NonResourceAttributes = new(NonResourceAttributes) + } + x.NonResourceAttributes.CodecDecodeSelf(d) + } + case "user": + if r.TryDecodeAsNil() { + x.User = "" + } else { + yyv6 := &x.User + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "groups": + if r.TryDecodeAsNil() { + x.Groups = nil + } else { + yyv8 := &x.Groups + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + z.F.DecSliceStringX(yyv8, false, d) + } + } + case "extra": + if r.TryDecodeAsNil() { + x.Extra = nil + } else { + yyv10 := &x.Extra + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decMapstringExtraValue((*map[string]ExtraValue)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *SubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ResourceAttributes != nil { + x.ResourceAttributes = nil + } + } else { + if x.ResourceAttributes == nil { + x.ResourceAttributes = new(ResourceAttributes) + } + x.ResourceAttributes.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.NonResourceAttributes != nil { + x.NonResourceAttributes = nil + } + } else { + if x.NonResourceAttributes == nil { + x.NonResourceAttributes = new(NonResourceAttributes) + } + x.NonResourceAttributes.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.User = "" + } else { + yyv15 := &x.User + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Groups = nil + } else { + yyv17 := &x.Groups + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + z.F.DecSliceStringX(yyv17, false, d) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Extra = nil + } else { + yyv19 := &x.Extra + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decMapstringExtraValue((*map[string]ExtraValue)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + h.encExtraValue((ExtraValue)(x), e) + } + } +} + +func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + h.decExtraValue((*ExtraValue)(x), d) + } +} + +func (x *SelfSubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.ResourceAttributes != nil + yyq2[1] = x.NonResourceAttributes != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.ResourceAttributes == nil { + r.EncodeNil() + } else { + x.ResourceAttributes.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resourceAttributes")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ResourceAttributes == nil { + r.EncodeNil() + } else { + x.ResourceAttributes.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.NonResourceAttributes == nil { + r.EncodeNil() + } else { + x.NonResourceAttributes.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nonResourceAttributes")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.NonResourceAttributes == nil { + r.EncodeNil() + } else { + x.NonResourceAttributes.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *SelfSubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "resourceAttributes": + if r.TryDecodeAsNil() { + if x.ResourceAttributes != nil { + x.ResourceAttributes = nil + } + } else { + if x.ResourceAttributes == nil { + x.ResourceAttributes = new(ResourceAttributes) + } + x.ResourceAttributes.CodecDecodeSelf(d) + } + case "nonResourceAttributes": + if r.TryDecodeAsNil() { + if x.NonResourceAttributes != nil { + x.NonResourceAttributes = nil + } + } else { + if x.NonResourceAttributes == nil { + x.NonResourceAttributes = new(NonResourceAttributes) + } + x.NonResourceAttributes.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ResourceAttributes != nil { + x.ResourceAttributes = nil + } + } else { + if x.ResourceAttributes == nil { + x.ResourceAttributes = new(ResourceAttributes) + } + x.ResourceAttributes.CodecDecodeSelf(d) + } + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.NonResourceAttributes != nil { + x.NonResourceAttributes = nil + } + } else { + if x.NonResourceAttributes == nil { + x.NonResourceAttributes = new(NonResourceAttributes) + } + x.NonResourceAttributes.CodecDecodeSelf(d) + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj6-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *SubjectAccessReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Reason != "" + yyq2[2] = x.EvaluationError != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeBool(bool(x.Allowed)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("allowed")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeBool(bool(x.Allowed)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("evaluationError")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *SubjectAccessReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *SubjectAccessReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "allowed": + if r.TryDecodeAsNil() { + x.Allowed = false + } else { + yyv4 := &x.Allowed + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*bool)(yyv4)) = r.DecodeBool() + } + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv6 := &x.Reason + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "evaluationError": + if r.TryDecodeAsNil() { + x.EvaluationError = "" + } else { + yyv8 := &x.EvaluationError + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *SubjectAccessReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Allowed = false + } else { + yyv11 := &x.Allowed + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*bool)(yyv11)) = r.DecodeBool() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv13 := &x.Reason + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.EvaluationError = "" + } else { + yyv15 := &x.EvaluationError + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeMapStart(len(v)) + for yyk1, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + yym2 := z.EncBinary() + _ = yym2 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yyk1)) + } + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyv1 == nil { + r.EncodeNil() + } else { + yyv1.CodecEncodeSelf(e) + } + } + z.EncSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyl1 := r.ReadMapStart() + yybh1 := z.DecBasicHandle() + if yyv1 == nil { + yyrl1, _ := z.DecInferLen(yyl1, yybh1.MaxInitLen, 40) + yyv1 = make(map[string]ExtraValue, yyrl1) + *v = yyv1 + } + var yymk1 string + var yymv1 ExtraValue + var yymg1 bool + if yybh1.MapValueReset { + yymg1 = true + } + if yyl1 > 0 { + for yyj1 := 0; yyj1 < yyl1; yyj1++ { + z.DecSendContainerState(codecSelfer_containerMapKey1234) + if r.TryDecodeAsNil() { + yymk1 = "" + } else { + yyv2 := &yymk1 + yym3 := z.DecBinary() + _ = yym3 + if false { + } else { + *((*string)(yyv2)) = r.DecodeString() + } + } + + if yymg1 { + yymv1 = yyv1[yymk1] + } else { + yymv1 = nil + } + z.DecSendContainerState(codecSelfer_containerMapValue1234) + if r.TryDecodeAsNil() { + yymv1 = nil + } else { + yyv4 := &yymv1 + yyv4.CodecDecodeSelf(d) + } + + if yyv1 != nil { + yyv1[yymk1] = yymv1 + } + } + } else if yyl1 < 0 { + for yyj1 := 0; !r.CheckBreak(); yyj1++ { + z.DecSendContainerState(codecSelfer_containerMapKey1234) + if r.TryDecodeAsNil() { + yymk1 = "" + } else { + yyv5 := &yymk1 + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } + } + + if yymg1 { + yymv1 = yyv1[yymk1] + } else { + yymv1 = nil + } + z.DecSendContainerState(codecSelfer_containerMapValue1234) + if r.TryDecodeAsNil() { + yymv1 = nil + } else { + yyv7 := &yymv1 + yyv7.CodecDecodeSelf(d) + } + + if yyv1 != nil { + yyv1[yymk1] = yymv1 + } + } + } // else len==0: TODO: Should we clear map entries? + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym2 := z.EncBinary() + _ = yym2 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yyv1)) + } + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []string{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]string, yyrl1) + } + } else { + yyv1 = make([]string, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = "" + } else { + yyv2 := &yyv1[yyj1] + yym3 := z.DecBinary() + _ = yym3 + if false { + } else { + *((*string)(yyv2)) = r.DecodeString() + } + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, "") + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = "" + } else { + yyv4 := &yyv1[yyj1] + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, "") // var yyz1 string + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = "" + } else { + yyv6 := &yyv1[yyj1] + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []string{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types.go new file mode 100644 index 000000000..38c314ffc --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types.go @@ -0,0 +1,176 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient=true +// +nonNamespaced=true +// +noMethods=true + +// SubjectAccessReview checks whether or not a user or group can perform an action. +type SubjectAccessReview struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec holds information about the request being evaluated + Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + + // Status is filled in by the server and indicates whether the request is allowed or not + // +optional + Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// +genclient=true +// +nonNamespaced=true +// +noMethods=true + +// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a +// spec.namespace means "in all namespaces". Self is a special case, because users should always be able +// to check whether they can perform an action +type SelfSubjectAccessReview struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec holds information about the request being evaluated. user and groups must be empty + Spec SelfSubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + + // Status is filled in by the server and indicates whether the request is allowed or not + // +optional + Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// +genclient=true +// +noMethods=true + +// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. +// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions +// checking. +type LocalSubjectAccessReview struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace + // you made the request against. If empty, it is defaulted. + Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + + // Status is filled in by the server and indicates whether the request is allowed or not + // +optional + Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface +type ResourceAttributes struct { + // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces + // "" (empty) is defaulted for LocalSubjectAccessReviews + // "" (empty) is empty for cluster-scoped resources + // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"` + // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. + // +optional + Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"` + // Group is the API Group of the Resource. "*" means all. + // +optional + Group string `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"` + // Version is the API Version of the Resource. "*" means all. + // +optional + Version string `json:"version,omitempty" protobuf:"bytes,4,opt,name=version"` + // Resource is one of the existing resource types. "*" means all. + // +optional + Resource string `json:"resource,omitempty" protobuf:"bytes,5,opt,name=resource"` + // Subresource is one of the existing resource types. "" means none. + // +optional + Subresource string `json:"subresource,omitempty" protobuf:"bytes,6,opt,name=subresource"` + // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. + // +optional + Name string `json:"name,omitempty" protobuf:"bytes,7,opt,name=name"` +} + +// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface +type NonResourceAttributes struct { + // Path is the URL path of the request + // +optional + Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` + // Verb is the standard HTTP verb + // +optional + Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"` +} + +// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes +// and NonResourceAuthorizationAttributes must be set +type SubjectAccessReviewSpec struct { + // ResourceAuthorizationAttributes describes information for a resource access request + // +optional + ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"` + // NonResourceAttributes describes information for a non-resource access request + // +optional + NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"` + + // User is the user you're testing for. + // If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups + // +optional + User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=verb"` + // Groups is the groups you're testing for. + // +optional + Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"` + // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer + // it needs a reflection here. + // +optional + Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,5,rep,name=extra"` +} + +// ExtraValue masks the value so protobuf can generate +// +protobuf.nullable=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +type ExtraValue []string + +func (t ExtraValue) String() string { + return fmt.Sprintf("%v", []string(t)) +} + +// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes +// and NonResourceAuthorizationAttributes must be set +type SelfSubjectAccessReviewSpec struct { + // ResourceAuthorizationAttributes describes information for a resource access request + // +optional + ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"` + // NonResourceAttributes describes information for a non-resource access request + // +optional + NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"` +} + +// SubjectAccessReviewStatus +type SubjectAccessReviewStatus struct { + // Allowed is required. True if the action would be allowed, false otherwise. + Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"` + // Reason is optional. It indicates why a request was allowed or denied. + // +optional + Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"` + // EvaluationError is an indication that some error occurred during the authorization check. + // It is entirely possible to get an error and be able to continue determine authorization status in spite of it. + // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. + // +optional + EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,3,opt,name=evaluationError"` +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types_swagger_doc_generated.go new file mode 100644 index 000000000..33c0035b4 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types_swagger_doc_generated.go @@ -0,0 +1,119 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_LocalSubjectAccessReview = map[string]string{ + "": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", + "spec": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", + "status": "Status is filled in by the server and indicates whether the request is allowed or not", +} + +func (LocalSubjectAccessReview) SwaggerDoc() map[string]string { + return map_LocalSubjectAccessReview +} + +var map_NonResourceAttributes = map[string]string{ + "": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface", + "path": "Path is the URL path of the request", + "verb": "Verb is the standard HTTP verb", +} + +func (NonResourceAttributes) SwaggerDoc() map[string]string { + return map_NonResourceAttributes +} + +var map_ResourceAttributes = map[string]string{ + "": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", + "namespace": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview", + "verb": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + "group": "Group is the API Group of the Resource. \"*\" means all.", + "version": "Version is the API Version of the Resource. \"*\" means all.", + "resource": "Resource is one of the existing resource types. \"*\" means all.", + "subresource": "Subresource is one of the existing resource types. \"\" means none.", + "name": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.", +} + +func (ResourceAttributes) SwaggerDoc() map[string]string { + return map_ResourceAttributes +} + +var map_SelfSubjectAccessReview = map[string]string{ + "": "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action", + "spec": "Spec holds information about the request being evaluated. user and groups must be empty", + "status": "Status is filled in by the server and indicates whether the request is allowed or not", +} + +func (SelfSubjectAccessReview) SwaggerDoc() map[string]string { + return map_SelfSubjectAccessReview +} + +var map_SelfSubjectAccessReviewSpec = map[string]string{ + "": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request", + "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request", +} + +func (SelfSubjectAccessReviewSpec) SwaggerDoc() map[string]string { + return map_SelfSubjectAccessReviewSpec +} + +var map_SubjectAccessReview = map[string]string{ + "": "SubjectAccessReview checks whether or not a user or group can perform an action.", + "spec": "Spec holds information about the request being evaluated", + "status": "Status is filled in by the server and indicates whether the request is allowed or not", +} + +func (SubjectAccessReview) SwaggerDoc() map[string]string { + return map_SubjectAccessReview +} + +var map_SubjectAccessReviewSpec = map[string]string{ + "": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request", + "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request", + "user": "User is the user you're testing for. If you specify \"User\" but not \"Groups\", then is it interpreted as \"What if User were not a member of any groups", + "groups": "Groups is the groups you're testing for.", + "extra": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.", +} + +func (SubjectAccessReviewSpec) SwaggerDoc() map[string]string { + return map_SubjectAccessReviewSpec +} + +var map_SubjectAccessReviewStatus = map[string]string{ + "": "SubjectAccessReviewStatus", + "allowed": "Allowed is required. True if the action would be allowed, false otherwise.", + "reason": "Reason is optional. It indicates why a request was allowed or denied.", + "evaluationError": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", +} + +func (SubjectAccessReviewStatus) SwaggerDoc() map[string]string { + return map_SubjectAccessReviewStatus +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.conversion.go new file mode 100644 index 000000000..92d130844 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.conversion.go @@ -0,0 +1,263 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1 + +import ( + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + authorization "k8s.io/client-go/pkg/apis/authorization" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview, + Convert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview, + Convert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes, + Convert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes, + Convert_v1_ResourceAttributes_To_authorization_ResourceAttributes, + Convert_authorization_ResourceAttributes_To_v1_ResourceAttributes, + Convert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview, + Convert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview, + Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec, + Convert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec, + Convert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview, + Convert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview, + Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec, + Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec, + Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus, + Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus, + ) +} + +func autoConvert_v1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error { + return autoConvert_v1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in, out, s) +} + +func autoConvert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview(in *authorization.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview(in *authorization.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error { + return autoConvert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview(in, out, s) +} + +func autoConvert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes(in *NonResourceAttributes, out *authorization.NonResourceAttributes, s conversion.Scope) error { + out.Path = in.Path + out.Verb = in.Verb + return nil +} + +func Convert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes(in *NonResourceAttributes, out *authorization.NonResourceAttributes, s conversion.Scope) error { + return autoConvert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes(in, out, s) +} + +func autoConvert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes(in *authorization.NonResourceAttributes, out *NonResourceAttributes, s conversion.Scope) error { + out.Path = in.Path + out.Verb = in.Verb + return nil +} + +func Convert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes(in *authorization.NonResourceAttributes, out *NonResourceAttributes, s conversion.Scope) error { + return autoConvert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes(in, out, s) +} + +func autoConvert_v1_ResourceAttributes_To_authorization_ResourceAttributes(in *ResourceAttributes, out *authorization.ResourceAttributes, s conversion.Scope) error { + out.Namespace = in.Namespace + out.Verb = in.Verb + out.Group = in.Group + out.Version = in.Version + out.Resource = in.Resource + out.Subresource = in.Subresource + out.Name = in.Name + return nil +} + +func Convert_v1_ResourceAttributes_To_authorization_ResourceAttributes(in *ResourceAttributes, out *authorization.ResourceAttributes, s conversion.Scope) error { + return autoConvert_v1_ResourceAttributes_To_authorization_ResourceAttributes(in, out, s) +} + +func autoConvert_authorization_ResourceAttributes_To_v1_ResourceAttributes(in *authorization.ResourceAttributes, out *ResourceAttributes, s conversion.Scope) error { + out.Namespace = in.Namespace + out.Verb = in.Verb + out.Group = in.Group + out.Version = in.Version + out.Resource = in.Resource + out.Subresource = in.Subresource + out.Name = in.Name + return nil +} + +func Convert_authorization_ResourceAttributes_To_v1_ResourceAttributes(in *authorization.ResourceAttributes, out *ResourceAttributes, s conversion.Scope) error { + return autoConvert_authorization_ResourceAttributes_To_v1_ResourceAttributes(in, out, s) +} + +func autoConvert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error { + return autoConvert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in, out, s) +} + +func autoConvert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview(in *authorization.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview(in *authorization.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error { + return autoConvert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview(in, out, s) +} + +func autoConvert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in *SelfSubjectAccessReviewSpec, out *authorization.SelfSubjectAccessReviewSpec, s conversion.Scope) error { + out.ResourceAttributes = (*authorization.ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes)) + out.NonResourceAttributes = (*authorization.NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes)) + return nil +} + +func Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in *SelfSubjectAccessReviewSpec, out *authorization.SelfSubjectAccessReviewSpec, s conversion.Scope) error { + return autoConvert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in, out, s) +} + +func autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(in *authorization.SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, s conversion.Scope) error { + out.ResourceAttributes = (*ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes)) + out.NonResourceAttributes = (*NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes)) + return nil +} + +func Convert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(in *authorization.SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, s conversion.Scope) error { + return autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(in, out, s) +} + +func autoConvert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error { + return autoConvert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview(in, out, s) +} + +func autoConvert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview(in *authorization.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview(in *authorization.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error { + return autoConvert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview(in, out, s) +} + +func autoConvert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in *SubjectAccessReviewSpec, out *authorization.SubjectAccessReviewSpec, s conversion.Scope) error { + out.ResourceAttributes = (*authorization.ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes)) + out.NonResourceAttributes = (*authorization.NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes)) + out.User = in.User + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.Extra = *(*map[string]authorization.ExtraValue)(unsafe.Pointer(&in.Extra)) + return nil +} + +func Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in *SubjectAccessReviewSpec, out *authorization.SubjectAccessReviewSpec, s conversion.Scope) error { + return autoConvert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in, out, s) +} + +func autoConvert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(in *authorization.SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, s conversion.Scope) error { + out.ResourceAttributes = (*ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes)) + out.NonResourceAttributes = (*NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes)) + out.User = in.User + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra)) + return nil +} + +func Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(in *authorization.SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, s conversion.Scope) error { + return autoConvert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(in, out, s) +} + +func autoConvert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in *SubjectAccessReviewStatus, out *authorization.SubjectAccessReviewStatus, s conversion.Scope) error { + out.Allowed = in.Allowed + out.Reason = in.Reason + out.EvaluationError = in.EvaluationError + return nil +} + +func Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in *SubjectAccessReviewStatus, out *authorization.SubjectAccessReviewStatus, s conversion.Scope) error { + return autoConvert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in, out, s) +} + +func autoConvert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in *authorization.SubjectAccessReviewStatus, out *SubjectAccessReviewStatus, s conversion.Scope) error { + out.Allowed = in.Allowed + out.Reason = in.Reason + out.EvaluationError = in.EvaluationError + return nil +} + +func Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in *authorization.SubjectAccessReviewStatus, out *SubjectAccessReviewStatus, s conversion.Scope) error { + return autoConvert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in, out, s) +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..1f3199a35 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.deepcopy.go @@ -0,0 +1,179 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SelfSubjectAccessReview, InType: reflect.TypeOf(&SelfSubjectAccessReview{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SelfSubjectAccessReviewSpec, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})}, + ) +} + +func DeepCopy_v1_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*LocalSubjectAccessReview) + out := out.(*LocalSubjectAccessReview) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) + } + if err := DeepCopy_v1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1_NonResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*NonResourceAttributes) + out := out.(*NonResourceAttributes) + *out = *in + return nil + } +} + +func DeepCopy_v1_ResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ResourceAttributes) + out := out.(*ResourceAttributes) + *out = *in + return nil + } +} + +func DeepCopy_v1_SelfSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*SelfSubjectAccessReview) + out := out.(*SelfSubjectAccessReview) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) + } + if err := DeepCopy_v1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1_SelfSubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*SelfSubjectAccessReviewSpec) + out := out.(*SelfSubjectAccessReviewSpec) + *out = *in + if in.ResourceAttributes != nil { + in, out := &in.ResourceAttributes, &out.ResourceAttributes + *out = new(ResourceAttributes) + **out = **in + } + if in.NonResourceAttributes != nil { + in, out := &in.NonResourceAttributes, &out.NonResourceAttributes + *out = new(NonResourceAttributes) + **out = **in + } + return nil + } +} + +func DeepCopy_v1_SubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*SubjectAccessReview) + out := out.(*SubjectAccessReview) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) + } + if err := DeepCopy_v1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1_SubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*SubjectAccessReviewSpec) + out := out.(*SubjectAccessReviewSpec) + *out = *in + if in.ResourceAttributes != nil { + in, out := &in.ResourceAttributes, &out.ResourceAttributes + *out = new(ResourceAttributes) + **out = **in + } + if in.NonResourceAttributes != nil { + in, out := &in.NonResourceAttributes, &out.NonResourceAttributes + *out = new(NonResourceAttributes) + **out = **in + } + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Extra != nil { + in, out := &in.Extra, &out.Extra + *out = make(map[string]ExtraValue) + for key, val := range *in { + if newVal, err := c.DeepCopy(&val); err != nil { + return err + } else { + (*out)[key] = *newVal.(*ExtraValue) + } + } + } + return nil + } +} + +func DeepCopy_v1_SubjectAccessReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*SubjectAccessReviewStatus) + out := out.(*SubjectAccessReviewStatus) + *out = *in + return nil + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.defaults.go new file mode 100644 index 000000000..6df448eb9 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/conversion.go similarity index 95% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/conversion.go rename to vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/conversion.go index 842907613..c40138365 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/conversion.go +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/conversion.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" ) func addConversionFuncs(scheme *runtime.Scheme) error { diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/defaults.go similarity index 95% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/defaults.go rename to vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/defaults.go index 3ea53fa49..cb49b06ac 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/defaults.go +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/defaults.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/doc.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/doc.go new file mode 100644 index 000000000..738b0b6d2 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +groupName=authorization.k8s.io +package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.pb.go similarity index 89% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/generated.pb.go rename to vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.pb.go index 47aa73598..65877a2ad 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/generated.pb.go +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -99,15 +99,15 @@ func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) { } func init() { - proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.1.5.pkg.apis.authorization.v1beta1.ExtraValue") - proto.RegisterType((*LocalSubjectAccessReview)(nil), "k8s.io.client-go.1.5.pkg.apis.authorization.v1beta1.LocalSubjectAccessReview") - proto.RegisterType((*NonResourceAttributes)(nil), "k8s.io.client-go.1.5.pkg.apis.authorization.v1beta1.NonResourceAttributes") - proto.RegisterType((*ResourceAttributes)(nil), "k8s.io.client-go.1.5.pkg.apis.authorization.v1beta1.ResourceAttributes") - proto.RegisterType((*SelfSubjectAccessReview)(nil), "k8s.io.client-go.1.5.pkg.apis.authorization.v1beta1.SelfSubjectAccessReview") - proto.RegisterType((*SelfSubjectAccessReviewSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.authorization.v1beta1.SelfSubjectAccessReviewSpec") - proto.RegisterType((*SubjectAccessReview)(nil), "k8s.io.client-go.1.5.pkg.apis.authorization.v1beta1.SubjectAccessReview") - proto.RegisterType((*SubjectAccessReviewSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.authorization.v1beta1.SubjectAccessReviewSpec") - proto.RegisterType((*SubjectAccessReviewStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.authorization.v1beta1.SubjectAccessReviewStatus") + proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.ExtraValue") + proto.RegisterType((*LocalSubjectAccessReview)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.LocalSubjectAccessReview") + proto.RegisterType((*NonResourceAttributes)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.NonResourceAttributes") + proto.RegisterType((*ResourceAttributes)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.ResourceAttributes") + proto.RegisterType((*SelfSubjectAccessReview)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.SelfSubjectAccessReview") + proto.RegisterType((*SelfSubjectAccessReviewSpec)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.SelfSubjectAccessReviewSpec") + proto.RegisterType((*SubjectAccessReview)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.SubjectAccessReview") + proto.RegisterType((*SubjectAccessReviewSpec)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.SubjectAccessReviewSpec") + proto.RegisterType((*SubjectAccessReviewStatus)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.SubjectAccessReviewStatus") } func (m ExtraValue) Marshal() (data []byte, err error) { size := m.Size() @@ -670,7 +670,7 @@ func (this *LocalSubjectAccessReview) String() string { return "nil" } s := strings.Join([]string{`&LocalSubjectAccessReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -709,7 +709,7 @@ func (this *SelfSubjectAccessReview) String() string { return "nil" } s := strings.Join([]string{`&SelfSubjectAccessReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectAccessReviewSpec", "SelfSubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -732,7 +732,7 @@ func (this *SubjectAccessReview) String() string { return "nil" } s := strings.Join([]string{`&SubjectAccessReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -2283,59 +2283,62 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 864 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x56, 0x4d, 0x4f, 0x1b, 0x47, - 0x18, 0xf6, 0xf7, 0xc7, 0xd0, 0x16, 0x3a, 0x88, 0x62, 0x5c, 0x09, 0x5b, 0xae, 0x54, 0x81, 0x04, - 0xbb, 0x05, 0x09, 0x15, 0xa1, 0x1e, 0xea, 0x55, 0x2d, 0x84, 0x5a, 0x68, 0x35, 0x6e, 0x51, 0xd5, - 0x9e, 0x66, 0xd7, 0x83, 0xd9, 0xd8, 0xde, 0xb5, 0x66, 0x66, 0x4d, 0xc8, 0x89, 0x1f, 0x90, 0x43, - 0x8e, 0x1c, 0xf3, 0x17, 0xf2, 0x07, 0x72, 0x0d, 0x47, 0x72, 0x89, 0x12, 0x29, 0x42, 0x09, 0xf9, - 0x17, 0x39, 0x65, 0x76, 0x76, 0xec, 0xc5, 0x78, 0x9d, 0xc8, 0x09, 0x8a, 0x72, 0xe0, 0x30, 0xd2, - 0xce, 0xfb, 0xf1, 0xbc, 0xcf, 0xcc, 0x3c, 0xb3, 0xef, 0x80, 0x5f, 0x5b, 0x9b, 0x4c, 0xb3, 0x5d, - 0xbd, 0xe5, 0x99, 0x84, 0x3a, 0x84, 0x13, 0xa6, 0x77, 0x5b, 0x4d, 0x1d, 0x77, 0x6d, 0xa6, 0x63, - 0x8f, 0x1f, 0xba, 0xd4, 0xbe, 0x87, 0xb9, 0xed, 0x3a, 0x7a, 0x6f, 0xcd, 0x24, 0x1c, 0xaf, 0xe9, - 0x4d, 0xe2, 0x10, 0x8a, 0x39, 0x69, 0x68, 0x5d, 0xea, 0x72, 0x17, 0xfe, 0x14, 0x20, 0x68, 0x21, - 0x82, 0x26, 0x10, 0x34, 0x1f, 0x41, 0x1b, 0x42, 0xd0, 0x14, 0x42, 0x71, 0xb5, 0x69, 0xf3, 0x43, - 0xcf, 0xd4, 0x2c, 0xb7, 0xa3, 0x37, 0xdd, 0xa6, 0xab, 0x4b, 0x20, 0xd3, 0x3b, 0x90, 0x33, 0x39, - 0x91, 0x5f, 0x41, 0x81, 0xe2, 0xfa, 0x58, 0x8a, 0x3a, 0x25, 0xcc, 0xf5, 0xa8, 0x45, 0xae, 0x93, - 0x2a, 0x6e, 0x8c, 0xcf, 0xf1, 0x9c, 0x1e, 0xa1, 0x4c, 0xf0, 0x21, 0x8d, 0x91, 0xb4, 0x95, 0xf1, - 0x69, 0xbd, 0x91, 0x95, 0x17, 0x57, 0xa3, 0xa3, 0xa9, 0xe7, 0x70, 0xbb, 0x33, 0xca, 0x69, 0x2d, - 0x3a, 0xdc, 0xe3, 0x76, 0x5b, 0xb7, 0x1d, 0xce, 0x38, 0xbd, 0x9e, 0x52, 0xf9, 0x19, 0x80, 0xda, - 0x5d, 0x4e, 0xf1, 0x3e, 0x6e, 0x7b, 0x04, 0x96, 0x40, 0xda, 0xe6, 0xa4, 0xc3, 0x0a, 0xf1, 0x72, - 0x72, 0x29, 0x6f, 0xe4, 0x2f, 0x2f, 0x4a, 0xe9, 0x1d, 0xdf, 0x80, 0x02, 0xfb, 0x56, 0xee, 0xf4, - 0x61, 0x29, 0x76, 0xf2, 0xb2, 0x1c, 0xab, 0x3c, 0x4b, 0x80, 0xc2, 0x1f, 0xae, 0x85, 0xdb, 0x75, - 0xcf, 0xbc, 0x43, 0x2c, 0x5e, 0xb5, 0x2c, 0xc2, 0x18, 0x22, 0x3d, 0x9b, 0x1c, 0xc1, 0x7f, 0x41, - 0xae, 0x23, 0x0e, 0xa2, 0x81, 0x39, 0x16, 0x50, 0xf1, 0xa5, 0xa9, 0xf5, 0x25, 0x6d, 0xec, 0x21, - 0x8a, 0x53, 0xd3, 0xfe, 0x94, 0x18, 0xbb, 0x22, 0xc7, 0x80, 0x67, 0x17, 0xa5, 0x98, 0x28, 0x0c, - 0x42, 0x1b, 0x1a, 0xa0, 0xc1, 0x16, 0x48, 0xb1, 0x2e, 0xb1, 0x0a, 0x09, 0x89, 0xba, 0xa3, 0x4d, - 0x2a, 0x0d, 0x2d, 0x82, 0x6e, 0x5d, 0x00, 0x1a, 0x5f, 0xa9, 0xb2, 0x29, 0x7f, 0x86, 0x64, 0x11, - 0xc8, 0x40, 0x86, 0x71, 0xcc, 0x3d, 0x56, 0x48, 0xca, 0x72, 0xbf, 0xdf, 0x4c, 0x39, 0x09, 0x69, - 0x7c, 0xa3, 0x0a, 0x66, 0x82, 0x39, 0x52, 0xa5, 0x2a, 0xff, 0x83, 0xb9, 0x3d, 0xd7, 0x41, 0x4a, - 0x77, 0x55, 0xce, 0xa9, 0x6d, 0x7a, 0xa2, 0x12, 0x2c, 0x83, 0x54, 0x17, 0xf3, 0x43, 0xb9, 0xa1, - 0xf9, 0x90, 0xef, 0x5f, 0xc2, 0x86, 0xa4, 0xc7, 0x8f, 0x10, 0xca, 0x33, 0xe5, 0xe6, 0x5c, 0x89, - 0xd8, 0x17, 0x36, 0x24, 0x3d, 0x95, 0xc7, 0x09, 0x00, 0x23, 0xa0, 0x75, 0x90, 0x77, 0x70, 0x87, - 0xb0, 0x2e, 0xb6, 0x88, 0xc2, 0xff, 0x56, 0x65, 0xe7, 0xf7, 0xfa, 0x0e, 0x14, 0xc6, 0x7c, 0xb8, - 0x12, 0xfc, 0x01, 0xa4, 0x9b, 0xd4, 0xf5, 0xba, 0x72, 0xeb, 0xf2, 0xc6, 0xd7, 0x2a, 0x24, 0xbd, - 0xed, 0x1b, 0x51, 0xe0, 0x83, 0xcb, 0x20, 0xab, 0xae, 0x4a, 0x21, 0x25, 0xc3, 0xa6, 0x55, 0x58, - 0x76, 0x3f, 0x30, 0xa3, 0xbe, 0x1f, 0xae, 0x80, 0x5c, 0xff, 0x2e, 0x16, 0xd2, 0x32, 0x76, 0x46, - 0xc5, 0xe6, 0xfa, 0x0b, 0x42, 0x83, 0x08, 0xb8, 0x01, 0xa6, 0x98, 0x67, 0x0e, 0x12, 0x32, 0x32, - 0x61, 0x56, 0x25, 0x4c, 0xd5, 0x43, 0x17, 0xba, 0x1a, 0xe7, 0x2f, 0xcb, 0x5f, 0x63, 0x21, 0x3b, - 0xbc, 0x2c, 0x7f, 0x0b, 0x90, 0xf4, 0x54, 0x5e, 0x24, 0xc0, 0x7c, 0x9d, 0xb4, 0x0f, 0x3e, 0xaf, - 0xea, 0xdd, 0x21, 0xd5, 0xef, 0x7e, 0x84, 0x0c, 0xa3, 0x29, 0x7f, 0x59, 0xca, 0x7f, 0x92, 0x00, - 0xdf, 0xbf, 0x87, 0x28, 0xbc, 0x1f, 0x07, 0x90, 0x8e, 0x88, 0x57, 0x6d, 0xf5, 0x6f, 0x93, 0x33, - 0x1c, 0xbd, 0x08, 0xc6, 0x77, 0x82, 0x56, 0xc4, 0x05, 0x41, 0x11, 0x75, 0xe1, 0x69, 0x1c, 0xcc, - 0x39, 0x51, 0x37, 0x55, 0x1d, 0xd3, 0xf6, 0xe4, 0x8c, 0x22, 0x2f, 0xbe, 0xb1, 0x20, 0x48, 0x45, - 0xff, 0x13, 0x50, 0x34, 0x81, 0xca, 0xd3, 0x04, 0x98, 0xbd, 0xfd, 0x2f, 0xdf, 0xac, 0x3a, 0xdf, - 0xa6, 0xc4, 0xcd, 0xbf, 0x55, 0xe6, 0xa7, 0x29, 0x73, 0xd0, 0x38, 0x92, 0xc3, 0x7f, 0xd8, 0x7f, - 0x18, 0xa1, 0xaa, 0x71, 0x94, 0xfb, 0x8d, 0x23, 0x25, 0xdf, 0x20, 0xc0, 0x3f, 0x0a, 0xd9, 0x34, - 0x58, 0xbf, 0x6b, 0x1c, 0x83, 0x34, 0xf1, 0xdf, 0x2c, 0xa2, 0x0f, 0x24, 0xc5, 0x6a, 0xfe, 0xbe, - 0x31, 0xb1, 0x69, 0xf2, 0x29, 0x54, 0x73, 0x38, 0x3d, 0x0e, 0x1b, 0x96, 0xb4, 0xa1, 0xa0, 0x62, - 0xb1, 0xa7, 0x9e, 0x4b, 0x32, 0x06, 0xce, 0x80, 0x64, 0x8b, 0x1c, 0x07, 0x0d, 0x13, 0xf9, 0x9f, - 0x10, 0x81, 0x74, 0xcf, 0x7f, 0x49, 0xa9, 0x8d, 0xfe, 0x65, 0x72, 0x6a, 0xe1, 0x6b, 0x0c, 0x05, - 0x50, 0x5b, 0x89, 0xcd, 0x78, 0xe5, 0x51, 0x1c, 0x2c, 0x8c, 0x95, 0xac, 0xdf, 0x46, 0x71, 0xbb, - 0xed, 0x1e, 0x91, 0x86, 0xe4, 0x92, 0x0b, 0xdb, 0x68, 0x35, 0x30, 0xa3, 0xbe, 0x1f, 0xfe, 0x08, - 0x32, 0x94, 0x60, 0x26, 0x1a, 0x6e, 0xd0, 0xba, 0x07, 0x6a, 0x47, 0xd2, 0x8a, 0x94, 0x17, 0x56, - 0xc1, 0x34, 0xf1, 0xcb, 0x4b, 0x72, 0x35, 0x4a, 0x5d, 0xaa, 0x8e, 0x6c, 0x5e, 0x25, 0x4c, 0xd7, - 0x86, 0xdd, 0xe8, 0x7a, 0xbc, 0xb1, 0x7c, 0xf6, 0x7a, 0x31, 0x76, 0x2e, 0xc6, 0x73, 0x31, 0x4e, - 0x2e, 0x17, 0xe3, 0x67, 0x62, 0x9c, 0x8b, 0xf1, 0x4a, 0x8c, 0x07, 0x6f, 0x16, 0x63, 0xff, 0x65, - 0xd5, 0xa2, 0xdf, 0x05, 0x00, 0x00, 0xff, 0xff, 0x0c, 0xa4, 0x8c, 0xef, 0x24, 0x0c, 0x00, 0x00, + // 904 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0xdc, 0x44, + 0x14, 0x5f, 0xef, 0x9f, 0x64, 0x77, 0x02, 0xa4, 0x4c, 0x55, 0xe2, 0x06, 0x69, 0x77, 0xb5, 0x48, + 0x28, 0x95, 0x8a, 0xdd, 0x94, 0x7f, 0x55, 0xc5, 0x81, 0x58, 0x44, 0x55, 0x05, 0x2d, 0x68, 0x02, + 0x39, 0xc0, 0x85, 0xb1, 0xf3, 0xba, 0x6b, 0x76, 0xed, 0xb1, 0x66, 0xc6, 0x6e, 0xc3, 0xa9, 0x1f, + 0x80, 0x03, 0xc7, 0x1e, 0xf9, 0x0a, 0x7c, 0x01, 0xae, 0xe4, 0xd8, 0x23, 0x48, 0x68, 0x45, 0xcc, + 0xb7, 0xe0, 0x84, 0x66, 0x3c, 0xbb, 0xce, 0xb2, 0x0e, 0xd5, 0x42, 0x11, 0x1c, 0x72, 0xb3, 0xdf, + 0xfb, 0xbd, 0xf7, 0x7e, 0xef, 0xcd, 0x9b, 0x79, 0x0f, 0xbd, 0x3f, 0xbe, 0x25, 0x9c, 0x90, 0xb9, + 0xe3, 0xd4, 0x07, 0x1e, 0x83, 0x04, 0xe1, 0x26, 0xe3, 0xa1, 0x4b, 0x93, 0x50, 0xb8, 0x34, 0x95, + 0x23, 0xc6, 0xc3, 0xaf, 0xa9, 0x0c, 0x59, 0xec, 0x66, 0xbb, 0x3e, 0x48, 0xba, 0xeb, 0x0e, 0x21, + 0x06, 0x4e, 0x25, 0x1c, 0x39, 0x09, 0x67, 0x92, 0xe1, 0x1b, 0x85, 0x07, 0xa7, 0xf4, 0xe0, 0x24, + 0xe3, 0xa1, 0xa3, 0x3c, 0x38, 0x0b, 0x1e, 0x1c, 0xe3, 0x61, 0xfb, 0x8d, 0x61, 0x28, 0x47, 0xa9, + 0xef, 0x04, 0x2c, 0x72, 0x87, 0x6c, 0xc8, 0x5c, 0xed, 0xc8, 0x4f, 0x1f, 0xe8, 0x3f, 0xfd, 0xa3, + 0xbf, 0x8a, 0x00, 0xdb, 0x6f, 0x19, 0x8a, 0x34, 0x09, 0x23, 0x1a, 0x8c, 0xc2, 0x18, 0xf8, 0x71, + 0x49, 0x32, 0x02, 0x49, 0xdd, 0x6c, 0x89, 0xd6, 0xb6, 0x7b, 0x9e, 0x15, 0x4f, 0x63, 0x19, 0x46, + 0xb0, 0x64, 0xf0, 0xce, 0xb3, 0x0c, 0x44, 0x30, 0x82, 0x88, 0x2e, 0xd9, 0xbd, 0x79, 0x9e, 0x5d, + 0x2a, 0xc3, 0x89, 0x1b, 0xc6, 0x52, 0x48, 0xbe, 0x64, 0x74, 0x26, 0x27, 0x01, 0x3c, 0x03, 0x5e, + 0x26, 0x04, 0x8f, 0x68, 0x94, 0x4c, 0xa0, 0x2a, 0xa7, 0xeb, 0xe7, 0x1e, 0x56, 0x05, 0x7a, 0xf0, + 0x2e, 0x42, 0xfb, 0x8f, 0x24, 0xa7, 0x87, 0x74, 0x92, 0x02, 0xee, 0xa1, 0x56, 0x28, 0x21, 0x12, + 0xb6, 0xd5, 0x6f, 0xec, 0x74, 0xbc, 0x4e, 0x3e, 0xed, 0xb5, 0xee, 0x2a, 0x01, 0x29, 0xe4, 0xb7, + 0xdb, 0x4f, 0xbe, 0xeb, 0xd5, 0x1e, 0xff, 0xd2, 0xaf, 0x0d, 0xa6, 0x75, 0x64, 0x7f, 0xc4, 0x02, + 0x3a, 0x39, 0x48, 0xfd, 0xaf, 0x20, 0x90, 0x7b, 0x41, 0x00, 0x42, 0x10, 0xc8, 0x42, 0x78, 0x88, + 0xbf, 0x44, 0x6d, 0x55, 0xf2, 0x23, 0x2a, 0xa9, 0x6d, 0xf5, 0xad, 0x9d, 0x8d, 0x9b, 0x37, 0x1c, + 0xd3, 0x01, 0x67, 0x2b, 0x50, 0xf6, 0x80, 0x42, 0x3b, 0xd9, 0xae, 0xf3, 0xb1, 0xf6, 0x75, 0x0f, + 0x24, 0xf5, 0xf0, 0xc9, 0xb4, 0x57, 0xcb, 0xa7, 0x3d, 0x54, 0xca, 0xc8, 0xdc, 0x2b, 0x1e, 0xa3, + 0xa6, 0x48, 0x20, 0xb0, 0xeb, 0xda, 0xfb, 0x5d, 0x67, 0xd5, 0xfe, 0x72, 0x2a, 0x68, 0x1f, 0x24, + 0x10, 0x78, 0x2f, 0x98, 0xb0, 0x4d, 0xf5, 0x47, 0x74, 0x10, 0x2c, 0xd0, 0x9a, 0x90, 0x54, 0xa6, + 0xc2, 0x6e, 0xe8, 0x70, 0x1f, 0x3e, 0x9f, 0x70, 0xda, 0xa5, 0xf7, 0x92, 0x09, 0xb8, 0x56, 0xfc, + 0x13, 0x13, 0x6a, 0xf0, 0x05, 0xba, 0x72, 0x9f, 0xc5, 0x04, 0x04, 0x4b, 0x79, 0x00, 0x7b, 0x52, + 0xf2, 0xd0, 0x4f, 0x25, 0x08, 0xdc, 0x47, 0xcd, 0x84, 0xca, 0x91, 0x2e, 0x6c, 0xa7, 0xe4, 0xfb, + 0x09, 0x95, 0x23, 0xa2, 0x35, 0x0a, 0x91, 0x01, 0xf7, 0x75, 0x71, 0xce, 0x20, 0x0e, 0x81, 0xfb, + 0x44, 0x6b, 0x06, 0x3f, 0xd4, 0x11, 0xae, 0x70, 0xed, 0xa2, 0x4e, 0x4c, 0x23, 0x10, 0x09, 0x0d, + 0xc0, 0xf8, 0x7f, 0xd9, 0x58, 0x77, 0xee, 0xcf, 0x14, 0xa4, 0xc4, 0x3c, 0x3b, 0x12, 0x7e, 0x0d, + 0xb5, 0x86, 0x9c, 0xa5, 0x89, 0x2e, 0x5d, 0xc7, 0x7b, 0xd1, 0x40, 0x5a, 0x77, 0x94, 0x90, 0x14, + 0x3a, 0x7c, 0x0d, 0xad, 0x67, 0xc0, 0x45, 0xc8, 0x62, 0xbb, 0xa9, 0x61, 0x9b, 0x06, 0xb6, 0x7e, + 0x58, 0x88, 0xc9, 0x4c, 0x8f, 0xaf, 0xa3, 0x36, 0x37, 0xc4, 0xed, 0x96, 0xc6, 0x5e, 0x32, 0xd8, + 0xf6, 0x2c, 0x21, 0x32, 0x47, 0xe0, 0xb7, 0xd1, 0x86, 0x48, 0xfd, 0xb9, 0xc1, 0x9a, 0x36, 0xb8, + 0x6c, 0x0c, 0x36, 0x0e, 0x4a, 0x15, 0x39, 0x8b, 0x53, 0x69, 0xa9, 0x1c, 0xed, 0xf5, 0xc5, 0xb4, + 0x54, 0x09, 0x88, 0xd6, 0x0c, 0x4e, 0xeb, 0x68, 0xeb, 0x00, 0x26, 0x0f, 0xfe, 0x9b, 0xee, 0x67, + 0x0b, 0xdd, 0x7f, 0xef, 0x6f, 0xb4, 0x63, 0x35, 0xf5, 0xff, 0xd7, 0x0d, 0xf8, 0xb1, 0x8e, 0x5e, + 0xfd, 0x0b, 0xa2, 0xf8, 0x1b, 0x0b, 0x61, 0xbe, 0xd4, 0xc4, 0xa6, 0xe4, 0x1f, 0xac, 0xce, 0x70, + 0xf9, 0x42, 0x78, 0xaf, 0xe4, 0xd3, 0x5e, 0xc5, 0x45, 0x21, 0x15, 0x71, 0xf1, 0x13, 0x0b, 0x5d, + 0x89, 0xab, 0x6e, 0xac, 0x39, 0xa6, 0x3b, 0xab, 0x33, 0xaa, 0x7c, 0x00, 0xbc, 0xab, 0xf9, 0xb4, + 0x57, 0xfd, 0x36, 0x90, 0x6a, 0x02, 0x83, 0x9f, 0xeb, 0xe8, 0xf2, 0xc5, 0x3b, 0xfd, 0xef, 0x74, + 0xe9, 0xef, 0x4d, 0xb4, 0x75, 0xd1, 0xa1, 0xff, 0xb0, 0x43, 0xe7, 0x83, 0xa4, 0xb1, 0xf8, 0xe2, + 0x7e, 0x26, 0x80, 0x9b, 0x41, 0xd2, 0x9f, 0x0d, 0x92, 0xa6, 0xde, 0x4d, 0x90, 0x3a, 0x0a, 0x3d, + 0x44, 0xc4, 0x6c, 0x8a, 0x1c, 0xa3, 0x16, 0xa8, 0x5d, 0xc6, 0x6e, 0xf5, 0x1b, 0x3b, 0x1b, 0x37, + 0x3f, 0x7d, 0x6e, 0xcd, 0xe6, 0xe8, 0x15, 0x69, 0x3f, 0x96, 0xfc, 0xb8, 0x1c, 0x60, 0x5a, 0x46, + 0x8a, 0x88, 0xdb, 0x99, 0x59, 0xa3, 0x34, 0x06, 0x5f, 0x42, 0x8d, 0x31, 0x1c, 0x17, 0x03, 0x94, + 0xa8, 0x4f, 0x4c, 0x50, 0x2b, 0x53, 0x1b, 0x96, 0x29, 0xf4, 0x7b, 0xab, 0x53, 0x2b, 0xb7, 0x34, + 0x52, 0xb8, 0xba, 0x5d, 0xbf, 0x65, 0x0d, 0xbe, 0xb7, 0xd0, 0xd5, 0x73, 0x5b, 0x56, 0x8d, 0x55, + 0x3a, 0x99, 0xb0, 0x87, 0x70, 0xa4, 0xb9, 0xb4, 0xcb, 0xb1, 0xba, 0x57, 0x88, 0xc9, 0x4c, 0x8f, + 0x5f, 0x47, 0x6b, 0x1c, 0xa8, 0x60, 0xb1, 0x19, 0xe5, 0xf3, 0x6e, 0x27, 0x5a, 0x4a, 0x8c, 0x16, + 0xef, 0xa1, 0x4d, 0x50, 0xe1, 0x35, 0xb9, 0x7d, 0xce, 0x19, 0x37, 0x47, 0xb6, 0x65, 0x0c, 0x36, + 0xf7, 0x17, 0xd5, 0xe4, 0xcf, 0x78, 0xef, 0xda, 0xc9, 0x69, 0xb7, 0xf6, 0xf4, 0xb4, 0x5b, 0xfb, + 0xe9, 0xb4, 0x5b, 0x7b, 0x9c, 0x77, 0xad, 0x93, 0xbc, 0x6b, 0x3d, 0xcd, 0xbb, 0xd6, 0xaf, 0x79, + 0xd7, 0xfa, 0xf6, 0xb7, 0x6e, 0xed, 0xf3, 0x75, 0x93, 0xf4, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x38, 0xbb, 0x77, 0xc4, 0x79, 0x0c, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.proto similarity index 87% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/generated.proto rename to vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.proto index bd98cee07..6b77db462 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/generated.proto +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,11 +21,12 @@ syntax = 'proto2'; package k8s.io.kubernetes.pkg.apis.authorization.v1beta1; -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; -import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; @@ -43,22 +44,26 @@ message ExtraValue { // Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions // checking. message LocalSubjectAccessReview { - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace // you made the request against. If empty, it is defaulted. optional SubjectAccessReviewSpec spec = 2; // Status is filled in by the server and indicates whether the request is allowed or not + // +optional optional SubjectAccessReviewStatus status = 3; } // NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface message NonResourceAttributes { // Path is the URL path of the request + // +optional optional string path = 1; // Verb is the standard HTTP verb + // +optional optional string verb = 2; } @@ -68,24 +73,31 @@ message ResourceAttributes { // "" (empty) is defaulted for LocalSubjectAccessReviews // "" (empty) is empty for cluster-scoped resources // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview + // +optional optional string namespace = 1; // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. + // +optional optional string verb = 2; // Group is the API Group of the Resource. "*" means all. + // +optional optional string group = 3; // Version is the API Version of the Resource. "*" means all. + // +optional optional string version = 4; // Resource is one of the existing resource types. "*" means all. + // +optional optional string resource = 5; // Subresource is one of the existing resource types. "" means none. + // +optional optional string subresource = 6; // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. + // +optional optional string name = 7; } @@ -93,12 +105,14 @@ message ResourceAttributes { // spec.namespace means "in all namespaces". Self is a special case, because users should always be able // to check whether they can perform an action message SelfSubjectAccessReview { - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated. user and groups must be empty optional SelfSubjectAccessReviewSpec spec = 2; // Status is filled in by the server and indicates whether the request is allowed or not + // +optional optional SubjectAccessReviewStatus status = 3; } @@ -106,20 +120,24 @@ message SelfSubjectAccessReview { // and NonResourceAuthorizationAttributes must be set message SelfSubjectAccessReviewSpec { // ResourceAuthorizationAttributes describes information for a resource access request + // +optional optional ResourceAttributes resourceAttributes = 1; // NonResourceAttributes describes information for a non-resource access request + // +optional optional NonResourceAttributes nonResourceAttributes = 2; } // SubjectAccessReview checks whether or not a user or group can perform an action. message SubjectAccessReview { - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated optional SubjectAccessReviewSpec spec = 2; // Status is filled in by the server and indicates whether the request is allowed or not + // +optional optional SubjectAccessReviewStatus status = 3; } @@ -127,20 +145,25 @@ message SubjectAccessReview { // and NonResourceAuthorizationAttributes must be set message SubjectAccessReviewSpec { // ResourceAuthorizationAttributes describes information for a resource access request + // +optional optional ResourceAttributes resourceAttributes = 1; // NonResourceAttributes describes information for a non-resource access request + // +optional optional NonResourceAttributes nonResourceAttributes = 2; // User is the user you're testing for. // If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups + // +optional optional string verb = 3; // Groups is the groups you're testing for. + // +optional repeated string group = 4; // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer // it needs a reflection here. + // +optional map extra = 5; } @@ -150,11 +173,13 @@ message SubjectAccessReviewStatus { optional bool allowed = 1; // Reason is optional. It indicates why a request was allowed or denied. + // +optional optional string reason = 2; // EvaluationError is an indication that some error occurred during the authorization check. // It is entirely possible to get an error and be able to continue determine authorization status in spite of it. // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. + // +optional optional string evaluationError = 3; } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/register.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/register.go similarity index 60% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/register.go rename to vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/register.go index d809d7c9b..66549ed83 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/register.go @@ -17,17 +17,21 @@ limitations under the License. package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/runtime" - versionedwatch "k8s.io/client-go/1.5/pkg/watch/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "authorization.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1beta1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs) @@ -37,18 +41,15 @@ var ( // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &SelfSubjectAccessReview{}, &SubjectAccessReview{}, &LocalSubjectAccessReview{}, ) - versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } -func (obj *LocalSubjectAccessReview) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } -func (obj *SubjectAccessReview) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } -func (obj *SelfSubjectAccessReview) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *LocalSubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } +func (obj *SubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } +func (obj *SelfSubjectAccessReview) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.generated.go similarity index 62% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/types.generated.go rename to vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.generated.go index 90178f2d7..939603c58 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/types.generated.go +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.generated.go @@ -25,9 +25,8 @@ import ( "errors" "fmt" codec1978 "github.com/ugorji/go/codec" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg2_v1 "k8s.io/client-go/1.5/pkg/api/v1" - pkg3_types "k8s.io/client-go/1.5/pkg/types" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -63,11 +62,10 @@ func init() { panic(err) } if false { // reference the types, but skip this branch at build/run time - var v0 pkg1_unversioned.TypeMeta - var v1 pkg2_v1.ObjectMeta - var v2 pkg3_types.UID - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v0 pkg1_v1.TypeMeta + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -168,26 +172,32 @@ func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy11 := &x.ObjectMeta - yy11.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy13 := &x.Spec - yy13.CodecEncodeSelf(e) + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy14 := &x.Spec - yy14.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[4] { - yy16 := &x.Status - yy16.CodecEncodeSelf(e) + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } @@ -196,8 +206,8 @@ func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy17 := &x.Status - yy17.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } if yyr2 || yy2arr2 { @@ -213,25 +223,25 @@ func (x *SubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym18 := z.DecBinary() - _ = yym18 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct19 := r.ContainerType() - if yyct19 == codecSelferValueTypeMap1234 { - yyl19 := r.ReadMapStart() - if yyl19 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl19, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct19 == codecSelferValueTypeArray1234 { - yyl19 := r.ReadArrayStart() - if yyl19 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl19, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -243,12 +253,12 @@ func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys20Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys20Slc - var yyhl20 bool = l >= 0 - for yyj20 := 0; ; yyj20++ { - if yyhl20 { - if yyj20 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -257,47 +267,65 @@ func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys20Slc = r.DecodeBytes(yys20Slc, true, true) - yys20 := string(yys20Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys20 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv23 := &x.ObjectMeta - yyv23.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv24 := &x.Spec - yyv24.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv25 := &x.Status - yyv25.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys20) - } // end switch yys20 - } // end for yyj20 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -305,16 +333,16 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj26 int - var yyb26 bool - var yyhl26 bool = l >= 0 - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb26 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb26 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -322,15 +350,21 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb26 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb26 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -338,32 +372,44 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb26 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb26 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv29 := &x.ObjectMeta - yyv29.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb26 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb26 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -371,16 +417,16 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv30 := &x.Spec - yyv30.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb26 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb26 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -388,21 +434,21 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv31 := &x.Status - yyv31.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb26 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb26 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj26-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -414,38 +460,38 @@ func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym32 := z.EncBinary() - _ = yym32 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep33 := !z.EncBinary() - yy2arr33 := z.EncBasicHandle().StructToArray - var yyq33 [5]bool - _, _, _ = yysep33, yyq33, yy2arr33 - const yyr33 bool = false - yyq33[0] = x.Kind != "" - yyq33[1] = x.APIVersion != "" - yyq33[2] = true - yyq33[4] = true - var yynn33 int - if yyr33 || yy2arr33 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn33 = 1 - for _, b := range yyq33 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn33++ + yynn2++ } } - r.EncodeMapStart(yynn33) - yynn33 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr33 || yy2arr33 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[0] { - yym35 := z.EncBinary() - _ = yym35 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -454,23 +500,23 @@ func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq33[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym36 := z.EncBinary() - _ = yym36 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr33 || yy2arr33 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[1] { - yym38 := z.EncBinary() - _ = yym38 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -479,64 +525,76 @@ func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq33[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym39 := z.EncBinary() - _ = yym39 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr33 || yy2arr33 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[2] { - yy41 := &x.ObjectMeta - yy41.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq33[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy42 := &x.ObjectMeta - yy42.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr33 || yy2arr33 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy44 := &x.Spec - yy44.CodecEncodeSelf(e) + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy45 := &x.Spec - yy45.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } - if yyr33 || yy2arr33 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq33[4] { - yy47 := &x.Status - yy47.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq33[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy48 := &x.Status - yy48.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr33 || yy2arr33 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -549,25 +607,25 @@ func (x *SelfSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym49 := z.DecBinary() - _ = yym49 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct50 := r.ContainerType() - if yyct50 == codecSelferValueTypeMap1234 { - yyl50 := r.ReadMapStart() - if yyl50 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl50, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct50 == codecSelferValueTypeArray1234 { - yyl50 := r.ReadArrayStart() - if yyl50 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl50, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -579,12 +637,12 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys51Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys51Slc - var yyhl51 bool = l >= 0 - for yyj51 := 0; ; yyj51++ { - if yyhl51 { - if yyj51 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -593,47 +651,65 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys51Slc = r.DecodeBytes(yys51Slc, true, true) - yys51 := string(yys51Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys51 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv54 := &x.ObjectMeta - yyv54.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = SelfSubjectAccessReviewSpec{} } else { - yyv55 := &x.Spec - yyv55.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv56 := &x.Status - yyv56.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys51) - } // end switch yys51 - } // end for yyj51 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -641,16 +717,16 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj57 int - var yyb57 bool - var yyhl57 bool = l >= 0 - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb57 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb57 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -658,15 +734,21 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb57 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb57 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -674,32 +756,44 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb57 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb57 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv60 := &x.ObjectMeta - yyv60.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb57 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb57 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -707,16 +801,16 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Spec = SelfSubjectAccessReviewSpec{} } else { - yyv61 := &x.Spec - yyv61.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb57 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb57 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -724,21 +818,21 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv62 := &x.Status - yyv62.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj57++ - if yyhl57 { - yyb57 = yyj57 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb57 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb57 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj57-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -750,38 +844,38 @@ func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym63 := z.EncBinary() - _ = yym63 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep64 := !z.EncBinary() - yy2arr64 := z.EncBasicHandle().StructToArray - var yyq64 [5]bool - _, _, _ = yysep64, yyq64, yy2arr64 - const yyr64 bool = false - yyq64[0] = x.Kind != "" - yyq64[1] = x.APIVersion != "" - yyq64[2] = true - yyq64[4] = true - var yynn64 int - if yyr64 || yy2arr64 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn64 = 1 - for _, b := range yyq64 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn64++ + yynn2++ } } - r.EncodeMapStart(yynn64) - yynn64 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr64 || yy2arr64 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq64[0] { - yym66 := z.EncBinary() - _ = yym66 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -790,23 +884,23 @@ func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq64[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym67 := z.EncBinary() - _ = yym67 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr64 || yy2arr64 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq64[1] { - yym69 := z.EncBinary() - _ = yym69 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -815,64 +909,76 @@ func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq64[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym70 := z.EncBinary() - _ = yym70 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr64 || yy2arr64 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq64[2] { - yy72 := &x.ObjectMeta - yy72.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq64[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy73 := &x.ObjectMeta - yy73.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr64 || yy2arr64 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy75 := &x.Spec - yy75.CodecEncodeSelf(e) + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy76 := &x.Spec - yy76.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } - if yyr64 || yy2arr64 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq64[4] { - yy78 := &x.Status - yy78.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq64[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy79 := &x.Status - yy79.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr64 || yy2arr64 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -885,25 +991,25 @@ func (x *LocalSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym80 := z.DecBinary() - _ = yym80 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct81 := r.ContainerType() - if yyct81 == codecSelferValueTypeMap1234 { - yyl81 := r.ReadMapStart() - if yyl81 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl81, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct81 == codecSelferValueTypeArray1234 { - yyl81 := r.ReadArrayStart() - if yyl81 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl81, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -915,12 +1021,12 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys82Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys82Slc - var yyhl82 bool = l >= 0 - for yyj82 := 0; ; yyj82++ { - if yyhl82 { - if yyj82 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -929,47 +1035,65 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.De } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys82Slc = r.DecodeBytes(yys82Slc, true, true) - yys82 := string(yys82Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys82 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv85 := &x.ObjectMeta - yyv85.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv86 := &x.Spec - yyv86.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv87 := &x.Status - yyv87.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys82) - } // end switch yys82 - } // end for yyj82 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -977,16 +1101,16 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj88 int - var yyb88 bool - var yyhl88 bool = l >= 0 - yyj88++ - if yyhl88 { - yyb88 = yyj88 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb88 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb88 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -994,15 +1118,21 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj88++ - if yyhl88 { - yyb88 = yyj88 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb88 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb88 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1010,32 +1140,44 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj88++ - if yyhl88 { - yyb88 = yyj88 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb88 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb88 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv91 := &x.ObjectMeta - yyv91.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj88++ - if yyhl88 { - yyb88 = yyj88 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb88 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb88 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1043,16 +1185,16 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv92 := &x.Spec - yyv92.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj88++ - if yyhl88 { - yyb88 = yyj88 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb88 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb88 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1060,21 +1202,21 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv93 := &x.Status - yyv93.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj88++ - if yyhl88 { - yyb88 = yyj88 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb88 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb88 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj88-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1086,41 +1228,41 @@ func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym94 := z.EncBinary() - _ = yym94 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep95 := !z.EncBinary() - yy2arr95 := z.EncBasicHandle().StructToArray - var yyq95 [7]bool - _, _, _ = yysep95, yyq95, yy2arr95 - const yyr95 bool = false - yyq95[0] = x.Namespace != "" - yyq95[1] = x.Verb != "" - yyq95[2] = x.Group != "" - yyq95[3] = x.Version != "" - yyq95[4] = x.Resource != "" - yyq95[5] = x.Subresource != "" - yyq95[6] = x.Name != "" - var yynn95 int - if yyr95 || yy2arr95 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [7]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Namespace != "" + yyq2[1] = x.Verb != "" + yyq2[2] = x.Group != "" + yyq2[3] = x.Version != "" + yyq2[4] = x.Resource != "" + yyq2[5] = x.Subresource != "" + yyq2[6] = x.Name != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(7) } else { - yynn95 = 0 - for _, b := range yyq95 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn95++ + yynn2++ } } - r.EncodeMapStart(yynn95) - yynn95 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr95 || yy2arr95 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq95[0] { - yym97 := z.EncBinary() - _ = yym97 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) @@ -1129,23 +1271,23 @@ func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq95[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("namespace")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym98 := z.EncBinary() - _ = yym98 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) } } } - if yyr95 || yy2arr95 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq95[1] { - yym100 := z.EncBinary() - _ = yym100 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Verb)) @@ -1154,23 +1296,23 @@ func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq95[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("verb")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym101 := z.EncBinary() - _ = yym101 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Verb)) } } } - if yyr95 || yy2arr95 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq95[2] { - yym103 := z.EncBinary() - _ = yym103 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Group)) @@ -1179,23 +1321,23 @@ func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq95[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("group")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym104 := z.EncBinary() - _ = yym104 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Group)) } } } - if yyr95 || yy2arr95 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq95[3] { - yym106 := z.EncBinary() - _ = yym106 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Version)) @@ -1204,23 +1346,23 @@ func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq95[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("version")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym107 := z.EncBinary() - _ = yym107 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Version)) } } } - if yyr95 || yy2arr95 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq95[4] { - yym109 := z.EncBinary() - _ = yym109 + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Resource)) @@ -1229,23 +1371,23 @@ func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq95[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resource")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym110 := z.EncBinary() - _ = yym110 + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Resource)) } } } - if yyr95 || yy2arr95 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq95[5] { - yym112 := z.EncBinary() - _ = yym112 + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Subresource)) @@ -1254,23 +1396,23 @@ func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq95[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("subresource")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym113 := z.EncBinary() - _ = yym113 + yym20 := z.EncBinary() + _ = yym20 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Subresource)) } } } - if yyr95 || yy2arr95 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq95[6] { - yym115 := z.EncBinary() - _ = yym115 + if yyq2[6] { + yym22 := z.EncBinary() + _ = yym22 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -1279,19 +1421,19 @@ func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq95[6] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym116 := z.EncBinary() - _ = yym116 + yym23 := z.EncBinary() + _ = yym23 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } } - if yyr95 || yy2arr95 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1304,25 +1446,25 @@ func (x *ResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym117 := z.DecBinary() - _ = yym117 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct118 := r.ContainerType() - if yyct118 == codecSelferValueTypeMap1234 { - yyl118 := r.ReadMapStart() - if yyl118 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl118, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct118 == codecSelferValueTypeArray1234 { - yyl118 := r.ReadArrayStart() - if yyl118 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl118, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -1334,12 +1476,12 @@ func (x *ResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys119Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys119Slc - var yyhl119 bool = l >= 0 - for yyj119 := 0; ; yyj119++ { - if yyhl119 { - if yyj119 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -1348,56 +1490,98 @@ func (x *ResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys119Slc = r.DecodeBytes(yys119Slc, true, true) - yys119 := string(yys119Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys119 { + switch yys3 { case "namespace": if r.TryDecodeAsNil() { x.Namespace = "" } else { - x.Namespace = string(r.DecodeString()) + yyv4 := &x.Namespace + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "verb": if r.TryDecodeAsNil() { x.Verb = "" } else { - x.Verb = string(r.DecodeString()) + yyv6 := &x.Verb + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "group": if r.TryDecodeAsNil() { x.Group = "" } else { - x.Group = string(r.DecodeString()) + yyv8 := &x.Group + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } case "version": if r.TryDecodeAsNil() { x.Version = "" } else { - x.Version = string(r.DecodeString()) + yyv10 := &x.Version + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } case "resource": if r.TryDecodeAsNil() { x.Resource = "" } else { - x.Resource = string(r.DecodeString()) + yyv12 := &x.Resource + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } case "subresource": if r.TryDecodeAsNil() { x.Subresource = "" } else { - x.Subresource = string(r.DecodeString()) + yyv14 := &x.Subresource + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv16 := &x.Name + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys119) - } // end switch yys119 - } // end for yyj119 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -1405,16 +1589,16 @@ func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj127 int - var yyb127 bool - var yyhl127 bool = l >= 0 - yyj127++ - if yyhl127 { - yyb127 = yyj127 > l + var yyj18 int + var yyb18 bool + var yyhl18 bool = l >= 0 + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb127 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb127 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1422,15 +1606,21 @@ func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Namespace = "" } else { - x.Namespace = string(r.DecodeString()) + yyv19 := &x.Namespace + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } } - yyj127++ - if yyhl127 { - yyb127 = yyj127 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb127 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb127 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1438,15 +1628,21 @@ func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Verb = "" } else { - x.Verb = string(r.DecodeString()) + yyv21 := &x.Verb + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } } - yyj127++ - if yyhl127 { - yyb127 = yyj127 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb127 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb127 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1454,15 +1650,21 @@ func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Group = "" } else { - x.Group = string(r.DecodeString()) + yyv23 := &x.Group + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*string)(yyv23)) = r.DecodeString() + } } - yyj127++ - if yyhl127 { - yyb127 = yyj127 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb127 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb127 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1470,15 +1672,21 @@ func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Version = "" } else { - x.Version = string(r.DecodeString()) + yyv25 := &x.Version + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*string)(yyv25)) = r.DecodeString() + } } - yyj127++ - if yyhl127 { - yyb127 = yyj127 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb127 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb127 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1486,15 +1694,21 @@ func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Resource = "" } else { - x.Resource = string(r.DecodeString()) + yyv27 := &x.Resource + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*string)(yyv27)) = r.DecodeString() + } } - yyj127++ - if yyhl127 { - yyb127 = yyj127 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb127 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb127 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1502,15 +1716,21 @@ func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Subresource = "" } else { - x.Subresource = string(r.DecodeString()) + yyv29 := &x.Subresource + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*string)(yyv29)) = r.DecodeString() + } } - yyj127++ - if yyhl127 { - yyb127 = yyj127 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb127 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb127 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1518,20 +1738,26 @@ func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv31 := &x.Name + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + *((*string)(yyv31)) = r.DecodeString() + } } for { - yyj127++ - if yyhl127 { - yyb127 = yyj127 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb127 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb127 { + if yyb18 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj127-1, "") + z.DecStructFieldNotFound(yyj18-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1543,36 +1769,36 @@ func (x *NonResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym135 := z.EncBinary() - _ = yym135 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep136 := !z.EncBinary() - yy2arr136 := z.EncBasicHandle().StructToArray - var yyq136 [2]bool - _, _, _ = yysep136, yyq136, yy2arr136 - const yyr136 bool = false - yyq136[0] = x.Path != "" - yyq136[1] = x.Verb != "" - var yynn136 int - if yyr136 || yy2arr136 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Path != "" + yyq2[1] = x.Verb != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn136 = 0 - for _, b := range yyq136 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn136++ + yynn2++ } } - r.EncodeMapStart(yynn136) - yynn136 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr136 || yy2arr136 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq136[0] { - yym138 := z.EncBinary() - _ = yym138 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) @@ -1581,23 +1807,23 @@ func (x *NonResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq136[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("path")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym139 := z.EncBinary() - _ = yym139 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) } } } - if yyr136 || yy2arr136 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq136[1] { - yym141 := z.EncBinary() - _ = yym141 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Verb)) @@ -1606,19 +1832,19 @@ func (x *NonResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq136[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("verb")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym142 := z.EncBinary() - _ = yym142 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Verb)) } } } - if yyr136 || yy2arr136 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1631,25 +1857,25 @@ func (x *NonResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym143 := z.DecBinary() - _ = yym143 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct144 := r.ContainerType() - if yyct144 == codecSelferValueTypeMap1234 { - yyl144 := r.ReadMapStart() - if yyl144 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl144, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct144 == codecSelferValueTypeArray1234 { - yyl144 := r.ReadArrayStart() - if yyl144 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl144, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -1661,12 +1887,12 @@ func (x *NonResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys145Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys145Slc - var yyhl145 bool = l >= 0 - for yyj145 := 0; ; yyj145++ { - if yyhl145 { - if yyj145 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -1675,26 +1901,38 @@ func (x *NonResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys145Slc = r.DecodeBytes(yys145Slc, true, true) - yys145 := string(yys145Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys145 { + switch yys3 { case "path": if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv4 := &x.Path + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "verb": if r.TryDecodeAsNil() { x.Verb = "" } else { - x.Verb = string(r.DecodeString()) + yyv6 := &x.Verb + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys145) - } // end switch yys145 - } // end for yyj145 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -1702,16 +1940,16 @@ func (x *NonResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj148 int - var yyb148 bool - var yyhl148 bool = l >= 0 - yyj148++ - if yyhl148 { - yyb148 = yyj148 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb148 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb148 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1719,15 +1957,21 @@ func (x *NonResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv9 := &x.Path + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } } - yyj148++ - if yyhl148 { - yyb148 = yyj148 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb148 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb148 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1735,20 +1979,26 @@ func (x *NonResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Verb = "" } else { - x.Verb = string(r.DecodeString()) + yyv11 := &x.Verb + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } for { - yyj148++ - if yyhl148 { - yyb148 = yyj148 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb148 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb148 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj148-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1760,37 +2010,37 @@ func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym151 := z.EncBinary() - _ = yym151 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep152 := !z.EncBinary() - yy2arr152 := z.EncBasicHandle().StructToArray - var yyq152 [5]bool - _, _, _ = yysep152, yyq152, yy2arr152 - const yyr152 bool = false - yyq152[0] = x.ResourceAttributes != nil - yyq152[1] = x.NonResourceAttributes != nil - yyq152[2] = x.User != "" - yyq152[3] = len(x.Groups) != 0 - yyq152[4] = len(x.Extra) != 0 - var yynn152 int - if yyr152 || yy2arr152 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.ResourceAttributes != nil + yyq2[1] = x.NonResourceAttributes != nil + yyq2[2] = x.User != "" + yyq2[3] = len(x.Groups) != 0 + yyq2[4] = len(x.Extra) != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn152 = 0 - for _, b := range yyq152 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn152++ + yynn2++ } } - r.EncodeMapStart(yynn152) - yynn152 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr152 || yy2arr152 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq152[0] { + if yyq2[0] { if x.ResourceAttributes == nil { r.EncodeNil() } else { @@ -1800,7 +2050,7 @@ func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq152[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceAttributes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -1811,9 +2061,9 @@ func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr152 || yy2arr152 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq152[1] { + if yyq2[1] { if x.NonResourceAttributes == nil { r.EncodeNil() } else { @@ -1823,7 +2073,7 @@ func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq152[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nonResourceAttributes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -1834,11 +2084,11 @@ func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr152 || yy2arr152 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq152[2] { - yym156 := z.EncBinary() - _ = yym156 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.User)) @@ -1847,26 +2097,26 @@ func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq152[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("user")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym157 := z.EncBinary() - _ = yym157 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.User)) } } } - if yyr152 || yy2arr152 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq152[3] { + if yyq2[3] { if x.Groups == nil { r.EncodeNil() } else { - yym159 := z.EncBinary() - _ = yym159 + yym13 := z.EncBinary() + _ = yym13 if false { } else { z.F.EncSliceStringV(x.Groups, false, e) @@ -1876,15 +2126,15 @@ func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq152[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("group")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Groups == nil { r.EncodeNil() } else { - yym160 := z.EncBinary() - _ = yym160 + yym14 := z.EncBinary() + _ = yym14 if false { } else { z.F.EncSliceStringV(x.Groups, false, e) @@ -1892,14 +2142,14 @@ func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr152 || yy2arr152 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq152[4] { + if yyq2[4] { if x.Extra == nil { r.EncodeNil() } else { - yym162 := z.EncBinary() - _ = yym162 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e) @@ -1909,15 +2159,15 @@ func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq152[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("extra")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Extra == nil { r.EncodeNil() } else { - yym163 := z.EncBinary() - _ = yym163 + yym17 := z.EncBinary() + _ = yym17 if false { } else { h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e) @@ -1925,7 +2175,7 @@ func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr152 || yy2arr152 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1938,25 +2188,25 @@ func (x *SubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym164 := z.DecBinary() - _ = yym164 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct165 := r.ContainerType() - if yyct165 == codecSelferValueTypeMap1234 { - yyl165 := r.ReadMapStart() - if yyl165 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl165, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct165 == codecSelferValueTypeArray1234 { - yyl165 := r.ReadArrayStart() - if yyl165 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl165, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -1968,12 +2218,12 @@ func (x *SubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys166Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys166Slc - var yyhl166 bool = l >= 0 - for yyj166 := 0; ; yyj166++ { - if yyhl166 { - if yyj166 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -1982,10 +2232,10 @@ func (x *SubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys166Slc = r.DecodeBytes(yys166Slc, true, true) - yys166 := string(yys166Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys166 { + switch yys3 { case "resourceAttributes": if r.TryDecodeAsNil() { if x.ResourceAttributes != nil { @@ -2012,36 +2262,42 @@ func (x *SubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.User = "" } else { - x.User = string(r.DecodeString()) + yyv6 := &x.User + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "group": if r.TryDecodeAsNil() { x.Groups = nil } else { - yyv170 := &x.Groups - yym171 := z.DecBinary() - _ = yym171 + yyv8 := &x.Groups + yym9 := z.DecBinary() + _ = yym9 if false { } else { - z.F.DecSliceStringX(yyv170, false, d) + z.F.DecSliceStringX(yyv8, false, d) } } case "extra": if r.TryDecodeAsNil() { x.Extra = nil } else { - yyv172 := &x.Extra - yym173 := z.DecBinary() - _ = yym173 + yyv10 := &x.Extra + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decMapstringExtraValue((*map[string]ExtraValue)(yyv172), d) + h.decMapstringExtraValue((*map[string]ExtraValue)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys166) - } // end switch yys166 - } // end for yyj166 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -2049,16 +2305,16 @@ func (x *SubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj174 int - var yyb174 bool - var yyhl174 bool = l >= 0 - yyj174++ - if yyhl174 { - yyb174 = yyj174 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb174 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb174 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2073,13 +2329,13 @@ func (x *SubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.D } x.ResourceAttributes.CodecDecodeSelf(d) } - yyj174++ - if yyhl174 { - yyb174 = yyj174 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb174 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb174 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2094,13 +2350,13 @@ func (x *SubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.D } x.NonResourceAttributes.CodecDecodeSelf(d) } - yyj174++ - if yyhl174 { - yyb174 = yyj174 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb174 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb174 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2108,15 +2364,21 @@ func (x *SubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.User = "" } else { - x.User = string(r.DecodeString()) + yyv15 := &x.User + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj174++ - if yyhl174 { - yyb174 = yyj174 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb174 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb174 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2124,21 +2386,21 @@ func (x *SubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Groups = nil } else { - yyv178 := &x.Groups - yym179 := z.DecBinary() - _ = yym179 + yyv17 := &x.Groups + yym18 := z.DecBinary() + _ = yym18 if false { } else { - z.F.DecSliceStringX(yyv178, false, d) + z.F.DecSliceStringX(yyv17, false, d) } } - yyj174++ - if yyhl174 { - yyb174 = yyj174 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb174 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb174 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2146,26 +2408,26 @@ func (x *SubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Extra = nil } else { - yyv180 := &x.Extra - yym181 := z.DecBinary() - _ = yym181 + yyv19 := &x.Extra + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decMapstringExtraValue((*map[string]ExtraValue)(yyv180), d) + h.decMapstringExtraValue((*map[string]ExtraValue)(yyv19), d) } } for { - yyj174++ - if yyhl174 { - yyb174 = yyj174 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb174 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb174 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj174-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2177,8 +2439,8 @@ func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym182 := z.EncBinary() - _ = yym182 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -2191,8 +2453,8 @@ func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym183 := z.DecBinary() - _ = yym183 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -2207,34 +2469,34 @@ func (x *SelfSubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym184 := z.EncBinary() - _ = yym184 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep185 := !z.EncBinary() - yy2arr185 := z.EncBasicHandle().StructToArray - var yyq185 [2]bool - _, _, _ = yysep185, yyq185, yy2arr185 - const yyr185 bool = false - yyq185[0] = x.ResourceAttributes != nil - yyq185[1] = x.NonResourceAttributes != nil - var yynn185 int - if yyr185 || yy2arr185 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.ResourceAttributes != nil + yyq2[1] = x.NonResourceAttributes != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn185 = 0 - for _, b := range yyq185 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn185++ + yynn2++ } } - r.EncodeMapStart(yynn185) - yynn185 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr185 || yy2arr185 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq185[0] { + if yyq2[0] { if x.ResourceAttributes == nil { r.EncodeNil() } else { @@ -2244,7 +2506,7 @@ func (x *SelfSubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq185[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceAttributes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -2255,9 +2517,9 @@ func (x *SelfSubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr185 || yy2arr185 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq185[1] { + if yyq2[1] { if x.NonResourceAttributes == nil { r.EncodeNil() } else { @@ -2267,7 +2529,7 @@ func (x *SelfSubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq185[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nonResourceAttributes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -2278,7 +2540,7 @@ func (x *SelfSubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr185 || yy2arr185 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -2291,25 +2553,25 @@ func (x *SelfSubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym188 := z.DecBinary() - _ = yym188 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct189 := r.ContainerType() - if yyct189 == codecSelferValueTypeMap1234 { - yyl189 := r.ReadMapStart() - if yyl189 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl189, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct189 == codecSelferValueTypeArray1234 { - yyl189 := r.ReadArrayStart() - if yyl189 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl189, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -2321,12 +2583,12 @@ func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys190Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys190Slc - var yyhl190 bool = l >= 0 - for yyj190 := 0; ; yyj190++ { - if yyhl190 { - if yyj190 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -2335,10 +2597,10 @@ func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys190Slc = r.DecodeBytes(yys190Slc, true, true) - yys190 := string(yys190Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys190 { + switch yys3 { case "resourceAttributes": if r.TryDecodeAsNil() { if x.ResourceAttributes != nil { @@ -2362,9 +2624,9 @@ func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978 x.NonResourceAttributes.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys190) - } // end switch yys190 - } // end for yyj190 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -2372,16 +2634,16 @@ func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec19 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj193 int - var yyb193 bool - var yyhl193 bool = l >= 0 - yyj193++ - if yyhl193 { - yyb193 = yyj193 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb193 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb193 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2396,13 +2658,13 @@ func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec19 } x.ResourceAttributes.CodecDecodeSelf(d) } - yyj193++ - if yyhl193 { - yyb193 = yyj193 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb193 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb193 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2418,17 +2680,17 @@ func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec19 x.NonResourceAttributes.CodecDecodeSelf(d) } for { - yyj193++ - if yyhl193 { - yyb193 = yyj193 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb193 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb193 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj193-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2440,35 +2702,35 @@ func (x *SubjectAccessReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym196 := z.EncBinary() - _ = yym196 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep197 := !z.EncBinary() - yy2arr197 := z.EncBasicHandle().StructToArray - var yyq197 [3]bool - _, _, _ = yysep197, yyq197, yy2arr197 - const yyr197 bool = false - yyq197[1] = x.Reason != "" - yyq197[2] = x.EvaluationError != "" - var yynn197 int - if yyr197 || yy2arr197 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Reason != "" + yyq2[2] = x.EvaluationError != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(3) } else { - yynn197 = 1 - for _, b := range yyq197 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn197++ + yynn2++ } } - r.EncodeMapStart(yynn197) - yynn197 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr197 || yy2arr197 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym199 := z.EncBinary() - _ = yym199 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeBool(bool(x.Allowed)) @@ -2477,18 +2739,18 @@ func (x *SubjectAccessReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("allowed")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym200 := z.EncBinary() - _ = yym200 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeBool(bool(x.Allowed)) } } - if yyr197 || yy2arr197 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq197[1] { - yym202 := z.EncBinary() - _ = yym202 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -2497,23 +2759,23 @@ func (x *SubjectAccessReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq197[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym203 := z.EncBinary() - _ = yym203 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr197 || yy2arr197 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq197[2] { - yym205 := z.EncBinary() - _ = yym205 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError)) @@ -2522,19 +2784,19 @@ func (x *SubjectAccessReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq197[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("evaluationError")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym206 := z.EncBinary() - _ = yym206 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError)) } } } - if yyr197 || yy2arr197 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -2547,25 +2809,25 @@ func (x *SubjectAccessReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym207 := z.DecBinary() - _ = yym207 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct208 := r.ContainerType() - if yyct208 == codecSelferValueTypeMap1234 { - yyl208 := r.ReadMapStart() - if yyl208 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl208, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct208 == codecSelferValueTypeArray1234 { - yyl208 := r.ReadArrayStart() - if yyl208 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl208, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -2577,12 +2839,12 @@ func (x *SubjectAccessReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys209Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys209Slc - var yyhl209 bool = l >= 0 - for yyj209 := 0; ; yyj209++ { - if yyhl209 { - if yyj209 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -2591,32 +2853,50 @@ func (x *SubjectAccessReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.D } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys209Slc = r.DecodeBytes(yys209Slc, true, true) - yys209 := string(yys209Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys209 { + switch yys3 { case "allowed": if r.TryDecodeAsNil() { x.Allowed = false } else { - x.Allowed = bool(r.DecodeBool()) + yyv4 := &x.Allowed + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*bool)(yyv4)) = r.DecodeBool() + } } case "reason": if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv6 := &x.Reason + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "evaluationError": if r.TryDecodeAsNil() { x.EvaluationError = "" } else { - x.EvaluationError = string(r.DecodeString()) + yyv8 := &x.EvaluationError + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys209) - } // end switch yys209 - } // end for yyj209 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -2624,16 +2904,16 @@ func (x *SubjectAccessReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj213 int - var yyb213 bool - var yyhl213 bool = l >= 0 - yyj213++ - if yyhl213 { - yyb213 = yyj213 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb213 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb213 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2641,15 +2921,21 @@ func (x *SubjectAccessReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Allowed = false } else { - x.Allowed = bool(r.DecodeBool()) + yyv11 := &x.Allowed + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*bool)(yyv11)) = r.DecodeBool() + } } - yyj213++ - if yyhl213 { - yyb213 = yyj213 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb213 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb213 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2657,15 +2943,21 @@ func (x *SubjectAccessReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Reason = "" } else { - x.Reason = string(r.DecodeString()) + yyv13 := &x.Reason + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj213++ - if yyhl213 { - yyb213 = yyj213 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb213 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb213 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2673,20 +2965,26 @@ func (x *SubjectAccessReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.EvaluationError = "" } else { - x.EvaluationError = string(r.DecodeString()) + yyv15 := &x.EvaluationError + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } for { - yyj213++ - if yyhl213 { - yyb213 = yyj213 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb213 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb213 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj213-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2696,19 +2994,19 @@ func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *code z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeMapStart(len(v)) - for yyk217, yyv217 := range v { + for yyk1, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerMapKey1234) - yym218 := z.EncBinary() - _ = yym218 + yym2 := z.EncBinary() + _ = yym2 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yyk217)) + r.EncodeString(codecSelferC_UTF81234, string(yyk1)) } z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyv217 == nil { + if yyv1 == nil { r.EncodeNil() } else { - yyv217.CodecEncodeSelf(e) + yyv1.CodecEncodeSelf(e) } } z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -2719,70 +3017,82 @@ func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *cod z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv219 := *v - yyl219 := r.ReadMapStart() - yybh219 := z.DecBasicHandle() - if yyv219 == nil { - yyrl219, _ := z.DecInferLen(yyl219, yybh219.MaxInitLen, 40) - yyv219 = make(map[string]ExtraValue, yyrl219) - *v = yyv219 + yyv1 := *v + yyl1 := r.ReadMapStart() + yybh1 := z.DecBasicHandle() + if yyv1 == nil { + yyrl1, _ := z.DecInferLen(yyl1, yybh1.MaxInitLen, 40) + yyv1 = make(map[string]ExtraValue, yyrl1) + *v = yyv1 } - var yymk219 string - var yymv219 ExtraValue - var yymg219 bool - if yybh219.MapValueReset { - yymg219 = true + var yymk1 string + var yymv1 ExtraValue + var yymg1 bool + if yybh1.MapValueReset { + yymg1 = true } - if yyl219 > 0 { - for yyj219 := 0; yyj219 < yyl219; yyj219++ { + if yyl1 > 0 { + for yyj1 := 0; yyj1 < yyl1; yyj1++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk219 = "" + yymk1 = "" } else { - yymk219 = string(r.DecodeString()) + yyv2 := &yymk1 + yym3 := z.DecBinary() + _ = yym3 + if false { + } else { + *((*string)(yyv2)) = r.DecodeString() + } } - if yymg219 { - yymv219 = yyv219[yymk219] + if yymg1 { + yymv1 = yyv1[yymk1] } else { - yymv219 = nil + yymv1 = nil } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv219 = nil + yymv1 = nil } else { - yyv221 := &yymv219 - yyv221.CodecDecodeSelf(d) + yyv4 := &yymv1 + yyv4.CodecDecodeSelf(d) } - if yyv219 != nil { - yyv219[yymk219] = yymv219 + if yyv1 != nil { + yyv1[yymk1] = yymv1 } } - } else if yyl219 < 0 { - for yyj219 := 0; !r.CheckBreak(); yyj219++ { + } else if yyl1 < 0 { + for yyj1 := 0; !r.CheckBreak(); yyj1++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk219 = "" + yymk1 = "" } else { - yymk219 = string(r.DecodeString()) + yyv5 := &yymk1 + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } } - if yymg219 { - yymv219 = yyv219[yymk219] + if yymg1 { + yymv1 = yyv1[yymk1] } else { - yymv219 = nil + yymv1 = nil } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv219 = nil + yymv1 = nil } else { - yyv223 := &yymv219 - yyv223.CodecDecodeSelf(d) + yyv7 := &yymv1 + yyv7.CodecDecodeSelf(d) } - if yyv219 != nil { - yyv219[yymk219] = yymv219 + if yyv1 != nil { + yyv1[yymk1] = yymv1 } } } // else len==0: TODO: Should we clear map entries? @@ -2794,13 +3104,13 @@ func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv224 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym225 := z.EncBinary() - _ = yym225 + yym2 := z.EncBinary() + _ = yym2 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yyv224)) + r.EncodeString(codecSelferC_UTF81234, string(yyv1)) } } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) @@ -2811,75 +3121,96 @@ func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv226 := *v - yyh226, yyl226 := z.DecSliceHelperStart() - var yyc226 bool - if yyl226 == 0 { - if yyv226 == nil { - yyv226 = []string{} - yyc226 = true - } else if len(yyv226) != 0 { - yyv226 = yyv226[:0] - yyc226 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []string{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl226 > 0 { - var yyrr226, yyrl226 int - var yyrt226 bool - if yyl226 > cap(yyv226) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrl226, yyrt226 = z.DecInferLen(yyl226, z.DecBasicHandle().MaxInitLen, 16) - if yyrt226 { - if yyrl226 <= cap(yyv226) { - yyv226 = yyv226[:yyrl226] + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv226 = make([]string, yyrl226) + yyv1 = make([]string, yyrl1) } } else { - yyv226 = make([]string, yyrl226) + yyv1 = make([]string, yyrl1) } - yyc226 = true - yyrr226 = len(yyv226) - } else if yyl226 != len(yyv226) { - yyv226 = yyv226[:yyl226] - yyc226 = true + yyc1 = true + yyrr1 = len(yyv1) + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj226 := 0 - for ; yyj226 < yyrr226; yyj226++ { - yyh226.ElemContainerState(yyj226) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv226[yyj226] = "" + yyv1[yyj1] = "" } else { - yyv226[yyj226] = string(r.DecodeString()) + yyv2 := &yyv1[yyj1] + yym3 := z.DecBinary() + _ = yym3 + if false { + } else { + *((*string)(yyv2)) = r.DecodeString() + } } } - if yyrt226 { - for ; yyj226 < yyl226; yyj226++ { - yyv226 = append(yyv226, "") - yyh226.ElemContainerState(yyj226) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, "") + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv226[yyj226] = "" + yyv1[yyj1] = "" } else { - yyv226[yyj226] = string(r.DecodeString()) + yyv4 := &yyv1[yyj1] + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } } } } else { - yyj226 := 0 - for ; !r.CheckBreak(); yyj226++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj226 >= len(yyv226) { - yyv226 = append(yyv226, "") // var yyz226 string - yyc226 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, "") // var yyz1 string + yyc1 = true } - yyh226.ElemContainerState(yyj226) - if yyj226 < len(yyv226) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv226[yyj226] = "" + yyv1[yyj1] = "" } else { - yyv226[yyj226] = string(r.DecodeString()) + yyv6 := &yyv1[yyj1] + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } } else { @@ -2887,16 +3218,16 @@ func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) { } } - if yyj226 < len(yyv226) { - yyv226 = yyv226[:yyj226] - yyc226 = true - } else if yyj226 == 0 && yyv226 == nil { - yyv226 = []string{} - yyc226 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []string{} + yyc1 = true } } - yyh226.End() - if yyc226 { - *v = yyv226 + yyh1.End() + if yyc1 { + *v = yyv1 } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.go similarity index 91% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/types.go rename to vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.go index 43e931d4b..8a1727423 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/types.go +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.go @@ -19,8 +19,7 @@ package v1beta1 import ( "fmt" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // +genclient=true @@ -29,13 +28,15 @@ import ( // SubjectAccessReview checks whether or not a user or group can perform an action. type SubjectAccessReview struct { - unversioned.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec holds information about the request being evaluated Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` // Status is filled in by the server and indicates whether the request is allowed or not + // +optional Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -47,13 +48,15 @@ type SubjectAccessReview struct { // spec.namespace means "in all namespaces". Self is a special case, because users should always be able // to check whether they can perform an action type SelfSubjectAccessReview struct { - unversioned.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec holds information about the request being evaluated. user and groups must be empty Spec SelfSubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` // Status is filled in by the server and indicates whether the request is allowed or not + // +optional Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -64,14 +67,16 @@ type SelfSubjectAccessReview struct { // Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions // checking. type LocalSubjectAccessReview struct { - unversioned.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace // you made the request against. If empty, it is defaulted. Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` // Status is filled in by the server and indicates whether the request is allowed or not + // +optional Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -81,26 +86,35 @@ type ResourceAttributes struct { // "" (empty) is defaulted for LocalSubjectAccessReviews // "" (empty) is empty for cluster-scoped resources // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview + // +optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"` // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. + // +optional Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"` // Group is the API Group of the Resource. "*" means all. + // +optional Group string `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"` // Version is the API Version of the Resource. "*" means all. + // +optional Version string `json:"version,omitempty" protobuf:"bytes,4,opt,name=version"` // Resource is one of the existing resource types. "*" means all. + // +optional Resource string `json:"resource,omitempty" protobuf:"bytes,5,opt,name=resource"` // Subresource is one of the existing resource types. "" means none. + // +optional Subresource string `json:"subresource,omitempty" protobuf:"bytes,6,opt,name=subresource"` // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. + // +optional Name string `json:"name,omitempty" protobuf:"bytes,7,opt,name=name"` } // NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface type NonResourceAttributes struct { // Path is the URL path of the request + // +optional Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` // Verb is the standard HTTP verb + // +optional Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"` } @@ -108,17 +122,22 @@ type NonResourceAttributes struct { // and NonResourceAuthorizationAttributes must be set type SubjectAccessReviewSpec struct { // ResourceAuthorizationAttributes describes information for a resource access request + // +optional ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"` // NonResourceAttributes describes information for a non-resource access request + // +optional NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"` // User is the user you're testing for. // If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups + // +optional User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=verb"` // Groups is the groups you're testing for. + // +optional Groups []string `json:"group,omitempty" protobuf:"bytes,4,rep,name=group"` // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer // it needs a reflection here. + // +optional Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,5,rep,name=extra"` } @@ -135,8 +154,10 @@ func (t ExtraValue) String() string { // and NonResourceAuthorizationAttributes must be set type SelfSubjectAccessReviewSpec struct { // ResourceAuthorizationAttributes describes information for a resource access request + // +optional ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"` // NonResourceAttributes describes information for a non-resource access request + // +optional NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"` } @@ -145,9 +166,11 @@ type SubjectAccessReviewStatus struct { // Allowed is required. True if the action would be allowed, false otherwise. Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"` // Reason is optional. It indicates why a request was allowed or denied. + // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"` // EvaluationError is an indication that some error occurred during the authorization check. // It is entirely possible to get an error and be able to continue determine authorization status in spite of it. // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. + // +optional EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,3,opt,name=evaluationError"` } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go rename to vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.conversion.go similarity index 70% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/zz_generated.conversion.go rename to vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.conversion.go index b7da21988..7702201d5 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ limitations under the License. package v1beta1 import ( - api "k8s.io/client-go/1.5/pkg/api" - authorization "k8s.io/client-go/1.5/pkg/apis/authorization" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + authorization "k8s.io/client-go/pkg/apis/authorization" + unsafe "unsafe" ) func init() { @@ -55,13 +55,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -76,13 +70,7 @@ func Convert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAcces } func autoConvert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview(in *authorization.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -147,13 +135,7 @@ func Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(in * } func autoConvert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -168,13 +150,7 @@ func Convert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessR } func autoConvert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview(in *authorization.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -189,24 +165,8 @@ func Convert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessR } func autoConvert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in *SelfSubjectAccessReviewSpec, out *authorization.SelfSubjectAccessReviewSpec, s conversion.Scope) error { - if in.ResourceAttributes != nil { - in, out := &in.ResourceAttributes, &out.ResourceAttributes - *out = new(authorization.ResourceAttributes) - if err := Convert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes(*in, *out, s); err != nil { - return err - } - } else { - out.ResourceAttributes = nil - } - if in.NonResourceAttributes != nil { - in, out := &in.NonResourceAttributes, &out.NonResourceAttributes - *out = new(authorization.NonResourceAttributes) - if err := Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes(*in, *out, s); err != nil { - return err - } - } else { - out.NonResourceAttributes = nil - } + out.ResourceAttributes = (*authorization.ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes)) + out.NonResourceAttributes = (*authorization.NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes)) return nil } @@ -215,24 +175,8 @@ func Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAcc } func autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(in *authorization.SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, s conversion.Scope) error { - if in.ResourceAttributes != nil { - in, out := &in.ResourceAttributes, &out.ResourceAttributes - *out = new(ResourceAttributes) - if err := Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(*in, *out, s); err != nil { - return err - } - } else { - out.ResourceAttributes = nil - } - if in.NonResourceAttributes != nil { - in, out := &in.NonResourceAttributes, &out.NonResourceAttributes - *out = new(NonResourceAttributes) - if err := Convert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes(*in, *out, s); err != nil { - return err - } - } else { - out.NonResourceAttributes = nil - } + out.ResourceAttributes = (*ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes)) + out.NonResourceAttributes = (*NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes)) return nil } @@ -241,13 +185,7 @@ func Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAcc } func autoConvert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -262,13 +200,7 @@ func Convert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in } func autoConvert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview(in *authorization.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -283,40 +215,11 @@ func Convert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview(in } func autoConvert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in *SubjectAccessReviewSpec, out *authorization.SubjectAccessReviewSpec, s conversion.Scope) error { - if in.ResourceAttributes != nil { - in, out := &in.ResourceAttributes, &out.ResourceAttributes - *out = new(authorization.ResourceAttributes) - if err := Convert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes(*in, *out, s); err != nil { - return err - } - } else { - out.ResourceAttributes = nil - } - if in.NonResourceAttributes != nil { - in, out := &in.NonResourceAttributes, &out.NonResourceAttributes - *out = new(authorization.NonResourceAttributes) - if err := Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes(*in, *out, s); err != nil { - return err - } - } else { - out.NonResourceAttributes = nil - } + out.ResourceAttributes = (*authorization.ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes)) + out.NonResourceAttributes = (*authorization.NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes)) out.User = in.User - out.Groups = in.Groups - if in.Extra != nil { - in, out := &in.Extra, &out.Extra - *out = make(map[string]authorization.ExtraValue, len(*in)) - for key, val := range *in { - newVal := new(authorization.ExtraValue) - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&val, newVal, 0); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Extra = nil - } + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.Extra = *(*map[string]authorization.ExtraValue)(unsafe.Pointer(&in.Extra)) return nil } @@ -325,40 +228,11 @@ func Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessRevie } func autoConvert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(in *authorization.SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, s conversion.Scope) error { - if in.ResourceAttributes != nil { - in, out := &in.ResourceAttributes, &out.ResourceAttributes - *out = new(ResourceAttributes) - if err := Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(*in, *out, s); err != nil { - return err - } - } else { - out.ResourceAttributes = nil - } - if in.NonResourceAttributes != nil { - in, out := &in.NonResourceAttributes, &out.NonResourceAttributes - *out = new(NonResourceAttributes) - if err := Convert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes(*in, *out, s); err != nil { - return err - } - } else { - out.NonResourceAttributes = nil - } + out.ResourceAttributes = (*ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes)) + out.NonResourceAttributes = (*NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes)) out.User = in.User - out.Groups = in.Groups - if in.Extra != nil { - in, out := &in.Extra, &out.Extra - *out = make(map[string]ExtraValue, len(*in)) - for key, val := range *in { - newVal := new(ExtraValue) - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&val, newVal, 0); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Extra = nil - } + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra)) return nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go similarity index 81% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go index 62f1fef48..2bbd414ad 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,9 +21,9 @@ limitations under the License. package v1beta1 import ( - v1 "k8s.io/client-go/1.5/pkg/api/v1" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" reflect "reflect" ) @@ -50,14 +50,15 @@ func DeepCopy_v1beta1_LocalSubjectAccessReview(in interface{}, out interface{}, { in := in.(*LocalSubjectAccessReview) out := out.(*LocalSubjectAccessReview) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status return nil } } @@ -66,8 +67,7 @@ func DeepCopy_v1beta1_NonResourceAttributes(in interface{}, out interface{}, c * { in := in.(*NonResourceAttributes) out := out.(*NonResourceAttributes) - out.Path = in.Path - out.Verb = in.Verb + *out = *in return nil } } @@ -76,13 +76,7 @@ func DeepCopy_v1beta1_ResourceAttributes(in interface{}, out interface{}, c *con { in := in.(*ResourceAttributes) out := out.(*ResourceAttributes) - out.Namespace = in.Namespace - out.Verb = in.Verb - out.Group = in.Group - out.Version = in.Version - out.Resource = in.Resource - out.Subresource = in.Subresource - out.Name = in.Name + *out = *in return nil } } @@ -91,14 +85,15 @@ func DeepCopy_v1beta1_SelfSubjectAccessReview(in interface{}, out interface{}, c { in := in.(*SelfSubjectAccessReview) out := out.(*SelfSubjectAccessReview) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status return nil } } @@ -107,19 +102,16 @@ func DeepCopy_v1beta1_SelfSubjectAccessReviewSpec(in interface{}, out interface{ { in := in.(*SelfSubjectAccessReviewSpec) out := out.(*SelfSubjectAccessReviewSpec) + *out = *in if in.ResourceAttributes != nil { in, out := &in.ResourceAttributes, &out.ResourceAttributes *out = new(ResourceAttributes) **out = **in - } else { - out.ResourceAttributes = nil } if in.NonResourceAttributes != nil { in, out := &in.NonResourceAttributes, &out.NonResourceAttributes *out = new(NonResourceAttributes) **out = **in - } else { - out.NonResourceAttributes = nil } return nil } @@ -129,14 +121,15 @@ func DeepCopy_v1beta1_SubjectAccessReview(in interface{}, out interface{}, c *co { in := in.(*SubjectAccessReview) out := out.(*SubjectAccessReview) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status return nil } } @@ -145,27 +138,21 @@ func DeepCopy_v1beta1_SubjectAccessReviewSpec(in interface{}, out interface{}, c { in := in.(*SubjectAccessReviewSpec) out := out.(*SubjectAccessReviewSpec) + *out = *in if in.ResourceAttributes != nil { in, out := &in.ResourceAttributes, &out.ResourceAttributes *out = new(ResourceAttributes) **out = **in - } else { - out.ResourceAttributes = nil } if in.NonResourceAttributes != nil { in, out := &in.NonResourceAttributes, &out.NonResourceAttributes *out = new(NonResourceAttributes) **out = **in - } else { - out.NonResourceAttributes = nil } - out.User = in.User if in.Groups != nil { in, out := &in.Groups, &out.Groups *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Groups = nil } if in.Extra != nil { in, out := &in.Extra, &out.Extra @@ -177,8 +164,6 @@ func DeepCopy_v1beta1_SubjectAccessReviewSpec(in interface{}, out interface{}, c (*out)[key] = *newVal.(*ExtraValue) } } - } else { - out.Extra = nil } return nil } @@ -188,9 +173,7 @@ func DeepCopy_v1beta1_SubjectAccessReviewStatus(in interface{}, out interface{}, { in := in.(*SubjectAccessReviewStatus) out := out.(*SubjectAccessReviewStatus) - out.Allowed = in.Allowed - out.Reason = in.Reason - out.EvaluationError = in.EvaluationError + *out = *in return nil } } diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.defaults.go new file mode 100644 index 000000000..e24e70be3 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/authorization/zz_generated.deepcopy.go similarity index 81% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/apis/authorization/zz_generated.deepcopy.go index 48da2b495..19ccebdaa 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/apis/authorization/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,9 +21,9 @@ limitations under the License. package authorization import ( - api "k8s.io/client-go/1.5/pkg/api" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" reflect "reflect" ) @@ -50,14 +50,15 @@ func DeepCopy_authorization_LocalSubjectAccessReview(in interface{}, out interfa { in := in.(*LocalSubjectAccessReview) out := out.(*LocalSubjectAccessReview) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status return nil } } @@ -66,8 +67,7 @@ func DeepCopy_authorization_NonResourceAttributes(in interface{}, out interface{ { in := in.(*NonResourceAttributes) out := out.(*NonResourceAttributes) - out.Path = in.Path - out.Verb = in.Verb + *out = *in return nil } } @@ -76,13 +76,7 @@ func DeepCopy_authorization_ResourceAttributes(in interface{}, out interface{}, { in := in.(*ResourceAttributes) out := out.(*ResourceAttributes) - out.Namespace = in.Namespace - out.Verb = in.Verb - out.Group = in.Group - out.Version = in.Version - out.Resource = in.Resource - out.Subresource = in.Subresource - out.Name = in.Name + *out = *in return nil } } @@ -91,14 +85,15 @@ func DeepCopy_authorization_SelfSubjectAccessReview(in interface{}, out interfac { in := in.(*SelfSubjectAccessReview) out := out.(*SelfSubjectAccessReview) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status return nil } } @@ -107,19 +102,16 @@ func DeepCopy_authorization_SelfSubjectAccessReviewSpec(in interface{}, out inte { in := in.(*SelfSubjectAccessReviewSpec) out := out.(*SelfSubjectAccessReviewSpec) + *out = *in if in.ResourceAttributes != nil { in, out := &in.ResourceAttributes, &out.ResourceAttributes *out = new(ResourceAttributes) **out = **in - } else { - out.ResourceAttributes = nil } if in.NonResourceAttributes != nil { in, out := &in.NonResourceAttributes, &out.NonResourceAttributes *out = new(NonResourceAttributes) **out = **in - } else { - out.NonResourceAttributes = nil } return nil } @@ -129,14 +121,15 @@ func DeepCopy_authorization_SubjectAccessReview(in interface{}, out interface{}, { in := in.(*SubjectAccessReview) out := out.(*SubjectAccessReview) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status return nil } } @@ -145,27 +138,21 @@ func DeepCopy_authorization_SubjectAccessReviewSpec(in interface{}, out interfac { in := in.(*SubjectAccessReviewSpec) out := out.(*SubjectAccessReviewSpec) + *out = *in if in.ResourceAttributes != nil { in, out := &in.ResourceAttributes, &out.ResourceAttributes *out = new(ResourceAttributes) **out = **in - } else { - out.ResourceAttributes = nil } if in.NonResourceAttributes != nil { in, out := &in.NonResourceAttributes, &out.NonResourceAttributes *out = new(NonResourceAttributes) **out = **in - } else { - out.NonResourceAttributes = nil } - out.User = in.User if in.Groups != nil { in, out := &in.Groups, &out.Groups *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Groups = nil } if in.Extra != nil { in, out := &in.Extra, &out.Extra @@ -177,8 +164,6 @@ func DeepCopy_authorization_SubjectAccessReviewSpec(in interface{}, out interfac (*out)[key] = *newVal.(*ExtraValue) } } - } else { - out.Extra = nil } return nil } @@ -188,9 +173,7 @@ func DeepCopy_authorization_SubjectAccessReviewStatus(in interface{}, out interf { in := in.(*SubjectAccessReviewStatus) out := out.(*SubjectAccessReviewStatus) - out.Allowed = in.Allowed - out.Reason = in.Reason - out.EvaluationError = in.EvaluationError + *out = *in return nil } } diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/OWNERS b/vendor/k8s.io/client-go/pkg/apis/autoscaling/OWNERS new file mode 100755 index 000000000..9fbc54e93 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/OWNERS @@ -0,0 +1,20 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- caesarxuchao +- erictune +- sttts +- ncdc +- timothysc +- piosz +- dims +- errordeveloper +- madhusudancs +- krousey +- mml +- mbohlool +- david-mcmahon +- jianhuiz diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/annotations.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/annotations.go new file mode 100644 index 000000000..4c377561b --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/annotations.go @@ -0,0 +1,30 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package autoscaling + +// MetricSpecsAnnotation is the annotation which holds non-CPU-utilization HPA metric +// specs when converting the `Metrics` field from autoscaling/v2alpha1 +const MetricSpecsAnnotation = "autoscaling.alpha.kubernetes.io/metrics" + +// MetricStatusesAnnotation is the annotation which holds non-CPU-utilization HPA metric +// statuses when converting the `CurrentMetrics` field from autoscaling/v2alpha1 +const MetricStatusesAnnotation = "autoscaling.alpha.kubernetes.io/current-metrics" + +// DefaultCPUUtilization is the default value for CPU utilization, provided no other +// metrics are present. This is here because it's used by both the v2alpha1 defaulting +// logic, and the pseudo-defaulting done in v1 conversion. +const DefaultCPUUtilization = 80 diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/doc.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/doc.go new file mode 100644 index 000000000..83ac82767 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package autoscaling diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/install/install.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/install/install.go similarity index 54% rename from vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/install/install.go rename to vendor/k8s.io/client-go/pkg/apis/autoscaling/install/install.go index bf0f08f41..0ecc0af9b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/install/install.go +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/install/install.go @@ -19,23 +19,33 @@ limitations under the License. package install import ( - "k8s.io/client-go/1.5/pkg/apimachinery/announced" - "k8s.io/client-go/1.5/pkg/apis/autoscaling" - "k8s.io/client-go/1.5/pkg/apis/autoscaling/v1" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/apis/autoscaling" + "k8s.io/client-go/pkg/apis/autoscaling/v1" + "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: autoscaling.GroupName, - VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version}, - ImportPrefix: "k8s.io/client-go/1.5/pkg/apis/autoscaling", + VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version, v2alpha1.SchemeGroupVersion.Version}, + ImportPrefix: "k8s.io/client-go/pkg/apis/autoscaling", AddInternalObjectsToScheme: autoscaling.AddToScheme, }, announced.VersionToSchemeFunc{ - v1.SchemeGroupVersion.Version: v1.AddToScheme, + v1.SchemeGroupVersion.Version: v1.AddToScheme, + v2alpha1.SchemeGroupVersion.Version: v2alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/register.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/register.go similarity index 80% rename from vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/register.go rename to vendor/k8s.io/client-go/pkg/apis/autoscaling/register.go index 9f2e3ccca..2bcea84b9 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/register.go @@ -17,24 +17,23 @@ limitations under the License. package autoscaling import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "autoscaling" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} // Kind takes an unqualified kind and returns a Group qualified GroupKind -func Kind(kind string) unversioned.GroupKind { +func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) unversioned.GroupResource { +func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } @@ -49,7 +48,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &Scale{}, &HorizontalPodAutoscaler{}, &HorizontalPodAutoscalerList{}, - &api.ListOptions{}, ) return nil } diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/types.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/types.go new file mode 100644 index 000000000..39f206b1f --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/types.go @@ -0,0 +1,305 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package autoscaling + +import ( + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/pkg/api" +) + +// Scale represents a scaling request for a resource. +type Scale struct { + metav1.TypeMeta + // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. + // +optional + metav1.ObjectMeta + + // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + // +optional + Spec ScaleSpec + + // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only. + // +optional + Status ScaleStatus +} + +// ScaleSpec describes the attributes of a scale subresource. +type ScaleSpec struct { + // desired number of instances for the scaled object. + // +optional + Replicas int32 +} + +// ScaleStatus represents the current status of a scale subresource. +type ScaleStatus struct { + // actual number of observed instances of the scaled object. + Replicas int32 + + // label query over pods that should match the replicas count. This is same + // as the label selector but in the string format to avoid introspection + // by clients. The string will be in the same format as the query-param syntax. + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + Selector string +} + +// CrossVersionObjectReference contains enough information to let you identify the referred resource. +type CrossVersionObjectReference struct { + // Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + Kind string + // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names + Name string + // API version of the referent + // +optional + APIVersion string +} + +// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. +type HorizontalPodAutoscalerSpec struct { + // ScaleTargetRef points to the target resource to scale, and is used to the pods for which metrics + // should be collected, as well as to actually change the replica count. + ScaleTargetRef CrossVersionObjectReference + // MinReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. + // It defaults to 1 pod. + // +optional + MinReplicas *int32 + // MaxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. + // It cannot be less that minReplicas. + MaxReplicas int32 + // Metrics contains the specifications for which to use to calculate the + // desired replica count (the maximum replica count across all metrics will + // be used). The desired replica count is calculated multiplying the + // ratio between the target value and the current value by the current + // number of pods. Ergo, metrics used must decrease as the pod count is + // increased, and vice-versa. See the individual metric source types for + // more information about how each type of metric must respond. + // +optional + Metrics []MetricSpec +} + +// MetricSourceType indicates the type of metric. +type MetricSourceType string + +var ( + // ObjectMetricSourceType is a metric describing a kubernetes object + // (for example, hits-per-second on an Ingress object). + ObjectMetricSourceType MetricSourceType = "Object" + // PodsMetricSourceType is a metric describing each pod in the current scale + // target (for example, transactions-processed-per-second). The values + // will be averaged together before being compared to the target value. + PodsMetricSourceType MetricSourceType = "Pods" + // ResourceMetricSourceType is a resource metric known to Kubernetes, as + // specified in requests and limits, describing each pod in the current + // scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics (the "pods" source). + ResourceMetricSourceType MetricSourceType = "Resource" +) + +// MetricSpec specifies how to scale based on a single metric +// (only `type` and one other matching field should be set at once). +type MetricSpec struct { + // Type is the type of metric source. It should match one of the fields below. + Type MetricSourceType + + // Object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + // +optional + Object *ObjectMetricSource + // Pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + // +optional + Pods *PodsMetricSource + // Resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + // +optional + Resource *ResourceMetricSource +} + +// ObjectMetricSource indicates how to scale on a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). +type ObjectMetricSource struct { + // Target is the described Kubernetes object. + Target CrossVersionObjectReference + + // MetricName is the name of the metric in question. + MetricName string + // TargetValue is the target value of the metric (as a quantity). + TargetValue resource.Quantity +} + +// PodsMetricSource indicates how to scale on a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). +// The values will be averaged together before being compared to the target +// value. +type PodsMetricSource struct { + // MetricName is the name of the metric in question + MetricName string + // TargetAverageValue is the target value of the average of the + // metric across all relevant pods (as a quantity) + TargetAverageValue resource.Quantity +} + +// ResourceMetricSource indicates how to scale on a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). The values will be averaged +// together before being compared to the target. Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. Only one "target" type +// should be set. +type ResourceMetricSource struct { + // Name is the name of the resource in question. + Name api.ResourceName + // TargetAverageUtilization is the target value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. + // +optional + TargetAverageUtilization *int32 + // TargetAverageValue is the the target value of the average of the + // resource metric across all relevant pods, as a raw value (instead of as + // a percentage of the request), similar to the "pods" metric source type. + // +optional + TargetAverageValue *resource.Quantity +} + +// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. +type HorizontalPodAutoscalerStatus struct { + // ObservedGeneration is the most recent generation observed by this autoscaler. + // +optional + ObservedGeneration *int64 + + // LastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, + // used by the autoscaler to control how often the number of pods is changed. + // +optional + LastScaleTime *metav1.Time + + // CurrentReplicas is current number of replicas of pods managed by this autoscaler, + // as last seen by the autoscaler. + CurrentReplicas int32 + + // DesiredReplicas is the desired number of replicas of pods managed by this autoscaler, + // as last calculated by the autoscaler. + DesiredReplicas int32 + + // CurrentMetrics is the last read state of the metrics used by this autoscaler. + CurrentMetrics []MetricStatus +} + +// MetricStatus describes the last-read state of a single metric. +type MetricStatus struct { + // Type is the type of metric source. It will match one of the fields below. + Type MetricSourceType + + // Object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + // +optional + Object *ObjectMetricStatus + // Pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + // +optional + Pods *PodsMetricStatus + // Resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + // +optional + Resource *ResourceMetricStatus +} + +// ObjectMetricStatus indicates the current value of a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). +type ObjectMetricStatus struct { + // Target is the described Kubernetes object. + Target CrossVersionObjectReference + + // MetricName is the name of the metric in question. + MetricName string + // CurrentValue is the current value of the metric (as a quantity). + CurrentValue resource.Quantity +} + +// PodsMetricStatus indicates the current value of a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). +type PodsMetricStatus struct { + // MetricName is the name of the metric in question + MetricName string + // CurrentAverageValue is the current value of the average of the + // metric across all relevant pods (as a quantity) + CurrentAverageValue resource.Quantity +} + +// ResourceMetricStatus indicates the current value of a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. +type ResourceMetricStatus struct { + // Name is the name of the resource in question. + Name api.ResourceName + // CurrentAverageUtilization is the current value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. It will only be + // present if `targetAverageValue` was set in the corresponding metric + // specification. + // +optional + CurrentAverageUtilization *int32 + // CurrentAverageValue is the the current value of the average of the + // resource metric across all relevant pods, as a raw value (instead of as + // a percentage of the request), similar to the "pods" metric source type. + // It will always be set, regardless of the corresponding metric specification. + CurrentAverageValue resource.Quantity +} + +// +genclient=true + +// HorizontalPodAutoscaler is the configuration for a horizontal pod +// autoscaler, which automatically manages the replica count of any resource +// implementing the scale subresource based on the metrics specified. +type HorizontalPodAutoscaler struct { + metav1.TypeMeta + // Metadata is the standard object metadata. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta + + // Spec is the specification for the behaviour of the autoscaler. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + // +optional + Spec HorizontalPodAutoscalerSpec + + // Status is the current information about the autoscaler. + // +optional + Status HorizontalPodAutoscalerStatus +} + +// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. +type HorizontalPodAutoscalerList struct { + metav1.TypeMeta + // Metadata is the standard list metadata. + // +optional + metav1.ListMeta + + // Items is the list of horizontal pod autoscaler objects. + Items []HorizontalPodAutoscaler +} diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/conversion.go new file mode 100644 index 000000000..6b8306922 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/conversion.go @@ -0,0 +1,244 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "encoding/json" + + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/apis/autoscaling" +) + +func addConversionFuncs(scheme *runtime.Scheme) error { + // Add non-generated conversion functions + err := scheme.AddConversionFuncs( + Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler, + Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler, + Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec, + Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec, + Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus, + Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus, + ) + if err != nil { + return err + } + + return nil +} + +func Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error { + if err := autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in, out, s); err != nil { + return err + } + + otherMetrics := make([]MetricSpec, 0, len(in.Spec.Metrics)) + for _, metric := range in.Spec.Metrics { + if metric.Type == autoscaling.ResourceMetricSourceType && metric.Resource != nil && metric.Resource.Name == api.ResourceCPU && metric.Resource.TargetAverageUtilization != nil { + continue + } + + convMetric := MetricSpec{} + if err := Convert_autoscaling_MetricSpec_To_v1_MetricSpec(&metric, &convMetric, s); err != nil { + return err + } + otherMetrics = append(otherMetrics, convMetric) + } + + // NB: we need to save the status even if it maps to a CPU utilization status in order to save the raw value as well + currentMetrics := make([]MetricStatus, len(in.Status.CurrentMetrics)) + for i, currentMetric := range in.Status.CurrentMetrics { + if err := Convert_autoscaling_MetricStatus_To_v1_MetricStatus(¤tMetric, ¤tMetrics[i], s); err != nil { + return err + } + } + + if len(otherMetrics) > 0 || len(in.Status.CurrentMetrics) > 0 { + old := out.Annotations + out.Annotations = make(map[string]string, len(old)+2) + if old != nil { + for k, v := range old { + out.Annotations[k] = v + } + } + } + + if len(otherMetrics) > 0 { + otherMetricsEnc, err := json.Marshal(otherMetrics) + if err != nil { + return err + } + out.Annotations[autoscaling.MetricSpecsAnnotation] = string(otherMetricsEnc) + } + + if len(in.Status.CurrentMetrics) > 0 { + currentMetricsEnc, err := json.Marshal(currentMetrics) + if err != nil { + return err + } + out.Annotations[autoscaling.MetricStatusesAnnotation] = string(currentMetricsEnc) + } + + return nil +} + +func Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { + if err := autoConvert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in, out, s); err != nil { + return err + } + + if otherMetricsEnc, hasOtherMetrics := out.Annotations[autoscaling.MetricSpecsAnnotation]; hasOtherMetrics { + var otherMetrics []MetricSpec + if err := json.Unmarshal([]byte(otherMetricsEnc), &otherMetrics); err != nil { + return err + } + + // the normal Spec conversion could have populated out.Spec.Metrics with a single element, so deal with that + outMetrics := make([]autoscaling.MetricSpec, len(otherMetrics)+len(out.Spec.Metrics)) + for i, metric := range otherMetrics { + if err := Convert_v1_MetricSpec_To_autoscaling_MetricSpec(&metric, &outMetrics[i], s); err != nil { + return err + } + } + if out.Spec.Metrics != nil { + outMetrics[len(otherMetrics)] = out.Spec.Metrics[0] + } + out.Spec.Metrics = outMetrics + delete(out.Annotations, autoscaling.MetricSpecsAnnotation) + } + + if currentMetricsEnc, hasCurrentMetrics := out.Annotations[autoscaling.MetricStatusesAnnotation]; hasCurrentMetrics { + // ignore any existing status values -- the ones here have more information + var currentMetrics []MetricStatus + if err := json.Unmarshal([]byte(currentMetricsEnc), ¤tMetrics); err != nil { + return err + } + + out.Status.CurrentMetrics = make([]autoscaling.MetricStatus, len(currentMetrics)) + for i, currentMetric := range currentMetrics { + if err := Convert_v1_MetricStatus_To_autoscaling_MetricStatus(¤tMetric, &out.Status.CurrentMetrics[i], s); err != nil { + return err + } + } + delete(out.Annotations, autoscaling.MetricStatusesAnnotation) + } + + // autoscaling/v1 formerly had an implicit default applied in the controller. In v2alpha1, we apply it explicitly. + // We apply it here, explicitly, since we have access to the full set of metrics from the annotation. + if len(out.Spec.Metrics) == 0 { + // no other metrics, no explicit CPU value set + out.Spec.Metrics = []autoscaling.MetricSpec{ + { + Type: autoscaling.ResourceMetricSourceType, + Resource: &autoscaling.ResourceMetricSource{ + Name: api.ResourceCPU, + }, + }, + } + out.Spec.Metrics[0].Resource.TargetAverageUtilization = new(int32) + *out.Spec.Metrics[0].Resource.TargetAverageUtilization = autoscaling.DefaultCPUUtilization + } + + return nil +} + +func Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error { + if err := Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil { + return err + } + + out.MinReplicas = in.MinReplicas + out.MaxReplicas = in.MaxReplicas + + for _, metric := range in.Metrics { + if metric.Type == autoscaling.ResourceMetricSourceType && metric.Resource != nil && metric.Resource.Name == api.ResourceCPU { + if metric.Resource.TargetAverageUtilization != nil { + out.TargetCPUUtilizationPercentage = new(int32) + *out.TargetCPUUtilizationPercentage = *metric.Resource.TargetAverageUtilization + } + break + } + } + + return nil +} + +func Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error { + if err := Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil { + return err + } + + out.MinReplicas = in.MinReplicas + out.MaxReplicas = in.MaxReplicas + + if in.TargetCPUUtilizationPercentage != nil { + out.Metrics = []autoscaling.MetricSpec{ + { + Type: autoscaling.ResourceMetricSourceType, + Resource: &autoscaling.ResourceMetricSource{ + Name: api.ResourceCPU, + }, + }, + } + out.Metrics[0].Resource.TargetAverageUtilization = new(int32) + *out.Metrics[0].Resource.TargetAverageUtilization = *in.TargetCPUUtilizationPercentage + } + + return nil +} + +func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error { + out.ObservedGeneration = in.ObservedGeneration + out.LastScaleTime = in.LastScaleTime + + out.CurrentReplicas = in.CurrentReplicas + out.DesiredReplicas = in.DesiredReplicas + + for _, metric := range in.CurrentMetrics { + if metric.Type == autoscaling.ResourceMetricSourceType && metric.Resource != nil && metric.Resource.Name == api.ResourceCPU { + if metric.Resource.CurrentAverageUtilization != nil { + + out.CurrentCPUUtilizationPercentage = new(int32) + *out.CurrentCPUUtilizationPercentage = *metric.Resource.CurrentAverageUtilization + } + } + } + return nil +} + +func Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error { + out.ObservedGeneration = in.ObservedGeneration + out.LastScaleTime = in.LastScaleTime + + out.CurrentReplicas = in.CurrentReplicas + out.DesiredReplicas = in.DesiredReplicas + + if in.CurrentCPUUtilizationPercentage != nil { + out.CurrentMetrics = []autoscaling.MetricStatus{ + { + Type: autoscaling.ResourceMetricSourceType, + Resource: &autoscaling.ResourceMetricStatus{ + Name: api.ResourceCPU, + }, + }, + } + out.CurrentMetrics[0].Resource.CurrentAverageUtilization = new(int32) + *out.CurrentMetrics[0].Resource.CurrentAverageUtilization = *in.CurrentCPUUtilizationPercentage + } + return nil +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/defaults.go similarity index 81% rename from vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/defaults.go rename to vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/defaults.go index 38ee1b1de..d423ad125 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/defaults.go +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/defaults.go @@ -17,10 +17,11 @@ limitations under the License. package v1 import ( - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { + RegisterDefaults(scheme) return scheme.AddDefaultingFuncs( SetDefaults_HorizontalPodAutoscaler, ) @@ -31,4 +32,7 @@ func SetDefaults_HorizontalPodAutoscaler(obj *HorizontalPodAutoscaler) { minReplicas := int32(1) obj.Spec.MinReplicas = &minReplicas } + + // NB: we apply a default for CPU utilization in conversion because + // we need access to the annotations to properly apply the default. } diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/generated_expansion.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/doc.go similarity index 94% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/generated_expansion.go rename to vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/doc.go index b24faa315..c7be42d5a 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/batch/v1/generated_expansion.go +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/doc.go @@ -15,5 +15,3 @@ limitations under the License. */ package v1 - -type JobExpansion interface{} diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.pb.go new file mode 100644 index 000000000..96b8335f8 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.pb.go @@ -0,0 +1,3498 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. +// source: k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto +// DO NOT EDIT! + +/* + Package v1 is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto + + It has these top-level messages: + CrossVersionObjectReference + HorizontalPodAutoscaler + HorizontalPodAutoscalerList + HorizontalPodAutoscalerSpec + HorizontalPodAutoscalerStatus + MetricSpec + MetricStatus + ObjectMetricSource + ObjectMetricStatus + PodsMetricSource + PodsMetricStatus + ResourceMetricSource + ResourceMetricStatus + Scale + ScaleSpec + ScaleStatus +*/ +package v1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource" +import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1" + +import strings "strings" +import reflect "reflect" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +const _ = proto.GoGoProtoPackageIsVersion1 + +func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } +func (*CrossVersionObjectReference) ProtoMessage() {} +func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{0} +} + +func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } +func (*HorizontalPodAutoscaler) ProtoMessage() {} +func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } +func (*HorizontalPodAutoscalerList) ProtoMessage() {} +func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{2} +} + +func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } +func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} +func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{3} +} + +func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } +func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} +func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{4} +} + +func (m *MetricSpec) Reset() { *m = MetricSpec{} } +func (*MetricSpec) ProtoMessage() {} +func (*MetricSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + +func (m *MetricStatus) Reset() { *m = MetricStatus{} } +func (*MetricStatus) ProtoMessage() {} +func (*MetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } + +func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } +func (*ObjectMetricSource) ProtoMessage() {} +func (*ObjectMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } + +func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } +func (*ObjectMetricStatus) ProtoMessage() {} +func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } + +func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } +func (*PodsMetricSource) ProtoMessage() {} +func (*PodsMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } + +func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } +func (*PodsMetricStatus) ProtoMessage() {} +func (*PodsMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } + +func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } +func (*ResourceMetricSource) ProtoMessage() {} +func (*ResourceMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } + +func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } +func (*ResourceMetricStatus) ProtoMessage() {} +func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } + +func (m *Scale) Reset() { *m = Scale{} } +func (*Scale) ProtoMessage() {} +func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } + +func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } +func (*ScaleSpec) ProtoMessage() {} +func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } + +func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } +func (*ScaleStatus) ProtoMessage() {} +func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } + +func init() { + proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.CrossVersionObjectReference") + proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.HorizontalPodAutoscaler") + proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerList") + proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerSpec") + proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerStatus") + proto.RegisterType((*MetricSpec)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.MetricSpec") + proto.RegisterType((*MetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.MetricStatus") + proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.ObjectMetricSource") + proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.ObjectMetricStatus") + proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.PodsMetricSource") + proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.PodsMetricStatus") + proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.ResourceMetricSource") + proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.ResourceMetricStatus") + proto.RegisterType((*Scale)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.Scale") + proto.RegisterType((*ScaleSpec)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.ScaleSpec") + proto.RegisterType((*ScaleStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.ScaleStatus") +} +func (m *CrossVersionObjectReference) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CrossVersionObjectReference) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) + i += copy(data[i:], m.Kind) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.APIVersion))) + i += copy(data[i:], m.APIVersion) + return i, nil +} + +func (m *HorizontalPodAutoscaler) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *HorizontalPodAutoscaler) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n1, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n2, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n3, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + return i, nil +} + +func (m *HorizontalPodAutoscalerList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *HorizontalPodAutoscalerList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n4, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *HorizontalPodAutoscalerSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *HorizontalPodAutoscalerSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ScaleTargetRef.Size())) + n5, err := m.ScaleTargetRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + if m.MinReplicas != nil { + data[i] = 0x10 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.MinReplicas)) + } + data[i] = 0x18 + i++ + i = encodeVarintGenerated(data, i, uint64(m.MaxReplicas)) + if m.TargetCPUUtilizationPercentage != nil { + data[i] = 0x20 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.TargetCPUUtilizationPercentage)) + } + return i, nil +} + +func (m *HorizontalPodAutoscalerStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *HorizontalPodAutoscalerStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ObservedGeneration != nil { + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.ObservedGeneration)) + } + if m.LastScaleTime != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastScaleTime.Size())) + n6, err := m.LastScaleTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + } + data[i] = 0x18 + i++ + i = encodeVarintGenerated(data, i, uint64(m.CurrentReplicas)) + data[i] = 0x20 + i++ + i = encodeVarintGenerated(data, i, uint64(m.DesiredReplicas)) + if m.CurrentCPUUtilizationPercentage != nil { + data[i] = 0x28 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.CurrentCPUUtilizationPercentage)) + } + return i, nil +} + +func (m *MetricSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *MetricSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + if m.Object != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Object.Size())) + n7, err := m.Object.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.Pods != nil { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Pods.Size())) + n8, err := m.Pods.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n8 + } + if m.Resource != nil { + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Resource.Size())) + n9, err := m.Resource.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + } + return i, nil +} + +func (m *MetricStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *MetricStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + if m.Object != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Object.Size())) + n10, err := m.Object.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.Pods != nil { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Pods.Size())) + n11, err := m.Pods.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.Resource != nil { + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Resource.Size())) + n12, err := m.Resource.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n12 + } + return i, nil +} + +func (m *ObjectMetricSource) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ObjectMetricSource) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.Target.Size())) + n13, err := m.Target.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n13 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.MetricName))) + i += copy(data[i:], m.MetricName) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.TargetValue.Size())) + n14, err := m.TargetValue.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n14 + return i, nil +} + +func (m *ObjectMetricStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ObjectMetricStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.Target.Size())) + n15, err := m.Target.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n15 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.MetricName))) + i += copy(data[i:], m.MetricName) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.CurrentValue.Size())) + n16, err := m.CurrentValue.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n16 + return i, nil +} + +func (m *PodsMetricSource) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodsMetricSource) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.MetricName))) + i += copy(data[i:], m.MetricName) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.TargetAverageValue.Size())) + n17, err := m.TargetAverageValue.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n17 + return i, nil +} + +func (m *PodsMetricStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodsMetricStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.MetricName))) + i += copy(data[i:], m.MetricName) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.CurrentAverageValue.Size())) + n18, err := m.CurrentAverageValue.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n18 + return i, nil +} + +func (m *ResourceMetricSource) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ResourceMetricSource) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + if m.TargetAverageUtilization != nil { + data[i] = 0x10 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.TargetAverageUtilization)) + } + if m.TargetAverageValue != nil { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.TargetAverageValue.Size())) + n19, err := m.TargetAverageValue.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n19 + } + return i, nil +} + +func (m *ResourceMetricStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ResourceMetricStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + if m.CurrentAverageUtilization != nil { + data[i] = 0x10 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.CurrentAverageUtilization)) + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.CurrentAverageValue.Size())) + n20, err := m.CurrentAverageValue.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n20 + return i, nil +} + +func (m *Scale) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Scale) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n21, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n21 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n22, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n22 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n23, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n23 + return i, nil +} + +func (m *ScaleSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ScaleSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Replicas)) + return i, nil +} + +func (m *ScaleStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ScaleStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Replicas)) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Selector))) + i += copy(data[i:], m.Selector) + return i, nil +} + +func encodeFixed64Generated(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Generated(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintGenerated(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} +func (m *CrossVersionObjectReference) Size() (n int) { + var l int + _ = l + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.APIVersion) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *HorizontalPodAutoscaler) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *HorizontalPodAutoscalerList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *HorizontalPodAutoscalerSpec) Size() (n int) { + var l int + _ = l + l = m.ScaleTargetRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.MinReplicas != nil { + n += 1 + sovGenerated(uint64(*m.MinReplicas)) + } + n += 1 + sovGenerated(uint64(m.MaxReplicas)) + if m.TargetCPUUtilizationPercentage != nil { + n += 1 + sovGenerated(uint64(*m.TargetCPUUtilizationPercentage)) + } + return n +} + +func (m *HorizontalPodAutoscalerStatus) Size() (n int) { + var l int + _ = l + if m.ObservedGeneration != nil { + n += 1 + sovGenerated(uint64(*m.ObservedGeneration)) + } + if m.LastScaleTime != nil { + l = m.LastScaleTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + n += 1 + sovGenerated(uint64(m.CurrentReplicas)) + n += 1 + sovGenerated(uint64(m.DesiredReplicas)) + if m.CurrentCPUUtilizationPercentage != nil { + n += 1 + sovGenerated(uint64(*m.CurrentCPUUtilizationPercentage)) + } + return n +} + +func (m *MetricSpec) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + if m.Object != nil { + l = m.Object.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Pods != nil { + l = m.Pods.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Resource != nil { + l = m.Resource.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *MetricStatus) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + if m.Object != nil { + l = m.Object.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Pods != nil { + l = m.Pods.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Resource != nil { + l = m.Resource.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ObjectMetricSource) Size() (n int) { + var l int + _ = l + l = m.Target.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.MetricName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.TargetValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ObjectMetricStatus) Size() (n int) { + var l int + _ = l + l = m.Target.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.MetricName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.CurrentValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *PodsMetricSource) Size() (n int) { + var l int + _ = l + l = len(m.MetricName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.TargetAverageValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *PodsMetricStatus) Size() (n int) { + var l int + _ = l + l = len(m.MetricName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.CurrentAverageValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceMetricSource) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if m.TargetAverageUtilization != nil { + n += 1 + sovGenerated(uint64(*m.TargetAverageUtilization)) + } + if m.TargetAverageValue != nil { + l = m.TargetAverageValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ResourceMetricStatus) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if m.CurrentAverageUtilization != nil { + n += 1 + sovGenerated(uint64(*m.CurrentAverageUtilization)) + } + l = m.CurrentAverageValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Scale) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ScaleSpec) Size() (n int) { + var l int + _ = l + n += 1 + sovGenerated(uint64(m.Replicas)) + return n +} + +func (m *ScaleStatus) Size() (n int) { + var l int + _ = l + n += 1 + sovGenerated(uint64(m.Replicas)) + l = len(m.Selector) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *CrossVersionObjectReference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CrossVersionObjectReference{`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, + `}`, + }, "") + return s +} +func (this *HorizontalPodAutoscaler) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HorizontalPodAutoscaler{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *HorizontalPodAutoscalerList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HorizontalPodAutoscalerList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *HorizontalPodAutoscalerSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HorizontalPodAutoscalerSpec{`, + `ScaleTargetRef:` + strings.Replace(strings.Replace(this.ScaleTargetRef.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`, + `MinReplicas:` + valueToStringGenerated(this.MinReplicas) + `,`, + `MaxReplicas:` + fmt.Sprintf("%v", this.MaxReplicas) + `,`, + `TargetCPUUtilizationPercentage:` + valueToStringGenerated(this.TargetCPUUtilizationPercentage) + `,`, + `}`, + }, "") + return s +} +func (this *HorizontalPodAutoscalerStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HorizontalPodAutoscalerStatus{`, + `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`, + `LastScaleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScaleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`, + `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`, + `DesiredReplicas:` + fmt.Sprintf("%v", this.DesiredReplicas) + `,`, + `CurrentCPUUtilizationPercentage:` + valueToStringGenerated(this.CurrentCPUUtilizationPercentage) + `,`, + `}`, + }, "") + return s +} +func (this *MetricSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MetricSpec{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricSource", "ObjectMetricSource", 1) + `,`, + `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricSource", "PodsMetricSource", 1) + `,`, + `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricSource", "ResourceMetricSource", 1) + `,`, + `}`, + }, "") + return s +} +func (this *MetricStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MetricStatus{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricStatus", "ObjectMetricStatus", 1) + `,`, + `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricStatus", "PodsMetricStatus", 1) + `,`, + `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricStatus", "ResourceMetricStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ObjectMetricSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ObjectMetricSource{`, + `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`, + `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`, + `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ObjectMetricStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ObjectMetricStatus{`, + `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`, + `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`, + `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodsMetricSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodsMetricSource{`, + `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`, + `TargetAverageValue:` + strings.Replace(strings.Replace(this.TargetAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodsMetricStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodsMetricStatus{`, + `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`, + `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceMetricSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceMetricSource{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `TargetAverageUtilization:` + valueToStringGenerated(this.TargetAverageUtilization) + `,`, + `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceMetricStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceMetricStatus{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `CurrentAverageUtilization:` + valueToStringGenerated(this.CurrentAverageUtilization) + `,`, + `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Scale) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Scale{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ScaleSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ScaleSpec{`, + `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, + `}`, + }, "") + return s +} +func (this *ScaleStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ScaleStatus{`, + `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, + `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *CrossVersionObjectReference) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CrossVersionObjectReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CrossVersionObjectReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HorizontalPodAutoscaler) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HorizontalPodAutoscalerList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HorizontalPodAutoscalerList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HorizontalPodAutoscalerList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, HorizontalPodAutoscaler{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HorizontalPodAutoscalerSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScaleTargetRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ScaleTargetRef.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinReplicas", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MinReplicas = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxReplicas", wireType) + } + m.MaxReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.MaxReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetCPUUtilizationPercentage", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TargetCPUUtilizationPercentage = &v + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HorizontalPodAutoscalerStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ObservedGeneration = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastScaleTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastScaleTime == nil { + m.LastScaleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} + } + if err := m.LastScaleTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType) + } + m.CurrentReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.CurrentReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DesiredReplicas", wireType) + } + m.DesiredReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.DesiredReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentCPUUtilizationPercentage", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.CurrentCPUUtilizationPercentage = &v + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MetricSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MetricSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MetricSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = MetricSourceType(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Object == nil { + m.Object = &ObjectMetricSource{} + } + if err := m.Object.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pods == nil { + m.Pods = &PodsMetricSource{} + } + if err := m.Pods.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Resource == nil { + m.Resource = &ResourceMetricSource{} + } + if err := m.Resource.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MetricStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MetricStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MetricStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = MetricSourceType(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Object == nil { + m.Object = &ObjectMetricStatus{} + } + if err := m.Object.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pods == nil { + m.Pods = &PodsMetricStatus{} + } + if err := m.Pods.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Resource == nil { + m.Resource = &ResourceMetricStatus{} + } + if err := m.Resource.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ObjectMetricSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ObjectMetricSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ObjectMetricSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Target.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MetricName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TargetValue.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ObjectMetricStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ObjectMetricStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ObjectMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Target.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MetricName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CurrentValue.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodsMetricSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodsMetricSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodsMetricSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MetricName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TargetAverageValue.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodsMetricStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodsMetricStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodsMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MetricName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CurrentAverageValue.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceMetricSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceMetricSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceMetricSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = k8s_io_kubernetes_pkg_api_v1.ResourceName(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageUtilization", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TargetAverageUtilization = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TargetAverageValue == nil { + m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{} + } + if err := m.TargetAverageValue.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceMetricStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceMetricStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = k8s_io_kubernetes_pkg_api_v1.ResourceName(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageUtilization", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.CurrentAverageUtilization = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CurrentAverageValue.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Scale) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Scale: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Scale: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ScaleSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ScaleSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ScaleSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) + } + m.Replicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Replicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ScaleStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ScaleStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ScaleStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) + } + m.Replicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Replicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Selector = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorGenerated = []byte{ + // 1279 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xda, 0x4e, 0x94, 0xce, 0xa6, 0x1f, 0x4c, 0xaa, 0xd4, 0x4d, 0xa8, 0x37, 0x5a, 0x38, + 0xb4, 0xa8, 0xec, 0x12, 0x13, 0x2a, 0x22, 0x84, 0x50, 0x6c, 0x54, 0x5a, 0x51, 0xb7, 0x61, 0xe2, + 0x46, 0x7c, 0x09, 0x31, 0x59, 0x4f, 0x9d, 0x69, 0xbc, 0x1f, 0x9a, 0x1d, 0x5b, 0x4d, 0x24, 0x24, + 0x4e, 0x9c, 0xb9, 0x70, 0x46, 0xf0, 0x4f, 0x70, 0x2e, 0x12, 0x52, 0x8e, 0xbd, 0xc1, 0xc9, 0x22, + 0x0b, 0x37, 0xc4, 0x3f, 0x50, 0x71, 0x40, 0x3b, 0x3b, 0x5e, 0xef, 0xda, 0x5e, 0x27, 0x4e, 0xd3, + 0x22, 0x6e, 0xbb, 0x33, 0xef, 0xfd, 0x7e, 0xef, 0xfd, 0xe6, 0xcd, 0x9b, 0x19, 0xb0, 0xb6, 0xfb, + 0xb6, 0x6f, 0x50, 0xd7, 0xdc, 0x6d, 0x6f, 0x13, 0xe6, 0x10, 0x4e, 0x7c, 0xd3, 0xdb, 0x6d, 0x9a, + 0xd8, 0xa3, 0xbe, 0x89, 0xdb, 0xdc, 0xf5, 0x2d, 0xdc, 0xa2, 0x4e, 0xd3, 0xec, 0xac, 0x98, 0x4d, + 0xe2, 0x10, 0x86, 0x39, 0x69, 0x18, 0x1e, 0x73, 0xb9, 0x0b, 0xaf, 0x45, 0xae, 0x46, 0xdf, 0xd5, + 0xf0, 0x76, 0x9b, 0x46, 0xe8, 0x6a, 0x24, 0x5c, 0x8d, 0xce, 0xca, 0xe2, 0xeb, 0x4d, 0xca, 0x77, + 0xda, 0xdb, 0x86, 0xe5, 0xda, 0x66, 0xd3, 0x6d, 0xba, 0xa6, 0x40, 0xd8, 0x6e, 0x3f, 0x10, 0x7f, + 0xe2, 0x47, 0x7c, 0x45, 0xc8, 0x8b, 0xab, 0x32, 0x28, 0xec, 0x51, 0x1b, 0x5b, 0x3b, 0xd4, 0x21, + 0x6c, 0xaf, 0x17, 0x96, 0xc9, 0x88, 0xef, 0xb6, 0x99, 0x45, 0x06, 0xe3, 0x19, 0xeb, 0xe5, 0x9b, + 0x36, 0xe1, 0x78, 0x44, 0x16, 0x8b, 0x66, 0x96, 0x17, 0x6b, 0x3b, 0x9c, 0xda, 0xc3, 0x34, 0x37, + 0x8e, 0x72, 0xf0, 0xad, 0x1d, 0x62, 0xe3, 0x21, 0xbf, 0x37, 0xb3, 0xfc, 0xda, 0x9c, 0xb6, 0x4c, + 0xea, 0x70, 0x9f, 0xb3, 0x71, 0x39, 0xf9, 0x84, 0x75, 0x08, 0xeb, 0x27, 0x44, 0x1e, 0x61, 0xdb, + 0x6b, 0x91, 0x51, 0x39, 0x5d, 0xcf, 0x5c, 0xd4, 0x11, 0xd6, 0xfa, 0x77, 0x0a, 0x58, 0xaa, 0x32, + 0xd7, 0xf7, 0xb7, 0x08, 0xf3, 0xa9, 0xeb, 0xdc, 0xdb, 0x7e, 0x48, 0x2c, 0x8e, 0xc8, 0x03, 0xc2, + 0x88, 0x63, 0x11, 0xb8, 0x0c, 0x0a, 0xbb, 0xd4, 0x69, 0x14, 0x95, 0x65, 0xe5, 0xea, 0x99, 0xca, + 0xdc, 0x41, 0x57, 0x9b, 0x0a, 0xba, 0x5a, 0xe1, 0x43, 0xea, 0x34, 0x90, 0x98, 0x09, 0x2d, 0x1c, + 0x6c, 0x93, 0x62, 0x2e, 0x6d, 0x71, 0x17, 0xdb, 0x04, 0x89, 0x19, 0x58, 0x06, 0x00, 0x7b, 0x54, + 0x12, 0x14, 0xf3, 0xc2, 0x0e, 0x4a, 0x3b, 0xb0, 0xbe, 0x71, 0x5b, 0xce, 0xa0, 0x84, 0x95, 0xfe, + 0x6b, 0x0e, 0x5c, 0xba, 0xe5, 0x32, 0xba, 0xef, 0x3a, 0x1c, 0xb7, 0x36, 0xdc, 0xc6, 0xba, 0x2c, + 0x2a, 0xc2, 0xe0, 0x97, 0x60, 0x36, 0x5c, 0xd0, 0x06, 0xe6, 0x58, 0xc4, 0xa5, 0x96, 0xdf, 0x30, + 0x64, 0x39, 0x26, 0xf5, 0xed, 0x17, 0x64, 0x68, 0x6d, 0x74, 0x56, 0x8c, 0x28, 0xb9, 0x1a, 0xe1, + 0xb8, 0xcf, 0xdf, 0x1f, 0x43, 0x31, 0x2a, 0xdc, 0x01, 0x05, 0xdf, 0x23, 0x96, 0xc8, 0x49, 0x2d, + 0xdf, 0x34, 0x8e, 0x5d, 0xec, 0x46, 0x46, 0xcc, 0x9b, 0x1e, 0xb1, 0xfa, 0xda, 0x84, 0x7f, 0x48, + 0x30, 0x40, 0x0f, 0xcc, 0xf8, 0x1c, 0xf3, 0xb6, 0x2f, 0x74, 0x51, 0xcb, 0xb7, 0x4e, 0x81, 0x4b, + 0xe0, 0x55, 0xce, 0x49, 0xb6, 0x99, 0xe8, 0x1f, 0x49, 0x1e, 0xfd, 0x4f, 0x05, 0x2c, 0x65, 0x78, + 0xde, 0xa1, 0x3e, 0x87, 0x9f, 0x0f, 0xa9, 0x6b, 0x1c, 0x4f, 0xdd, 0xd0, 0x5b, 0x68, 0x7b, 0x41, + 0x32, 0xcf, 0xf6, 0x46, 0x12, 0xca, 0x36, 0xc1, 0x34, 0xe5, 0xc4, 0xf6, 0x8b, 0xb9, 0xe5, 0xfc, + 0x55, 0xb5, 0x5c, 0x79, 0xf6, 0x74, 0x2b, 0x67, 0x25, 0xdd, 0xf4, 0xed, 0x10, 0x18, 0x45, 0xf8, + 0xfa, 0x3f, 0xb9, 0xcc, 0x34, 0x43, 0xf9, 0xe1, 0x37, 0x0a, 0x38, 0x27, 0x7e, 0xeb, 0x98, 0x35, + 0x49, 0x58, 0xf1, 0x32, 0xdb, 0x49, 0x56, 0x7b, 0xcc, 0xce, 0xa9, 0x2c, 0xc8, 0xb0, 0xce, 0x6d, + 0xa6, 0x58, 0xd0, 0x00, 0x2b, 0x5c, 0x01, 0xaa, 0x4d, 0x1d, 0x44, 0xbc, 0x16, 0xb5, 0xb0, 0x2f, + 0x4a, 0x6e, 0xba, 0x72, 0x3e, 0xe8, 0x6a, 0x6a, 0xad, 0x3f, 0x8c, 0x92, 0x36, 0xf0, 0x2d, 0xa0, + 0xda, 0xf8, 0x51, 0xec, 0x92, 0x17, 0x2e, 0xf3, 0x92, 0x4f, 0xad, 0xf5, 0xa7, 0x50, 0xd2, 0x0e, + 0x3e, 0x04, 0x25, 0x2e, 0x68, 0xab, 0x1b, 0xf7, 0xef, 0x73, 0xda, 0xa2, 0xfb, 0x98, 0x53, 0xd7, + 0xd9, 0x20, 0xcc, 0x22, 0x0e, 0xc7, 0x4d, 0x52, 0x2c, 0x08, 0x24, 0x3d, 0xe8, 0x6a, 0xa5, 0xfa, + 0x58, 0x4b, 0x74, 0x04, 0x92, 0xfe, 0x38, 0x0f, 0xae, 0x8c, 0xad, 0x4f, 0x78, 0x13, 0x40, 0x77, + 0x5b, 0xf4, 0xb5, 0xc6, 0x07, 0x51, 0x53, 0x0a, 0xbb, 0x43, 0xb8, 0x06, 0xf9, 0xca, 0x42, 0xd0, + 0xd5, 0xe0, 0xbd, 0xa1, 0x59, 0x34, 0xc2, 0x03, 0x5a, 0xe0, 0x6c, 0x0b, 0xfb, 0x3c, 0x52, 0x99, + 0xca, 0x46, 0xa4, 0x96, 0x5f, 0x3b, 0x5e, 0xd1, 0x86, 0x1e, 0x95, 0x97, 0x82, 0xae, 0x76, 0xf6, + 0x4e, 0x12, 0x04, 0xa5, 0x31, 0xe1, 0x3a, 0x38, 0x6f, 0xb5, 0x19, 0x23, 0x0e, 0x1f, 0x50, 0xfd, + 0x92, 0x54, 0xfd, 0x7c, 0x35, 0x3d, 0x8d, 0x06, 0xed, 0x43, 0x88, 0x06, 0xf1, 0x29, 0x23, 0x8d, + 0x18, 0xa2, 0x90, 0x86, 0x78, 0x3f, 0x3d, 0x8d, 0x06, 0xed, 0xa1, 0x0d, 0x34, 0x89, 0x9a, 0xb9, + 0x82, 0xd3, 0x02, 0xf2, 0x95, 0xa0, 0xab, 0x69, 0xd5, 0xf1, 0xa6, 0xe8, 0x28, 0x2c, 0xfd, 0xaf, + 0x1c, 0x00, 0x35, 0xc2, 0x19, 0xb5, 0xc4, 0x8e, 0x59, 0x05, 0x05, 0xbe, 0xe7, 0x11, 0x79, 0x14, + 0x2c, 0xf7, 0x9a, 0x59, 0x7d, 0xcf, 0x23, 0x4f, 0xbb, 0xda, 0x05, 0x69, 0x29, 0x8e, 0xe7, 0x70, + 0x0c, 0x09, 0x6b, 0x88, 0xc1, 0x8c, 0x2b, 0x76, 0x86, 0x5c, 0x97, 0x77, 0x27, 0xd8, 0x5e, 0x71, + 0x6f, 0x8e, 0x81, 0x2b, 0x20, 0xec, 0x68, 0x72, 0xab, 0x49, 0x60, 0xf8, 0x09, 0x28, 0x78, 0x6e, + 0xa3, 0xd7, 0x41, 0xdf, 0x99, 0x80, 0x60, 0xc3, 0x6d, 0xf8, 0x29, 0xf8, 0xd9, 0x30, 0xa3, 0x70, + 0x14, 0x09, 0x48, 0x48, 0xc1, 0x6c, 0xef, 0xca, 0x21, 0x56, 0x4b, 0x2d, 0xbf, 0x37, 0x01, 0x3c, + 0x92, 0xae, 0x29, 0x8a, 0xb9, 0xb0, 0x33, 0xf6, 0x66, 0x50, 0x0c, 0xaf, 0xff, 0x9d, 0x03, 0x73, + 0xd2, 0x30, 0xda, 0x20, 0xff, 0xb1, 0xde, 0xd1, 0x29, 0xf2, 0xdc, 0xf4, 0x8e, 0xe0, 0x9f, 0xab, + 0xde, 0x11, 0x45, 0x96, 0xde, 0xdf, 0xe7, 0x00, 0x1c, 0x2e, 0x30, 0xe8, 0x80, 0x99, 0xa8, 0xb5, + 0x9d, 0xf2, 0x71, 0x10, 0x1f, 0xc7, 0xb2, 0xf3, 0x4b, 0x96, 0xf0, 0x72, 0x64, 0x0b, 0xfe, 0xbb, + 0xfd, 0x4b, 0x54, 0x7c, 0x39, 0xa9, 0xc5, 0x33, 0x28, 0x61, 0x05, 0x09, 0x50, 0x23, 0xef, 0x2d, + 0xdc, 0x6a, 0x13, 0xb9, 0x0e, 0x63, 0x4f, 0x69, 0xa3, 0x97, 0xb6, 0xf1, 0x51, 0x1b, 0x3b, 0x9c, + 0xf2, 0xbd, 0xfe, 0x79, 0x51, 0xef, 0x43, 0xa1, 0x24, 0xae, 0xfe, 0xe3, 0xa0, 0x42, 0x51, 0x5d, + 0xfe, 0x1f, 0x14, 0xda, 0x01, 0x73, 0xb2, 0xbb, 0x3d, 0x8b, 0x44, 0x17, 0x25, 0xcb, 0x5c, 0x35, + 0x81, 0x85, 0x52, 0xc8, 0xfa, 0xcf, 0x0a, 0xb8, 0x30, 0xd8, 0x46, 0x06, 0x42, 0x56, 0x8e, 0x15, + 0xf2, 0x3e, 0x80, 0x51, 0xc2, 0xeb, 0x1d, 0xc2, 0x70, 0x93, 0x44, 0x81, 0xe7, 0x4e, 0x14, 0xf8, + 0xa2, 0xe4, 0x82, 0xf5, 0x21, 0x44, 0x34, 0x82, 0x45, 0xff, 0x25, 0x9d, 0x44, 0xb4, 0xce, 0x27, + 0x49, 0xe2, 0x2b, 0x30, 0x2f, 0xd5, 0x39, 0x85, 0x2c, 0x96, 0x24, 0xd9, 0x7c, 0x75, 0x18, 0x12, + 0x8d, 0xe2, 0xd1, 0x7f, 0xca, 0x81, 0x8b, 0xa3, 0x9a, 0x2e, 0xac, 0xc9, 0x47, 0x4a, 0x94, 0xc5, + 0x5a, 0xf2, 0x91, 0xf2, 0xb4, 0xab, 0x5d, 0x1b, 0xf7, 0x64, 0x8a, 0xbb, 0x4a, 0xe2, 0x45, 0xf3, + 0x31, 0x28, 0xa6, 0x54, 0x4c, 0x9c, 0x9f, 0xf2, 0x02, 0xf7, 0x72, 0xd0, 0xd5, 0x8a, 0xf5, 0x0c, + 0x1b, 0x94, 0xe9, 0x0d, 0x3b, 0x23, 0xab, 0xe0, 0x64, 0xe5, 0xbb, 0x30, 0x41, 0x05, 0x3c, 0x1e, + 0x56, 0x2e, 0xaa, 0x82, 0x53, 0x56, 0xee, 0x33, 0x70, 0x39, 0xbd, 0x70, 0xc3, 0xd2, 0x5d, 0x09, + 0xba, 0xda, 0xe5, 0x6a, 0x96, 0x11, 0xca, 0xf6, 0xcf, 0xaa, 0xbe, 0xfc, 0x0b, 0xaa, 0xbe, 0x1f, + 0x72, 0x60, 0x5a, 0x5c, 0x19, 0x5f, 0xc0, 0x0b, 0x75, 0x2b, 0xf5, 0x42, 0x5d, 0x9d, 0xa0, 0x05, + 0x8b, 0x08, 0x33, 0xdf, 0xa3, 0x5f, 0x0c, 0xbc, 0x47, 0x6f, 0x4c, 0x8c, 0x3c, 0xfe, 0xf5, 0xb9, + 0x06, 0xce, 0xc4, 0x01, 0xc0, 0xeb, 0xe1, 0x69, 0x2f, 0xef, 0xc2, 0x8a, 0x58, 0xfb, 0xf8, 0xe9, + 0x18, 0x5f, 0x82, 0x63, 0x0b, 0x9d, 0x02, 0x35, 0xc1, 0x30, 0x99, 0x73, 0x68, 0xed, 0x93, 0x16, + 0xb1, 0xb8, 0xcb, 0xe4, 0x11, 0x12, 0x5b, 0x6f, 0xca, 0x71, 0x14, 0x5b, 0x54, 0x5e, 0x3d, 0x38, + 0x2c, 0x4d, 0x3d, 0x39, 0x2c, 0x4d, 0xfd, 0x76, 0x58, 0x9a, 0xfa, 0x3a, 0x28, 0x29, 0x07, 0x41, + 0x49, 0x79, 0x12, 0x94, 0x94, 0xdf, 0x83, 0x92, 0xf2, 0xed, 0x1f, 0xa5, 0xa9, 0x4f, 0x73, 0x9d, + 0x95, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x61, 0xfc, 0xd4, 0x31, 0x3f, 0x13, 0x00, 0x00, +} diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.proto new file mode 100644 index 000000000..4953624af --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.proto @@ -0,0 +1,298 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.kubernetes.pkg.apis.autoscaling.v1; + +import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1"; + +// CrossVersionObjectReference contains enough information to let you identify the referred resource. +message CrossVersionObjectReference { + // Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + optional string kind = 1; + + // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names + optional string name = 2; + + // API version of the referent + // +optional + optional string apiVersion = 3; +} + +// configuration of a horizontal pod autoscaler. +message HorizontalPodAutoscaler { + // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + // +optional + optional HorizontalPodAutoscalerSpec spec = 2; + + // current information about the autoscaler. + // +optional + optional HorizontalPodAutoscalerStatus status = 3; +} + +// list of horizontal pod autoscaler objects. +message HorizontalPodAutoscalerList { + // Standard list metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // list of horizontal pod autoscaler objects. + repeated HorizontalPodAutoscaler items = 2; +} + +// specification of a horizontal pod autoscaler. +message HorizontalPodAutoscalerSpec { + // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption + // and will set the desired number of pods by using its Scale subresource. + optional CrossVersionObjectReference scaleTargetRef = 1; + + // lower limit for the number of pods that can be set by the autoscaler, default 1. + // +optional + optional int32 minReplicas = 2; + + // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. + optional int32 maxReplicas = 3; + + // target average CPU utilization (represented as a percentage of requested CPU) over all the pods; + // if not specified the default autoscaling policy will be used. + // +optional + optional int32 targetCPUUtilizationPercentage = 4; +} + +// current status of a horizontal pod autoscaler +message HorizontalPodAutoscalerStatus { + // most recent generation observed by this autoscaler. + // +optional + optional int64 observedGeneration = 1; + + // last time the HorizontalPodAutoscaler scaled the number of pods; + // used by the autoscaler to control how often the number of pods is changed. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2; + + // current number of replicas of pods managed by this autoscaler. + optional int32 currentReplicas = 3; + + // desired number of replicas of pods managed by this autoscaler. + optional int32 desiredReplicas = 4; + + // current average CPU utilization over all pods, represented as a percentage of requested CPU, + // e.g. 70 means that an average pod is using now 70% of its requested CPU. + // +optional + optional int32 currentCPUUtilizationPercentage = 5; +} + +// MetricSpec specifies how to scale based on a single metric +// (only `type` and one other matching field should be set at once). +message MetricSpec { + // type is the type of metric source. It should match one of the fields below. + optional string type = 1; + + // object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + // +optional + optional ObjectMetricSource object = 2; + + // pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + // +optional + optional PodsMetricSource pods = 3; + + // resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + // +optional + optional ResourceMetricSource resource = 4; +} + +// MetricStatus describes the last-read state of a single metric. +message MetricStatus { + // type is the type of metric source. It will match one of the fields below. + optional string type = 1; + + // object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + // +optional + optional ObjectMetricStatus object = 2; + + // pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + // +optional + optional PodsMetricStatus pods = 3; + + // resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + // +optional + optional ResourceMetricStatus resource = 4; +} + +// ObjectMetricSource indicates how to scale on a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). +message ObjectMetricSource { + // target is the described Kubernetes object. + optional CrossVersionObjectReference target = 1; + + // metricName is the name of the metric in question. + optional string metricName = 2; + + // targetValue is the target value of the metric (as a quantity). + optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3; +} + +// ObjectMetricStatus indicates the current value of a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). +message ObjectMetricStatus { + // target is the described Kubernetes object. + optional CrossVersionObjectReference target = 1; + + // metricName is the name of the metric in question. + optional string metricName = 2; + + // currentValue is the current value of the metric (as a quantity). + optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3; +} + +// PodsMetricSource indicates how to scale on a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). +// The values will be averaged together before being compared to the target +// value. +message PodsMetricSource { + // metricName is the name of the metric in question + optional string metricName = 1; + + // targetAverageValue is the target value of the average of the + // metric across all relevant pods (as a quantity) + optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2; +} + +// PodsMetricStatus indicates the current value of a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). +message PodsMetricStatus { + // metricName is the name of the metric in question + optional string metricName = 1; + + // currentAverageValue is the current value of the average of the + // metric across all relevant pods (as a quantity) + optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2; +} + +// ResourceMetricSource indicates how to scale on a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). The values will be averaged +// together before being compared to the target. Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. Only one "target" type +// should be set. +message ResourceMetricSource { + // name is the name of the resource in question. + optional string name = 1; + + // targetAverageUtilization is the target value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. + // +optional + optional int32 targetAverageUtilization = 2; + + // targetAverageValue is the the target value of the average of the + // resource metric across all relevant pods, as a raw value (instead of as + // a percentage of the request), similar to the "pods" metric source type. + // +optional + optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3; +} + +// ResourceMetricStatus indicates the current value of a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. +message ResourceMetricStatus { + // name is the name of the resource in question. + optional string name = 1; + + // currentAverageUtilization is the current value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. It will only be + // present if `targetAverageValue` was set in the corresponding metric + // specification. + // +optional + optional int32 currentAverageUtilization = 2; + + // currentAverageValue is the the current value of the average of the + // resource metric across all relevant pods, as a raw value (instead of as + // a percentage of the request), similar to the "pods" metric source type. + // It will always be set, regardless of the corresponding metric specification. + optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3; +} + +// Scale represents a scaling request for a resource. +message Scale { + // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + // +optional + optional ScaleSpec spec = 2; + + // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only. + // +optional + optional ScaleStatus status = 3; +} + +// ScaleSpec describes the attributes of a scale subresource. +message ScaleSpec { + // desired number of instances for the scaled object. + // +optional + optional int32 replicas = 1; +} + +// ScaleStatus represents the current status of a scale subresource. +message ScaleStatus { + // actual number of observed instances of the scaled object. + optional int32 replicas = 1; + + // label query over pods that should match the replicas count. This is same + // as the label selector but in the string format to avoid introspection + // by clients. The string will be in the same format as the query-param syntax. + // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + optional string selector = 2; +} + diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/register.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/register.go similarity index 63% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/register.go rename to vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/register.go index 4cf8e85a0..aaa225261 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/register.go @@ -14,20 +14,24 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2alpha1 +package v1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/runtime" - versionedwatch "k8s.io/client-go/1.5/pkg/watch/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package -const GroupName = "batch" +const GroupName = "autoscaling" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v2alpha1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs) @@ -37,14 +41,10 @@ var ( // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &Job{}, - &JobList{}, - &JobTemplate{}, - &ScheduledJob{}, - &ScheduledJobList{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, + &HorizontalPodAutoscaler{}, + &HorizontalPodAutoscalerList{}, + &Scale{}, ) - versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types.generated.go new file mode 100644 index 000000000..aea5e3831 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types.generated.go @@ -0,0 +1,5216 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1 + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg3_resource "k8s.io/apimachinery/pkg/api/resource" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + pkg4_v1 "k8s.io/client-go/pkg/api/v1" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81234 = 1 + codecSelferC_RAW1234 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1234 = 10 + codecSelferValueTypeMap1234 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1234 = 2 + codecSelfer_containerMapValue1234 = 3 + codecSelfer_containerMapEnd1234 = 4 + codecSelfer_containerArrayElem1234 = 6 + codecSelfer_containerArrayEnd1234 = 7 +) + +var ( + codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1234 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg3_resource.Quantity + var v1 pkg1_v1.Time + var v2 pkg2_types.UID + var v3 pkg4_v1.ResourceName + var v4 time.Time + _, _, _, _, _ = v0, v1, v2, v3, v4 + } +} + +func (x *CrossVersionObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[2] = x.APIVersion != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CrossVersionObjectReference) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CrossVersionObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv6 := &x.Name + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv8 := &x.APIVersion + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CrossVersionObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv11 := &x.Kind + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv13 := &x.Name + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *HorizontalPodAutoscalerSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.MinReplicas != nil + yyq2[3] = x.TargetCPUUtilizationPercentage != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy4 := &x.ScaleTargetRef + yy4.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("scaleTargetRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy6 := &x.ScaleTargetRef + yy6.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.MinReplicas == nil { + r.EncodeNil() + } else { + yy9 := *x.MinReplicas + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(yy9)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("minReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.MinReplicas == nil { + r.EncodeNil() + } else { + yy11 := *x.MinReplicas + yym12 := z.EncBinary() + _ = yym12 + if false { + } else { + r.EncodeInt(int64(yy11)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeInt(int64(x.MaxReplicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("maxReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + r.EncodeInt(int64(x.MaxReplicas)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.TargetCPUUtilizationPercentage == nil { + r.EncodeNil() + } else { + yy17 := *x.TargetCPUUtilizationPercentage + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + r.EncodeInt(int64(yy17)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("targetCPUUtilizationPercentage")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.TargetCPUUtilizationPercentage == nil { + r.EncodeNil() + } else { + yy19 := *x.TargetCPUUtilizationPercentage + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeInt(int64(yy19)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *HorizontalPodAutoscalerSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "scaleTargetRef": + if r.TryDecodeAsNil() { + x.ScaleTargetRef = CrossVersionObjectReference{} + } else { + yyv4 := &x.ScaleTargetRef + yyv4.CodecDecodeSelf(d) + } + case "minReplicas": + if r.TryDecodeAsNil() { + if x.MinReplicas != nil { + x.MinReplicas = nil + } + } else { + if x.MinReplicas == nil { + x.MinReplicas = new(int32) + } + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32)) + } + } + case "maxReplicas": + if r.TryDecodeAsNil() { + x.MaxReplicas = 0 + } else { + yyv7 := &x.MaxReplicas + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*int32)(yyv7)) = int32(r.DecodeInt(32)) + } + } + case "targetCPUUtilizationPercentage": + if r.TryDecodeAsNil() { + if x.TargetCPUUtilizationPercentage != nil { + x.TargetCPUUtilizationPercentage = nil + } + } else { + if x.TargetCPUUtilizationPercentage == nil { + x.TargetCPUUtilizationPercentage = new(int32) + } + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*int32)(x.TargetCPUUtilizationPercentage)) = int32(r.DecodeInt(32)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ScaleTargetRef = CrossVersionObjectReference{} + } else { + yyv12 := &x.ScaleTargetRef + yyv12.CodecDecodeSelf(d) + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.MinReplicas != nil { + x.MinReplicas = nil + } + } else { + if x.MinReplicas == nil { + x.MinReplicas = new(int32) + } + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32)) + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MaxReplicas = 0 + } else { + yyv15 := &x.MaxReplicas + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*int32)(yyv15)) = int32(r.DecodeInt(32)) + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.TargetCPUUtilizationPercentage != nil { + x.TargetCPUUtilizationPercentage = nil + } + } else { + if x.TargetCPUUtilizationPercentage == nil { + x.TargetCPUUtilizationPercentage = new(int32) + } + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*int32)(x.TargetCPUUtilizationPercentage)) = int32(r.DecodeInt(32)) + } + } + for { + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj11-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *HorizontalPodAutoscalerStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.ObservedGeneration != nil + yyq2[1] = x.LastScaleTime != nil + yyq2[4] = x.CurrentCPUUtilizationPercentage != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.ObservedGeneration == nil { + r.EncodeNil() + } else { + yy4 := *x.ObservedGeneration + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(yy4)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ObservedGeneration == nil { + r.EncodeNil() + } else { + yy6 := *x.ObservedGeneration + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeInt(int64(yy6)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.LastScaleTime == nil { + r.EncodeNil() + } else { + yym9 := z.EncBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) { + } else if yym9 { + z.EncBinaryMarshal(x.LastScaleTime) + } else if !yym9 && z.IsJSONHandle() { + z.EncJSONMarshal(x.LastScaleTime) + } else { + z.EncFallback(x.LastScaleTime) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastScaleTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.LastScaleTime == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) { + } else if yym10 { + z.EncBinaryMarshal(x.LastScaleTime) + } else if !yym10 && z.IsJSONHandle() { + z.EncJSONMarshal(x.LastScaleTime) + } else { + z.EncFallback(x.LastScaleTime) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym12 := z.EncBinary() + _ = yym12 + if false { + } else { + r.EncodeInt(int64(x.CurrentReplicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("currentReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeInt(int64(x.CurrentReplicas)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + r.EncodeInt(int64(x.DesiredReplicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("desiredReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeInt(int64(x.DesiredReplicas)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + if x.CurrentCPUUtilizationPercentage == nil { + r.EncodeNil() + } else { + yy18 := *x.CurrentCPUUtilizationPercentage + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeInt(int64(yy18)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("currentCPUUtilizationPercentage")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.CurrentCPUUtilizationPercentage == nil { + r.EncodeNil() + } else { + yy20 := *x.CurrentCPUUtilizationPercentage + yym21 := z.EncBinary() + _ = yym21 + if false { + } else { + r.EncodeInt(int64(yy20)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *HorizontalPodAutoscalerStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "observedGeneration": + if r.TryDecodeAsNil() { + if x.ObservedGeneration != nil { + x.ObservedGeneration = nil + } + } else { + if x.ObservedGeneration == nil { + x.ObservedGeneration = new(int64) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) + } + } + case "lastScaleTime": + if r.TryDecodeAsNil() { + if x.LastScaleTime != nil { + x.LastScaleTime = nil + } + } else { + if x.LastScaleTime == nil { + x.LastScaleTime = new(pkg1_v1.Time) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) { + } else if yym7 { + z.DecBinaryUnmarshal(x.LastScaleTime) + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.LastScaleTime) + } else { + z.DecFallback(x.LastScaleTime, false) + } + } + case "currentReplicas": + if r.TryDecodeAsNil() { + x.CurrentReplicas = 0 + } else { + yyv8 := &x.CurrentReplicas + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } + } + case "desiredReplicas": + if r.TryDecodeAsNil() { + x.DesiredReplicas = 0 + } else { + yyv10 := &x.DesiredReplicas + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int32)(yyv10)) = int32(r.DecodeInt(32)) + } + } + case "currentCPUUtilizationPercentage": + if r.TryDecodeAsNil() { + if x.CurrentCPUUtilizationPercentage != nil { + x.CurrentCPUUtilizationPercentage = nil + } + } else { + if x.CurrentCPUUtilizationPercentage == nil { + x.CurrentCPUUtilizationPercentage = new(int32) + } + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ObservedGeneration != nil { + x.ObservedGeneration = nil + } + } else { + if x.ObservedGeneration == nil { + x.ObservedGeneration = new(int64) + } + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.LastScaleTime != nil { + x.LastScaleTime = nil + } + } else { + if x.LastScaleTime == nil { + x.LastScaleTime = new(pkg1_v1.Time) + } + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) { + } else if yym18 { + z.DecBinaryUnmarshal(x.LastScaleTime) + } else if !yym18 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.LastScaleTime) + } else { + z.DecFallback(x.LastScaleTime, false) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CurrentReplicas = 0 + } else { + yyv19 := &x.CurrentReplicas + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*int32)(yyv19)) = int32(r.DecodeInt(32)) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.DesiredReplicas = 0 + } else { + yyv21 := &x.DesiredReplicas + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*int32)(yyv21)) = int32(r.DecodeInt(32)) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.CurrentCPUUtilizationPercentage != nil { + x.CurrentCPUUtilizationPercentage = nil + } + } else { + if x.CurrentCPUUtilizationPercentage == nil { + x.CurrentCPUUtilizationPercentage = new(int32) + } + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32)) + } + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj14-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *HorizontalPodAutoscaler) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = HorizontalPodAutoscalerSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = HorizontalPodAutoscalerStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = HorizontalPodAutoscalerSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = HorizontalPodAutoscalerStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *HorizontalPodAutoscalerList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *HorizontalPodAutoscalerList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Scale) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = ScaleSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = ScaleStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = ScaleSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = ScaleStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ScaleSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [1]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Replicas != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(1) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ScaleSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ScaleSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "replicas": + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv4 := &x.Replicas + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ScaleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv7 := &x.Replicas + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*int32)(yyv7)) = int32(r.DecodeInt(32)) + } + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj6-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ScaleStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Selector != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Selector)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("selector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Selector)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ScaleStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ScaleStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "replicas": + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv4 := &x.Replicas + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } + } + case "selector": + if r.TryDecodeAsNil() { + x.Selector = "" + } else { + yyv6 := &x.Selector + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ScaleStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv9 := &x.Replicas + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*int32)(yyv9)) = int32(r.DecodeInt(32)) + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Selector = "" + } else { + yyv11 := &x.Selector + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x MetricSourceType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *MetricSourceType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *MetricSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Object != nil + yyq2[2] = x.Pods != nil + yyq2[3] = x.Resource != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Object == nil { + r.EncodeNil() + } else { + x.Object.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("object")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Object == nil { + r.EncodeNil() + } else { + x.Object.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Pods == nil { + r.EncodeNil() + } else { + x.Pods.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("pods")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Pods == nil { + r.EncodeNil() + } else { + x.Pods.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Resource == nil { + r.EncodeNil() + } else { + x.Resource.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resource")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Resource == nil { + r.EncodeNil() + } else { + x.Resource.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *MetricSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *MetricSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) + } + case "object": + if r.TryDecodeAsNil() { + if x.Object != nil { + x.Object = nil + } + } else { + if x.Object == nil { + x.Object = new(ObjectMetricSource) + } + x.Object.CodecDecodeSelf(d) + } + case "pods": + if r.TryDecodeAsNil() { + if x.Pods != nil { + x.Pods = nil + } + } else { + if x.Pods == nil { + x.Pods = new(PodsMetricSource) + } + x.Pods.CodecDecodeSelf(d) + } + case "resource": + if r.TryDecodeAsNil() { + if x.Resource != nil { + x.Resource = nil + } + } else { + if x.Resource == nil { + x.Resource = new(ResourceMetricSource) + } + x.Resource.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *MetricSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv9 := &x.Type + yyv9.CodecDecodeSelf(d) + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Object != nil { + x.Object = nil + } + } else { + if x.Object == nil { + x.Object = new(ObjectMetricSource) + } + x.Object.CodecDecodeSelf(d) + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Pods != nil { + x.Pods = nil + } + } else { + if x.Pods == nil { + x.Pods = new(PodsMetricSource) + } + x.Pods.CodecDecodeSelf(d) + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Resource != nil { + x.Resource = nil + } + } else { + if x.Resource == nil { + x.Resource = new(ResourceMetricSource) + } + x.Resource.CodecDecodeSelf(d) + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ObjectMetricSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 3 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy4 := &x.Target + yy4.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("target")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy6 := &x.Target + yy6.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym9 := z.EncBinary() + _ = yym9 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metricName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy12 := &x.TargetValue + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(yy12) + } else { + z.EncFallback(yy12) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("targetValue")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy14 := &x.TargetValue + yym15 := z.EncBinary() + _ = yym15 + if false { + } else if z.HasExtensions() && z.EncExt(yy14) { + } else if !yym15 && z.IsJSONHandle() { + z.EncJSONMarshal(yy14) + } else { + z.EncFallback(yy14) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ObjectMetricSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ObjectMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "target": + if r.TryDecodeAsNil() { + x.Target = CrossVersionObjectReference{} + } else { + yyv4 := &x.Target + yyv4.CodecDecodeSelf(d) + } + case "metricName": + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv5 := &x.MetricName + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } + } + case "targetValue": + if r.TryDecodeAsNil() { + x.TargetValue = pkg3_resource.Quantity{} + } else { + yyv7 := &x.TargetValue + yym8 := z.DecBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.DecExt(yyv7) { + } else if !yym8 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv7) + } else { + z.DecFallback(yyv7, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ObjectMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Target = CrossVersionObjectReference{} + } else { + yyv10 := &x.Target + yyv10.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv11 := &x.MetricName + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TargetValue = pkg3_resource.Quantity{} + } else { + yyv13 := &x.TargetValue + yym14 := z.DecBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.DecExt(yyv13) { + } else if !yym14 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv13) + } else { + z.DecFallback(yyv13, false) + } + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PodsMetricSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metricName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy7 := &x.TargetAverageValue + yym8 := z.EncBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.EncExt(yy7) { + } else if !yym8 && z.IsJSONHandle() { + z.EncJSONMarshal(yy7) + } else { + z.EncFallback(yy7) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("targetAverageValue")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy9 := &x.TargetAverageValue + yym10 := z.EncBinary() + _ = yym10 + if false { + } else if z.HasExtensions() && z.EncExt(yy9) { + } else if !yym10 && z.IsJSONHandle() { + z.EncJSONMarshal(yy9) + } else { + z.EncFallback(yy9) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PodsMetricSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PodsMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "metricName": + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv4 := &x.MetricName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "targetAverageValue": + if r.TryDecodeAsNil() { + x.TargetAverageValue = pkg3_resource.Quantity{} + } else { + yyv6 := &x.TargetAverageValue + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) + } else { + z.DecFallback(yyv6, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PodsMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv9 := &x.MetricName + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TargetAverageValue = pkg3_resource.Quantity{} + } else { + yyv11 := &x.TargetAverageValue + yym12 := z.DecBinary() + _ = yym12 + if false { + } else if z.HasExtensions() && z.DecExt(yyv11) { + } else if !yym12 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv11) + } else { + z.DecFallback(yyv11, false) + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ResourceMetricSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.TargetAverageUtilization != nil + yyq2[2] = x.TargetAverageValue != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yysf4 := &x.Name + yysf4.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yysf5 := &x.Name + yysf5.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.TargetAverageUtilization == nil { + r.EncodeNil() + } else { + yy7 := *x.TargetAverageUtilization + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeInt(int64(yy7)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("targetAverageUtilization")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.TargetAverageUtilization == nil { + r.EncodeNil() + } else { + yy9 := *x.TargetAverageUtilization + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(yy9)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.TargetAverageValue == nil { + r.EncodeNil() + } else { + yym12 := z.EncBinary() + _ = yym12 + if false { + } else if z.HasExtensions() && z.EncExt(x.TargetAverageValue) { + } else if !yym12 && z.IsJSONHandle() { + z.EncJSONMarshal(x.TargetAverageValue) + } else { + z.EncFallback(x.TargetAverageValue) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("targetAverageValue")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.TargetAverageValue == nil { + r.EncodeNil() + } else { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(x.TargetAverageValue) { + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(x.TargetAverageValue) + } else { + z.EncFallback(x.TargetAverageValue) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ResourceMetricSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ResourceMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv4 := &x.Name + yyv4.CodecDecodeSelf(d) + } + case "targetAverageUtilization": + if r.TryDecodeAsNil() { + if x.TargetAverageUtilization != nil { + x.TargetAverageUtilization = nil + } + } else { + if x.TargetAverageUtilization == nil { + x.TargetAverageUtilization = new(int32) + } + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*int32)(x.TargetAverageUtilization)) = int32(r.DecodeInt(32)) + } + } + case "targetAverageValue": + if r.TryDecodeAsNil() { + if x.TargetAverageValue != nil { + x.TargetAverageValue = nil + } + } else { + if x.TargetAverageValue == nil { + x.TargetAverageValue = new(pkg3_resource.Quantity) + } + yym8 := z.DecBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.DecExt(x.TargetAverageValue) { + } else if !yym8 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.TargetAverageValue) + } else { + z.DecFallback(x.TargetAverageValue, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ResourceMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv10 := &x.Name + yyv10.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.TargetAverageUtilization != nil { + x.TargetAverageUtilization = nil + } + } else { + if x.TargetAverageUtilization == nil { + x.TargetAverageUtilization = new(int32) + } + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*int32)(x.TargetAverageUtilization)) = int32(r.DecodeInt(32)) + } + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.TargetAverageValue != nil { + x.TargetAverageValue = nil + } + } else { + if x.TargetAverageValue == nil { + x.TargetAverageValue = new(pkg3_resource.Quantity) + } + yym14 := z.DecBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.DecExt(x.TargetAverageValue) { + } else if !yym14 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.TargetAverageValue) + } else { + z.DecFallback(x.TargetAverageValue, false) + } + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *MetricStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Object != nil + yyq2[2] = x.Pods != nil + yyq2[3] = x.Resource != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Object == nil { + r.EncodeNil() + } else { + x.Object.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("object")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Object == nil { + r.EncodeNil() + } else { + x.Object.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Pods == nil { + r.EncodeNil() + } else { + x.Pods.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("pods")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Pods == nil { + r.EncodeNil() + } else { + x.Pods.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Resource == nil { + r.EncodeNil() + } else { + x.Resource.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resource")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Resource == nil { + r.EncodeNil() + } else { + x.Resource.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *MetricStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *MetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) + } + case "object": + if r.TryDecodeAsNil() { + if x.Object != nil { + x.Object = nil + } + } else { + if x.Object == nil { + x.Object = new(ObjectMetricStatus) + } + x.Object.CodecDecodeSelf(d) + } + case "pods": + if r.TryDecodeAsNil() { + if x.Pods != nil { + x.Pods = nil + } + } else { + if x.Pods == nil { + x.Pods = new(PodsMetricStatus) + } + x.Pods.CodecDecodeSelf(d) + } + case "resource": + if r.TryDecodeAsNil() { + if x.Resource != nil { + x.Resource = nil + } + } else { + if x.Resource == nil { + x.Resource = new(ResourceMetricStatus) + } + x.Resource.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *MetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv9 := &x.Type + yyv9.CodecDecodeSelf(d) + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Object != nil { + x.Object = nil + } + } else { + if x.Object == nil { + x.Object = new(ObjectMetricStatus) + } + x.Object.CodecDecodeSelf(d) + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Pods != nil { + x.Pods = nil + } + } else { + if x.Pods == nil { + x.Pods = new(PodsMetricStatus) + } + x.Pods.CodecDecodeSelf(d) + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Resource != nil { + x.Resource = nil + } + } else { + if x.Resource == nil { + x.Resource = new(ResourceMetricStatus) + } + x.Resource.CodecDecodeSelf(d) + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ObjectMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 3 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy4 := &x.Target + yy4.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("target")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy6 := &x.Target + yy6.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym9 := z.EncBinary() + _ = yym9 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metricName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy12 := &x.CurrentValue + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(yy12) + } else { + z.EncFallback(yy12) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("currentValue")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy14 := &x.CurrentValue + yym15 := z.EncBinary() + _ = yym15 + if false { + } else if z.HasExtensions() && z.EncExt(yy14) { + } else if !yym15 && z.IsJSONHandle() { + z.EncJSONMarshal(yy14) + } else { + z.EncFallback(yy14) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ObjectMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ObjectMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "target": + if r.TryDecodeAsNil() { + x.Target = CrossVersionObjectReference{} + } else { + yyv4 := &x.Target + yyv4.CodecDecodeSelf(d) + } + case "metricName": + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv5 := &x.MetricName + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } + } + case "currentValue": + if r.TryDecodeAsNil() { + x.CurrentValue = pkg3_resource.Quantity{} + } else { + yyv7 := &x.CurrentValue + yym8 := z.DecBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.DecExt(yyv7) { + } else if !yym8 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv7) + } else { + z.DecFallback(yyv7, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ObjectMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Target = CrossVersionObjectReference{} + } else { + yyv10 := &x.Target + yyv10.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv11 := &x.MetricName + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CurrentValue = pkg3_resource.Quantity{} + } else { + yyv13 := &x.CurrentValue + yym14 := z.DecBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.DecExt(yyv13) { + } else if !yym14 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv13) + } else { + z.DecFallback(yyv13, false) + } + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PodsMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metricName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy7 := &x.CurrentAverageValue + yym8 := z.EncBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.EncExt(yy7) { + } else if !yym8 && z.IsJSONHandle() { + z.EncJSONMarshal(yy7) + } else { + z.EncFallback(yy7) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("currentAverageValue")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy9 := &x.CurrentAverageValue + yym10 := z.EncBinary() + _ = yym10 + if false { + } else if z.HasExtensions() && z.EncExt(yy9) { + } else if !yym10 && z.IsJSONHandle() { + z.EncJSONMarshal(yy9) + } else { + z.EncFallback(yy9) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PodsMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PodsMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "metricName": + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv4 := &x.MetricName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "currentAverageValue": + if r.TryDecodeAsNil() { + x.CurrentAverageValue = pkg3_resource.Quantity{} + } else { + yyv6 := &x.CurrentAverageValue + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) + } else { + z.DecFallback(yyv6, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PodsMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv9 := &x.MetricName + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CurrentAverageValue = pkg3_resource.Quantity{} + } else { + yyv11 := &x.CurrentAverageValue + yym12 := z.DecBinary() + _ = yym12 + if false { + } else if z.HasExtensions() && z.DecExt(yyv11) { + } else if !yym12 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv11) + } else { + z.DecFallback(yyv11, false) + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ResourceMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.CurrentAverageUtilization != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yysf4 := &x.Name + yysf4.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yysf5 := &x.Name + yysf5.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.CurrentAverageUtilization == nil { + r.EncodeNil() + } else { + yy7 := *x.CurrentAverageUtilization + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeInt(int64(yy7)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("currentAverageUtilization")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.CurrentAverageUtilization == nil { + r.EncodeNil() + } else { + yy9 := *x.CurrentAverageUtilization + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(yy9)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy12 := &x.CurrentAverageValue + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(yy12) + } else { + z.EncFallback(yy12) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("currentAverageValue")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy14 := &x.CurrentAverageValue + yym15 := z.EncBinary() + _ = yym15 + if false { + } else if z.HasExtensions() && z.EncExt(yy14) { + } else if !yym15 && z.IsJSONHandle() { + z.EncJSONMarshal(yy14) + } else { + z.EncFallback(yy14) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ResourceMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ResourceMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv4 := &x.Name + yyv4.CodecDecodeSelf(d) + } + case "currentAverageUtilization": + if r.TryDecodeAsNil() { + if x.CurrentAverageUtilization != nil { + x.CurrentAverageUtilization = nil + } + } else { + if x.CurrentAverageUtilization == nil { + x.CurrentAverageUtilization = new(int32) + } + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*int32)(x.CurrentAverageUtilization)) = int32(r.DecodeInt(32)) + } + } + case "currentAverageValue": + if r.TryDecodeAsNil() { + x.CurrentAverageValue = pkg3_resource.Quantity{} + } else { + yyv7 := &x.CurrentAverageValue + yym8 := z.DecBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.DecExt(yyv7) { + } else if !yym8 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv7) + } else { + z.DecFallback(yyv7, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ResourceMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv10 := &x.Name + yyv10.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.CurrentAverageUtilization != nil { + x.CurrentAverageUtilization = nil + } + } else { + if x.CurrentAverageUtilization == nil { + x.CurrentAverageUtilization = new(int32) + } + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*int32)(x.CurrentAverageUtilization)) = int32(r.DecodeInt(32)) + } + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CurrentAverageValue = pkg3_resource.Quantity{} + } else { + yyv13 := &x.CurrentAverageValue + yym14 := z.DecBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.DecExt(yyv13) { + } else if !yym14 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv13) + } else { + z.DecFallback(yyv13, false) + } + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) encSliceHorizontalPodAutoscaler(v []HorizontalPodAutoscaler, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutoscaler, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []HorizontalPodAutoscaler{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 360) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]HorizontalPodAutoscaler, yyrl1) + } + } else { + yyv1 = make([]HorizontalPodAutoscaler, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = HorizontalPodAutoscaler{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, HorizontalPodAutoscaler{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = HorizontalPodAutoscaler{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, HorizontalPodAutoscaler{}) // var yyz1 HorizontalPodAutoscaler + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = HorizontalPodAutoscaler{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []HorizontalPodAutoscaler{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types.go new file mode 100644 index 000000000..47fd31e27 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types.go @@ -0,0 +1,296 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/pkg/api/v1" +) + +// CrossVersionObjectReference contains enough information to let you identify the referred resource. +type CrossVersionObjectReference struct { + // Kind of the referent; More info: 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://kubernetes.io/docs/user-guide/identifiers#names + Name string `json:"name" protobuf:"bytes,2,opt,name=name"` + // API version of the referent + // +optional + APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"` +} + +// specification of a horizontal pod autoscaler. +type HorizontalPodAutoscalerSpec struct { + // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption + // and will set the desired number of pods by using its Scale subresource. + ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef" protobuf:"bytes,1,opt,name=scaleTargetRef"` + // lower limit for the number of pods that can be set by the autoscaler, default 1. + // +optional + MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"` + // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. + MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"` + // target average CPU utilization (represented as a percentage of requested CPU) over all the pods; + // if not specified the default autoscaling policy will be used. + // +optional + TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty" protobuf:"varint,4,opt,name=targetCPUUtilizationPercentage"` +} + +// current status of a horizontal pod autoscaler +type HorizontalPodAutoscalerStatus struct { + // most recent generation observed by this autoscaler. + // +optional + ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` + + // last time the HorizontalPodAutoscaler scaled the number of pods; + // used by the autoscaler to control how often the number of pods is changed. + // +optional + LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"` + + // current number of replicas of pods managed by this autoscaler. + CurrentReplicas int32 `json:"currentReplicas" protobuf:"varint,3,opt,name=currentReplicas"` + + // desired number of replicas of pods managed by this autoscaler. + DesiredReplicas int32 `json:"desiredReplicas" protobuf:"varint,4,opt,name=desiredReplicas"` + + // current average CPU utilization over all pods, represented as a percentage of requested CPU, + // e.g. 70 means that an average pod is using now 70% of its requested CPU. + // +optional + CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty" protobuf:"varint,5,opt,name=currentCPUUtilizationPercentage"` +} + +// +genclient=true + +// configuration of a horizontal pod autoscaler. +type HorizontalPodAutoscaler struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + // +optional + Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + + // current information about the autoscaler. + // +optional + Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// list of horizontal pod autoscaler objects. +type HorizontalPodAutoscalerList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // list of horizontal pod autoscaler objects. + Items []HorizontalPodAutoscaler `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// Scale represents a scaling request for a resource. +type Scale struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + // +optional + Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + + // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only. + // +optional + Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// ScaleSpec describes the attributes of a scale subresource. +type ScaleSpec struct { + // desired number of instances for the scaled object. + // +optional + Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` +} + +// ScaleStatus represents the current status of a scale subresource. +type ScaleStatus struct { + // actual number of observed instances of the scaled object. + Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"` + + // label query over pods that should match the replicas count. This is same + // as the label selector but in the string format to avoid introspection + // by clients. The string will be in the same format as the query-param syntax. + // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + Selector string `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` +} + +// the types below are used in the alpha metrics annotation + +// MetricSourceType indicates the type of metric. +type MetricSourceType string + +var ( + // ObjectMetricSourceType is a metric describing a kubernetes object + // (for example, hits-per-second on an Ingress object). + ObjectMetricSourceType MetricSourceType = "Object" + // PodsMetricSourceType is a metric describing each pod in the current scale + // target (for example, transactions-processed-per-second). The values + // will be averaged together before being compared to the target value. + PodsMetricSourceType MetricSourceType = "Pods" + // ResourceMetricSourceType is a resource metric known to Kubernetes, as + // specified in requests and limits, describing each pod in the current + // scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics (the "pods" source). + ResourceMetricSourceType MetricSourceType = "Resource" +) + +// MetricSpec specifies how to scale based on a single metric +// (only `type` and one other matching field should be set at once). +type MetricSpec struct { + // type is the type of metric source. It should match one of the fields below. + Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"` + + // object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + // +optional + Object *ObjectMetricSource `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"` + // pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + // +optional + Pods *PodsMetricSource `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"` + // resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + // +optional + Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"` +} + +// ObjectMetricSource indicates how to scale on a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). +type ObjectMetricSource struct { + // target is the described Kubernetes object. + Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"` + + // metricName is the name of the metric in question. + MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"` + // targetValue is the target value of the metric (as a quantity). + TargetValue resource.Quantity `json:"targetValue" protobuf:"bytes,3,name=targetValue"` +} + +// PodsMetricSource indicates how to scale on a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). +// The values will be averaged together before being compared to the target +// value. +type PodsMetricSource struct { + // metricName is the name of the metric in question + MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"` + // targetAverageValue is the target value of the average of the + // metric across all relevant pods (as a quantity) + TargetAverageValue resource.Quantity `json:"targetAverageValue" protobuf:"bytes,2,name=targetAverageValue"` +} + +// ResourceMetricSource indicates how to scale on a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). The values will be averaged +// together before being compared to the target. Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. Only one "target" type +// should be set. +type ResourceMetricSource struct { + // name is the name of the resource in question. + Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"` + // targetAverageUtilization is the target value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. + // +optional + TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty" protobuf:"varint,2,opt,name=targetAverageUtilization"` + // targetAverageValue is the the target value of the average of the + // resource metric across all relevant pods, as a raw value (instead of as + // a percentage of the request), similar to the "pods" metric source type. + // +optional + TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,3,opt,name=targetAverageValue"` +} + +// MetricStatus describes the last-read state of a single metric. +type MetricStatus struct { + // type is the type of metric source. It will match one of the fields below. + Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"` + + // object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + // +optional + Object *ObjectMetricStatus `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"` + // pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + // +optional + Pods *PodsMetricStatus `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"` + // resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + // +optional + Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"` +} + +// ObjectMetricStatus indicates the current value of a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). +type ObjectMetricStatus struct { + // target is the described Kubernetes object. + Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"` + + // metricName is the name of the metric in question. + MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"` + // currentValue is the current value of the metric (as a quantity). + CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"` +} + +// PodsMetricStatus indicates the current value of a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). +type PodsMetricStatus struct { + // metricName is the name of the metric in question + MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"` + // currentAverageValue is the current value of the average of the + // metric across all relevant pods (as a quantity) + CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,2,name=currentAverageValue"` +} + +// ResourceMetricStatus indicates the current value of a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. +type ResourceMetricStatus struct { + // name is the name of the resource in question. + Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"` + // currentAverageUtilization is the current value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. It will only be + // present if `targetAverageValue` was set in the corresponding metric + // specification. + // +optional + CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty" protobuf:"bytes,2,opt,name=currentAverageUtilization"` + // currentAverageValue is the the current value of the average of the + // resource metric across all relevant pods, as a raw value (instead of as + // a percentage of the request), similar to the "pods" metric source type. + // It will always be set, regardless of the corresponding metric specification. + CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,3,name=currentAverageValue"` +} diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go new file mode 100644 index 000000000..01d205f87 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go @@ -0,0 +1,205 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_CrossVersionObjectReference = map[string]string{ + "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", + "kind": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds\"", + "name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "apiVersion": "API version of the referent", +} + +func (CrossVersionObjectReference) SwaggerDoc() map[string]string { + return map_CrossVersionObjectReference +} + +var map_HorizontalPodAutoscaler = map[string]string{ + "": "configuration of a horizontal pod autoscaler.", + "metadata": "Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "spec": "behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", + "status": "current information about the autoscaler.", +} + +func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string { + return map_HorizontalPodAutoscaler +} + +var map_HorizontalPodAutoscalerList = map[string]string{ + "": "list of horizontal pod autoscaler objects.", + "metadata": "Standard list metadata.", + "items": "list of horizontal pod autoscaler objects.", +} + +func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string { + return map_HorizontalPodAutoscalerList +} + +var map_HorizontalPodAutoscalerSpec = map[string]string{ + "": "specification of a horizontal pod autoscaler.", + "scaleTargetRef": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.", + "minReplicas": "lower limit for the number of pods that can be set by the autoscaler, default 1.", + "maxReplicas": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.", + "targetCPUUtilizationPercentage": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.", +} + +func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string { + return map_HorizontalPodAutoscalerSpec +} + +var map_HorizontalPodAutoscalerStatus = map[string]string{ + "": "current status of a horizontal pod autoscaler", + "observedGeneration": "most recent generation observed by this autoscaler.", + "lastScaleTime": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.", + "currentReplicas": "current number of replicas of pods managed by this autoscaler.", + "desiredReplicas": "desired number of replicas of pods managed by this autoscaler.", + "currentCPUUtilizationPercentage": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.", +} + +func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string { + return map_HorizontalPodAutoscalerStatus +} + +var map_MetricSpec = map[string]string{ + "": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", + "type": "type is the type of metric source. It should match one of the fields below.", + "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", +} + +func (MetricSpec) SwaggerDoc() map[string]string { + return map_MetricSpec +} + +var map_MetricStatus = map[string]string{ + "": "MetricStatus describes the last-read state of a single metric.", + "type": "type is the type of metric source. It will match one of the fields below.", + "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", +} + +func (MetricStatus) SwaggerDoc() map[string]string { + return map_MetricStatus +} + +var map_ObjectMetricSource = map[string]string{ + "": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "target": "target is the described Kubernetes object.", + "metricName": "metricName is the name of the metric in question.", + "targetValue": "targetValue is the target value of the metric (as a quantity).", +} + +func (ObjectMetricSource) SwaggerDoc() map[string]string { + return map_ObjectMetricSource +} + +var map_ObjectMetricStatus = map[string]string{ + "": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "target": "target is the described Kubernetes object.", + "metricName": "metricName is the name of the metric in question.", + "currentValue": "currentValue is the current value of the metric (as a quantity).", +} + +func (ObjectMetricStatus) SwaggerDoc() map[string]string { + return map_ObjectMetricStatus +} + +var map_PodsMetricSource = map[string]string{ + "": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "metricName": "metricName is the name of the metric in question", + "targetAverageValue": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", +} + +func (PodsMetricSource) SwaggerDoc() map[string]string { + return map_PodsMetricSource +} + +var map_PodsMetricStatus = map[string]string{ + "": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + "metricName": "metricName is the name of the metric in question", + "currentAverageValue": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", +} + +func (PodsMetricStatus) SwaggerDoc() map[string]string { + return map_PodsMetricStatus +} + +var map_ResourceMetricSource = map[string]string{ + "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + "name": "name is the name of the resource in question.", + "targetAverageUtilization": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + "targetAverageValue": "targetAverageValue is the the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", +} + +func (ResourceMetricSource) SwaggerDoc() map[string]string { + return map_ResourceMetricSource +} + +var map_ResourceMetricStatus = map[string]string{ + "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "name": "name is the name of the resource in question.", + "currentAverageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", + "currentAverageValue": "currentAverageValue is the the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", +} + +func (ResourceMetricStatus) SwaggerDoc() map[string]string { + return map_ResourceMetricStatus +} + +var map_Scale = map[string]string{ + "": "Scale represents a scaling request for a resource.", + "metadata": "Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.", + "spec": "defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", + "status": "current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.", +} + +func (Scale) SwaggerDoc() map[string]string { + return map_Scale +} + +var map_ScaleSpec = map[string]string{ + "": "ScaleSpec describes the attributes of a scale subresource.", + "replicas": "desired number of instances for the scaled object.", +} + +func (ScaleSpec) SwaggerDoc() map[string]string { + return map_ScaleSpec +} + +var map_ScaleStatus = map[string]string{ + "": "ScaleStatus represents the current status of a scale subresource.", + "replicas": "actual number of observed instances of the scaled object.", + "selector": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors", +} + +func (ScaleStatus) SwaggerDoc() map[string]string { + return map_ScaleStatus +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.conversion.go new file mode 100644 index 000000000..acd2283cd --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.conversion.go @@ -0,0 +1,449 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1 + +import ( + resource "k8s.io/apimachinery/pkg/api/resource" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + api "k8s.io/client-go/pkg/api" + api_v1 "k8s.io/client-go/pkg/api/v1" + autoscaling "k8s.io/client-go/pkg/apis/autoscaling" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference, + Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference, + Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler, + Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler, + Convert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList, + Convert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList, + Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec, + Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec, + Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus, + Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus, + Convert_v1_MetricSpec_To_autoscaling_MetricSpec, + Convert_autoscaling_MetricSpec_To_v1_MetricSpec, + Convert_v1_MetricStatus_To_autoscaling_MetricStatus, + Convert_autoscaling_MetricStatus_To_v1_MetricStatus, + Convert_v1_ObjectMetricSource_To_autoscaling_ObjectMetricSource, + Convert_autoscaling_ObjectMetricSource_To_v1_ObjectMetricSource, + Convert_v1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus, + Convert_autoscaling_ObjectMetricStatus_To_v1_ObjectMetricStatus, + Convert_v1_PodsMetricSource_To_autoscaling_PodsMetricSource, + Convert_autoscaling_PodsMetricSource_To_v1_PodsMetricSource, + Convert_v1_PodsMetricStatus_To_autoscaling_PodsMetricStatus, + Convert_autoscaling_PodsMetricStatus_To_v1_PodsMetricStatus, + Convert_v1_ResourceMetricSource_To_autoscaling_ResourceMetricSource, + Convert_autoscaling_ResourceMetricSource_To_v1_ResourceMetricSource, + Convert_v1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus, + Convert_autoscaling_ResourceMetricStatus_To_v1_ResourceMetricStatus, + Convert_v1_Scale_To_autoscaling_Scale, + Convert_autoscaling_Scale_To_v1_Scale, + Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec, + Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec, + Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus, + Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus, + ) +} + +func autoConvert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error { + out.Kind = in.Kind + out.Name = in.Name + out.APIVersion = in.APIVersion + return nil +} + +func Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error { + return autoConvert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in, out, s) +} + +func autoConvert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *CrossVersionObjectReference, s conversion.Scope) error { + out.Kind = in.Kind + out.Name = in.Name + out.APIVersion = in.APIVersion + return nil +} + +func Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *CrossVersionObjectReference, s conversion.Scope) error { + return autoConvert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(in, out, s) +} + +func autoConvert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]autoscaling.HorizontalPodAutoscaler, len(*in)) + for i := range *in { + if err := Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error { + return autoConvert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in, out, s) +} + +func autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]HorizontalPodAutoscaler, len(*in)) + for i := range *in { + if err := Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = make([]HorizontalPodAutoscaler, 0) + } + return nil +} + +func Convert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error { + return autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in, out, s) +} + +func autoConvert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error { + if err := Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil { + return err + } + out.MinReplicas = (*int32)(unsafe.Pointer(in.MinReplicas)) + out.MaxReplicas = in.MaxReplicas + // WARNING: in.TargetCPUUtilizationPercentage requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error { + if err := Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil { + return err + } + out.MinReplicas = (*int32)(unsafe.Pointer(in.MinReplicas)) + out.MaxReplicas = in.MaxReplicas + // WARNING: in.Metrics requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error { + out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) + out.LastScaleTime = (*meta_v1.Time)(unsafe.Pointer(in.LastScaleTime)) + out.CurrentReplicas = in.CurrentReplicas + out.DesiredReplicas = in.DesiredReplicas + // WARNING: in.CurrentCPUUtilizationPercentage requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error { + out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) + out.LastScaleTime = (*meta_v1.Time)(unsafe.Pointer(in.LastScaleTime)) + out.CurrentReplicas = in.CurrentReplicas + out.DesiredReplicas = in.DesiredReplicas + // WARNING: in.CurrentMetrics requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1_MetricSpec_To_autoscaling_MetricSpec(in *MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error { + out.Type = autoscaling.MetricSourceType(in.Type) + out.Object = (*autoscaling.ObjectMetricSource)(unsafe.Pointer(in.Object)) + out.Pods = (*autoscaling.PodsMetricSource)(unsafe.Pointer(in.Pods)) + out.Resource = (*autoscaling.ResourceMetricSource)(unsafe.Pointer(in.Resource)) + return nil +} + +func Convert_v1_MetricSpec_To_autoscaling_MetricSpec(in *MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error { + return autoConvert_v1_MetricSpec_To_autoscaling_MetricSpec(in, out, s) +} + +func autoConvert_autoscaling_MetricSpec_To_v1_MetricSpec(in *autoscaling.MetricSpec, out *MetricSpec, s conversion.Scope) error { + out.Type = MetricSourceType(in.Type) + out.Object = (*ObjectMetricSource)(unsafe.Pointer(in.Object)) + out.Pods = (*PodsMetricSource)(unsafe.Pointer(in.Pods)) + out.Resource = (*ResourceMetricSource)(unsafe.Pointer(in.Resource)) + return nil +} + +func Convert_autoscaling_MetricSpec_To_v1_MetricSpec(in *autoscaling.MetricSpec, out *MetricSpec, s conversion.Scope) error { + return autoConvert_autoscaling_MetricSpec_To_v1_MetricSpec(in, out, s) +} + +func autoConvert_v1_MetricStatus_To_autoscaling_MetricStatus(in *MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error { + out.Type = autoscaling.MetricSourceType(in.Type) + out.Object = (*autoscaling.ObjectMetricStatus)(unsafe.Pointer(in.Object)) + out.Pods = (*autoscaling.PodsMetricStatus)(unsafe.Pointer(in.Pods)) + out.Resource = (*autoscaling.ResourceMetricStatus)(unsafe.Pointer(in.Resource)) + return nil +} + +func Convert_v1_MetricStatus_To_autoscaling_MetricStatus(in *MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error { + return autoConvert_v1_MetricStatus_To_autoscaling_MetricStatus(in, out, s) +} + +func autoConvert_autoscaling_MetricStatus_To_v1_MetricStatus(in *autoscaling.MetricStatus, out *MetricStatus, s conversion.Scope) error { + out.Type = MetricSourceType(in.Type) + out.Object = (*ObjectMetricStatus)(unsafe.Pointer(in.Object)) + out.Pods = (*PodsMetricStatus)(unsafe.Pointer(in.Pods)) + out.Resource = (*ResourceMetricStatus)(unsafe.Pointer(in.Resource)) + return nil +} + +func Convert_autoscaling_MetricStatus_To_v1_MetricStatus(in *autoscaling.MetricStatus, out *MetricStatus, s conversion.Scope) error { + return autoConvert_autoscaling_MetricStatus_To_v1_MetricStatus(in, out, s) +} + +func autoConvert_v1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error { + if err := Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil { + return err + } + out.MetricName = in.MetricName + out.TargetValue = in.TargetValue + return nil +} + +func Convert_v1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error { + return autoConvert_v1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in, out, s) +} + +func autoConvert_autoscaling_ObjectMetricSource_To_v1_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *ObjectMetricSource, s conversion.Scope) error { + if err := Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil { + return err + } + out.MetricName = in.MetricName + out.TargetValue = in.TargetValue + return nil +} + +func Convert_autoscaling_ObjectMetricSource_To_v1_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *ObjectMetricSource, s conversion.Scope) error { + return autoConvert_autoscaling_ObjectMetricSource_To_v1_ObjectMetricSource(in, out, s) +} + +func autoConvert_v1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error { + if err := Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil { + return err + } + out.MetricName = in.MetricName + out.CurrentValue = in.CurrentValue + return nil +} + +func Convert_v1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error { + return autoConvert_v1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in, out, s) +} + +func autoConvert_autoscaling_ObjectMetricStatus_To_v1_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *ObjectMetricStatus, s conversion.Scope) error { + if err := Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil { + return err + } + out.MetricName = in.MetricName + out.CurrentValue = in.CurrentValue + return nil +} + +func Convert_autoscaling_ObjectMetricStatus_To_v1_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *ObjectMetricStatus, s conversion.Scope) error { + return autoConvert_autoscaling_ObjectMetricStatus_To_v1_ObjectMetricStatus(in, out, s) +} + +func autoConvert_v1_PodsMetricSource_To_autoscaling_PodsMetricSource(in *PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error { + out.MetricName = in.MetricName + out.TargetAverageValue = in.TargetAverageValue + return nil +} + +func Convert_v1_PodsMetricSource_To_autoscaling_PodsMetricSource(in *PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error { + return autoConvert_v1_PodsMetricSource_To_autoscaling_PodsMetricSource(in, out, s) +} + +func autoConvert_autoscaling_PodsMetricSource_To_v1_PodsMetricSource(in *autoscaling.PodsMetricSource, out *PodsMetricSource, s conversion.Scope) error { + out.MetricName = in.MetricName + out.TargetAverageValue = in.TargetAverageValue + return nil +} + +func Convert_autoscaling_PodsMetricSource_To_v1_PodsMetricSource(in *autoscaling.PodsMetricSource, out *PodsMetricSource, s conversion.Scope) error { + return autoConvert_autoscaling_PodsMetricSource_To_v1_PodsMetricSource(in, out, s) +} + +func autoConvert_v1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error { + out.MetricName = in.MetricName + out.CurrentAverageValue = in.CurrentAverageValue + return nil +} + +func Convert_v1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error { + return autoConvert_v1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in, out, s) +} + +func autoConvert_autoscaling_PodsMetricStatus_To_v1_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *PodsMetricStatus, s conversion.Scope) error { + out.MetricName = in.MetricName + out.CurrentAverageValue = in.CurrentAverageValue + return nil +} + +func Convert_autoscaling_PodsMetricStatus_To_v1_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *PodsMetricStatus, s conversion.Scope) error { + return autoConvert_autoscaling_PodsMetricStatus_To_v1_PodsMetricStatus(in, out, s) +} + +func autoConvert_v1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error { + out.Name = api.ResourceName(in.Name) + out.TargetAverageUtilization = (*int32)(unsafe.Pointer(in.TargetAverageUtilization)) + out.TargetAverageValue = (*resource.Quantity)(unsafe.Pointer(in.TargetAverageValue)) + return nil +} + +func Convert_v1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error { + return autoConvert_v1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in, out, s) +} + +func autoConvert_autoscaling_ResourceMetricSource_To_v1_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *ResourceMetricSource, s conversion.Scope) error { + out.Name = api_v1.ResourceName(in.Name) + out.TargetAverageUtilization = (*int32)(unsafe.Pointer(in.TargetAverageUtilization)) + out.TargetAverageValue = (*resource.Quantity)(unsafe.Pointer(in.TargetAverageValue)) + return nil +} + +func Convert_autoscaling_ResourceMetricSource_To_v1_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *ResourceMetricSource, s conversion.Scope) error { + return autoConvert_autoscaling_ResourceMetricSource_To_v1_ResourceMetricSource(in, out, s) +} + +func autoConvert_v1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error { + out.Name = api.ResourceName(in.Name) + out.CurrentAverageUtilization = (*int32)(unsafe.Pointer(in.CurrentAverageUtilization)) + out.CurrentAverageValue = in.CurrentAverageValue + return nil +} + +func Convert_v1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error { + return autoConvert_v1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in, out, s) +} + +func autoConvert_autoscaling_ResourceMetricStatus_To_v1_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *ResourceMetricStatus, s conversion.Scope) error { + out.Name = api_v1.ResourceName(in.Name) + out.CurrentAverageUtilization = (*int32)(unsafe.Pointer(in.CurrentAverageUtilization)) + out.CurrentAverageValue = in.CurrentAverageValue + return nil +} + +func Convert_autoscaling_ResourceMetricStatus_To_v1_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *ResourceMetricStatus, s conversion.Scope) error { + return autoConvert_autoscaling_ResourceMetricStatus_To_v1_ResourceMetricStatus(in, out, s) +} + +func autoConvert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s conversion.Scope) error { + return autoConvert_v1_Scale_To_autoscaling_Scale(in, out, s) +} + +func autoConvert_autoscaling_Scale_To_v1_Scale(in *autoscaling.Scale, out *Scale, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_autoscaling_Scale_To_v1_Scale(in *autoscaling.Scale, out *Scale, s conversion.Scope) error { + return autoConvert_autoscaling_Scale_To_v1_Scale(in, out, s) +} + +func autoConvert_v1_ScaleSpec_To_autoscaling_ScaleSpec(in *ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error { + out.Replicas = in.Replicas + return nil +} + +func Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec(in *ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error { + return autoConvert_v1_ScaleSpec_To_autoscaling_ScaleSpec(in, out, s) +} + +func autoConvert_autoscaling_ScaleSpec_To_v1_ScaleSpec(in *autoscaling.ScaleSpec, out *ScaleSpec, s conversion.Scope) error { + out.Replicas = in.Replicas + return nil +} + +func Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec(in *autoscaling.ScaleSpec, out *ScaleSpec, s conversion.Scope) error { + return autoConvert_autoscaling_ScaleSpec_To_v1_ScaleSpec(in, out, s) +} + +func autoConvert_v1_ScaleStatus_To_autoscaling_ScaleStatus(in *ScaleStatus, out *autoscaling.ScaleStatus, s conversion.Scope) error { + out.Replicas = in.Replicas + out.Selector = in.Selector + return nil +} + +func Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus(in *ScaleStatus, out *autoscaling.ScaleStatus, s conversion.Scope) error { + return autoConvert_v1_ScaleStatus_To_autoscaling_ScaleStatus(in, out, s) +} + +func autoConvert_autoscaling_ScaleStatus_To_v1_ScaleStatus(in *autoscaling.ScaleStatus, out *ScaleStatus, s conversion.Scope) error { + out.Replicas = in.Replicas + out.Selector = in.Selector + return nil +} + +func Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus(in *autoscaling.ScaleStatus, out *ScaleStatus, s conversion.Scope) error { + return autoConvert_autoscaling_ScaleStatus_To_v1_ScaleStatus(in, out, s) +} diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..07047c2b0 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go @@ -0,0 +1,312 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1 + +import ( + resource "k8s.io/apimachinery/pkg/api/resource" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_MetricSpec, InType: reflect.TypeOf(&MetricSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_MetricStatus, InType: reflect.TypeOf(&MetricStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectMetricSource, InType: reflect.TypeOf(&ObjectMetricSource{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectMetricStatus, InType: reflect.TypeOf(&ObjectMetricStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodsMetricSource, InType: reflect.TypeOf(&PodsMetricSource{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodsMetricStatus, InType: reflect.TypeOf(&PodsMetricStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceMetricSource, InType: reflect.TypeOf(&ResourceMetricSource{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceMetricStatus, InType: reflect.TypeOf(&ResourceMetricStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Scale, InType: reflect.TypeOf(&Scale{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})}, + ) +} + +func DeepCopy_v1_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CrossVersionObjectReference) + out := out.(*CrossVersionObjectReference) + *out = *in + return nil + } +} + +func DeepCopy_v1_HorizontalPodAutoscaler(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*HorizontalPodAutoscaler) + out := out.(*HorizontalPodAutoscaler) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) + } + if err := DeepCopy_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + if err := DeepCopy_v1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1_HorizontalPodAutoscalerList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*HorizontalPodAutoscalerList) + out := out.(*HorizontalPodAutoscalerList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]HorizontalPodAutoscaler, len(*in)) + for i := range *in { + if err := DeepCopy_v1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1_HorizontalPodAutoscalerSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*HorizontalPodAutoscalerSpec) + out := out.(*HorizontalPodAutoscalerSpec) + *out = *in + if in.MinReplicas != nil { + in, out := &in.MinReplicas, &out.MinReplicas + *out = new(int32) + **out = **in + } + if in.TargetCPUUtilizationPercentage != nil { + in, out := &in.TargetCPUUtilizationPercentage, &out.TargetCPUUtilizationPercentage + *out = new(int32) + **out = **in + } + return nil + } +} + +func DeepCopy_v1_HorizontalPodAutoscalerStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*HorizontalPodAutoscalerStatus) + out := out.(*HorizontalPodAutoscalerStatus) + *out = *in + if in.ObservedGeneration != nil { + in, out := &in.ObservedGeneration, &out.ObservedGeneration + *out = new(int64) + **out = **in + } + if in.LastScaleTime != nil { + in, out := &in.LastScaleTime, &out.LastScaleTime + *out = new(meta_v1.Time) + **out = (*in).DeepCopy() + } + if in.CurrentCPUUtilizationPercentage != nil { + in, out := &in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage + *out = new(int32) + **out = **in + } + return nil + } +} + +func DeepCopy_v1_MetricSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*MetricSpec) + out := out.(*MetricSpec) + *out = *in + if in.Object != nil { + in, out := &in.Object, &out.Object + *out = new(ObjectMetricSource) + if err := DeepCopy_v1_ObjectMetricSource(*in, *out, c); err != nil { + return err + } + } + if in.Pods != nil { + in, out := &in.Pods, &out.Pods + *out = new(PodsMetricSource) + if err := DeepCopy_v1_PodsMetricSource(*in, *out, c); err != nil { + return err + } + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ResourceMetricSource) + if err := DeepCopy_v1_ResourceMetricSource(*in, *out, c); err != nil { + return err + } + } + return nil + } +} + +func DeepCopy_v1_MetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*MetricStatus) + out := out.(*MetricStatus) + *out = *in + if in.Object != nil { + in, out := &in.Object, &out.Object + *out = new(ObjectMetricStatus) + if err := DeepCopy_v1_ObjectMetricStatus(*in, *out, c); err != nil { + return err + } + } + if in.Pods != nil { + in, out := &in.Pods, &out.Pods + *out = new(PodsMetricStatus) + if err := DeepCopy_v1_PodsMetricStatus(*in, *out, c); err != nil { + return err + } + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ResourceMetricStatus) + if err := DeepCopy_v1_ResourceMetricStatus(*in, *out, c); err != nil { + return err + } + } + return nil + } +} + +func DeepCopy_v1_ObjectMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ObjectMetricSource) + out := out.(*ObjectMetricSource) + *out = *in + out.TargetValue = in.TargetValue.DeepCopy() + return nil + } +} + +func DeepCopy_v1_ObjectMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ObjectMetricStatus) + out := out.(*ObjectMetricStatus) + *out = *in + out.CurrentValue = in.CurrentValue.DeepCopy() + return nil + } +} + +func DeepCopy_v1_PodsMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodsMetricSource) + out := out.(*PodsMetricSource) + *out = *in + out.TargetAverageValue = in.TargetAverageValue.DeepCopy() + return nil + } +} + +func DeepCopy_v1_PodsMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodsMetricStatus) + out := out.(*PodsMetricStatus) + *out = *in + out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy() + return nil + } +} + +func DeepCopy_v1_ResourceMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ResourceMetricSource) + out := out.(*ResourceMetricSource) + *out = *in + if in.TargetAverageUtilization != nil { + in, out := &in.TargetAverageUtilization, &out.TargetAverageUtilization + *out = new(int32) + **out = **in + } + if in.TargetAverageValue != nil { + in, out := &in.TargetAverageValue, &out.TargetAverageValue + *out = new(resource.Quantity) + **out = (*in).DeepCopy() + } + return nil + } +} + +func DeepCopy_v1_ResourceMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ResourceMetricStatus) + out := out.(*ResourceMetricStatus) + *out = *in + if in.CurrentAverageUtilization != nil { + in, out := &in.CurrentAverageUtilization, &out.CurrentAverageUtilization + *out = new(int32) + **out = **in + } + out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy() + return nil + } +} + +func DeepCopy_v1_Scale(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Scale) + out := out.(*Scale) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) + } + return nil + } +} + +func DeepCopy_v1_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ScaleSpec) + out := out.(*ScaleSpec) + *out = *in + return nil + } +} + +func DeepCopy_v1_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ScaleStatus) + out := out.(*ScaleStatus) + *out = *in + return nil + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.defaults.go new file mode 100644 index 000000000..af20e9884 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.defaults.go @@ -0,0 +1,47 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&HorizontalPodAutoscaler{}, func(obj interface{}) { SetObjectDefaults_HorizontalPodAutoscaler(obj.(*HorizontalPodAutoscaler)) }) + scheme.AddTypeDefaultingFunc(&HorizontalPodAutoscalerList{}, func(obj interface{}) { + SetObjectDefaults_HorizontalPodAutoscalerList(obj.(*HorizontalPodAutoscalerList)) + }) + return nil +} + +func SetObjectDefaults_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler) { + SetDefaults_HorizontalPodAutoscaler(in) +} + +func SetObjectDefaults_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_HorizontalPodAutoscaler(a) + } +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/defaults.go similarity index 51% rename from vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/defaults.go rename to vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/defaults.go index a9bb781ab..6cc60d298 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/defaults.go +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/defaults.go @@ -14,33 +14,36 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v2alpha1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/pkg/apis/autoscaling" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { return scheme.AddDefaultingFuncs( - SetDefaults_PetSet, + SetDefaults_HorizontalPodAutoscaler, ) } -func SetDefaults_PetSet(obj *PetSet) { - labels := obj.Spec.Template.Labels - if labels != nil { - if obj.Spec.Selector == nil { - obj.Spec.Selector = &unversioned.LabelSelector{ - MatchLabels: labels, - } - } - if len(obj.Labels) == 0 { - obj.Labels = labels - } +func SetDefaults_HorizontalPodAutoscaler(obj *HorizontalPodAutoscaler) { + if obj.Spec.MinReplicas == nil { + minReplicas := int32(1) + obj.Spec.MinReplicas = &minReplicas } - if obj.Spec.Replicas == nil { - obj.Spec.Replicas = new(int32) - *obj.Spec.Replicas = 1 + + if len(obj.Spec.Metrics) == 0 { + utilizationDefaultVal := int32(autoscaling.DefaultCPUUtilization) + obj.Spec.Metrics = []MetricSpec{ + { + Type: ResourceMetricSourceType, + Resource: &ResourceMetricSource{ + Name: v1.ResourceCPU, + TargetAverageUtilization: &utilizationDefaultVal, + }, + }, + } } } diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/doc.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/doc.go new file mode 100644 index 000000000..a9fe60b1c --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2alpha1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.pb.go similarity index 52% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/generated.pb.go rename to vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.pb.go index c395bb5f5..69e71edd9 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1/generated.pb.go +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,29 +15,29 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto +// source: k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.proto // DO NOT EDIT! /* Package v2alpha1 is a generated protocol buffer package. It is generated from these files: - k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto + k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.proto It has these top-level messages: - Job - JobCondition - JobList - JobSpec - JobStatus - JobTemplate - JobTemplateSpec - LabelSelector - LabelSelectorRequirement - ScheduledJob - ScheduledJobList - ScheduledJobSpec - ScheduledJobStatus + CrossVersionObjectReference + HorizontalPodAutoscaler + HorizontalPodAutoscalerList + HorizontalPodAutoscalerSpec + HorizontalPodAutoscalerStatus + MetricSpec + MetricStatus + ObjectMetricSource + ObjectMetricStatus + PodsMetricSource + PodsMetricStatus + ResourceMetricSource + ResourceMetricStatus */ package v2alpha1 @@ -45,12 +45,13 @@ import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" -import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/1.5/pkg/api/v1" +import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource" +import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1" import strings "strings" import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" @@ -63,76 +64,82 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. const _ = proto.GoGoProtoPackageIsVersion1 -func (m *Job) Reset() { *m = Job{} } -func (*Job) ProtoMessage() {} -func (*Job) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } - -func (m *JobCondition) Reset() { *m = JobCondition{} } -func (*JobCondition) ProtoMessage() {} -func (*JobCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } - -func (m *JobList) Reset() { *m = JobList{} } -func (*JobList) ProtoMessage() {} -func (*JobList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } - -func (m *JobSpec) Reset() { *m = JobSpec{} } -func (*JobSpec) ProtoMessage() {} -func (*JobSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } - -func (m *JobStatus) Reset() { *m = JobStatus{} } -func (*JobStatus) ProtoMessage() {} -func (*JobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } - -func (m *JobTemplate) Reset() { *m = JobTemplate{} } -func (*JobTemplate) ProtoMessage() {} -func (*JobTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } - -func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} } -func (*JobTemplateSpec) ProtoMessage() {} -func (*JobTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } - -func (m *LabelSelector) Reset() { *m = LabelSelector{} } -func (*LabelSelector) ProtoMessage() {} -func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } - -func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } -func (*LabelSelectorRequirement) ProtoMessage() {} -func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{8} +func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } +func (*CrossVersionObjectReference) ProtoMessage() {} +func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{0} } -func (m *ScheduledJob) Reset() { *m = ScheduledJob{} } -func (*ScheduledJob) ProtoMessage() {} -func (*ScheduledJob) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } +func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } +func (*HorizontalPodAutoscaler) ProtoMessage() {} +func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } -func (m *ScheduledJobList) Reset() { *m = ScheduledJobList{} } -func (*ScheduledJobList) ProtoMessage() {} -func (*ScheduledJobList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } +func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } +func (*HorizontalPodAutoscalerList) ProtoMessage() {} +func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{2} +} -func (m *ScheduledJobSpec) Reset() { *m = ScheduledJobSpec{} } -func (*ScheduledJobSpec) ProtoMessage() {} -func (*ScheduledJobSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } +func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } +func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} +func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{3} +} -func (m *ScheduledJobStatus) Reset() { *m = ScheduledJobStatus{} } -func (*ScheduledJobStatus) ProtoMessage() {} -func (*ScheduledJobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } +func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } +func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} +func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{4} +} + +func (m *MetricSpec) Reset() { *m = MetricSpec{} } +func (*MetricSpec) ProtoMessage() {} +func (*MetricSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + +func (m *MetricStatus) Reset() { *m = MetricStatus{} } +func (*MetricStatus) ProtoMessage() {} +func (*MetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } + +func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } +func (*ObjectMetricSource) ProtoMessage() {} +func (*ObjectMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } + +func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } +func (*ObjectMetricStatus) ProtoMessage() {} +func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } + +func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } +func (*PodsMetricSource) ProtoMessage() {} +func (*PodsMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } + +func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } +func (*PodsMetricStatus) ProtoMessage() {} +func (*PodsMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } + +func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } +func (*ResourceMetricSource) ProtoMessage() {} +func (*ResourceMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } + +func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } +func (*ResourceMetricStatus) ProtoMessage() {} +func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } func init() { - proto.RegisterType((*Job)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v2alpha1.Job") - proto.RegisterType((*JobCondition)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v2alpha1.JobCondition") - proto.RegisterType((*JobList)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v2alpha1.JobList") - proto.RegisterType((*JobSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v2alpha1.JobSpec") - proto.RegisterType((*JobStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v2alpha1.JobStatus") - proto.RegisterType((*JobTemplate)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v2alpha1.JobTemplate") - proto.RegisterType((*JobTemplateSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v2alpha1.JobTemplateSpec") - proto.RegisterType((*LabelSelector)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v2alpha1.LabelSelector") - proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v2alpha1.LabelSelectorRequirement") - proto.RegisterType((*ScheduledJob)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v2alpha1.ScheduledJob") - proto.RegisterType((*ScheduledJobList)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v2alpha1.ScheduledJobList") - proto.RegisterType((*ScheduledJobSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v2alpha1.ScheduledJobSpec") - proto.RegisterType((*ScheduledJobStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v2alpha1.ScheduledJobStatus") + proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.CrossVersionObjectReference") + proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscaler") + proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerList") + proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerSpec") + proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerStatus") + proto.RegisterType((*MetricSpec)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.MetricSpec") + proto.RegisterType((*MetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.MetricStatus") + proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.ObjectMetricSource") + proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.ObjectMetricStatus") + proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.PodsMetricSource") + proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.PodsMetricStatus") + proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.ResourceMetricSource") + proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.ResourceMetricStatus") } -func (m *Job) Marshal() (data []byte, err error) { +func (m *CrossVersionObjectReference) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -142,7 +149,37 @@ func (m *Job) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Job) MarshalTo(data []byte) (int, error) { +func (m *CrossVersionObjectReference) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) + i += copy(data[i:], m.Kind) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.APIVersion))) + i += copy(data[i:], m.APIVersion) + return i, nil +} + +func (m *HorizontalPodAutoscaler) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *HorizontalPodAutoscaler) MarshalTo(data []byte) (int, error) { var i int _ = i var l int @@ -174,7 +211,7 @@ func (m *Job) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *JobCondition) Marshal() (data []byte, err error) { +func (m *HorizontalPodAutoscalerList) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -184,7 +221,142 @@ func (m *JobCondition) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *JobCondition) MarshalTo(data []byte) (int, error) { +func (m *HorizontalPodAutoscalerList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n4, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *HorizontalPodAutoscalerSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *HorizontalPodAutoscalerSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ScaleTargetRef.Size())) + n5, err := m.ScaleTargetRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + if m.MinReplicas != nil { + data[i] = 0x10 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.MinReplicas)) + } + data[i] = 0x18 + i++ + i = encodeVarintGenerated(data, i, uint64(m.MaxReplicas)) + if len(m.Metrics) > 0 { + for _, msg := range m.Metrics { + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *HorizontalPodAutoscalerStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *HorizontalPodAutoscalerStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ObservedGeneration != nil { + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.ObservedGeneration)) + } + if m.LastScaleTime != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastScaleTime.Size())) + n6, err := m.LastScaleTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + } + data[i] = 0x18 + i++ + i = encodeVarintGenerated(data, i, uint64(m.CurrentReplicas)) + data[i] = 0x20 + i++ + i = encodeVarintGenerated(data, i, uint64(m.DesiredReplicas)) + if len(m.CurrentMetrics) > 0 { + for _, msg := range m.CurrentMetrics { + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *MetricSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *MetricSpec) MarshalTo(data []byte) (int, error) { var i int _ = i var l int @@ -193,196 +365,92 @@ func (m *JobCondition) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintGenerated(data, i, uint64(len(m.Type))) i += copy(data[i:], m.Type) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Status))) - i += copy(data[i:], m.Status) - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(m.LastProbeTime.Size())) - n4, err := m.LastProbeTime.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) - n5, err := m.LastTransitionTime.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - data[i] = 0x2a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) - i += copy(data[i:], m.Reason) - data[i] = 0x32 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Message))) - i += copy(data[i:], m.Message) - return i, nil -} - -func (m *JobList) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *JobList) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n6, err := m.ListMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n6 - if len(m.Items) > 0 { - for _, msg := range m.Items { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *JobSpec) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *JobSpec) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Parallelism != nil { - data[i] = 0x8 + if m.Object != nil { + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(*m.Parallelism)) - } - if m.Completions != nil { - data[i] = 0x10 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.Completions)) - } - if m.ActiveDeadlineSeconds != nil { - data[i] = 0x18 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.ActiveDeadlineSeconds)) - } - if m.Selector != nil { - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Selector.Size())) - n7, err := m.Selector.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Object.Size())) + n7, err := m.Object.MarshalTo(data[i:]) if err != nil { return 0, err } i += n7 } - if m.ManualSelector != nil { - data[i] = 0x28 + if m.Pods != nil { + data[i] = 0x1a i++ - if *m.ManualSelector { - data[i] = 1 - } else { - data[i] = 0 + i = encodeVarintGenerated(data, i, uint64(m.Pods.Size())) + n8, err := m.Pods.MarshalTo(data[i:]) + if err != nil { + return 0, err } + i += n8 + } + if m.Resource != nil { + data[i] = 0x22 i++ - } - data[i] = 0x32 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) - n8, err := m.Template.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n8 - return i, nil -} - -func (m *JobStatus) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *JobStatus) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Conditions) > 0 { - for _, msg := range m.Conditions { - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.StartTime != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.StartTime.Size())) - n9, err := m.StartTime.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Resource.Size())) + n9, err := m.Resource.MarshalTo(data[i:]) if err != nil { return 0, err } i += n9 } - if m.CompletionTime != nil { - data[i] = 0x1a + return i, nil +} + +func (m *MetricStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *MetricStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + if m.Object != nil { + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.CompletionTime.Size())) - n10, err := m.CompletionTime.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Object.Size())) + n10, err := m.Object.MarshalTo(data[i:]) if err != nil { return 0, err } i += n10 } - data[i] = 0x20 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Active)) - data[i] = 0x28 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Succeeded)) - data[i] = 0x30 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Failed)) + if m.Pods != nil { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Pods.Size())) + n11, err := m.Pods.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.Resource != nil { + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Resource.Size())) + n12, err := m.Resource.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n12 + } return i, nil } -func (m *JobTemplate) Marshal() (data []byte, err error) { +func (m *ObjectMetricSource) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -392,57 +460,27 @@ func (m *JobTemplate) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *JobTemplate) MarshalTo(data []byte) (int, error) { +func (m *ObjectMetricSource) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l data[i] = 0xa i++ - i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n11, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n11 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) - n12, err := m.Template.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n12 - return i, nil -} - -func (m *JobTemplateSpec) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *JobTemplateSpec) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n13, err := m.ObjectMeta.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Target.Size())) + n13, err := m.Target.MarshalTo(data[i:]) if err != nil { return 0, err } i += n13 data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n14, err := m.Spec.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(len(m.MetricName))) + i += copy(data[i:], m.MetricName) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.TargetValue.Size())) + n14, err := m.TargetValue.MarshalTo(data[i:]) if err != nil { return 0, err } @@ -450,7 +488,7 @@ func (m *JobTemplateSpec) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *LabelSelector) Marshal() (data []byte, err error) { +func (m *ObjectMetricStatus) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -460,119 +498,57 @@ func (m *LabelSelector) Marshal() (data []byte, err error) { 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) { +func (m *ObjectMetricStatus) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l data[i] = 0xa i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Key))) - i += copy(data[i:], m.Key) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Operator))) - i += copy(data[i:], m.Operator) - if len(m.Values) > 0 { - for _, s := range m.Values { - data[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - return i, nil -} - -func (m *ScheduledJob) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ScheduledJob) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n15, err := m.ObjectMeta.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Target.Size())) + n15, err := m.Target.MarshalTo(data[i:]) if err != nil { return 0, err } i += n15 data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n16, err := m.Spec.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(len(m.MetricName))) + i += copy(data[i:], m.MetricName) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.CurrentValue.Size())) + n16, err := m.CurrentValue.MarshalTo(data[i:]) if err != nil { return 0, err } i += n16 - data[i] = 0x1a + return i, nil +} + +func (m *PodsMetricSource) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodsMetricSource) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n17, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(len(m.MetricName))) + i += copy(data[i:], m.MetricName) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.TargetAverageValue.Size())) + n17, err := m.TargetAverageValue.MarshalTo(data[i:]) if err != nil { return 0, err } @@ -580,7 +556,7 @@ func (m *ScheduledJob) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *ScheduledJobList) Marshal() (data []byte, err error) { +func (m *PodsMetricStatus) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -590,35 +566,27 @@ func (m *ScheduledJobList) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *ScheduledJobList) MarshalTo(data []byte) (int, error) { +func (m *PodsMetricStatus) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l data[i] = 0xa i++ - i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n18, err := m.ListMeta.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(len(m.MetricName))) + i += copy(data[i:], m.MetricName) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.CurrentAverageValue.Size())) + n18, err := m.CurrentAverageValue.MarshalTo(data[i:]) if err != nil { return 0, err } i += n18 - if len(m.Items) > 0 { - for _, msg := range m.Items { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } return i, nil } -func (m *ScheduledJobSpec) Marshal() (data []byte, err error) { +func (m *ResourceMetricSource) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -628,46 +596,34 @@ func (m *ScheduledJobSpec) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *ScheduledJobSpec) MarshalTo(data []byte) (int, error) { +func (m *ResourceMetricSource) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l data[i] = 0xa i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Schedule))) - i += copy(data[i:], m.Schedule) - if m.StartingDeadlineSeconds != nil { + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + if m.TargetAverageUtilization != nil { data[i] = 0x10 i++ - i = encodeVarintGenerated(data, i, uint64(*m.StartingDeadlineSeconds)) + i = encodeVarintGenerated(data, i, uint64(*m.TargetAverageUtilization)) } - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.ConcurrencyPolicy))) - i += copy(data[i:], m.ConcurrencyPolicy) - if m.Suspend != nil { - data[i] = 0x20 + if m.TargetAverageValue != nil { + data[i] = 0x1a i++ - if *m.Suspend { - data[i] = 1 - } else { - data[i] = 0 + i = encodeVarintGenerated(data, i, uint64(m.TargetAverageValue.Size())) + n19, err := m.TargetAverageValue.MarshalTo(data[i:]) + if err != nil { + return 0, err } - i++ + i += n19 } - data[i] = 0x2a - i++ - i = encodeVarintGenerated(data, i, uint64(m.JobTemplate.Size())) - n19, err := m.JobTemplate.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n19 return i, nil } -func (m *ScheduledJobStatus) Marshal() (data []byte, err error) { +func (m *ResourceMetricStatus) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -677,33 +633,28 @@ func (m *ScheduledJobStatus) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *ScheduledJobStatus) MarshalTo(data []byte) (int, error) { +func (m *ResourceMetricStatus) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.Active) > 0 { - for _, msg := range m.Active { - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.LastScheduleTime != nil { - data[i] = 0x22 + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + if m.CurrentAverageUtilization != nil { + data[i] = 0x10 i++ - i = encodeVarintGenerated(data, i, uint64(m.LastScheduleTime.Size())) - n20, err := m.LastScheduleTime.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n20 + i = encodeVarintGenerated(data, i, uint64(*m.CurrentAverageUtilization)) } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.CurrentAverageValue.Size())) + n20, err := m.CurrentAverageValue.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n20 return i, nil } @@ -734,7 +685,19 @@ func encodeVarintGenerated(data []byte, offset int, v uint64) int { data[offset] = uint8(v) return offset + 1 } -func (m *Job) Size() (n int) { +func (m *CrossVersionObjectReference) Size() (n int) { + var l int + _ = l + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.APIVersion) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *HorizontalPodAutoscaler) Size() (n int) { var l int _ = l l = m.ObjectMeta.Size() @@ -746,198 +709,168 @@ func (m *Job) Size() (n int) { return n } -func (m *JobCondition) Size() (n int) { +func (m *HorizontalPodAutoscalerList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *HorizontalPodAutoscalerSpec) Size() (n int) { + var l int + _ = l + l = m.ScaleTargetRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.MinReplicas != nil { + n += 1 + sovGenerated(uint64(*m.MinReplicas)) + } + n += 1 + sovGenerated(uint64(m.MaxReplicas)) + if len(m.Metrics) > 0 { + for _, e := range m.Metrics { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *HorizontalPodAutoscalerStatus) Size() (n int) { + var l int + _ = l + if m.ObservedGeneration != nil { + n += 1 + sovGenerated(uint64(*m.ObservedGeneration)) + } + if m.LastScaleTime != nil { + l = m.LastScaleTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + n += 1 + sovGenerated(uint64(m.CurrentReplicas)) + n += 1 + sovGenerated(uint64(m.DesiredReplicas)) + if len(m.CurrentMetrics) > 0 { + for _, e := range m.CurrentMetrics { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *MetricSpec) Size() (n int) { var l int _ = l l = len(m.Type) n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastProbeTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastTransitionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *JobList) Size() (n int) { - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *JobSpec) Size() (n int) { - var l int - _ = l - if m.Parallelism != nil { - n += 1 + sovGenerated(uint64(*m.Parallelism)) - } - if m.Completions != nil { - n += 1 + sovGenerated(uint64(*m.Completions)) - } - if m.ActiveDeadlineSeconds != nil { - n += 1 + sovGenerated(uint64(*m.ActiveDeadlineSeconds)) - } - if m.Selector != nil { - l = m.Selector.Size() + if m.Object != nil { + l = m.Object.Size() n += 1 + l + sovGenerated(uint64(l)) } - if m.ManualSelector != nil { - n += 2 - } - l = m.Template.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *JobStatus) Size() (n int) { - var l int - _ = l - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.StartTime != nil { - l = m.StartTime.Size() + if m.Pods != nil { + l = m.Pods.Size() n += 1 + l + sovGenerated(uint64(l)) } - if m.CompletionTime != nil { - l = m.CompletionTime.Size() + if m.Resource != nil { + l = m.Resource.Size() n += 1 + l + sovGenerated(uint64(l)) } - n += 1 + sovGenerated(uint64(m.Active)) - n += 1 + sovGenerated(uint64(m.Succeeded)) - n += 1 + sovGenerated(uint64(m.Failed)) return n } -func (m *JobTemplate) Size() (n int) { +func (m *MetricStatus) Size() (n int) { var l int _ = l - l = m.ObjectMeta.Size() + l = len(m.Type) n += 1 + l + sovGenerated(uint64(l)) - l = m.Template.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *JobTemplateSpec) Size() (n int) { - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *LabelSelector) Size() (n int) { - var l int - _ = l - if len(m.MatchLabels) > 0 { - for k, v := range m.MatchLabels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.MatchExpressions) > 0 { - for _, e := range m.MatchExpressions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *LabelSelectorRequirement) Size() (n int) { - var l int - _ = l - l = len(m.Key) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Operator) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Values) > 0 { - for _, s := range m.Values { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ScheduledJob) Size() (n int) { - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ScheduledJobList) Size() (n int) { - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ScheduledJobSpec) Size() (n int) { - var l int - _ = l - l = len(m.Schedule) - n += 1 + l + sovGenerated(uint64(l)) - if m.StartingDeadlineSeconds != nil { - n += 1 + sovGenerated(uint64(*m.StartingDeadlineSeconds)) - } - l = len(m.ConcurrencyPolicy) - n += 1 + l + sovGenerated(uint64(l)) - if m.Suspend != nil { - n += 2 - } - l = m.JobTemplate.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ScheduledJobStatus) Size() (n int) { - var l int - _ = l - if len(m.Active) > 0 { - for _, e := range m.Active { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.LastScheduleTime != nil { - l = m.LastScheduleTime.Size() + if m.Object != nil { + l = m.Object.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.Pods != nil { + l = m.Pods.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Resource != nil { + l = m.Resource.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ObjectMetricSource) Size() (n int) { + var l int + _ = l + l = m.Target.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.MetricName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.TargetValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ObjectMetricStatus) Size() (n int) { + var l int + _ = l + l = m.Target.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.MetricName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.CurrentValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *PodsMetricSource) Size() (n int) { + var l int + _ = l + l = len(m.MetricName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.TargetAverageValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *PodsMetricStatus) Size() (n int) { + var l int + _ = l + l = len(m.MetricName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.CurrentAverageValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceMetricSource) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if m.TargetAverageUtilization != nil { + n += 1 + sovGenerated(uint64(*m.TargetAverageUtilization)) + } + if m.TargetAverageValue != nil { + l = m.TargetAverageValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ResourceMetricStatus) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if m.CurrentAverageUtilization != nil { + n += 1 + sovGenerated(uint64(*m.CurrentAverageUtilization)) + } + l = m.CurrentAverageValue.Size() + n += 1 + l + sovGenerated(uint64(l)) return n } @@ -954,173 +887,160 @@ func sovGenerated(x uint64) (n int) { func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *Job) String() string { +func (this *CrossVersionObjectReference) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Job{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "JobStatus", "JobStatus", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&CrossVersionObjectReference{`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, `}`, }, "") return s } -func (this *JobCondition) String() string { +func (this *HorizontalPodAutoscaler) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&JobCondition{`, + s := strings.Join([]string{`&HorizontalPodAutoscaler{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *HorizontalPodAutoscalerList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HorizontalPodAutoscalerList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *HorizontalPodAutoscalerSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HorizontalPodAutoscalerSpec{`, + `ScaleTargetRef:` + strings.Replace(strings.Replace(this.ScaleTargetRef.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`, + `MinReplicas:` + valueToStringGenerated(this.MinReplicas) + `,`, + `MaxReplicas:` + fmt.Sprintf("%v", this.MaxReplicas) + `,`, + `Metrics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Metrics), "MetricSpec", "MetricSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *HorizontalPodAutoscalerStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HorizontalPodAutoscalerStatus{`, + `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`, + `LastScaleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScaleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`, + `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`, + `DesiredReplicas:` + fmt.Sprintf("%v", this.DesiredReplicas) + `,`, + `CurrentMetrics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CurrentMetrics), "MetricStatus", "MetricStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *MetricSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MetricSpec{`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastProbeTime:` + strings.Replace(strings.Replace(this.LastProbeTime.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricSource", "ObjectMetricSource", 1) + `,`, + `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricSource", "PodsMetricSource", 1) + `,`, + `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricSource", "ResourceMetricSource", 1) + `,`, `}`, }, "") return s } -func (this *JobList) String() string { +func (this *MetricStatus) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&JobList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Job", "Job", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&MetricStatus{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricStatus", "ObjectMetricStatus", 1) + `,`, + `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricStatus", "PodsMetricStatus", 1) + `,`, + `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricStatus", "ResourceMetricStatus", 1) + `,`, `}`, }, "") return s } -func (this *JobSpec) String() string { +func (this *ObjectMetricSource) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&JobSpec{`, - `Parallelism:` + valueToStringGenerated(this.Parallelism) + `,`, - `Completions:` + valueToStringGenerated(this.Completions) + `,`, - `ActiveDeadlineSeconds:` + valueToStringGenerated(this.ActiveDeadlineSeconds) + `,`, - `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "LabelSelector", 1) + `,`, - `ManualSelector:` + valueToStringGenerated(this.ManualSelector) + `,`, - `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&ObjectMetricSource{`, + `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`, + `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`, + `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *JobStatus) String() string { +func (this *ObjectMetricStatus) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&JobStatus{`, - `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "JobCondition", "JobCondition", 1), `&`, ``, 1) + `,`, - `StartTime:` + strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1) + `,`, - `CompletionTime:` + strings.Replace(fmt.Sprintf("%v", this.CompletionTime), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1) + `,`, - `Active:` + fmt.Sprintf("%v", this.Active) + `,`, - `Succeeded:` + fmt.Sprintf("%v", this.Succeeded) + `,`, - `Failed:` + fmt.Sprintf("%v", this.Failed) + `,`, + s := strings.Join([]string{`&ObjectMetricStatus{`, + `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`, + `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`, + `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *JobTemplate) String() string { +func (this *PodsMetricSource) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&JobTemplate{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Template:` + strings.Replace(strings.Replace(this.Template.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&PodsMetricSource{`, + `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`, + `TargetAverageValue:` + strings.Replace(strings.Replace(this.TargetAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *JobTemplateSpec) String() string { +func (this *PodsMetricStatus) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&JobTemplateSpec{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&PodsMetricStatus{`, + `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`, + `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *LabelSelector) String() string { +func (this *ResourceMetricSource) String() string { if this == nil { return "nil" } - keysForMatchLabels := make([]string, 0, len(this.MatchLabels)) - for k := range this.MatchLabels { - keysForMatchLabels = append(keysForMatchLabels, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMatchLabels) - mapStringForMatchLabels := "map[string]string{" - for _, k := range keysForMatchLabels { - mapStringForMatchLabels += fmt.Sprintf("%v: %v,", k, this.MatchLabels[k]) - } - mapStringForMatchLabels += "}" - s := strings.Join([]string{`&LabelSelector{`, - `MatchLabels:` + mapStringForMatchLabels + `,`, - `MatchExpressions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MatchExpressions), "LabelSelectorRequirement", "LabelSelectorRequirement", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&ResourceMetricSource{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `TargetAverageUtilization:` + valueToStringGenerated(this.TargetAverageUtilization) + `,`, + `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`, `}`, }, "") return s } -func (this *LabelSelectorRequirement) String() string { +func (this *ResourceMetricStatus) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&LabelSelectorRequirement{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`, - `Values:` + fmt.Sprintf("%v", this.Values) + `,`, - `}`, - }, "") - return s -} -func (this *ScheduledJob) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ScheduledJob{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScheduledJobSpec", "ScheduledJobSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScheduledJobStatus", "ScheduledJobStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ScheduledJobList) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ScheduledJobList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ScheduledJob", "ScheduledJob", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ScheduledJobSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ScheduledJobSpec{`, - `Schedule:` + fmt.Sprintf("%v", this.Schedule) + `,`, - `StartingDeadlineSeconds:` + valueToStringGenerated(this.StartingDeadlineSeconds) + `,`, - `ConcurrencyPolicy:` + fmt.Sprintf("%v", this.ConcurrencyPolicy) + `,`, - `Suspend:` + valueToStringGenerated(this.Suspend) + `,`, - `JobTemplate:` + strings.Replace(strings.Replace(this.JobTemplate.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ScheduledJobStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ScheduledJobStatus{`, - `Active:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Active), "ObjectReference", "k8s_io_kubernetes_pkg_api_v1.ObjectReference", 1), `&`, ``, 1) + `,`, - `LastScheduleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScheduleTime), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1) + `,`, + s := strings.Join([]string{`&ResourceMetricStatus{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `CurrentAverageUtilization:` + valueToStringGenerated(this.CurrentAverageUtilization) + `,`, + `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -1133,7 +1053,7 @@ func valueToStringGenerated(v interface{}) string { pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } -func (m *Job) Unmarshal(data []byte) error { +func (m *CrossVersionObjectReference) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -1156,10 +1076,147 @@ func (m *Job) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Job: wiretype end group for non-group") + return fmt.Errorf("proto: CrossVersionObjectReference: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Job: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CrossVersionObjectReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HorizontalPodAutoscaler) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1273,7 +1330,7 @@ func (m *Job) Unmarshal(data []byte) error { } return nil } -func (m *JobCondition) Unmarshal(data []byte) error { +func (m *HorizontalPodAutoscalerList) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -1296,10 +1353,443 @@ func (m *JobCondition) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: JobCondition: wiretype end group for non-group") + return fmt.Errorf("proto: HorizontalPodAutoscalerList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: JobCondition: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: HorizontalPodAutoscalerList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, HorizontalPodAutoscaler{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HorizontalPodAutoscalerSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScaleTargetRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ScaleTargetRef.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinReplicas", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MinReplicas = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxReplicas", wireType) + } + m.MaxReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.MaxReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metrics = append(m.Metrics, MetricSpec{}) + if err := m.Metrics[len(m.Metrics)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HorizontalPodAutoscalerStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ObservedGeneration = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastScaleTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastScaleTime == nil { + m.LastScaleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} + } + if err := m.LastScaleTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType) + } + m.CurrentReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.CurrentReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DesiredReplicas", wireType) + } + m.DesiredReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.DesiredReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentMetrics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurrentMetrics = append(m.CurrentMetrics, MetricStatus{}) + if err := m.CurrentMetrics[len(m.CurrentMetrics)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MetricSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MetricSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MetricSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1329,40 +1819,11 @@ func (m *JobCondition) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = JobConditionType(data[iNdEx:postIndex]) + m.Type = MetricSourceType(data[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastProbeTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1386,13 +1847,49 @@ func (m *JobCondition) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.LastProbeTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + if m.Object == nil { + m.Object = &ObjectMetricSource{} + } + if err := m.Object.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pods == nil { + m.Pods = &PodsMetricSource{} + } + if err := m.Pods.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1416,68 +1913,13 @@ func (m *JobCondition) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.LastTransitionTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + if m.Resource == nil { + m.Resource = &ResourceMetricSource{} + } + if err := m.Resource.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:]) @@ -1499,7 +1941,7 @@ func (m *JobCondition) Unmarshal(data []byte) error { } return nil } -func (m *JobList) Unmarshal(data []byte) error { +func (m *MetricStatus) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -1522,15 +1964,44 @@ func (m *JobList) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: JobList: wiretype end group for non-group") + return fmt.Errorf("proto: MetricStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: JobList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MetricStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = MetricSourceType(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1554,13 +2025,191 @@ func (m *JobList) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + if m.Object == nil { + m.Object = &ObjectMetricStatus{} + } + if err := m.Object.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pods == nil { + m.Pods = &PodsMetricStatus{} + } + if err := m.Pods.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Resource == nil { + m.Resource = &ResourceMetricStatus{} + } + if err := m.Resource.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ObjectMetricSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ObjectMetricSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ObjectMetricSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Target.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MetricName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1584,8 +2233,7 @@ func (m *JobList) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, Job{}) - if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + if err := m.TargetValue.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1610,7 +2258,7 @@ func (m *JobList) Unmarshal(data []byte) error { } return nil } -func (m *JobSpec) Unmarshal(data []byte) error { +func (m *ObjectMetricStatus) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -1633,15 +2281,401 @@ func (m *JobSpec) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: JobSpec: wiretype end group for non-group") + return fmt.Errorf("proto: ObjectMetricStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: JobSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ObjectMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Target.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MetricName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CurrentValue.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodsMetricSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodsMetricSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodsMetricSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MetricName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TargetAverageValue.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodsMetricStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodsMetricStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodsMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MetricName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CurrentAverageValue.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceMetricSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceMetricSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceMetricSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = k8s_io_kubernetes_pkg_api_v1.ResourceName(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Parallelism", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageUtilization", wireType) } var v int32 for shift := uint(0); ; shift += 7 { @@ -1658,10 +2692,122 @@ func (m *JobSpec) Unmarshal(data []byte) error { break } } - m.Parallelism = &v + m.TargetAverageUtilization = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TargetAverageValue == nil { + m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{} + } + if err := m.TargetAverageValue.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceMetricStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceMetricStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = k8s_io_kubernetes_pkg_api_v1.ResourceName(data[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Completions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageUtilization", wireType) } var v int32 for shift := uint(0); ; shift += 7 { @@ -1678,228 +2824,10 @@ func (m *JobSpec) Unmarshal(data []byte) error { break } } - m.Completions = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActiveDeadlineSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ActiveDeadlineSeconds = &v - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Selector == nil { - m.Selector = &LabelSelector{} - } - if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ManualSelector", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.ManualSelector = &b - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Template.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JobStatus) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JobStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JobStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, JobCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StartTime == nil { - m.StartTime = &k8s_io_kubernetes_pkg_api_unversioned.Time{} - } - if err := m.StartTime.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex + m.CurrentAverageUtilization = &v case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1923,1160 +2851,7 @@ func (m *JobStatus) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CompletionTime == nil { - m.CompletionTime = &k8s_io_kubernetes_pkg_api_unversioned.Time{} - } - if err := m.CompletionTime.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType) - } - m.Active = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Active |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Succeeded", wireType) - } - m.Succeeded = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Succeeded |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Failed", wireType) - } - m.Failed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Failed |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JobTemplate) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JobTemplate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JobTemplate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Template.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JobTemplateSpec) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JobTemplateSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JobTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LabelSelector) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LabelSelector: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LabelSelector: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchLabels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.MatchLabels == nil { - m.MatchLabels = make(map[string]string) - } - m.MatchLabels[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchExpressions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MatchExpressions = append(m.MatchExpressions, LabelSelectorRequirement{}) - if err := m.MatchExpressions[len(m.MatchExpressions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LabelSelectorRequirement) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LabelSelectorRequirement: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LabelSelectorRequirement: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Operator = LabelSelectorOperator(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Values = append(m.Values, string(data[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScheduledJob) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScheduledJob: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScheduledJob: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScheduledJobList) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScheduledJobList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScheduledJobList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, ScheduledJob{}) - if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScheduledJobSpec) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScheduledJobSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScheduledJobSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schedule", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Schedule = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartingDeadlineSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StartingDeadlineSeconds = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConcurrencyPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConcurrencyPolicy = ConcurrencyPolicy(data[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Suspend", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Suspend = &b - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JobTemplate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.JobTemplate.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScheduledJobStatus) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScheduledJobStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScheduledJobStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Active = append(m.Active, k8s_io_kubernetes_pkg_api_v1.ObjectReference{}) - if err := m.Active[len(m.Active)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastScheduleTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastScheduleTime == nil { - m.LastScheduleTime = &k8s_io_kubernetes_pkg_api_unversioned.Time{} - } - if err := m.LastScheduleTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + if err := m.CurrentAverageValue.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3207,87 +2982,81 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 1300 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xaf, 0xed, 0xd8, 0xb1, 0xc7, 0xf9, 0xe1, 0xcc, 0xb7, 0x51, 0xfd, 0x35, 0x22, 0xa9, 0x2c, - 0x81, 0x1a, 0x68, 0x76, 0x95, 0xa8, 0xa8, 0x21, 0x88, 0x4a, 0x6c, 0x08, 0x52, 0x21, 0x51, 0xa2, - 0x71, 0xa8, 0x10, 0xb4, 0x87, 0xf1, 0x7a, 0x62, 0x6f, 0xb3, 0xde, 0x75, 0x77, 0x67, 0x0d, 0xbe, - 0xf5, 0xca, 0x09, 0x24, 0xfe, 0x05, 0xce, 0xfc, 0x05, 0xf4, 0xc0, 0x2d, 0x37, 0x0a, 0x27, 0xc4, - 0x21, 0x82, 0xf2, 0x5f, 0xf4, 0xc4, 0x9b, 0xd9, 0xd9, 0xf5, 0xfa, 0x57, 0x14, 0x1b, 0x15, 0x89, - 0xc3, 0x4a, 0x9e, 0x37, 0xef, 0xf3, 0x99, 0x37, 0xf3, 0x3e, 0xf3, 0xe6, 0x19, 0xbd, 0x7b, 0xb6, - 0xe3, 0x6b, 0x96, 0xab, 0x9f, 0x05, 0x75, 0xe6, 0x39, 0x8c, 0x33, 0x5f, 0xef, 0x9c, 0x35, 0x75, - 0xda, 0xb1, 0x7c, 0xbd, 0x4e, 0xb9, 0xd9, 0xd2, 0xbb, 0xdb, 0xd4, 0xee, 0xb4, 0xe8, 0x96, 0xde, - 0x64, 0x0e, 0xf3, 0x28, 0x67, 0x0d, 0xad, 0xe3, 0xb9, 0xdc, 0xc5, 0x1b, 0x21, 0x54, 0xeb, 0x43, - 0x35, 0x80, 0x6a, 0x02, 0xaa, 0x49, 0xa8, 0x16, 0x41, 0x2b, 0x9b, 0x4d, 0x8b, 0xb7, 0x82, 0xba, - 0x66, 0xba, 0x6d, 0xbd, 0xe9, 0x36, 0x5d, 0x5d, 0x32, 0xd4, 0x83, 0x53, 0x39, 0x92, 0x03, 0xf9, - 0x2b, 0x64, 0xae, 0x6c, 0x4f, 0x0c, 0x4a, 0xf7, 0x98, 0xef, 0x06, 0x9e, 0xc9, 0x86, 0xa3, 0xa9, - 0xbc, 0x33, 0x19, 0x13, 0x38, 0x5d, 0xe6, 0xf9, 0x96, 0xeb, 0xb0, 0xc6, 0x08, 0xec, 0xf6, 0x64, - 0x58, 0x77, 0x64, 0xcb, 0x95, 0xcd, 0xf1, 0xde, 0x5e, 0xe0, 0x70, 0xab, 0x3d, 0x1a, 0xd3, 0xd6, - 0x78, 0xf7, 0x80, 0x5b, 0xb6, 0x6e, 0x39, 0xdc, 0xe7, 0xde, 0x30, 0xa4, 0xfa, 0x5d, 0x1a, 0x65, - 0x3e, 0x76, 0xeb, 0xf8, 0x33, 0x94, 0x6f, 0x33, 0x4e, 0x1b, 0x94, 0xd3, 0x72, 0xea, 0x66, 0xea, - 0x56, 0x71, 0xfb, 0x96, 0x36, 0xf1, 0xbc, 0xb5, 0xee, 0x96, 0x76, 0x54, 0x7f, 0xcc, 0x4c, 0x7e, - 0x08, 0x18, 0x03, 0x9f, 0x5f, 0xac, 0x5f, 0x7b, 0x71, 0xb1, 0x8e, 0xfa, 0x36, 0x12, 0xb3, 0xe1, - 0x13, 0x34, 0xe7, 0x77, 0x98, 0x59, 0x4e, 0x4b, 0xd6, 0x6d, 0xed, 0xca, 0x59, 0xd4, 0x20, 0xae, - 0x1a, 0x20, 0x8d, 0x05, 0xc5, 0x3f, 0x27, 0x46, 0x44, 0xb2, 0xe1, 0x87, 0x28, 0xe7, 0x73, 0xca, - 0x03, 0xbf, 0x9c, 0x91, 0xbc, 0x77, 0xa6, 0xe4, 0x95, 0x58, 0x63, 0x49, 0x31, 0xe7, 0xc2, 0x31, - 0x51, 0x9c, 0xd5, 0x5f, 0x33, 0x68, 0x01, 0xbc, 0xf6, 0x5c, 0xa7, 0x61, 0x71, 0x48, 0x24, 0xbe, - 0x83, 0xe6, 0x78, 0xaf, 0xc3, 0xe4, 0xd1, 0x14, 0x8c, 0x9b, 0x51, 0x40, 0x27, 0x60, 0x7b, 0x79, - 0xb1, 0x5e, 0x4a, 0xfa, 0x0a, 0x1b, 0x91, 0xde, 0xf8, 0x41, 0x1c, 0x64, 0x5a, 0xe2, 0xee, 0x0d, - 0x2e, 0x07, 0xc8, 0x4b, 0xe5, 0xa0, 0xc5, 0x9c, 0x83, 0xe1, 0xe1, 0x16, 0x5a, 0xb4, 0xa9, 0xcf, - 0x8f, 0x3d, 0xb7, 0xce, 0x4e, 0x40, 0x08, 0xea, 0x0c, 0xde, 0xbe, 0x24, 0x63, 0x09, 0x4d, 0x6a, - 0x02, 0x62, 0xac, 0xaa, 0x58, 0x16, 0x0f, 0x92, 0x4c, 0x64, 0x90, 0x18, 0x7f, 0x89, 0xb0, 0x30, - 0x9c, 0x78, 0xd4, 0xf1, 0xc3, 0xdd, 0x89, 0xe5, 0xe6, 0xa6, 0x5f, 0xae, 0xa2, 0x96, 0xc3, 0x07, - 0x23, 0x74, 0x64, 0xcc, 0x12, 0xf8, 0x4d, 0x94, 0xf3, 0x18, 0xf5, 0x5d, 0xa7, 0x9c, 0x95, 0x47, - 0x17, 0x67, 0x8a, 0x48, 0x2b, 0x51, 0xb3, 0x78, 0x03, 0xcd, 0xb7, 0x99, 0xef, 0xd3, 0x26, 0x2b, - 0xe7, 0xa4, 0xe3, 0xb2, 0x72, 0x9c, 0x3f, 0x0c, 0xcd, 0x24, 0x9a, 0xaf, 0x3e, 0x4b, 0xa1, 0x79, - 0x48, 0xd4, 0x81, 0xe5, 0x73, 0xfc, 0x68, 0x44, 0xee, 0xfa, 0x15, 0x77, 0x23, 0xe0, 0x52, 0xf5, - 0x25, 0xb5, 0x50, 0x3e, 0xb2, 0x24, 0x34, 0x5f, 0x43, 0x59, 0x8b, 0xb3, 0xb6, 0xc8, 0x7b, 0x06, - 0xb8, 0xb5, 0xe9, 0xc4, 0x69, 0x2c, 0x2a, 0xea, 0xec, 0x7d, 0x41, 0x42, 0x42, 0xae, 0xea, 0xb3, - 0x8c, 0x8c, 0x5f, 0x5c, 0x02, 0xbc, 0x85, 0x8a, 0x1d, 0xea, 0x51, 0xdb, 0x66, 0xb6, 0xe5, 0xb7, - 0xe5, 0x16, 0xb2, 0xc6, 0x32, 0x40, 0x8a, 0xc7, 0x7d, 0x33, 0x49, 0xfa, 0x08, 0x08, 0x94, 0xc3, - 0x8e, 0xcd, 0xc4, 0x19, 0x87, 0x8a, 0x54, 0x90, 0xbd, 0xbe, 0x99, 0x24, 0x7d, 0xf0, 0x11, 0x5a, - 0xa5, 0x26, 0xb7, 0xba, 0xec, 0x43, 0x46, 0x1b, 0xb6, 0xe5, 0xb0, 0x1a, 0x33, 0x41, 0x92, 0xe1, - 0x9d, 0xcb, 0x18, 0xff, 0x07, 0xf0, 0xea, 0x07, 0xe3, 0x1c, 0xc8, 0x78, 0x1c, 0xae, 0xa3, 0xbc, - 0xcf, 0x6c, 0xa8, 0x11, 0xae, 0xa7, 0x44, 0xb4, 0x33, 0xc5, 0xd1, 0x1c, 0xd0, 0x3a, 0xb3, 0x6b, - 0x0a, 0x6f, 0x2c, 0x88, 0xb3, 0x8f, 0x46, 0x24, 0xe6, 0xc5, 0xbb, 0x68, 0xa9, 0x4d, 0x9d, 0x80, - 0xc6, 0x9e, 0x52, 0x41, 0x79, 0x03, 0x83, 0xff, 0xd2, 0xe1, 0xc0, 0x0c, 0x19, 0xf2, 0xc4, 0x5f, - 0xa0, 0x3c, 0x1c, 0x75, 0xc7, 0x86, 0x02, 0x29, 0xe5, 0x54, 0xdc, 0xde, 0xbc, 0xbc, 0x0a, 0x1e, - 0xbb, 0x8d, 0x13, 0x05, 0x90, 0xa5, 0x2a, 0x16, 0x45, 0x64, 0x25, 0x31, 0x61, 0xf5, 0xc7, 0x0c, - 0x2a, 0xc4, 0xa5, 0x07, 0x9f, 0x21, 0x64, 0x46, 0xd7, 0xdb, 0x87, 0x04, 0x0a, 0x9d, 0xdc, 0x9d, - 0x4e, 0x27, 0x71, 0x79, 0xe8, 0x57, 0xe0, 0xd8, 0xe4, 0x93, 0x04, 0x3d, 0x54, 0xf7, 0x02, 0x94, - 0x0e, 0x8f, 0xcb, 0xdb, 0x9b, 0x9e, 0xfe, 0xf6, 0x2e, 0x02, 0x77, 0xa1, 0x16, 0x31, 0x90, 0x3e, - 0x19, 0x6e, 0xa2, 0xa5, 0xbe, 0x62, 0x66, 0xad, 0x45, 0x32, 0x35, 0x7b, 0x03, 0x34, 0x64, 0x88, - 0x56, 0x14, 0x84, 0x50, 0x53, 0x52, 0x38, 0xd9, 0x7e, 0x41, 0x08, 0x05, 0x48, 0xd4, 0x2c, 0xd6, - 0x61, 0xab, 0x81, 0x69, 0x32, 0xd6, 0x60, 0x0d, 0x99, 0xf9, 0xac, 0xb1, 0xa2, 0x5c, 0x0b, 0xb5, - 0x68, 0x82, 0xf4, 0x7d, 0x04, 0xf1, 0x29, 0xb5, 0x6c, 0xf0, 0xce, 0x0d, 0x12, 0x7f, 0x24, 0xad, - 0x44, 0xcd, 0x56, 0x7f, 0x49, 0xa1, 0x22, 0x1c, 0x7a, 0x94, 0xd8, 0x57, 0xf8, 0x62, 0xb6, 0x12, - 0x2a, 0x0c, 0x93, 0xb5, 0x3b, 0x9d, 0x30, 0xae, 0x2c, 0xc9, 0x9f, 0x52, 0x68, 0x79, 0xc8, 0xff, - 0xbf, 0xd6, 0x09, 0x54, 0x2f, 0xd2, 0x68, 0x71, 0xa0, 0x32, 0xe0, 0xa7, 0x90, 0xa9, 0xb6, 0x20, - 0x90, 0xe6, 0xe8, 0x72, 0xdd, 0x9f, 0xb5, 0xd2, 0x68, 0x87, 0x7d, 0xae, 0x7d, 0x87, 0x7b, 0x3d, - 0xe3, 0x7f, 0x2a, 0x8c, 0x62, 0x62, 0x86, 0x24, 0x97, 0xc4, 0x5f, 0xa7, 0x50, 0x49, 0x8e, 0xf7, - 0xbf, 0xea, 0x40, 0x0b, 0xe9, 0xab, 0x92, 0x2b, 0xe2, 0xd8, 0x9b, 0x35, 0x0e, 0xc2, 0x9e, 0x04, - 0x96, 0xc7, 0xda, 0xcc, 0xe1, 0x46, 0x59, 0x45, 0x50, 0x3a, 0x1c, 0x5a, 0x84, 0x8c, 0x2c, 0x5b, - 0xb9, 0x87, 0x4a, 0xc3, 0x3b, 0xc0, 0x25, 0x94, 0x39, 0x63, 0xbd, 0xb0, 0x9d, 0x21, 0xe2, 0x27, - 0xbe, 0x8e, 0xb2, 0x5d, 0x6a, 0x07, 0xa1, 0xe2, 0x0a, 0x24, 0x1c, 0xec, 0xa6, 0x77, 0x52, 0xd5, - 0xef, 0x53, 0xa8, 0x3c, 0x29, 0x10, 0xfc, 0x7a, 0x82, 0xc8, 0x28, 0xaa, 0xa8, 0x32, 0x9f, 0xb0, - 0x5e, 0xc8, 0xba, 0x8f, 0xf2, 0x6e, 0x47, 0x34, 0x9c, 0x50, 0x86, 0xc3, 0x1e, 0x68, 0x23, 0x92, - 0xe3, 0x91, 0xb2, 0x43, 0x17, 0xb4, 0x3a, 0x40, 0x1f, 0x4d, 0x90, 0x18, 0x8a, 0xab, 0x28, 0x27, - 0xe3, 0x11, 0x2f, 0x4f, 0x06, 0x48, 0x90, 0xb8, 0x9f, 0x0f, 0xa4, 0x85, 0xa8, 0x99, 0xea, 0x0f, - 0x69, 0xb4, 0x50, 0x33, 0x5b, 0xac, 0x11, 0xc0, 0x6d, 0x7d, 0xb5, 0x2d, 0xed, 0xa3, 0x01, 0x21, - 0xbf, 0x37, 0x45, 0x42, 0x93, 0x01, 0x4e, 0xec, 0x6d, 0xd9, 0x50, 0x6f, 0xfb, 0xfe, 0xac, 0x0b, - 0x5c, 0xde, 0xe4, 0xfe, 0x0c, 0x1a, 0x4d, 0xba, 0xff, 0x1b, 0x8d, 0xd1, 0xc3, 0xc1, 0xc6, 0xe8, - 0xee, 0x8c, 0x3b, 0x9b, 0xd0, 0x21, 0x7d, 0x93, 0x19, 0xdc, 0x91, 0xac, 0x67, 0xb7, 0xa1, 0xe7, - 0x50, 0x36, 0x25, 0xd3, 0x38, 0xc0, 0xc8, 0x97, 0xc4, 0x1e, 0xf8, 0x53, 0x74, 0x43, 0x3e, 0x6e, - 0x96, 0xd3, 0x1c, 0x6e, 0x7a, 0xd2, 0xb2, 0xe9, 0x79, 0x0d, 0x80, 0x37, 0x6a, 0xe3, 0x5d, 0xc8, - 0x24, 0x2c, 0xec, 0x7b, 0x05, 0x7e, 0x98, 0x81, 0xe7, 0x31, 0xc7, 0xec, 0x1d, 0xbb, 0xb6, 0x65, - 0xf6, 0x64, 0x76, 0x0b, 0x86, 0xa6, 0xa2, 0x59, 0xd9, 0x1b, 0x76, 0x78, 0x39, 0xce, 0x48, 0x46, - 0x89, 0xf0, 0x1b, 0x68, 0xde, 0x0f, 0x40, 0x3a, 0x4e, 0x43, 0x3e, 0x8e, 0x79, 0xa3, 0x28, 0x1a, - 0xe0, 0x5a, 0x68, 0x22, 0xd1, 0x1c, 0x7e, 0x82, 0x8a, 0x8f, 0xfb, 0xc5, 0x5e, 0x3e, 0x8e, 0xff, - 0xec, 0x69, 0x89, 0xeb, 0x60, 0x62, 0x82, 0x24, 0xd7, 0xa8, 0xfe, 0x9e, 0x42, 0x78, 0x54, 0x92, - 0x70, 0xca, 0xd1, 0x63, 0x1e, 0xd6, 0xe6, 0xcd, 0xab, 0x5c, 0x4c, 0xc2, 0x4e, 0x99, 0xd8, 0x35, - 0x9b, 0xf8, 0xf6, 0xb7, 0x51, 0x49, 0xfc, 0x95, 0x88, 0x16, 0x9c, 0xf5, 0xbf, 0xca, 0x75, 0x51, - 0x58, 0x0f, 0x86, 0x88, 0xc8, 0x08, 0xb5, 0xf1, 0xd6, 0xf9, 0x9f, 0x6b, 0xd7, 0x9e, 0xc3, 0xf7, - 0x1b, 0x7c, 0x4f, 0x5f, 0xac, 0xa5, 0xce, 0xe1, 0x7b, 0x0e, 0xdf, 0x1f, 0xf0, 0x7d, 0xfb, 0xd7, - 0xda, 0xb5, 0xcf, 0xf3, 0xd1, 0xd1, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x67, 0x5d, 0xb9, 0x32, - 0xf8, 0x10, 0x00, 0x00, + // 1208 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x57, 0x5b, 0x6f, 0x1b, 0x45, + 0x14, 0x8e, 0x2f, 0x49, 0xc3, 0x38, 0x37, 0x26, 0x55, 0xea, 0x26, 0xd4, 0x8e, 0xf6, 0xa9, 0x54, + 0xb0, 0x4b, 0x4c, 0x41, 0x54, 0x08, 0xa1, 0xd8, 0x5c, 0x5a, 0x11, 0xa7, 0x61, 0x1a, 0x2a, 0x04, + 0x48, 0x30, 0x59, 0x4f, 0x9c, 0x21, 0xde, 0x8b, 0x76, 0x66, 0xad, 0x26, 0x52, 0x25, 0x7e, 0x00, + 0x0f, 0xbc, 0xf0, 0x13, 0x90, 0xf8, 0x07, 0x3c, 0x83, 0x84, 0x94, 0xc7, 0xf2, 0xc6, 0x93, 0x45, + 0xdc, 0x37, 0x7e, 0x42, 0x25, 0x2e, 0xda, 0x99, 0xf1, 0x5e, 0xbc, 0x5e, 0x13, 0x87, 0xb4, 0x82, + 0x37, 0xef, 0xcc, 0x39, 0xdf, 0x77, 0xce, 0xf9, 0xce, 0x9c, 0x19, 0x83, 0xb7, 0x0f, 0xdf, 0x60, + 0x3a, 0x75, 0x8c, 0x43, 0x7f, 0x8f, 0x78, 0x36, 0xe1, 0x84, 0x19, 0xee, 0x61, 0xdb, 0xc0, 0x2e, + 0x65, 0x06, 0xf6, 0xb9, 0xc3, 0x4c, 0xdc, 0xa1, 0x76, 0xdb, 0xe8, 0xd6, 0x70, 0xc7, 0x3d, 0xc0, + 0x1b, 0x46, 0x9b, 0xd8, 0xc4, 0xc3, 0x9c, 0xb4, 0x74, 0xd7, 0x73, 0xb8, 0x03, 0x0d, 0x09, 0xa0, + 0x47, 0x00, 0xba, 0x7b, 0xd8, 0xd6, 0x03, 0x00, 0x3d, 0x06, 0xa0, 0x0f, 0x00, 0x56, 0x5f, 0x6e, + 0x53, 0x7e, 0xe0, 0xef, 0xe9, 0xa6, 0x63, 0x19, 0x6d, 0xa7, 0xed, 0x18, 0x02, 0x67, 0xcf, 0xdf, + 0x17, 0x5f, 0xe2, 0x43, 0xfc, 0x92, 0xf8, 0xab, 0x37, 0x55, 0x80, 0xd8, 0xa5, 0x16, 0x36, 0x0f, + 0xa8, 0x4d, 0xbc, 0xa3, 0x41, 0x88, 0x86, 0x47, 0x98, 0xe3, 0x7b, 0x26, 0x19, 0x8e, 0x6a, 0xac, + 0x17, 0x33, 0x2c, 0xc2, 0xb1, 0xd1, 0x4d, 0xe5, 0xb2, 0x6a, 0x64, 0x79, 0x79, 0xbe, 0xcd, 0xa9, + 0x95, 0xa6, 0x79, 0xfd, 0x9f, 0x1c, 0x98, 0x79, 0x40, 0x2c, 0x9c, 0xf2, 0x7b, 0x35, 0xcb, 0xcf, + 0xe7, 0xb4, 0x63, 0x50, 0x9b, 0x33, 0xee, 0x8d, 0xcb, 0x89, 0x11, 0xaf, 0x4b, 0xbc, 0x28, 0x21, + 0xf2, 0x00, 0x5b, 0x6e, 0x87, 0x8c, 0xca, 0xe9, 0xa5, 0x4c, 0x81, 0x47, 0x59, 0xdf, 0x3a, 0x6b, + 0x3b, 0xa4, 0x5c, 0xb5, 0x6f, 0x73, 0x60, 0xad, 0xe1, 0x39, 0x8c, 0xdd, 0x27, 0x1e, 0xa3, 0x8e, + 0x7d, 0x77, 0xef, 0x4b, 0x62, 0x72, 0x44, 0xf6, 0x89, 0x47, 0x6c, 0x93, 0xc0, 0x75, 0x50, 0x3c, + 0xa4, 0x76, 0xab, 0x9c, 0x5b, 0xcf, 0x5d, 0x7f, 0xae, 0x3e, 0x77, 0xd2, 0xab, 0x4e, 0xf5, 0x7b, + 0xd5, 0xe2, 0x07, 0xd4, 0x6e, 0x21, 0xb1, 0x13, 0x58, 0xd8, 0xd8, 0x22, 0xe5, 0x7c, 0xd2, 0x62, + 0x1b, 0x5b, 0x04, 0x89, 0x1d, 0x58, 0x03, 0x00, 0xbb, 0x54, 0x11, 0x94, 0x0b, 0xc2, 0x0e, 0x2a, + 0x3b, 0xb0, 0xb9, 0x73, 0x47, 0xed, 0xa0, 0x98, 0x95, 0xf6, 0x38, 0x0f, 0xae, 0xdc, 0x76, 0x3c, + 0x7a, 0xec, 0xd8, 0x1c, 0x77, 0x76, 0x9c, 0xd6, 0xa6, 0xca, 0x83, 0x78, 0xf0, 0x0b, 0x30, 0x1b, + 0xf4, 0x42, 0x0b, 0x73, 0x2c, 0xe2, 0x2a, 0xd5, 0x5e, 0xd1, 0x55, 0x3f, 0xc7, 0xa5, 0x89, 0x3a, + 0x3a, 0xb0, 0xd6, 0xbb, 0x1b, 0xba, 0x4c, 0xae, 0x49, 0x38, 0x8e, 0xf8, 0xa3, 0x35, 0x14, 0xa2, + 0x42, 0x1b, 0x14, 0x99, 0x4b, 0x4c, 0x91, 0x53, 0xa9, 0xb6, 0xa5, 0x4f, 0x78, 0x5a, 0xf4, 0x8c, + 0xc8, 0xef, 0xb9, 0xc4, 0x8c, 0x2a, 0x14, 0x7c, 0x21, 0xc1, 0x03, 0xbb, 0x60, 0x86, 0x71, 0xcc, + 0x7d, 0x26, 0xaa, 0x53, 0xaa, 0x6d, 0x5f, 0x18, 0xa3, 0x40, 0xad, 0x2f, 0x28, 0xce, 0x19, 0xf9, + 0x8d, 0x14, 0x9b, 0xf6, 0x7b, 0x0e, 0xac, 0x65, 0x78, 0x6e, 0x51, 0xc6, 0xe1, 0x67, 0xa9, 0x4a, + 0xeb, 0x67, 0xab, 0x74, 0xe0, 0x2d, 0xea, 0xbc, 0xa4, 0x98, 0x67, 0x07, 0x2b, 0xb1, 0x2a, 0x5b, + 0x60, 0x9a, 0x72, 0x62, 0xb1, 0x72, 0x7e, 0xbd, 0x70, 0xbd, 0x54, 0xbb, 0x7d, 0x51, 0x49, 0xd7, + 0xe7, 0x15, 0xe9, 0xf4, 0x9d, 0x00, 0x1e, 0x49, 0x16, 0xed, 0xcf, 0x7c, 0x66, 0xb2, 0x81, 0x14, + 0xf0, 0xeb, 0x1c, 0x58, 0x10, 0x9f, 0xbb, 0xd8, 0x6b, 0x93, 0xe0, 0x0c, 0xa8, 0x9c, 0x27, 0xd7, + 0x7f, 0xcc, 0x89, 0xaa, 0xaf, 0xa8, 0xe0, 0x16, 0xee, 0x25, 0xb8, 0xd0, 0x10, 0x37, 0xdc, 0x00, + 0x25, 0x8b, 0xda, 0x88, 0xb8, 0x1d, 0x6a, 0x62, 0x26, 0x5a, 0x71, 0xba, 0xbe, 0xd8, 0xef, 0x55, + 0x4b, 0xcd, 0x68, 0x19, 0xc5, 0x6d, 0xe0, 0x6b, 0xa0, 0x64, 0xe1, 0x07, 0xa1, 0x4b, 0x41, 0xb8, + 0x2c, 0x2b, 0xbe, 0x52, 0x33, 0xda, 0x42, 0x71, 0x3b, 0xb8, 0x0f, 0x2e, 0x59, 0x84, 0x7b, 0xd4, + 0x64, 0xe5, 0xa2, 0x50, 0xe2, 0xcd, 0x89, 0x13, 0x6e, 0x0a, 0x7f, 0xd1, 0xdf, 0x8b, 0x8a, 0xef, + 0x92, 0x5c, 0x63, 0x68, 0x00, 0xae, 0xfd, 0x52, 0x00, 0xd7, 0xc6, 0xf6, 0x29, 0x7c, 0x0f, 0x40, + 0x67, 0x4f, 0x8c, 0xc9, 0xd6, 0xfb, 0x72, 0x50, 0x05, 0x13, 0x23, 0x50, 0xa1, 0x50, 0x5f, 0xe9, + 0xf7, 0xaa, 0xf0, 0x6e, 0x6a, 0x17, 0x8d, 0xf0, 0x80, 0x26, 0x98, 0xef, 0x60, 0xc6, 0x65, 0x85, + 0xa9, 0x1a, 0x4e, 0xa5, 0xda, 0x8d, 0xb3, 0x35, 0x6f, 0xe0, 0x51, 0x7f, 0xbe, 0xdf, 0xab, 0xce, + 0x6f, 0xc5, 0x41, 0x50, 0x12, 0x13, 0x6e, 0x82, 0x45, 0xd3, 0xf7, 0x3c, 0x62, 0xf3, 0xa1, 0x8a, + 0x5f, 0x51, 0x15, 0x58, 0x6c, 0x24, 0xb7, 0xd1, 0xb0, 0x7d, 0x00, 0xd1, 0x22, 0x8c, 0x7a, 0xa4, + 0x15, 0x42, 0x14, 0x93, 0x10, 0xef, 0x24, 0xb7, 0xd1, 0xb0, 0x3d, 0x7c, 0x08, 0x16, 0x14, 0xaa, + 0xaa, 0x77, 0x79, 0x5a, 0x68, 0xf8, 0xd6, 0x79, 0x35, 0x94, 0x13, 0x23, 0xec, 0xd2, 0x46, 0x02, + 0x1c, 0x0d, 0x91, 0x69, 0x7f, 0xe4, 0x01, 0x88, 0xc4, 0x87, 0x37, 0x41, 0x91, 0x1f, 0xb9, 0x44, + 0x5d, 0x17, 0xeb, 0x83, 0x51, 0xb7, 0x7b, 0xe4, 0x92, 0x27, 0xbd, 0xea, 0x92, 0xb2, 0x14, 0xb7, + 0x7f, 0xb0, 0x86, 0x84, 0x35, 0x6c, 0x83, 0x19, 0x47, 0x9c, 0x12, 0xa5, 0x53, 0x63, 0xe2, 0xd8, + 0xc3, 0x29, 0x1e, 0xc2, 0xd7, 0x41, 0x30, 0xef, 0xd4, 0xe1, 0x53, 0xf0, 0xf0, 0x73, 0x50, 0x74, + 0x9d, 0xd6, 0x60, 0xca, 0x6e, 0x4e, 0x4c, 0xb3, 0xe3, 0xb4, 0x58, 0x82, 0x64, 0x36, 0xc8, 0x2e, + 0x58, 0x45, 0x02, 0x18, 0x3a, 0x60, 0x76, 0xf0, 0xba, 0x11, 0x4a, 0x96, 0x6a, 0xef, 0x4e, 0x4c, + 0x82, 0x14, 0x40, 0x82, 0x68, 0x2e, 0x98, 0xa1, 0x83, 0x1d, 0x14, 0x92, 0x68, 0x7f, 0xe5, 0xc1, + 0x5c, 0x5c, 0xb8, 0xff, 0x86, 0x02, 0xb2, 0x87, 0x9e, 0xb2, 0x02, 0x92, 0xe4, 0x19, 0x28, 0x20, + 0x89, 0xb2, 0x14, 0xf8, 0x2e, 0x0f, 0x60, 0xba, 0xfd, 0x20, 0x07, 0x33, 0x5c, 0xcc, 0xf2, 0xa7, + 0x72, 0x89, 0x84, 0x17, 0xba, 0xba, 0x2f, 0x14, 0x57, 0xf0, 0xd4, 0x92, 0xd3, 0x76, 0x3b, 0x7a, + 0x92, 0x85, 0x4f, 0x9d, 0x66, 0xb8, 0x83, 0x62, 0x56, 0x90, 0x80, 0x92, 0xf4, 0xbe, 0x8f, 0x3b, + 0x3e, 0x51, 0xca, 0x8c, 0xbd, 0xe7, 0xf5, 0x41, 0xf2, 0xfa, 0x87, 0x3e, 0xb6, 0x39, 0xe5, 0x47, + 0xd1, 0x2d, 0xb3, 0x1b, 0x41, 0xa1, 0x38, 0xae, 0xf6, 0xfd, 0x70, 0x9d, 0x64, 0xbf, 0xfe, 0x7f, + 0xea, 0x74, 0x00, 0xe6, 0xd4, 0xf0, 0xfb, 0x37, 0x85, 0xba, 0xac, 0x58, 0xe6, 0x1a, 0x31, 0x2c, + 0x94, 0x40, 0xd6, 0x7e, 0xca, 0x81, 0xa5, 0xe1, 0x51, 0x33, 0x14, 0x72, 0xee, 0x4c, 0x21, 0x1f, + 0x03, 0x28, 0x13, 0xde, 0xec, 0x12, 0x0f, 0xb7, 0x89, 0x0c, 0x3c, 0x7f, 0xae, 0xc0, 0x57, 0x15, + 0x17, 0xdc, 0x4d, 0x21, 0xa2, 0x11, 0x2c, 0xda, 0xcf, 0xc9, 0x24, 0xa4, 0xda, 0xe7, 0x49, 0xe2, + 0x21, 0x58, 0x56, 0xd5, 0xb9, 0x80, 0x2c, 0xd6, 0x14, 0xd9, 0x72, 0x23, 0x0d, 0x89, 0x46, 0xf1, + 0x68, 0x3f, 0xe4, 0xc1, 0xe5, 0x51, 0x23, 0x19, 0x36, 0xd5, 0x1f, 0x1f, 0x99, 0xc5, 0xad, 0xf8, + 0x1f, 0x9f, 0x27, 0xbd, 0xea, 0x8b, 0xe3, 0xfe, 0xc1, 0x85, 0x13, 0x26, 0xf6, 0x2f, 0xe9, 0x63, + 0x50, 0x4e, 0x54, 0xf1, 0x23, 0x4e, 0x3b, 0xf4, 0x58, 0xbe, 0x80, 0xe4, 0xe3, 0xef, 0x85, 0x7e, + 0xaf, 0x5a, 0xde, 0xcd, 0xb0, 0x41, 0x99, 0xde, 0xb0, 0x3b, 0xb2, 0x0b, 0xce, 0xd7, 0xbe, 0x2b, + 0x13, 0x74, 0xc0, 0x8f, 0xe9, 0xca, 0xc9, 0x2e, 0xb8, 0xe0, 0xca, 0x7d, 0x0a, 0xae, 0x26, 0x85, + 0x4b, 0x97, 0xee, 0x5a, 0xbf, 0x57, 0xbd, 0xda, 0xc8, 0x32, 0x42, 0xd9, 0xfe, 0x59, 0xdd, 0x57, + 0x78, 0x36, 0xdd, 0x57, 0xbf, 0x71, 0x72, 0x5a, 0x99, 0x7a, 0x74, 0x5a, 0x99, 0xfa, 0xf5, 0xb4, + 0x32, 0xf5, 0x55, 0xbf, 0x92, 0x3b, 0xe9, 0x57, 0x72, 0x8f, 0xfa, 0x95, 0xdc, 0x6f, 0xfd, 0x4a, + 0xee, 0x9b, 0xc7, 0x95, 0xa9, 0x4f, 0x66, 0x07, 0x83, 0xf0, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x95, 0xf2, 0xec, 0x8a, 0x16, 0x12, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.proto new file mode 100644 index 000000000..27b99c224 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.proto @@ -0,0 +1,275 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1; + +import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v2alpha1"; + +// CrossVersionObjectReference contains enough information to let you identify the referred resource. +message CrossVersionObjectReference { + // Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + optional string kind = 1; + + // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names + optional string name = 2; + + // API version of the referent + // +optional + optional string apiVersion = 3; +} + +// HorizontalPodAutoscaler is the configuration for a horizontal pod +// autoscaler, which automatically manages the replica count of any resource +// implementing the scale subresource based on the metrics specified. +message HorizontalPodAutoscaler { + // metadata is the standard object metadata. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // spec is the specification for the behaviour of the autoscaler. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + // +optional + optional HorizontalPodAutoscalerSpec spec = 2; + + // status is the current information about the autoscaler. + // +optional + optional HorizontalPodAutoscalerStatus status = 3; +} + +// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. +message HorizontalPodAutoscalerList { + // metadata is the standard list metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // items is the list of horizontal pod autoscaler objects. + repeated HorizontalPodAutoscaler items = 2; +} + +// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. +message HorizontalPodAutoscalerSpec { + // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics + // should be collected, as well as to actually change the replica count. + optional CrossVersionObjectReference scaleTargetRef = 1; + + // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. + // It defaults to 1 pod. + // +optional + optional int32 minReplicas = 2; + + // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. + // It cannot be less that minReplicas. + optional int32 maxReplicas = 3; + + // metrics contains the specifications for which to use to calculate the + // desired replica count (the maximum replica count across all metrics will + // be used). The desired replica count is calculated multiplying the + // ratio between the target value and the current value by the current + // number of pods. Ergo, metrics used must decrease as the pod count is + // increased, and vice-versa. See the individual metric source types for + // more information about how each type of metric must respond. + // +optional + repeated MetricSpec metrics = 4; +} + +// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. +message HorizontalPodAutoscalerStatus { + // observedGeneration is the most recent generation observed by this autoscaler. + // +optional + optional int64 observedGeneration = 1; + + // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, + // used by the autoscaler to control how often the number of pods is changed. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2; + + // currentReplicas is current number of replicas of pods managed by this autoscaler, + // as last seen by the autoscaler. + optional int32 currentReplicas = 3; + + // desiredReplicas is the desired number of replicas of pods managed by this autoscaler, + // as last calculated by the autoscaler. + optional int32 desiredReplicas = 4; + + // currentMetrics is the last read state of the metrics used by this autoscaler. + repeated MetricStatus currentMetrics = 5; +} + +// MetricSpec specifies how to scale based on a single metric +// (only `type` and one other matching field should be set at once). +message MetricSpec { + // type is the type of metric source. It should match one of the fields below. + optional string type = 1; + + // object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + // +optional + optional ObjectMetricSource object = 2; + + // pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + // +optional + optional PodsMetricSource pods = 3; + + // resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + // +optional + optional ResourceMetricSource resource = 4; +} + +// MetricStatus describes the last-read state of a single metric. +message MetricStatus { + // type is the type of metric source. It will match one of the fields below. + optional string type = 1; + + // object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + // +optional + optional ObjectMetricStatus object = 2; + + // pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + // +optional + optional PodsMetricStatus pods = 3; + + // resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + // +optional + optional ResourceMetricStatus resource = 4; +} + +// ObjectMetricSource indicates how to scale on a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). +message ObjectMetricSource { + // target is the described Kubernetes object. + optional CrossVersionObjectReference target = 1; + + // metricName is the name of the metric in question. + optional string metricName = 2; + + // targetValue is the target value of the metric (as a quantity). + optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3; +} + +// ObjectMetricStatus indicates the current value of a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). +message ObjectMetricStatus { + // target is the described Kubernetes object. + optional CrossVersionObjectReference target = 1; + + // metricName is the name of the metric in question. + optional string metricName = 2; + + // currentValue is the current value of the metric (as a quantity). + optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3; +} + +// PodsMetricSource indicates how to scale on a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). +// The values will be averaged together before being compared to the target +// value. +message PodsMetricSource { + // metricName is the name of the metric in question + optional string metricName = 1; + + // targetAverageValue is the target value of the average of the + // metric across all relevant pods (as a quantity) + optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2; +} + +// PodsMetricStatus indicates the current value of a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). +message PodsMetricStatus { + // metricName is the name of the metric in question + optional string metricName = 1; + + // currentAverageValue is the current value of the average of the + // metric across all relevant pods (as a quantity) + optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2; +} + +// ResourceMetricSource indicates how to scale on a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). The values will be averaged +// together before being compared to the target. Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. Only one "target" type +// should be set. +message ResourceMetricSource { + // name is the name of the resource in question. + optional string name = 1; + + // targetAverageUtilization is the target value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. + // +optional + optional int32 targetAverageUtilization = 2; + + // targetAverageValue is the the target value of the average of the + // resource metric across all relevant pods, as a raw value (instead of as + // a percentage of the request), similar to the "pods" metric source type. + // +optional + optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3; +} + +// ResourceMetricStatus indicates the current value of a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. +message ResourceMetricStatus { + // name is the name of the resource in question. + optional string name = 1; + + // currentAverageUtilization is the current value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. It will only be + // present if `targetAverageValue` was set in the corresponding metric + // specification. + // +optional + optional int32 currentAverageUtilization = 2; + + // currentAverageValue is the the current value of the average of the + // resource metric across all relevant pods, as a raw value (instead of as + // a percentage of the request), similar to the "pods" metric source type. + // It will always be set, regardless of the corresponding metric specification. + optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3; +} + diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/register.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/register.go similarity index 73% rename from vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/register.go rename to vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/register.go index c32e44b6e..2fc437f93 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/register.go @@ -14,20 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1 +package v2alpha1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/runtime" - versionedwatch "k8s.io/client-go/1.5/pkg/watch/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "autoscaling" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2alpha1"} var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs) @@ -39,10 +38,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &HorizontalPodAutoscaler{}, &HorizontalPodAutoscalerList{}, - &Scale{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, ) - versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types.generated.go new file mode 100644 index 000000000..9eb6919a3 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types.generated.go @@ -0,0 +1,4621 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v2alpha1 + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg1_resource "k8s.io/apimachinery/pkg/api/resource" + pkg3_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg4_types "k8s.io/apimachinery/pkg/types" + pkg2_v1 "k8s.io/client-go/pkg/api/v1" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81234 = 1 + codecSelferC_RAW1234 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1234 = 10 + codecSelferValueTypeMap1234 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1234 = 2 + codecSelfer_containerMapValue1234 = 3 + codecSelfer_containerMapEnd1234 = 4 + codecSelfer_containerArrayElem1234 = 6 + codecSelfer_containerArrayEnd1234 = 7 +) + +var ( + codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1234 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg1_resource.Quantity + var v1 pkg3_v1.Time + var v2 pkg4_types.UID + var v3 pkg2_v1.ResourceName + var v4 time.Time + _, _, _, _, _ = v0, v1, v2, v3, v4 + } +} + +func (x *CrossVersionObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[2] = x.APIVersion != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CrossVersionObjectReference) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CrossVersionObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv6 := &x.Name + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv8 := &x.APIVersion + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CrossVersionObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv11 := &x.Kind + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv13 := &x.Name + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *HorizontalPodAutoscalerSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.MinReplicas != nil + yyq2[3] = len(x.Metrics) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy4 := &x.ScaleTargetRef + yy4.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("scaleTargetRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy6 := &x.ScaleTargetRef + yy6.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.MinReplicas == nil { + r.EncodeNil() + } else { + yy9 := *x.MinReplicas + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(yy9)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("minReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.MinReplicas == nil { + r.EncodeNil() + } else { + yy11 := *x.MinReplicas + yym12 := z.EncBinary() + _ = yym12 + if false { + } else { + r.EncodeInt(int64(yy11)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeInt(int64(x.MaxReplicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("maxReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + r.EncodeInt(int64(x.MaxReplicas)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Metrics == nil { + r.EncodeNil() + } else { + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + h.encSliceMetricSpec(([]MetricSpec)(x.Metrics), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metrics")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Metrics == nil { + r.EncodeNil() + } else { + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + h.encSliceMetricSpec(([]MetricSpec)(x.Metrics), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *HorizontalPodAutoscalerSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "scaleTargetRef": + if r.TryDecodeAsNil() { + x.ScaleTargetRef = CrossVersionObjectReference{} + } else { + yyv4 := &x.ScaleTargetRef + yyv4.CodecDecodeSelf(d) + } + case "minReplicas": + if r.TryDecodeAsNil() { + if x.MinReplicas != nil { + x.MinReplicas = nil + } + } else { + if x.MinReplicas == nil { + x.MinReplicas = new(int32) + } + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32)) + } + } + case "maxReplicas": + if r.TryDecodeAsNil() { + x.MaxReplicas = 0 + } else { + yyv7 := &x.MaxReplicas + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*int32)(yyv7)) = int32(r.DecodeInt(32)) + } + } + case "metrics": + if r.TryDecodeAsNil() { + x.Metrics = nil + } else { + yyv9 := &x.Metrics + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + h.decSliceMetricSpec((*[]MetricSpec)(yyv9), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ScaleTargetRef = CrossVersionObjectReference{} + } else { + yyv12 := &x.ScaleTargetRef + yyv12.CodecDecodeSelf(d) + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.MinReplicas != nil { + x.MinReplicas = nil + } + } else { + if x.MinReplicas == nil { + x.MinReplicas = new(int32) + } + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32)) + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MaxReplicas = 0 + } else { + yyv15 := &x.MaxReplicas + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*int32)(yyv15)) = int32(r.DecodeInt(32)) + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Metrics = nil + } else { + yyv17 := &x.Metrics + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + h.decSliceMetricSpec((*[]MetricSpec)(yyv17), d) + } + } + for { + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj11-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x MetricSourceType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *MetricSourceType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *MetricSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Object != nil + yyq2[2] = x.Pods != nil + yyq2[3] = x.Resource != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Object == nil { + r.EncodeNil() + } else { + x.Object.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("object")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Object == nil { + r.EncodeNil() + } else { + x.Object.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Pods == nil { + r.EncodeNil() + } else { + x.Pods.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("pods")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Pods == nil { + r.EncodeNil() + } else { + x.Pods.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Resource == nil { + r.EncodeNil() + } else { + x.Resource.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resource")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Resource == nil { + r.EncodeNil() + } else { + x.Resource.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *MetricSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *MetricSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) + } + case "object": + if r.TryDecodeAsNil() { + if x.Object != nil { + x.Object = nil + } + } else { + if x.Object == nil { + x.Object = new(ObjectMetricSource) + } + x.Object.CodecDecodeSelf(d) + } + case "pods": + if r.TryDecodeAsNil() { + if x.Pods != nil { + x.Pods = nil + } + } else { + if x.Pods == nil { + x.Pods = new(PodsMetricSource) + } + x.Pods.CodecDecodeSelf(d) + } + case "resource": + if r.TryDecodeAsNil() { + if x.Resource != nil { + x.Resource = nil + } + } else { + if x.Resource == nil { + x.Resource = new(ResourceMetricSource) + } + x.Resource.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *MetricSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv9 := &x.Type + yyv9.CodecDecodeSelf(d) + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Object != nil { + x.Object = nil + } + } else { + if x.Object == nil { + x.Object = new(ObjectMetricSource) + } + x.Object.CodecDecodeSelf(d) + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Pods != nil { + x.Pods = nil + } + } else { + if x.Pods == nil { + x.Pods = new(PodsMetricSource) + } + x.Pods.CodecDecodeSelf(d) + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Resource != nil { + x.Resource = nil + } + } else { + if x.Resource == nil { + x.Resource = new(ResourceMetricSource) + } + x.Resource.CodecDecodeSelf(d) + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ObjectMetricSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 3 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy4 := &x.Target + yy4.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("target")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy6 := &x.Target + yy6.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym9 := z.EncBinary() + _ = yym9 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metricName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy12 := &x.TargetValue + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(yy12) + } else { + z.EncFallback(yy12) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("targetValue")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy14 := &x.TargetValue + yym15 := z.EncBinary() + _ = yym15 + if false { + } else if z.HasExtensions() && z.EncExt(yy14) { + } else if !yym15 && z.IsJSONHandle() { + z.EncJSONMarshal(yy14) + } else { + z.EncFallback(yy14) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ObjectMetricSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ObjectMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "target": + if r.TryDecodeAsNil() { + x.Target = CrossVersionObjectReference{} + } else { + yyv4 := &x.Target + yyv4.CodecDecodeSelf(d) + } + case "metricName": + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv5 := &x.MetricName + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } + } + case "targetValue": + if r.TryDecodeAsNil() { + x.TargetValue = pkg1_resource.Quantity{} + } else { + yyv7 := &x.TargetValue + yym8 := z.DecBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.DecExt(yyv7) { + } else if !yym8 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv7) + } else { + z.DecFallback(yyv7, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ObjectMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Target = CrossVersionObjectReference{} + } else { + yyv10 := &x.Target + yyv10.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv11 := &x.MetricName + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TargetValue = pkg1_resource.Quantity{} + } else { + yyv13 := &x.TargetValue + yym14 := z.DecBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.DecExt(yyv13) { + } else if !yym14 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv13) + } else { + z.DecFallback(yyv13, false) + } + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PodsMetricSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metricName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy7 := &x.TargetAverageValue + yym8 := z.EncBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.EncExt(yy7) { + } else if !yym8 && z.IsJSONHandle() { + z.EncJSONMarshal(yy7) + } else { + z.EncFallback(yy7) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("targetAverageValue")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy9 := &x.TargetAverageValue + yym10 := z.EncBinary() + _ = yym10 + if false { + } else if z.HasExtensions() && z.EncExt(yy9) { + } else if !yym10 && z.IsJSONHandle() { + z.EncJSONMarshal(yy9) + } else { + z.EncFallback(yy9) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PodsMetricSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PodsMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "metricName": + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv4 := &x.MetricName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "targetAverageValue": + if r.TryDecodeAsNil() { + x.TargetAverageValue = pkg1_resource.Quantity{} + } else { + yyv6 := &x.TargetAverageValue + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) + } else { + z.DecFallback(yyv6, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PodsMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv9 := &x.MetricName + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TargetAverageValue = pkg1_resource.Quantity{} + } else { + yyv11 := &x.TargetAverageValue + yym12 := z.DecBinary() + _ = yym12 + if false { + } else if z.HasExtensions() && z.DecExt(yyv11) { + } else if !yym12 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv11) + } else { + z.DecFallback(yyv11, false) + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ResourceMetricSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.TargetAverageUtilization != nil + yyq2[2] = x.TargetAverageValue != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yysf4 := &x.Name + yysf4.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yysf5 := &x.Name + yysf5.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.TargetAverageUtilization == nil { + r.EncodeNil() + } else { + yy7 := *x.TargetAverageUtilization + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeInt(int64(yy7)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("targetAverageUtilization")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.TargetAverageUtilization == nil { + r.EncodeNil() + } else { + yy9 := *x.TargetAverageUtilization + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(yy9)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.TargetAverageValue == nil { + r.EncodeNil() + } else { + yym12 := z.EncBinary() + _ = yym12 + if false { + } else if z.HasExtensions() && z.EncExt(x.TargetAverageValue) { + } else if !yym12 && z.IsJSONHandle() { + z.EncJSONMarshal(x.TargetAverageValue) + } else { + z.EncFallback(x.TargetAverageValue) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("targetAverageValue")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.TargetAverageValue == nil { + r.EncodeNil() + } else { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(x.TargetAverageValue) { + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(x.TargetAverageValue) + } else { + z.EncFallback(x.TargetAverageValue) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ResourceMetricSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ResourceMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv4 := &x.Name + yyv4.CodecDecodeSelf(d) + } + case "targetAverageUtilization": + if r.TryDecodeAsNil() { + if x.TargetAverageUtilization != nil { + x.TargetAverageUtilization = nil + } + } else { + if x.TargetAverageUtilization == nil { + x.TargetAverageUtilization = new(int32) + } + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*int32)(x.TargetAverageUtilization)) = int32(r.DecodeInt(32)) + } + } + case "targetAverageValue": + if r.TryDecodeAsNil() { + if x.TargetAverageValue != nil { + x.TargetAverageValue = nil + } + } else { + if x.TargetAverageValue == nil { + x.TargetAverageValue = new(pkg1_resource.Quantity) + } + yym8 := z.DecBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.DecExt(x.TargetAverageValue) { + } else if !yym8 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.TargetAverageValue) + } else { + z.DecFallback(x.TargetAverageValue, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ResourceMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv10 := &x.Name + yyv10.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.TargetAverageUtilization != nil { + x.TargetAverageUtilization = nil + } + } else { + if x.TargetAverageUtilization == nil { + x.TargetAverageUtilization = new(int32) + } + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*int32)(x.TargetAverageUtilization)) = int32(r.DecodeInt(32)) + } + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.TargetAverageValue != nil { + x.TargetAverageValue = nil + } + } else { + if x.TargetAverageValue == nil { + x.TargetAverageValue = new(pkg1_resource.Quantity) + } + yym14 := z.DecBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.DecExt(x.TargetAverageValue) { + } else if !yym14 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.TargetAverageValue) + } else { + z.DecFallback(x.TargetAverageValue, false) + } + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *HorizontalPodAutoscalerStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.ObservedGeneration != nil + yyq2[1] = x.LastScaleTime != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 3 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.ObservedGeneration == nil { + r.EncodeNil() + } else { + yy4 := *x.ObservedGeneration + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(yy4)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ObservedGeneration == nil { + r.EncodeNil() + } else { + yy6 := *x.ObservedGeneration + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeInt(int64(yy6)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.LastScaleTime == nil { + r.EncodeNil() + } else { + yym9 := z.EncBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) { + } else if yym9 { + z.EncBinaryMarshal(x.LastScaleTime) + } else if !yym9 && z.IsJSONHandle() { + z.EncJSONMarshal(x.LastScaleTime) + } else { + z.EncFallback(x.LastScaleTime) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastScaleTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.LastScaleTime == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) { + } else if yym10 { + z.EncBinaryMarshal(x.LastScaleTime) + } else if !yym10 && z.IsJSONHandle() { + z.EncJSONMarshal(x.LastScaleTime) + } else { + z.EncFallback(x.LastScaleTime) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym12 := z.EncBinary() + _ = yym12 + if false { + } else { + r.EncodeInt(int64(x.CurrentReplicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("currentReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeInt(int64(x.CurrentReplicas)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + r.EncodeInt(int64(x.DesiredReplicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("desiredReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeInt(int64(x.DesiredReplicas)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.CurrentMetrics == nil { + r.EncodeNil() + } else { + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + h.encSliceMetricStatus(([]MetricStatus)(x.CurrentMetrics), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("currentMetrics")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.CurrentMetrics == nil { + r.EncodeNil() + } else { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + h.encSliceMetricStatus(([]MetricStatus)(x.CurrentMetrics), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *HorizontalPodAutoscalerStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "observedGeneration": + if r.TryDecodeAsNil() { + if x.ObservedGeneration != nil { + x.ObservedGeneration = nil + } + } else { + if x.ObservedGeneration == nil { + x.ObservedGeneration = new(int64) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) + } + } + case "lastScaleTime": + if r.TryDecodeAsNil() { + if x.LastScaleTime != nil { + x.LastScaleTime = nil + } + } else { + if x.LastScaleTime == nil { + x.LastScaleTime = new(pkg3_v1.Time) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) { + } else if yym7 { + z.DecBinaryUnmarshal(x.LastScaleTime) + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.LastScaleTime) + } else { + z.DecFallback(x.LastScaleTime, false) + } + } + case "currentReplicas": + if r.TryDecodeAsNil() { + x.CurrentReplicas = 0 + } else { + yyv8 := &x.CurrentReplicas + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } + } + case "desiredReplicas": + if r.TryDecodeAsNil() { + x.DesiredReplicas = 0 + } else { + yyv10 := &x.DesiredReplicas + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int32)(yyv10)) = int32(r.DecodeInt(32)) + } + } + case "currentMetrics": + if r.TryDecodeAsNil() { + x.CurrentMetrics = nil + } else { + yyv12 := &x.CurrentMetrics + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + h.decSliceMetricStatus((*[]MetricStatus)(yyv12), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ObservedGeneration != nil { + x.ObservedGeneration = nil + } + } else { + if x.ObservedGeneration == nil { + x.ObservedGeneration = new(int64) + } + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64)) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.LastScaleTime != nil { + x.LastScaleTime = nil + } + } else { + if x.LastScaleTime == nil { + x.LastScaleTime = new(pkg3_v1.Time) + } + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) { + } else if yym18 { + z.DecBinaryUnmarshal(x.LastScaleTime) + } else if !yym18 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.LastScaleTime) + } else { + z.DecFallback(x.LastScaleTime, false) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CurrentReplicas = 0 + } else { + yyv19 := &x.CurrentReplicas + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*int32)(yyv19)) = int32(r.DecodeInt(32)) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.DesiredReplicas = 0 + } else { + yyv21 := &x.DesiredReplicas + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*int32)(yyv21)) = int32(r.DecodeInt(32)) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CurrentMetrics = nil + } else { + yyv23 := &x.CurrentMetrics + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + h.decSliceMetricStatus((*[]MetricStatus)(yyv23), d) + } + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj14-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *MetricStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Object != nil + yyq2[2] = x.Pods != nil + yyq2[3] = x.Resource != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Object == nil { + r.EncodeNil() + } else { + x.Object.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("object")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Object == nil { + r.EncodeNil() + } else { + x.Object.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Pods == nil { + r.EncodeNil() + } else { + x.Pods.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("pods")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Pods == nil { + r.EncodeNil() + } else { + x.Pods.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Resource == nil { + r.EncodeNil() + } else { + x.Resource.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resource")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Resource == nil { + r.EncodeNil() + } else { + x.Resource.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *MetricStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *MetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) + } + case "object": + if r.TryDecodeAsNil() { + if x.Object != nil { + x.Object = nil + } + } else { + if x.Object == nil { + x.Object = new(ObjectMetricStatus) + } + x.Object.CodecDecodeSelf(d) + } + case "pods": + if r.TryDecodeAsNil() { + if x.Pods != nil { + x.Pods = nil + } + } else { + if x.Pods == nil { + x.Pods = new(PodsMetricStatus) + } + x.Pods.CodecDecodeSelf(d) + } + case "resource": + if r.TryDecodeAsNil() { + if x.Resource != nil { + x.Resource = nil + } + } else { + if x.Resource == nil { + x.Resource = new(ResourceMetricStatus) + } + x.Resource.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *MetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv9 := &x.Type + yyv9.CodecDecodeSelf(d) + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Object != nil { + x.Object = nil + } + } else { + if x.Object == nil { + x.Object = new(ObjectMetricStatus) + } + x.Object.CodecDecodeSelf(d) + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Pods != nil { + x.Pods = nil + } + } else { + if x.Pods == nil { + x.Pods = new(PodsMetricStatus) + } + x.Pods.CodecDecodeSelf(d) + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Resource != nil { + x.Resource = nil + } + } else { + if x.Resource == nil { + x.Resource = new(ResourceMetricStatus) + } + x.Resource.CodecDecodeSelf(d) + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ObjectMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 3 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy4 := &x.Target + yy4.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("target")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy6 := &x.Target + yy6.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym9 := z.EncBinary() + _ = yym9 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metricName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy12 := &x.CurrentValue + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(yy12) + } else { + z.EncFallback(yy12) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("currentValue")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy14 := &x.CurrentValue + yym15 := z.EncBinary() + _ = yym15 + if false { + } else if z.HasExtensions() && z.EncExt(yy14) { + } else if !yym15 && z.IsJSONHandle() { + z.EncJSONMarshal(yy14) + } else { + z.EncFallback(yy14) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ObjectMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ObjectMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "target": + if r.TryDecodeAsNil() { + x.Target = CrossVersionObjectReference{} + } else { + yyv4 := &x.Target + yyv4.CodecDecodeSelf(d) + } + case "metricName": + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv5 := &x.MetricName + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } + } + case "currentValue": + if r.TryDecodeAsNil() { + x.CurrentValue = pkg1_resource.Quantity{} + } else { + yyv7 := &x.CurrentValue + yym8 := z.DecBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.DecExt(yyv7) { + } else if !yym8 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv7) + } else { + z.DecFallback(yyv7, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ObjectMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Target = CrossVersionObjectReference{} + } else { + yyv10 := &x.Target + yyv10.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv11 := &x.MetricName + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CurrentValue = pkg1_resource.Quantity{} + } else { + yyv13 := &x.CurrentValue + yym14 := z.DecBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.DecExt(yyv13) { + } else if !yym14 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv13) + } else { + z.DecFallback(yyv13, false) + } + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *PodsMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metricName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.MetricName)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy7 := &x.CurrentAverageValue + yym8 := z.EncBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.EncExt(yy7) { + } else if !yym8 && z.IsJSONHandle() { + z.EncJSONMarshal(yy7) + } else { + z.EncFallback(yy7) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("currentAverageValue")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy9 := &x.CurrentAverageValue + yym10 := z.EncBinary() + _ = yym10 + if false { + } else if z.HasExtensions() && z.EncExt(yy9) { + } else if !yym10 && z.IsJSONHandle() { + z.EncJSONMarshal(yy9) + } else { + z.EncFallback(yy9) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PodsMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PodsMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "metricName": + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv4 := &x.MetricName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "currentAverageValue": + if r.TryDecodeAsNil() { + x.CurrentAverageValue = pkg1_resource.Quantity{} + } else { + yyv6 := &x.CurrentAverageValue + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) + } else { + z.DecFallback(yyv6, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PodsMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MetricName = "" + } else { + yyv9 := &x.MetricName + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CurrentAverageValue = pkg1_resource.Quantity{} + } else { + yyv11 := &x.CurrentAverageValue + yym12 := z.DecBinary() + _ = yym12 + if false { + } else if z.HasExtensions() && z.DecExt(yyv11) { + } else if !yym12 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv11) + } else { + z.DecFallback(yyv11, false) + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ResourceMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.CurrentAverageUtilization != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yysf4 := &x.Name + yysf4.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yysf5 := &x.Name + yysf5.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.CurrentAverageUtilization == nil { + r.EncodeNil() + } else { + yy7 := *x.CurrentAverageUtilization + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeInt(int64(yy7)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("currentAverageUtilization")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.CurrentAverageUtilization == nil { + r.EncodeNil() + } else { + yy9 := *x.CurrentAverageUtilization + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(yy9)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy12 := &x.CurrentAverageValue + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(yy12) + } else { + z.EncFallback(yy12) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("currentAverageValue")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy14 := &x.CurrentAverageValue + yym15 := z.EncBinary() + _ = yym15 + if false { + } else if z.HasExtensions() && z.EncExt(yy14) { + } else if !yym15 && z.IsJSONHandle() { + z.EncJSONMarshal(yy14) + } else { + z.EncFallback(yy14) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ResourceMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ResourceMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv4 := &x.Name + yyv4.CodecDecodeSelf(d) + } + case "currentAverageUtilization": + if r.TryDecodeAsNil() { + if x.CurrentAverageUtilization != nil { + x.CurrentAverageUtilization = nil + } + } else { + if x.CurrentAverageUtilization == nil { + x.CurrentAverageUtilization = new(int32) + } + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*int32)(x.CurrentAverageUtilization)) = int32(r.DecodeInt(32)) + } + } + case "currentAverageValue": + if r.TryDecodeAsNil() { + x.CurrentAverageValue = pkg1_resource.Quantity{} + } else { + yyv7 := &x.CurrentAverageValue + yym8 := z.DecBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.DecExt(yyv7) { + } else if !yym8 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv7) + } else { + z.DecFallback(yyv7, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ResourceMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv10 := &x.Name + yyv10.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.CurrentAverageUtilization != nil { + x.CurrentAverageUtilization = nil + } + } else { + if x.CurrentAverageUtilization == nil { + x.CurrentAverageUtilization = new(int32) + } + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*int32)(x.CurrentAverageUtilization)) = int32(r.DecodeInt(32)) + } + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.CurrentAverageValue = pkg1_resource.Quantity{} + } else { + yyv13 := &x.CurrentAverageValue + yym14 := z.DecBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.DecExt(yyv13) { + } else if !yym14 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv13) + } else { + z.DecFallback(yyv13, false) + } + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *HorizontalPodAutoscaler) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg3_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = HorizontalPodAutoscalerSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = HorizontalPodAutoscalerStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg3_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = HorizontalPodAutoscalerSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = HorizontalPodAutoscalerStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *HorizontalPodAutoscalerList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *HorizontalPodAutoscalerList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg3_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg3_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) encSliceMetricSpec(v []MetricSpec, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceMetricSpec(v *[]MetricSpec, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []MetricSpec{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 40) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]MetricSpec, yyrl1) + } + } else { + yyv1 = make([]MetricSpec, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = MetricSpec{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, MetricSpec{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = MetricSpec{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, MetricSpec{}) // var yyz1 MetricSpec + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = MetricSpec{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []MetricSpec{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceMetricStatus(v []MetricStatus, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceMetricStatus(v *[]MetricStatus, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []MetricStatus{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 40) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]MetricStatus, yyrl1) + } + } else { + yyv1 = make([]MetricStatus, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = MetricStatus{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, MetricStatus{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = MetricStatus{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, MetricStatus{}) // var yyz1 MetricStatus + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = MetricStatus{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []MetricStatus{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceHorizontalPodAutoscaler(v []HorizontalPodAutoscaler, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutoscaler, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []HorizontalPodAutoscaler{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 392) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]HorizontalPodAutoscaler, yyrl1) + } + } else { + yyv1 = make([]HorizontalPodAutoscaler, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = HorizontalPodAutoscaler{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, HorizontalPodAutoscaler{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = HorizontalPodAutoscaler{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, HorizontalPodAutoscaler{}) // var yyz1 HorizontalPodAutoscaler + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = HorizontalPodAutoscaler{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []HorizontalPodAutoscaler{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types.go new file mode 100644 index 000000000..4df8ae414 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types.go @@ -0,0 +1,269 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2alpha1 + +import ( + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/pkg/api/v1" +) + +// CrossVersionObjectReference contains enough information to let you identify the referred resource. +type CrossVersionObjectReference struct { + // Kind of the referent; More info: 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://kubernetes.io/docs/user-guide/identifiers#names + Name string `json:"name" protobuf:"bytes,2,opt,name=name"` + // API version of the referent + // +optional + APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"` +} + +// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. +type HorizontalPodAutoscalerSpec struct { + // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics + // should be collected, as well as to actually change the replica count. + ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef" protobuf:"bytes,1,opt,name=scaleTargetRef"` + // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. + // It defaults to 1 pod. + // +optional + MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"` + // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. + // It cannot be less that minReplicas. + MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"` + // metrics contains the specifications for which to use to calculate the + // desired replica count (the maximum replica count across all metrics will + // be used). The desired replica count is calculated multiplying the + // ratio between the target value and the current value by the current + // number of pods. Ergo, metrics used must decrease as the pod count is + // increased, and vice-versa. See the individual metric source types for + // more information about how each type of metric must respond. + // +optional + Metrics []MetricSpec `json:"metrics,omitempty" protobuf:"bytes,4,rep,name=metrics"` +} + +// MetricSourceType indicates the type of metric. +type MetricSourceType string + +var ( + // ObjectMetricSourceType is a metric describing a kubernetes object + // (for example, hits-per-second on an Ingress object). + ObjectMetricSourceType MetricSourceType = "Object" + // PodsMetricSourceType is a metric describing each pod in the current scale + // target (for example, transactions-processed-per-second). The values + // will be averaged together before being compared to the target value. + PodsMetricSourceType MetricSourceType = "Pods" + // ResourceMetricSourceType is a resource metric known to Kubernetes, as + // specified in requests and limits, describing each pod in the current + // scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics (the "pods" source). + ResourceMetricSourceType MetricSourceType = "Resource" +) + +// MetricSpec specifies how to scale based on a single metric +// (only `type` and one other matching field should be set at once). +type MetricSpec struct { + // type is the type of metric source. It should match one of the fields below. + Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"` + + // object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + // +optional + Object *ObjectMetricSource `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"` + // pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + // +optional + Pods *PodsMetricSource `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"` + // resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + // +optional + Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"` +} + +// ObjectMetricSource indicates how to scale on a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). +type ObjectMetricSource struct { + // target is the described Kubernetes object. + Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"` + + // metricName is the name of the metric in question. + MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"` + // targetValue is the target value of the metric (as a quantity). + TargetValue resource.Quantity `json:"targetValue" protobuf:"bytes,3,name=targetValue"` +} + +// PodsMetricSource indicates how to scale on a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). +// The values will be averaged together before being compared to the target +// value. +type PodsMetricSource struct { + // metricName is the name of the metric in question + MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"` + // targetAverageValue is the target value of the average of the + // metric across all relevant pods (as a quantity) + TargetAverageValue resource.Quantity `json:"targetAverageValue" protobuf:"bytes,2,name=targetAverageValue"` +} + +// ResourceMetricSource indicates how to scale on a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). The values will be averaged +// together before being compared to the target. Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. Only one "target" type +// should be set. +type ResourceMetricSource struct { + // name is the name of the resource in question. + Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"` + // targetAverageUtilization is the target value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. + // +optional + TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty" protobuf:"varint,2,opt,name=targetAverageUtilization"` + // targetAverageValue is the the target value of the average of the + // resource metric across all relevant pods, as a raw value (instead of as + // a percentage of the request), similar to the "pods" metric source type. + // +optional + TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,3,opt,name=targetAverageValue"` +} + +// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. +type HorizontalPodAutoscalerStatus struct { + // observedGeneration is the most recent generation observed by this autoscaler. + // +optional + ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` + + // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, + // used by the autoscaler to control how often the number of pods is changed. + // +optional + LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"` + + // currentReplicas is current number of replicas of pods managed by this autoscaler, + // as last seen by the autoscaler. + CurrentReplicas int32 `json:"currentReplicas" protobuf:"varint,3,opt,name=currentReplicas"` + + // desiredReplicas is the desired number of replicas of pods managed by this autoscaler, + // as last calculated by the autoscaler. + DesiredReplicas int32 `json:"desiredReplicas" protobuf:"varint,4,opt,name=desiredReplicas"` + + // currentMetrics is the last read state of the metrics used by this autoscaler. + CurrentMetrics []MetricStatus `json:"currentMetrics" protobuf:"bytes,5,rep,name=currentMetrics"` +} + +// MetricStatus describes the last-read state of a single metric. +type MetricStatus struct { + // type is the type of metric source. It will match one of the fields below. + Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"` + + // object refers to a metric describing a single kubernetes object + // (for example, hits-per-second on an Ingress object). + // +optional + Object *ObjectMetricStatus `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"` + // pods refers to a metric describing each pod in the current scale target + // (for example, transactions-processed-per-second). The values will be + // averaged together before being compared to the target value. + // +optional + Pods *PodsMetricStatus `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"` + // resource refers to a resource metric (such as those specified in + // requests and limits) known to Kubernetes describing each pod in the + // current scale target (e.g. CPU or memory). Such metrics are built in to + // Kubernetes, and have special scaling options on top of those available + // to normal per-pod metrics using the "pods" source. + // +optional + Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"` +} + +// ObjectMetricStatus indicates the current value of a metric describing a +// kubernetes object (for example, hits-per-second on an Ingress object). +type ObjectMetricStatus struct { + // target is the described Kubernetes object. + Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"` + + // metricName is the name of the metric in question. + MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"` + // currentValue is the current value of the metric (as a quantity). + CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"` +} + +// PodsMetricStatus indicates the current value of a metric describing each pod in +// the current scale target (for example, transactions-processed-per-second). +type PodsMetricStatus struct { + // metricName is the name of the metric in question + MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"` + // currentAverageValue is the current value of the average of the + // metric across all relevant pods (as a quantity) + CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,2,name=currentAverageValue"` +} + +// ResourceMetricStatus indicates the current value of a resource metric known to +// Kubernetes, as specified in requests and limits, describing each pod in the +// current scale target (e.g. CPU or memory). Such metrics are built in to +// Kubernetes, and have special scaling options on top of those available to +// normal per-pod metrics using the "pods" source. +type ResourceMetricStatus struct { + // name is the name of the resource in question. + Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"` + // currentAverageUtilization is the current value of the average of the + // resource metric across all relevant pods, represented as a percentage of + // the requested value of the resource for the pods. It will only be + // present if `targetAverageValue` was set in the corresponding metric + // specification. + // +optional + CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty" protobuf:"bytes,2,opt,name=currentAverageUtilization"` + // currentAverageValue is the the current value of the average of the + // resource metric across all relevant pods, as a raw value (instead of as + // a percentage of the request), similar to the "pods" metric source type. + // It will always be set, regardless of the corresponding metric specification. + CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,3,name=currentAverageValue"` +} + +// +genclient=true + +// HorizontalPodAutoscaler is the configuration for a horizontal pod +// autoscaler, which automatically manages the replica count of any resource +// implementing the scale subresource based on the metrics specified. +type HorizontalPodAutoscaler struct { + metav1.TypeMeta `json:",inline"` + // metadata is the standard object metadata. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // spec is the specification for the behaviour of the autoscaler. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + // +optional + Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + + // status is the current information about the autoscaler. + // +optional + Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. +type HorizontalPodAutoscalerList struct { + metav1.TypeMeta `json:",inline"` + // metadata is the standard list metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // items is the list of horizontal pod autoscaler objects. + Items []HorizontalPodAutoscaler `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types_swagger_doc_generated.go new file mode 100644 index 000000000..6030e2dc3 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types_swagger_doc_generated.go @@ -0,0 +1,175 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2alpha1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_CrossVersionObjectReference = map[string]string{ + "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", + "kind": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds\"", + "name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "apiVersion": "API version of the referent", +} + +func (CrossVersionObjectReference) SwaggerDoc() map[string]string { + return map_CrossVersionObjectReference +} + +var map_HorizontalPodAutoscaler = map[string]string{ + "": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", + "metadata": "metadata is the standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "spec": "spec is the specification for the behaviour of the autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", + "status": "status is the current information about the autoscaler.", +} + +func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string { + return map_HorizontalPodAutoscaler +} + +var map_HorizontalPodAutoscalerList = map[string]string{ + "": "HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.", + "metadata": "metadata is the standard list metadata.", + "items": "items is the list of horizontal pod autoscaler objects.", +} + +func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string { + return map_HorizontalPodAutoscalerList +} + +var map_HorizontalPodAutoscalerSpec = map[string]string{ + "": "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.", + "scaleTargetRef": "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", + "minReplicas": "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod.", + "maxReplicas": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", + "metrics": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.", +} + +func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string { + return map_HorizontalPodAutoscalerSpec +} + +var map_HorizontalPodAutoscalerStatus = map[string]string{ + "": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.", + "observedGeneration": "observedGeneration is the most recent generation observed by this autoscaler.", + "lastScaleTime": "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.", + "currentReplicas": "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.", + "desiredReplicas": "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.", + "currentMetrics": "currentMetrics is the last read state of the metrics used by this autoscaler.", +} + +func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string { + return map_HorizontalPodAutoscalerStatus +} + +var map_MetricSpec = map[string]string{ + "": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", + "type": "type is the type of metric source. It should match one of the fields below.", + "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", +} + +func (MetricSpec) SwaggerDoc() map[string]string { + return map_MetricSpec +} + +var map_MetricStatus = map[string]string{ + "": "MetricStatus describes the last-read state of a single metric.", + "type": "type is the type of metric source. It will match one of the fields below.", + "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", +} + +func (MetricStatus) SwaggerDoc() map[string]string { + return map_MetricStatus +} + +var map_ObjectMetricSource = map[string]string{ + "": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "target": "target is the described Kubernetes object.", + "metricName": "metricName is the name of the metric in question.", + "targetValue": "targetValue is the target value of the metric (as a quantity).", +} + +func (ObjectMetricSource) SwaggerDoc() map[string]string { + return map_ObjectMetricSource +} + +var map_ObjectMetricStatus = map[string]string{ + "": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "target": "target is the described Kubernetes object.", + "metricName": "metricName is the name of the metric in question.", + "currentValue": "currentValue is the current value of the metric (as a quantity).", +} + +func (ObjectMetricStatus) SwaggerDoc() map[string]string { + return map_ObjectMetricStatus +} + +var map_PodsMetricSource = map[string]string{ + "": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "metricName": "metricName is the name of the metric in question", + "targetAverageValue": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", +} + +func (PodsMetricSource) SwaggerDoc() map[string]string { + return map_PodsMetricSource +} + +var map_PodsMetricStatus = map[string]string{ + "": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + "metricName": "metricName is the name of the metric in question", + "currentAverageValue": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", +} + +func (PodsMetricStatus) SwaggerDoc() map[string]string { + return map_PodsMetricStatus +} + +var map_ResourceMetricSource = map[string]string{ + "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + "name": "name is the name of the resource in question.", + "targetAverageUtilization": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + "targetAverageValue": "targetAverageValue is the the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", +} + +func (ResourceMetricSource) SwaggerDoc() map[string]string { + return map_ResourceMetricSource +} + +var map_ResourceMetricStatus = map[string]string{ + "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "name": "name is the name of the resource in question.", + "currentAverageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", + "currentAverageValue": "currentAverageValue is the the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", +} + +func (ResourceMetricStatus) SwaggerDoc() map[string]string { + return map_ResourceMetricStatus +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.conversion.go new file mode 100644 index 000000000..70d11d5e8 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.conversion.go @@ -0,0 +1,387 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v2alpha1 + +import ( + resource "k8s.io/apimachinery/pkg/api/resource" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + api "k8s.io/client-go/pkg/api" + api_v1 "k8s.io/client-go/pkg/api/v1" + autoscaling "k8s.io/client-go/pkg/apis/autoscaling" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference, + Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference, + Convert_v2alpha1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler, + Convert_autoscaling_HorizontalPodAutoscaler_To_v2alpha1_HorizontalPodAutoscaler, + Convert_v2alpha1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList, + Convert_autoscaling_HorizontalPodAutoscalerList_To_v2alpha1_HorizontalPodAutoscalerList, + Convert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec, + Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec, + Convert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus, + Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus, + Convert_v2alpha1_MetricSpec_To_autoscaling_MetricSpec, + Convert_autoscaling_MetricSpec_To_v2alpha1_MetricSpec, + Convert_v2alpha1_MetricStatus_To_autoscaling_MetricStatus, + Convert_autoscaling_MetricStatus_To_v2alpha1_MetricStatus, + Convert_v2alpha1_ObjectMetricSource_To_autoscaling_ObjectMetricSource, + Convert_autoscaling_ObjectMetricSource_To_v2alpha1_ObjectMetricSource, + Convert_v2alpha1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus, + Convert_autoscaling_ObjectMetricStatus_To_v2alpha1_ObjectMetricStatus, + Convert_v2alpha1_PodsMetricSource_To_autoscaling_PodsMetricSource, + Convert_autoscaling_PodsMetricSource_To_v2alpha1_PodsMetricSource, + Convert_v2alpha1_PodsMetricStatus_To_autoscaling_PodsMetricStatus, + Convert_autoscaling_PodsMetricStatus_To_v2alpha1_PodsMetricStatus, + Convert_v2alpha1_ResourceMetricSource_To_autoscaling_ResourceMetricSource, + Convert_autoscaling_ResourceMetricSource_To_v2alpha1_ResourceMetricSource, + Convert_v2alpha1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus, + Convert_autoscaling_ResourceMetricStatus_To_v2alpha1_ResourceMetricStatus, + ) +} + +func autoConvert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error { + out.Kind = in.Kind + out.Name = in.Name + out.APIVersion = in.APIVersion + return nil +} + +func Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error { + return autoConvert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in, out, s) +} + +func autoConvert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *CrossVersionObjectReference, s conversion.Scope) error { + out.Kind = in.Kind + out.Name = in.Name + out.APIVersion = in.APIVersion + return nil +} + +func Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *CrossVersionObjectReference, s conversion.Scope) error { + return autoConvert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(in, out, s) +} + +func autoConvert_v2alpha1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v2alpha1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { + return autoConvert_v2alpha1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in, out, s) +} + +func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v2alpha1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_autoscaling_HorizontalPodAutoscaler_To_v2alpha1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error { + return autoConvert_autoscaling_HorizontalPodAutoscaler_To_v2alpha1_HorizontalPodAutoscaler(in, out, s) +} + +func autoConvert_v2alpha1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]autoscaling.HorizontalPodAutoscaler)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v2alpha1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error { + return autoConvert_v2alpha1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in, out, s) +} + +func autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v2alpha1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]HorizontalPodAutoscaler, 0) + } else { + out.Items = *(*[]HorizontalPodAutoscaler)(unsafe.Pointer(&in.Items)) + } + return nil +} + +func Convert_autoscaling_HorizontalPodAutoscalerList_To_v2alpha1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error { + return autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v2alpha1_HorizontalPodAutoscalerList(in, out, s) +} + +func autoConvert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error { + if err := Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil { + return err + } + out.MinReplicas = (*int32)(unsafe.Pointer(in.MinReplicas)) + out.MaxReplicas = in.MaxReplicas + out.Metrics = *(*[]autoscaling.MetricSpec)(unsafe.Pointer(&in.Metrics)) + return nil +} + +func Convert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error { + return autoConvert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in, out, s) +} + +func autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error { + if err := Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil { + return err + } + out.MinReplicas = (*int32)(unsafe.Pointer(in.MinReplicas)) + out.MaxReplicas = in.MaxReplicas + out.Metrics = *(*[]MetricSpec)(unsafe.Pointer(&in.Metrics)) + return nil +} + +func Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error { + return autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec(in, out, s) +} + +func autoConvert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error { + out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) + out.LastScaleTime = (*v1.Time)(unsafe.Pointer(in.LastScaleTime)) + out.CurrentReplicas = in.CurrentReplicas + out.DesiredReplicas = in.DesiredReplicas + out.CurrentMetrics = *(*[]autoscaling.MetricStatus)(unsafe.Pointer(&in.CurrentMetrics)) + return nil +} + +func Convert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error { + return autoConvert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in, out, s) +} + +func autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error { + out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) + out.LastScaleTime = (*v1.Time)(unsafe.Pointer(in.LastScaleTime)) + out.CurrentReplicas = in.CurrentReplicas + out.DesiredReplicas = in.DesiredReplicas + if in.CurrentMetrics == nil { + out.CurrentMetrics = make([]MetricStatus, 0) + } else { + out.CurrentMetrics = *(*[]MetricStatus)(unsafe.Pointer(&in.CurrentMetrics)) + } + return nil +} + +func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error { + return autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus(in, out, s) +} + +func autoConvert_v2alpha1_MetricSpec_To_autoscaling_MetricSpec(in *MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error { + out.Type = autoscaling.MetricSourceType(in.Type) + out.Object = (*autoscaling.ObjectMetricSource)(unsafe.Pointer(in.Object)) + out.Pods = (*autoscaling.PodsMetricSource)(unsafe.Pointer(in.Pods)) + out.Resource = (*autoscaling.ResourceMetricSource)(unsafe.Pointer(in.Resource)) + return nil +} + +func Convert_v2alpha1_MetricSpec_To_autoscaling_MetricSpec(in *MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error { + return autoConvert_v2alpha1_MetricSpec_To_autoscaling_MetricSpec(in, out, s) +} + +func autoConvert_autoscaling_MetricSpec_To_v2alpha1_MetricSpec(in *autoscaling.MetricSpec, out *MetricSpec, s conversion.Scope) error { + out.Type = MetricSourceType(in.Type) + out.Object = (*ObjectMetricSource)(unsafe.Pointer(in.Object)) + out.Pods = (*PodsMetricSource)(unsafe.Pointer(in.Pods)) + out.Resource = (*ResourceMetricSource)(unsafe.Pointer(in.Resource)) + return nil +} + +func Convert_autoscaling_MetricSpec_To_v2alpha1_MetricSpec(in *autoscaling.MetricSpec, out *MetricSpec, s conversion.Scope) error { + return autoConvert_autoscaling_MetricSpec_To_v2alpha1_MetricSpec(in, out, s) +} + +func autoConvert_v2alpha1_MetricStatus_To_autoscaling_MetricStatus(in *MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error { + out.Type = autoscaling.MetricSourceType(in.Type) + out.Object = (*autoscaling.ObjectMetricStatus)(unsafe.Pointer(in.Object)) + out.Pods = (*autoscaling.PodsMetricStatus)(unsafe.Pointer(in.Pods)) + out.Resource = (*autoscaling.ResourceMetricStatus)(unsafe.Pointer(in.Resource)) + return nil +} + +func Convert_v2alpha1_MetricStatus_To_autoscaling_MetricStatus(in *MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error { + return autoConvert_v2alpha1_MetricStatus_To_autoscaling_MetricStatus(in, out, s) +} + +func autoConvert_autoscaling_MetricStatus_To_v2alpha1_MetricStatus(in *autoscaling.MetricStatus, out *MetricStatus, s conversion.Scope) error { + out.Type = MetricSourceType(in.Type) + out.Object = (*ObjectMetricStatus)(unsafe.Pointer(in.Object)) + out.Pods = (*PodsMetricStatus)(unsafe.Pointer(in.Pods)) + out.Resource = (*ResourceMetricStatus)(unsafe.Pointer(in.Resource)) + return nil +} + +func Convert_autoscaling_MetricStatus_To_v2alpha1_MetricStatus(in *autoscaling.MetricStatus, out *MetricStatus, s conversion.Scope) error { + return autoConvert_autoscaling_MetricStatus_To_v2alpha1_MetricStatus(in, out, s) +} + +func autoConvert_v2alpha1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error { + if err := Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil { + return err + } + out.MetricName = in.MetricName + out.TargetValue = in.TargetValue + return nil +} + +func Convert_v2alpha1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error { + return autoConvert_v2alpha1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in, out, s) +} + +func autoConvert_autoscaling_ObjectMetricSource_To_v2alpha1_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *ObjectMetricSource, s conversion.Scope) error { + if err := Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil { + return err + } + out.MetricName = in.MetricName + out.TargetValue = in.TargetValue + return nil +} + +func Convert_autoscaling_ObjectMetricSource_To_v2alpha1_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *ObjectMetricSource, s conversion.Scope) error { + return autoConvert_autoscaling_ObjectMetricSource_To_v2alpha1_ObjectMetricSource(in, out, s) +} + +func autoConvert_v2alpha1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error { + if err := Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil { + return err + } + out.MetricName = in.MetricName + out.CurrentValue = in.CurrentValue + return nil +} + +func Convert_v2alpha1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error { + return autoConvert_v2alpha1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in, out, s) +} + +func autoConvert_autoscaling_ObjectMetricStatus_To_v2alpha1_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *ObjectMetricStatus, s conversion.Scope) error { + if err := Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil { + return err + } + out.MetricName = in.MetricName + out.CurrentValue = in.CurrentValue + return nil +} + +func Convert_autoscaling_ObjectMetricStatus_To_v2alpha1_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *ObjectMetricStatus, s conversion.Scope) error { + return autoConvert_autoscaling_ObjectMetricStatus_To_v2alpha1_ObjectMetricStatus(in, out, s) +} + +func autoConvert_v2alpha1_PodsMetricSource_To_autoscaling_PodsMetricSource(in *PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error { + out.MetricName = in.MetricName + out.TargetAverageValue = in.TargetAverageValue + return nil +} + +func Convert_v2alpha1_PodsMetricSource_To_autoscaling_PodsMetricSource(in *PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error { + return autoConvert_v2alpha1_PodsMetricSource_To_autoscaling_PodsMetricSource(in, out, s) +} + +func autoConvert_autoscaling_PodsMetricSource_To_v2alpha1_PodsMetricSource(in *autoscaling.PodsMetricSource, out *PodsMetricSource, s conversion.Scope) error { + out.MetricName = in.MetricName + out.TargetAverageValue = in.TargetAverageValue + return nil +} + +func Convert_autoscaling_PodsMetricSource_To_v2alpha1_PodsMetricSource(in *autoscaling.PodsMetricSource, out *PodsMetricSource, s conversion.Scope) error { + return autoConvert_autoscaling_PodsMetricSource_To_v2alpha1_PodsMetricSource(in, out, s) +} + +func autoConvert_v2alpha1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error { + out.MetricName = in.MetricName + out.CurrentAverageValue = in.CurrentAverageValue + return nil +} + +func Convert_v2alpha1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error { + return autoConvert_v2alpha1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in, out, s) +} + +func autoConvert_autoscaling_PodsMetricStatus_To_v2alpha1_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *PodsMetricStatus, s conversion.Scope) error { + out.MetricName = in.MetricName + out.CurrentAverageValue = in.CurrentAverageValue + return nil +} + +func Convert_autoscaling_PodsMetricStatus_To_v2alpha1_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *PodsMetricStatus, s conversion.Scope) error { + return autoConvert_autoscaling_PodsMetricStatus_To_v2alpha1_PodsMetricStatus(in, out, s) +} + +func autoConvert_v2alpha1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error { + out.Name = api.ResourceName(in.Name) + out.TargetAverageUtilization = (*int32)(unsafe.Pointer(in.TargetAverageUtilization)) + out.TargetAverageValue = (*resource.Quantity)(unsafe.Pointer(in.TargetAverageValue)) + return nil +} + +func Convert_v2alpha1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error { + return autoConvert_v2alpha1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in, out, s) +} + +func autoConvert_autoscaling_ResourceMetricSource_To_v2alpha1_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *ResourceMetricSource, s conversion.Scope) error { + out.Name = api_v1.ResourceName(in.Name) + out.TargetAverageUtilization = (*int32)(unsafe.Pointer(in.TargetAverageUtilization)) + out.TargetAverageValue = (*resource.Quantity)(unsafe.Pointer(in.TargetAverageValue)) + return nil +} + +func Convert_autoscaling_ResourceMetricSource_To_v2alpha1_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *ResourceMetricSource, s conversion.Scope) error { + return autoConvert_autoscaling_ResourceMetricSource_To_v2alpha1_ResourceMetricSource(in, out, s) +} + +func autoConvert_v2alpha1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error { + out.Name = api.ResourceName(in.Name) + out.CurrentAverageUtilization = (*int32)(unsafe.Pointer(in.CurrentAverageUtilization)) + out.CurrentAverageValue = in.CurrentAverageValue + return nil +} + +func Convert_v2alpha1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error { + return autoConvert_v2alpha1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in, out, s) +} + +func autoConvert_autoscaling_ResourceMetricStatus_To_v2alpha1_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *ResourceMetricStatus, s conversion.Scope) error { + out.Name = api_v1.ResourceName(in.Name) + out.CurrentAverageUtilization = (*int32)(unsafe.Pointer(in.CurrentAverageUtilization)) + out.CurrentAverageValue = in.CurrentAverageValue + return nil +} + +func Convert_autoscaling_ResourceMetricStatus_To_v2alpha1_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *ResourceMetricStatus, s conversion.Scope) error { + return autoConvert_autoscaling_ResourceMetricStatus_To_v2alpha1_ResourceMetricStatus(in, out, s) +} diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.deepcopy.go new file mode 100644 index 000000000..1953eaea6 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.deepcopy.go @@ -0,0 +1,285 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v2alpha1 + +import ( + resource "k8s.io/apimachinery/pkg/api/resource" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_MetricSpec, InType: reflect.TypeOf(&MetricSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_MetricStatus, InType: reflect.TypeOf(&MetricStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ObjectMetricSource, InType: reflect.TypeOf(&ObjectMetricSource{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ObjectMetricStatus, InType: reflect.TypeOf(&ObjectMetricStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_PodsMetricSource, InType: reflect.TypeOf(&PodsMetricSource{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_PodsMetricStatus, InType: reflect.TypeOf(&PodsMetricStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ResourceMetricSource, InType: reflect.TypeOf(&ResourceMetricSource{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ResourceMetricStatus, InType: reflect.TypeOf(&ResourceMetricStatus{})}, + ) +} + +func DeepCopy_v2alpha1_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CrossVersionObjectReference) + out := out.(*CrossVersionObjectReference) + *out = *in + return nil + } +} + +func DeepCopy_v2alpha1_HorizontalPodAutoscaler(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*HorizontalPodAutoscaler) + out := out.(*HorizontalPodAutoscaler) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_v2alpha1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + if err := DeepCopy_v2alpha1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v2alpha1_HorizontalPodAutoscalerList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*HorizontalPodAutoscalerList) + out := out.(*HorizontalPodAutoscalerList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]HorizontalPodAutoscaler, len(*in)) + for i := range *in { + if err := DeepCopy_v2alpha1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v2alpha1_HorizontalPodAutoscalerSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*HorizontalPodAutoscalerSpec) + out := out.(*HorizontalPodAutoscalerSpec) + *out = *in + if in.MinReplicas != nil { + in, out := &in.MinReplicas, &out.MinReplicas + *out = new(int32) + **out = **in + } + if in.Metrics != nil { + in, out := &in.Metrics, &out.Metrics + *out = make([]MetricSpec, len(*in)) + for i := range *in { + if err := DeepCopy_v2alpha1_MetricSpec(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v2alpha1_HorizontalPodAutoscalerStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*HorizontalPodAutoscalerStatus) + out := out.(*HorizontalPodAutoscalerStatus) + *out = *in + if in.ObservedGeneration != nil { + in, out := &in.ObservedGeneration, &out.ObservedGeneration + *out = new(int64) + **out = **in + } + if in.LastScaleTime != nil { + in, out := &in.LastScaleTime, &out.LastScaleTime + *out = new(v1.Time) + **out = (*in).DeepCopy() + } + if in.CurrentMetrics != nil { + in, out := &in.CurrentMetrics, &out.CurrentMetrics + *out = make([]MetricStatus, len(*in)) + for i := range *in { + if err := DeepCopy_v2alpha1_MetricStatus(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v2alpha1_MetricSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*MetricSpec) + out := out.(*MetricSpec) + *out = *in + if in.Object != nil { + in, out := &in.Object, &out.Object + *out = new(ObjectMetricSource) + if err := DeepCopy_v2alpha1_ObjectMetricSource(*in, *out, c); err != nil { + return err + } + } + if in.Pods != nil { + in, out := &in.Pods, &out.Pods + *out = new(PodsMetricSource) + if err := DeepCopy_v2alpha1_PodsMetricSource(*in, *out, c); err != nil { + return err + } + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ResourceMetricSource) + if err := DeepCopy_v2alpha1_ResourceMetricSource(*in, *out, c); err != nil { + return err + } + } + return nil + } +} + +func DeepCopy_v2alpha1_MetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*MetricStatus) + out := out.(*MetricStatus) + *out = *in + if in.Object != nil { + in, out := &in.Object, &out.Object + *out = new(ObjectMetricStatus) + if err := DeepCopy_v2alpha1_ObjectMetricStatus(*in, *out, c); err != nil { + return err + } + } + if in.Pods != nil { + in, out := &in.Pods, &out.Pods + *out = new(PodsMetricStatus) + if err := DeepCopy_v2alpha1_PodsMetricStatus(*in, *out, c); err != nil { + return err + } + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ResourceMetricStatus) + if err := DeepCopy_v2alpha1_ResourceMetricStatus(*in, *out, c); err != nil { + return err + } + } + return nil + } +} + +func DeepCopy_v2alpha1_ObjectMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ObjectMetricSource) + out := out.(*ObjectMetricSource) + *out = *in + out.TargetValue = in.TargetValue.DeepCopy() + return nil + } +} + +func DeepCopy_v2alpha1_ObjectMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ObjectMetricStatus) + out := out.(*ObjectMetricStatus) + *out = *in + out.CurrentValue = in.CurrentValue.DeepCopy() + return nil + } +} + +func DeepCopy_v2alpha1_PodsMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodsMetricSource) + out := out.(*PodsMetricSource) + *out = *in + out.TargetAverageValue = in.TargetAverageValue.DeepCopy() + return nil + } +} + +func DeepCopy_v2alpha1_PodsMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodsMetricStatus) + out := out.(*PodsMetricStatus) + *out = *in + out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy() + return nil + } +} + +func DeepCopy_v2alpha1_ResourceMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ResourceMetricSource) + out := out.(*ResourceMetricSource) + *out = *in + if in.TargetAverageUtilization != nil { + in, out := &in.TargetAverageUtilization, &out.TargetAverageUtilization + *out = new(int32) + **out = **in + } + if in.TargetAverageValue != nil { + in, out := &in.TargetAverageValue, &out.TargetAverageValue + *out = new(resource.Quantity) + **out = (*in).DeepCopy() + } + return nil + } +} + +func DeepCopy_v2alpha1_ResourceMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ResourceMetricStatus) + out := out.(*ResourceMetricStatus) + *out = *in + if in.CurrentAverageUtilization != nil { + in, out := &in.CurrentAverageUtilization, &out.CurrentAverageUtilization + *out = new(int32) + **out = **in + } + out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy() + return nil + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/zz_generated.deepcopy.go new file mode 100644 index 000000000..8639502a9 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/zz_generated.deepcopy.go @@ -0,0 +1,320 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package autoscaling + +import ( + resource "k8s.io/apimachinery/pkg/api/resource" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_MetricSpec, InType: reflect.TypeOf(&MetricSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_MetricStatus, InType: reflect.TypeOf(&MetricStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ObjectMetricSource, InType: reflect.TypeOf(&ObjectMetricSource{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ObjectMetricStatus, InType: reflect.TypeOf(&ObjectMetricStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_PodsMetricSource, InType: reflect.TypeOf(&PodsMetricSource{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_PodsMetricStatus, InType: reflect.TypeOf(&PodsMetricStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ResourceMetricSource, InType: reflect.TypeOf(&ResourceMetricSource{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ResourceMetricStatus, InType: reflect.TypeOf(&ResourceMetricStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_Scale, InType: reflect.TypeOf(&Scale{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})}, + ) +} + +func DeepCopy_autoscaling_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CrossVersionObjectReference) + out := out.(*CrossVersionObjectReference) + *out = *in + return nil + } +} + +func DeepCopy_autoscaling_HorizontalPodAutoscaler(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*HorizontalPodAutoscaler) + out := out.(*HorizontalPodAutoscaler) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + if err := DeepCopy_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_autoscaling_HorizontalPodAutoscalerList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*HorizontalPodAutoscalerList) + out := out.(*HorizontalPodAutoscalerList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]HorizontalPodAutoscaler, len(*in)) + for i := range *in { + if err := DeepCopy_autoscaling_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_autoscaling_HorizontalPodAutoscalerSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*HorizontalPodAutoscalerSpec) + out := out.(*HorizontalPodAutoscalerSpec) + *out = *in + if in.MinReplicas != nil { + in, out := &in.MinReplicas, &out.MinReplicas + *out = new(int32) + **out = **in + } + if in.Metrics != nil { + in, out := &in.Metrics, &out.Metrics + *out = make([]MetricSpec, len(*in)) + for i := range *in { + if err := DeepCopy_autoscaling_MetricSpec(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_autoscaling_HorizontalPodAutoscalerStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*HorizontalPodAutoscalerStatus) + out := out.(*HorizontalPodAutoscalerStatus) + *out = *in + if in.ObservedGeneration != nil { + in, out := &in.ObservedGeneration, &out.ObservedGeneration + *out = new(int64) + **out = **in + } + if in.LastScaleTime != nil { + in, out := &in.LastScaleTime, &out.LastScaleTime + *out = new(v1.Time) + **out = (*in).DeepCopy() + } + if in.CurrentMetrics != nil { + in, out := &in.CurrentMetrics, &out.CurrentMetrics + *out = make([]MetricStatus, len(*in)) + for i := range *in { + if err := DeepCopy_autoscaling_MetricStatus(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_autoscaling_MetricSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*MetricSpec) + out := out.(*MetricSpec) + *out = *in + if in.Object != nil { + in, out := &in.Object, &out.Object + *out = new(ObjectMetricSource) + if err := DeepCopy_autoscaling_ObjectMetricSource(*in, *out, c); err != nil { + return err + } + } + if in.Pods != nil { + in, out := &in.Pods, &out.Pods + *out = new(PodsMetricSource) + if err := DeepCopy_autoscaling_PodsMetricSource(*in, *out, c); err != nil { + return err + } + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ResourceMetricSource) + if err := DeepCopy_autoscaling_ResourceMetricSource(*in, *out, c); err != nil { + return err + } + } + return nil + } +} + +func DeepCopy_autoscaling_MetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*MetricStatus) + out := out.(*MetricStatus) + *out = *in + if in.Object != nil { + in, out := &in.Object, &out.Object + *out = new(ObjectMetricStatus) + if err := DeepCopy_autoscaling_ObjectMetricStatus(*in, *out, c); err != nil { + return err + } + } + if in.Pods != nil { + in, out := &in.Pods, &out.Pods + *out = new(PodsMetricStatus) + if err := DeepCopy_autoscaling_PodsMetricStatus(*in, *out, c); err != nil { + return err + } + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ResourceMetricStatus) + if err := DeepCopy_autoscaling_ResourceMetricStatus(*in, *out, c); err != nil { + return err + } + } + return nil + } +} + +func DeepCopy_autoscaling_ObjectMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ObjectMetricSource) + out := out.(*ObjectMetricSource) + *out = *in + out.TargetValue = in.TargetValue.DeepCopy() + return nil + } +} + +func DeepCopy_autoscaling_ObjectMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ObjectMetricStatus) + out := out.(*ObjectMetricStatus) + *out = *in + out.CurrentValue = in.CurrentValue.DeepCopy() + return nil + } +} + +func DeepCopy_autoscaling_PodsMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodsMetricSource) + out := out.(*PodsMetricSource) + *out = *in + out.TargetAverageValue = in.TargetAverageValue.DeepCopy() + return nil + } +} + +func DeepCopy_autoscaling_PodsMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodsMetricStatus) + out := out.(*PodsMetricStatus) + *out = *in + out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy() + return nil + } +} + +func DeepCopy_autoscaling_ResourceMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ResourceMetricSource) + out := out.(*ResourceMetricSource) + *out = *in + if in.TargetAverageUtilization != nil { + in, out := &in.TargetAverageUtilization, &out.TargetAverageUtilization + *out = new(int32) + **out = **in + } + if in.TargetAverageValue != nil { + in, out := &in.TargetAverageValue, &out.TargetAverageValue + *out = new(resource.Quantity) + **out = (*in).DeepCopy() + } + return nil + } +} + +func DeepCopy_autoscaling_ResourceMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ResourceMetricStatus) + out := out.(*ResourceMetricStatus) + *out = *in + if in.CurrentAverageUtilization != nil { + in, out := &in.CurrentAverageUtilization, &out.CurrentAverageUtilization + *out = new(int32) + **out = **in + } + out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy() + return nil + } +} + +func DeepCopy_autoscaling_Scale(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Scale) + out := out.(*Scale) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + return nil + } +} + +func DeepCopy_autoscaling_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ScaleSpec) + out := out.(*ScaleSpec) + *out = *in + return nil + } +} + +func DeepCopy_autoscaling_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ScaleStatus) + out := out.(*ScaleStatus) + *out = *in + return nil + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/OWNERS b/vendor/k8s.io/client-go/pkg/apis/batch/OWNERS new file mode 100755 index 000000000..502f90771 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/OWNERS @@ -0,0 +1,19 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- caesarxuchao +- erictune +- sttts +- saad-ali +- ncdc +- timothysc +- soltysh +- dims +- errordeveloper +- mml +- mbohlool +- david-mcmahon +- jianhuiz diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/doc.go b/vendor/k8s.io/client-go/pkg/apis/batch/doc.go new file mode 100644 index 000000000..6fe952226 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package batch diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/install/install.go b/vendor/k8s.io/client-go/pkg/apis/batch/install/install.go similarity index 63% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/install/install.go rename to vendor/k8s.io/client-go/pkg/apis/batch/install/install.go index 9e511cea8..d37f31820 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/install/install.go +++ b/vendor/k8s.io/client-go/pkg/apis/batch/install/install.go @@ -19,25 +19,33 @@ limitations under the License. package install import ( - "k8s.io/client-go/1.5/pkg/apimachinery/announced" - "k8s.io/client-go/1.5/pkg/apis/batch" - "k8s.io/client-go/1.5/pkg/apis/batch/v1" - "k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/apis/batch" + "k8s.io/client-go/pkg/apis/batch/v1" + "k8s.io/client-go/pkg/apis/batch/v2alpha1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: batch.GroupName, VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version, v2alpha1.SchemeGroupVersion.Version}, - ImportPrefix: "k8s.io/client-go/1.5/pkg/apis/batch", + ImportPrefix: "k8s.io/client-go/pkg/apis/batch", AddInternalObjectsToScheme: batch.AddToScheme, }, announced.VersionToSchemeFunc{ v1.SchemeGroupVersion.Version: v1.AddToScheme, v2alpha1.SchemeGroupVersion.Version: v2alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/register.go b/vendor/k8s.io/client-go/pkg/apis/batch/register.go similarity index 73% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/register.go rename to vendor/k8s.io/client-go/pkg/apis/batch/register.go index 19f8e72ae..4601ca4ec 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/batch/register.go @@ -17,24 +17,23 @@ limitations under the License. package batch import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "batch" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} // Kind takes an unqualified kind and returns a Group qualified GroupKind -func Kind(kind string) unversioned.GroupKind { +func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) unversioned.GroupResource { +func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } @@ -49,9 +48,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { &Job{}, &JobList{}, &JobTemplate{}, - &ScheduledJob{}, - &ScheduledJobList{}, - &api.ListOptions{}, + &CronJob{}, + &CronJobList{}, ) + scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJob"), &CronJob{}) + scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJobList"), &CronJobList{}) return nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/types.go b/vendor/k8s.io/client-go/pkg/apis/batch/types.go similarity index 71% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/types.go rename to vendor/k8s.io/client-go/pkg/apis/batch/types.go index 3c8aec5a1..7a2ad011f 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/types.go +++ b/vendor/k8s.io/client-go/pkg/apis/batch/types.go @@ -17,60 +17,68 @@ limitations under the License. package batch import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/pkg/api" ) // +genclient=true // Job represents the configuration of a single job. type Job struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - api.ObjectMeta `json:"metadata,omitempty"` + // +optional + metav1.ObjectMeta // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Spec JobSpec `json:"spec,omitempty"` + // +optional + Spec JobSpec // Status is a structure describing current status of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Status JobStatus `json:"status,omitempty"` + // +optional + Status JobStatus } // JobList is a collection of jobs. type JobList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Standard list metadata // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty"` + // +optional + metav1.ListMeta // Items is the list of Job. - Items []Job `json:"items"` + Items []Job } // JobTemplate describes a template for creating copies of a predefined pod. type JobTemplate struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - api.ObjectMeta `json:"metadata,omitempty"` + // +optional + metav1.ObjectMeta // Template defines jobs that will be created from this template // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Template JobTemplateSpec `json:"template,omitempty"` + // +optional + Template JobTemplateSpec } // JobTemplateSpec describes the data a Job should have when created from a template type JobTemplateSpec struct { // Standard object's metadata of the jobs created from this template. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - api.ObjectMeta `json:"metadata,omitempty"` + // +optional + metav1.ObjectMeta // Specification of the desired behavior of the job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Spec JobSpec `json:"spec,omitempty"` + // +optional + Spec JobSpec } // JobSpec describes how the job execution will look like. @@ -80,22 +88,26 @@ type JobSpec struct { // run at any given time. The actual number of pods running in steady state will // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), // i.e. when the work left to do is less than max parallelism. - Parallelism *int32 `json:"parallelism,omitempty"` + // +optional + Parallelism *int32 // Completions specifies the desired number of successfully finished pods the // job should be run with. Setting to nil means that the success of any // pod signals the success of all pods, and allows parallelism to have any positive // value. Setting to 1 means that parallelism is limited to 1 and the success of that // pod signals the success of the job. - Completions *int32 `json:"completions,omitempty"` + // +optional + Completions *int32 // Optional duration in seconds relative to the startTime that the job may be active // before the system tries to terminate it; value must be positive integer - ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` + // +optional + ActiveDeadlineSeconds *int64 // Selector is a label query over pods that should match the pod count. // Normally, the system sets this field for you. - Selector *unversioned.LabelSelector `json:"selector,omitempty"` + // +optional + Selector *metav1.LabelSelector // ManualSelector controls generation of pod labels and pod selectors. // Leave `manualSelector` unset unless you are certain what you are doing. @@ -106,37 +118,44 @@ type JobSpec struct { // and other jobs to not function correctly. However, You may see // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` // API. - ManualSelector *bool `json:"manualSelector,omitempty"` + // +optional + ManualSelector *bool // Template is the object that describes the pod that will be created when // executing a job. - Template api.PodTemplateSpec `json:"template"` + Template api.PodTemplateSpec } // JobStatus represents the current state of a Job. type JobStatus struct { // Conditions represent the latest available observations of an object's current state. - Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + // +optional + Conditions []JobCondition // StartTime represents time when the job was acknowledged by the Job Manager. // It is not guaranteed to be set in happens-before order across separate operations. // It is represented in RFC3339 form and is in UTC. - StartTime *unversioned.Time `json:"startTime,omitempty"` + // +optional + StartTime *metav1.Time // CompletionTime represents time when the job was completed. It is not guaranteed to // be set in happens-before order across separate operations. // It is represented in RFC3339 form and is in UTC. - CompletionTime *unversioned.Time `json:"completionTime,omitempty"` + // +optional + CompletionTime *metav1.Time // Active is the number of actively running pods. - Active int32 `json:"active,omitempty"` + // +optional + Active int32 // Succeeded is the number of pods which reached Phase Succeeded. - Succeeded int32 `json:"succeeded,omitempty"` + // +optional + Succeeded int32 // Failed is the number of pods which reached Phase Failed. - Failed int32 `json:"failed,omitempty"` + // +optional + Failed int32 } type JobConditionType string @@ -152,68 +171,89 @@ const ( // JobCondition describes current state of a job. type JobCondition struct { // Type of job condition, Complete or Failed. - Type JobConditionType `json:"type"` + Type JobConditionType // Status of the condition, one of True, False, Unknown. - Status api.ConditionStatus `json:"status"` + Status api.ConditionStatus // Last time the condition was checked. - LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"` + // +optional + LastProbeTime metav1.Time // Last time the condition transit from one status to another. - LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"` + // +optional + LastTransitionTime metav1.Time // (brief) reason for the condition's last transition. - Reason string `json:"reason,omitempty"` + // +optional + Reason string // Human readable message indicating details about last transition. - Message string `json:"message,omitempty"` + // +optional + Message string } // +genclient=true -// ScheduledJob represents the configuration of a single scheduled job. -type ScheduledJob struct { - unversioned.TypeMeta `json:",inline"` +// CronJob represents the configuration of a single cron job. +type CronJob struct { + metav1.TypeMeta // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - api.ObjectMeta `json:"metadata,omitempty"` + // +optional + metav1.ObjectMeta // Spec is a structure defining the expected behavior of a job, including the schedule. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Spec ScheduledJobSpec `json:"spec,omitempty"` + // +optional + Spec CronJobSpec // Status is a structure describing current status of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Status ScheduledJobStatus `json:"status,omitempty"` + // +optional + Status CronJobStatus } -// ScheduledJobList is a collection of scheduled jobs. -type ScheduledJobList struct { - unversioned.TypeMeta `json:",inline"` +// CronJobList is a collection of cron jobs. +type CronJobList struct { + metav1.TypeMeta // Standard list metadata // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty"` + // +optional + metav1.ListMeta - // Items is the list of ScheduledJob. - Items []ScheduledJob `json:"items"` + // Items is the list of CronJob. + Items []CronJob } -// ScheduledJobSpec describes how the job execution will look like and when it will actually run. -type ScheduledJobSpec struct { +// CronJobSpec describes how the job execution will look like and when it will actually run. +type CronJobSpec struct { // Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. - Schedule string `json:"schedule"` + Schedule string // Optional deadline in seconds for starting the job if it misses scheduled // time for any reason. Missed jobs executions will be counted as failed ones. - StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` + // +optional + StartingDeadlineSeconds *int64 // ConcurrencyPolicy specifies how to treat concurrent executions of a Job. - ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` + // +optional + ConcurrencyPolicy ConcurrencyPolicy // Suspend flag tells the controller to suspend subsequent executions, it does // not apply to already started executions. Defaults to false. - Suspend *bool `json:"suspend,omitempty"` + // +optional + Suspend *bool // JobTemplate is the object that describes the job that will be created when - // executing a ScheduledJob. - JobTemplate JobTemplateSpec `json:"jobTemplate"` + // executing a CronJob. + JobTemplate JobTemplateSpec + + // The number of successful finished jobs to retain. + // This is a pointer to distinguish between explicit zero and not specified. + // +optional + SuccessfulJobsHistoryLimit *int32 + + // The number of failed finished jobs to retain. + // This is a pointer to distinguish between explicit zero and not specified. + // +optional + FailedJobsHistoryLimit *int32 } // ConcurrencyPolicy describes how the job will be handled. @@ -223,7 +263,7 @@ type ScheduledJobSpec struct { type ConcurrencyPolicy string const ( - // AllowConcurrent allows ScheduledJobs to run concurrently. + // AllowConcurrent allows CronJobs to run concurrently. AllowConcurrent ConcurrencyPolicy = "Allow" // ForbidConcurrent forbids concurrent runs, skipping next run if previous @@ -234,11 +274,13 @@ const ( ReplaceConcurrent ConcurrencyPolicy = "Replace" ) -// ScheduledJobStatus represents the current state of a Job. -type ScheduledJobStatus struct { +// CronJobStatus represents the current state of a cron job. +type CronJobStatus struct { // Active holds pointers to currently running jobs. - Active []api.ObjectReference `json:"active,omitempty"` + // +optional + Active []api.ObjectReference // LastScheduleTime keeps information of when was the last time the job was successfully scheduled. - LastScheduleTime *unversioned.Time `json:"lastScheduleTime,omitempty"` + // +optional + LastScheduleTime *metav1.Time } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/conversion.go similarity index 67% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/conversion.go rename to vendor/k8s.io/client-go/pkg/apis/batch/v1/conversion.go index 30bcf44a6..7f2bc9d15 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/conversion.go +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/conversion.go @@ -19,12 +19,10 @@ package v1 import ( "fmt" - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/apis/batch" - "k8s.io/client-go/1.5/pkg/conversion" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/pkg/apis/batch" ) func addConversionFuncs(scheme *runtime.Scheme) error { @@ -37,13 +35,13 @@ func addConversionFuncs(scheme *runtime.Scheme) error { return err } - return api.Scheme.AddFieldLabelConversionFunc("batch/v1", "Job", + return scheme.AddFieldLabelConversionFunc("batch/v1", "Job", func(label, value string) (string, string, error) { switch label { case "metadata.name", "metadata.namespace", "status.successful": return label, value, nil default: - return "", "", fmt.Errorf("field label not supported: %s", label) + return "", "", fmt.Errorf("field label %q not supported for Job", label) } }, ) @@ -53,15 +51,7 @@ func Convert_batch_JobSpec_To_v1_JobSpec(in *batch.JobSpec, out *JobSpec, s conv out.Parallelism = in.Parallelism out.Completions = in.Completions out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds - // unable to generate simple pointer conversion for unversioned.LabelSelector -> v1.LabelSelector - if in.Selector != nil { - out.Selector = new(LabelSelector) - if err := Convert_unversioned_LabelSelector_To_v1_LabelSelector(in.Selector, out.Selector, s); err != nil { - return err - } - } else { - out.Selector = nil - } + out.Selector = in.Selector if in.ManualSelector != nil { out.ManualSelector = new(bool) *out.ManualSelector = *in.ManualSelector @@ -79,15 +69,7 @@ func Convert_v1_JobSpec_To_batch_JobSpec(in *JobSpec, out *batch.JobSpec, s conv out.Parallelism = in.Parallelism out.Completions = in.Completions out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds - // unable to generate simple pointer conversion for v1.LabelSelector -> unversioned.LabelSelector - if in.Selector != nil { - out.Selector = new(unversioned.LabelSelector) - if err := Convert_v1_LabelSelector_To_unversioned_LabelSelector(in.Selector, out.Selector, s); err != nil { - return err - } - } else { - out.Selector = nil - } + out.Selector = in.Selector if in.ManualSelector != nil { out.ManualSelector = new(bool) *out.ManualSelector = *in.ManualSelector diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/defaults.go similarity index 95% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/defaults.go rename to vendor/k8s.io/client-go/pkg/apis/batch/v1/defaults.go index bc05051f1..3603247f2 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/defaults.go +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/defaults.go @@ -17,10 +17,11 @@ limitations under the License. package v1 import ( - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { + RegisterDefaults(scheme) return scheme.AddDefaultingFuncs( SetDefaults_Job, ) diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/doc.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/doc.go new file mode 100644 index 000000000..c7be42d5a --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/generated.pb.go similarity index 63% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/generated.pb.go rename to vendor/k8s.io/client-go/pkg/apis/batch/v1/generated.pb.go index 427fc2492..0ebc07be7 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/generated.pb.go +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -30,8 +30,6 @@ limitations under the License. JobList JobSpec JobStatus - LabelSelector - LabelSelectorRequirement */ package v1 @@ -39,12 +37,12 @@ import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" -import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/1.5/pkg/api/v1" +import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1" import strings "strings" import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" @@ -77,24 +75,12 @@ func (m *JobStatus) Reset() { *m = JobStatus{} } func (*JobStatus) ProtoMessage() {} func (*JobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } -func (m *LabelSelector) Reset() { *m = LabelSelector{} } -func (*LabelSelector) ProtoMessage() {} -func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } - -func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } -func (*LabelSelectorRequirement) ProtoMessage() {} -func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{6} -} - func init() { - proto.RegisterType((*Job)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v1.Job") - proto.RegisterType((*JobCondition)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v1.JobCondition") - proto.RegisterType((*JobList)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v1.JobList") - proto.RegisterType((*JobSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v1.JobSpec") - proto.RegisterType((*JobStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v1.JobStatus") - proto.RegisterType((*LabelSelector)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v1.LabelSelector") - proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.client-go.1.5.pkg.apis.batch.v1.LabelSelectorRequirement") + proto.RegisterType((*Job)(nil), "k8s.io.client-go.pkg.apis.batch.v1.Job") + proto.RegisterType((*JobCondition)(nil), "k8s.io.client-go.pkg.apis.batch.v1.JobCondition") + proto.RegisterType((*JobList)(nil), "k8s.io.client-go.pkg.apis.batch.v1.JobList") + proto.RegisterType((*JobSpec)(nil), "k8s.io.client-go.pkg.apis.batch.v1.JobSpec") + proto.RegisterType((*JobStatus)(nil), "k8s.io.client-go.pkg.apis.batch.v1.JobStatus") } func (m *Job) Marshal() (data []byte, err error) { size := m.Size() @@ -346,94 +332,6 @@ func (m *JobStatus) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *LabelSelector) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *LabelSelector) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.MatchLabels) > 0 { - for k := range m.MatchLabels { - data[i] = 0xa - i++ - v := m.MatchLabels[k] - mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - i = encodeVarintGenerated(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.MatchExpressions) > 0 { - for _, msg := range m.MatchExpressions { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *LabelSelectorRequirement) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *LabelSelectorRequirement) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Key))) - i += copy(data[i:], m.Key) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Operator))) - i += copy(data[i:], m.Operator) - if len(m.Values) > 0 { - for _, s := range m.Values { - data[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - return i, nil -} - func encodeFixed64Generated(data []byte, offset int, v uint64) int { data[offset] = uint8(v) data[offset+1] = uint8(v >> 8) @@ -552,42 +450,6 @@ func (m *JobStatus) Size() (n int) { return n } -func (m *LabelSelector) Size() (n int) { - var l int - _ = l - if len(m.MatchLabels) > 0 { - for k, v := range m.MatchLabels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.MatchExpressions) > 0 { - for _, e := range m.MatchExpressions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *LabelSelectorRequirement) Size() (n int) { - var l int - _ = l - l = len(m.Key) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Operator) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Values) > 0 { - for _, s := range m.Values { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - func sovGenerated(x uint64) (n int) { for { n++ @@ -606,7 +468,7 @@ func (this *Job) String() string { return "nil" } s := strings.Join([]string{`&Job{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "JobStatus", "JobStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -620,8 +482,8 @@ func (this *JobCondition) String() string { s := strings.Join([]string{`&JobCondition{`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastProbeTime:` + strings.Replace(strings.Replace(this.LastProbeTime.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, + `LastProbeTime:` + strings.Replace(strings.Replace(this.LastProbeTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, + `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, `}`, @@ -633,7 +495,7 @@ func (this *JobList) String() string { return "nil" } s := strings.Join([]string{`&JobList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Job", "Job", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -647,7 +509,7 @@ func (this *JobSpec) String() string { `Parallelism:` + valueToStringGenerated(this.Parallelism) + `,`, `Completions:` + valueToStringGenerated(this.Completions) + `,`, `ActiveDeadlineSeconds:` + valueToStringGenerated(this.ActiveDeadlineSeconds) + `,`, - `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "LabelSelector", 1) + `,`, + `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, `ManualSelector:` + valueToStringGenerated(this.ManualSelector) + `,`, `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`, `}`, @@ -660,8 +522,8 @@ func (this *JobStatus) String() string { } s := strings.Join([]string{`&JobStatus{`, `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "JobCondition", "JobCondition", 1), `&`, ``, 1) + `,`, - `StartTime:` + strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1) + `,`, - `CompletionTime:` + strings.Replace(fmt.Sprintf("%v", this.CompletionTime), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1) + `,`, + `StartTime:` + strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`, + `CompletionTime:` + strings.Replace(fmt.Sprintf("%v", this.CompletionTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`, `Active:` + fmt.Sprintf("%v", this.Active) + `,`, `Succeeded:` + fmt.Sprintf("%v", this.Succeeded) + `,`, `Failed:` + fmt.Sprintf("%v", this.Failed) + `,`, @@ -669,39 +531,6 @@ func (this *JobStatus) String() string { }, "") return s } -func (this *LabelSelector) String() string { - if this == nil { - return "nil" - } - keysForMatchLabels := make([]string, 0, len(this.MatchLabels)) - for k := range this.MatchLabels { - keysForMatchLabels = append(keysForMatchLabels, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMatchLabels) - mapStringForMatchLabels := "map[string]string{" - for _, k := range keysForMatchLabels { - mapStringForMatchLabels += fmt.Sprintf("%v: %v,", k, this.MatchLabels[k]) - } - mapStringForMatchLabels += "}" - s := strings.Join([]string{`&LabelSelector{`, - `MatchLabels:` + mapStringForMatchLabels + `,`, - `MatchExpressions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MatchExpressions), "LabelSelectorRequirement", "LabelSelectorRequirement", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *LabelSelectorRequirement) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LabelSelectorRequirement{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`, - `Values:` + fmt.Sprintf("%v", this.Values) + `,`, - `}`, - }, "") - return s -} func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -1303,7 +1132,7 @@ func (m *JobSpec) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.Selector == nil { - m.Selector = &LabelSelector{} + m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} } if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -1468,7 +1297,7 @@ func (m *JobStatus) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.StartTime == nil { - m.StartTime = &k8s_io_kubernetes_pkg_api_unversioned.Time{} + m.StartTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} } if err := m.StartTime.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -1501,7 +1330,7 @@ func (m *JobStatus) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.CompletionTime == nil { - m.CompletionTime = &k8s_io_kubernetes_pkg_api_unversioned.Time{} + m.CompletionTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} } if err := m.CompletionTime.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -1585,335 +1414,6 @@ func (m *JobStatus) Unmarshal(data []byte) error { } return nil } -func (m *LabelSelector) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LabelSelector: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LabelSelector: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchLabels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.MatchLabels == nil { - m.MatchLabels = make(map[string]string) - } - m.MatchLabels[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchExpressions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MatchExpressions = append(m.MatchExpressions, LabelSelectorRequirement{}) - if err := m.MatchExpressions[len(m.MatchExpressions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LabelSelectorRequirement) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LabelSelectorRequirement: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LabelSelectorRequirement: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Operator = LabelSelectorOperator(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Values = append(m.Values, string(data[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipGenerated(data []byte) (n int, err error) { l := len(data) iNdEx := 0 @@ -2020,70 +1520,61 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 1027 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6e, 0x23, 0x45, - 0x10, 0x8e, 0x3d, 0xb1, 0x63, 0xb7, 0x93, 0xac, 0x69, 0x88, 0x64, 0x2c, 0x91, 0xac, 0x0c, 0x42, - 0xbb, 0x62, 0x33, 0x23, 0x07, 0x90, 0x56, 0x2b, 0xb1, 0x12, 0x13, 0x82, 0x04, 0xc4, 0x24, 0x6a, - 0x47, 0x2b, 0xc4, 0xcf, 0xa1, 0x3d, 0xae, 0x75, 0x86, 0x8c, 0x67, 0x86, 0xe9, 0x1e, 0x43, 0x38, - 0x21, 0x71, 0xe0, 0xca, 0x43, 0xf0, 0x0c, 0xec, 0x2b, 0xe4, 0xb8, 0x70, 0xe2, 0x14, 0xc1, 0xf2, - 0x16, 0x9c, 0xe8, 0xee, 0xe9, 0xf9, 0xf1, 0x5f, 0xe4, 0xec, 0xa1, 0x25, 0x77, 0x75, 0x7d, 0x5f, - 0x55, 0x77, 0x7d, 0x55, 0x63, 0xf4, 0xee, 0xc5, 0x43, 0x66, 0xba, 0x81, 0x75, 0x11, 0x0f, 0x20, - 0xf2, 0x81, 0x03, 0xb3, 0xc2, 0x8b, 0x91, 0x45, 0x43, 0x97, 0x59, 0x03, 0xca, 0x9d, 0x73, 0x6b, - 0xd2, 0xb5, 0x46, 0xe0, 0x43, 0x44, 0x39, 0x0c, 0xcd, 0x30, 0x0a, 0x78, 0x80, 0xdf, 0x4c, 0x40, - 0x66, 0x0e, 0x32, 0x05, 0xc8, 0x94, 0x20, 0x53, 0x81, 0xcc, 0x49, 0xb7, 0xbd, 0x3f, 0x72, 0xf9, - 0x79, 0x3c, 0x30, 0x9d, 0x60, 0x6c, 0x8d, 0x82, 0x51, 0x60, 0x29, 0xec, 0x20, 0x7e, 0xaa, 0x76, - 0x6a, 0xa3, 0x7e, 0x25, 0x9c, 0xed, 0x83, 0xa5, 0x89, 0x58, 0x11, 0xb0, 0x20, 0x8e, 0x1c, 0x98, - 0xcd, 0xa3, 0xfd, 0xfe, 0x72, 0x4c, 0xec, 0x4f, 0x20, 0x62, 0x6e, 0xe0, 0xc3, 0x70, 0x0e, 0xf6, - 0x60, 0x39, 0x6c, 0xfe, 0xb2, 0xed, 0xfd, 0xc5, 0xde, 0x51, 0xec, 0x73, 0x77, 0x3c, 0x9f, 0x53, - 0x77, 0xb1, 0x7b, 0xcc, 0x5d, 0xcf, 0x72, 0x7d, 0xce, 0x78, 0x34, 0x0b, 0xe9, 0xfc, 0x52, 0x46, - 0xc6, 0xa7, 0xc1, 0x00, 0x7f, 0x81, 0x6a, 0x63, 0xe0, 0x74, 0x48, 0x39, 0x6d, 0x95, 0xee, 0x96, - 0xee, 0x35, 0x0e, 0xee, 0x99, 0x4b, 0x5f, 0x5a, 0x3c, 0xb1, 0x79, 0x32, 0xf8, 0x16, 0x1c, 0xde, - 0x13, 0x18, 0x1b, 0x5f, 0x5d, 0xef, 0xad, 0xbd, 0xb8, 0xde, 0x43, 0xb9, 0x8d, 0x64, 0x6c, 0xf8, - 0x73, 0xb4, 0xce, 0x42, 0x70, 0x5a, 0x65, 0xc5, 0xfa, 0xc0, 0x5c, 0xa1, 0x7e, 0xa6, 0xc8, 0xa8, - 0x2f, 0x30, 0xf6, 0xa6, 0x66, 0x5e, 0x97, 0x3b, 0xa2, 0x78, 0xf0, 0x13, 0x54, 0x65, 0x9c, 0xf2, - 0x98, 0xb5, 0x0c, 0xc5, 0x68, 0xae, 0xcc, 0xa8, 0x50, 0xf6, 0xb6, 0xe6, 0xac, 0x26, 0x7b, 0xa2, - 0xd9, 0x3a, 0x7f, 0x1a, 0x68, 0x53, 0x78, 0x1d, 0x06, 0xfe, 0xd0, 0xe5, 0xa2, 0x78, 0xf8, 0x3d, - 0xb4, 0xce, 0x2f, 0x43, 0x50, 0xcf, 0x51, 0xb7, 0xef, 0xa6, 0xa9, 0x9c, 0x09, 0xdb, 0x7f, 0xd7, - 0x7b, 0xcd, 0xa2, 0xaf, 0xb4, 0x11, 0xe5, 0x5d, 0x48, 0xaf, 0xac, 0x70, 0x8f, 0xa7, 0xc3, 0x09, - 0xe4, 0x8d, 0x12, 0x30, 0x33, 0xce, 0xe9, 0xf4, 0xf0, 0x39, 0xda, 0xf2, 0x28, 0xe3, 0xa7, 0x51, - 0x30, 0x80, 0x33, 0x51, 0x7c, 0x7d, 0xfb, 0x77, 0x6e, 0xa8, 0x52, 0x41, 0x87, 0xa6, 0x84, 0xd8, - 0x3b, 0x3a, 0x97, 0xad, 0xe3, 0x22, 0x13, 0x99, 0x26, 0xc6, 0xdf, 0x23, 0x2c, 0x0d, 0x67, 0x11, - 0xf5, 0x59, 0x72, 0x3b, 0x19, 0x6e, 0xfd, 0xf6, 0xe1, 0xda, 0x3a, 0x1c, 0x3e, 0x9e, 0xa3, 0x23, - 0x0b, 0x42, 0xe0, 0xb7, 0x51, 0x35, 0x02, 0xca, 0x02, 0xbf, 0x55, 0x51, 0x4f, 0x97, 0x55, 0x8a, - 0x28, 0x2b, 0xd1, 0xa7, 0xf8, 0x3e, 0xda, 0x18, 0x03, 0x63, 0x74, 0x04, 0xad, 0xaa, 0x72, 0xbc, - 0xa3, 0x1d, 0x37, 0x7a, 0x89, 0x99, 0xa4, 0xe7, 0x9d, 0x67, 0x25, 0xb4, 0x21, 0x0a, 0x75, 0xec, - 0x32, 0x8e, 0xbf, 0x99, 0x93, 0xb8, 0xb5, 0xe2, 0x6d, 0x24, 0x5c, 0x29, 0xbd, 0xa9, 0x03, 0xd5, - 0x52, 0x4b, 0x41, 0xe7, 0x3d, 0x54, 0x71, 0x39, 0x8c, 0x65, 0xdd, 0x8d, 0x9b, 0xdb, 0x67, 0x5a, - 0x96, 0xf6, 0x96, 0x26, 0xad, 0x7c, 0x22, 0xe1, 0x24, 0x61, 0xe9, 0x3c, 0x33, 0x54, 0xe6, 0x52, - 0xf8, 0xb8, 0x8b, 0x1a, 0x21, 0x8d, 0xa8, 0xe7, 0x81, 0xe7, 0xb2, 0xb1, 0x4a, 0xbe, 0x62, 0xdf, - 0x11, 0x90, 0xc6, 0x69, 0x6e, 0x26, 0x45, 0x1f, 0x09, 0x11, 0xc3, 0x2f, 0xf4, 0x40, 0xbe, 0x6e, - 0xa2, 0x45, 0x0d, 0x39, 0xcc, 0xcd, 0xa4, 0xe8, 0x83, 0x4f, 0xd0, 0x0e, 0x75, 0xb8, 0x3b, 0x81, - 0x8f, 0x80, 0x0e, 0x3d, 0xd7, 0x87, 0x3e, 0x38, 0x42, 0x8c, 0x49, 0x9f, 0x19, 0xf6, 0xeb, 0x02, - 0xbc, 0xf3, 0xe1, 0x22, 0x07, 0xb2, 0x18, 0x87, 0xbf, 0x46, 0x35, 0x06, 0x9e, 0x98, 0x08, 0x41, - 0xa4, 0xe5, 0x73, 0xb0, 0xd2, 0xa3, 0x1c, 0xd3, 0x01, 0x78, 0x7d, 0x8d, 0xb4, 0x37, 0xe5, 0x7b, - 0xa7, 0x3b, 0x92, 0x31, 0xe2, 0x47, 0x68, 0x7b, 0x4c, 0xfd, 0x98, 0x66, 0x9e, 0x4a, 0x35, 0x35, - 0x1b, 0x0b, 0xff, 0xed, 0xde, 0xd4, 0x09, 0x99, 0xf1, 0xc4, 0x5f, 0xa1, 0x9a, 0x78, 0xe4, 0xd0, - 0x13, 0x83, 0x50, 0x49, 0xa8, 0x71, 0xb0, 0x7f, 0xf3, 0xb4, 0x3b, 0x0d, 0x86, 0x67, 0x1a, 0xa0, - 0x06, 0x53, 0x26, 0x84, 0xd4, 0x4a, 0x32, 0xc2, 0xce, 0xef, 0x06, 0xaa, 0x67, 0xe3, 0x06, 0x03, - 0x42, 0x4e, 0xda, 0xd2, 0x4c, 0x94, 0x4e, 0x6a, 0xa3, 0xbb, 0xaa, 0x36, 0xb2, 0x61, 0x90, 0xcf, - 0xd8, 0xcc, 0xc4, 0x48, 0x81, 0x58, 0xcc, 0xef, 0xba, 0x18, 0x14, 0x11, 0x57, 0xbd, 0x5a, 0xbe, - 0x7d, 0xaf, 0x6e, 0x09, 0xee, 0x7a, 0x3f, 0x65, 0x20, 0x39, 0x19, 0x1e, 0xa1, 0xed, 0x5c, 0x25, - 0x2f, 0x3b, 0x79, 0x54, 0x51, 0x0e, 0xa7, 0x68, 0xc8, 0x0c, 0xad, 0x6c, 0xff, 0x44, 0x47, 0x4a, - 0x2c, 0x95, 0xbc, 0xfd, 0x13, 0xd1, 0x11, 0x7d, 0x8a, 0x2d, 0x71, 0xd5, 0xd8, 0x71, 0x00, 0x86, - 0x30, 0x54, 0x35, 0xaf, 0xd8, 0xaf, 0x68, 0xd7, 0x7a, 0x3f, 0x3d, 0x20, 0xb9, 0x8f, 0x24, 0x7e, - 0x4a, 0x5d, 0x4f, 0x78, 0x57, 0xa7, 0x89, 0x3f, 0x56, 0x56, 0xa2, 0x4f, 0x3b, 0x7f, 0x94, 0xd1, - 0xd6, 0x94, 0xf6, 0xf0, 0x8f, 0xa8, 0x31, 0x96, 0xe5, 0x50, 0xd6, 0xb4, 0x7a, 0x87, 0xb7, 0x17, - 0xb1, 0xd9, 0xcb, 0x59, 0x8e, 0x7c, 0x1e, 0x5d, 0xda, 0xaf, 0xea, 0x1c, 0x1a, 0x85, 0x13, 0x52, - 0x0c, 0x86, 0x7f, 0x2e, 0xa1, 0xa6, 0xda, 0x1f, 0xfd, 0x10, 0x8a, 0x7f, 0x21, 0x4c, 0xf7, 0xb1, - 0xcc, 0xe0, 0x83, 0xdb, 0x67, 0x40, 0xe0, 0xbb, 0xd8, 0x8d, 0x60, 0x0c, 0x3e, 0xb7, 0x5b, 0x3a, - 0x76, 0xb3, 0x37, 0x43, 0x4f, 0xe6, 0x02, 0xb6, 0x1f, 0xa3, 0xe6, 0x6c, 0xee, 0xb8, 0x89, 0x8c, - 0x0b, 0xb8, 0x4c, 0xbe, 0x8b, 0x44, 0xfe, 0xc4, 0xaf, 0xa1, 0xca, 0x84, 0x7a, 0x71, 0xa2, 0xbc, - 0x3a, 0x49, 0x36, 0x8f, 0xca, 0x0f, 0x4b, 0x9d, 0xdf, 0x4a, 0xa8, 0xb5, 0x2c, 0x11, 0xfc, 0x46, - 0x81, 0xc8, 0x6e, 0xe8, 0xac, 0x8c, 0xcf, 0xe0, 0x32, 0x61, 0x3d, 0x42, 0xb5, 0x20, 0x94, 0xff, - 0x56, 0x44, 0x6f, 0x27, 0x1f, 0xd3, 0xfb, 0x69, 0xdb, 0x9d, 0x68, 0xbb, 0xf8, 0x9c, 0xee, 0x4c, - 0xd1, 0xa7, 0x07, 0x24, 0x83, 0xe2, 0x0e, 0xaa, 0xaa, 0x7c, 0xe4, 0x20, 0x33, 0x04, 0x09, 0x92, - 0xa5, 0x7f, 0xa2, 0x2c, 0x44, 0x9f, 0xd8, 0x6f, 0x5d, 0xfd, 0xb3, 0xbb, 0xf6, 0x5c, 0xac, 0xbf, - 0xc4, 0xfa, 0xe9, 0xc5, 0x6e, 0xe9, 0x4a, 0xac, 0xe7, 0x62, 0xfd, 0x2d, 0xd6, 0xaf, 0xff, 0xee, - 0xae, 0x7d, 0x59, 0x9e, 0x74, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x8b, 0x10, 0xf1, 0xb1, - 0x0a, 0x00, 0x00, + // 885 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x54, 0xdd, 0x6e, 0xe3, 0x44, + 0x14, 0xce, 0x4f, 0xd3, 0x26, 0x93, 0xb6, 0xbb, 0x8c, 0x54, 0x29, 0xf4, 0x22, 0x59, 0x05, 0x84, + 0x0a, 0xda, 0xb5, 0x49, 0xbb, 0x42, 0x88, 0x0b, 0x24, 0x5c, 0x84, 0x44, 0xd5, 0xb2, 0xd5, 0xa4, + 0x02, 0x89, 0x1f, 0x89, 0xb1, 0x7d, 0x9a, 0x0e, 0xb5, 0x3d, 0x96, 0x67, 0x12, 0xd1, 0x3b, 0xde, + 0x00, 0x1e, 0x06, 0x21, 0x1e, 0xa1, 0x97, 0xbd, 0xe4, 0x2a, 0xa2, 0xe6, 0x2d, 0xf6, 0x0a, 0xcd, + 0x78, 0xfc, 0x93, 0x4d, 0x0a, 0xd9, 0xbd, 0xb3, 0xcf, 0x7c, 0xdf, 0x37, 0x67, 0xce, 0xf9, 0xce, + 0x41, 0x47, 0xd7, 0x1f, 0x0b, 0x8b, 0x71, 0xfb, 0x7a, 0xea, 0x42, 0x12, 0x81, 0x04, 0x61, 0xc7, + 0xd7, 0x13, 0x9b, 0xc6, 0x4c, 0xd8, 0x2e, 0x95, 0xde, 0x95, 0x3d, 0x1b, 0xd9, 0x13, 0x88, 0x20, + 0xa1, 0x12, 0x7c, 0x2b, 0x4e, 0xb8, 0xe4, 0xf8, 0x9d, 0x8c, 0x64, 0x95, 0x24, 0x2b, 0xbe, 0x9e, + 0x58, 0x8a, 0x64, 0x69, 0x92, 0x35, 0x1b, 0xed, 0x3f, 0x9b, 0x30, 0x79, 0x35, 0x75, 0x2d, 0x8f, + 0x87, 0xf6, 0x84, 0x4f, 0xb8, 0xad, 0xb9, 0xee, 0xf4, 0x52, 0xff, 0xe9, 0x1f, 0xfd, 0x95, 0x69, + 0xee, 0x3f, 0x37, 0x89, 0xd0, 0x98, 0x85, 0xd4, 0xbb, 0x62, 0x11, 0x24, 0x37, 0x65, 0x2a, 0x21, + 0x48, 0xba, 0x22, 0x93, 0x7d, 0xfb, 0x21, 0x56, 0x32, 0x8d, 0x24, 0x0b, 0x61, 0x89, 0xf0, 0xd1, + 0xff, 0x11, 0x84, 0x77, 0x05, 0x21, 0x5d, 0xe2, 0x1d, 0x3d, 0xc4, 0x9b, 0x4a, 0x16, 0xd8, 0x2c, + 0x92, 0x42, 0x26, 0x4b, 0xa4, 0xca, 0x9b, 0x04, 0x24, 0x33, 0x48, 0xca, 0x07, 0xc1, 0xcf, 0x34, + 0x8c, 0x03, 0x58, 0xf5, 0xa6, 0xa7, 0x0f, 0xb6, 0x64, 0x05, 0x7a, 0xf8, 0x6b, 0x03, 0x35, 0x4f, + 0xb8, 0x8b, 0x7f, 0x44, 0x6d, 0x55, 0x24, 0x9f, 0x4a, 0xda, 0xab, 0x3f, 0xa9, 0x1f, 0x74, 0x0f, + 0x3f, 0xb4, 0x4c, 0x9b, 0xaa, 0x39, 0x97, 0x8d, 0x52, 0x68, 0x6b, 0x36, 0xb2, 0x5e, 0xb8, 0x3f, + 0x81, 0x27, 0xcf, 0x40, 0x52, 0x07, 0xdf, 0xce, 0x07, 0xb5, 0x74, 0x3e, 0x40, 0x65, 0x8c, 0x14, + 0xaa, 0xf8, 0x2b, 0xb4, 0x21, 0x62, 0xf0, 0x7a, 0x0d, 0xad, 0xfe, 0xd4, 0x5a, 0xc3, 0x04, 0xd6, + 0x09, 0x77, 0xc7, 0x31, 0x78, 0xce, 0xb6, 0x51, 0xde, 0x50, 0x7f, 0x44, 0xeb, 0xe0, 0xaf, 0xd1, + 0xa6, 0x90, 0x54, 0x4e, 0x45, 0xaf, 0xa9, 0x15, 0xad, 0xb5, 0x15, 0x35, 0xcb, 0xd9, 0x35, 0x9a, + 0x9b, 0xd9, 0x3f, 0x31, 0x6a, 0xc3, 0xbb, 0x26, 0xda, 0x3e, 0xe1, 0xee, 0x31, 0x8f, 0x7c, 0x26, + 0x19, 0x8f, 0xf0, 0x73, 0xb4, 0x21, 0x6f, 0x62, 0xd0, 0x65, 0xe9, 0x38, 0x4f, 0xf2, 0x54, 0x2e, + 0x6e, 0x62, 0x78, 0x39, 0x1f, 0x3c, 0xae, 0x62, 0x55, 0x8c, 0x68, 0x74, 0x25, 0xbd, 0x86, 0xe6, + 0x7d, 0xba, 0x78, 0xdd, 0xcb, 0xf9, 0xe0, 0x3f, 0x1b, 0x65, 0x15, 0x9a, 0x8b, 0xe9, 0xe1, 0x09, + 0xda, 0x09, 0xa8, 0x90, 0xe7, 0x09, 0x77, 0xe1, 0x82, 0x85, 0x60, 0x5e, 0xff, 0xc1, 0x7a, 0xdd, + 0x52, 0x0c, 0x67, 0xcf, 0xa4, 0xb2, 0x73, 0x5a, 0x15, 0x22, 0x8b, 0xba, 0x78, 0x86, 0xb0, 0x0a, + 0x5c, 0x24, 0x34, 0x12, 0xd9, 0xe3, 0xd4, 0x6d, 0x1b, 0xaf, 0x7d, 0xdb, 0xbe, 0xb9, 0x0d, 0x9f, + 0x2e, 0xa9, 0x91, 0x15, 0x37, 0xe0, 0xf7, 0xd0, 0x66, 0x02, 0x54, 0xf0, 0xa8, 0xd7, 0xd2, 0x85, + 0x2b, 0xfa, 0x44, 0x74, 0x94, 0x98, 0x53, 0xfc, 0x3e, 0xda, 0x0a, 0x41, 0x08, 0x3a, 0x81, 0xde, + 0xa6, 0x06, 0x3e, 0x32, 0xc0, 0xad, 0xb3, 0x2c, 0x4c, 0xf2, 0xf3, 0xe1, 0x1f, 0x75, 0xb4, 0x75, + 0xc2, 0xdd, 0x53, 0x26, 0x24, 0xfe, 0x7e, 0xc9, 0xe8, 0xd6, 0x7a, 0x8f, 0x51, 0x6c, 0x6d, 0xf3, + 0xc7, 0xe6, 0x9e, 0x76, 0x1e, 0xa9, 0x98, 0xfc, 0x0c, 0xb5, 0x98, 0x84, 0x50, 0x35, 0xbd, 0x79, + 0xd0, 0x3d, 0x3c, 0x58, 0xd7, 0x93, 0xce, 0x8e, 0x11, 0x6d, 0x7d, 0xa9, 0xe8, 0x24, 0x53, 0x19, + 0xfe, 0xd9, 0xd4, 0x89, 0x2b, 0xd7, 0xe3, 0x11, 0xea, 0xc6, 0x34, 0xa1, 0x41, 0x00, 0x01, 0x13, + 0xa1, 0xce, 0xbd, 0xe5, 0x3c, 0x4a, 0xe7, 0x83, 0xee, 0x79, 0x19, 0x26, 0x55, 0x8c, 0xa2, 0x78, + 0x5c, 0xed, 0x09, 0x55, 0xdc, 0xcc, 0x88, 0x86, 0x72, 0x5c, 0x86, 0x49, 0x15, 0x83, 0x5f, 0xa0, + 0x3d, 0xea, 0x49, 0x36, 0x83, 0xcf, 0x81, 0xfa, 0x01, 0x8b, 0x60, 0x0c, 0x1e, 0x8f, 0xfc, 0x6c, + 0xc8, 0x9a, 0xce, 0xdb, 0xe9, 0x7c, 0xb0, 0xf7, 0xd9, 0x2a, 0x00, 0x59, 0xcd, 0xc3, 0x3f, 0xa0, + 0xb6, 0x80, 0x00, 0x3c, 0xc9, 0x13, 0x63, 0x9e, 0xa3, 0x35, 0xeb, 0x4d, 0x5d, 0x08, 0xc6, 0x86, + 0xea, 0x6c, 0xab, 0x82, 0xe7, 0x7f, 0xa4, 0x90, 0xc4, 0x9f, 0xa0, 0xdd, 0x90, 0x46, 0x53, 0x5a, + 0x20, 0xb5, 0x6b, 0xda, 0x0e, 0x4e, 0xe7, 0x83, 0xdd, 0xb3, 0x85, 0x13, 0xf2, 0x0a, 0x12, 0x7f, + 0x87, 0xda, 0x12, 0xc2, 0x38, 0xa0, 0x32, 0xb3, 0x50, 0xf7, 0xf0, 0xd9, 0xc3, 0xfd, 0x52, 0x29, + 0x9d, 0x73, 0xff, 0xc2, 0x10, 0xf4, 0x5a, 0x2a, 0x9c, 0x90, 0x47, 0x49, 0x21, 0x38, 0xfc, 0xbd, + 0x89, 0x3a, 0xc5, 0xb2, 0xc1, 0x80, 0x90, 0x97, 0x0f, 0xb4, 0xe8, 0xd5, 0xb5, 0x39, 0x46, 0xeb, + 0x9a, 0xa3, 0x58, 0x05, 0xe5, 0x86, 0x2d, 0x42, 0x82, 0x54, 0x84, 0xf1, 0x37, 0xa8, 0x23, 0x24, + 0x4d, 0xa4, 0x1e, 0xd5, 0xc6, 0x6b, 0x8f, 0xea, 0x4e, 0x3a, 0x1f, 0x74, 0xc6, 0xb9, 0x00, 0x29, + 0xb5, 0xf0, 0x25, 0xda, 0x2d, 0x5d, 0xf2, 0x86, 0x6b, 0x47, 0xb7, 0xe4, 0x78, 0x41, 0x85, 0xbc, + 0xa2, 0xaa, 0x86, 0x3f, 0xb3, 0x91, 0xf6, 0x4a, 0xab, 0x1c, 0xfe, 0xcc, 0x73, 0xc4, 0x9c, 0x62, + 0x1b, 0x75, 0xc4, 0xd4, 0xf3, 0x00, 0x7c, 0xf0, 0x75, 0xc7, 0x5b, 0xce, 0x5b, 0x06, 0xda, 0x19, + 0xe7, 0x07, 0xa4, 0xc4, 0x28, 0xe1, 0x4b, 0xca, 0x02, 0xf0, 0x75, 0xa7, 0x2b, 0xc2, 0x5f, 0xe8, + 0x28, 0x31, 0xa7, 0xce, 0xbb, 0xb7, 0xf7, 0xfd, 0xda, 0xdd, 0x7d, 0xbf, 0xf6, 0xd7, 0x7d, 0xbf, + 0xf6, 0x4b, 0xda, 0xaf, 0xdf, 0xa6, 0xfd, 0xfa, 0x5d, 0xda, 0xaf, 0xff, 0x9d, 0xf6, 0xeb, 0xbf, + 0xfd, 0xd3, 0xaf, 0x7d, 0xdb, 0x98, 0x8d, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xe7, 0xe7, 0x0a, + 0x8d, 0xf7, 0x08, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/batch/v1/generated.proto similarity index 67% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/generated.proto rename to vendor/k8s.io/client-go/pkg/apis/batch/v1/generated.proto index 264959e4f..283da1c8d 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/generated.proto +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,11 +21,12 @@ syntax = 'proto2'; package k8s.io.kubernetes.pkg.apis.batch.v1; -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; -import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1"; @@ -34,14 +35,17 @@ option go_package = "v1"; message Job { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional JobSpec spec = 2; // Status is a structure describing current status of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional JobStatus status = 3; } @@ -54,15 +58,19 @@ message JobCondition { optional string status = 2; // Last time the condition was checked. - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastProbeTime = 3; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3; // Last time the condition transit from one status to another. - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; // (brief) reason for the condition's last transition. + // +optional optional string reason = 5; // Human readable message indicating details about last transition. + // +optional optional string message = 6; } @@ -70,7 +78,8 @@ message JobCondition { message JobList { // Standard list metadata // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is the list of Job. repeated Job items = 2; @@ -82,7 +91,8 @@ message JobSpec { // run at any given time. The actual number of pods running in steady state will // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), // i.e. when the work left to do is less than max parallelism. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md + // More info: http://kubernetes.io/docs/user-guide/jobs + // +optional optional int32 parallelism = 1; // Completions specifies the desired number of successfully finished pods the @@ -90,17 +100,20 @@ message JobSpec { // pod signals the success of all pods, and allows parallelism to have any positive // value. Setting to 1 means that parallelism is limited to 1 and the success of that // pod signals the success of the job. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md + // More info: http://kubernetes.io/docs/user-guide/jobs + // +optional optional int32 completions = 2; // Optional duration in seconds relative to the startTime that the job may be active // before the system tries to terminate it; value must be positive integer + // +optional optional int64 activeDeadlineSeconds = 3; // Selector is a label query over pods that should match the pod count. // Normally, the system sets this field for you. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - optional LabelSelector selector = 4; + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4; // ManualSelector controls generation of pod labels and pod selectors. // Leave `manualSelector` unset unless you are certain what you are doing. @@ -112,67 +125,44 @@ message JobSpec { // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` // API. // More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md + // +optional optional bool manualSelector = 5; // Template is the object that describes the pod that will be created when // executing a job. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md + // More info: http://kubernetes.io/docs/user-guide/jobs optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 6; } // JobStatus represents the current state of a Job. message JobStatus { // Conditions represent the latest available observations of an object's current state. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md + // More info: http://kubernetes.io/docs/user-guide/jobs + // +optional repeated JobCondition conditions = 1; // StartTime represents time when the job was acknowledged by the Job Manager. // It is not guaranteed to be set in happens-before order across separate operations. // It is represented in RFC3339 form and is in UTC. - optional k8s.io.kubernetes.pkg.api.unversioned.Time startTime = 2; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 2; // CompletionTime represents time when the job was completed. It is not guaranteed to // be set in happens-before order across separate operations. // It is represented in RFC3339 form and is in UTC. - optional k8s.io.kubernetes.pkg.api.unversioned.Time completionTime = 3; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time completionTime = 3; // Active is the number of actively running pods. + // +optional optional int32 active = 4; // Succeeded is the number of pods which reached Phase Succeeded. + // +optional optional int32 succeeded = 5; // Failed is the number of pods which reached Phase Failed. + // +optional optional int32 failed = 6; } -// A label selector is a label query over a set of resources. The result of matchLabels and -// matchExpressions are ANDed. An empty label selector matches all objects. A null -// label selector matches no objects. -message LabelSelector { - // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - // map is equivalent to an element of matchExpressions, whose key field is "key", the - // operator is "In", and the values array contains only "value". The requirements are ANDed. - map matchLabels = 1; - - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - repeated LabelSelectorRequirement matchExpressions = 2; -} - -// A label selector requirement is a selector that contains values, a key, and an operator that -// relates the key and values. -message LabelSelectorRequirement { - // key is the label key that the selector applies to. - optional string key = 1; - - // operator represents a key's relationship to a set of values. - // Valid operators ard In, NotIn, Exists and DoesNotExist. - optional string operator = 2; - - // values is an array of string values. If the operator is In or NotIn, - // the values array must be non-empty. If the operator is Exists or DoesNotExist, - // the values array must be empty. This array is replaced during a strategic - // merge patch. - repeated string values = 3; -} - diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/register.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/register.go similarity index 69% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/register.go rename to vendor/k8s.io/client-go/pkg/apis/batch/v1/register.go index b9b0c12aa..4ba570d1b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/register.go @@ -17,17 +17,21 @@ limitations under the License. package v1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/runtime" - versionedwatch "k8s.io/client-go/1.5/pkg/watch/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "batch" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs) @@ -39,9 +43,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Job{}, &JobList{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, ) - versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go new file mode 100644 index 000000000..49dab1f88 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go @@ -0,0 +1,2681 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1 + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg4_resource "k8s.io/apimachinery/pkg/api/resource" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + pkg5_intstr "k8s.io/apimachinery/pkg/util/intstr" + pkg3_v1 "k8s.io/client-go/pkg/api/v1" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81234 = 1 + codecSelferC_RAW1234 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1234 = 10 + codecSelferValueTypeMap1234 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1234 = 2 + codecSelfer_containerMapValue1234 = 3 + codecSelfer_containerMapEnd1234 = 4 + codecSelfer_containerArrayElem1234 = 6 + codecSelfer_containerArrayEnd1234 = 7 +) + +var ( + codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1234 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg4_resource.Quantity + var v1 pkg1_v1.TypeMeta + var v2 pkg2_types.UID + var v3 pkg5_intstr.IntOrString + var v4 pkg3_v1.PodTemplateSpec + var v5 time.Time + _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 + } +} + +func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Job) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Job) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = JobSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = JobStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = JobSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = JobStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *JobList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceJob(([]Job)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceJob(([]Job)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *JobList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *JobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceJob((*[]Job)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *JobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceJob((*[]Job)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *JobSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [6]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Parallelism != nil + yyq2[1] = x.Completions != nil + yyq2[2] = x.ActiveDeadlineSeconds != nil + yyq2[3] = x.Selector != nil + yyq2[4] = x.ManualSelector != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(6) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.Parallelism == nil { + r.EncodeNil() + } else { + yy4 := *x.Parallelism + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(yy4)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("parallelism")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Parallelism == nil { + r.EncodeNil() + } else { + yy6 := *x.Parallelism + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeInt(int64(yy6)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Completions == nil { + r.EncodeNil() + } else { + yy9 := *x.Completions + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(yy9)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("completions")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Completions == nil { + r.EncodeNil() + } else { + yy11 := *x.Completions + yym12 := z.EncBinary() + _ = yym12 + if false { + } else { + r.EncodeInt(int64(yy11)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.ActiveDeadlineSeconds == nil { + r.EncodeNil() + } else { + yy14 := *x.ActiveDeadlineSeconds + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + r.EncodeInt(int64(yy14)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("activeDeadlineSeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ActiveDeadlineSeconds == nil { + r.EncodeNil() + } else { + yy16 := *x.ActiveDeadlineSeconds + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeInt(int64(yy16)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Selector == nil { + r.EncodeNil() + } else { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.EncExt(x.Selector) { + } else { + z.EncFallback(x.Selector) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("selector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Selector == nil { + r.EncodeNil() + } else { + yym20 := z.EncBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.EncExt(x.Selector) { + } else { + z.EncFallback(x.Selector) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + if x.ManualSelector == nil { + r.EncodeNil() + } else { + yy22 := *x.ManualSelector + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeBool(bool(yy22)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("manualSelector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ManualSelector == nil { + r.EncodeNil() + } else { + yy24 := *x.ManualSelector + yym25 := z.EncBinary() + _ = yym25 + if false { + } else { + r.EncodeBool(bool(yy24)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy27 := &x.Template + yy27.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("template")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy29 := &x.Template + yy29.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *JobSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "parallelism": + if r.TryDecodeAsNil() { + if x.Parallelism != nil { + x.Parallelism = nil + } + } else { + if x.Parallelism == nil { + x.Parallelism = new(int32) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(x.Parallelism)) = int32(r.DecodeInt(32)) + } + } + case "completions": + if r.TryDecodeAsNil() { + if x.Completions != nil { + x.Completions = nil + } + } else { + if x.Completions == nil { + x.Completions = new(int32) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(x.Completions)) = int32(r.DecodeInt(32)) + } + } + case "activeDeadlineSeconds": + if r.TryDecodeAsNil() { + if x.ActiveDeadlineSeconds != nil { + x.ActiveDeadlineSeconds = nil + } + } else { + if x.ActiveDeadlineSeconds == nil { + x.ActiveDeadlineSeconds = new(int64) + } + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) + } + } + case "selector": + if r.TryDecodeAsNil() { + if x.Selector != nil { + x.Selector = nil + } + } else { + if x.Selector == nil { + x.Selector = new(pkg1_v1.LabelSelector) + } + yym11 := z.DecBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.DecExt(x.Selector) { + } else { + z.DecFallback(x.Selector, false) + } + } + case "manualSelector": + if r.TryDecodeAsNil() { + if x.ManualSelector != nil { + x.ManualSelector = nil + } + } else { + if x.ManualSelector == nil { + x.ManualSelector = new(bool) + } + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*bool)(x.ManualSelector)) = r.DecodeBool() + } + } + case "template": + if r.TryDecodeAsNil() { + x.Template = pkg3_v1.PodTemplateSpec{} + } else { + yyv14 := &x.Template + yyv14.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj15 int + var yyb15 bool + var yyhl15 bool = l >= 0 + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Parallelism != nil { + x.Parallelism = nil + } + } else { + if x.Parallelism == nil { + x.Parallelism = new(int32) + } + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*int32)(x.Parallelism)) = int32(r.DecodeInt(32)) + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Completions != nil { + x.Completions = nil + } + } else { + if x.Completions == nil { + x.Completions = new(int32) + } + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *((*int32)(x.Completions)) = int32(r.DecodeInt(32)) + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ActiveDeadlineSeconds != nil { + x.ActiveDeadlineSeconds = nil + } + } else { + if x.ActiveDeadlineSeconds == nil { + x.ActiveDeadlineSeconds = new(int64) + } + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Selector != nil { + x.Selector = nil + } + } else { + if x.Selector == nil { + x.Selector = new(pkg1_v1.LabelSelector) + } + yym23 := z.DecBinary() + _ = yym23 + if false { + } else if z.HasExtensions() && z.DecExt(x.Selector) { + } else { + z.DecFallback(x.Selector, false) + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ManualSelector != nil { + x.ManualSelector = nil + } + } else { + if x.ManualSelector == nil { + x.ManualSelector = new(bool) + } + yym25 := z.DecBinary() + _ = yym25 + if false { + } else { + *((*bool)(x.ManualSelector)) = r.DecodeBool() + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Template = pkg3_v1.PodTemplateSpec{} + } else { + yyv26 := &x.Template + yyv26.CodecDecodeSelf(d) + } + for { + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj15-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *JobStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [6]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = len(x.Conditions) != 0 + yyq2[1] = x.StartTime != nil + yyq2[2] = x.CompletionTime != nil + yyq2[3] = x.Active != 0 + yyq2[4] = x.Succeeded != 0 + yyq2[5] = x.Failed != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(6) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.Conditions == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + h.encSliceJobCondition(([]JobCondition)(x.Conditions), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("conditions")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Conditions == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + h.encSliceJobCondition(([]JobCondition)(x.Conditions), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.StartTime == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(x.StartTime) { + } else if yym7 { + z.EncBinaryMarshal(x.StartTime) + } else if !yym7 && z.IsJSONHandle() { + z.EncJSONMarshal(x.StartTime) + } else { + z.EncFallback(x.StartTime) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("startTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.StartTime == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.EncExt(x.StartTime) { + } else if yym8 { + z.EncBinaryMarshal(x.StartTime) + } else if !yym8 && z.IsJSONHandle() { + z.EncJSONMarshal(x.StartTime) + } else { + z.EncFallback(x.StartTime) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.CompletionTime == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else if z.HasExtensions() && z.EncExt(x.CompletionTime) { + } else if yym10 { + z.EncBinaryMarshal(x.CompletionTime) + } else if !yym10 && z.IsJSONHandle() { + z.EncJSONMarshal(x.CompletionTime) + } else { + z.EncFallback(x.CompletionTime) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("completionTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.CompletionTime == nil { + r.EncodeNil() + } else { + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(x.CompletionTime) { + } else if yym11 { + z.EncBinaryMarshal(x.CompletionTime) + } else if !yym11 && z.IsJSONHandle() { + z.EncJSONMarshal(x.CompletionTime) + } else { + z.EncFallback(x.CompletionTime) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeInt(int64(x.Active)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("active")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeInt(int64(x.Active)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeInt(int64(x.Succeeded)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("succeeded")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeInt(int64(x.Succeeded)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeInt(int64(x.Failed)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("failed")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeInt(int64(x.Failed)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *JobStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *JobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "conditions": + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv4 := &x.Conditions + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + h.decSliceJobCondition((*[]JobCondition)(yyv4), d) + } + } + case "startTime": + if r.TryDecodeAsNil() { + if x.StartTime != nil { + x.StartTime = nil + } + } else { + if x.StartTime == nil { + x.StartTime = new(pkg1_v1.Time) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(x.StartTime) { + } else if yym7 { + z.DecBinaryUnmarshal(x.StartTime) + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.StartTime) + } else { + z.DecFallback(x.StartTime, false) + } + } + case "completionTime": + if r.TryDecodeAsNil() { + if x.CompletionTime != nil { + x.CompletionTime = nil + } + } else { + if x.CompletionTime == nil { + x.CompletionTime = new(pkg1_v1.Time) + } + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(x.CompletionTime) { + } else if yym9 { + z.DecBinaryUnmarshal(x.CompletionTime) + } else if !yym9 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.CompletionTime) + } else { + z.DecFallback(x.CompletionTime, false) + } + } + case "active": + if r.TryDecodeAsNil() { + x.Active = 0 + } else { + yyv10 := &x.Active + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int32)(yyv10)) = int32(r.DecodeInt(32)) + } + } + case "succeeded": + if r.TryDecodeAsNil() { + x.Succeeded = 0 + } else { + yyv12 := &x.Succeeded + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int32)(yyv12)) = int32(r.DecodeInt(32)) + } + } + case "failed": + if r.TryDecodeAsNil() { + x.Failed = 0 + } else { + yyv14 := &x.Failed + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*int32)(yyv14)) = int32(r.DecodeInt(32)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *JobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj16 int + var yyb16 bool + var yyhl16 bool = l >= 0 + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv17 := &x.Conditions + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + h.decSliceJobCondition((*[]JobCondition)(yyv17), d) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.StartTime != nil { + x.StartTime = nil + } + } else { + if x.StartTime == nil { + x.StartTime = new(pkg1_v1.Time) + } + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(x.StartTime) { + } else if yym20 { + z.DecBinaryUnmarshal(x.StartTime) + } else if !yym20 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.StartTime) + } else { + z.DecFallback(x.StartTime, false) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.CompletionTime != nil { + x.CompletionTime = nil + } + } else { + if x.CompletionTime == nil { + x.CompletionTime = new(pkg1_v1.Time) + } + yym22 := z.DecBinary() + _ = yym22 + if false { + } else if z.HasExtensions() && z.DecExt(x.CompletionTime) { + } else if yym22 { + z.DecBinaryUnmarshal(x.CompletionTime) + } else if !yym22 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.CompletionTime) + } else { + z.DecFallback(x.CompletionTime, false) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Active = 0 + } else { + yyv23 := &x.Active + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*int32)(yyv23)) = int32(r.DecodeInt(32)) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Succeeded = 0 + } else { + yyv25 := &x.Succeeded + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*int32)(yyv25)) = int32(r.DecodeInt(32)) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Failed = 0 + } else { + yyv27 := &x.Failed + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*int32)(yyv27)) = int32(r.DecodeInt(32)) + } + } + for { + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj16-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x JobConditionType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *JobConditionType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *JobCondition) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [6]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[2] = true + yyq2[3] = true + yyq2[4] = x.Reason != "" + yyq2[5] = x.Message != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(6) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yysf7 := &x.Status + yysf7.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yysf8 := &x.Status + yysf8.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.LastProbeTime + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else if yym11 { + z.EncBinaryMarshal(yy10) + } else if !yym11 && z.IsJSONHandle() { + z.EncJSONMarshal(yy10) + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastProbeTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.LastProbeTime + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else if yym13 { + z.EncBinaryMarshal(yy12) + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(yy12) + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy15 := &x.LastTransitionTime + yym16 := z.EncBinary() + _ = yym16 + if false { + } else if z.HasExtensions() && z.EncExt(yy15) { + } else if yym16 { + z.EncBinaryMarshal(yy15) + } else if !yym16 && z.IsJSONHandle() { + z.EncJSONMarshal(yy15) + } else { + z.EncFallback(yy15) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.LastTransitionTime + yym18 := z.EncBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.EncExt(yy17) { + } else if yym18 { + z.EncBinaryMarshal(yy17) + } else if !yym18 && z.IsJSONHandle() { + z.EncJSONMarshal(yy17) + } else { + z.EncFallback(yy17) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym21 := z.EncBinary() + _ = yym21 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("message")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym24 := z.EncBinary() + _ = yym24 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *JobCondition) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *JobCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = "" + } else { + yyv5 := &x.Status + yyv5.CodecDecodeSelf(d) + } + case "lastProbeTime": + if r.TryDecodeAsNil() { + x.LastProbeTime = pkg1_v1.Time{} + } else { + yyv6 := &x.LastProbeTime + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if yym7 { + z.DecBinaryUnmarshal(yyv6) + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) + } else { + z.DecFallback(yyv6, false) + } + } + case "lastTransitionTime": + if r.TryDecodeAsNil() { + x.LastTransitionTime = pkg1_v1.Time{} + } else { + yyv8 := &x.LastTransitionTime + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else if yym9 { + z.DecBinaryUnmarshal(yyv8) + } else if !yym9 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv8) + } else { + z.DecFallback(yyv8, false) + } + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv10 := &x.Reason + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + case "message": + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv12 := &x.Message + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *JobCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv15 := &x.Type + yyv15.CodecDecodeSelf(d) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = "" + } else { + yyv16 := &x.Status + yyv16.CodecDecodeSelf(d) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastProbeTime = pkg1_v1.Time{} + } else { + yyv17 := &x.LastProbeTime + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else if yym18 { + z.DecBinaryUnmarshal(yyv17) + } else if !yym18 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv17) + } else { + z.DecFallback(yyv17, false) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastTransitionTime = pkg1_v1.Time{} + } else { + yyv19 := &x.LastTransitionTime + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else if yym20 { + z.DecBinaryUnmarshal(yyv19) + } else if !yym20 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv19) + } else { + z.DecFallback(yyv19, false) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv21 := &x.Reason + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv23 := &x.Message + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*string)(yyv23)) = r.DecodeString() + } + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj14-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) encSliceJob(v []Job, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []Job{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 880) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]Job, yyrl1) + } + } else { + yyv1 = make([]Job, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Job{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Job{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Job{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Job{}) // var yyz1 Job + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = Job{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Job{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceJobCondition(v []JobCondition, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []JobCondition{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 112) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]JobCondition, yyrl1) + } + } else { + yyv1 = make([]JobCondition, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = JobCondition{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, JobCondition{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = JobCondition{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, JobCondition{}) // var yyz1 JobCondition + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = JobCondition{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []JobCondition{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/types.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/types.go similarity index 64% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/types.go rename to vendor/k8s.io/client-go/pkg/apis/batch/v1/types.go index e47873747..734e6204d 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/types.go +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/types.go @@ -17,34 +17,38 @@ limitations under the License. package v1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/pkg/api/v1" ) // +genclient=true // Job represents the configuration of a single job. type Job struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Status is a structure describing current status of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // JobList is a collection of jobs. type JobList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is the list of Job. Items []Job `json:"items" protobuf:"bytes,2,rep,name=items"` @@ -57,7 +61,8 @@ type JobSpec struct { // run at any given time. The actual number of pods running in steady state will // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), // i.e. when the work left to do is less than max parallelism. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md + // More info: http://kubernetes.io/docs/user-guide/jobs + // +optional Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"` // Completions specifies the desired number of successfully finished pods the @@ -65,17 +70,20 @@ type JobSpec struct { // pod signals the success of all pods, and allows parallelism to have any positive // value. Setting to 1 means that parallelism is limited to 1 and the success of that // pod signals the success of the job. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md + // More info: http://kubernetes.io/docs/user-guide/jobs + // +optional Completions *int32 `json:"completions,omitempty" protobuf:"varint,2,opt,name=completions"` // Optional duration in seconds relative to the startTime that the job may be active // before the system tries to terminate it; value must be positive integer + // +optional ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"` // Selector is a label query over pods that should match the pod count. // Normally, the system sets this field for you. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"` + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"` // ManualSelector controls generation of pod labels and pod selectors. // Leave `manualSelector` unset unless you are certain what you are doing. @@ -87,11 +95,12 @@ type JobSpec struct { // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` // API. // More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md + // +optional ManualSelector *bool `json:"manualSelector,omitempty" protobuf:"varint,5,opt,name=manualSelector"` // Template is the object that describes the pod that will be created when // executing a job. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md + // More info: http://kubernetes.io/docs/user-guide/jobs Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,6,opt,name=template"` } @@ -99,26 +108,32 @@ type JobSpec struct { type JobStatus struct { // Conditions represent the latest available observations of an object's current state. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md + // More info: http://kubernetes.io/docs/user-guide/jobs + // +optional Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // StartTime represents time when the job was acknowledged by the Job Manager. // It is not guaranteed to be set in happens-before order across separate operations. // It is represented in RFC3339 form and is in UTC. - StartTime *unversioned.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"` + // +optional + StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"` // CompletionTime represents time when the job was completed. It is not guaranteed to // be set in happens-before order across separate operations. // It is represented in RFC3339 form and is in UTC. - CompletionTime *unversioned.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"` + // +optional + CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"` // Active is the number of actively running pods. + // +optional Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"` // Succeeded is the number of pods which reached Phase Succeeded. + // +optional Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"` // Failed is the number of pods which reached Phase Failed. + // +optional Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"` } @@ -139,48 +154,15 @@ type JobCondition struct { // Status of the condition, one of True, False, Unknown. Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"` // Last time the condition was checked. - LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` + // +optional + LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` // Last time the condition transit from one status to another. - LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` // (brief) reason for the condition's last transition. + // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` // Human readable message indicating details about last transition. + // +optional Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` } - -// 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/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/types_swagger_doc_generated.go similarity index 75% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/types_swagger_doc_generated.go rename to vendor/k8s.io/client-go/pkg/apis/batch/v1/types_swagger_doc_generated.go index aa0dbcc2f..3d224e703 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/types_swagger_doc_generated.go @@ -64,12 +64,12 @@ func (JobList) SwaggerDoc() map[string]string { var map_JobSpec = map[string]string{ "": "JobSpec describes how the job execution will look like.", - "parallelism": "Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", - "completions": "Completions specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", + "parallelism": "Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://kubernetes.io/docs/user-guide/jobs", + "completions": "Completions specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: http://kubernetes.io/docs/user-guide/jobs", "activeDeadlineSeconds": "Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer", - "selector": "Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors", + "selector": "Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", "manualSelector": "ManualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md", - "template": "Template is the object that describes the pod that will be created when executing a job. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", + "template": "Template is the object that describes the pod that will be created when executing a job. More info: http://kubernetes.io/docs/user-guide/jobs", } func (JobSpec) SwaggerDoc() map[string]string { @@ -78,7 +78,7 @@ func (JobSpec) SwaggerDoc() map[string]string { var map_JobStatus = map[string]string{ "": "JobStatus represents the current state of a Job.", - "conditions": "Conditions represent the latest available observations of an object's current state. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", + "conditions": "Conditions represent the latest available observations of an object's current state. More info: http://kubernetes.io/docs/user-guide/jobs", "startTime": "StartTime represents time when the job was acknowledged by the Job Manager. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", "completionTime": "CompletionTime represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", "active": "Active is the number of actively running pods.", @@ -90,25 +90,4 @@ func (JobStatus) SwaggerDoc() map[string]string { return map_JobStatus } -var map_LabelSelector = map[string]string{ - "": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", - "matchLabels": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", - "matchExpressions": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", -} - -func (LabelSelector) SwaggerDoc() map[string]string { - return map_LabelSelector -} - -var map_LabelSelectorRequirement = map[string]string{ - "": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", - "key": "key is the label key that the selector applies to.", - "operator": "operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist.", - "values": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", -} - -func (LabelSelectorRequirement) SwaggerDoc() map[string]string { - return map_LabelSelectorRequirement -} - // AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.conversion.go new file mode 100644 index 000000000..c7ee0a35b --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.conversion.go @@ -0,0 +1,202 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + api "k8s.io/client-go/pkg/api" + api_v1 "k8s.io/client-go/pkg/api/v1" + batch "k8s.io/client-go/pkg/apis/batch" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1_Job_To_batch_Job, + Convert_batch_Job_To_v1_Job, + Convert_v1_JobCondition_To_batch_JobCondition, + Convert_batch_JobCondition_To_v1_JobCondition, + Convert_v1_JobList_To_batch_JobList, + Convert_batch_JobList_To_v1_JobList, + Convert_v1_JobSpec_To_batch_JobSpec, + Convert_batch_JobSpec_To_v1_JobSpec, + Convert_v1_JobStatus_To_batch_JobStatus, + Convert_batch_JobStatus_To_v1_JobStatus, + ) +} + +func autoConvert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_JobStatus_To_batch_JobStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { + return autoConvert_v1_Job_To_batch_Job(in, out, s) +} + +func autoConvert_batch_Job_To_v1_Job(in *batch.Job, out *Job, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_batch_JobSpec_To_v1_JobSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_batch_JobStatus_To_v1_JobStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_batch_Job_To_v1_Job(in *batch.Job, out *Job, s conversion.Scope) error { + return autoConvert_batch_Job_To_v1_Job(in, out, s) +} + +func autoConvert_v1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error { + out.Type = batch.JobConditionType(in.Type) + out.Status = api.ConditionStatus(in.Status) + out.LastProbeTime = in.LastProbeTime + out.LastTransitionTime = in.LastTransitionTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +func Convert_v1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error { + return autoConvert_v1_JobCondition_To_batch_JobCondition(in, out, s) +} + +func autoConvert_batch_JobCondition_To_v1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error { + out.Type = JobConditionType(in.Type) + out.Status = api_v1.ConditionStatus(in.Status) + out.LastProbeTime = in.LastProbeTime + out.LastTransitionTime = in.LastTransitionTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +func Convert_batch_JobCondition_To_v1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error { + return autoConvert_batch_JobCondition_To_v1_JobCondition(in, out, s) +} + +func autoConvert_v1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]batch.Job, len(*in)) + for i := range *in { + if err := Convert_v1_Job_To_batch_Job(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_v1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error { + return autoConvert_v1_JobList_To_batch_JobList(in, out, s) +} + +func autoConvert_batch_JobList_To_v1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Job, len(*in)) + for i := range *in { + if err := Convert_batch_Job_To_v1_Job(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = make([]Job, 0) + } + return nil +} + +func Convert_batch_JobList_To_v1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error { + return autoConvert_batch_JobList_To_v1_JobList(in, out, s) +} + +func autoConvert_v1_JobSpec_To_batch_JobSpec(in *JobSpec, out *batch.JobSpec, s conversion.Scope) error { + out.Parallelism = (*int32)(unsafe.Pointer(in.Parallelism)) + out.Completions = (*int32)(unsafe.Pointer(in.Completions)) + out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds)) + out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector)) + out.ManualSelector = (*bool)(unsafe.Pointer(in.ManualSelector)) + if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +func autoConvert_batch_JobSpec_To_v1_JobSpec(in *batch.JobSpec, out *JobSpec, s conversion.Scope) error { + out.Parallelism = (*int32)(unsafe.Pointer(in.Parallelism)) + out.Completions = (*int32)(unsafe.Pointer(in.Completions)) + out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds)) + out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector)) + out.ManualSelector = (*bool)(unsafe.Pointer(in.ManualSelector)) + if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error { + out.Conditions = *(*[]batch.JobCondition)(unsafe.Pointer(&in.Conditions)) + out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime)) + out.CompletionTime = (*meta_v1.Time)(unsafe.Pointer(in.CompletionTime)) + out.Active = in.Active + out.Succeeded = in.Succeeded + out.Failed = in.Failed + return nil +} + +func Convert_v1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error { + return autoConvert_v1_JobStatus_To_batch_JobStatus(in, out, s) +} + +func autoConvert_batch_JobStatus_To_v1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error { + out.Conditions = *(*[]JobCondition)(unsafe.Pointer(&in.Conditions)) + out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime)) + out.CompletionTime = (*meta_v1.Time)(unsafe.Pointer(in.CompletionTime)) + out.Active = in.Active + out.Succeeded = in.Succeeded + out.Failed = in.Failed + return nil +} + +func Convert_batch_JobStatus_To_v1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error { + return autoConvert_batch_JobStatus_To_v1_JobStatus(in, out, s) +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.deepcopy.go similarity index 62% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.deepcopy.go index 7655a5cc5..5e31d5964 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ limitations under the License. package v1 import ( - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - api_v1 "k8s.io/client-go/1.5/pkg/api/v1" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + api_v1 "k8s.io/client-go/pkg/api/v1" reflect "reflect" ) @@ -41,8 +41,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobList, InType: reflect.TypeOf(&JobList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobSpec, InType: reflect.TypeOf(&JobSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobStatus, InType: reflect.TypeOf(&JobStatus{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LabelSelector, InType: reflect.TypeOf(&LabelSelector{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LabelSelectorRequirement, InType: reflect.TypeOf(&LabelSelectorRequirement{})}, ) } @@ -50,9 +48,11 @@ func DeepCopy_v1_Job(in interface{}, out interface{}, c *conversion.Cloner) erro { in := in.(*Job) out := out.(*Job) - out.TypeMeta = in.TypeMeta - if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -68,12 +68,9 @@ func DeepCopy_v1_JobCondition(in interface{}, out interface{}, c *conversion.Clo { in := in.(*JobCondition) out := out.(*JobCondition) - out.Type = in.Type - out.Status = in.Status + *out = *in out.LastProbeTime = in.LastProbeTime.DeepCopy() out.LastTransitionTime = in.LastTransitionTime.DeepCopy() - out.Reason = in.Reason - out.Message = in.Message return nil } } @@ -82,8 +79,7 @@ func DeepCopy_v1_JobList(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*JobList) out := out.(*JobList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Job, len(*in)) @@ -92,8 +88,6 @@ func DeepCopy_v1_JobList(in interface{}, out interface{}, c *conversion.Cloner) return err } } - } else { - out.Items = nil } return nil } @@ -103,42 +97,34 @@ func DeepCopy_v1_JobSpec(in interface{}, out interface{}, c *conversion.Cloner) { in := in.(*JobSpec) out := out.(*JobSpec) + *out = *in if in.Parallelism != nil { in, out := &in.Parallelism, &out.Parallelism *out = new(int32) **out = **in - } else { - out.Parallelism = nil } if in.Completions != nil { in, out := &in.Completions, &out.Completions *out = new(int32) **out = **in - } else { - out.Completions = nil } if in.ActiveDeadlineSeconds != nil { in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds *out = new(int64) **out = **in - } else { - out.ActiveDeadlineSeconds = nil } if in.Selector != nil { in, out := &in.Selector, &out.Selector - *out = new(LabelSelector) - if err := DeepCopy_v1_LabelSelector(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*meta_v1.LabelSelector) } - } else { - out.Selector = nil } if in.ManualSelector != nil { in, out := &in.ManualSelector, &out.ManualSelector *out = new(bool) **out = **in - } else { - out.ManualSelector = nil } if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -151,6 +137,7 @@ func DeepCopy_v1_JobStatus(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*JobStatus) out := out.(*JobStatus) + *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]JobCondition, len(*in)) @@ -159,70 +146,16 @@ func DeepCopy_v1_JobStatus(in interface{}, out interface{}, c *conversion.Cloner return err } } - } else { - out.Conditions = nil } if in.StartTime != nil { in, out := &in.StartTime, &out.StartTime - *out = new(unversioned.Time) + *out = new(meta_v1.Time) **out = (*in).DeepCopy() - } else { - out.StartTime = nil } if in.CompletionTime != nil { in, out := &in.CompletionTime, &out.CompletionTime - *out = new(unversioned.Time) + *out = new(meta_v1.Time) **out = (*in).DeepCopy() - } else { - out.CompletionTime = nil - } - out.Active = in.Active - out.Succeeded = in.Succeeded - out.Failed = in.Failed - return nil - } -} - -func DeepCopy_v1_LabelSelector(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*LabelSelector) - out := out.(*LabelSelector) - if in.MatchLabels != nil { - in, out := &in.MatchLabels, &out.MatchLabels - *out = make(map[string]string) - for key, val := range *in { - (*out)[key] = val - } - } else { - out.MatchLabels = nil - } - if in.MatchExpressions != nil { - in, out := &in.MatchExpressions, &out.MatchExpressions - *out = make([]LabelSelectorRequirement, len(*in)) - for i := range *in { - if err := DeepCopy_v1_LabelSelectorRequirement(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.MatchExpressions = nil - } - return nil - } -} - -func DeepCopy_v1_LabelSelectorRequirement(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*LabelSelectorRequirement) - out := out.(*LabelSelectorRequirement) - out.Key = in.Key - out.Operator = in.Operator - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = make([]string, len(*in)) - copy(*out, *in) - } else { - out.Values = nil } return nil } diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.defaults.go new file mode 100644 index 000000000..417024f62 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.defaults.go @@ -0,0 +1,176 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" + api_v1 "k8s.io/client-go/pkg/api/v1" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&Job{}, func(obj interface{}) { SetObjectDefaults_Job(obj.(*Job)) }) + scheme.AddTypeDefaultingFunc(&JobList{}, func(obj interface{}) { SetObjectDefaults_JobList(obj.(*JobList)) }) + return nil +} + +func SetObjectDefaults_Job(in *Job) { + SetDefaults_Job(in) + api_v1.SetDefaults_PodSpec(&in.Spec.Template.Spec) + for i := range in.Spec.Template.Spec.Volumes { + a := &in.Spec.Template.Spec.Volumes[i] + api_v1.SetDefaults_Volume(a) + if a.VolumeSource.Secret != nil { + api_v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret) + } + if a.VolumeSource.ISCSI != nil { + api_v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI) + } + if a.VolumeSource.RBD != nil { + api_v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD) + } + if a.VolumeSource.DownwardAPI != nil { + api_v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI) + for j := range a.VolumeSource.DownwardAPI.Items { + b := &a.VolumeSource.DownwardAPI.Items[j] + if b.FieldRef != nil { + api_v1.SetDefaults_ObjectFieldSelector(b.FieldRef) + } + } + } + if a.VolumeSource.ConfigMap != nil { + api_v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap) + } + if a.VolumeSource.AzureDisk != nil { + api_v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk) + } + if a.VolumeSource.Projected != nil { + api_v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected) + for j := range a.VolumeSource.Projected.Sources { + b := &a.VolumeSource.Projected.Sources[j] + if b.DownwardAPI != nil { + for k := range b.DownwardAPI.Items { + c := &b.DownwardAPI.Items[k] + if c.FieldRef != nil { + api_v1.SetDefaults_ObjectFieldSelector(c.FieldRef) + } + } + } + } + } + if a.VolumeSource.ScaleIO != nil { + api_v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + } + } + for i := range in.Spec.Template.Spec.InitContainers { + a := &in.Spec.Template.Spec.InitContainers[i] + api_v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + api_v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + api_v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + api_v1.SetDefaults_ResourceList(&a.Resources.Limits) + api_v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + api_v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + api_v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + api_v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + api_v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + api_v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + api_v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } + for i := range in.Spec.Template.Spec.Containers { + a := &in.Spec.Template.Spec.Containers[i] + api_v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + api_v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + api_v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + api_v1.SetDefaults_ResourceList(&a.Resources.Limits) + api_v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + api_v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + api_v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + api_v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + api_v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + api_v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + api_v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } +} + +func SetObjectDefaults_JobList(in *JobList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_Job(a) + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/conversion.go new file mode 100644 index 000000000..2393fdca9 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/conversion.go @@ -0,0 +1,44 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2alpha1 + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/runtime" +) + +func addConversionFuncs(scheme *runtime.Scheme) error { + var err error + // Add field label conversions for kinds having selectable nothing but ObjectMeta fields. + for _, k := range []string{"Job", "JobTemplate", "CronJob"} { + kind := k // don't close over range variables + err = scheme.AddFieldLabelConversionFunc("batch/v2alpha1", kind, + func(label, value string) (string, string, error) { + switch label { + case "metadata.name", "metadata.namespace", "status.successful": + return label, value, nil + default: + return "", "", fmt.Errorf("field label %q not supported for %q", label, kind) + } + }) + if err != nil { + return err + } + } + return nil +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/defaults.go similarity index 69% rename from vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/defaults.go rename to vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/defaults.go index d989a3e02..6da07cc7d 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/defaults.go +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/defaults.go @@ -14,23 +14,24 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v2alpha1 import ( - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { + RegisterDefaults(scheme) return scheme.AddDefaultingFuncs( - func(obj *ClusterRoleBinding) { - if len(obj.RoleRef.APIGroup) == 0 { - obj.RoleRef.APIGroup = GroupName - } - }, - func(obj *RoleBinding) { - if len(obj.RoleRef.APIGroup) == 0 { - obj.RoleRef.APIGroup = GroupName - } - }, + SetDefaults_CronJob, ) } + +func SetDefaults_CronJob(obj *CronJob) { + if obj.Spec.ConcurrencyPolicy == "" { + obj.Spec.ConcurrencyPolicy = AllowConcurrent + } + if obj.Spec.Suspend == nil { + obj.Spec.Suspend = new(bool) + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/doc.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/doc.go new file mode 100644 index 000000000..a9fe60b1c --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2alpha1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.pb.go similarity index 50% rename from vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/generated.pb.go rename to vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.pb.go index 04f08e993..81dab9908 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/autoscaling/v1/generated.pb.go +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,32 +15,32 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto +// source: k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto // DO NOT EDIT! /* - Package v1 is a generated protocol buffer package. + Package v2alpha1 is a generated protocol buffer package. It is generated from these files: - k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto + k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto It has these top-level messages: - CrossVersionObjectReference - HorizontalPodAutoscaler - HorizontalPodAutoscalerList - HorizontalPodAutoscalerSpec - HorizontalPodAutoscalerStatus - Scale - ScaleSpec - ScaleStatus + CronJob + CronJobList + CronJobSpec + CronJobStatus + JobTemplate + JobTemplateSpec */ -package v1 +package v2alpha1 import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" +import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1" import strings "strings" import reflect "reflect" @@ -56,57 +56,39 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. const _ = proto.GoGoProtoPackageIsVersion1 -func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } -func (*CrossVersionObjectReference) ProtoMessage() {} -func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{0} -} +func (m *CronJob) Reset() { *m = CronJob{} } +func (*CronJob) ProtoMessage() {} +func (*CronJob) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } -func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } -func (*HorizontalPodAutoscaler) ProtoMessage() {} -func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } +func (m *CronJobList) Reset() { *m = CronJobList{} } +func (*CronJobList) ProtoMessage() {} +func (*CronJobList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } -func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } -func (*HorizontalPodAutoscalerList) ProtoMessage() {} -func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{2} -} +func (m *CronJobSpec) Reset() { *m = CronJobSpec{} } +func (*CronJobSpec) ProtoMessage() {} +func (*CronJobSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } -func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } -func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} -func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{3} -} +func (m *CronJobStatus) Reset() { *m = CronJobStatus{} } +func (*CronJobStatus) ProtoMessage() {} +func (*CronJobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } -func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } -func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} -func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{4} -} +func (m *JobTemplate) Reset() { *m = JobTemplate{} } +func (*JobTemplate) ProtoMessage() {} +func (*JobTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } -func (m *Scale) Reset() { *m = Scale{} } -func (*Scale) ProtoMessage() {} -func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } - -func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } -func (*ScaleSpec) ProtoMessage() {} -func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } - -func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } -func (*ScaleStatus) ProtoMessage() {} -func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} } +func (*JobTemplateSpec) ProtoMessage() {} +func (*JobTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } func init() { - proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.client-go.1.5.pkg.apis.autoscaling.v1.CrossVersionObjectReference") - proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.client-go.1.5.pkg.apis.autoscaling.v1.HorizontalPodAutoscaler") - proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.client-go.1.5.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerList") - proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerSpec") - proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerStatus") - proto.RegisterType((*Scale)(nil), "k8s.io.client-go.1.5.pkg.apis.autoscaling.v1.Scale") - proto.RegisterType((*ScaleSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.autoscaling.v1.ScaleSpec") - proto.RegisterType((*ScaleStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.autoscaling.v1.ScaleStatus") + proto.RegisterType((*CronJob)(nil), "k8s.io.client-go.pkg.apis.batch.v2alpha1.CronJob") + proto.RegisterType((*CronJobList)(nil), "k8s.io.client-go.pkg.apis.batch.v2alpha1.CronJobList") + proto.RegisterType((*CronJobSpec)(nil), "k8s.io.client-go.pkg.apis.batch.v2alpha1.CronJobSpec") + proto.RegisterType((*CronJobStatus)(nil), "k8s.io.client-go.pkg.apis.batch.v2alpha1.CronJobStatus") + proto.RegisterType((*JobTemplate)(nil), "k8s.io.client-go.pkg.apis.batch.v2alpha1.JobTemplate") + proto.RegisterType((*JobTemplateSpec)(nil), "k8s.io.client-go.pkg.apis.batch.v2alpha1.JobTemplateSpec") } -func (m *CrossVersionObjectReference) Marshal() (data []byte, err error) { +func (m *CronJob) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -116,37 +98,7 @@ func (m *CrossVersionObjectReference) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *CrossVersionObjectReference) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) - i += copy(data[i:], m.Kind) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Name))) - i += copy(data[i:], m.Name) - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.APIVersion))) - i += copy(data[i:], m.APIVersion) - return i, nil -} - -func (m *HorizontalPodAutoscaler) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *HorizontalPodAutoscaler) MarshalTo(data []byte) (int, error) { +func (m *CronJob) MarshalTo(data []byte) (int, error) { var i int _ = i var l int @@ -178,7 +130,7 @@ func (m *HorizontalPodAutoscaler) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *HorizontalPodAutoscalerList) Marshal() (data []byte, err error) { +func (m *CronJobList) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -188,7 +140,7 @@ func (m *HorizontalPodAutoscalerList) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *HorizontalPodAutoscalerList) MarshalTo(data []byte) (int, error) { +func (m *CronJobList) MarshalTo(data []byte) (int, error) { var i int _ = i var l int @@ -216,7 +168,7 @@ func (m *HorizontalPodAutoscalerList) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *HorizontalPodAutoscalerSpec) Marshal() (data []byte, err error) { +func (m *CronJobSpec) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -226,36 +178,56 @@ func (m *HorizontalPodAutoscalerSpec) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *HorizontalPodAutoscalerSpec) MarshalTo(data []byte) (int, error) { +func (m *CronJobSpec) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l data[i] = 0xa i++ - i = encodeVarintGenerated(data, i, uint64(m.ScaleTargetRef.Size())) - n5, err := m.ScaleTargetRef.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(len(m.Schedule))) + i += copy(data[i:], m.Schedule) + if m.StartingDeadlineSeconds != nil { + data[i] = 0x10 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.StartingDeadlineSeconds)) + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ConcurrencyPolicy))) + i += copy(data[i:], m.ConcurrencyPolicy) + if m.Suspend != nil { + data[i] = 0x20 + i++ + if *m.Suspend { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(m.JobTemplate.Size())) + n5, err := m.JobTemplate.MarshalTo(data[i:]) if err != nil { return 0, err } i += n5 - if m.MinReplicas != nil { - data[i] = 0x10 + if m.SuccessfulJobsHistoryLimit != nil { + data[i] = 0x30 i++ - i = encodeVarintGenerated(data, i, uint64(*m.MinReplicas)) + i = encodeVarintGenerated(data, i, uint64(*m.SuccessfulJobsHistoryLimit)) } - data[i] = 0x18 - i++ - i = encodeVarintGenerated(data, i, uint64(m.MaxReplicas)) - if m.TargetCPUUtilizationPercentage != nil { - data[i] = 0x20 + if m.FailedJobsHistoryLimit != nil { + data[i] = 0x38 i++ - i = encodeVarintGenerated(data, i, uint64(*m.TargetCPUUtilizationPercentage)) + i = encodeVarintGenerated(data, i, uint64(*m.FailedJobsHistoryLimit)) } return i, nil } -func (m *HorizontalPodAutoscalerStatus) Marshal() (data []byte, err error) { +func (m *CronJobStatus) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -265,41 +237,37 @@ func (m *HorizontalPodAutoscalerStatus) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *HorizontalPodAutoscalerStatus) MarshalTo(data []byte) (int, error) { +func (m *CronJobStatus) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.ObservedGeneration != nil { - data[i] = 0x8 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.ObservedGeneration)) + if len(m.Active) > 0 { + for _, msg := range m.Active { + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } - if m.LastScaleTime != nil { - data[i] = 0x12 + if m.LastScheduleTime != nil { + data[i] = 0x22 i++ - i = encodeVarintGenerated(data, i, uint64(m.LastScaleTime.Size())) - n6, err := m.LastScaleTime.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.LastScheduleTime.Size())) + n6, err := m.LastScheduleTime.MarshalTo(data[i:]) if err != nil { return 0, err } i += n6 } - data[i] = 0x18 - i++ - i = encodeVarintGenerated(data, i, uint64(m.CurrentReplicas)) - data[i] = 0x20 - i++ - i = encodeVarintGenerated(data, i, uint64(m.DesiredReplicas)) - if m.CurrentCPUUtilizationPercentage != nil { - data[i] = 0x28 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.CurrentCPUUtilizationPercentage)) - } return i, nil } -func (m *Scale) Marshal() (data []byte, err error) { +func (m *JobTemplate) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -309,7 +277,7 @@ func (m *Scale) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Scale) MarshalTo(data []byte) (int, error) { +func (m *JobTemplate) MarshalTo(data []byte) (int, error) { var i int _ = i var l int @@ -324,66 +292,46 @@ func (m *Scale) MarshalTo(data []byte) (int, error) { i += n7 data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n8, err := m.Spec.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) + n8, err := m.Template.MarshalTo(data[i:]) if err != nil { return 0, err } i += n8 - data[i] = 0x1a + return i, nil +} + +func (m *JobTemplateSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *JobTemplateSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n9, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n9, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n9 - return i, nil -} - -func (m *ScaleSpec) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ScaleSpec) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Replicas)) - return i, nil -} - -func (m *ScaleStatus) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ScaleStatus) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Replicas)) data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Selector))) - i += copy(data[i:], m.Selector) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n10, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n10 return i, nil } @@ -414,19 +362,7 @@ func encodeVarintGenerated(data []byte, offset int, v uint64) int { data[offset] = uint8(v) return offset + 1 } -func (m *CrossVersionObjectReference) Size() (n int) { - var l int - _ = l - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.APIVersion) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *HorizontalPodAutoscaler) Size() (n int) { +func (m *CronJob) Size() (n int) { var l int _ = l l = m.ObjectMeta.Size() @@ -438,7 +374,7 @@ func (m *HorizontalPodAutoscaler) Size() (n int) { return n } -func (m *HorizontalPodAutoscalerList) Size() (n int) { +func (m *CronJobList) Size() (n int) { var l int _ = l l = m.ListMeta.Size() @@ -452,64 +388,63 @@ func (m *HorizontalPodAutoscalerList) Size() (n int) { return n } -func (m *HorizontalPodAutoscalerSpec) Size() (n int) { +func (m *CronJobSpec) Size() (n int) { var l int _ = l - l = m.ScaleTargetRef.Size() + l = len(m.Schedule) n += 1 + l + sovGenerated(uint64(l)) - if m.MinReplicas != nil { - n += 1 + sovGenerated(uint64(*m.MinReplicas)) + if m.StartingDeadlineSeconds != nil { + n += 1 + sovGenerated(uint64(*m.StartingDeadlineSeconds)) } - n += 1 + sovGenerated(uint64(m.MaxReplicas)) - if m.TargetCPUUtilizationPercentage != nil { - n += 1 + sovGenerated(uint64(*m.TargetCPUUtilizationPercentage)) + l = len(m.ConcurrencyPolicy) + n += 1 + l + sovGenerated(uint64(l)) + if m.Suspend != nil { + n += 2 + } + l = m.JobTemplate.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.SuccessfulJobsHistoryLimit != nil { + n += 1 + sovGenerated(uint64(*m.SuccessfulJobsHistoryLimit)) + } + if m.FailedJobsHistoryLimit != nil { + n += 1 + sovGenerated(uint64(*m.FailedJobsHistoryLimit)) } return n } -func (m *HorizontalPodAutoscalerStatus) Size() (n int) { +func (m *CronJobStatus) Size() (n int) { var l int _ = l - if m.ObservedGeneration != nil { - n += 1 + sovGenerated(uint64(*m.ObservedGeneration)) + if len(m.Active) > 0 { + for _, e := range m.Active { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } } - if m.LastScaleTime != nil { - l = m.LastScaleTime.Size() + if m.LastScheduleTime != nil { + l = m.LastScheduleTime.Size() n += 1 + l + sovGenerated(uint64(l)) } - n += 1 + sovGenerated(uint64(m.CurrentReplicas)) - n += 1 + sovGenerated(uint64(m.DesiredReplicas)) - if m.CurrentCPUUtilizationPercentage != nil { - n += 1 + sovGenerated(uint64(*m.CurrentCPUUtilizationPercentage)) - } return n } -func (m *Scale) Size() (n int) { +func (m *JobTemplate) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Template.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *JobTemplateSpec) Size() (n int) { var l int _ = l l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ScaleSpec) Size() (n int) { - var l int - _ = l - n += 1 + sovGenerated(uint64(m.Replicas)) - return n -} - -func (m *ScaleStatus) Size() (n int) { - var l int - _ = l - n += 1 + sovGenerated(uint64(m.Replicas)) - l = len(m.Selector) - n += 1 + l + sovGenerated(uint64(l)) return n } @@ -526,97 +461,74 @@ func sovGenerated(x uint64) (n int) { func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *CrossVersionObjectReference) String() string { +func (this *CronJob) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&CrossVersionObjectReference{`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, + s := strings.Join([]string{`&CronJob{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CronJobSpec", "CronJobSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CronJobStatus", "CronJobStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *HorizontalPodAutoscaler) String() string { +func (this *CronJobList) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&HorizontalPodAutoscaler{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&CronJobList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CronJob", "CronJob", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *HorizontalPodAutoscalerList) String() string { +func (this *CronJobSpec) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&HorizontalPodAutoscalerList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&CronJobSpec{`, + `Schedule:` + fmt.Sprintf("%v", this.Schedule) + `,`, + `StartingDeadlineSeconds:` + valueToStringGenerated(this.StartingDeadlineSeconds) + `,`, + `ConcurrencyPolicy:` + fmt.Sprintf("%v", this.ConcurrencyPolicy) + `,`, + `Suspend:` + valueToStringGenerated(this.Suspend) + `,`, + `JobTemplate:` + strings.Replace(strings.Replace(this.JobTemplate.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`, + `SuccessfulJobsHistoryLimit:` + valueToStringGenerated(this.SuccessfulJobsHistoryLimit) + `,`, + `FailedJobsHistoryLimit:` + valueToStringGenerated(this.FailedJobsHistoryLimit) + `,`, `}`, }, "") return s } -func (this *HorizontalPodAutoscalerSpec) String() string { +func (this *CronJobStatus) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&HorizontalPodAutoscalerSpec{`, - `ScaleTargetRef:` + strings.Replace(strings.Replace(this.ScaleTargetRef.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`, - `MinReplicas:` + valueToStringGenerated(this.MinReplicas) + `,`, - `MaxReplicas:` + fmt.Sprintf("%v", this.MaxReplicas) + `,`, - `TargetCPUUtilizationPercentage:` + valueToStringGenerated(this.TargetCPUUtilizationPercentage) + `,`, + s := strings.Join([]string{`&CronJobStatus{`, + `Active:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Active), "ObjectReference", "k8s_io_kubernetes_pkg_api_v1.ObjectReference", 1), `&`, ``, 1) + `,`, + `LastScheduleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScheduleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`, `}`, }, "") return s } -func (this *HorizontalPodAutoscalerStatus) String() string { +func (this *JobTemplate) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&HorizontalPodAutoscalerStatus{`, - `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`, - `LastScaleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScaleTime), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1) + `,`, - `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`, - `DesiredReplicas:` + fmt.Sprintf("%v", this.DesiredReplicas) + `,`, - `CurrentCPUUtilizationPercentage:` + valueToStringGenerated(this.CurrentCPUUtilizationPercentage) + `,`, + s := strings.Join([]string{`&JobTemplate{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Template:` + strings.Replace(strings.Replace(this.Template.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *Scale) String() string { +func (this *JobTemplateSpec) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Scale{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ScaleSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ScaleSpec{`, - `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, - `}`, - }, "") - return s -} -func (this *ScaleStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ScaleStatus{`, - `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, - `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`, + s := strings.Join([]string{`&JobTemplateSpec{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "k8s_io_kubernetes_pkg_apis_batch_v1.JobSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -629,7 +541,7 @@ func valueToStringGenerated(v interface{}) string { pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } -func (m *CrossVersionObjectReference) Unmarshal(data []byte) error { +func (m *CronJob) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -652,147 +564,10 @@ func (m *CrossVersionObjectReference) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CrossVersionObjectReference: wiretype end group for non-group") + return fmt.Errorf("proto: CronJob: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CrossVersionObjectReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.APIVersion = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HorizontalPodAutoscaler) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CronJob: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -906,7 +681,7 @@ func (m *HorizontalPodAutoscaler) Unmarshal(data []byte) error { } return nil } -func (m *HorizontalPodAutoscalerList) Unmarshal(data []byte) error { +func (m *CronJobList) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -929,10 +704,10 @@ func (m *HorizontalPodAutoscalerList) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HorizontalPodAutoscalerList: wiretype end group for non-group") + return fmt.Errorf("proto: CronJobList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HorizontalPodAutoscalerList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CronJobList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -991,7 +766,7 @@ func (m *HorizontalPodAutoscalerList) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, HorizontalPodAutoscaler{}) + m.Items = append(m.Items, CronJob{}) if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } @@ -1017,7 +792,7 @@ func (m *HorizontalPodAutoscalerList) Unmarshal(data []byte) error { } return nil } -func (m *HorizontalPodAutoscalerSpec) Unmarshal(data []byte) error { +func (m *CronJobSpec) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -1040,17 +815,17 @@ func (m *HorizontalPodAutoscalerSpec) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: wiretype end group for non-group") + return fmt.Errorf("proto: CronJobSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CronJobSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScaleTargetRef", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Schedule", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1060,134 +835,24 @@ func (m *HorizontalPodAutoscalerSpec) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ScaleTargetRef.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } + m.Schedule = string(data[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinReplicas", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MinReplicas = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxReplicas", wireType) - } - m.MaxReplicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.MaxReplicas |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetCPUUtilizationPercentage", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TargetCPUUtilizationPercentage = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HorizontalPodAutoscalerStatus) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartingDeadlineSeconds", wireType) } var v int64 for shift := uint(0); ; shift += 7 { @@ -1204,10 +869,60 @@ func (m *HorizontalPodAutoscalerStatus) Unmarshal(data []byte) error { break } } - m.ObservedGeneration = &v - case 2: + m.StartingDeadlineSeconds = &v + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastScaleTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ConcurrencyPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConcurrencyPolicy = ConcurrencyPolicy(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Suspend", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Suspend = &b + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JobTemplate", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1231,54 +946,13 @@ func (m *HorizontalPodAutoscalerStatus) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.LastScaleTime == nil { - m.LastScaleTime = &k8s_io_kubernetes_pkg_api_unversioned.Time{} - } - if err := m.LastScaleTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + if err := m.JobTemplate.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType) - } - m.CurrentReplicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.CurrentReplicas |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DesiredReplicas", wireType) - } - m.DesiredReplicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.DesiredReplicas |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentCPUUtilizationPercentage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SuccessfulJobsHistoryLimit", wireType) } var v int32 for shift := uint(0); ; shift += 7 { @@ -1295,7 +969,27 @@ func (m *HorizontalPodAutoscalerStatus) Unmarshal(data []byte) error { break } } - m.CurrentCPUUtilizationPercentage = &v + m.SuccessfulJobsHistoryLimit = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FailedJobsHistoryLimit", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FailedJobsHistoryLimit = &v default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -1317,7 +1011,7 @@ func (m *HorizontalPodAutoscalerStatus) Unmarshal(data []byte) error { } return nil } -func (m *Scale) Unmarshal(data []byte) error { +func (m *CronJobStatus) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -1340,10 +1034,234 @@ func (m *Scale) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Scale: wiretype end group for non-group") + return fmt.Errorf("proto: CronJobStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Scale: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CronJobStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Active = append(m.Active, k8s_io_kubernetes_pkg_api_v1.ObjectReference{}) + if err := m.Active[len(m.Active)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastScheduleTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastScheduleTime == nil { + m.LastScheduleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} + } + if err := m.LastScheduleTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *JobTemplate) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: JobTemplate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JobTemplate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Template.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *JobTemplateSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: JobTemplateSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JobTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1406,203 +1324,6 @@ func (m *Scale) Unmarshal(data []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScaleSpec) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScaleSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScaleSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) - } - m.Replicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Replicas |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScaleStatus) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScaleStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScaleStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) - } - m.Replicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Replicas |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Selector = string(data[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -1730,57 +1451,55 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 823 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x4f, 0xe3, 0x46, - 0x14, 0x26, 0xbf, 0x10, 0x8c, 0x0b, 0xb4, 0x53, 0x09, 0xa2, 0x54, 0x4d, 0x90, 0xdb, 0x03, 0x55, - 0xc1, 0x56, 0xa2, 0x52, 0x95, 0x23, 0x4e, 0x45, 0x41, 0x85, 0x12, 0x0d, 0x3f, 0x54, 0x55, 0x6a, - 0x25, 0xc7, 0x1e, 0xcc, 0x90, 0xc4, 0x8e, 0x66, 0xc6, 0x51, 0xc5, 0xa9, 0xa7, 0x9e, 0x7b, 0xe9, - 0xa1, 0xff, 0x4e, 0x4f, 0xdc, 0xca, 0xb1, 0x27, 0xb4, 0xcb, 0x6a, 0xff, 0x8b, 0x3d, 0xec, 0x78, - 0x3c, 0x38, 0x4e, 0x82, 0x03, 0xd1, 0xee, 0x1e, 0x46, 0xca, 0xcc, 0x7c, 0xdf, 0xf7, 0xde, 0x7c, - 0xef, 0xf9, 0x05, 0xec, 0x74, 0xbe, 0x63, 0x06, 0x09, 0xcc, 0x4e, 0xd8, 0xc6, 0xd4, 0xc7, 0x1c, - 0x33, 0xb3, 0xdf, 0xf1, 0x4c, 0xbb, 0x4f, 0x98, 0x69, 0x87, 0x3c, 0x60, 0x8e, 0xdd, 0x25, 0xbe, - 0x67, 0x0e, 0xea, 0xa6, 0x87, 0x7d, 0x4c, 0x6d, 0x8e, 0x5d, 0xa3, 0x4f, 0x03, 0x1e, 0xc0, 0xaf, - 0x62, 0xaa, 0x31, 0xa4, 0x1a, 0x82, 0x6a, 0x44, 0x54, 0x23, 0x45, 0x35, 0x06, 0xf5, 0xca, 0x96, - 0x47, 0xf8, 0x65, 0xd8, 0x36, 0x9c, 0xa0, 0x67, 0x7a, 0x81, 0x17, 0x98, 0x52, 0xa1, 0x1d, 0x5e, - 0xc8, 0x9d, 0xdc, 0xc8, 0x5f, 0xb1, 0x72, 0xa5, 0x91, 0x99, 0x94, 0x49, 0x31, 0x0b, 0x42, 0xea, - 0xe0, 0xf1, 0x6c, 0x2a, 0xdb, 0xd9, 0x9c, 0xd0, 0x1f, 0x60, 0xca, 0x48, 0xe0, 0x63, 0x77, 0x82, - 0xb6, 0x99, 0x4d, 0x9b, 0x7c, 0x72, 0x65, 0xeb, 0x71, 0x34, 0x0d, 0x7d, 0x4e, 0x7a, 0x93, 0x39, - 0xd5, 0x1f, 0x87, 0x87, 0x9c, 0x74, 0x4d, 0xe2, 0x73, 0xc6, 0xe9, 0x38, 0x45, 0xff, 0x3b, 0x07, - 0x3e, 0x6b, 0xd2, 0x80, 0xb1, 0xf3, 0x38, 0xe5, 0xe3, 0xf6, 0x15, 0x76, 0x38, 0xc2, 0x17, 0x98, - 0x62, 0xdf, 0xc1, 0x70, 0x1d, 0x14, 0x3b, 0xc4, 0x77, 0xcb, 0xb9, 0xf5, 0xdc, 0xc6, 0xa2, 0xf5, - 0xd1, 0xcd, 0x5d, 0x6d, 0xee, 0xfe, 0xae, 0x56, 0xfc, 0x51, 0x9c, 0x21, 0x79, 0x13, 0x21, 0x7c, - 0xbb, 0x87, 0xcb, 0xf9, 0x51, 0xc4, 0x4f, 0xe2, 0x0c, 0xc9, 0x1b, 0xd8, 0x00, 0x40, 0xbc, 0x4f, - 0x05, 0x28, 0x17, 0x24, 0x0e, 0x2a, 0x1c, 0xd8, 0x6d, 0x1d, 0xa8, 0x1b, 0x94, 0x42, 0xe9, 0xff, - 0xe5, 0xc1, 0xda, 0x7e, 0x40, 0xc9, 0x75, 0xe0, 0x73, 0xbb, 0xdb, 0x0a, 0xdc, 0x5d, 0x55, 0x61, - 0x4c, 0xe1, 0xcf, 0x60, 0xa1, 0x87, 0xb9, 0xed, 0xda, 0xdc, 0x96, 0x79, 0x69, 0x8d, 0x0d, 0x23, - 0xb3, 0x37, 0x44, 0x3b, 0x18, 0xf1, 0xa3, 0x8e, 0x04, 0x67, 0x18, 0x77, 0x78, 0x86, 0x12, 0x35, - 0x78, 0x09, 0x8a, 0xac, 0x8f, 0x1d, 0xf9, 0x16, 0xad, 0xb1, 0x67, 0x3c, 0xbb, 0xe3, 0x8c, 0x8c, - 0x5c, 0x4f, 0x84, 0xda, 0xd0, 0x93, 0x68, 0x87, 0x64, 0x04, 0xd8, 0x07, 0xf3, 0x8c, 0xdb, 0x3c, - 0x64, 0xd2, 0x0f, 0xad, 0xb1, 0xff, 0x1e, 0x62, 0x49, 0x3d, 0x6b, 0x59, 0x45, 0x9b, 0x8f, 0xf7, - 0x48, 0xc5, 0xd1, 0x5f, 0x8b, 0x4a, 0x67, 0x30, 0x0f, 0x09, 0xe3, 0xf0, 0xd7, 0x09, 0x57, 0xcd, - 0x29, 0xae, 0xa6, 0x7a, 0xdc, 0x88, 0xe8, 0xd2, 0xdc, 0x8f, 0x55, 0xe8, 0x85, 0x87, 0x93, 0x94, - 0xb5, 0x1e, 0x28, 0x11, 0x8e, 0x7b, 0x4c, 0x78, 0x5b, 0x10, 0xda, 0xd6, 0xbb, 0xbf, 0xd7, 0x5a, - 0x52, 0xe1, 0x4a, 0x07, 0x91, 0x30, 0x8a, 0xf5, 0xf5, 0x37, 0xf9, 0xcc, 0x77, 0x46, 0xfe, 0xc3, - 0x3f, 0x73, 0x60, 0x59, 0x6e, 0x4f, 0x6d, 0xea, 0xe1, 0xa8, 0xd5, 0xd5, 0x73, 0x67, 0x29, 0xf7, - 0x94, 0x4f, 0xc6, 0x5a, 0x55, 0x69, 0x2d, 0x9f, 0x8c, 0x44, 0x41, 0x63, 0x51, 0x61, 0x1d, 0x68, - 0x3d, 0xe2, 0x23, 0xdc, 0xef, 0x12, 0xc7, 0x66, 0xb2, 0xe7, 0x4a, 0xd6, 0x8a, 0x20, 0x6a, 0x47, - 0xc3, 0x63, 0x94, 0xc6, 0xc0, 0x6d, 0x41, 0xb1, 0x7f, 0x4f, 0x28, 0x05, 0x49, 0xf9, 0x54, 0xc5, - 0xd3, 0x8e, 0x86, 0x57, 0x28, 0x8d, 0x83, 0x57, 0xa0, 0xca, 0x65, 0xd8, 0x66, 0xeb, 0xec, 0x4c, - 0x0c, 0x03, 0x72, 0x6d, 0x73, 0x91, 0x78, 0x0b, 0x8b, 0xc1, 0x26, 0x4c, 0xf2, 0x70, 0xb9, 0x28, - 0x95, 0x74, 0xa1, 0x52, 0x3d, 0x9d, 0x8a, 0x44, 0x4f, 0x28, 0xe9, 0xff, 0x16, 0xc0, 0xe7, 0x53, - 0x1b, 0x14, 0xee, 0x01, 0x18, 0xb4, 0x19, 0xa6, 0x03, 0xec, 0xfe, 0x10, 0x4f, 0xa3, 0x68, 0x2c, - 0x44, 0x35, 0x28, 0x58, 0xab, 0x22, 0x03, 0x78, 0x3c, 0x71, 0x8b, 0x1e, 0x61, 0x40, 0x17, 0x2c, - 0x75, 0x6d, 0xc6, 0x63, 0x97, 0x89, 0x9a, 0x40, 0x5a, 0xe3, 0xeb, 0x67, 0x76, 0x6d, 0x44, 0xb1, - 0x3e, 0x11, 0xf1, 0x96, 0x0e, 0xd3, 0x2a, 0x68, 0x54, 0x14, 0xee, 0x82, 0x15, 0x27, 0xa4, 0xa2, - 0xb2, 0x7c, 0xcc, 0xf6, 0x35, 0x65, 0xfb, 0x4a, 0x73, 0xf4, 0x1a, 0x8d, 0xe3, 0x23, 0x09, 0x17, - 0x33, 0x42, 0xb1, 0x9b, 0x48, 0x14, 0x47, 0x25, 0xbe, 0x1f, 0xbd, 0x46, 0xe3, 0x78, 0xd8, 0x03, - 0x35, 0xa5, 0x9a, 0x59, 0xc2, 0x92, 0x94, 0xfc, 0x42, 0xc8, 0xd5, 0x9a, 0xd3, 0xa1, 0xe8, 0x29, - 0x2d, 0xfd, 0x9f, 0x3c, 0x28, 0x49, 0x0b, 0x3e, 0xe0, 0xac, 0x3d, 0x1f, 0x99, 0xb5, 0xdf, 0xcc, - 0xf0, 0xf1, 0xc9, 0xcc, 0x32, 0x27, 0xeb, 0x6f, 0x63, 0x93, 0xf5, 0xdb, 0x99, 0x95, 0xa7, 0xcf, - 0xd1, 0x1d, 0xb0, 0x98, 0x24, 0x00, 0x37, 0xc1, 0x02, 0x7d, 0xa8, 0x69, 0x4e, 0x16, 0x20, 0x99, - 0x81, 0x49, 0x31, 0x13, 0x84, 0x4e, 0x80, 0x96, 0x8a, 0x30, 0x1b, 0x39, 0x42, 0x33, 0xdc, 0x15, - 0x3e, 0x06, 0x54, 0xfd, 0xd7, 0x26, 0xe8, 0x13, 0x75, 0x8e, 0x12, 0x84, 0xf5, 0xe5, 0xcd, 0xcb, - 0xea, 0xdc, 0xad, 0x58, 0xff, 0x8b, 0xf5, 0xc7, 0x7d, 0x35, 0x77, 0x23, 0xd6, 0xad, 0x58, 0x2f, - 0xc4, 0xfa, 0xeb, 0x55, 0x75, 0xee, 0x97, 0xfc, 0xa0, 0xfe, 0x36, 0x00, 0x00, 0xff, 0xff, 0x45, - 0xec, 0x9a, 0x15, 0x8e, 0x09, 0x00, 0x00, + // 799 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x94, 0x4d, 0x4f, 0xe3, 0x46, + 0x18, 0xc7, 0xe3, 0x90, 0x37, 0x26, 0xa5, 0x05, 0xb7, 0x82, 0x28, 0x95, 0x9c, 0x28, 0x52, 0xa5, + 0x14, 0x81, 0x5d, 0x42, 0x85, 0x68, 0x6f, 0x35, 0x55, 0xd5, 0x22, 0xfa, 0x22, 0x07, 0xd4, 0xaa, + 0x42, 0x15, 0x63, 0xe7, 0x49, 0x32, 0xc4, 0x6f, 0xf5, 0x8c, 0xa3, 0xe6, 0xd6, 0x8f, 0xd0, 0x6f, + 0xd1, 0x6f, 0xb1, 0x97, 0xdd, 0x03, 0x47, 0x0e, 0x7b, 0xd8, 0xbd, 0x44, 0x8b, 0xf7, 0x5b, 0xec, + 0x69, 0xe5, 0x89, 0x13, 0x07, 0x1c, 0x2f, 0x61, 0x57, 0xe2, 0xe6, 0x19, 0x3f, 0xff, 0xdf, 0x3c, + 0xcf, 0xf3, 0x7f, 0x66, 0xd0, 0x37, 0x83, 0x43, 0x2a, 0x13, 0x47, 0x19, 0xf8, 0x3a, 0x78, 0x36, + 0x30, 0xa0, 0x8a, 0x3b, 0xe8, 0x29, 0xd8, 0x25, 0x54, 0xd1, 0x31, 0x33, 0xfa, 0xca, 0xb0, 0x85, + 0x4d, 0xb7, 0x8f, 0xf7, 0x94, 0x1e, 0xd8, 0xe0, 0x61, 0x06, 0x1d, 0xd9, 0xf5, 0x1c, 0xe6, 0x88, + 0x5f, 0x4e, 0xa4, 0x72, 0x2c, 0x95, 0xdd, 0x41, 0x4f, 0x0e, 0xa5, 0x32, 0x97, 0xca, 0x53, 0x69, + 0x75, 0xb7, 0x47, 0x58, 0xdf, 0xd7, 0x65, 0xc3, 0xb1, 0x94, 0x9e, 0xd3, 0x73, 0x14, 0x4e, 0xd0, + 0xfd, 0x2e, 0x5f, 0xf1, 0x05, 0xff, 0x9a, 0x90, 0xab, 0x5f, 0x47, 0x49, 0x61, 0x97, 0x58, 0xd8, + 0xe8, 0x13, 0x1b, 0xbc, 0x51, 0x9c, 0x96, 0x05, 0x0c, 0x2b, 0xc3, 0x44, 0x3e, 0x55, 0x25, 0x4d, + 0xe5, 0xf9, 0x36, 0x23, 0x16, 0x24, 0x04, 0x07, 0xf7, 0x09, 0xa8, 0xd1, 0x07, 0x0b, 0x27, 0x74, + 0xfb, 0x69, 0x3a, 0x9f, 0x11, 0x53, 0x21, 0x36, 0xa3, 0xcc, 0x4b, 0x88, 0xe6, 0x6a, 0xa2, 0xe0, + 0x0d, 0xc1, 0x8b, 0x0b, 0x82, 0x7f, 0xb0, 0xe5, 0x9a, 0xb0, 0xa8, 0xa6, 0x9d, 0x54, 0x7b, 0x16, + 0x45, 0xef, 0xdf, 0x6f, 0x66, 0x42, 0xd4, 0xf8, 0x3f, 0x8b, 0x8a, 0x47, 0x9e, 0x63, 0x1f, 0x3b, + 0xba, 0x78, 0x81, 0x4a, 0x61, 0x77, 0x3b, 0x98, 0xe1, 0x8a, 0x50, 0x17, 0x9a, 0xe5, 0xd6, 0x57, + 0x72, 0xe4, 0xf2, 0x7c, 0xb1, 0xb1, 0xcf, 0x61, 0xb4, 0x3c, 0xdc, 0x93, 0x7f, 0xd5, 0x2f, 0xc1, + 0x60, 0x3f, 0x03, 0xc3, 0xaa, 0x78, 0x35, 0xae, 0x65, 0x82, 0x71, 0x0d, 0xc5, 0x7b, 0xda, 0x8c, + 0x2a, 0xfe, 0x81, 0x72, 0xd4, 0x05, 0xa3, 0x92, 0xe5, 0xf4, 0x03, 0x79, 0xe9, 0x19, 0x92, 0xa3, + 0x1c, 0xdb, 0x2e, 0x18, 0xea, 0x47, 0xd1, 0x19, 0xb9, 0x70, 0xa5, 0x71, 0xa2, 0x78, 0x81, 0x0a, + 0x94, 0x61, 0xe6, 0xd3, 0xca, 0x0a, 0x67, 0x1f, 0xbe, 0x07, 0x9b, 0xeb, 0xd5, 0x8f, 0x23, 0x7a, + 0x61, 0xb2, 0xd6, 0x22, 0x6e, 0xe3, 0x99, 0x80, 0xca, 0x51, 0xe4, 0x09, 0xa1, 0x4c, 0x3c, 0x4f, + 0x74, 0x4b, 0x5e, 0xae, 0x5b, 0xa1, 0x9a, 0xf7, 0x6a, 0x3d, 0x3a, 0xa9, 0x34, 0xdd, 0x99, 0xeb, + 0xd4, 0xef, 0x28, 0x4f, 0x18, 0x58, 0xb4, 0x92, 0xad, 0xaf, 0x34, 0xcb, 0xad, 0xd6, 0xc3, 0xcb, + 0x51, 0xd7, 0x22, 0x7c, 0xfe, 0xa7, 0x10, 0xa4, 0x4d, 0x78, 0x8d, 0x27, 0xb9, 0x59, 0x19, 0x61, + 0xfb, 0xc4, 0x1d, 0x54, 0x0a, 0x07, 0xbd, 0xe3, 0x9b, 0xc0, 0xcb, 0x58, 0x8d, 0xd3, 0x6a, 0x47, + 0xfb, 0xda, 0x2c, 0x42, 0x3c, 0x43, 0x5b, 0x94, 0x61, 0x8f, 0x11, 0xbb, 0xf7, 0x3d, 0xe0, 0x8e, + 0x49, 0x6c, 0x68, 0x83, 0xe1, 0xd8, 0x1d, 0xca, 0x3d, 0x5d, 0x51, 0x3f, 0x0f, 0xc6, 0xb5, 0xad, + 0xf6, 0xe2, 0x10, 0x2d, 0x4d, 0x2b, 0x9e, 0xa3, 0x0d, 0xc3, 0xb1, 0x0d, 0xdf, 0xf3, 0xc0, 0x36, + 0x46, 0xbf, 0x39, 0x26, 0x31, 0x46, 0xdc, 0xc8, 0x55, 0x55, 0x8e, 0xb2, 0xd9, 0x38, 0xba, 0x1b, + 0xf0, 0x66, 0xd1, 0xa6, 0x96, 0x04, 0x89, 0x5f, 0xa0, 0x22, 0xf5, 0xa9, 0x0b, 0x76, 0xa7, 0x92, + 0xab, 0x0b, 0xcd, 0x92, 0x5a, 0x0e, 0xc6, 0xb5, 0x62, 0x7b, 0xb2, 0xa5, 0x4d, 0xff, 0x89, 0x7f, + 0xa3, 0xf2, 0xa5, 0xa3, 0x9f, 0x82, 0xe5, 0x9a, 0x98, 0x41, 0x25, 0xcf, 0x3d, 0xfd, 0xf6, 0x01, + 0x8d, 0x3f, 0x8e, 0xd5, 0x7c, 0x4e, 0x3f, 0x8d, 0x52, 0x2f, 0xcf, 0xfd, 0xd0, 0xe6, 0xcf, 0x10, + 0xff, 0x42, 0x55, 0xea, 0x1b, 0x06, 0x50, 0xda, 0xf5, 0xcd, 0x63, 0x47, 0xa7, 0x3f, 0x12, 0xca, + 0x1c, 0x6f, 0x74, 0x42, 0x2c, 0xc2, 0x2a, 0x85, 0xba, 0xd0, 0xcc, 0xab, 0x52, 0x30, 0xae, 0x55, + 0xdb, 0xa9, 0x51, 0xda, 0x3b, 0x08, 0xa2, 0x86, 0x36, 0xbb, 0x98, 0x98, 0xd0, 0x49, 0xb0, 0x8b, + 0x9c, 0x5d, 0x0d, 0xc6, 0xb5, 0xcd, 0x1f, 0x16, 0x46, 0x68, 0x29, 0xca, 0xc6, 0x73, 0x01, 0xad, + 0xdd, 0xba, 0x31, 0xe2, 0x19, 0x2a, 0x60, 0x83, 0x91, 0x61, 0x38, 0x40, 0xe1, 0xb0, 0xee, 0xa6, + 0xf7, 0x2c, 0x7e, 0x2d, 0x34, 0xe8, 0x42, 0x68, 0x12, 0xc4, 0x17, 0xee, 0x3b, 0x0e, 0xd1, 0x22, + 0x98, 0x68, 0xa2, 0x75, 0x13, 0x53, 0x36, 0x9d, 0xc2, 0x53, 0x62, 0x01, 0xf7, 0xaf, 0xdc, 0xda, + 0x5e, 0xee, 0xa2, 0x85, 0x0a, 0xf5, 0xb3, 0x60, 0x5c, 0x5b, 0x3f, 0xb9, 0xc3, 0xd1, 0x12, 0xe4, + 0xc6, 0x4b, 0x01, 0xcd, 0xfb, 0xf4, 0x08, 0x8f, 0x61, 0x1f, 0x95, 0xd8, 0x74, 0xd8, 0xb2, 0x1f, + 0x3c, 0x6c, 0xb3, 0x5b, 0x3b, 0x9b, 0xb4, 0x19, 0xbd, 0xf1, 0x54, 0x40, 0x9f, 0xdc, 0x89, 0x7f, + 0x84, 0xfa, 0x7e, 0xb9, 0xf5, 0xd8, 0xef, 0x2c, 0x51, 0x1b, 0xaf, 0x2a, 0xed, 0x89, 0x57, 0xb7, + 0xaf, 0x6e, 0xa4, 0xcc, 0xf5, 0x8d, 0x94, 0x79, 0x71, 0x23, 0x65, 0xfe, 0x0d, 0x24, 0xe1, 0x2a, + 0x90, 0x84, 0xeb, 0x40, 0x12, 0x5e, 0x05, 0x92, 0xf0, 0xdf, 0x6b, 0x29, 0xf3, 0x67, 0x69, 0xda, + 0x9d, 0xb7, 0x01, 0x00, 0x00, 0xff, 0xff, 0x32, 0x5e, 0xac, 0x56, 0xd9, 0x08, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.proto new file mode 100644 index 000000000..4f51d6161 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.proto @@ -0,0 +1,134 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.kubernetes.pkg.apis.batch.v2alpha1; + +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v2alpha1"; + +// CronJob represents the configuration of a single cron job. +message CronJob { + // Standard object's metadata. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec is a structure defining the expected behavior of a job, including the schedule. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional + optional CronJobSpec spec = 2; + + // Status is a structure describing current status of a job. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional + optional CronJobStatus status = 3; +} + +// CronJobList is a collection of cron jobs. +message CronJobList { + // Standard list metadata + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of CronJob. + repeated CronJob items = 2; +} + +// CronJobSpec describes how the job execution will look like and when it will actually run. +message CronJobSpec { + // Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + optional string schedule = 1; + + // Optional deadline in seconds for starting the job if it misses scheduled + // time for any reason. Missed jobs executions will be counted as failed ones. + // +optional + optional int64 startingDeadlineSeconds = 2; + + // ConcurrencyPolicy specifies how to treat concurrent executions of a Job. + // +optional + optional string concurrencyPolicy = 3; + + // Suspend flag tells the controller to suspend subsequent executions, it does + // not apply to already started executions. Defaults to false. + // +optional + optional bool suspend = 4; + + // JobTemplate is the object that describes the job that will be created when + // executing a CronJob. + optional JobTemplateSpec jobTemplate = 5; + + // The number of successful finished jobs to retain. + // This is a pointer to distinguish between explicit zero and not specified. + // +optional + optional int32 successfulJobsHistoryLimit = 6; + + // The number of failed finished jobs to retain. + // This is a pointer to distinguish between explicit zero and not specified. + // +optional + optional int32 failedJobsHistoryLimit = 7; +} + +// CronJobStatus represents the current state of a cron job. +message CronJobStatus { + // Active holds pointers to currently running jobs. + // +optional + repeated k8s.io.kubernetes.pkg.api.v1.ObjectReference active = 1; + + // LastScheduleTime keeps information of when was the last time the job was successfully scheduled. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScheduleTime = 4; +} + +// JobTemplate describes a template for creating copies of a predefined pod. +message JobTemplate { + // Standard object's metadata. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Template defines jobs that will be created from this template + // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional + optional JobTemplateSpec template = 2; +} + +// JobTemplateSpec describes the data a Job should have when created from a template +message JobTemplateSpec { + // Standard object's metadata of the jobs created from this template. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the desired behavior of the job. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional + optional k8s.io.kubernetes.pkg.apis.batch.v1.JobSpec spec = 2; +} + diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/register.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/register.go new file mode 100644 index 000000000..5286ca4a0 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/register.go @@ -0,0 +1,52 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "batch" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2alpha1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &JobTemplate{}, + &CronJob{}, + &CronJobList{}, + ) + scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJob"), &CronJob{}) + scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJobList"), &CronJobList{}) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go new file mode 100644 index 000000000..8dd93175f --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go @@ -0,0 +1,2525 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v2alpha1 + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg5_resource "k8s.io/apimachinery/pkg/api/resource" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + pkg6_intstr "k8s.io/apimachinery/pkg/util/intstr" + pkg4_v1 "k8s.io/client-go/pkg/api/v1" + pkg3_v1 "k8s.io/client-go/pkg/apis/batch/v1" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81234 = 1 + codecSelferC_RAW1234 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1234 = 10 + codecSelferValueTypeMap1234 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1234 = 2 + codecSelfer_containerMapValue1234 = 3 + codecSelfer_containerMapEnd1234 = 4 + codecSelfer_containerArrayElem1234 = 6 + codecSelfer_containerArrayEnd1234 = 7 +) + +var ( + codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1234 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg5_resource.Quantity + var v1 pkg1_v1.TypeMeta + var v2 pkg2_types.UID + var v3 pkg6_intstr.IntOrString + var v4 pkg4_v1.PodTemplateSpec + var v5 pkg3_v1.JobSpec + var v6 time.Time + _, _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5, v6 + } +} + +func (x *JobTemplate) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy15 := &x.Template + yy15.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("template")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Template + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *JobTemplate) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *JobTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "template": + if r.TryDecodeAsNil() { + x.Template = JobTemplateSpec{} + } else { + yyv10 := &x.Template + yyv10.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Template = JobTemplateSpec{} + } else { + yyv18 := &x.Template + yyv18.CodecDecodeSelf(d) + } + for { + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj11-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *JobTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = true + yyq2[1] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yy4 := &x.ObjectMeta + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(yy4) { + } else { + z.EncFallback(yy4) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy6 := &x.ObjectMeta + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(yy6) { + } else { + z.EncFallback(yy6) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yy9 := &x.Spec + yy9.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy11 := &x.Spec + yy11.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *JobTemplateSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *JobTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv4 := &x.ObjectMeta + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else { + z.DecFallback(yyv4, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = pkg3_v1.JobSpec{} + } else { + yyv6 := &x.Spec + yyv6.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *JobTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = pkg3_v1.JobSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + for { + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj7-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *CronJob) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CronJob) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CronJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = CronJobSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = CronJobStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = CronJobSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = CronJobStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *CronJobList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceCronJob(([]CronJob)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceCronJob(([]CronJob)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CronJobList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CronJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceCronJob((*[]CronJob)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CronJobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceCronJob((*[]CronJob)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *CronJobSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [7]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.StartingDeadlineSeconds != nil + yyq2[2] = x.ConcurrencyPolicy != "" + yyq2[3] = x.Suspend != nil + yyq2[5] = x.SuccessfulJobsHistoryLimit != nil + yyq2[6] = x.FailedJobsHistoryLimit != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(7) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Schedule)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("schedule")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Schedule)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.StartingDeadlineSeconds == nil { + r.EncodeNil() + } else { + yy7 := *x.StartingDeadlineSeconds + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeInt(int64(yy7)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("startingDeadlineSeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.StartingDeadlineSeconds == nil { + r.EncodeNil() + } else { + yy9 := *x.StartingDeadlineSeconds + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(yy9)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + x.ConcurrencyPolicy.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("concurrencyPolicy")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.ConcurrencyPolicy.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Suspend == nil { + r.EncodeNil() + } else { + yy15 := *x.Suspend + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeBool(bool(yy15)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("suspend")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Suspend == nil { + r.EncodeNil() + } else { + yy17 := *x.Suspend + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + r.EncodeBool(bool(yy17)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy20 := &x.JobTemplate + yy20.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("jobTemplate")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy22 := &x.JobTemplate + yy22.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + if x.SuccessfulJobsHistoryLimit == nil { + r.EncodeNil() + } else { + yy25 := *x.SuccessfulJobsHistoryLimit + yym26 := z.EncBinary() + _ = yym26 + if false { + } else { + r.EncodeInt(int64(yy25)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("successfulJobsHistoryLimit")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SuccessfulJobsHistoryLimit == nil { + r.EncodeNil() + } else { + yy27 := *x.SuccessfulJobsHistoryLimit + yym28 := z.EncBinary() + _ = yym28 + if false { + } else { + r.EncodeInt(int64(yy27)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[6] { + if x.FailedJobsHistoryLimit == nil { + r.EncodeNil() + } else { + yy30 := *x.FailedJobsHistoryLimit + yym31 := z.EncBinary() + _ = yym31 + if false { + } else { + r.EncodeInt(int64(yy30)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("failedJobsHistoryLimit")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.FailedJobsHistoryLimit == nil { + r.EncodeNil() + } else { + yy32 := *x.FailedJobsHistoryLimit + yym33 := z.EncBinary() + _ = yym33 + if false { + } else { + r.EncodeInt(int64(yy32)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CronJobSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CronJobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "schedule": + if r.TryDecodeAsNil() { + x.Schedule = "" + } else { + yyv4 := &x.Schedule + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "startingDeadlineSeconds": + if r.TryDecodeAsNil() { + if x.StartingDeadlineSeconds != nil { + x.StartingDeadlineSeconds = nil + } + } else { + if x.StartingDeadlineSeconds == nil { + x.StartingDeadlineSeconds = new(int64) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64)) + } + } + case "concurrencyPolicy": + if r.TryDecodeAsNil() { + x.ConcurrencyPolicy = "" + } else { + yyv8 := &x.ConcurrencyPolicy + yyv8.CodecDecodeSelf(d) + } + case "suspend": + if r.TryDecodeAsNil() { + if x.Suspend != nil { + x.Suspend = nil + } + } else { + if x.Suspend == nil { + x.Suspend = new(bool) + } + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*bool)(x.Suspend)) = r.DecodeBool() + } + } + case "jobTemplate": + if r.TryDecodeAsNil() { + x.JobTemplate = JobTemplateSpec{} + } else { + yyv11 := &x.JobTemplate + yyv11.CodecDecodeSelf(d) + } + case "successfulJobsHistoryLimit": + if r.TryDecodeAsNil() { + if x.SuccessfulJobsHistoryLimit != nil { + x.SuccessfulJobsHistoryLimit = nil + } + } else { + if x.SuccessfulJobsHistoryLimit == nil { + x.SuccessfulJobsHistoryLimit = new(int32) + } + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int32)(x.SuccessfulJobsHistoryLimit)) = int32(r.DecodeInt(32)) + } + } + case "failedJobsHistoryLimit": + if r.TryDecodeAsNil() { + if x.FailedJobsHistoryLimit != nil { + x.FailedJobsHistoryLimit = nil + } + } else { + if x.FailedJobsHistoryLimit == nil { + x.FailedJobsHistoryLimit = new(int32) + } + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*int32)(x.FailedJobsHistoryLimit)) = int32(r.DecodeInt(32)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CronJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj16 int + var yyb16 bool + var yyhl16 bool = l >= 0 + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Schedule = "" + } else { + yyv17 := &x.Schedule + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.StartingDeadlineSeconds != nil { + x.StartingDeadlineSeconds = nil + } + } else { + if x.StartingDeadlineSeconds == nil { + x.StartingDeadlineSeconds = new(int64) + } + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64)) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ConcurrencyPolicy = "" + } else { + yyv21 := &x.ConcurrencyPolicy + yyv21.CodecDecodeSelf(d) + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Suspend != nil { + x.Suspend = nil + } + } else { + if x.Suspend == nil { + x.Suspend = new(bool) + } + yym23 := z.DecBinary() + _ = yym23 + if false { + } else { + *((*bool)(x.Suspend)) = r.DecodeBool() + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.JobTemplate = JobTemplateSpec{} + } else { + yyv24 := &x.JobTemplate + yyv24.CodecDecodeSelf(d) + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.SuccessfulJobsHistoryLimit != nil { + x.SuccessfulJobsHistoryLimit = nil + } + } else { + if x.SuccessfulJobsHistoryLimit == nil { + x.SuccessfulJobsHistoryLimit = new(int32) + } + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*int32)(x.SuccessfulJobsHistoryLimit)) = int32(r.DecodeInt(32)) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.FailedJobsHistoryLimit != nil { + x.FailedJobsHistoryLimit = nil + } + } else { + if x.FailedJobsHistoryLimit == nil { + x.FailedJobsHistoryLimit = new(int32) + } + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*int32)(x.FailedJobsHistoryLimit)) = int32(r.DecodeInt(32)) + } + } + for { + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj16-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x ConcurrencyPolicy) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *ConcurrencyPolicy) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *CronJobStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = len(x.Active) != 0 + yyq2[1] = x.LastScheduleTime != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.Active == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + h.encSlicev1_ObjectReference(([]pkg4_v1.ObjectReference)(x.Active), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("active")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Active == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + h.encSlicev1_ObjectReference(([]pkg4_v1.ObjectReference)(x.Active), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.LastScheduleTime == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(x.LastScheduleTime) { + } else if yym7 { + z.EncBinaryMarshal(x.LastScheduleTime) + } else if !yym7 && z.IsJSONHandle() { + z.EncJSONMarshal(x.LastScheduleTime) + } else { + z.EncFallback(x.LastScheduleTime) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastScheduleTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.LastScheduleTime == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.EncExt(x.LastScheduleTime) { + } else if yym8 { + z.EncBinaryMarshal(x.LastScheduleTime) + } else if !yym8 && z.IsJSONHandle() { + z.EncJSONMarshal(x.LastScheduleTime) + } else { + z.EncFallback(x.LastScheduleTime) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CronJobStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CronJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "active": + if r.TryDecodeAsNil() { + x.Active = nil + } else { + yyv4 := &x.Active + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + h.decSlicev1_ObjectReference((*[]pkg4_v1.ObjectReference)(yyv4), d) + } + } + case "lastScheduleTime": + if r.TryDecodeAsNil() { + if x.LastScheduleTime != nil { + x.LastScheduleTime = nil + } + } else { + if x.LastScheduleTime == nil { + x.LastScheduleTime = new(pkg1_v1.Time) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(x.LastScheduleTime) { + } else if yym7 { + z.DecBinaryUnmarshal(x.LastScheduleTime) + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.LastScheduleTime) + } else { + z.DecFallback(x.LastScheduleTime, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CronJobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Active = nil + } else { + yyv9 := &x.Active + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + h.decSlicev1_ObjectReference((*[]pkg4_v1.ObjectReference)(yyv9), d) + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.LastScheduleTime != nil { + x.LastScheduleTime = nil + } + } else { + if x.LastScheduleTime == nil { + x.LastScheduleTime = new(pkg1_v1.Time) + } + yym12 := z.DecBinary() + _ = yym12 + if false { + } else if z.HasExtensions() && z.DecExt(x.LastScheduleTime) { + } else if yym12 { + z.DecBinaryUnmarshal(x.LastScheduleTime) + } else if !yym12 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.LastScheduleTime) + } else { + z.DecFallback(x.LastScheduleTime, false) + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) encSliceCronJob(v []CronJob, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceCronJob(v *[]CronJob, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []CronJob{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 1144) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]CronJob, yyrl1) + } + } else { + yyv1 = make([]CronJob, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = CronJob{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, CronJob{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = CronJob{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, CronJob{}) // var yyz1 CronJob + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = CronJob{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []CronJob{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSlicev1_ObjectReference(v []pkg4_v1.ObjectReference, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg4_v1.ObjectReference, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []pkg4_v1.ObjectReference{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 112) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]pkg4_v1.ObjectReference, yyrl1) + } + } else { + yyv1 = make([]pkg4_v1.ObjectReference, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = pkg4_v1.ObjectReference{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, pkg4_v1.ObjectReference{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = pkg4_v1.ObjectReference{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, pkg4_v1.ObjectReference{}) // var yyz1 pkg4_v1.ObjectReference + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = pkg4_v1.ObjectReference{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []pkg4_v1.ObjectReference{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.go new file mode 100644 index 000000000..67f1c95e4 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.go @@ -0,0 +1,147 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/pkg/api/v1" + batchv1 "k8s.io/client-go/pkg/apis/batch/v1" +) + +// JobTemplate describes a template for creating copies of a predefined pod. +type JobTemplate struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Template defines jobs that will be created from this template + // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional + Template JobTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"` +} + +// JobTemplateSpec describes the data a Job should have when created from a template +type JobTemplateSpec struct { + // Standard object's metadata of the jobs created from this template. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Specification of the desired behavior of the job. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional + Spec batchv1.JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// +genclient=true + +// CronJob represents the configuration of a single cron job. +type CronJob struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec is a structure defining the expected behavior of a job, including the schedule. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional + Spec CronJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + + // Status is a structure describing current status of a job. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional + Status CronJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// CronJobList is a collection of cron jobs. +type CronJobList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of CronJob. + Items []CronJob `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// CronJobSpec describes how the job execution will look like and when it will actually run. +type CronJobSpec struct { + + // Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"` + + // Optional deadline in seconds for starting the job if it misses scheduled + // time for any reason. Missed jobs executions will be counted as failed ones. + // +optional + StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"` + + // ConcurrencyPolicy specifies how to treat concurrent executions of a Job. + // +optional + ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy,casttype=ConcurrencyPolicy"` + + // Suspend flag tells the controller to suspend subsequent executions, it does + // not apply to already started executions. Defaults to false. + // +optional + Suspend *bool `json:"suspend,omitempty" protobuf:"varint,4,opt,name=suspend"` + + // JobTemplate is the object that describes the job that will be created when + // executing a CronJob. + JobTemplate JobTemplateSpec `json:"jobTemplate" protobuf:"bytes,5,opt,name=jobTemplate"` + + // The number of successful finished jobs to retain. + // This is a pointer to distinguish between explicit zero and not specified. + // +optional + SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty" protobuf:"varint,6,opt,name=successfulJobsHistoryLimit"` + + // The number of failed finished jobs to retain. + // This is a pointer to distinguish between explicit zero and not specified. + // +optional + FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty" protobuf:"varint,7,opt,name=failedJobsHistoryLimit"` +} + +// ConcurrencyPolicy describes how the job will be handled. +// Only one of the following concurrent policies may be specified. +// If none of the following policies is specified, the default one +// is AllowConcurrent. +type ConcurrencyPolicy string + +const ( + // AllowConcurrent allows CronJobs to run concurrently. + AllowConcurrent ConcurrencyPolicy = "Allow" + + // ForbidConcurrent forbids concurrent runs, skipping next run if previous + // hasn't finished yet. + ForbidConcurrent ConcurrencyPolicy = "Forbid" + + // ReplaceConcurrent cancels currently running job and replaces it with a new one. + ReplaceConcurrent ConcurrencyPolicy = "Replace" +) + +// CronJobStatus represents the current state of a cron job. +type CronJobStatus struct { + // Active holds pointers to currently running jobs. + // +optional + Active []v1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"` + + // LastScheduleTime keeps information of when was the last time the job was successfully scheduled. + // +optional + LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty" protobuf:"bytes,4,opt,name=lastScheduleTime"` +} diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go new file mode 100644 index 000000000..c0b53b8e0 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go @@ -0,0 +1,96 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2alpha1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_CronJob = map[string]string{ + "": "CronJob represents the configuration of a single cron job.", + "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "spec": "Spec is a structure defining the expected behavior of a job, including the schedule. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "status": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", +} + +func (CronJob) SwaggerDoc() map[string]string { + return map_CronJob +} + +var map_CronJobList = map[string]string{ + "": "CronJobList is a collection of cron jobs.", + "metadata": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "items": "Items is the list of CronJob.", +} + +func (CronJobList) SwaggerDoc() map[string]string { + return map_CronJobList +} + +var map_CronJobSpec = map[string]string{ + "": "CronJobSpec describes how the job execution will look like and when it will actually run.", + "schedule": "Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", + "startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", + "concurrencyPolicy": "ConcurrencyPolicy specifies how to treat concurrent executions of a Job.", + "suspend": "Suspend flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", + "jobTemplate": "JobTemplate is the object that describes the job that will be created when executing a CronJob.", + "successfulJobsHistoryLimit": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", + "failedJobsHistoryLimit": "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", +} + +func (CronJobSpec) SwaggerDoc() map[string]string { + return map_CronJobSpec +} + +var map_CronJobStatus = map[string]string{ + "": "CronJobStatus represents the current state of a cron job.", + "active": "Active holds pointers to currently running jobs.", + "lastScheduleTime": "LastScheduleTime keeps information of when was the last time the job was successfully scheduled.", +} + +func (CronJobStatus) SwaggerDoc() map[string]string { + return map_CronJobStatus +} + +var map_JobTemplate = map[string]string{ + "": "JobTemplate describes a template for creating copies of a predefined pod.", + "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "template": "Template defines jobs that will be created from this template http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", +} + +func (JobTemplate) SwaggerDoc() map[string]string { + return map_JobTemplate +} + +var map_JobTemplateSpec = map[string]string{ + "": "JobTemplateSpec describes the data a Job should have when created from a template", + "metadata": "Standard object's metadata of the jobs created from this template. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "spec": "Specification of the desired behavior of the job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", +} + +func (JobTemplateSpec) SwaggerDoc() map[string]string { + return map_JobTemplateSpec +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.conversion.go new file mode 100644 index 000000000..b268575cd --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.conversion.go @@ -0,0 +1,227 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v2alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + api "k8s.io/client-go/pkg/api" + api_v1 "k8s.io/client-go/pkg/api/v1" + batch "k8s.io/client-go/pkg/apis/batch" + batch_v1 "k8s.io/client-go/pkg/apis/batch/v1" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v2alpha1_CronJob_To_batch_CronJob, + Convert_batch_CronJob_To_v2alpha1_CronJob, + Convert_v2alpha1_CronJobList_To_batch_CronJobList, + Convert_batch_CronJobList_To_v2alpha1_CronJobList, + Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec, + Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec, + Convert_v2alpha1_CronJobStatus_To_batch_CronJobStatus, + Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus, + Convert_v2alpha1_JobTemplate_To_batch_JobTemplate, + Convert_batch_JobTemplate_To_v2alpha1_JobTemplate, + Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec, + Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec, + ) +} + +func autoConvert_v2alpha1_CronJob_To_batch_CronJob(in *CronJob, out *batch.CronJob, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v2alpha1_CronJob_To_batch_CronJob(in *CronJob, out *batch.CronJob, s conversion.Scope) error { + return autoConvert_v2alpha1_CronJob_To_batch_CronJob(in, out, s) +} + +func autoConvert_batch_CronJob_To_v2alpha1_CronJob(in *batch.CronJob, out *CronJob, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_batch_CronJob_To_v2alpha1_CronJob(in *batch.CronJob, out *CronJob, s conversion.Scope) error { + return autoConvert_batch_CronJob_To_v2alpha1_CronJob(in, out, s) +} + +func autoConvert_v2alpha1_CronJobList_To_batch_CronJobList(in *CronJobList, out *batch.CronJobList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]batch.CronJob, len(*in)) + for i := range *in { + if err := Convert_v2alpha1_CronJob_To_batch_CronJob(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_v2alpha1_CronJobList_To_batch_CronJobList(in *CronJobList, out *batch.CronJobList, s conversion.Scope) error { + return autoConvert_v2alpha1_CronJobList_To_batch_CronJobList(in, out, s) +} + +func autoConvert_batch_CronJobList_To_v2alpha1_CronJobList(in *batch.CronJobList, out *CronJobList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CronJob, len(*in)) + for i := range *in { + if err := Convert_batch_CronJob_To_v2alpha1_CronJob(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = make([]CronJob, 0) + } + return nil +} + +func Convert_batch_CronJobList_To_v2alpha1_CronJobList(in *batch.CronJobList, out *CronJobList, s conversion.Scope) error { + return autoConvert_batch_CronJobList_To_v2alpha1_CronJobList(in, out, s) +} + +func autoConvert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(in *CronJobSpec, out *batch.CronJobSpec, s conversion.Scope) error { + out.Schedule = in.Schedule + out.StartingDeadlineSeconds = (*int64)(unsafe.Pointer(in.StartingDeadlineSeconds)) + out.ConcurrencyPolicy = batch.ConcurrencyPolicy(in.ConcurrencyPolicy) + out.Suspend = (*bool)(unsafe.Pointer(in.Suspend)) + if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil { + return err + } + out.SuccessfulJobsHistoryLimit = (*int32)(unsafe.Pointer(in.SuccessfulJobsHistoryLimit)) + out.FailedJobsHistoryLimit = (*int32)(unsafe.Pointer(in.FailedJobsHistoryLimit)) + return nil +} + +func Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(in *CronJobSpec, out *batch.CronJobSpec, s conversion.Scope) error { + return autoConvert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(in, out, s) +} + +func autoConvert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(in *batch.CronJobSpec, out *CronJobSpec, s conversion.Scope) error { + out.Schedule = in.Schedule + out.StartingDeadlineSeconds = (*int64)(unsafe.Pointer(in.StartingDeadlineSeconds)) + out.ConcurrencyPolicy = ConcurrencyPolicy(in.ConcurrencyPolicy) + out.Suspend = (*bool)(unsafe.Pointer(in.Suspend)) + if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil { + return err + } + out.SuccessfulJobsHistoryLimit = (*int32)(unsafe.Pointer(in.SuccessfulJobsHistoryLimit)) + out.FailedJobsHistoryLimit = (*int32)(unsafe.Pointer(in.FailedJobsHistoryLimit)) + return nil +} + +func Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(in *batch.CronJobSpec, out *CronJobSpec, s conversion.Scope) error { + return autoConvert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(in, out, s) +} + +func autoConvert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(in *CronJobStatus, out *batch.CronJobStatus, s conversion.Scope) error { + out.Active = *(*[]api.ObjectReference)(unsafe.Pointer(&in.Active)) + out.LastScheduleTime = (*v1.Time)(unsafe.Pointer(in.LastScheduleTime)) + return nil +} + +func Convert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(in *CronJobStatus, out *batch.CronJobStatus, s conversion.Scope) error { + return autoConvert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(in, out, s) +} + +func autoConvert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in *batch.CronJobStatus, out *CronJobStatus, s conversion.Scope) error { + out.Active = *(*[]api_v1.ObjectReference)(unsafe.Pointer(&in.Active)) + out.LastScheduleTime = (*v1.Time)(unsafe.Pointer(in.LastScheduleTime)) + return nil +} + +func Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in *batch.CronJobStatus, out *CronJobStatus, s conversion.Scope) error { + return autoConvert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in, out, s) +} + +func autoConvert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *batch.JobTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +func Convert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *batch.JobTemplate, s conversion.Scope) error { + return autoConvert_v2alpha1_JobTemplate_To_batch_JobTemplate(in, out, s) +} + +func autoConvert_batch_JobTemplate_To_v2alpha1_JobTemplate(in *batch.JobTemplate, out *JobTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, s); err != nil { + return err + } + return nil +} + +func Convert_batch_JobTemplate_To_v2alpha1_JobTemplate(in *batch.JobTemplate, out *JobTemplate, s conversion.Scope) error { + return autoConvert_batch_JobTemplate_To_v2alpha1_JobTemplate(in, out, s) +} + +func autoConvert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in *JobTemplateSpec, out *batch.JobTemplateSpec, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := batch_v1.Convert_v1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +func Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in *JobTemplateSpec, out *batch.JobTemplateSpec, s conversion.Scope) error { + return autoConvert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in, out, s) +} + +func autoConvert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in *batch.JobTemplateSpec, out *JobTemplateSpec, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := batch_v1.Convert_batch_JobSpec_To_v1_JobSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +func Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in *batch.JobTemplateSpec, out *JobTemplateSpec, s conversion.Scope) error { + return autoConvert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in, out, s) +} diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go new file mode 100644 index 000000000..8c9010d9f --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go @@ -0,0 +1,170 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v2alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + api_v1 "k8s.io/client-go/pkg/api/v1" + batch_v1 "k8s.io/client-go/pkg/apis/batch/v1" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJob, InType: reflect.TypeOf(&CronJob{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJobList, InType: reflect.TypeOf(&CronJobList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJobSpec, InType: reflect.TypeOf(&CronJobSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJobStatus, InType: reflect.TypeOf(&CronJobStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobTemplate, InType: reflect.TypeOf(&JobTemplate{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobTemplateSpec, InType: reflect.TypeOf(&JobTemplateSpec{})}, + ) +} + +func DeepCopy_v2alpha1_CronJob(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CronJob) + out := out.(*CronJob) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_v2alpha1_CronJobSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + if err := DeepCopy_v2alpha1_CronJobStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v2alpha1_CronJobList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CronJobList) + out := out.(*CronJobList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CronJob, len(*in)) + for i := range *in { + if err := DeepCopy_v2alpha1_CronJob(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v2alpha1_CronJobSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CronJobSpec) + out := out.(*CronJobSpec) + *out = *in + if in.StartingDeadlineSeconds != nil { + in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds + *out = new(int64) + **out = **in + } + if in.Suspend != nil { + in, out := &in.Suspend, &out.Suspend + *out = new(bool) + **out = **in + } + if err := DeepCopy_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, c); err != nil { + return err + } + if in.SuccessfulJobsHistoryLimit != nil { + in, out := &in.SuccessfulJobsHistoryLimit, &out.SuccessfulJobsHistoryLimit + *out = new(int32) + **out = **in + } + if in.FailedJobsHistoryLimit != nil { + in, out := &in.FailedJobsHistoryLimit, &out.FailedJobsHistoryLimit + *out = new(int32) + **out = **in + } + return nil + } +} + +func DeepCopy_v2alpha1_CronJobStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CronJobStatus) + out := out.(*CronJobStatus) + *out = *in + if in.Active != nil { + in, out := &in.Active, &out.Active + *out = make([]api_v1.ObjectReference, len(*in)) + copy(*out, *in) + } + if in.LastScheduleTime != nil { + in, out := &in.LastScheduleTime, &out.LastScheduleTime + *out = new(v1.Time) + **out = (*in).DeepCopy() + } + return nil + } +} + +func DeepCopy_v2alpha1_JobTemplate(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*JobTemplate) + out := out.(*JobTemplate) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v2alpha1_JobTemplateSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*JobTemplateSpec) + out := out.(*JobTemplateSpec) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := batch_v1.DeepCopy_v1_JobSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + return nil + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.defaults.go new file mode 100644 index 000000000..1c0bd0ee0 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.defaults.go @@ -0,0 +1,310 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v2alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" + v1 "k8s.io/client-go/pkg/api/v1" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&CronJob{}, func(obj interface{}) { SetObjectDefaults_CronJob(obj.(*CronJob)) }) + scheme.AddTypeDefaultingFunc(&CronJobList{}, func(obj interface{}) { SetObjectDefaults_CronJobList(obj.(*CronJobList)) }) + scheme.AddTypeDefaultingFunc(&JobTemplate{}, func(obj interface{}) { SetObjectDefaults_JobTemplate(obj.(*JobTemplate)) }) + return nil +} + +func SetObjectDefaults_CronJob(in *CronJob) { + SetDefaults_CronJob(in) + v1.SetDefaults_PodSpec(&in.Spec.JobTemplate.Spec.Template.Spec) + for i := range in.Spec.JobTemplate.Spec.Template.Spec.Volumes { + a := &in.Spec.JobTemplate.Spec.Template.Spec.Volumes[i] + v1.SetDefaults_Volume(a) + if a.VolumeSource.Secret != nil { + v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret) + } + if a.VolumeSource.ISCSI != nil { + v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI) + } + if a.VolumeSource.RBD != nil { + v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD) + } + if a.VolumeSource.DownwardAPI != nil { + v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI) + for j := range a.VolumeSource.DownwardAPI.Items { + b := &a.VolumeSource.DownwardAPI.Items[j] + if b.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.FieldRef) + } + } + } + if a.VolumeSource.ConfigMap != nil { + v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap) + } + if a.VolumeSource.AzureDisk != nil { + v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk) + } + if a.VolumeSource.Projected != nil { + v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected) + for j := range a.VolumeSource.Projected.Sources { + b := &a.VolumeSource.Projected.Sources[j] + if b.DownwardAPI != nil { + for k := range b.DownwardAPI.Items { + c := &b.DownwardAPI.Items[k] + if c.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(c.FieldRef) + } + } + } + } + } + if a.VolumeSource.ScaleIO != nil { + v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + } + } + for i := range in.Spec.JobTemplate.Spec.Template.Spec.InitContainers { + a := &in.Spec.JobTemplate.Spec.Template.Spec.InitContainers[i] + v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + v1.SetDefaults_ResourceList(&a.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } + for i := range in.Spec.JobTemplate.Spec.Template.Spec.Containers { + a := &in.Spec.JobTemplate.Spec.Template.Spec.Containers[i] + v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + v1.SetDefaults_ResourceList(&a.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } +} + +func SetObjectDefaults_CronJobList(in *CronJobList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_CronJob(a) + } +} + +func SetObjectDefaults_JobTemplate(in *JobTemplate) { + v1.SetDefaults_PodSpec(&in.Template.Spec.Template.Spec) + for i := range in.Template.Spec.Template.Spec.Volumes { + a := &in.Template.Spec.Template.Spec.Volumes[i] + v1.SetDefaults_Volume(a) + if a.VolumeSource.Secret != nil { + v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret) + } + if a.VolumeSource.ISCSI != nil { + v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI) + } + if a.VolumeSource.RBD != nil { + v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD) + } + if a.VolumeSource.DownwardAPI != nil { + v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI) + for j := range a.VolumeSource.DownwardAPI.Items { + b := &a.VolumeSource.DownwardAPI.Items[j] + if b.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.FieldRef) + } + } + } + if a.VolumeSource.ConfigMap != nil { + v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap) + } + if a.VolumeSource.AzureDisk != nil { + v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk) + } + if a.VolumeSource.Projected != nil { + v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected) + for j := range a.VolumeSource.Projected.Sources { + b := &a.VolumeSource.Projected.Sources[j] + if b.DownwardAPI != nil { + for k := range b.DownwardAPI.Items { + c := &b.DownwardAPI.Items[k] + if c.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(c.FieldRef) + } + } + } + } + } + if a.VolumeSource.ScaleIO != nil { + v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + } + } + for i := range in.Template.Spec.Template.Spec.InitContainers { + a := &in.Template.Spec.Template.Spec.InitContainers[i] + v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + v1.SetDefaults_ResourceList(&a.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } + for i := range in.Template.Spec.Template.Spec.Containers { + a := &in.Template.Spec.Template.Spec.Containers[i] + v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + v1.SetDefaults_ResourceList(&a.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/batch/zz_generated.deepcopy.go similarity index 64% rename from vendor/k8s.io/client-go/1.5/pkg/apis/batch/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/apis/batch/zz_generated.deepcopy.go index ef66e4412..6e75ecdc0 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/batch/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/apis/batch/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ limitations under the License. package batch import ( - api "k8s.io/client-go/1.5/pkg/api" - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + api "k8s.io/client-go/pkg/api" reflect "reflect" ) @@ -36,6 +36,10 @@ func init() { // to allow building arbitrary schemes. func RegisterDeepCopies(scheme *runtime.Scheme) error { return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJob, InType: reflect.TypeOf(&CronJob{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJobList, InType: reflect.TypeOf(&CronJobList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJobSpec, InType: reflect.TypeOf(&CronJobSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJobStatus, InType: reflect.TypeOf(&CronJobStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_Job, InType: reflect.TypeOf(&Job{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobCondition, InType: reflect.TypeOf(&JobCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobList, InType: reflect.TypeOf(&JobList{})}, @@ -43,20 +47,107 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobStatus, InType: reflect.TypeOf(&JobStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobTemplate, InType: reflect.TypeOf(&JobTemplate{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobTemplateSpec, InType: reflect.TypeOf(&JobTemplateSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_ScheduledJob, InType: reflect.TypeOf(&ScheduledJob{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_ScheduledJobList, InType: reflect.TypeOf(&ScheduledJobList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_ScheduledJobSpec, InType: reflect.TypeOf(&ScheduledJobSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_ScheduledJobStatus, InType: reflect.TypeOf(&ScheduledJobStatus{})}, ) } +func DeepCopy_batch_CronJob(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CronJob) + out := out.(*CronJob) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_batch_CronJobSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + if err := DeepCopy_batch_CronJobStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_batch_CronJobList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CronJobList) + out := out.(*CronJobList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CronJob, len(*in)) + for i := range *in { + if err := DeepCopy_batch_CronJob(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_batch_CronJobSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CronJobSpec) + out := out.(*CronJobSpec) + *out = *in + if in.StartingDeadlineSeconds != nil { + in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds + *out = new(int64) + **out = **in + } + if in.Suspend != nil { + in, out := &in.Suspend, &out.Suspend + *out = new(bool) + **out = **in + } + if err := DeepCopy_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, c); err != nil { + return err + } + if in.SuccessfulJobsHistoryLimit != nil { + in, out := &in.SuccessfulJobsHistoryLimit, &out.SuccessfulJobsHistoryLimit + *out = new(int32) + **out = **in + } + if in.FailedJobsHistoryLimit != nil { + in, out := &in.FailedJobsHistoryLimit, &out.FailedJobsHistoryLimit + *out = new(int32) + **out = **in + } + return nil + } +} + +func DeepCopy_batch_CronJobStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CronJobStatus) + out := out.(*CronJobStatus) + *out = *in + if in.Active != nil { + in, out := &in.Active, &out.Active + *out = make([]api.ObjectReference, len(*in)) + copy(*out, *in) + } + if in.LastScheduleTime != nil { + in, out := &in.LastScheduleTime, &out.LastScheduleTime + *out = new(v1.Time) + **out = (*in).DeepCopy() + } + return nil + } +} + func DeepCopy_batch_Job(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*Job) out := out.(*Job) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_batch_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -72,12 +163,9 @@ func DeepCopy_batch_JobCondition(in interface{}, out interface{}, c *conversion. { in := in.(*JobCondition) out := out.(*JobCondition) - out.Type = in.Type - out.Status = in.Status + *out = *in out.LastProbeTime = in.LastProbeTime.DeepCopy() out.LastTransitionTime = in.LastTransitionTime.DeepCopy() - out.Reason = in.Reason - out.Message = in.Message return nil } } @@ -86,8 +174,7 @@ func DeepCopy_batch_JobList(in interface{}, out interface{}, c *conversion.Clone { in := in.(*JobList) out := out.(*JobList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Job, len(*in)) @@ -96,8 +183,6 @@ func DeepCopy_batch_JobList(in interface{}, out interface{}, c *conversion.Clone return err } } - } else { - out.Items = nil } return nil } @@ -107,42 +192,34 @@ func DeepCopy_batch_JobSpec(in interface{}, out interface{}, c *conversion.Clone { in := in.(*JobSpec) out := out.(*JobSpec) + *out = *in if in.Parallelism != nil { in, out := &in.Parallelism, &out.Parallelism *out = new(int32) **out = **in - } else { - out.Parallelism = nil } if in.Completions != nil { in, out := &in.Completions, &out.Completions *out = new(int32) **out = **in - } else { - out.Completions = nil } if in.ActiveDeadlineSeconds != nil { in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds *out = new(int64) **out = **in - } else { - out.ActiveDeadlineSeconds = nil } if in.Selector != nil { in, out := &in.Selector, &out.Selector - *out = new(unversioned.LabelSelector) - if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } else { - out.Selector = nil } if in.ManualSelector != nil { in, out := &in.ManualSelector, &out.ManualSelector *out = new(bool) **out = **in - } else { - out.ManualSelector = nil } if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -155,6 +232,7 @@ func DeepCopy_batch_JobStatus(in interface{}, out interface{}, c *conversion.Clo { in := in.(*JobStatus) out := out.(*JobStatus) + *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]JobCondition, len(*in)) @@ -163,26 +241,17 @@ func DeepCopy_batch_JobStatus(in interface{}, out interface{}, c *conversion.Clo return err } } - } else { - out.Conditions = nil } if in.StartTime != nil { in, out := &in.StartTime, &out.StartTime - *out = new(unversioned.Time) + *out = new(v1.Time) **out = (*in).DeepCopy() - } else { - out.StartTime = nil } if in.CompletionTime != nil { in, out := &in.CompletionTime, &out.CompletionTime - *out = new(unversioned.Time) + *out = new(v1.Time) **out = (*in).DeepCopy() - } else { - out.CompletionTime = nil } - out.Active = in.Active - out.Succeeded = in.Succeeded - out.Failed = in.Failed return nil } } @@ -191,9 +260,11 @@ func DeepCopy_batch_JobTemplate(in interface{}, out interface{}, c *conversion.C { in := in.(*JobTemplate) out := out.(*JobTemplate) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_batch_JobTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -206,8 +277,11 @@ func DeepCopy_batch_JobTemplateSpec(in interface{}, out interface{}, c *conversi { in := in.(*JobTemplateSpec) out := out.(*JobTemplateSpec) - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_batch_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -215,93 +289,3 @@ func DeepCopy_batch_JobTemplateSpec(in interface{}, out interface{}, c *conversi return nil } } - -func DeepCopy_batch_ScheduledJob(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ScheduledJob) - out := out.(*ScheduledJob) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - if err := DeepCopy_batch_ScheduledJobSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - if err := DeepCopy_batch_ScheduledJobStatus(&in.Status, &out.Status, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_batch_ScheduledJobList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ScheduledJobList) - out := out.(*ScheduledJobList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ScheduledJob, len(*in)) - for i := range *in { - if err := DeepCopy_batch_ScheduledJob(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil - } -} - -func DeepCopy_batch_ScheduledJobSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ScheduledJobSpec) - out := out.(*ScheduledJobSpec) - out.Schedule = in.Schedule - if in.StartingDeadlineSeconds != nil { - in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds - *out = new(int64) - **out = **in - } else { - out.StartingDeadlineSeconds = nil - } - out.ConcurrencyPolicy = in.ConcurrencyPolicy - if in.Suspend != nil { - in, out := &in.Suspend, &out.Suspend - *out = new(bool) - **out = **in - } else { - out.Suspend = nil - } - if err := DeepCopy_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_batch_ScheduledJobStatus(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ScheduledJobStatus) - out := out.(*ScheduledJobStatus) - if in.Active != nil { - in, out := &in.Active, &out.Active - *out = make([]api.ObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Active = nil - } - if in.LastScheduleTime != nil { - in, out := &in.LastScheduleTime, &out.LastScheduleTime - *out = new(unversioned.Time) - **out = (*in).DeepCopy() - } else { - out.LastScheduleTime = nil - } - return nil - } -} diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/OWNERS b/vendor/k8s.io/client-go/pkg/apis/certificates/OWNERS new file mode 100755 index 000000000..c67bd1172 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/OWNERS @@ -0,0 +1,14 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- deads2k +- caesarxuchao +- liggitt +- sttts +- timothysc +- dims +- errordeveloper +- mbohlool +- david-mcmahon +- jianhuiz diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/doc.go b/vendor/k8s.io/client-go/pkg/apis/certificates/doc.go new file mode 100644 index 000000000..a10177469 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +groupName=certificates.k8s.io +package certificates diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/doc.go b/vendor/k8s.io/client-go/pkg/apis/certificates/helpers.go similarity index 52% rename from vendor/k8s.io/client-go/1.5/pkg/apis/certificates/doc.go rename to vendor/k8s.io/client-go/pkg/apis/certificates/helpers.go index 3a1b77095..2608e4076 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/doc.go +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/helpers.go @@ -14,8 +14,25 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register -// +k8s:openapi-gen=true - -// +groupName=certificates.k8s.io package certificates + +import ( + "crypto/x509" + "encoding/pem" + "errors" +) + +// ParseCSR extracts the CSR from the API object and decodes it. +func ParseCSR(obj *CertificateSigningRequest) (*x509.CertificateRequest, error) { + // extract PEM from request object + pemBytes := obj.Spec.Request + block, _ := pem.Decode(pemBytes) + if block == nil || block.Type != "CERTIFICATE REQUEST" { + return nil, errors.New("PEM block type must be CERTIFICATE REQUEST") + } + csr, err := x509.ParseCertificateRequest(block.Bytes) + if err != nil { + return nil, err + } + return csr, nil +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/install/install.go b/vendor/k8s.io/client-go/pkg/apis/certificates/install/install.go similarity index 55% rename from vendor/k8s.io/client-go/1.5/pkg/apis/certificates/install/install.go rename to vendor/k8s.io/client-go/pkg/apis/certificates/install/install.go index 6ae040157..8850e07aa 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/install/install.go +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/install/install.go @@ -19,25 +19,33 @@ limitations under the License. package install import ( - "k8s.io/client-go/1.5/pkg/apimachinery/announced" - "k8s.io/client-go/1.5/pkg/apis/certificates" - "k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/apis/certificates" + "k8s.io/client-go/pkg/apis/certificates/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: certificates.GroupName, - VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version}, - ImportPrefix: "k8s.io/client-go/1.5/pkg/apis/certificates", + VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version}, + ImportPrefix: "k8s.io/client-go/pkg/apis/certificates", RootScopedKinds: sets.NewString("CertificateSigningRequest"), AddInternalObjectsToScheme: certificates.AddToScheme, }, announced.VersionToSchemeFunc{ - v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, + v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/register.go b/vendor/k8s.io/client-go/pkg/apis/certificates/register.go similarity index 70% rename from vendor/k8s.io/client-go/1.5/pkg/apis/certificates/register.go rename to vendor/k8s.io/client-go/pkg/apis/certificates/register.go index eeac015ab..f9d228d00 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/register.go @@ -17,9 +17,8 @@ limitations under the License. package certificates import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) var ( @@ -31,15 +30,15 @@ var ( const GroupName = "certificates.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} // Kind takes an unqualified kind and returns a Group qualified GroupKind -func Kind(kind string) unversioned.GroupKind { +func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) unversioned.GroupResource { +func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } @@ -48,11 +47,9 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &CertificateSigningRequest{}, &CertificateSigningRequestList{}, - &api.ListOptions{}, - &api.DeleteOptions{}, ) return nil } -func (obj *CertificateSigningRequest) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } -func (obj *CertificateSigningRequestList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *CertificateSigningRequest) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } +func (obj *CertificateSigningRequestList) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/types.go b/vendor/k8s.io/client-go/pkg/apis/certificates/types.go new file mode 100644 index 000000000..4a7884a1e --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/types.go @@ -0,0 +1,143 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package certificates + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient=true +// +nonNamespaced=true + +// Describes a certificate signing request +type CertificateSigningRequest struct { + metav1.TypeMeta + // +optional + metav1.ObjectMeta + + // The certificate request itself and any additional information. + // +optional + Spec CertificateSigningRequestSpec + + // Derived information about the request. + // +optional + Status CertificateSigningRequestStatus +} + +// This information is immutable after the request is created. Only the Request +// and Usages fields can be set on creation, other fields are derived by +// Kubernetes and cannot be modified by users. +type CertificateSigningRequestSpec struct { + // Base64-encoded PKCS#10 CSR data + Request []byte + + // usages specifies a set of usage contexts the key will be + // valid for. + // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 + // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 + Usages []KeyUsage + + // Information about the requesting user. + // See user.Info interface for details. + // +optional + Username string + // UID information about the requesting user. + // See user.Info interface for details. + // +optional + UID string + // Group information about the requesting user. + // See user.Info interface for details. + // +optional + Groups []string + // Extra information about the requesting user. + // See user.Info interface for details. + // +optional + Extra map[string]ExtraValue +} + +// ExtraValue masks the value so protobuf can generate +type ExtraValue []string + +type CertificateSigningRequestStatus struct { + // Conditions applied to the request, such as approval or denial. + // +optional + Conditions []CertificateSigningRequestCondition + + // If request was approved, the controller will place the issued certificate here. + // +optional + Certificate []byte +} + +type RequestConditionType string + +// These are the possible conditions for a certificate request. +const ( + CertificateApproved RequestConditionType = "Approved" + CertificateDenied RequestConditionType = "Denied" +) + +type CertificateSigningRequestCondition struct { + // request approval state, currently Approved or Denied. + Type RequestConditionType + // brief reason for the request state + // +optional + Reason string + // human readable message with details about the request state + // +optional + Message string + // timestamp for the last update to this condition + // +optional + LastUpdateTime metav1.Time +} + +type CertificateSigningRequestList struct { + metav1.TypeMeta + // +optional + metav1.ListMeta + + // +optional + Items []CertificateSigningRequest +} + +// KeyUsages specifies valid usage contexts for keys. +// See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 +// https://tools.ietf.org/html/rfc5280#section-4.2.1.12 +type KeyUsage string + +const ( + UsageSigning KeyUsage = "signing" + UsageDigitalSignature KeyUsage = "digital signature" + UsageContentCommittment KeyUsage = "content committment" + UsageKeyEncipherment KeyUsage = "key encipherment" + UsageKeyAgreement KeyUsage = "key agreement" + UsageDataEncipherment KeyUsage = "data encipherment" + UsageCertSign KeyUsage = "cert sign" + UsageCRLSign KeyUsage = "crl sign" + UsageEncipherOnly KeyUsage = "encipher only" + UsageDecipherOnly KeyUsage = "decipher only" + UsageAny KeyUsage = "any" + UsageServerAuth KeyUsage = "server auth" + UsageClientAuth KeyUsage = "client auth" + UsageCodeSigning KeyUsage = "code signing" + UsageEmailProtection KeyUsage = "email protection" + UsageSMIME KeyUsage = "s/mime" + UsageIPsecEndSystem KeyUsage = "ipsec end system" + UsageIPsecTunnel KeyUsage = "ipsec tunnel" + UsageIPsecUser KeyUsage = "ipsec user" + UsageTimestamping KeyUsage = "timestamping" + UsageOCSPSigning KeyUsage = "ocsp signing" + UsageMicrosoftSGC KeyUsage = "microsoft sgc" + UsageNetscapSGC KeyUsage = "netscape sgc" +) diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/conversion.go similarity index 83% rename from vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/conversion.go rename to vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/conversion.go index 171c4cbcf..b9cf0b016 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/conversion.go +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/conversion.go @@ -14,19 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( "fmt" - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" ) func addConversionFuncs(scheme *runtime.Scheme) error { // Add non-generated conversion functions here. Currently there are none. - return api.Scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.String(), "CertificateSigningRequest", + return scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.String(), "CertificateSigningRequest", func(label, value string) (string, string, error) { switch label { case "metadata.name": diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/defaults.go new file mode 100644 index 000000000..cd6a29d33 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/defaults.go @@ -0,0 +1,31 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import "k8s.io/apimachinery/pkg/runtime" + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + RegisterDefaults(scheme) + return scheme.AddDefaultingFuncs( + SetDefaults_CertificateSigningRequestSpec, + ) +} +func SetDefaults_CertificateSigningRequestSpec(obj *CertificateSigningRequestSpec) { + if obj.Usages == nil { + obj.Usages = []KeyUsage{UsageDigitalSignature, UsageKeyEncipherment} + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/doc.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/doc.go new file mode 100644 index 000000000..6f257909d --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +groupName=certificates.k8s.io +package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.pb.go similarity index 68% rename from vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/generated.pb.go rename to vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.pb.go index 3124b3d60..11833465d 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,14 +15,14 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto +// source: k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto // DO NOT EDIT! /* - Package v1alpha1 is a generated protocol buffer package. + Package v1beta1 is a generated protocol buffer package. It is generated from these files: - k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto + k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto It has these top-level messages: CertificateSigningRequest @@ -30,8 +30,9 @@ limitations under the License. CertificateSigningRequestList CertificateSigningRequestSpec CertificateSigningRequestStatus + ExtraValue */ -package v1alpha1 +package v1beta1 import proto "github.com/gogo/protobuf/proto" import fmt "fmt" @@ -39,6 +40,7 @@ import math "math" import strings "strings" import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" @@ -81,12 +83,17 @@ func (*CertificateSigningRequestStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } +func (m *ExtraValue) Reset() { *m = ExtraValue{} } +func (*ExtraValue) ProtoMessage() {} +func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + func init() { - proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.client-go.1.5.pkg.apis.certificates.v1alpha1.CertificateSigningRequest") - proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.client-go.1.5.pkg.apis.certificates.v1alpha1.CertificateSigningRequestCondition") - proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.client-go.1.5.pkg.apis.certificates.v1alpha1.CertificateSigningRequestList") - proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.certificates.v1alpha1.CertificateSigningRequestSpec") - proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.certificates.v1alpha1.CertificateSigningRequestStatus") + proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequest") + proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequestCondition") + proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequestList") + proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequestSpec") + proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequestStatus") + proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.ExtraValue") } func (m *CertificateSigningRequest) Marshal() (data []byte, err error) { size := m.Size() @@ -250,6 +257,43 @@ func (m *CertificateSigningRequestSpec) MarshalTo(data []byte) (int, error) { i += copy(data[i:], s) } } + if len(m.Usages) > 0 { + for _, s := range m.Usages { + data[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.Extra) > 0 { + for k := range m.Extra { + data[i] = 0x32 + i++ + v := m.Extra[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())) + n6, err := (&v).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + } + } return i, nil } @@ -289,6 +333,39 @@ func (m *CertificateSigningRequestStatus) MarshalTo(data []byte) (int, error) { return i, nil } +func (m ExtraValue) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m ExtraValue) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m) > 0 { + for _, s := range m { + data[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + return i, nil +} + func encodeFixed64Generated(data []byte, offset int, v uint64) int { data[offset] = uint8(v) data[offset+1] = uint8(v >> 8) @@ -373,6 +450,21 @@ func (m *CertificateSigningRequestSpec) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if len(m.Usages) > 0 { + for _, s := range m.Usages { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Extra) > 0 { + for k, v := range m.Extra { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } return n } @@ -392,6 +484,18 @@ func (m *CertificateSigningRequestStatus) Size() (n int) { return n } +func (m ExtraValue) Size() (n int) { + var l int + _ = l + if len(m) > 0 { + for _, s := range m { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + func sovGenerated(x uint64) (n int) { for { n++ @@ -410,7 +514,7 @@ func (this *CertificateSigningRequest) String() string { return "nil" } s := strings.Join([]string{`&CertificateSigningRequest{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CertificateSigningRequestSpec", "CertificateSigningRequestSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CertificateSigningRequestStatus", "CertificateSigningRequestStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -425,7 +529,7 @@ func (this *CertificateSigningRequestCondition) String() string { `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, + `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -435,7 +539,7 @@ func (this *CertificateSigningRequestList) String() string { return "nil" } s := strings.Join([]string{`&CertificateSigningRequestList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CertificateSigningRequest", "CertificateSigningRequest", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -445,11 +549,23 @@ func (this *CertificateSigningRequestSpec) String() string { if this == nil { return "nil" } + keysForExtra := make([]string, 0, len(this.Extra)) + for k := range this.Extra { + keysForExtra = append(keysForExtra, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + mapStringForExtra := "map[string]ExtraValue{" + for _, k := range keysForExtra { + mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k]) + } + mapStringForExtra += "}" s := strings.Join([]string{`&CertificateSigningRequestSpec{`, `Request:` + valueToStringGenerated(this.Request) + `,`, `Username:` + fmt.Sprintf("%v", this.Username) + `,`, `UID:` + fmt.Sprintf("%v", this.UID) + `,`, `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, + `Usages:` + fmt.Sprintf("%v", this.Usages) + `,`, + `Extra:` + mapStringForExtra + `,`, `}`, }, "") return s @@ -1038,6 +1154,151 @@ func (m *CertificateSigningRequestSpec) Unmarshal(data []byte) error { } m.Groups = append(m.Groups, string(data[iNdEx:postIndex])) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Usages", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Usages = append(m.Usages, KeyUsage(data[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &ExtraValue{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.Extra == nil { + m.Extra = make(map[string]ExtraValue) + } + m.Extra[mapkey] = *mapvalue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -1171,6 +1432,85 @@ func (m *CertificateSigningRequestStatus) Unmarshal(data []byte) error { } return nil } +func (m *ExtraValue) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + *m = append(*m, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipGenerated(data []byte) (n int, err error) { l := len(data) iNdEx := 0 @@ -1277,48 +1617,58 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 681 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x4f, 0x13, 0x4f, - 0x18, 0xa6, 0xb4, 0x94, 0x32, 0xe5, 0x07, 0xbf, 0x4c, 0x8c, 0xa9, 0x4d, 0xa0, 0x66, 0xa3, 0x06, - 0x15, 0x66, 0x2d, 0x89, 0x09, 0x47, 0xb3, 0x98, 0x18, 0x22, 0x84, 0x38, 0x40, 0x62, 0x4c, 0x3c, - 0x6c, 0xb7, 0xc3, 0x32, 0x96, 0xee, 0x2e, 0xf3, 0x87, 0x84, 0x9b, 0x47, 0x8f, 0x7e, 0x02, 0xbf, - 0x86, 0x5f, 0x81, 0x23, 0x47, 0x4f, 0xa8, 0xf0, 0x05, 0x3c, 0x7b, 0x72, 0x66, 0x76, 0xb6, 0x5d, - 0x5b, 0x16, 0x35, 0xe1, 0x30, 0x49, 0xe7, 0x99, 0xf7, 0x7d, 0xde, 0xf7, 0x7d, 0xde, 0x67, 0x0b, - 0x9e, 0xf5, 0xd6, 0x38, 0xa2, 0xb1, 0xdb, 0x93, 0x1d, 0xc2, 0x22, 0x22, 0x08, 0x77, 0x93, 0x5e, - 0xe8, 0xfa, 0x09, 0xe5, 0x6e, 0x40, 0x98, 0xa0, 0xfb, 0x34, 0xf0, 0x35, 0x7a, 0xdc, 0xf6, 0x0f, - 0x93, 0x03, 0xbf, 0xed, 0x86, 0x24, 0x22, 0x4c, 0x41, 0x5d, 0x94, 0xb0, 0x58, 0xc4, 0xf0, 0x49, - 0xca, 0x80, 0x86, 0x0c, 0x48, 0x31, 0x20, 0xcd, 0x80, 0xf2, 0x0c, 0x28, 0x63, 0x68, 0xae, 0x84, - 0x54, 0x1c, 0xc8, 0x0e, 0x0a, 0xe2, 0xbe, 0x1b, 0xc6, 0x61, 0xec, 0x1a, 0xa2, 0x8e, 0xdc, 0x37, - 0x37, 0x73, 0x31, 0xbf, 0xd2, 0x02, 0xcd, 0xd5, 0xc2, 0x16, 0x5d, 0x46, 0x78, 0x2c, 0x59, 0x40, - 0x46, 0x9b, 0x6a, 0x3e, 0x2d, 0xce, 0x91, 0xd1, 0x31, 0x61, 0x9c, 0xc6, 0x11, 0xe9, 0x8e, 0xa5, - 0x2d, 0x17, 0xa7, 0x1d, 0x8f, 0x4d, 0xde, 0x5c, 0xb9, 0x3a, 0x9a, 0xc9, 0x48, 0xd0, 0xfe, 0x78, - 0x4f, 0xed, 0xab, 0xc3, 0xa5, 0xa0, 0x87, 0x2e, 0x8d, 0x04, 0x17, 0x6c, 0x34, 0xc5, 0xb9, 0x9c, - 0x04, 0x77, 0xd6, 0x87, 0x1a, 0xee, 0xd0, 0x30, 0xa2, 0x51, 0x88, 0xc9, 0x91, 0x24, 0x5c, 0xc0, - 0xd7, 0xa0, 0xd6, 0x27, 0xc2, 0xef, 0xfa, 0xc2, 0x6f, 0x94, 0xee, 0x96, 0x96, 0xea, 0xab, 0x4b, - 0xa8, 0x70, 0x19, 0x4a, 0x7e, 0xb4, 0xdd, 0x79, 0x47, 0x02, 0xb1, 0xa5, 0x72, 0x3c, 0x78, 0x7a, - 0xde, 0x9a, 0xb8, 0x38, 0x6f, 0x81, 0x21, 0x86, 0x07, 0x6c, 0xf0, 0x08, 0x54, 0x78, 0x42, 0x82, - 0xc6, 0xa4, 0x61, 0xdd, 0x46, 0xff, 0xba, 0x62, 0x54, 0xd8, 0xf4, 0x8e, 0xa2, 0xf5, 0x66, 0x6d, - 0xf1, 0x8a, 0xbe, 0x61, 0x53, 0x0a, 0x9e, 0x80, 0x2a, 0x17, 0xbe, 0x90, 0xbc, 0x51, 0x36, 0x45, - 0x5f, 0xdd, 0x64, 0x51, 0x43, 0xec, 0xcd, 0xd9, 0xb2, 0xd5, 0xf4, 0x8e, 0x6d, 0x41, 0xe7, 0xd3, - 0x24, 0x70, 0x0a, 0x73, 0xd7, 0xe3, 0xa8, 0x4b, 0x85, 0xb2, 0x0b, 0x5c, 0x03, 0x15, 0x71, 0x92, - 0x10, 0x23, 0xf5, 0x8c, 0x77, 0x2f, 0x9b, 0x61, 0x57, 0x61, 0x3f, 0xcf, 0x5b, 0xb7, 0x46, 0xe3, - 0x35, 0x8e, 0x4d, 0x06, 0x7c, 0x00, 0xaa, 0x8c, 0xf8, 0x3c, 0x8e, 0x8c, 0xa0, 0x33, 0xc3, 0x46, - 0xb0, 0x41, 0xb1, 0x7d, 0x85, 0x0f, 0xc1, 0x74, 0x9f, 0x70, 0xee, 0x87, 0xc4, 0x88, 0x30, 0xe3, - 0xcd, 0xdb, 0xc0, 0xe9, 0xad, 0x14, 0xc6, 0xd9, 0x3b, 0xec, 0x81, 0xb9, 0x43, 0x9f, 0x8b, 0xbd, - 0x44, 0xed, 0x8b, 0xec, 0x2a, 0xbb, 0x35, 0x2a, 0x46, 0xb6, 0xc7, 0xd7, 0x38, 0x20, 0xe7, 0x7c, - 0xa4, 0x53, 0xbc, 0xdb, 0x96, 0x7e, 0x6e, 0xf3, 0x37, 0x2a, 0x3c, 0x42, 0xed, 0xfc, 0x28, 0x81, - 0x85, 0x42, 0x81, 0x36, 0xa9, 0xb2, 0xe2, 0xdb, 0x31, 0x2b, 0xba, 0x7f, 0xd9, 0x88, 0x4e, 0x37, - 0x8e, 0xfc, 0xdf, 0x36, 0x53, 0xcb, 0x90, 0x9c, 0x1f, 0x13, 0x30, 0x45, 0x05, 0xe9, 0x73, 0xa5, - 0x5f, 0x59, 0x71, 0xbf, 0xbc, 0x41, 0x6f, 0x78, 0xff, 0xd9, 0xba, 0x53, 0x1b, 0xba, 0x02, 0x4e, - 0x0b, 0x39, 0x9f, 0xaf, 0x1b, 0x59, 0xdb, 0x16, 0xde, 0x07, 0xd3, 0x2c, 0xbd, 0x9a, 0x89, 0x67, - 0xbd, 0xba, 0x5e, 0x94, 0x8d, 0xc0, 0xd9, 0x1b, 0x5c, 0x06, 0x35, 0xc9, 0x55, 0x93, 0xbe, 0x5a, - 0x51, 0xba, 0xfd, 0xc1, 0xa0, 0x7b, 0x16, 0xc7, 0x83, 0x08, 0xb8, 0x00, 0xca, 0x92, 0x76, 0xed, - 0xf6, 0xeb, 0x36, 0xb0, 0xbc, 0xb7, 0xf1, 0x1c, 0x6b, 0x1c, 0x3a, 0xa0, 0x1a, 0xb2, 0x58, 0x26, - 0x5c, 0x6d, 0xbb, 0xac, 0x22, 0x80, 0x36, 0xd1, 0x0b, 0x83, 0x60, 0xfb, 0xe2, 0x7c, 0x2d, 0x81, - 0xd6, 0x1f, 0xbe, 0x04, 0xf8, 0xa1, 0x04, 0x40, 0x90, 0x19, 0x95, 0xab, 0xfe, 0xb5, 0xaa, 0xbb, - 0x37, 0xa8, 0xea, 0xe0, 0x2b, 0x18, 0xfe, 0xd1, 0x0c, 0x20, 0x8e, 0x73, 0xb5, 0x61, 0x1b, 0xd4, - 0x73, 0xdc, 0x46, 0xa2, 0x59, 0x6f, 0x5e, 0x25, 0xd4, 0x73, 0xe4, 0x38, 0x1f, 0xe3, 0x3d, 0x3a, - 0xfd, 0xbe, 0x38, 0x71, 0xa6, 0xce, 0x17, 0x75, 0xde, 0x5f, 0x2c, 0x96, 0x4e, 0xd5, 0x39, 0x53, - 0xe7, 0x9b, 0x3a, 0x1f, 0x2f, 0x17, 0x27, 0xde, 0xd4, 0xb2, 0x0e, 0x7f, 0x05, 0x00, 0x00, 0xff, - 0xff, 0x29, 0x0b, 0xef, 0x6d, 0xe0, 0x06, 0x00, 0x00, + // 839 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x54, 0xcf, 0x8f, 0xdb, 0x44, + 0x14, 0x8e, 0xf3, 0x6b, 0x93, 0xc9, 0xb2, 0xad, 0x46, 0xa8, 0x32, 0x2b, 0xd5, 0x5e, 0x59, 0x80, + 0xb6, 0xa8, 0xd8, 0x64, 0x41, 0xb0, 0x2a, 0x07, 0x24, 0x97, 0x0a, 0x15, 0x5a, 0x7e, 0xcc, 0x36, + 0x48, 0x20, 0x0e, 0x4c, 0x9c, 0x57, 0xef, 0x34, 0xf1, 0x0f, 0x3c, 0xe3, 0x68, 0x73, 0x41, 0xbd, + 0x71, 0xe5, 0xc8, 0x05, 0x89, 0x3f, 0x67, 0x8f, 0x3d, 0x72, 0x40, 0x11, 0x1b, 0x4e, 0x5c, 0xf8, + 0x03, 0x7a, 0x42, 0x33, 0x9e, 0xc4, 0x66, 0xd3, 0xd0, 0x56, 0xca, 0xcd, 0xf3, 0xcd, 0xf7, 0xbe, + 0xf7, 0xde, 0xf7, 0x9e, 0x07, 0x7d, 0x34, 0x3e, 0xe6, 0x2e, 0x4b, 0xbc, 0x71, 0x3e, 0x84, 0x2c, + 0x06, 0x01, 0xdc, 0x4b, 0xc7, 0xa1, 0x47, 0x53, 0xc6, 0xbd, 0x00, 0x32, 0xc1, 0x1e, 0xb2, 0x80, + 0x4a, 0x74, 0xda, 0x1f, 0x82, 0xa0, 0x7d, 0x2f, 0x84, 0x18, 0x32, 0x2a, 0x60, 0xe4, 0xa6, 0x59, + 0x22, 0x12, 0xec, 0x15, 0x02, 0x6e, 0x29, 0xe0, 0xa6, 0xe3, 0xd0, 0x95, 0x02, 0x6e, 0x55, 0xc0, + 0xd5, 0x02, 0xfb, 0x6f, 0x87, 0x4c, 0x9c, 0xe6, 0x43, 0x37, 0x48, 0x22, 0x2f, 0x4c, 0xc2, 0xc4, + 0x53, 0x3a, 0xc3, 0xfc, 0xa1, 0x3a, 0xa9, 0x83, 0xfa, 0x2a, 0xf4, 0xf7, 0xdf, 0xd3, 0x05, 0xd2, + 0x94, 0x45, 0x34, 0x38, 0x65, 0x31, 0x64, 0xb3, 0xb2, 0xc4, 0x08, 0x04, 0xf5, 0xa6, 0x6b, 0x55, + 0xed, 0x7b, 0x9b, 0xa2, 0xb2, 0x3c, 0x16, 0x2c, 0x82, 0xb5, 0x80, 0xf7, 0x9f, 0x17, 0xc0, 0x83, + 0x53, 0x88, 0xe8, 0x5a, 0xdc, 0xbb, 0x9b, 0xe2, 0x72, 0xc1, 0x26, 0x1e, 0x8b, 0x05, 0x17, 0xd9, + 0x5a, 0x50, 0xa5, 0x27, 0x0e, 0xd9, 0x14, 0xb2, 0xb2, 0x21, 0x38, 0xa3, 0x51, 0x3a, 0x81, 0x67, + 0xf5, 0x74, 0x73, 0xe3, 0xa8, 0x9e, 0xc1, 0x76, 0xfe, 0xae, 0xa3, 0xd7, 0x6e, 0x97, 0xfe, 0x9f, + 0xb0, 0x30, 0x66, 0x71, 0x48, 0xe0, 0x87, 0x1c, 0xb8, 0xc0, 0xdf, 0xa3, 0x8e, 0xb4, 0x6e, 0x44, + 0x05, 0x35, 0x8d, 0x03, 0xe3, 0xb0, 0x77, 0xf4, 0x8e, 0xab, 0x07, 0x59, 0xed, 0xa4, 0x1c, 0xa5, + 0x64, 0xbb, 0xd3, 0xbe, 0xfb, 0xc5, 0xf0, 0x11, 0x04, 0xe2, 0x3e, 0x08, 0xea, 0xe3, 0xf3, 0xb9, + 0x5d, 0x5b, 0xcc, 0x6d, 0x54, 0x62, 0x64, 0xa5, 0x8a, 0x53, 0xd4, 0xe4, 0x29, 0x04, 0x66, 0x5d, + 0xa9, 0x7f, 0xee, 0xbe, 0xe4, 0x9a, 0xb8, 0x1b, 0x6b, 0x3f, 0x49, 0x21, 0xf0, 0x77, 0x75, 0xee, + 0xa6, 0x3c, 0x11, 0x95, 0x09, 0x9f, 0xa1, 0x36, 0x17, 0x54, 0xe4, 0xdc, 0x6c, 0xa8, 0x9c, 0x5f, + 0x6e, 0x31, 0xa7, 0xd2, 0xf5, 0xf7, 0x74, 0xd6, 0x76, 0x71, 0x26, 0x3a, 0x9f, 0xf3, 0x6b, 0x1d, + 0x39, 0x1b, 0x63, 0x6f, 0x27, 0xf1, 0x88, 0x09, 0x96, 0xc4, 0xf8, 0x18, 0x35, 0xc5, 0x2c, 0x05, + 0x65, 0x78, 0xd7, 0x7f, 0x7d, 0xd9, 0xc2, 0x83, 0x59, 0x0a, 0x4f, 0xe7, 0xf6, 0xab, 0x97, 0xf9, + 0x12, 0x27, 0x2a, 0x02, 0xbf, 0x89, 0xda, 0x19, 0x50, 0x9e, 0xc4, 0xca, 0xce, 0x6e, 0x59, 0x08, + 0x51, 0x28, 0xd1, 0xb7, 0xf8, 0x06, 0xda, 0x89, 0x80, 0x73, 0x1a, 0x82, 0xf2, 0xa0, 0xeb, 0x5f, + 0xd1, 0xc4, 0x9d, 0xfb, 0x05, 0x4c, 0x96, 0xf7, 0xf8, 0x11, 0xda, 0x9b, 0x50, 0x2e, 0x06, 0xe9, + 0x88, 0x0a, 0x78, 0xc0, 0x22, 0x30, 0x9b, 0xca, 0xb5, 0xb7, 0x5e, 0x6c, 0x0f, 0x64, 0x84, 0x7f, + 0x4d, 0xab, 0xef, 0xdd, 0xfb, 0x8f, 0x12, 0xb9, 0xa4, 0xec, 0xfc, 0x63, 0xa0, 0xeb, 0x1b, 0xfd, + 0xb9, 0xc7, 0xb8, 0xc0, 0xdf, 0xad, 0xed, 0xa3, 0xfb, 0x62, 0x75, 0xc8, 0x68, 0xb5, 0x8d, 0x57, + 0x75, 0x2d, 0x9d, 0x25, 0x52, 0xd9, 0xc5, 0x04, 0xb5, 0x98, 0x80, 0x88, 0x9b, 0xf5, 0x83, 0xc6, + 0x61, 0xef, 0xe8, 0xd3, 0xed, 0x2d, 0x86, 0xff, 0x8a, 0x4e, 0xdb, 0xba, 0x2b, 0x13, 0x90, 0x22, + 0x8f, 0xb3, 0x68, 0xfc, 0x4f, 0xc3, 0x72, 0x65, 0xf1, 0x1b, 0x68, 0x27, 0x2b, 0x8e, 0xaa, 0xdf, + 0x5d, 0xbf, 0x27, 0xa7, 0xa4, 0x19, 0x64, 0x79, 0x87, 0x6f, 0xa2, 0x4e, 0xce, 0x21, 0x8b, 0x69, + 0x04, 0x7a, 0xf4, 0xab, 0x3e, 0x07, 0x1a, 0x27, 0x2b, 0x06, 0xbe, 0x8e, 0x1a, 0x39, 0x1b, 0xe9, + 0xd1, 0xf7, 0x34, 0xb1, 0x31, 0xb8, 0xfb, 0x31, 0x91, 0x38, 0x76, 0x50, 0x3b, 0xcc, 0x92, 0x3c, + 0xe5, 0x66, 0xf3, 0xa0, 0x71, 0xd8, 0xf5, 0x91, 0xdc, 0xa0, 0x4f, 0x14, 0x42, 0xf4, 0x0d, 0x3e, + 0x42, 0x9d, 0x31, 0xcc, 0x06, 0x6a, 0x85, 0x5a, 0x8a, 0x75, 0x4d, 0xb2, 0x14, 0xc0, 0x9f, 0xce, + 0xed, 0xce, 0x67, 0xfa, 0x96, 0xac, 0x78, 0xf8, 0x47, 0xd4, 0x82, 0x33, 0x91, 0x51, 0xb3, 0xad, + 0xec, 0xfd, 0x66, 0xbb, 0xff, 0xba, 0x7b, 0x47, 0x6a, 0xdf, 0x89, 0x45, 0x36, 0x2b, 0xdd, 0x56, + 0x18, 0x29, 0xd2, 0xee, 0xe7, 0x08, 0x95, 0x1c, 0x7c, 0x15, 0x35, 0xc6, 0x30, 0x2b, 0x7e, 0x32, + 0x22, 0x3f, 0xf1, 0x57, 0xa8, 0x35, 0xa5, 0x93, 0x1c, 0xf4, 0x5b, 0xf4, 0xe1, 0x4b, 0xd7, 0xa7, + 0xd4, 0xbf, 0x96, 0x12, 0xa4, 0x50, 0xba, 0x55, 0x3f, 0x36, 0x9c, 0xb9, 0x81, 0xec, 0xe7, 0xbc, + 0x18, 0xf8, 0x27, 0x03, 0xa1, 0x60, 0xf9, 0x43, 0x73, 0xd3, 0x50, 0x06, 0x9d, 0x6c, 0xcf, 0xa0, + 0xd5, 0x63, 0x51, 0xbe, 0xc6, 0x2b, 0x88, 0x93, 0x4a, 0x6a, 0xdc, 0x47, 0xbd, 0x8a, 0xb4, 0xb2, + 0x62, 0xd7, 0xbf, 0xb2, 0x98, 0xdb, 0xbd, 0x8a, 0x38, 0xa9, 0x72, 0x9c, 0x0f, 0xb4, 0xaf, 0xaa, + 0x73, 0x6c, 0x2f, 0x7f, 0x22, 0x43, 0xad, 0x45, 0xf7, 0xf2, 0xd2, 0xdf, 0xea, 0xfc, 0xf2, 0x9b, + 0x5d, 0x7b, 0xfc, 0xc7, 0x41, 0xcd, 0xbf, 0x71, 0x7e, 0x61, 0xd5, 0x9e, 0x5c, 0x58, 0xb5, 0xdf, + 0x2f, 0xac, 0xda, 0xe3, 0x85, 0x65, 0x9c, 0x2f, 0x2c, 0xe3, 0xc9, 0xc2, 0x32, 0xfe, 0x5c, 0x58, + 0xc6, 0xcf, 0x7f, 0x59, 0xb5, 0x6f, 0x77, 0x74, 0x67, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x07, + 0x0c, 0x3b, 0x3a, 0x80, 0x08, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.proto similarity index 53% rename from vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/generated.proto rename to vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.proto index 5638d1d62..215dc39a4 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/generated.proto +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -19,25 +19,29 @@ limitations under the License. syntax = 'proto2'; -package k8s.io.kubernetes.pkg.apis.certificates.v1alpha1; +package k8s.io.kubernetes.pkg.apis.certificates.v1beta1; -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; -import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "v1alpha1"; +option go_package = "v1beta1"; // Describes a certificate signing request message CertificateSigningRequest { - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The certificate request itself and any additional information. + // +optional optional CertificateSigningRequestSpec spec = 2; // Derived information about the request. + // +optional optional CertificateSigningRequestStatus status = 3; } @@ -46,42 +50,75 @@ message CertificateSigningRequestCondition { optional string type = 1; // brief reason for the request state + // +optional optional string reason = 2; // human readable message with details about the request state + // +optional optional string message = 3; // timestamp for the last update to this condition - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastUpdateTime = 4; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 4; } message CertificateSigningRequestList { - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; repeated CertificateSigningRequest items = 2; } // This information is immutable after the request is created. Only the Request -// and ExtraInfo fields can be set on creation, other fields are derived by +// and Usages fields can be set on creation, other fields are derived by // Kubernetes and cannot be modified by users. message CertificateSigningRequestSpec { // Base64-encoded PKCS#10 CSR data optional bytes request = 1; - // Information about the requesting user (if relevant) - // See user.Info interface for details + // allowedUsages specifies a set of usage contexts the key will be + // valid for. + // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 + // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 + repeated string keyUsage = 5; + + // Information about the requesting user. + // See user.Info interface for details. + // +optional optional string username = 2; + // UID information about the requesting user. + // See user.Info interface for details. + // +optional optional string uid = 3; + // Group information about the requesting user. + // See user.Info interface for details. + // +optional repeated string groups = 4; + + // Extra information about the requesting user. + // See user.Info interface for details. + // +optional + map extra = 6; } message CertificateSigningRequestStatus { // Conditions applied to the request, such as approval or denial. + // +optional repeated CertificateSigningRequestCondition conditions = 1; // If request was approved, the controller will place the issued certificate here. + // +optional optional bytes certificate = 2; } +// ExtraValue masks the value so protobuf can generate +// +protobuf.nullable=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +message ExtraValue { + // items, if empty, will result in an empty slice + + repeated string items = 1; +} + diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/helpers.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/helpers.go new file mode 100644 index 000000000..1375063c1 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/helpers.go @@ -0,0 +1,38 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "crypto/x509" + "encoding/pem" + "errors" +) + +// ParseCSR extracts the CSR from the API object and decodes it. +func ParseCSR(obj *CertificateSigningRequest) (*x509.CertificateRequest, error) { + // extract PEM from request object + pemBytes := obj.Spec.Request + block, _ := pem.Decode(pemBytes) + if block == nil || block.Type != "CERTIFICATE REQUEST" { + return nil, errors.New("PEM block type must be CERTIFICATE REQUEST") + } + csr, err := x509.ParseCertificateRequest(block.Bytes) + if err != nil { + return nil, err + } + return csr, nil +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/register.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/register.go similarity index 64% rename from vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/register.go rename to vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/register.go index d93141b36..6574de971 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,33 +14,32 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/runtime" - versionedwatch "k8s.io/client-go/1.5/pkg/watch/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "certificates.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} // Kind takes an unqualified kind and returns a Group qualified GroupKind -func Kind(kind string) unversioned.GroupKind { +func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) unversioned.GroupResource { +func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addConversionFuncs) + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addConversionFuncs, addDefaultingFuncs) AddToScheme = SchemeBuilder.AddToScheme ) @@ -49,14 +48,12 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &CertificateSigningRequest{}, &CertificateSigningRequestList{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, ) // Add the watch version that applies - versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } -func (obj *CertificateSigningRequest) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } -func (obj *CertificateSigningRequestList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *CertificateSigningRequest) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } +func (obj *CertificateSigningRequestList) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.generated.go new file mode 100644 index 000000000..50d908bd7 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.generated.go @@ -0,0 +1,2624 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1beta1 + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81234 = 1 + codecSelferC_RAW1234 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1234 = 10 + codecSelferValueTypeMap1234 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1234 = 2 + codecSelfer_containerMapValue1234 = 3 + codecSelfer_containerMapEnd1234 = 4 + codecSelfer_containerArrayElem1234 = 6 + codecSelfer_containerArrayEnd1234 = 7 +) + +var ( + codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1234 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg1_v1.TypeMeta + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 + } +} + +func (x *CertificateSigningRequest) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequest) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = CertificateSigningRequestSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = CertificateSigningRequestStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = CertificateSigningRequestSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = CertificateSigningRequestStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *CertificateSigningRequestSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [6]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = len(x.Usages) != 0 + yyq2[2] = x.Username != "" + yyq2[3] = x.UID != "" + yyq2[4] = len(x.Groups) != 0 + yyq2[5] = len(x.Extra) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(6) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Request == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Request)) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("request")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Request == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Request)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Usages == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + h.encSliceKeyUsage(([]KeyUsage)(x.Usages), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("usages")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Usages == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + h.encSliceKeyUsage(([]KeyUsage)(x.Usages), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Username)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("username")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Username)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.UID)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("uid")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.UID)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + if x.Groups == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + z.F.EncSliceStringV(x.Groups, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("groups")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Groups == nil { + r.EncodeNil() + } else { + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + z.F.EncSliceStringV(x.Groups, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + if x.Extra == nil { + r.EncodeNil() + } else { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("extra")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Extra == nil { + r.EncodeNil() + } else { + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequestSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequestSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "request": + if r.TryDecodeAsNil() { + x.Request = nil + } else { + yyv4 := &x.Request + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *yyv4 = r.DecodeBytes(*(*[]byte)(yyv4), false, false) + } + } + case "usages": + if r.TryDecodeAsNil() { + x.Usages = nil + } else { + yyv6 := &x.Usages + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + h.decSliceKeyUsage((*[]KeyUsage)(yyv6), d) + } + } + case "username": + if r.TryDecodeAsNil() { + x.Username = "" + } else { + yyv8 := &x.Username + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "uid": + if r.TryDecodeAsNil() { + x.UID = "" + } else { + yyv10 := &x.UID + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + case "groups": + if r.TryDecodeAsNil() { + x.Groups = nil + } else { + yyv12 := &x.Groups + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + z.F.DecSliceStringX(yyv12, false, d) + } + } + case "extra": + if r.TryDecodeAsNil() { + x.Extra = nil + } else { + yyv14 := &x.Extra + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + h.decMapstringExtraValue((*map[string]ExtraValue)(yyv14), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequestSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj16 int + var yyb16 bool + var yyhl16 bool = l >= 0 + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Request = nil + } else { + yyv17 := &x.Request + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *yyv17 = r.DecodeBytes(*(*[]byte)(yyv17), false, false) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Usages = nil + } else { + yyv19 := &x.Usages + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceKeyUsage((*[]KeyUsage)(yyv19), d) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Username = "" + } else { + yyv21 := &x.Username + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.UID = "" + } else { + yyv23 := &x.UID + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*string)(yyv23)) = r.DecodeString() + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Groups = nil + } else { + yyv25 := &x.Groups + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + z.F.DecSliceStringX(yyv25, false, d) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Extra = nil + } else { + yyv27 := &x.Extra + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + h.decMapstringExtraValue((*map[string]ExtraValue)(yyv27), d) + } + } + for { + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj16-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + h.encExtraValue((ExtraValue)(x), e) + } + } +} + +func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + h.decExtraValue((*ExtraValue)(x), d) + } +} + +func (x *CertificateSigningRequestStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = len(x.Conditions) != 0 + yyq2[1] = len(x.Certificate) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.Conditions == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + h.encSliceCertificateSigningRequestCondition(([]CertificateSigningRequestCondition)(x.Conditions), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("conditions")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Conditions == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + h.encSliceCertificateSigningRequestCondition(([]CertificateSigningRequestCondition)(x.Conditions), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Certificate == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Certificate)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("certificate")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Certificate == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Certificate)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequestStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequestStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "conditions": + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv4 := &x.Conditions + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + h.decSliceCertificateSigningRequestCondition((*[]CertificateSigningRequestCondition)(yyv4), d) + } + } + case "certificate": + if r.TryDecodeAsNil() { + x.Certificate = nil + } else { + yyv6 := &x.Certificate + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *yyv6 = r.DecodeBytes(*(*[]byte)(yyv6), false, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequestStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv9 := &x.Conditions + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + h.decSliceCertificateSigningRequestCondition((*[]CertificateSigningRequestCondition)(yyv9), d) + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Certificate = nil + } else { + yyv11 := &x.Certificate + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *yyv11 = r.DecodeBytes(*(*[]byte)(yyv11), false, false) + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x RequestConditionType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *RequestConditionType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *CertificateSigningRequestCondition) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Reason != "" + yyq2[2] = x.Message != "" + yyq2[3] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("message")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy13 := &x.LastUpdateTime + yym14 := z.EncBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.EncExt(yy13) { + } else if yym14 { + z.EncBinaryMarshal(yy13) + } else if !yym14 && z.IsJSONHandle() { + z.EncJSONMarshal(yy13) + } else { + z.EncFallback(yy13) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastUpdateTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy15 := &x.LastUpdateTime + yym16 := z.EncBinary() + _ = yym16 + if false { + } else if z.HasExtensions() && z.EncExt(yy15) { + } else if yym16 { + z.EncBinaryMarshal(yy15) + } else if !yym16 && z.IsJSONHandle() { + z.EncJSONMarshal(yy15) + } else { + z.EncFallback(yy15) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequestCondition) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequestCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv5 := &x.Reason + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } + } + case "message": + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv7 := &x.Message + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*string)(yyv7)) = r.DecodeString() + } + } + case "lastUpdateTime": + if r.TryDecodeAsNil() { + x.LastUpdateTime = pkg1_v1.Time{} + } else { + yyv9 := &x.LastUpdateTime + yym10 := z.DecBinary() + _ = yym10 + if false { + } else if z.HasExtensions() && z.DecExt(yyv9) { + } else if yym10 { + z.DecBinaryUnmarshal(yyv9) + } else if !yym10 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv9) + } else { + z.DecFallback(yyv9, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequestCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv12 := &x.Type + yyv12.CodecDecodeSelf(d) + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv13 := &x.Reason + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv15 := &x.Message + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastUpdateTime = pkg1_v1.Time{} + } else { + yyv17 := &x.LastUpdateTime + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else if yym18 { + z.DecBinaryUnmarshal(yyv17) + } else if !yym18 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv17) + } else { + z.DecFallback(yyv17, false) + } + } + for { + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj11-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *CertificateSigningRequestList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequestList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequestList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequestList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x KeyUsage) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *KeyUsage) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x codecSelfer1234) encSliceKeyUsage(v []KeyUsage, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yyv1.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceKeyUsage(v *[]KeyUsage, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []KeyUsage{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]KeyUsage, yyrl1) + } + } else { + yyv1 = make([]KeyUsage, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = "" + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, "") + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = "" + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, "") // var yyz1 KeyUsage + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = "" + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []KeyUsage{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeMapStart(len(v)) + for yyk1, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + yym2 := z.EncBinary() + _ = yym2 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yyk1)) + } + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if yyv1 == nil { + r.EncodeNil() + } else { + yyv1.CodecEncodeSelf(e) + } + } + z.EncSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyl1 := r.ReadMapStart() + yybh1 := z.DecBasicHandle() + if yyv1 == nil { + yyrl1, _ := z.DecInferLen(yyl1, yybh1.MaxInitLen, 40) + yyv1 = make(map[string]ExtraValue, yyrl1) + *v = yyv1 + } + var yymk1 string + var yymv1 ExtraValue + var yymg1 bool + if yybh1.MapValueReset { + yymg1 = true + } + if yyl1 > 0 { + for yyj1 := 0; yyj1 < yyl1; yyj1++ { + z.DecSendContainerState(codecSelfer_containerMapKey1234) + if r.TryDecodeAsNil() { + yymk1 = "" + } else { + yyv2 := &yymk1 + yym3 := z.DecBinary() + _ = yym3 + if false { + } else { + *((*string)(yyv2)) = r.DecodeString() + } + } + + if yymg1 { + yymv1 = yyv1[yymk1] + } else { + yymv1 = nil + } + z.DecSendContainerState(codecSelfer_containerMapValue1234) + if r.TryDecodeAsNil() { + yymv1 = nil + } else { + yyv4 := &yymv1 + yyv4.CodecDecodeSelf(d) + } + + if yyv1 != nil { + yyv1[yymk1] = yymv1 + } + } + } else if yyl1 < 0 { + for yyj1 := 0; !r.CheckBreak(); yyj1++ { + z.DecSendContainerState(codecSelfer_containerMapKey1234) + if r.TryDecodeAsNil() { + yymk1 = "" + } else { + yyv5 := &yymk1 + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } + } + + if yymg1 { + yymv1 = yyv1[yymk1] + } else { + yymv1 = nil + } + z.DecSendContainerState(codecSelfer_containerMapValue1234) + if r.TryDecodeAsNil() { + yymv1 = nil + } else { + yyv7 := &yymv1 + yyv7.CodecDecodeSelf(d) + } + + if yyv1 != nil { + yyv1[yymk1] = yymv1 + } + } + } // else len==0: TODO: Should we clear map entries? + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym2 := z.EncBinary() + _ = yym2 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yyv1)) + } + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []string{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]string, yyrl1) + } + } else { + yyv1 = make([]string, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = "" + } else { + yyv2 := &yyv1[yyj1] + yym3 := z.DecBinary() + _ = yym3 + if false { + } else { + *((*string)(yyv2)) = r.DecodeString() + } + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, "") + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = "" + } else { + yyv4 := &yyv1[yyj1] + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, "") // var yyz1 string + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = "" + } else { + yyv6 := &yyv1[yyj1] + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []string{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceCertificateSigningRequestCondition(v []CertificateSigningRequestCondition, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceCertificateSigningRequestCondition(v *[]CertificateSigningRequestCondition, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []CertificateSigningRequestCondition{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 72) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]CertificateSigningRequestCondition, yyrl1) + } + } else { + yyv1 = make([]CertificateSigningRequestCondition, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequestCondition{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, CertificateSigningRequestCondition{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequestCondition{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, CertificateSigningRequestCondition{}) // var yyz1 CertificateSigningRequestCondition + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequestCondition{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []CertificateSigningRequestCondition{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceCertificateSigningRequest(v []CertificateSigningRequest, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceCertificateSigningRequest(v *[]CertificateSigningRequest, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []CertificateSigningRequest{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 416) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]CertificateSigningRequest, yyrl1) + } + } else { + yyv1 = make([]CertificateSigningRequest, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequest{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, CertificateSigningRequest{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequest{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, CertificateSigningRequest{}) // var yyz1 CertificateSigningRequest + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequest{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []CertificateSigningRequest{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.go new file mode 100644 index 000000000..a9149ba8d --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.go @@ -0,0 +1,152 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient=true +// +nonNamespaced=true + +// Describes a certificate signing request +type CertificateSigningRequest struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // The certificate request itself and any additional information. + // +optional + Spec CertificateSigningRequestSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + + // Derived information about the request. + // +optional + Status CertificateSigningRequestStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// This information is immutable after the request is created. Only the Request +// and Usages fields can be set on creation, other fields are derived by +// Kubernetes and cannot be modified by users. +type CertificateSigningRequestSpec struct { + // Base64-encoded PKCS#10 CSR data + Request []byte `json:"request" protobuf:"bytes,1,opt,name=request"` + + // allowedUsages specifies a set of usage contexts the key will be + // valid for. + // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 + // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 + Usages []KeyUsage `json:"usages,omitempty" protobuf:"bytes,5,opt,name=keyUsage"` + + // Information about the requesting user. + // See user.Info interface for details. + // +optional + Username string `json:"username,omitempty" protobuf:"bytes,2,opt,name=username"` + // UID information about the requesting user. + // See user.Info interface for details. + // +optional + UID string `json:"uid,omitempty" protobuf:"bytes,3,opt,name=uid"` + // Group information about the requesting user. + // See user.Info interface for details. + // +optional + Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"` + // Extra information about the requesting user. + // See user.Info interface for details. + // +optional + Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,6,rep,name=extra"` +} + +// ExtraValue masks the value so protobuf can generate +// +protobuf.nullable=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +type ExtraValue []string + +func (t ExtraValue) String() string { + return fmt.Sprintf("%v", []string(t)) +} + +type CertificateSigningRequestStatus struct { + // Conditions applied to the request, such as approval or denial. + // +optional + Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"` + + // If request was approved, the controller will place the issued certificate here. + // +optional + Certificate []byte `json:"certificate,omitempty" protobuf:"bytes,2,opt,name=certificate"` +} + +type RequestConditionType string + +// These are the possible conditions for a certificate request. +const ( + CertificateApproved RequestConditionType = "Approved" + CertificateDenied RequestConditionType = "Denied" +) + +type CertificateSigningRequestCondition struct { + // request approval state, currently Approved or Denied. + Type RequestConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RequestConditionType"` + // brief reason for the request state + // +optional + Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"` + // human readable message with details about the request state + // +optional + Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` + // timestamp for the last update to this condition + // +optional + LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,4,opt,name=lastUpdateTime"` +} + +type CertificateSigningRequestList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []CertificateSigningRequest `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// KeyUsages specifies valid usage contexts for keys. +// See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 +// https://tools.ietf.org/html/rfc5280#section-4.2.1.12 +type KeyUsage string + +const ( + UsageSigning KeyUsage = "signing" + UsageDigitalSignature KeyUsage = "digital signature" + UsageContentCommittment KeyUsage = "content committment" + UsageKeyEncipherment KeyUsage = "key encipherment" + UsageKeyAgreement KeyUsage = "key agreement" + UsageDataEncipherment KeyUsage = "data encipherment" + UsageCertSign KeyUsage = "cert sign" + UsageCRLSign KeyUsage = "crl sign" + UsageEncipherOnly KeyUsage = "encipher only" + UsageDecipherOnly KeyUsage = "decipher only" + UsageAny KeyUsage = "any" + UsageServerAuth KeyUsage = "server auth" + UsageClientAuth KeyUsage = "client auth" + UsageCodeSigning KeyUsage = "code signing" + UsageEmailProtection KeyUsage = "email protection" + UsageSMIME KeyUsage = "s/mime" + UsageIPsecEndSystem KeyUsage = "ipsec end system" + UsageIPsecTunnel KeyUsage = "ipsec tunnel" + UsageIPsecUser KeyUsage = "ipsec user" + UsageTimestamping KeyUsage = "timestamping" + UsageOCSPSigning KeyUsage = "ocsp signing" + UsageMicrosoftSGC KeyUsage = "microsoft sgc" + UsageNetscapSGC KeyUsage = "netscape sgc" +) diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go similarity index 78% rename from vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go rename to vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go index cf66d0746..4fd91df06 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more @@ -49,9 +49,13 @@ func (CertificateSigningRequestCondition) SwaggerDoc() map[string]string { } var map_CertificateSigningRequestSpec = map[string]string{ - "": "This information is immutable after the request is created. Only the Request and ExtraInfo fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", + "": "This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", "request": "Base64-encoded PKCS#10 CSR data", - "username": "Information about the requesting user (if relevant) See user.Info interface for details", + "usages": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12", + "username": "Information about the requesting user. See user.Info interface for details.", + "uid": "UID information about the requesting user. See user.Info interface for details.", + "groups": "Group information about the requesting user. See user.Info interface for details.", + "extra": "Extra information about the requesting user. See user.Info interface for details.", } func (CertificateSigningRequestSpec) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.conversion.go new file mode 100644 index 000000000..4c0e07380 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.conversion.go @@ -0,0 +1,179 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1beta1 + +import ( + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + certificates "k8s.io/client-go/pkg/apis/certificates" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest, + Convert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest, + Convert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition, + Convert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition, + Convert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList, + Convert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList, + Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec, + Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec, + Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus, + Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus, + ) +} + +func autoConvert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in, out, s) +} + +func autoConvert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { + out.Type = certificates.RequestConditionType(in.Type) + out.Reason = in.Reason + out.Message = in.Message + out.LastUpdateTime = in.LastUpdateTime + return nil +} + +func Convert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error { + out.Type = RequestConditionType(in.Type) + out.Reason = in.Reason + out.Message = in.Message + out.LastUpdateTime = in.LastUpdateTime + return nil +} + +func Convert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in, out, s) +} + +func autoConvert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]certificates.CertificateSigningRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]CertificateSigningRequest, 0) + } else { + out.Items = *(*[]CertificateSigningRequest)(unsafe.Pointer(&in.Items)) + } + return nil +} + +func Convert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in, out, s) +} + +func autoConvert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { + out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) + out.Usages = *(*[]certificates.KeyUsage)(unsafe.Pointer(&in.Usages)) + out.Username = in.Username + out.UID = in.UID + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.Extra = *(*map[string]certificates.ExtraValue)(unsafe.Pointer(&in.Extra)) + return nil +} + +func Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error { + if in.Request == nil { + out.Request = make([]byte, 0) + } else { + out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) + } + out.Usages = *(*[]KeyUsage)(unsafe.Pointer(&in.Usages)) + out.Username = in.Username + out.UID = in.UID + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra)) + return nil +} + +func Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in, out, s) +} + +func autoConvert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { + out.Conditions = *(*[]certificates.CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions)) + out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) + return nil +} + +func Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error { + out.Conditions = *(*[]CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions)) + out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) + return nil +} + +func Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in, out, s) +} diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000..800cdee47 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,150 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequest, InType: reflect.TypeOf(&CertificateSigningRequest{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestCondition, InType: reflect.TypeOf(&CertificateSigningRequestCondition{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestList, InType: reflect.TypeOf(&CertificateSigningRequestList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestSpec, InType: reflect.TypeOf(&CertificateSigningRequestSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestStatus, InType: reflect.TypeOf(&CertificateSigningRequestStatus{})}, + ) +} + +func DeepCopy_v1beta1_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CertificateSigningRequest) + out := out.(*CertificateSigningRequest) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_v1beta1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + if err := DeepCopy_v1beta1_CertificateSigningRequestStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1beta1_CertificateSigningRequestCondition(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CertificateSigningRequestCondition) + out := out.(*CertificateSigningRequestCondition) + *out = *in + out.LastUpdateTime = in.LastUpdateTime.DeepCopy() + return nil + } +} + +func DeepCopy_v1beta1_CertificateSigningRequestList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CertificateSigningRequestList) + out := out.(*CertificateSigningRequestList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CertificateSigningRequest, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_CertificateSigningRequest(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_CertificateSigningRequestSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CertificateSigningRequestSpec) + out := out.(*CertificateSigningRequestSpec) + *out = *in + if in.Request != nil { + in, out := &in.Request, &out.Request + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.Usages != nil { + in, out := &in.Usages, &out.Usages + *out = make([]KeyUsage, len(*in)) + copy(*out, *in) + } + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Extra != nil { + in, out := &in.Extra, &out.Extra + *out = make(map[string]ExtraValue) + for key, val := range *in { + if newVal, err := c.DeepCopy(&val); err != nil { + return err + } else { + (*out)[key] = *newVal.(*ExtraValue) + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_CertificateSigningRequestStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*CertificateSigningRequestStatus) + out := out.(*CertificateSigningRequestStatus) + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]CertificateSigningRequestCondition, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + if in.Certificate != nil { + in, out := &in.Certificate, &out.Certificate + *out = make([]byte, len(*in)) + copy(*out, *in) + } + return nil + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.defaults.go new file mode 100644 index 000000000..3c5ae0362 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.defaults.go @@ -0,0 +1,47 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&CertificateSigningRequest{}, func(obj interface{}) { SetObjectDefaults_CertificateSigningRequest(obj.(*CertificateSigningRequest)) }) + scheme.AddTypeDefaultingFunc(&CertificateSigningRequestList{}, func(obj interface{}) { + SetObjectDefaults_CertificateSigningRequestList(obj.(*CertificateSigningRequestList)) + }) + return nil +} + +func SetObjectDefaults_CertificateSigningRequest(in *CertificateSigningRequest) { + SetDefaults_CertificateSigningRequestSpec(&in.Spec) +} + +func SetObjectDefaults_CertificateSigningRequestList(in *CertificateSigningRequestList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_CertificateSigningRequest(a) + } +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/certificates/zz_generated.deepcopy.go similarity index 85% rename from vendor/k8s.io/client-go/1.5/pkg/apis/certificates/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/apis/certificates/zz_generated.deepcopy.go index 347ea2990..876902891 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/certificates/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/apis/certificates/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,9 +21,9 @@ limitations under the License. package certificates import ( - api "k8s.io/client-go/1.5/pkg/api" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" reflect "reflect" ) @@ -47,9 +47,11 @@ func DeepCopy_certificates_CertificateSigningRequest(in interface{}, out interfa { in := in.(*CertificateSigningRequest) out := out.(*CertificateSigningRequest) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -65,9 +67,7 @@ func DeepCopy_certificates_CertificateSigningRequestCondition(in interface{}, ou { in := in.(*CertificateSigningRequestCondition) out := out.(*CertificateSigningRequestCondition) - out.Type = in.Type - out.Reason = in.Reason - out.Message = in.Message + *out = *in out.LastUpdateTime = in.LastUpdateTime.DeepCopy() return nil } @@ -77,8 +77,7 @@ func DeepCopy_certificates_CertificateSigningRequestList(in interface{}, out int { in := in.(*CertificateSigningRequestList) out := out.(*CertificateSigningRequestList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]CertificateSigningRequest, len(*in)) @@ -87,8 +86,6 @@ func DeepCopy_certificates_CertificateSigningRequestList(in interface{}, out int return err } } - } else { - out.Items = nil } return nil } @@ -98,21 +95,32 @@ func DeepCopy_certificates_CertificateSigningRequestSpec(in interface{}, out int { in := in.(*CertificateSigningRequestSpec) out := out.(*CertificateSigningRequestSpec) + *out = *in if in.Request != nil { in, out := &in.Request, &out.Request *out = make([]byte, len(*in)) copy(*out, *in) - } else { - out.Request = nil } - out.Username = in.Username - out.UID = in.UID + if in.Usages != nil { + in, out := &in.Usages, &out.Usages + *out = make([]KeyUsage, len(*in)) + copy(*out, *in) + } if in.Groups != nil { in, out := &in.Groups, &out.Groups *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Groups = nil + } + if in.Extra != nil { + in, out := &in.Extra, &out.Extra + *out = make(map[string]ExtraValue) + for key, val := range *in { + if newVal, err := c.DeepCopy(&val); err != nil { + return err + } else { + (*out)[key] = *newVal.(*ExtraValue) + } + } } return nil } @@ -122,6 +130,7 @@ func DeepCopy_certificates_CertificateSigningRequestStatus(in interface{}, out i { in := in.(*CertificateSigningRequestStatus) out := out.(*CertificateSigningRequestStatus) + *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]CertificateSigningRequestCondition, len(*in)) @@ -130,15 +139,11 @@ func DeepCopy_certificates_CertificateSigningRequestStatus(in interface{}, out i return err } } - } else { - out.Conditions = nil } if in.Certificate != nil { in, out := &in.Certificate, &out.Certificate *out = make([]byte, len(*in)) copy(*out, *in) - } else { - out.Certificate = nil } return nil } diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/OWNERS b/vendor/k8s.io/client-go/pkg/apis/extensions/OWNERS new file mode 100755 index 000000000..494763a69 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/OWNERS @@ -0,0 +1,41 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- derekwaynecarr +- caesarxuchao +- mikedanese +- liggitt +- nikhiljindal +- bprashanth +- erictune +- pmorie +- sttts +- kargakis +- saad-ali +- janetkuo +- justinsb +- ncdc +- timstclair +- mwielgus +- timothysc +- soltysh +- piosz +- dims +- errordeveloper +- madhusudancs +- rootfs +- jszczepkowski +- mml +- resouer +- mbohlool +- david-mcmahon +- therc +- pweil- +- tmrts +- mqliang +- lukaszo +- jianhuiz diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/doc.go b/vendor/k8s.io/client-go/pkg/apis/extensions/doc.go new file mode 100644 index 000000000..87edee41c --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package extensions diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/helpers.go b/vendor/k8s.io/client-go/pkg/apis/extensions/helpers.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/helpers.go rename to vendor/k8s.io/client-go/pkg/apis/extensions/helpers.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/install/install.go b/vendor/k8s.io/client-go/pkg/apis/extensions/install/install.go similarity index 63% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/install/install.go rename to vendor/k8s.io/client-go/pkg/apis/extensions/install/install.go index 4d1d1cdc9..1f968e861 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/install/install.go +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/install/install.go @@ -19,25 +19,33 @@ limitations under the License. package install import ( - "k8s.io/client-go/1.5/pkg/apimachinery/announced" - "k8s.io/client-go/1.5/pkg/apis/extensions" - "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/apis/extensions" + "k8s.io/client-go/pkg/apis/extensions/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: extensions.GroupName, VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version}, - ImportPrefix: "k8s.io/client-go/1.5/pkg/apis/extensions", + ImportPrefix: "k8s.io/client-go/pkg/apis/extensions", RootScopedKinds: sets.NewString("PodSecurityPolicy", "ThirdPartyResource"), AddInternalObjectsToScheme: extensions.AddToScheme, }, announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/register.go b/vendor/k8s.io/client-go/pkg/apis/extensions/register.go similarity index 74% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/register.go rename to vendor/k8s.io/client-go/pkg/apis/extensions/register.go index 35ad88d1c..5983636c2 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/register.go @@ -17,26 +17,23 @@ limitations under the License. package extensions import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/apis/autoscaling" - "k8s.io/client-go/1.5/pkg/apis/batch" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "extensions" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} // Kind takes an unqualified kind and returns a Group qualified GroupKind -func Kind(kind string) unversioned.GroupKind { +func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) unversioned.GroupResource { +func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } @@ -52,11 +49,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &Deployment{}, &DeploymentList{}, &DeploymentRollback{}, - &autoscaling.HorizontalPodAutoscaler{}, - &autoscaling.HorizontalPodAutoscalerList{}, - &batch.Job{}, - &batch.JobList{}, - &batch.JobTemplate{}, &ReplicationControllerDummy{}, &Scale{}, &ThirdPartyResource{}, @@ -67,11 +59,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ThirdPartyResourceDataList{}, &Ingress{}, &IngressList{}, - &api.ListOptions{}, - &api.DeleteOptions{}, &ReplicaSet{}, &ReplicaSetList{}, - &api.ExportOptions{}, &PodSecurityPolicy{}, &PodSecurityPolicyList{}, &NetworkPolicy{}, diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/types.go b/vendor/k8s.io/client-go/pkg/apis/extensions/types.go similarity index 70% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/types.go rename to vendor/k8s.io/client-go/pkg/apis/extensions/types.go index a2fd99ae6..945c5fa2b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/types.go +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/types.go @@ -29,10 +29,10 @@ support is experimental. package extensions import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/resource" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/util/intstr" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/client-go/pkg/api" ) const ( @@ -45,17 +45,19 @@ const ( // describes the attributes of a scale subresource type ScaleSpec struct { // desired number of instances for the scaled object. - Replicas int32 `json:"replicas,omitempty"` + // +optional + Replicas int32 } // represents the current status of a scale subresource. type ScaleStatus struct { // actual number of observed instances of the scaled object. - Replicas int32 `json:"replicas"` + Replicas int32 // label query over pods that should match the replicas count. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - Selector *unversioned.LabelSelector `json:"selector,omitempty"` + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + Selector *metav1.LabelSelector } // +genclient=true @@ -63,43 +65,46 @@ type ScaleStatus struct { // represents a scaling request for a resource. type Scale struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. - api.ObjectMeta `json:"metadata,omitempty"` + // +optional + metav1.ObjectMeta // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. - Spec ScaleSpec `json:"spec,omitempty"` + // +optional + Spec ScaleSpec // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only. - Status ScaleStatus `json:"status,omitempty"` + // +optional + Status ScaleStatus } // Dummy definition type ReplicationControllerDummy struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta } // Alpha-level support for Custom Metrics in HPA (as annotations). type CustomMetricTarget struct { // Custom Metric name. - Name string `json:"name"` + Name string // Custom Metric value (average). - TargetValue resource.Quantity `json:"value"` + TargetValue resource.Quantity } type CustomMetricTargetList struct { - Items []CustomMetricTarget `json:"items"` + Items []CustomMetricTarget } type CustomMetricCurrentStatus struct { // Custom Metric name. - Name string `json:"name"` + Name string // Custom Metric value (average). - CurrentValue resource.Quantity `json:"value"` + CurrentValue resource.Quantity } type CustomMetricCurrentStatusList struct { - Items []CustomMetricCurrentStatus `json:"items"` + Items []CustomMetricCurrentStatus } // +genclient=true @@ -108,103 +113,130 @@ type CustomMetricCurrentStatusList struct { // A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource // types to the API. It consists of one or more Versions of the api. type ThirdPartyResource struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Standard object metadata - api.ObjectMeta `json:"metadata,omitempty"` + // +optional + metav1.ObjectMeta // Description is the description of this object. - Description string `json:"description,omitempty"` + // +optional + Description string // Versions are versions for this third party object - Versions []APIVersion `json:"versions,omitempty"` + Versions []APIVersion } type ThirdPartyResourceList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Standard list metadata. - unversioned.ListMeta `json:"metadata,omitempty"` + // +optional + metav1.ListMeta // Items is the list of horizontal pod autoscalers. - Items []ThirdPartyResource `json:"items"` + Items []ThirdPartyResource } // An APIVersion represents a single concrete version of an object model. -// TODO: we should consider merge this struct with GroupVersion in unversioned.go +// TODO: we should consider merge this struct with GroupVersion in metav1.go type APIVersion struct { // Name of this version (e.g. 'v1'). - Name string `json:"name,omitempty"` + Name string } // An internal object, used for versioned storage in etcd. Not exposed to the end user. type ThirdPartyResourceData struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Standard object metadata. - api.ObjectMeta `json:"metadata,omitempty"` + // +optional + metav1.ObjectMeta // Data is the raw JSON data for this data. - Data []byte `json:"data,omitempty"` + // +optional + Data []byte } // +genclient=true type Deployment struct { - unversioned.TypeMeta `json:",inline"` - api.ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Specification of the desired behavior of the Deployment. - Spec DeploymentSpec `json:"spec,omitempty"` + // +optional + Spec DeploymentSpec // Most recently observed status of the Deployment. - Status DeploymentStatus `json:"status,omitempty"` + // +optional + Status DeploymentStatus } type DeploymentSpec struct { // Number of desired pods. This is a pointer to distinguish between explicit // zero and not specified. Defaults to 1. - Replicas int32 `json:"replicas,omitempty"` + // +optional + Replicas int32 // Label selector for pods. Existing ReplicaSets whose pods are // selected by this will be the ones affected by this deployment. - Selector *unversioned.LabelSelector `json:"selector,omitempty"` + // +optional + Selector *metav1.LabelSelector // Template describes the pods that will be created. - Template api.PodTemplateSpec `json:"template"` + Template api.PodTemplateSpec // The deployment strategy to use to replace existing pods with new ones. - Strategy DeploymentStrategy `json:"strategy,omitempty"` + // +optional + Strategy DeploymentStrategy // Minimum number of seconds for which a newly created pod should be ready // without any of its container crashing, for it to be considered available. // Defaults to 0 (pod will be considered available as soon as it is ready) - MinReadySeconds int32 `json:"minReadySeconds,omitempty"` + // +optional + MinReadySeconds int32 // The number of old ReplicaSets to retain to allow rollback. // This is a pointer to distinguish between explicit zero and not specified. - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` + // +optional + RevisionHistoryLimit *int32 // Indicates that the deployment is paused and will not be processed by the // deployment controller. - Paused bool `json:"paused,omitempty"` + // +optional + Paused bool + // The config this deployment is rolling back to. Will be cleared after rollback is done. - RollbackTo *RollbackConfig `json:"rollbackTo,omitempty"` + // +optional + RollbackTo *RollbackConfig + + // The maximum time in seconds for a deployment to make progress before it + // is considered to be failed. The deployment controller will continue to + // process failed deployments and a condition with a ProgressDeadlineExceeded + // reason will be surfaced in the deployment status. Once autoRollback is + // implemented, the deployment controller will automatically rollback failed + // deployments. Note that progress will not be estimated during the time a + // deployment is paused. This is not set by default. + ProgressDeadlineSeconds *int32 } // DeploymentRollback stores the information required to rollback a deployment. type DeploymentRollback struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Required: This must match the Name of a deployment. - Name string `json:"name"` + Name string // The annotations to be updated to a deployment - UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty"` + // +optional + UpdatedAnnotations map[string]string // The config of this deployment rollback. - RollbackTo RollbackConfig `json:"rollbackTo"` + RollbackTo RollbackConfig } type RollbackConfig struct { // The revision to rollback to. If set to 0, rollbck to the last revision. - Revision int64 `json:"revision,omitempty"` + // +optional + Revision int64 } const ( @@ -216,14 +248,16 @@ const ( type DeploymentStrategy struct { // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - Type DeploymentStrategyType `json:"type,omitempty"` + // +optional + Type DeploymentStrategyType // Rolling update config params. Present only if DeploymentStrategyType = // RollingUpdate. //--- // TODO: Update this to follow our convention for oneOf, whatever we decide it // to be. - RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty"` + // +optional + RollingUpdate *RollingUpdateDeployment } type DeploymentStrategyType string @@ -240,7 +274,7 @@ const ( type RollingUpdateDeployment struct { // The maximum number of pods that can be unavailable during the update. // Value can be an absolute number (ex: 5) or a percentage of total pods at the start of update (ex: 10%). - // Absolute number is calculated from percentage by rounding up. + // Absolute number is calculated from percentage by rounding down. // This can not be 0 if MaxSurge is 0. // By default, a fixed value of 1 is used. // Example: when this is set to 30%, the old RC can be scaled down by 30% @@ -248,7 +282,8 @@ type RollingUpdateDeployment struct { // can be scaled down further, followed by scaling up the new RC, ensuring // that at least 70% of original number of pods are available at all times // during the update. - MaxUnavailable intstr.IntOrString `json:"maxUnavailable,omitempty"` + // +optional + MaxUnavailable intstr.IntOrString // The maximum number of pods that can be scheduled above the original number of // pods. @@ -260,46 +295,94 @@ type RollingUpdateDeployment struct { // immediately when the rolling update starts. Once old pods have been killed, // new RC can be scaled up further, ensuring that total number of pods running // at any time during the update is atmost 130% of original pods. - MaxSurge intstr.IntOrString `json:"maxSurge,omitempty"` + // +optional + MaxSurge intstr.IntOrString } type DeploymentStatus struct { // The generation observed by the deployment controller. - ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // +optional + ObservedGeneration int64 // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - Replicas int32 `json:"replicas,omitempty"` + // +optional + Replicas int32 // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - UpdatedReplicas int32 `json:"updatedReplicas,omitempty"` + // +optional + UpdatedReplicas int32 + + // Total number of ready pods targeted by this deployment. + // +optional + ReadyReplicas int32 // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - AvailableReplicas int32 `json:"availableReplicas,omitempty"` + // +optional + AvailableReplicas int32 // Total number of unavailable pods targeted by this deployment. - UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` + // +optional + UnavailableReplicas int32 + + // Represents the latest available observations of a deployment's current state. + Conditions []DeploymentCondition +} + +type DeploymentConditionType string + +// These are valid conditions of a deployment. +const ( + // Available means the deployment is available, ie. at least the minimum available + // replicas required are up and running for at least minReadySeconds. + DeploymentAvailable DeploymentConditionType = "Available" + // Progressing means the deployment is progressing. Progress for a deployment is + // considered when a new replica set is created or adopted, and when new pods scale + // up or old pods scale down. Progress is not estimated for paused deployments or + // when progressDeadlineSeconds is not specified. + DeploymentProgressing DeploymentConditionType = "Progressing" + // ReplicaFailure is added in a deployment when one of its pods fails to be created + // or deleted. + DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure" +) + +// DeploymentCondition describes the state of a deployment at a certain point. +type DeploymentCondition struct { + // Type of deployment condition. + Type DeploymentConditionType + // Status of the condition, one of True, False, Unknown. + Status api.ConditionStatus + // The last time this condition was updated. + LastUpdateTime metav1.Time + // Last time the condition transitioned from one status to another. + LastTransitionTime metav1.Time + // The reason for the condition's last transition. + Reason string + // A human readable message indicating details about the transition. + Message string } type DeploymentList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta // Items is the list of deployments. - Items []Deployment `json:"items"` + Items []Deployment } -// TODO(madhusudancs): Uncomment while implementing DaemonSet updates. -/* Commenting out for v1.2. We are planning to bring these types back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting the types out. type DaemonSetUpdateStrategy struct { - // Type of daemon set update. Only "RollingUpdate" is supported at this time. Default is RollingUpdate. - Type DaemonSetUpdateStrategyType `json:"type,omitempty"` + // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". + // Default is OnDelete. + // +optional + Type DaemonSetUpdateStrategyType - // Rolling update config params. Present only if DaemonSetUpdateStrategy = - // RollingUpdate. + // Rolling update config params. Present only if type = "RollingUpdate". //--- // TODO: Update this to follow our convention for oneOf, whatever we decide it // to be. Same as DeploymentStrategy.RollingUpdate. - RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty"` + // See https://github.com/kubernetes/kubernetes/issues/35345 + // +optional + RollingUpdate *RollingUpdateDaemonSet } type DaemonSetUpdateStrategyType string @@ -307,6 +390,9 @@ type DaemonSetUpdateStrategyType string const ( // Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other. RollingUpdateDaemonSetStrategyType DaemonSetUpdateStrategyType = "RollingUpdate" + + // Replace the old daemons only when it's killed + OnDeleteDaemonSetStrategyType DaemonSetUpdateStrategyType = "OnDelete" ) // Spec to control the desired behavior of daemon set rolling update. @@ -317,115 +403,141 @@ type RollingUpdateDaemonSet struct { // number is calculated from percentage by rounding up. // This cannot be 0. // Default value is 1. - // Example: when this is set to 30%, 30% of the currently running DaemonSet - // pods can be stopped for an update at any given time. The update starts - // by stopping at most 30% of the currently running DaemonSet pods and then - // brings up new DaemonSet pods in their place. Once the new pods are ready, - // it then proceeds onto other DaemonSet pods, thus ensuring that at least - // 70% of original number of DaemonSet pods are available at all times - // during the update. - MaxUnavailable intstr.IntOrString `json:"maxUnavailable,omitempty"` - - // Minimum number of seconds for which a newly created DaemonSet pod should - // be ready without any of its container crashing, for it to be considered - // available. Defaults to 0 (pod will be considered available as soon as it - // is ready). - MinReadySeconds int `json:"minReadySeconds,omitempty"` + // Example: when this is set to 30%, at most 30% of the total number of nodes + // that should be running the daemon pod (i.e. status.desiredNumberScheduled) + // can have their pods stopped for an update at any given + // time. The update starts by stopping at most 30% of those DaemonSet pods + // and then brings up new DaemonSet pods in their place. Once the new pods + // are available, it then proceeds onto other DaemonSet pods, thus ensuring + // that at least 70% of original number of DaemonSet pods are available at + // all times during the update. + // +optional + MaxUnavailable intstr.IntOrString } -*/ // DaemonSetSpec is the specification of a daemon set. type DaemonSetSpec struct { - // Selector is a label query over pods that are managed by the daemon set. + // A label query over pods that are managed by the daemon set. // Must match in order to be controlled. // If empty, defaulted to labels on Pod template. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - Selector *unversioned.LabelSelector `json:"selector,omitempty"` + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + Selector *metav1.LabelSelector - // Template is the object that describes the pod that will be created. + // An object that describes the pod that will be created. // The DaemonSet will create exactly one copy of this pod on every node // that matches the template's node selector (or on every node if no node // selector is specified). - // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template - Template api.PodTemplateSpec `json:"template"` + // More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template + Template api.PodTemplateSpec - // TODO(madhusudancs): Uncomment while implementing DaemonSet updates. - /* Commenting out for v1.2. We are planning to bring these fields back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting these fields out. - // Update strategy to replace existing DaemonSet pods with new pods. - UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"` + // An update strategy to replace existing DaemonSet pods with new pods. + // +optional + UpdateStrategy DaemonSetUpdateStrategy - // Label key that is added to DaemonSet pods to distinguish between old and - // new pod templates during DaemonSet update. - // Users can set this to an empty string to indicate that the system should - // not add any label. If unspecified, system uses - // DefaultDaemonSetUniqueLabelKey("daemonset.kubernetes.io/podTemplateHash"). - // Value of this key is hash of DaemonSetSpec.PodTemplateSpec. - // No label is added if this is set to empty string. - UniqueLabelKey string `json:"uniqueLabelKey,omitempty"` - */ + // The minimum number of seconds for which a newly created DaemonSet pod should + // be ready without any of its container crashing, for it to be considered + // available. Defaults to 0 (pod will be considered available as soon as it + // is ready). + // +optional + MinReadySeconds int32 + + // A sequence number representing a specific generation of the template. + // Populated by the system. It can be set only during the creation. + // +optional + TemplateGeneration int64 } -const ( - // DefaultDaemonSetUniqueLabelKey is the default key of the labels that is added - // to daemon set pods to distinguish between old and new pod templates during - // DaemonSet update. See DaemonSetSpec's UniqueLabelKey field for more information. - DefaultDaemonSetUniqueLabelKey string = "daemonset.kubernetes.io/podTemplateHash" -) - // DaemonSetStatus represents the current status of a daemon set. type DaemonSetStatus struct { - // CurrentNumberScheduled is the number of nodes that are running at least 1 + // The number of nodes that are running at least 1 // daemon pod and are supposed to run the daemon pod. - CurrentNumberScheduled int32 `json:"currentNumberScheduled"` + CurrentNumberScheduled int32 - // NumberMisscheduled is the number of nodes that are running the daemon pod, but are + // The number of nodes that are running the daemon pod, but are // not supposed to run the daemon pod. - NumberMisscheduled int32 `json:"numberMisscheduled"` + NumberMisscheduled int32 - // DesiredNumberScheduled is the total number of nodes that should be running the daemon + // The total number of nodes that should be running the daemon // pod (including nodes correctly running the daemon pod). - DesiredNumberScheduled int32 `json:"desiredNumberScheduled"` + DesiredNumberScheduled int32 + + // The number of nodes that should be running the daemon pod and have one + // or more of the daemon pod running and ready. + NumberReady int32 + + // The most recent generation observed by the daemon set controller. + // +optional + ObservedGeneration int64 + + // The total number of nodes that are running updated daemon pod + // +optional + UpdatedNumberScheduled int32 + + // The number of nodes that should be running the + // daemon pod and have one or more of the daemon pod running and + // available (ready for at least spec.minReadySeconds) + // +optional + NumberAvailable int32 + + // The number of nodes that should be running the + // daemon pod and have none of the daemon pod running and available + // (ready for at least spec.minReadySeconds) + // +optional + NumberUnavailable int32 } // +genclient=true // DaemonSet represents the configuration of a daemon set. type DaemonSet struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - api.ObjectMeta `json:"metadata,omitempty"` + // +optional + metav1.ObjectMeta - // Spec defines the desired behavior of this daemon set. + // The desired behavior of this daemon set. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Spec DaemonSetSpec `json:"spec,omitempty"` + // +optional + Spec DaemonSetSpec - // Status is the current status of this daemon set. This data may be + // The current status of this daemon set. This data may be // out of date by some window of time. // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Status DaemonSetStatus `json:"status,omitempty"` + // +optional + Status DaemonSetStatus } +const ( + // DaemonSetTemplateGenerationKey is the key of the labels that is added + // to daemon set pods to distinguish between old and new pod templates + // during DaemonSet template update. + DaemonSetTemplateGenerationKey string = "pod-template-generation" +) + // DaemonSetList is a collection of daemon sets. type DaemonSetList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty"` + // +optional + metav1.ListMeta - // Items is a list of daemon sets. - Items []DaemonSet `json:"items"` + // A list of daemon sets. + Items []DaemonSet } type ThirdPartyResourceDataList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Standard list metadata // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty"` + // +optional + metav1.ListMeta // Items is a list of third party objects - Items []ThirdPartyResourceData `json:"items"` + Items []ThirdPartyResourceData } // +genclient=true @@ -435,29 +547,33 @@ type ThirdPartyResourceDataList struct { // externally-reachable urls, load balance traffic, terminate SSL, offer name // based virtual hosting etc. type Ingress struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - api.ObjectMeta `json:"metadata,omitempty"` + // +optional + metav1.ObjectMeta // Spec is the desired state of the Ingress. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Spec IngressSpec `json:"spec,omitempty"` + // +optional + Spec IngressSpec // Status is the current state of the Ingress. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Status IngressStatus `json:"status,omitempty"` + // +optional + Status IngressStatus } // IngressList is a collection of Ingress. type IngressList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty"` + // +optional + metav1.ListMeta // Items is the list of Ingress. - Items []Ingress `json:"items"` + Items []Ingress } // IngressSpec describes the Ingress the user wishes to exist. @@ -466,18 +582,21 @@ type IngressSpec struct { // rule. At least one of 'backend' or 'rules' must be specified. This field // is optional to allow the loadbalancer controller or defaulting logic to // specify a global default. - Backend *IngressBackend `json:"backend,omitempty"` + // +optional + Backend *IngressBackend // TLS configuration. Currently the Ingress only supports a single TLS // port, 443. If multiple members of this list specify different hosts, they // will be multiplexed on the same port according to the hostname specified // through the SNI TLS extension, if the ingress controller fulfilling the // ingress supports SNI. - TLS []IngressTLS `json:"tls,omitempty"` + // +optional + TLS []IngressTLS // A list of host rules used to configure the Ingress. If unspecified, or // no rule matches, all traffic is sent to the default backend. - Rules []IngressRule `json:"rules,omitempty"` + // +optional + Rules []IngressRule // TODO: Add the ability to specify load-balancer IP through claims } @@ -487,20 +606,23 @@ type IngressTLS struct { // this list must match the name/s used in the tlsSecret. Defaults to the // wildcard host setting for the loadbalancer controller fulfilling this // Ingress, if left unspecified. - Hosts []string `json:"hosts,omitempty"` + // +optional + Hosts []string // SecretName is the name of the secret used to terminate SSL traffic on 443. // Field is left optional to allow SSL routing based on SNI hostname alone. // If the SNI host in a listener conflicts with the "Host" header field used // by an IngressRule, the SNI host is used for termination and value of the // Host header is used for routing. - SecretName string `json:"secretName,omitempty"` + // +optional + SecretName string // TODO: Consider specifying different modes of termination, protocols etc. } // IngressStatus describe the current state of the Ingress. type IngressStatus struct { // LoadBalancer contains the current status of the load-balancer. - LoadBalancer api.LoadBalancerStatus `json:"loadBalancer,omitempty"` + // +optional + LoadBalancer api.LoadBalancerStatus } // IngressRule represents the rules mapping the paths under a specified host to @@ -519,13 +641,15 @@ type IngressRule struct { // Incoming requests are matched against the host before the IngressRuleValue. // If the host is unspecified, the Ingress routes all traffic based on the // specified IngressRuleValue. - Host string `json:"host,omitempty"` + // +optional + Host string // IngressRuleValue represents a rule to route requests for this IngressRule. // If unspecified, the rule defaults to a http catch-all. Whether that sends // just traffic matching the host to the default backend or all traffic to the // default backend, is left to the controller fulfilling the Ingress. Http is // currently the only supported IngressRuleValue. - IngressRuleValue `json:",inline,omitempty"` + // +optional + IngressRuleValue } // IngressRuleValue represents a rule to apply against incoming requests. If the @@ -539,7 +663,8 @@ type IngressRuleValue struct { // 2. Consider adding fields for ingress-type specific global options // usable by a loadbalancer, like http keep-alive. - HTTP *HTTPIngressRuleValue `json:"http,omitempty"` + // +optional + HTTP *HTTPIngressRuleValue } // HTTPIngressRuleValue is a list of http selectors pointing to backends. @@ -549,7 +674,7 @@ type IngressRuleValue struct { // or '#'. type HTTPIngressRuleValue struct { // A collection of paths that map requests to backends. - Paths []HTTPIngressPath `json:"paths"` + Paths []HTTPIngressPath // TODO: Consider adding fields for ingress-type specific global // options usable by a loadbalancer, like http keep-alive. } @@ -564,43 +689,48 @@ type HTTPIngressPath struct { // part of a URL as defined by RFC 3986. Paths must begin with // a '/'. If unspecified, the path defaults to a catch all sending // traffic to the backend. - Path string `json:"path,omitempty"` + // +optional + Path string // Backend defines the referenced service endpoint to which the traffic // will be forwarded to. - Backend IngressBackend `json:"backend"` + Backend IngressBackend } // IngressBackend describes all endpoints for a given service and port. type IngressBackend struct { // Specifies the name of the referenced service. - ServiceName string `json:"serviceName"` + ServiceName string // Specifies the port of the referenced service. - ServicePort intstr.IntOrString `json:"servicePort"` + ServicePort intstr.IntOrString } // +genclient=true // ReplicaSet represents the configuration of a replica set. type ReplicaSet struct { - unversioned.TypeMeta `json:",inline"` - api.ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Spec defines the desired behavior of this ReplicaSet. - Spec ReplicaSetSpec `json:"spec,omitempty"` + // +optional + Spec ReplicaSetSpec // Status is the current status of this ReplicaSet. This data may be // out of date by some window of time. - Status ReplicaSetStatus `json:"status,omitempty"` + // +optional + Status ReplicaSetStatus } // ReplicaSetList is a collection of ReplicaSets. type ReplicaSetList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []ReplicaSet `json:"items"` + Items []ReplicaSet } // ReplicaSetSpec is the specification of a ReplicaSet. @@ -608,32 +738,78 @@ type ReplicaSetList struct { // a Template set. type ReplicaSetSpec struct { // Replicas is the number of desired replicas. - Replicas int32 `json:"replicas"` + Replicas int32 + + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + // +optional + MinReadySeconds int32 // Selector is a label query over pods that should match the replica count. // Must match in order to be controlled. // If empty, defaulted to labels on pod template. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - Selector *unversioned.LabelSelector `json:"selector,omitempty"` + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + Selector *metav1.LabelSelector // Template is the object that describes the pod that will be created if // insufficient replicas are detected. - Template api.PodTemplateSpec `json:"template,omitempty"` + // +optional + Template api.PodTemplateSpec } // ReplicaSetStatus represents the current status of a ReplicaSet. type ReplicaSetStatus struct { // Replicas is the number of actual replicas. - Replicas int32 `json:"replicas"` + Replicas int32 // The number of pods that have labels matching the labels of the pod template of the replicaset. - FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"` + // +optional + FullyLabeledReplicas int32 // The number of ready replicas for this replica set. - ReadyReplicas int32 `json:"readyReplicas,omitempty"` + // +optional + ReadyReplicas int32 + + // The number of available replicas (ready for at least minReadySeconds) for this replica set. + // +optional + AvailableReplicas int32 // ObservedGeneration is the most recent generation observed by the controller. - ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // +optional + ObservedGeneration int64 + + // Represents the latest available observations of a replica set's current state. + // +optional + Conditions []ReplicaSetCondition +} + +type ReplicaSetConditionType string + +// These are valid conditions of a replica set. +const ( + // ReplicaSetReplicaFailure is added in a replica set when one of its pods fails to be created + // due to insufficient quota, limit ranges, pod security policy, node selectors, etc. or deleted + // due to kubelet being down or finalizers are failing. + ReplicaSetReplicaFailure ReplicaSetConditionType = "ReplicaFailure" +) + +// ReplicaSetCondition describes the state of a replica set at a certain point. +type ReplicaSetCondition struct { + // Type of replica set condition. + Type ReplicaSetConditionType + // Status of the condition, one of True, False, Unknown. + Status api.ConditionStatus + // The last time the condition transitioned from one status to another. + // +optional + LastTransitionTime metav1.Time + // The reason for the condition's last transition. + // +optional + Reason string + // A human readable message indicating details about the transition. + // +optional + Message string } // +genclient=true @@ -642,62 +818,74 @@ type ReplicaSetStatus struct { // PodSecurityPolicy governs the ability to make requests that affect the SecurityContext // that will be applied to a pod and container. type PodSecurityPolicy struct { - unversioned.TypeMeta `json:",inline"` - api.ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Spec defines the policy enforced. - Spec PodSecurityPolicySpec `json:"spec,omitempty"` + // +optional + Spec PodSecurityPolicySpec } // PodSecurityPolicySpec defines the policy enforced. type PodSecurityPolicySpec struct { // Privileged determines if a pod can request to be run as privileged. - Privileged bool `json:"privileged,omitempty"` + // +optional + Privileged bool // DefaultAddCapabilities is the default set of capabilities that will be added to the container // unless the pod spec specifically drops the capability. You may not list a capability in both // DefaultAddCapabilities and RequiredDropCapabilities. - DefaultAddCapabilities []api.Capability `json:"defaultAddCapabilities,omitempty"` + // +optional + DefaultAddCapabilities []api.Capability // RequiredDropCapabilities are the capabilities that will be dropped from the container. These // are required to be dropped and cannot be added. - RequiredDropCapabilities []api.Capability `json:"requiredDropCapabilities,omitempty"` + // +optional + RequiredDropCapabilities []api.Capability // AllowedCapabilities is a list of capabilities that can be requested to add to the container. // Capabilities in this field may be added at the pod author's discretion. // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities. - AllowedCapabilities []api.Capability `json:"allowedCapabilities,omitempty"` + // +optional + AllowedCapabilities []api.Capability // Volumes is a white list of allowed volume plugins. Empty indicates that all plugins // may be used. - Volumes []FSType `json:"volumes,omitempty"` + // +optional + Volumes []FSType // HostNetwork determines if the policy allows the use of HostNetwork in the pod spec. - HostNetwork bool `json:"hostNetwork,omitempty"` + // +optional + HostNetwork bool // HostPorts determines which host port ranges are allowed to be exposed. - HostPorts []HostPortRange `json:"hostPorts,omitempty"` + // +optional + HostPorts []HostPortRange // HostPID determines if the policy allows the use of HostPID in the pod spec. - HostPID bool `json:"hostPID,omitempty"` + // +optional + HostPID bool // HostIPC determines if the policy allows the use of HostIPC in the pod spec. - HostIPC bool `json:"hostIPC,omitempty"` + // +optional + HostIPC bool // SELinux is the strategy that will dictate the allowable labels that may be set. - SELinux SELinuxStrategyOptions `json:"seLinux"` + SELinux SELinuxStrategyOptions // RunAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. - RunAsUser RunAsUserStrategyOptions `json:"runAsUser"` + RunAsUser RunAsUserStrategyOptions // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. - SupplementalGroups SupplementalGroupsStrategyOptions `json:"supplementalGroups"` + SupplementalGroups SupplementalGroupsStrategyOptions // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext. - FSGroup FSGroupStrategyOptions `json:"fsGroup"` + FSGroup FSGroupStrategyOptions // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file // system. If the container specifically requests to run with a non-read only root file system // the PSP should deny the pod. // If set to false the container may run with a read only root file system if it wishes but it // will not be forced to. - ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty"` + // +optional + ReadOnlyRootFilesystem bool } // HostPortRange defines a range of host ports that will be enabled by a policy // for pods to use. It requires both the start and end to be defined. type HostPortRange struct { // Min is the start of the range, inclusive. - Min int `json:"min"` + Min int // Max is the end of the range, inclusive. - Max int `json:"max"` + Max int } // FSType gives strong typing to different file systems that are used by volumes. @@ -726,16 +914,21 @@ var ( VsphereVolume FSType = "vsphereVolume" Quobyte FSType = "quobyte" AzureDisk FSType = "azureDisk" + PhotonPersistentDisk FSType = "photonPersistentDisk" + Projected FSType = "projected" + PortworxVolume FSType = "portworxVolume" + ScaleIO FSType = "scaleIO" All FSType = "*" ) // SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. type SELinuxStrategyOptions struct { // Rule is the strategy that will dictate the allowable labels that may be set. - Rule SELinuxStrategy `json:"rule"` + Rule SELinuxStrategy // seLinuxOptions required to run as; required for MustRunAs // More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context - SELinuxOptions *api.SELinuxOptions `json:"seLinuxOptions,omitempty"` + // +optional + SELinuxOptions *api.SELinuxOptions } // SELinuxStrategy denotes strategy types for generating SELinux options for a @@ -752,17 +945,18 @@ const ( // RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. type RunAsUserStrategyOptions struct { // Rule is the strategy that will dictate the allowable RunAsUser values that may be set. - Rule RunAsUserStrategy `json:"rule"` + Rule RunAsUserStrategy // Ranges are the allowed ranges of uids that may be used. - Ranges []IDRange `json:"ranges,omitempty"` + // +optional + Ranges []IDRange } // IDRange provides a min/max of an allowed range of IDs. type IDRange struct { // Min is the start of the range, inclusive. - Min int64 `json:"min"` + Min int64 // Max is the end of the range, inclusive. - Max int64 `json:"max"` + Max int64 } // RunAsUserStrategy denotes strategy types for generating RunAsUser values for a @@ -781,10 +975,12 @@ const ( // FSGroupStrategyOptions defines the strategy type and options used to create the strategy. type FSGroupStrategyOptions struct { // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. - Rule FSGroupStrategyType `json:"rule,omitempty"` + // +optional + Rule FSGroupStrategyType // Ranges are the allowed ranges of fs groups. If you would like to force a single // fs group then supply a single range with the same start and end. - Ranges []IDRange `json:"ranges,omitempty"` + // +optional + Ranges []IDRange } // FSGroupStrategyType denotes strategy types for generating FSGroup values for a @@ -801,10 +997,12 @@ const ( // SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. type SupplementalGroupsStrategyOptions struct { // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. - Rule SupplementalGroupsStrategyType `json:"rule,omitempty"` + // +optional + Rule SupplementalGroupsStrategyType // Ranges are the allowed ranges of supplemental groups. If you would like to force a single // supplemental group then supply a single range with the same start and end. - Ranges []IDRange `json:"ranges,omitempty"` + // +optional + Ranges []IDRange } // SupplementalGroupsStrategyType denotes strategy types for determining valid supplemental @@ -820,20 +1018,23 @@ const ( // PodSecurityPolicyList is a list of PodSecurityPolicy objects. type PodSecurityPolicyList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []PodSecurityPolicy `json:"items"` + Items []PodSecurityPolicy } // +genclient=true type NetworkPolicy struct { - unversioned.TypeMeta `json:",inline"` - api.ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // Specification of the desired behavior for this NetworkPolicy. - Spec NetworkPolicySpec `json:"spec,omitempty"` + // +optional + Spec NetworkPolicySpec } type NetworkPolicySpec struct { @@ -842,7 +1043,7 @@ type NetworkPolicySpec struct { // same set of pods. In this case, the ingress rules for each are combined additively. // This field is NOT optional and follows standard label selector semantics. // An empty podSelector matches all pods in this namespace. - PodSelector unversioned.LabelSelector `json:"podSelector"` + PodSelector metav1.LabelSelector // List of ingress rules to be applied to the selected pods. // Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, @@ -852,7 +1053,8 @@ type NetworkPolicySpec struct { // If this field is empty then this NetworkPolicy does not affect ingress isolation. // If this field is present and contains at least one rule, this policy allows any traffic // which matches at least one of the ingress rules in this list. - Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty"` + // +optional + Ingress []NetworkPolicyIngressRule } // This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from. @@ -864,7 +1066,8 @@ type NetworkPolicyIngressRule struct { // If this field is present and contains at least one item, then this rule allows traffic // only if the traffic matches at least one port in the list. // TODO: Update this to be a pointer to slice as soon as auto-generation supports it. - Ports []NetworkPolicyPort `json:"ports,omitempty"` + // +optional + Ports []NetworkPolicyPort // List of sources which should be able to access the pods selected for this rule. // Items in this list are combined using a logical OR operation. @@ -873,20 +1076,23 @@ type NetworkPolicyIngressRule struct { // If this field is present and contains at least on item, this rule allows traffic only if the // traffic matches at least one item in the from list. // TODO: Update this to be a pointer to slice as soon as auto-generation supports it. - From []NetworkPolicyPeer `json:"from,omitempty"` + // +optional + From []NetworkPolicyPeer } type NetworkPolicyPort struct { // Optional. The protocol (TCP or UDP) which traffic must match. // If not specified, this field defaults to TCP. - Protocol *api.Protocol `json:"protocol,omitempty"` + // +optional + Protocol *api.Protocol // If specified, the port on the given protocol. This can // either be a numerical or named port on a pod. If this field is not provided, // this matches all port names and numbers. // If present, only traffic on the specified protocol AND port // will be matched. - Port *intstr.IntOrString `json:"port,omitempty"` + // +optional + Port *intstr.IntOrString } type NetworkPolicyPeer struct { @@ -896,20 +1102,23 @@ type NetworkPolicyPeer struct { // This field follows standard label selector semantics. // If not provided, this selector selects no pods. // If present but empty, this selector selects all pods in this namespace. - PodSelector *unversioned.LabelSelector `json:"podSelector,omitempty"` + // +optional + PodSelector *metav1.LabelSelector // Selects Namespaces using cluster scoped-labels. This // matches all pods in all namespaces selected by this label selector. // This field follows standard label selector semantics. // If omitted, this selector selects no namespaces. // If present but empty, this selector selects all namespaces. - NamespaceSelector *unversioned.LabelSelector `json:"namespaceSelector,omitempty"` + // +optional + NamespaceSelector *metav1.LabelSelector } // NetworkPolicyList is a list of NetworkPolicy objects. type NetworkPolicyList struct { - unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ListMeta - Items []NetworkPolicy `json:"items"` + Items []NetworkPolicy } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/conversion.go similarity index 53% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/conversion.go rename to vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/conversion.go index 56f605e51..d53dbc47a 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/conversion.go +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/conversion.go @@ -19,15 +19,12 @@ package v1beta1 import ( "fmt" - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/apis/autoscaling" - "k8s.io/client-go/1.5/pkg/apis/batch" - "k8s.io/client-go/1.5/pkg/apis/extensions" - "k8s.io/client-go/1.5/pkg/conversion" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/util/intstr" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" + v1 "k8s.io/client-go/pkg/api/v1" + "k8s.io/client-go/pkg/apis/extensions" ) func addConversionFuncs(scheme *runtime.Scheme) error { @@ -41,16 +38,10 @@ func addConversionFuncs(scheme *runtime.Scheme) error { Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy, Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment, Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment, + Convert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet, + Convert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet, Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec, Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec, - // autoscaling - Convert_autoscaling_CrossVersionObjectReference_To_v1beta1_SubresourceReference, - Convert_v1beta1_SubresourceReference_To_autoscaling_CrossVersionObjectReference, - Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1beta1_HorizontalPodAutoscalerSpec, - Convert_v1beta1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec, - // batch - Convert_batch_JobSpec_To_v1beta1_JobSpec, - Convert_v1beta1_JobSpec_To_batch_JobSpec, ) if err != nil { return err @@ -59,7 +50,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error { // Add field label conversions for kinds having selectable nothing but ObjectMeta fields. for _, k := range []string{"DaemonSet", "Deployment", "Ingress"} { kind := k // don't close over range variables - err = api.Scheme.AddFieldLabelConversionFunc("extensions/v1beta1", kind, + err = scheme.AddFieldLabelConversionFunc("extensions/v1beta1", kind, func(label, value string) (string, string, error) { switch label { case "metadata.name", "metadata.namespace": @@ -74,16 +65,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error { } } - return api.Scheme.AddFieldLabelConversionFunc("extensions/v1beta1", "Job", - func(label, value string) (string, string, error) { - switch label { - case "metadata.name", "metadata.namespace", "status.successful": - return label, value, nil - default: - return "", "", fmt.Errorf("field label not supported: %s", label) - } - }, - ) + return nil } func Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(in *extensions.ScaleStatus, out *ScaleStatus, s conversion.Scope) error { @@ -96,7 +78,7 @@ func Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(in *extensions.ScaleS out.Selector = in.Selector.MatchLabels } - selector, err := unversioned.LabelSelectorAsSelector(in.Selector) + selector, err := metav1.LabelSelectorAsSelector(in.Selector) if err != nil { return fmt.Errorf("invalid label selector: %v", err) } @@ -113,14 +95,14 @@ func Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(in *ScaleStatus, out // new field can be expected to know about the old field (though that's not quite true, due // to kubectl apply). However, these fields are readonly, so any non-nil value should work. if in.TargetSelector != "" { - labelSelector, err := unversioned.ParseToLabelSelector(in.TargetSelector) + labelSelector, err := metav1.ParseToLabelSelector(in.TargetSelector) if err != nil { out.Selector = nil return fmt.Errorf("failed to parse target selector: %v", err) } out.Selector = labelSelector } else if in.Selector != nil { - out.Selector = new(unversioned.LabelSelector) + out.Selector = new(metav1.LabelSelector) selector := make(map[string]string) for key, val := range in.Selector { selector[key] = val @@ -134,14 +116,7 @@ func Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(in *ScaleStatus, out func Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(in *extensions.DeploymentSpec, out *DeploymentSpec, s conversion.Scope) error { out.Replicas = &in.Replicas - if in.Selector != nil { - out.Selector = new(LabelSelector) - if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(in.Selector, out.Selector, s); err != nil { - return err - } - } else { - out.Selector = nil - } + out.Selector = in.Selector if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -160,6 +135,10 @@ func Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(in *extensions. } else { out.RollbackTo = nil } + if in.ProgressDeadlineSeconds != nil { + out.ProgressDeadlineSeconds = new(int32) + *out.ProgressDeadlineSeconds = *in.ProgressDeadlineSeconds + } return nil } @@ -167,15 +146,7 @@ func Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(in *DeploymentS if in.Replicas != nil { out.Replicas = *in.Replicas } - - if in.Selector != nil { - out.Selector = new(unversioned.LabelSelector) - if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(in.Selector, out.Selector, s); err != nil { - return err - } - } else { - out.Selector = nil - } + out.Selector = in.Selector if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -191,6 +162,10 @@ func Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(in *DeploymentS } else { out.RollbackTo = nil } + if in.ProgressDeadlineSeconds != nil { + out.ProgressDeadlineSeconds = new(int32) + *out.ProgressDeadlineSeconds = *in.ProgressDeadlineSeconds + } return nil } @@ -246,18 +221,28 @@ func Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployme return nil } +func Convert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet(in *extensions.RollingUpdateDaemonSet, out *RollingUpdateDaemonSet, s conversion.Scope) error { + if out.MaxUnavailable == nil { + out.MaxUnavailable = &intstr.IntOrString{} + } + if err := s.Convert(&in.MaxUnavailable, out.MaxUnavailable, 0); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet(in *RollingUpdateDaemonSet, out *extensions.RollingUpdateDaemonSet, s conversion.Scope) error { + if err := s.Convert(in.MaxUnavailable, &out.MaxUnavailable, 0); err != nil { + return err + } + return nil +} + func Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(in *extensions.ReplicaSetSpec, out *ReplicaSetSpec, s conversion.Scope) error { out.Replicas = new(int32) *out.Replicas = int32(in.Replicas) - if in.Selector != nil { - out.Selector = new(LabelSelector) - if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(in.Selector, out.Selector, s); err != nil { - return err - } - } else { - out.Selector = nil - } - + out.MinReadySeconds = in.MinReadySeconds + out.Selector = in.Selector if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -268,134 +253,10 @@ func Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(in *ReplicaSetS if in.Replicas != nil { out.Replicas = *in.Replicas } - if in.Selector != nil { - out.Selector = new(unversioned.LabelSelector) - if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(in.Selector, out.Selector, s); err != nil { - return err - } - } else { - out.Selector = nil - } + out.MinReadySeconds = in.MinReadySeconds + out.Selector = in.Selector if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } return nil } - -func Convert_batch_JobSpec_To_v1beta1_JobSpec(in *batch.JobSpec, out *JobSpec, s conversion.Scope) error { - out.Parallelism = in.Parallelism - out.Completions = in.Completions - out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds - // unable to generate simple pointer conversion for unversioned.LabelSelector -> v1beta1.LabelSelector - if in.Selector != nil { - out.Selector = new(LabelSelector) - if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(in.Selector, out.Selector, s); err != nil { - return err - } - } else { - out.Selector = nil - } - - // BEGIN non-standard conversion - // autoSelector has opposite meaning as manualSelector. - // in both cases, unset means false, and unset is always preferred to false. - // unset vs set-false distinction is not preserved. - manualSelector := in.ManualSelector != nil && *in.ManualSelector - autoSelector := !manualSelector - if autoSelector { - out.AutoSelector = new(bool) - *out.AutoSelector = true - } else { - out.AutoSelector = nil - } - // END non-standard conversion - - if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -func Convert_v1beta1_JobSpec_To_batch_JobSpec(in *JobSpec, out *batch.JobSpec, s conversion.Scope) error { - out.Parallelism = in.Parallelism - out.Completions = in.Completions - out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds - // unable to generate simple pointer conversion for v1beta1.LabelSelector -> unversioned.LabelSelector - if in.Selector != nil { - out.Selector = new(unversioned.LabelSelector) - if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(in.Selector, out.Selector, s); err != nil { - return err - } - } else { - out.Selector = nil - } - - // BEGIN non-standard conversion - // autoSelector has opposite meaning as manualSelector. - // in both cases, unset means false, and unset is always preferred to false. - // unset vs set-false distinction is not preserved. - autoSelector := bool(in.AutoSelector != nil && *in.AutoSelector) - manualSelector := !autoSelector - if manualSelector { - out.ManualSelector = new(bool) - *out.ManualSelector = true - } else { - out.ManualSelector = nil - } - // END non-standard conversion - - if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -func Convert_autoscaling_CrossVersionObjectReference_To_v1beta1_SubresourceReference(in *autoscaling.CrossVersionObjectReference, out *SubresourceReference, s conversion.Scope) error { - out.Kind = in.Kind - out.Name = in.Name - out.APIVersion = in.APIVersion - out.Subresource = "scale" - return nil -} - -func Convert_v1beta1_SubresourceReference_To_autoscaling_CrossVersionObjectReference(in *SubresourceReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error { - out.Kind = in.Kind - out.Name = in.Name - out.APIVersion = in.APIVersion - return nil -} - -func Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1beta1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error { - if err := Convert_autoscaling_CrossVersionObjectReference_To_v1beta1_SubresourceReference(&in.ScaleTargetRef, &out.ScaleRef, s); err != nil { - return err - } - if in.MinReplicas != nil { - out.MinReplicas = new(int32) - *out.MinReplicas = *in.MinReplicas - } else { - out.MinReplicas = nil - } - out.MaxReplicas = in.MaxReplicas - if in.TargetCPUUtilizationPercentage != nil { - out.CPUUtilization = &CPUTargetUtilization{TargetPercentage: *in.TargetCPUUtilizationPercentage} - } - return nil -} - -func Convert_v1beta1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error { - if err := Convert_v1beta1_SubresourceReference_To_autoscaling_CrossVersionObjectReference(&in.ScaleRef, &out.ScaleTargetRef, s); err != nil { - return err - } - if in.MinReplicas != nil { - out.MinReplicas = new(int32) - *out.MinReplicas = int32(*in.MinReplicas) - } else { - out.MinReplicas = nil - } - out.MaxReplicas = int32(in.MaxReplicas) - if in.CPUUtilization != nil { - out.TargetCPUUtilizationPercentage = new(int32) - *out.TargetCPUUtilizationPercentage = int32(in.CPUUtilization.TargetPercentage) - } - return nil -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/defaults.go similarity index 62% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/defaults.go rename to vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/defaults.go index ae30a2bb3..298c568db 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/defaults.go +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/defaults.go @@ -17,17 +17,17 @@ limitations under the License. package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/util/intstr" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/client-go/pkg/api/v1" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { + RegisterDefaults(scheme) return scheme.AddDefaultingFuncs( SetDefaults_DaemonSet, SetDefaults_Deployment, - SetDefaults_Job, - SetDefaults_HorizontalPodAutoscaler, SetDefaults_ReplicaSet, SetDefaults_NetworkPolicy, ) @@ -39,7 +39,7 @@ func SetDefaults_DaemonSet(obj *DaemonSet) { // TODO: support templates defined elsewhere when we support them in the API if labels != nil { if obj.Spec.Selector == nil { - obj.Spec.Selector = &LabelSelector{ + obj.Spec.Selector = &metav1.LabelSelector{ MatchLabels: labels, } } @@ -47,6 +47,21 @@ func SetDefaults_DaemonSet(obj *DaemonSet) { obj.Labels = labels } } + updateStrategy := &obj.Spec.UpdateStrategy + if updateStrategy.Type == "" { + updateStrategy.Type = OnDeleteDaemonSetStrategyType + } + if updateStrategy.Type == RollingUpdateDaemonSetStrategyType { + if updateStrategy.RollingUpdate == nil { + rollingUpdate := RollingUpdateDaemonSet{} + updateStrategy.RollingUpdate = &rollingUpdate + } + if updateStrategy.RollingUpdate.MaxUnavailable == nil { + // Set default MaxUnavailable as 1 by default. + maxUnavailable := intstr.FromInt(1) + updateStrategy.RollingUpdate.MaxUnavailable = &maxUnavailable + } + } } func SetDefaults_Deployment(obj *Deployment) { @@ -55,7 +70,7 @@ func SetDefaults_Deployment(obj *Deployment) { if labels != nil { if obj.Spec.Selector == nil { - obj.Spec.Selector = &LabelSelector{MatchLabels: labels} + obj.Spec.Selector = &metav1.LabelSelector{MatchLabels: labels} } if len(obj.Labels) == 0 { obj.Labels = labels @@ -71,7 +86,7 @@ func SetDefaults_Deployment(obj *Deployment) { if strategy.Type == "" { strategy.Type = RollingUpdateDeploymentStrategyType } - if strategy.Type == RollingUpdateDeploymentStrategyType { + if strategy.Type == RollingUpdateDeploymentStrategyType || strategy.RollingUpdate != nil { if strategy.RollingUpdate == nil { rollingUpdate := RollingUpdateDeployment{} strategy.RollingUpdate = &rollingUpdate @@ -89,57 +104,13 @@ func SetDefaults_Deployment(obj *Deployment) { } } -func SetDefaults_Job(obj *Job) { - labels := obj.Spec.Template.Labels - // TODO: support templates defined elsewhere when we support them in the API - if labels != nil { - // if an autoselector is requested, we'll build the selector later with controller-uid and job-name - autoSelector := bool(obj.Spec.AutoSelector != nil && *obj.Spec.AutoSelector) - - // otherwise, we are using a manual selector - manualSelector := !autoSelector - - // and default behavior for an unspecified manual selector is to use the pod template labels - if manualSelector && obj.Spec.Selector == nil { - obj.Spec.Selector = &LabelSelector{ - MatchLabels: labels, - } - } - if len(obj.Labels) == 0 { - obj.Labels = labels - } - } - // For a non-parallel job, you can leave both `.spec.completions` and - // `.spec.parallelism` unset. When both are unset, both are defaulted to 1. - if obj.Spec.Completions == nil && obj.Spec.Parallelism == nil { - obj.Spec.Completions = new(int32) - *obj.Spec.Completions = 1 - obj.Spec.Parallelism = new(int32) - *obj.Spec.Parallelism = 1 - } - if obj.Spec.Parallelism == nil { - obj.Spec.Parallelism = new(int32) - *obj.Spec.Parallelism = 1 - } -} - -func SetDefaults_HorizontalPodAutoscaler(obj *HorizontalPodAutoscaler) { - if obj.Spec.MinReplicas == nil { - minReplicas := int32(1) - obj.Spec.MinReplicas = &minReplicas - } - if obj.Spec.CPUUtilization == nil { - obj.Spec.CPUUtilization = &CPUTargetUtilization{TargetPercentage: 80} - } -} - func SetDefaults_ReplicaSet(obj *ReplicaSet) { labels := obj.Spec.Template.Labels // TODO: support templates defined elsewhere when we support them in the API if labels != nil { if obj.Spec.Selector == nil { - obj.Spec.Selector = &LabelSelector{ + obj.Spec.Selector = &metav1.LabelSelector{ MatchLabels: labels, } } diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/doc.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/doc.go new file mode 100644 index 000000000..a397b30e9 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.pb.go similarity index 72% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/generated.pb.go rename to vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.pb.go index 67b6a9c5a..1c72f7311 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/generated.pb.go +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,6 @@ limitations under the License. It has these top-level messages: APIVersion - CPUTargetUtilization CustomMetricCurrentStatus CustomMetricCurrentStatusList CustomMetricTarget @@ -35,20 +34,17 @@ limitations under the License. DaemonSetList DaemonSetSpec DaemonSetStatus + DaemonSetUpdateStrategy Deployment + DeploymentCondition DeploymentList DeploymentRollback DeploymentSpec DeploymentStatus DeploymentStrategy - ExportOptions FSGroupStrategyOptions HTTPIngressPath HTTPIngressRuleValue - HorizontalPodAutoscaler - HorizontalPodAutoscalerList - HorizontalPodAutoscalerSpec - HorizontalPodAutoscalerStatus HostPortRange IDRange Ingress @@ -59,14 +55,6 @@ limitations under the License. IngressSpec IngressStatus IngressTLS - Job - JobCondition - JobList - JobSpec - JobStatus - LabelSelector - LabelSelectorRequirement - ListOptions NetworkPolicy NetworkPolicyIngressRule NetworkPolicyList @@ -77,18 +65,19 @@ limitations under the License. PodSecurityPolicyList PodSecurityPolicySpec ReplicaSet + ReplicaSetCondition ReplicaSetList ReplicaSetSpec ReplicaSetStatus ReplicationControllerDummy RollbackConfig + RollingUpdateDaemonSet RollingUpdateDeployment RunAsUserStrategyOptions SELinuxStrategyOptions Scale ScaleSpec ScaleStatus - SubresourceReference SupplementalGroupsStrategyOptions ThirdPartyResource ThirdPartyResourceData @@ -101,10 +90,11 @@ import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" -import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/1.5/pkg/api/v1" +import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" -import k8s_io_kubernetes_pkg_util_intstr "k8s.io/client-go/1.5/pkg/util/intstr" +import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr" + +import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1" import strings "strings" import reflect "reflect" @@ -125,73 +115,73 @@ func (m *APIVersion) Reset() { *m = APIVersion{} } func (*APIVersion) ProtoMessage() {} func (*APIVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } -func (m *CPUTargetUtilization) Reset() { *m = CPUTargetUtilization{} } -func (*CPUTargetUtilization) ProtoMessage() {} -func (*CPUTargetUtilization) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } - func (m *CustomMetricCurrentStatus) Reset() { *m = CustomMetricCurrentStatus{} } func (*CustomMetricCurrentStatus) ProtoMessage() {} func (*CustomMetricCurrentStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{2} + return fileDescriptorGenerated, []int{1} } func (m *CustomMetricCurrentStatusList) Reset() { *m = CustomMetricCurrentStatusList{} } func (*CustomMetricCurrentStatusList) ProtoMessage() {} func (*CustomMetricCurrentStatusList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{3} + return fileDescriptorGenerated, []int{2} } func (m *CustomMetricTarget) Reset() { *m = CustomMetricTarget{} } func (*CustomMetricTarget) ProtoMessage() {} -func (*CustomMetricTarget) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } +func (*CustomMetricTarget) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } func (m *CustomMetricTargetList) Reset() { *m = CustomMetricTargetList{} } func (*CustomMetricTargetList) ProtoMessage() {} -func (*CustomMetricTargetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } +func (*CustomMetricTargetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } func (m *DaemonSet) Reset() { *m = DaemonSet{} } func (*DaemonSet) ProtoMessage() {} -func (*DaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } +func (*DaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } func (m *DaemonSetList) Reset() { *m = DaemonSetList{} } func (*DaemonSetList) ProtoMessage() {} -func (*DaemonSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (*DaemonSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} } func (*DaemonSetSpec) ProtoMessage() {} -func (*DaemonSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } +func (*DaemonSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } func (*DaemonSetStatus) ProtoMessage() {} -func (*DaemonSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } +func (*DaemonSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } + +func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } +func (*DaemonSetUpdateStrategy) ProtoMessage() {} +func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } func (m *Deployment) Reset() { *m = Deployment{} } func (*Deployment) ProtoMessage() {} func (*Deployment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } +func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } +func (*DeploymentCondition) ProtoMessage() {} +func (*DeploymentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } + func (m *DeploymentList) Reset() { *m = DeploymentList{} } func (*DeploymentList) ProtoMessage() {} -func (*DeploymentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } +func (*DeploymentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} } func (*DeploymentRollback) ProtoMessage() {} -func (*DeploymentRollback) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } +func (*DeploymentRollback) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } func (*DeploymentSpec) ProtoMessage() {} -func (*DeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } +func (*DeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } func (*DeploymentStatus) ProtoMessage() {} -func (*DeploymentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } +func (*DeploymentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } func (*DeploymentStrategy) ProtoMessage() {} -func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } - -func (m *ExportOptions) Reset() { *m = ExportOptions{} } -func (*ExportOptions) ProtoMessage() {} -func (*ExportOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } +func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } func (m *FSGroupStrategyOptions) Reset() { *m = FSGroupStrategyOptions{} } func (*FSGroupStrategyOptions) ProtoMessage() {} @@ -205,294 +195,229 @@ func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRule func (*HTTPIngressRuleValue) ProtoMessage() {} func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } -func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } -func (*HorizontalPodAutoscaler) ProtoMessage() {} -func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{20} -} - -func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } -func (*HorizontalPodAutoscalerList) ProtoMessage() {} -func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{21} -} - -func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } -func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} -func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{22} -} - -func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } -func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} -func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{23} -} - func (m *HostPortRange) Reset() { *m = HostPortRange{} } func (*HostPortRange) ProtoMessage() {} -func (*HostPortRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } +func (*HostPortRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } func (m *IDRange) Reset() { *m = IDRange{} } func (*IDRange) ProtoMessage() {} -func (*IDRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } +func (*IDRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } func (m *Ingress) Reset() { *m = Ingress{} } func (*Ingress) ProtoMessage() {} -func (*Ingress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } +func (*Ingress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } func (m *IngressBackend) Reset() { *m = IngressBackend{} } func (*IngressBackend) ProtoMessage() {} -func (*IngressBackend) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } +func (*IngressBackend) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } func (m *IngressList) Reset() { *m = IngressList{} } func (*IngressList) ProtoMessage() {} -func (*IngressList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} } +func (*IngressList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } func (m *IngressRule) Reset() { *m = IngressRule{} } func (*IngressRule) ProtoMessage() {} -func (*IngressRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} } +func (*IngressRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } func (*IngressRuleValue) ProtoMessage() {} -func (*IngressRuleValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} } +func (*IngressRuleValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } func (m *IngressSpec) Reset() { *m = IngressSpec{} } func (*IngressSpec) ProtoMessage() {} -func (*IngressSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{31} } +func (*IngressSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } func (m *IngressStatus) Reset() { *m = IngressStatus{} } func (*IngressStatus) ProtoMessage() {} -func (*IngressStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} } +func (*IngressStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} } func (m *IngressTLS) Reset() { *m = IngressTLS{} } func (*IngressTLS) ProtoMessage() {} -func (*IngressTLS) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} } - -func (m *Job) Reset() { *m = Job{} } -func (*Job) ProtoMessage() {} -func (*Job) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} } - -func (m *JobCondition) Reset() { *m = JobCondition{} } -func (*JobCondition) ProtoMessage() {} -func (*JobCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} } - -func (m *JobList) Reset() { *m = JobList{} } -func (*JobList) ProtoMessage() {} -func (*JobList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} } - -func (m *JobSpec) Reset() { *m = JobSpec{} } -func (*JobSpec) ProtoMessage() {} -func (*JobSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} } - -func (m *JobStatus) Reset() { *m = JobStatus{} } -func (*JobStatus) ProtoMessage() {} -func (*JobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} } - -func (m *LabelSelector) Reset() { *m = LabelSelector{} } -func (*LabelSelector) ProtoMessage() {} -func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{39} } - -func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } -func (*LabelSelectorRequirement) ProtoMessage() {} -func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{40} -} - -func (m *ListOptions) Reset() { *m = ListOptions{} } -func (*ListOptions) ProtoMessage() {} -func (*ListOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{41} } +func (*IngressTLS) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} } func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } func (*NetworkPolicy) ProtoMessage() {} -func (*NetworkPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{42} } +func (*NetworkPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} } func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } func (*NetworkPolicyIngressRule) ProtoMessage() {} func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{43} + return fileDescriptorGenerated, []int{31} } func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} } func (*NetworkPolicyList) ProtoMessage() {} -func (*NetworkPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{44} } +func (*NetworkPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} } func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} } func (*NetworkPolicyPeer) ProtoMessage() {} -func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{45} } +func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} } func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} } func (*NetworkPolicyPort) ProtoMessage() {} -func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{46} } +func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} } func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} } func (*NetworkPolicySpec) ProtoMessage() {} -func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{47} } +func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} } func (m *PodSecurityPolicy) Reset() { *m = PodSecurityPolicy{} } func (*PodSecurityPolicy) ProtoMessage() {} -func (*PodSecurityPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{48} } +func (*PodSecurityPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} } func (m *PodSecurityPolicyList) Reset() { *m = PodSecurityPolicyList{} } func (*PodSecurityPolicyList) ProtoMessage() {} -func (*PodSecurityPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{49} } +func (*PodSecurityPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} } func (m *PodSecurityPolicySpec) Reset() { *m = PodSecurityPolicySpec{} } func (*PodSecurityPolicySpec) ProtoMessage() {} -func (*PodSecurityPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} } +func (*PodSecurityPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} } func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } func (*ReplicaSet) ProtoMessage() {} -func (*ReplicaSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{51} } +func (*ReplicaSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{39} } + +func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } +func (*ReplicaSetCondition) ProtoMessage() {} +func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{40} } func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } func (*ReplicaSetList) ProtoMessage() {} -func (*ReplicaSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{52} } +func (*ReplicaSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{41} } func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } func (*ReplicaSetSpec) ProtoMessage() {} -func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{53} } +func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{42} } func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } func (*ReplicaSetStatus) ProtoMessage() {} -func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{54} } +func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{43} } func (m *ReplicationControllerDummy) Reset() { *m = ReplicationControllerDummy{} } func (*ReplicationControllerDummy) ProtoMessage() {} func (*ReplicationControllerDummy) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{55} + return fileDescriptorGenerated, []int{44} } func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } func (*RollbackConfig) ProtoMessage() {} -func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{56} } +func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{45} } + +func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } +func (*RollingUpdateDaemonSet) ProtoMessage() {} +func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{46} } func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{57} + return fileDescriptorGenerated, []int{47} } func (m *RunAsUserStrategyOptions) Reset() { *m = RunAsUserStrategyOptions{} } func (*RunAsUserStrategyOptions) ProtoMessage() {} func (*RunAsUserStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{58} + return fileDescriptorGenerated, []int{48} } func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} } func (*SELinuxStrategyOptions) ProtoMessage() {} -func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{59} } +func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{49} } func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} -func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{60} } +func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} } func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (*ScaleSpec) ProtoMessage() {} -func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{61} } +func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{51} } func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (*ScaleStatus) ProtoMessage() {} -func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{62} } - -func (m *SubresourceReference) Reset() { *m = SubresourceReference{} } -func (*SubresourceReference) ProtoMessage() {} -func (*SubresourceReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{63} } +func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{52} } func (m *SupplementalGroupsStrategyOptions) Reset() { *m = SupplementalGroupsStrategyOptions{} } func (*SupplementalGroupsStrategyOptions) ProtoMessage() {} func (*SupplementalGroupsStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{64} + return fileDescriptorGenerated, []int{53} } func (m *ThirdPartyResource) Reset() { *m = ThirdPartyResource{} } func (*ThirdPartyResource) ProtoMessage() {} -func (*ThirdPartyResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{65} } +func (*ThirdPartyResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{54} } func (m *ThirdPartyResourceData) Reset() { *m = ThirdPartyResourceData{} } func (*ThirdPartyResourceData) ProtoMessage() {} -func (*ThirdPartyResourceData) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{66} } +func (*ThirdPartyResourceData) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{55} } func (m *ThirdPartyResourceDataList) Reset() { *m = ThirdPartyResourceDataList{} } func (*ThirdPartyResourceDataList) ProtoMessage() {} func (*ThirdPartyResourceDataList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{67} + return fileDescriptorGenerated, []int{56} } func (m *ThirdPartyResourceList) Reset() { *m = ThirdPartyResourceList{} } func (*ThirdPartyResourceList) ProtoMessage() {} -func (*ThirdPartyResourceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{68} } +func (*ThirdPartyResourceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{57} } func init() { - proto.RegisterType((*APIVersion)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.APIVersion") - proto.RegisterType((*CPUTargetUtilization)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.CPUTargetUtilization") - proto.RegisterType((*CustomMetricCurrentStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.CustomMetricCurrentStatus") - proto.RegisterType((*CustomMetricCurrentStatusList)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.CustomMetricCurrentStatusList") - proto.RegisterType((*CustomMetricTarget)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.CustomMetricTarget") - proto.RegisterType((*CustomMetricTargetList)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.CustomMetricTargetList") - proto.RegisterType((*DaemonSet)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.DaemonSet") - proto.RegisterType((*DaemonSetList)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.DaemonSetList") - proto.RegisterType((*DaemonSetSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.DaemonSetSpec") - proto.RegisterType((*DaemonSetStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.DaemonSetStatus") - proto.RegisterType((*Deployment)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.Deployment") - proto.RegisterType((*DeploymentList)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.DeploymentList") - proto.RegisterType((*DeploymentRollback)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.DeploymentRollback") - proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.DeploymentSpec") - proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.DeploymentStatus") - proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.DeploymentStrategy") - proto.RegisterType((*ExportOptions)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.ExportOptions") - proto.RegisterType((*FSGroupStrategyOptions)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.FSGroupStrategyOptions") - proto.RegisterType((*HTTPIngressPath)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.HTTPIngressPath") - proto.RegisterType((*HTTPIngressRuleValue)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.HTTPIngressRuleValue") - proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.HorizontalPodAutoscaler") - proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.HorizontalPodAutoscalerList") - proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.HorizontalPodAutoscalerSpec") - proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.HorizontalPodAutoscalerStatus") - proto.RegisterType((*HostPortRange)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.HostPortRange") - proto.RegisterType((*IDRange)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.IDRange") - proto.RegisterType((*Ingress)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.Ingress") - proto.RegisterType((*IngressBackend)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.IngressBackend") - proto.RegisterType((*IngressList)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.IngressList") - proto.RegisterType((*IngressRule)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.IngressRule") - proto.RegisterType((*IngressRuleValue)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.IngressRuleValue") - proto.RegisterType((*IngressSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.IngressSpec") - proto.RegisterType((*IngressStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.IngressStatus") - proto.RegisterType((*IngressTLS)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.IngressTLS") - proto.RegisterType((*Job)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.Job") - proto.RegisterType((*JobCondition)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.JobCondition") - proto.RegisterType((*JobList)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.JobList") - proto.RegisterType((*JobSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.JobSpec") - proto.RegisterType((*JobStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.JobStatus") - proto.RegisterType((*LabelSelector)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.LabelSelector") - proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.LabelSelectorRequirement") - proto.RegisterType((*ListOptions)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.ListOptions") - proto.RegisterType((*NetworkPolicy)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.NetworkPolicy") - proto.RegisterType((*NetworkPolicyIngressRule)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.NetworkPolicyIngressRule") - proto.RegisterType((*NetworkPolicyList)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.NetworkPolicyList") - proto.RegisterType((*NetworkPolicyPeer)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.NetworkPolicyPeer") - proto.RegisterType((*NetworkPolicyPort)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.NetworkPolicyPort") - proto.RegisterType((*NetworkPolicySpec)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.NetworkPolicySpec") - proto.RegisterType((*PodSecurityPolicy)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.PodSecurityPolicy") - proto.RegisterType((*PodSecurityPolicyList)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.PodSecurityPolicyList") - proto.RegisterType((*PodSecurityPolicySpec)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.PodSecurityPolicySpec") - proto.RegisterType((*ReplicaSet)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.ReplicaSet") - proto.RegisterType((*ReplicaSetList)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.ReplicaSetList") - proto.RegisterType((*ReplicaSetSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.ReplicaSetSpec") - proto.RegisterType((*ReplicaSetStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.ReplicaSetStatus") - proto.RegisterType((*ReplicationControllerDummy)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.ReplicationControllerDummy") - proto.RegisterType((*RollbackConfig)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.RollbackConfig") - proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.RollingUpdateDeployment") - proto.RegisterType((*RunAsUserStrategyOptions)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.RunAsUserStrategyOptions") - proto.RegisterType((*SELinuxStrategyOptions)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.SELinuxStrategyOptions") - proto.RegisterType((*Scale)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.Scale") - proto.RegisterType((*ScaleSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.ScaleSpec") - proto.RegisterType((*ScaleStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.ScaleStatus") - proto.RegisterType((*SubresourceReference)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.SubresourceReference") - proto.RegisterType((*SupplementalGroupsStrategyOptions)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.SupplementalGroupsStrategyOptions") - proto.RegisterType((*ThirdPartyResource)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.ThirdPartyResource") - proto.RegisterType((*ThirdPartyResourceData)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.ThirdPartyResourceData") - proto.RegisterType((*ThirdPartyResourceDataList)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.ThirdPartyResourceDataList") - proto.RegisterType((*ThirdPartyResourceList)(nil), "k8s.io.client-go.1.5.pkg.apis.extensions.v1beta1.ThirdPartyResourceList") + proto.RegisterType((*APIVersion)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.APIVersion") + proto.RegisterType((*CustomMetricCurrentStatus)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.CustomMetricCurrentStatus") + proto.RegisterType((*CustomMetricCurrentStatusList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.CustomMetricCurrentStatusList") + proto.RegisterType((*CustomMetricTarget)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.CustomMetricTarget") + proto.RegisterType((*CustomMetricTargetList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.CustomMetricTargetList") + proto.RegisterType((*DaemonSet)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DaemonSet") + proto.RegisterType((*DaemonSetList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DaemonSetList") + proto.RegisterType((*DaemonSetSpec)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DaemonSetSpec") + proto.RegisterType((*DaemonSetStatus)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DaemonSetStatus") + proto.RegisterType((*DaemonSetUpdateStrategy)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DaemonSetUpdateStrategy") + proto.RegisterType((*Deployment)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.Deployment") + proto.RegisterType((*DeploymentCondition)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DeploymentCondition") + proto.RegisterType((*DeploymentList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DeploymentList") + proto.RegisterType((*DeploymentRollback)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DeploymentRollback") + proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DeploymentSpec") + proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DeploymentStatus") + proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DeploymentStrategy") + proto.RegisterType((*FSGroupStrategyOptions)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.FSGroupStrategyOptions") + proto.RegisterType((*HTTPIngressPath)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.HTTPIngressPath") + proto.RegisterType((*HTTPIngressRuleValue)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.HTTPIngressRuleValue") + proto.RegisterType((*HostPortRange)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.HostPortRange") + proto.RegisterType((*IDRange)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IDRange") + proto.RegisterType((*Ingress)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.Ingress") + proto.RegisterType((*IngressBackend)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IngressBackend") + proto.RegisterType((*IngressList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IngressList") + proto.RegisterType((*IngressRule)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IngressRule") + proto.RegisterType((*IngressRuleValue)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IngressRuleValue") + proto.RegisterType((*IngressSpec)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IngressSpec") + proto.RegisterType((*IngressStatus)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IngressStatus") + proto.RegisterType((*IngressTLS)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IngressTLS") + proto.RegisterType((*NetworkPolicy)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.NetworkPolicy") + proto.RegisterType((*NetworkPolicyIngressRule)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.NetworkPolicyIngressRule") + proto.RegisterType((*NetworkPolicyList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.NetworkPolicyList") + proto.RegisterType((*NetworkPolicyPeer)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.NetworkPolicyPeer") + proto.RegisterType((*NetworkPolicyPort)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.NetworkPolicyPort") + proto.RegisterType((*NetworkPolicySpec)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.NetworkPolicySpec") + proto.RegisterType((*PodSecurityPolicy)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.PodSecurityPolicy") + proto.RegisterType((*PodSecurityPolicyList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.PodSecurityPolicyList") + proto.RegisterType((*PodSecurityPolicySpec)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.PodSecurityPolicySpec") + proto.RegisterType((*ReplicaSet)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ReplicaSet") + proto.RegisterType((*ReplicaSetCondition)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ReplicaSetCondition") + proto.RegisterType((*ReplicaSetList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ReplicaSetList") + proto.RegisterType((*ReplicaSetSpec)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ReplicaSetSpec") + proto.RegisterType((*ReplicaSetStatus)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ReplicaSetStatus") + proto.RegisterType((*ReplicationControllerDummy)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ReplicationControllerDummy") + proto.RegisterType((*RollbackConfig)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.RollbackConfig") + proto.RegisterType((*RollingUpdateDaemonSet)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.RollingUpdateDaemonSet") + proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.RollingUpdateDeployment") + proto.RegisterType((*RunAsUserStrategyOptions)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.RunAsUserStrategyOptions") + proto.RegisterType((*SELinuxStrategyOptions)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.SELinuxStrategyOptions") + proto.RegisterType((*Scale)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.Scale") + proto.RegisterType((*ScaleSpec)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ScaleSpec") + proto.RegisterType((*ScaleStatus)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ScaleStatus") + proto.RegisterType((*SupplementalGroupsStrategyOptions)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.SupplementalGroupsStrategyOptions") + proto.RegisterType((*ThirdPartyResource)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ThirdPartyResource") + proto.RegisterType((*ThirdPartyResourceData)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ThirdPartyResourceData") + proto.RegisterType((*ThirdPartyResourceDataList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ThirdPartyResourceDataList") + proto.RegisterType((*ThirdPartyResourceList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ThirdPartyResourceList") } func (m *APIVersion) Marshal() (data []byte, err error) { size := m.Size() @@ -516,27 +441,6 @@ func (m *APIVersion) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *CPUTargetUtilization) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *CPUTargetUtilization) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintGenerated(data, i, uint64(m.TargetPercentage)) - return i, nil -} - func (m *CustomMetricCurrentStatus) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -770,6 +674,20 @@ func (m *DaemonSetSpec) MarshalTo(data []byte) (int, error) { return 0, err } i += n8 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.UpdateStrategy.Size())) + n9, err := m.UpdateStrategy.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + data[i] = 0x20 + i++ + i = encodeVarintGenerated(data, i, uint64(m.MinReadySeconds)) + data[i] = 0x28 + i++ + i = encodeVarintGenerated(data, i, uint64(m.TemplateGeneration)) return i, nil } @@ -797,6 +715,53 @@ func (m *DaemonSetStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x18 i++ i = encodeVarintGenerated(data, i, uint64(m.DesiredNumberScheduled)) + data[i] = 0x20 + i++ + i = encodeVarintGenerated(data, i, uint64(m.NumberReady)) + data[i] = 0x28 + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObservedGeneration)) + data[i] = 0x30 + i++ + i = encodeVarintGenerated(data, i, uint64(m.UpdatedNumberScheduled)) + data[i] = 0x38 + i++ + i = encodeVarintGenerated(data, i, uint64(m.NumberAvailable)) + data[i] = 0x40 + i++ + i = encodeVarintGenerated(data, i, uint64(m.NumberUnavailable)) + return i, nil +} + +func (m *DaemonSetUpdateStrategy) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DaemonSetUpdateStrategy) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + if m.RollingUpdate != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.RollingUpdate.Size())) + n10, err := m.RollingUpdate.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n10 + } return i, nil } @@ -818,27 +783,77 @@ func (m *Deployment) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n9, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n9 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n10, err := m.Spec.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n10 - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n11, err := m.Status.MarshalTo(data[i:]) + n11, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n11 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n12, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n12 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n13, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n13 + return i, nil +} + +func (m *DeploymentCondition) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeploymentCondition) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Status))) + i += copy(data[i:], m.Status) + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) + i += copy(data[i:], m.Reason) + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Message))) + i += copy(data[i:], m.Message) + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastUpdateTime.Size())) + n14, err := m.LastUpdateTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n14 + data[i] = 0x3a + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) + n15, err := m.LastTransitionTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n15 return i, nil } @@ -860,11 +875,11 @@ func (m *DeploymentList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n12, err := m.ListMeta.MarshalTo(data[i:]) + n16, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n12 + i += n16 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -919,11 +934,11 @@ func (m *DeploymentRollback) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.RollbackTo.Size())) - n13, err := m.RollbackTo.MarshalTo(data[i:]) + n17, err := m.RollbackTo.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n13 + i += n17 return i, nil } @@ -951,28 +966,28 @@ func (m *DeploymentSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Selector.Size())) - n14, err := m.Selector.MarshalTo(data[i:]) + n18, err := m.Selector.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n14 + i += n18 } data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) - n15, err := m.Template.MarshalTo(data[i:]) + n19, err := m.Template.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n15 + i += n19 data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(m.Strategy.Size())) - n16, err := m.Strategy.MarshalTo(data[i:]) + n20, err := m.Strategy.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n16 + i += n20 data[i] = 0x28 i++ i = encodeVarintGenerated(data, i, uint64(m.MinReadySeconds)) @@ -993,11 +1008,16 @@ func (m *DeploymentSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x42 i++ i = encodeVarintGenerated(data, i, uint64(m.RollbackTo.Size())) - n17, err := m.RollbackTo.MarshalTo(data[i:]) + n21, err := m.RollbackTo.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n17 + i += n21 + } + if m.ProgressDeadlineSeconds != nil { + data[i] = 0x48 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.ProgressDeadlineSeconds)) } return i, nil } @@ -1032,6 +1052,21 @@ func (m *DeploymentStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x28 i++ i = encodeVarintGenerated(data, i, uint64(m.UnavailableReplicas)) + if len(m.Conditions) > 0 { + for _, msg := range m.Conditions { + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + data[i] = 0x38 + i++ + i = encodeVarintGenerated(data, i, uint64(m.ReadyReplicas)) return i, nil } @@ -1058,49 +1093,15 @@ func (m *DeploymentStrategy) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.RollingUpdate.Size())) - n18, err := m.RollingUpdate.MarshalTo(data[i:]) + n22, err := m.RollingUpdate.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n18 + i += n22 } return i, nil } -func (m *ExportOptions) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ExportOptions) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - if m.Export { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if m.Exact { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} - func (m *FSGroupStrategyOptions) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -1157,11 +1158,11 @@ func (m *HTTPIngressPath) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Backend.Size())) - n19, err := m.Backend.MarshalTo(data[i:]) + n23, err := m.Backend.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n19 + i += n23 return i, nil } @@ -1195,174 +1196,6 @@ func (m *HTTPIngressRuleValue) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *HorizontalPodAutoscaler) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *HorizontalPodAutoscaler) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n20, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n20 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n21, err := m.Spec.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n21 - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n22, err := m.Status.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n22 - return i, nil -} - -func (m *HorizontalPodAutoscalerList) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *HorizontalPodAutoscalerList) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n23, err := m.ListMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n23 - if len(m.Items) > 0 { - for _, msg := range m.Items { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *HorizontalPodAutoscalerSpec) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *HorizontalPodAutoscalerSpec) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(m.ScaleRef.Size())) - n24, err := m.ScaleRef.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n24 - if m.MinReplicas != nil { - data[i] = 0x10 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.MinReplicas)) - } - data[i] = 0x18 - i++ - i = encodeVarintGenerated(data, i, uint64(m.MaxReplicas)) - if m.CPUUtilization != nil { - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(m.CPUUtilization.Size())) - n25, err := m.CPUUtilization.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n25 - } - return i, nil -} - -func (m *HorizontalPodAutoscalerStatus) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *HorizontalPodAutoscalerStatus) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ObservedGeneration != nil { - data[i] = 0x8 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.ObservedGeneration)) - } - if m.LastScaleTime != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.LastScaleTime.Size())) - n26, err := m.LastScaleTime.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n26 - } - data[i] = 0x18 - i++ - i = encodeVarintGenerated(data, i, uint64(m.CurrentReplicas)) - data[i] = 0x20 - i++ - i = encodeVarintGenerated(data, i, uint64(m.DesiredReplicas)) - if m.CurrentCPUUtilizationPercentage != nil { - data[i] = 0x28 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.CurrentCPUUtilizationPercentage)) - } - return i, nil -} - func (m *HostPortRange) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -1429,27 +1262,27 @@ func (m *Ingress) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n27, err := m.ObjectMeta.MarshalTo(data[i:]) + n24, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n27 + i += n24 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n28, err := m.Spec.MarshalTo(data[i:]) + n25, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n28 + i += n25 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n29, err := m.Status.MarshalTo(data[i:]) + n26, err := m.Status.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n29 + i += n26 return i, nil } @@ -1475,11 +1308,11 @@ func (m *IngressBackend) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.ServicePort.Size())) - n30, err := m.ServicePort.MarshalTo(data[i:]) + n27, err := m.ServicePort.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n30 + i += n27 return i, nil } @@ -1501,11 +1334,11 @@ func (m *IngressList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n31, err := m.ListMeta.MarshalTo(data[i:]) + n28, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n31 + i += n28 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -1543,11 +1376,11 @@ func (m *IngressRule) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.IngressRuleValue.Size())) - n32, err := m.IngressRuleValue.MarshalTo(data[i:]) + n29, err := m.IngressRuleValue.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n32 + i += n29 return i, nil } @@ -1570,11 +1403,11 @@ func (m *IngressRuleValue) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.HTTP.Size())) - n33, err := m.HTTP.MarshalTo(data[i:]) + n30, err := m.HTTP.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n33 + i += n30 } return i, nil } @@ -1598,11 +1431,11 @@ func (m *IngressSpec) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Backend.Size())) - n34, err := m.Backend.MarshalTo(data[i:]) + n31, err := m.Backend.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n34 + i += n31 } if len(m.TLS) > 0 { for _, msg := range m.TLS { @@ -1649,11 +1482,11 @@ func (m *IngressStatus) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.LoadBalancer.Size())) - n35, err := m.LoadBalancer.MarshalTo(data[i:]) + n32, err := m.LoadBalancer.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n35 + i += n32 return i, nil } @@ -1694,387 +1527,6 @@ func (m *IngressTLS) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *Job) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Job) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n36, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n36 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n37, err := m.Spec.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n37 - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n38, err := m.Status.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n38 - return i, nil -} - -func (m *JobCondition) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *JobCondition) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Type))) - i += copy(data[i:], m.Type) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Status))) - i += copy(data[i:], m.Status) - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(m.LastProbeTime.Size())) - n39, err := m.LastProbeTime.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n39 - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) - n40, err := m.LastTransitionTime.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n40 - data[i] = 0x2a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) - i += copy(data[i:], m.Reason) - data[i] = 0x32 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Message))) - i += copy(data[i:], m.Message) - return i, nil -} - -func (m *JobList) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *JobList) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n41, err := m.ListMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n41 - if len(m.Items) > 0 { - for _, msg := range m.Items { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *JobSpec) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *JobSpec) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Parallelism != nil { - data[i] = 0x8 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.Parallelism)) - } - if m.Completions != nil { - data[i] = 0x10 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.Completions)) - } - if m.ActiveDeadlineSeconds != nil { - data[i] = 0x18 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.ActiveDeadlineSeconds)) - } - if m.Selector != nil { - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Selector.Size())) - n42, err := m.Selector.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n42 - } - if m.AutoSelector != nil { - data[i] = 0x28 - i++ - if *m.AutoSelector { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - data[i] = 0x32 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) - n43, err := m.Template.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n43 - return i, nil -} - -func (m *JobStatus) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *JobStatus) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Conditions) > 0 { - for _, msg := range m.Conditions { - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.StartTime != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.StartTime.Size())) - n44, err := m.StartTime.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n44 - } - if m.CompletionTime != nil { - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(m.CompletionTime.Size())) - n45, err := m.CompletionTime.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n45 - } - data[i] = 0x20 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Active)) - data[i] = 0x28 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Succeeded)) - data[i] = 0x30 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Failed)) - return i, nil -} - -func (m *LabelSelector) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *LabelSelector) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.MatchLabels) > 0 { - for k := range m.MatchLabels { - data[i] = 0xa - i++ - v := m.MatchLabels[k] - mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - i = encodeVarintGenerated(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.MatchExpressions) > 0 { - for _, msg := range m.MatchExpressions { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *LabelSelectorRequirement) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *LabelSelectorRequirement) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Key))) - i += copy(data[i:], m.Key) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Operator))) - i += copy(data[i:], m.Operator) - if len(m.Values) > 0 { - for _, s := range m.Values { - data[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - return i, nil -} - -func (m *ListOptions) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ListOptions) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.LabelSelector))) - i += copy(data[i:], m.LabelSelector) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.FieldSelector))) - i += copy(data[i:], m.FieldSelector) - data[i] = 0x18 - i++ - if m.Watch { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.ResourceVersion))) - i += copy(data[i:], m.ResourceVersion) - if m.TimeoutSeconds != nil { - data[i] = 0x28 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.TimeoutSeconds)) - } - return i, nil -} - func (m *NetworkPolicy) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -2093,19 +1545,19 @@ func (m *NetworkPolicy) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n46, err := m.ObjectMeta.MarshalTo(data[i:]) + n33, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n46 + i += n33 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n47, err := m.Spec.MarshalTo(data[i:]) + n34, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n47 + i += n34 return i, nil } @@ -2169,11 +1621,11 @@ func (m *NetworkPolicyList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n48, err := m.ListMeta.MarshalTo(data[i:]) + n35, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n48 + i += n35 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -2208,21 +1660,21 @@ func (m *NetworkPolicyPeer) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.PodSelector.Size())) - n49, err := m.PodSelector.MarshalTo(data[i:]) + n36, err := m.PodSelector.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n49 + i += n36 } if m.NamespaceSelector != nil { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.NamespaceSelector.Size())) - n50, err := m.NamespaceSelector.MarshalTo(data[i:]) + n37, err := m.NamespaceSelector.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n50 + i += n37 } return i, nil } @@ -2252,11 +1704,11 @@ func (m *NetworkPolicyPort) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Port.Size())) - n51, err := m.Port.MarshalTo(data[i:]) + n38, err := m.Port.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n51 + i += n38 } return i, nil } @@ -2279,11 +1731,11 @@ func (m *NetworkPolicySpec) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.PodSelector.Size())) - n52, err := m.PodSelector.MarshalTo(data[i:]) + n39, err := m.PodSelector.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n52 + i += n39 if len(m.Ingress) > 0 { for _, msg := range m.Ingress { data[i] = 0x12 @@ -2317,19 +1769,19 @@ func (m *PodSecurityPolicy) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n53, err := m.ObjectMeta.MarshalTo(data[i:]) + n40, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n53 + i += n40 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n54, err := m.Spec.MarshalTo(data[i:]) + n41, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n54 + i += n41 return i, nil } @@ -2351,11 +1803,11 @@ func (m *PodSecurityPolicyList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n55, err := m.ListMeta.MarshalTo(data[i:]) + n42, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n55 + i += n42 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -2493,35 +1945,35 @@ func (m *PodSecurityPolicySpec) MarshalTo(data []byte) (int, error) { data[i] = 0x52 i++ i = encodeVarintGenerated(data, i, uint64(m.SELinux.Size())) - n56, err := m.SELinux.MarshalTo(data[i:]) + n43, err := m.SELinux.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n56 + i += n43 data[i] = 0x5a i++ i = encodeVarintGenerated(data, i, uint64(m.RunAsUser.Size())) - n57, err := m.RunAsUser.MarshalTo(data[i:]) + n44, err := m.RunAsUser.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n57 + i += n44 data[i] = 0x62 i++ i = encodeVarintGenerated(data, i, uint64(m.SupplementalGroups.Size())) - n58, err := m.SupplementalGroups.MarshalTo(data[i:]) + n45, err := m.SupplementalGroups.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n58 + i += n45 data[i] = 0x6a i++ i = encodeVarintGenerated(data, i, uint64(m.FSGroup.Size())) - n59, err := m.FSGroup.MarshalTo(data[i:]) + n46, err := m.FSGroup.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n59 + i += n46 data[i] = 0x70 i++ if m.ReadOnlyRootFilesystem { @@ -2551,27 +2003,69 @@ func (m *ReplicaSet) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n60, err := m.ObjectMeta.MarshalTo(data[i:]) + n47, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n60 + i += n47 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n61, err := m.Spec.MarshalTo(data[i:]) + n48, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n61 + i += n48 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n62, err := m.Status.MarshalTo(data[i:]) + n49, err := m.Status.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n62 + i += n49 + return i, nil +} + +func (m *ReplicaSetCondition) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ReplicaSetCondition) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Status))) + i += copy(data[i:], m.Status) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) + n50, err := m.LastTransitionTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n50 + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) + i += copy(data[i:], m.Reason) + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Message))) + i += copy(data[i:], m.Message) return i, nil } @@ -2593,11 +2087,11 @@ func (m *ReplicaSetList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n63, err := m.ListMeta.MarshalTo(data[i:]) + n51, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n63 + i += n51 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -2637,20 +2131,23 @@ func (m *ReplicaSetSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Selector.Size())) - n64, err := m.Selector.MarshalTo(data[i:]) + n52, err := m.Selector.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n64 + i += n52 } data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) - n65, err := m.Template.MarshalTo(data[i:]) + n53, err := m.Template.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n65 + i += n53 + data[i] = 0x20 + i++ + i = encodeVarintGenerated(data, i, uint64(m.MinReadySeconds)) return i, nil } @@ -2681,6 +2178,21 @@ func (m *ReplicaSetStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x20 i++ i = encodeVarintGenerated(data, i, uint64(m.ReadyReplicas)) + data[i] = 0x28 + i++ + i = encodeVarintGenerated(data, i, uint64(m.AvailableReplicas)) + if len(m.Conditions) > 0 { + for _, msg := range m.Conditions { + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -2723,6 +2235,34 @@ func (m *RollbackConfig) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *RollingUpdateDaemonSet) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RollingUpdateDaemonSet) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MaxUnavailable != nil { + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.MaxUnavailable.Size())) + n54, err := m.MaxUnavailable.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n54 + } + return i, nil +} + func (m *RollingUpdateDeployment) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -2742,21 +2282,21 @@ func (m *RollingUpdateDeployment) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.MaxUnavailable.Size())) - n66, err := m.MaxUnavailable.MarshalTo(data[i:]) + n55, err := m.MaxUnavailable.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n66 + i += n55 } if m.MaxSurge != nil { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.MaxSurge.Size())) - n67, err := m.MaxSurge.MarshalTo(data[i:]) + n56, err := m.MaxSurge.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n67 + i += n56 } return i, nil } @@ -2818,11 +2358,11 @@ func (m *SELinuxStrategyOptions) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.SELinuxOptions.Size())) - n68, err := m.SELinuxOptions.MarshalTo(data[i:]) + n57, err := m.SELinuxOptions.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n68 + i += n57 } return i, nil } @@ -2845,27 +2385,27 @@ func (m *Scale) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n69, err := m.ObjectMeta.MarshalTo(data[i:]) + n58, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n69 + i += n58 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n70, err := m.Spec.MarshalTo(data[i:]) + n59, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n70 + i += n59 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n71, err := m.Status.MarshalTo(data[i:]) + n60, err := m.Status.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n71 + i += n60 return i, nil } @@ -2932,40 +2472,6 @@ func (m *ScaleStatus) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *SubresourceReference) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *SubresourceReference) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) - i += copy(data[i:], m.Kind) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Name))) - i += copy(data[i:], m.Name) - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.APIVersion))) - i += copy(data[i:], m.APIVersion) - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Subresource))) - i += copy(data[i:], m.Subresource) - return i, nil -} - func (m *SupplementalGroupsStrategyOptions) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -3018,11 +2524,11 @@ func (m *ThirdPartyResource) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n72, err := m.ObjectMeta.MarshalTo(data[i:]) + n61, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n72 + i += n61 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(len(m.Description))) @@ -3060,11 +2566,11 @@ func (m *ThirdPartyResourceData) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n73, err := m.ObjectMeta.MarshalTo(data[i:]) + n62, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n73 + i += n62 if m.Data != nil { data[i] = 0x12 i++ @@ -3092,11 +2598,11 @@ func (m *ThirdPartyResourceDataList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n74, err := m.ListMeta.MarshalTo(data[i:]) + n63, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n74 + i += n63 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -3130,11 +2636,11 @@ func (m *ThirdPartyResourceList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n75, err := m.ListMeta.MarshalTo(data[i:]) + n64, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n75 + i += n64 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -3185,13 +2691,6 @@ func (m *APIVersion) Size() (n int) { return n } -func (m *CPUTargetUtilization) Size() (n int) { - var l int - _ = l - n += 1 + sovGenerated(uint64(m.TargetPercentage)) - return n -} - func (m *CustomMetricCurrentStatus) Size() (n int) { var l int _ = l @@ -3271,6 +2770,10 @@ func (m *DaemonSetSpec) Size() (n int) { } l = m.Template.Size() n += 1 + l + sovGenerated(uint64(l)) + l = m.UpdateStrategy.Size() + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.MinReadySeconds)) + n += 1 + sovGenerated(uint64(m.TemplateGeneration)) return n } @@ -3280,6 +2783,23 @@ func (m *DaemonSetStatus) Size() (n int) { n += 1 + sovGenerated(uint64(m.CurrentNumberScheduled)) n += 1 + sovGenerated(uint64(m.NumberMisscheduled)) n += 1 + sovGenerated(uint64(m.DesiredNumberScheduled)) + n += 1 + sovGenerated(uint64(m.NumberReady)) + n += 1 + sovGenerated(uint64(m.ObservedGeneration)) + n += 1 + sovGenerated(uint64(m.UpdatedNumberScheduled)) + n += 1 + sovGenerated(uint64(m.NumberAvailable)) + n += 1 + sovGenerated(uint64(m.NumberUnavailable)) + return n +} + +func (m *DaemonSetUpdateStrategy) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + if m.RollingUpdate != nil { + l = m.RollingUpdate.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -3295,6 +2815,24 @@ func (m *Deployment) Size() (n int) { return n } +func (m *DeploymentCondition) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Status) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + l = m.LastUpdateTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.LastTransitionTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *DeploymentList) Size() (n int) { var l int _ = l @@ -3350,6 +2888,9 @@ func (m *DeploymentSpec) Size() (n int) { l = m.RollbackTo.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.ProgressDeadlineSeconds != nil { + n += 1 + sovGenerated(uint64(*m.ProgressDeadlineSeconds)) + } return n } @@ -3361,6 +2902,13 @@ func (m *DeploymentStatus) Size() (n int) { n += 1 + sovGenerated(uint64(m.UpdatedReplicas)) n += 1 + sovGenerated(uint64(m.AvailableReplicas)) n += 1 + sovGenerated(uint64(m.UnavailableReplicas)) + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + n += 1 + sovGenerated(uint64(m.ReadyReplicas)) return n } @@ -3376,14 +2924,6 @@ func (m *DeploymentStrategy) Size() (n int) { return n } -func (m *ExportOptions) Size() (n int) { - var l int - _ = l - n += 2 - n += 2 - return n -} - func (m *FSGroupStrategyOptions) Size() (n int) { var l int _ = l @@ -3420,66 +2960,6 @@ func (m *HTTPIngressRuleValue) Size() (n int) { return n } -func (m *HorizontalPodAutoscaler) Size() (n int) { - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *HorizontalPodAutoscalerList) Size() (n int) { - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *HorizontalPodAutoscalerSpec) Size() (n int) { - var l int - _ = l - l = m.ScaleRef.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.MinReplicas != nil { - n += 1 + sovGenerated(uint64(*m.MinReplicas)) - } - n += 1 + sovGenerated(uint64(m.MaxReplicas)) - if m.CPUUtilization != nil { - l = m.CPUUtilization.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *HorizontalPodAutoscalerStatus) Size() (n int) { - var l int - _ = l - if m.ObservedGeneration != nil { - n += 1 + sovGenerated(uint64(*m.ObservedGeneration)) - } - if m.LastScaleTime != nil { - l = m.LastScaleTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 1 + sovGenerated(uint64(m.CurrentReplicas)) - n += 1 + sovGenerated(uint64(m.DesiredReplicas)) - if m.CurrentCPUUtilizationPercentage != nil { - n += 1 + sovGenerated(uint64(*m.CurrentCPUUtilizationPercentage)) - } - return n -} - func (m *HostPortRange) Size() (n int) { var l int _ = l @@ -3596,149 +3076,6 @@ func (m *IngressTLS) Size() (n int) { return n } -func (m *Job) Size() (n int) { - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *JobCondition) Size() (n int) { - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastProbeTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastTransitionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *JobList) Size() (n int) { - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *JobSpec) Size() (n int) { - var l int - _ = l - if m.Parallelism != nil { - n += 1 + sovGenerated(uint64(*m.Parallelism)) - } - if m.Completions != nil { - n += 1 + sovGenerated(uint64(*m.Completions)) - } - if m.ActiveDeadlineSeconds != nil { - n += 1 + sovGenerated(uint64(*m.ActiveDeadlineSeconds)) - } - if m.Selector != nil { - l = m.Selector.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.AutoSelector != nil { - n += 2 - } - l = m.Template.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *JobStatus) Size() (n int) { - var l int - _ = l - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.StartTime != nil { - l = m.StartTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.CompletionTime != nil { - l = m.CompletionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 1 + sovGenerated(uint64(m.Active)) - n += 1 + sovGenerated(uint64(m.Succeeded)) - n += 1 + sovGenerated(uint64(m.Failed)) - return n -} - -func (m *LabelSelector) Size() (n int) { - var l int - _ = l - if len(m.MatchLabels) > 0 { - for k, v := range m.MatchLabels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.MatchExpressions) > 0 { - for _, e := range m.MatchExpressions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *LabelSelectorRequirement) Size() (n int) { - var l int - _ = l - l = len(m.Key) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Operator) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Values) > 0 { - for _, s := range m.Values { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ListOptions) Size() (n int) { - var l int - _ = l - l = len(m.LabelSelector) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.FieldSelector) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - l = len(m.ResourceVersion) - n += 1 + l + sovGenerated(uint64(l)) - if m.TimeoutSeconds != nil { - n += 1 + sovGenerated(uint64(*m.TimeoutSeconds)) - } - return n -} - func (m *NetworkPolicy) Size() (n int) { var l int _ = l @@ -3908,6 +3245,22 @@ func (m *ReplicaSet) Size() (n int) { return n } +func (m *ReplicaSetCondition) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Status) + n += 1 + l + sovGenerated(uint64(l)) + l = m.LastTransitionTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *ReplicaSetList) Size() (n int) { var l int _ = l @@ -3934,6 +3287,7 @@ func (m *ReplicaSetSpec) Size() (n int) { } l = m.Template.Size() n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.MinReadySeconds)) return n } @@ -3944,6 +3298,13 @@ func (m *ReplicaSetStatus) Size() (n int) { n += 1 + sovGenerated(uint64(m.FullyLabeledReplicas)) n += 1 + sovGenerated(uint64(m.ObservedGeneration)) n += 1 + sovGenerated(uint64(m.ReadyReplicas)) + n += 1 + sovGenerated(uint64(m.AvailableReplicas)) + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -3960,6 +3321,16 @@ func (m *RollbackConfig) Size() (n int) { return n } +func (m *RollingUpdateDaemonSet) Size() (n int) { + var l int + _ = l + if m.MaxUnavailable != nil { + l = m.MaxUnavailable.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *RollingUpdateDeployment) Size() (n int) { var l int _ = l @@ -4036,20 +3407,6 @@ func (m *ScaleStatus) Size() (n int) { return n } -func (m *SubresourceReference) Size() (n int) { - var l int - _ = l - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.APIVersion) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Subresource) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - func (m *SupplementalGroupsStrategyOptions) Size() (n int) { var l int _ = l @@ -4143,23 +3500,13 @@ func (this *APIVersion) String() string { }, "") return s } -func (this *CPUTargetUtilization) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CPUTargetUtilization{`, - `TargetPercentage:` + fmt.Sprintf("%v", this.TargetPercentage) + `,`, - `}`, - }, "") - return s -} func (this *CustomMetricCurrentStatus) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&CustomMetricCurrentStatus{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_kubernetes_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, + `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -4180,7 +3527,7 @@ func (this *CustomMetricTarget) String() string { } s := strings.Join([]string{`&CustomMetricTarget{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_kubernetes_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, + `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -4200,7 +3547,7 @@ func (this *DaemonSet) String() string { return "nil" } s := strings.Join([]string{`&DaemonSet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DaemonSetSpec", "DaemonSetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DaemonSetStatus", "DaemonSetStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4212,7 +3559,7 @@ func (this *DaemonSetList) String() string { return "nil" } s := strings.Join([]string{`&DaemonSetList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "DaemonSet", "DaemonSet", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4223,8 +3570,11 @@ func (this *DaemonSetSpec) String() string { return "nil" } s := strings.Join([]string{`&DaemonSetSpec{`, - `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "LabelSelector", 1) + `,`, + `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`, + `UpdateStrategy:` + strings.Replace(strings.Replace(this.UpdateStrategy.String(), "DaemonSetUpdateStrategy", "DaemonSetUpdateStrategy", 1), `&`, ``, 1) + `,`, + `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`, + `TemplateGeneration:` + fmt.Sprintf("%v", this.TemplateGeneration) + `,`, `}`, }, "") return s @@ -4237,6 +3587,22 @@ func (this *DaemonSetStatus) String() string { `CurrentNumberScheduled:` + fmt.Sprintf("%v", this.CurrentNumberScheduled) + `,`, `NumberMisscheduled:` + fmt.Sprintf("%v", this.NumberMisscheduled) + `,`, `DesiredNumberScheduled:` + fmt.Sprintf("%v", this.DesiredNumberScheduled) + `,`, + `NumberReady:` + fmt.Sprintf("%v", this.NumberReady) + `,`, + `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, + `UpdatedNumberScheduled:` + fmt.Sprintf("%v", this.UpdatedNumberScheduled) + `,`, + `NumberAvailable:` + fmt.Sprintf("%v", this.NumberAvailable) + `,`, + `NumberUnavailable:` + fmt.Sprintf("%v", this.NumberUnavailable) + `,`, + `}`, + }, "") + return s +} +func (this *DaemonSetUpdateStrategy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DaemonSetUpdateStrategy{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDaemonSet", "RollingUpdateDaemonSet", 1) + `,`, `}`, }, "") return s @@ -4246,19 +3612,34 @@ func (this *Deployment) String() string { return "nil" } s := strings.Join([]string{`&Deployment{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentSpec", "DeploymentSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeploymentStatus", "DeploymentStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } +func (this *DeploymentCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeploymentCondition{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, + `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} func (this *DeploymentList) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&DeploymentList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Deployment", "Deployment", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4292,13 +3673,14 @@ func (this *DeploymentSpec) String() string { } s := strings.Join([]string{`&DeploymentSpec{`, `Replicas:` + valueToStringGenerated(this.Replicas) + `,`, - `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "LabelSelector", 1) + `,`, + `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`, `Strategy:` + strings.Replace(strings.Replace(this.Strategy.String(), "DeploymentStrategy", "DeploymentStrategy", 1), `&`, ``, 1) + `,`, `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`, `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`, `Paused:` + fmt.Sprintf("%v", this.Paused) + `,`, `RollbackTo:` + strings.Replace(fmt.Sprintf("%v", this.RollbackTo), "RollbackConfig", "RollbackConfig", 1) + `,`, + `ProgressDeadlineSeconds:` + valueToStringGenerated(this.ProgressDeadlineSeconds) + `,`, `}`, }, "") return s @@ -4313,6 +3695,8 @@ func (this *DeploymentStatus) String() string { `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`, `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`, `UnavailableReplicas:` + fmt.Sprintf("%v", this.UnavailableReplicas) + `,`, + `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "DeploymentCondition", "DeploymentCondition", 1), `&`, ``, 1) + `,`, + `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`, `}`, }, "") return s @@ -4328,17 +3712,6 @@ func (this *DeploymentStrategy) String() string { }, "") return s } -func (this *ExportOptions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ExportOptions{`, - `Export:` + fmt.Sprintf("%v", this.Export) + `,`, - `Exact:` + fmt.Sprintf("%v", this.Exact) + `,`, - `}`, - }, "") - return s -} func (this *FSGroupStrategyOptions) String() string { if this == nil { return "nil" @@ -4371,56 +3744,6 @@ func (this *HTTPIngressRuleValue) String() string { }, "") return s } -func (this *HorizontalPodAutoscaler) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HorizontalPodAutoscaler{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *HorizontalPodAutoscalerList) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HorizontalPodAutoscalerList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *HorizontalPodAutoscalerSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HorizontalPodAutoscalerSpec{`, - `ScaleRef:` + strings.Replace(strings.Replace(this.ScaleRef.String(), "SubresourceReference", "SubresourceReference", 1), `&`, ``, 1) + `,`, - `MinReplicas:` + valueToStringGenerated(this.MinReplicas) + `,`, - `MaxReplicas:` + fmt.Sprintf("%v", this.MaxReplicas) + `,`, - `CPUUtilization:` + strings.Replace(fmt.Sprintf("%v", this.CPUUtilization), "CPUTargetUtilization", "CPUTargetUtilization", 1) + `,`, - `}`, - }, "") - return s -} -func (this *HorizontalPodAutoscalerStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HorizontalPodAutoscalerStatus{`, - `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`, - `LastScaleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScaleTime), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1) + `,`, - `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`, - `DesiredReplicas:` + fmt.Sprintf("%v", this.DesiredReplicas) + `,`, - `CurrentCPUUtilizationPercentage:` + valueToStringGenerated(this.CurrentCPUUtilizationPercentage) + `,`, - `}`, - }, "") - return s -} func (this *HostPortRange) String() string { if this == nil { return "nil" @@ -4448,7 +3771,7 @@ func (this *Ingress) String() string { return "nil" } s := strings.Join([]string{`&Ingress{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "IngressSpec", "IngressSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "IngressStatus", "IngressStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4461,7 +3784,7 @@ func (this *IngressBackend) String() string { } s := strings.Join([]string{`&IngressBackend{`, `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`, - `ServicePort:` + strings.Replace(strings.Replace(this.ServicePort.String(), "IntOrString", "k8s_io_kubernetes_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`, + `ServicePort:` + strings.Replace(strings.Replace(this.ServicePort.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -4471,7 +3794,7 @@ func (this *IngressList) String() string { return "nil" } s := strings.Join([]string{`&IngressList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Ingress", "Ingress", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4531,127 +3854,12 @@ func (this *IngressTLS) String() string { }, "") return s } -func (this *Job) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Job{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "JobStatus", "JobStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *JobCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&JobCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastProbeTime:` + strings.Replace(strings.Replace(this.LastProbeTime.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `}`, - }, "") - return s -} -func (this *JobList) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&JobList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Job", "Job", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *JobSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&JobSpec{`, - `Parallelism:` + valueToStringGenerated(this.Parallelism) + `,`, - `Completions:` + valueToStringGenerated(this.Completions) + `,`, - `ActiveDeadlineSeconds:` + valueToStringGenerated(this.ActiveDeadlineSeconds) + `,`, - `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "LabelSelector", 1) + `,`, - `AutoSelector:` + valueToStringGenerated(this.AutoSelector) + `,`, - `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *JobStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&JobStatus{`, - `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "JobCondition", "JobCondition", 1), `&`, ``, 1) + `,`, - `StartTime:` + strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1) + `,`, - `CompletionTime:` + strings.Replace(fmt.Sprintf("%v", this.CompletionTime), "Time", "k8s_io_kubernetes_pkg_api_unversioned.Time", 1) + `,`, - `Active:` + fmt.Sprintf("%v", this.Active) + `,`, - `Succeeded:` + fmt.Sprintf("%v", this.Succeeded) + `,`, - `Failed:` + fmt.Sprintf("%v", this.Failed) + `,`, - `}`, - }, "") - return s -} -func (this *LabelSelector) String() string { - if this == nil { - return "nil" - } - keysForMatchLabels := make([]string, 0, len(this.MatchLabels)) - for k := range this.MatchLabels { - keysForMatchLabels = append(keysForMatchLabels, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMatchLabels) - mapStringForMatchLabels := "map[string]string{" - for _, k := range keysForMatchLabels { - mapStringForMatchLabels += fmt.Sprintf("%v: %v,", k, this.MatchLabels[k]) - } - mapStringForMatchLabels += "}" - s := strings.Join([]string{`&LabelSelector{`, - `MatchLabels:` + mapStringForMatchLabels + `,`, - `MatchExpressions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MatchExpressions), "LabelSelectorRequirement", "LabelSelectorRequirement", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *LabelSelectorRequirement) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LabelSelectorRequirement{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`, - `Values:` + fmt.Sprintf("%v", this.Values) + `,`, - `}`, - }, "") - return s -} -func (this *ListOptions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ListOptions{`, - `LabelSelector:` + fmt.Sprintf("%v", this.LabelSelector) + `,`, - `FieldSelector:` + fmt.Sprintf("%v", this.FieldSelector) + `,`, - `Watch:` + fmt.Sprintf("%v", this.Watch) + `,`, - `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, - `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, - `}`, - }, "") - return s -} func (this *NetworkPolicy) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&NetworkPolicy{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NetworkPolicySpec", "NetworkPolicySpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4673,7 +3881,7 @@ func (this *NetworkPolicyList) String() string { return "nil" } s := strings.Join([]string{`&NetworkPolicyList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "NetworkPolicy", "NetworkPolicy", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4684,8 +3892,8 @@ func (this *NetworkPolicyPeer) String() string { return "nil" } s := strings.Join([]string{`&NetworkPolicyPeer{`, - `PodSelector:` + strings.Replace(fmt.Sprintf("%v", this.PodSelector), "LabelSelector", "LabelSelector", 1) + `,`, - `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "LabelSelector", 1) + `,`, + `PodSelector:` + strings.Replace(fmt.Sprintf("%v", this.PodSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, + `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, `}`, }, "") return s @@ -4696,7 +3904,7 @@ func (this *NetworkPolicyPort) String() string { } s := strings.Join([]string{`&NetworkPolicyPort{`, `Protocol:` + valueToStringGenerated(this.Protocol) + `,`, - `Port:` + strings.Replace(fmt.Sprintf("%v", this.Port), "IntOrString", "k8s_io_kubernetes_pkg_util_intstr.IntOrString", 1) + `,`, + `Port:` + strings.Replace(fmt.Sprintf("%v", this.Port), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`, `}`, }, "") return s @@ -4706,7 +3914,7 @@ func (this *NetworkPolicySpec) String() string { return "nil" } s := strings.Join([]string{`&NetworkPolicySpec{`, - `PodSelector:` + strings.Replace(strings.Replace(this.PodSelector.String(), "LabelSelector", "LabelSelector", 1), `&`, ``, 1) + `,`, + `PodSelector:` + strings.Replace(strings.Replace(this.PodSelector.String(), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`, `Ingress:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ingress), "NetworkPolicyIngressRule", "NetworkPolicyIngressRule", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4717,7 +3925,7 @@ func (this *PodSecurityPolicy) String() string { return "nil" } s := strings.Join([]string{`&PodSecurityPolicy{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSecurityPolicySpec", "PodSecurityPolicySpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4728,7 +3936,7 @@ func (this *PodSecurityPolicyList) String() string { return "nil" } s := strings.Join([]string{`&PodSecurityPolicyList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodSecurityPolicy", "PodSecurityPolicy", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4762,19 +3970,33 @@ func (this *ReplicaSet) String() string { return "nil" } s := strings.Join([]string{`&ReplicaSet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicaSetSpec", "ReplicaSetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicaSetStatus", "ReplicaSetStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } +func (this *ReplicaSetCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ReplicaSetCondition{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `}`, + }, "") + return s +} func (this *ReplicaSetList) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ReplicaSetList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ReplicaSet", "ReplicaSet", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4786,8 +4008,9 @@ func (this *ReplicaSetSpec) String() string { } s := strings.Join([]string{`&ReplicaSetSpec{`, `Replicas:` + valueToStringGenerated(this.Replicas) + `,`, - `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "LabelSelector", 1) + `,`, + `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`, + `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`, `}`, }, "") return s @@ -4801,6 +4024,8 @@ func (this *ReplicaSetStatus) String() string { `FullyLabeledReplicas:` + fmt.Sprintf("%v", this.FullyLabeledReplicas) + `,`, `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`, + `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`, + `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ReplicaSetCondition", "ReplicaSetCondition", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -4824,13 +4049,23 @@ func (this *RollbackConfig) String() string { }, "") return s } +func (this *RollingUpdateDaemonSet) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RollingUpdateDaemonSet{`, + `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`, + `}`, + }, "") + return s +} func (this *RollingUpdateDeployment) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&RollingUpdateDeployment{`, - `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_kubernetes_pkg_util_intstr.IntOrString", 1) + `,`, - `MaxSurge:` + strings.Replace(fmt.Sprintf("%v", this.MaxSurge), "IntOrString", "k8s_io_kubernetes_pkg_util_intstr.IntOrString", 1) + `,`, + `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`, + `MaxSurge:` + strings.Replace(fmt.Sprintf("%v", this.MaxSurge), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`, `}`, }, "") return s @@ -4862,7 +4097,7 @@ func (this *Scale) String() string { return "nil" } s := strings.Join([]string{`&Scale{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4901,19 +4136,6 @@ func (this *ScaleStatus) String() string { }, "") return s } -func (this *SubresourceReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SubresourceReference{`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, - `Subresource:` + fmt.Sprintf("%v", this.Subresource) + `,`, - `}`, - }, "") - return s -} func (this *SupplementalGroupsStrategyOptions) String() string { if this == nil { return "nil" @@ -4930,7 +4152,7 @@ func (this *ThirdPartyResource) String() string { return "nil" } s := strings.Join([]string{`&ThirdPartyResource{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Description:` + fmt.Sprintf("%v", this.Description) + `,`, `Versions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Versions), "APIVersion", "APIVersion", 1), `&`, ``, 1) + `,`, `}`, @@ -4942,7 +4164,7 @@ func (this *ThirdPartyResourceData) String() string { return "nil" } s := strings.Join([]string{`&ThirdPartyResourceData{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Data:` + valueToStringGenerated(this.Data) + `,`, `}`, }, "") @@ -4953,7 +4175,7 @@ func (this *ThirdPartyResourceDataList) String() string { return "nil" } s := strings.Join([]string{`&ThirdPartyResourceDataList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ThirdPartyResourceData", "ThirdPartyResourceData", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4964,7 +4186,7 @@ func (this *ThirdPartyResourceList) String() string { return "nil" } s := strings.Join([]string{`&ThirdPartyResourceList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ThirdPartyResource", "ThirdPartyResource", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -5057,75 +4279,6 @@ func (m *APIVersion) Unmarshal(data []byte) error { } return nil } -func (m *CPUTargetUtilization) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CPUTargetUtilization: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CPUTargetUtilization: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetPercentage", wireType) - } - m.TargetPercentage = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.TargetPercentage |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *CustomMetricCurrentStatus) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -5813,7 +4966,7 @@ func (m *DaemonSetSpec) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.Selector == nil { - m.Selector = &LabelSelector{} + m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} } if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -5849,6 +5002,74 @@ func (m *DaemonSetSpec) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateStrategy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UpdateStrategy.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType) + } + m.MinReadySeconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.MinReadySeconds |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TemplateGeneration", wireType) + } + m.TemplateGeneration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.TemplateGeneration |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -5956,6 +5177,213 @@ func (m *DaemonSetStatus) Unmarshal(data []byte) error { break } } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumberReady", wireType) + } + m.NumberReady = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.NumberReady |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) + } + m.ObservedGeneration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.ObservedGeneration |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdatedNumberScheduled", wireType) + } + m.UpdatedNumberScheduled = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.UpdatedNumberScheduled |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumberAvailable", wireType) + } + m.NumberAvailable = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.NumberAvailable |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumberUnavailable", wireType) + } + m.NumberUnavailable = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.NumberUnavailable |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DaemonSetUpdateStrategy) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DaemonSetUpdateStrategy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DaemonSetUpdateStrategy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = DaemonSetUpdateStrategyType(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RollingUpdate == nil { + m.RollingUpdate = &RollingUpdateDaemonSet{} + } + if err := m.RollingUpdate.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -6117,6 +5545,232 @@ func (m *Deployment) Unmarshal(data []byte) error { } return nil } +func (m *DeploymentCondition) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeploymentCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeploymentCondition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = DeploymentConditionType(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastUpdateTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTransitionTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *DeploymentList) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -6524,7 +6178,7 @@ func (m *DeploymentSpec) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.Selector == nil { - m.Selector = &LabelSelector{} + m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} } if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -6682,6 +6336,26 @@ func (m *DeploymentSpec) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProgressDeadlineSeconds", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ProgressDeadlineSeconds = &v default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -6827,6 +6501,56 @@ func (m *DeploymentStatus) Unmarshal(data []byte) error { break } } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, DeploymentCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType) + } + m.ReadyReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.ReadyReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -6960,96 +6684,6 @@ func (m *DeploymentStrategy) Unmarshal(data []byte) error { } return nil } -func (m *ExportOptions) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Export", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Export = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exact", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Exact = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *FSGroupStrategyOptions) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -7350,570 +6984,6 @@ func (m *HTTPIngressRuleValue) Unmarshal(data []byte) error { } return nil } -func (m *HorizontalPodAutoscaler) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HorizontalPodAutoscalerList) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HorizontalPodAutoscalerList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HorizontalPodAutoscalerList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, HorizontalPodAutoscaler{}) - if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HorizontalPodAutoscalerSpec) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScaleRef", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ScaleRef.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinReplicas", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MinReplicas = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxReplicas", wireType) - } - m.MaxReplicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.MaxReplicas |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CPUUtilization", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CPUUtilization == nil { - m.CPUUtilization = &CPUTargetUtilization{} - } - if err := m.CPUUtilization.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HorizontalPodAutoscalerStatus) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ObservedGeneration = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastScaleTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastScaleTime == nil { - m.LastScaleTime = &k8s_io_kubernetes_pkg_api_unversioned.Time{} - } - if err := m.LastScaleTime.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType) - } - m.CurrentReplicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.CurrentReplicas |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DesiredReplicas", wireType) - } - m.DesiredReplicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.DesiredReplicas |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentCPUUtilizationPercentage", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.CurrentCPUUtilizationPercentage = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *HostPortRange) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -8975,1387 +8045,6 @@ func (m *IngressTLS) Unmarshal(data []byte) error { } return nil } -func (m *Job) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Job: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Job: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JobCondition) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JobCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JobCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = JobConditionType(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastProbeTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastProbeTime.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTransitionTime.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JobList) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JobList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JobList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Job{}) - if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JobSpec) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JobSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JobSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Parallelism", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Parallelism = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Completions", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Completions = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActiveDeadlineSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ActiveDeadlineSeconds = &v - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Selector == nil { - m.Selector = &LabelSelector{} - } - if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AutoSelector", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.AutoSelector = &b - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Template.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JobStatus) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JobStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JobStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, JobCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StartTime == nil { - m.StartTime = &k8s_io_kubernetes_pkg_api_unversioned.Time{} - } - if err := m.StartTime.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CompletionTime == nil { - m.CompletionTime = &k8s_io_kubernetes_pkg_api_unversioned.Time{} - } - if err := m.CompletionTime.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType) - } - m.Active = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Active |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Succeeded", wireType) - } - m.Succeeded = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Succeeded |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Failed", wireType) - } - m.Failed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Failed |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LabelSelector) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LabelSelector: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LabelSelector: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchLabels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.MatchLabels == nil { - m.MatchLabels = make(map[string]string) - } - m.MatchLabels[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchExpressions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MatchExpressions = append(m.MatchExpressions, LabelSelectorRequirement{}) - if err := m.MatchExpressions[len(m.MatchExpressions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LabelSelectorRequirement) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LabelSelectorRequirement: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LabelSelectorRequirement: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Operator = LabelSelectorOperator(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Values = append(m.Values, string(data[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListOptions) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LabelSelector = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldSelector", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldSelector = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Watch", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Watch = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceVersion = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TimeoutSeconds = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *NetworkPolicy) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -10745,7 +8434,7 @@ func (m *NetworkPolicyPeer) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.PodSelector == nil { - m.PodSelector = &LabelSelector{} + m.PodSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} } if err := m.PodSelector.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -10778,7 +8467,7 @@ func (m *NetworkPolicyPeer) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.NamespaceSelector == nil { - m.NamespaceSelector = &LabelSelector{} + m.NamespaceSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} } if err := m.NamespaceSelector.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -10891,7 +8580,7 @@ func (m *NetworkPolicyPort) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.Port == nil { - m.Port = &k8s_io_kubernetes_pkg_util_intstr.IntOrString{} + m.Port = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{} } if err := m.Port.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -11807,6 +9496,202 @@ func (m *ReplicaSet) Unmarshal(data []byte) error { } return nil } +func (m *ReplicaSetCondition) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReplicaSetCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReplicaSetCondition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = ReplicaSetConditionType(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTransitionTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ReplicaSetList) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -11994,7 +9879,7 @@ func (m *ReplicaSetSpec) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.Selector == nil { - m.Selector = &LabelSelector{} + m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} } if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -12030,6 +9915,25 @@ func (m *ReplicaSetSpec) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType) + } + m.MinReadySeconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.MinReadySeconds |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -12156,6 +10060,56 @@ func (m *ReplicaSetStatus) Unmarshal(data []byte) error { break } } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType) + } + m.AvailableReplicas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.AvailableReplicas |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, ReplicaSetCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -12296,6 +10250,89 @@ func (m *RollbackConfig) Unmarshal(data []byte) error { } return nil } +func (m *RollingUpdateDaemonSet) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RollingUpdateDaemonSet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RollingUpdateDaemonSet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MaxUnavailable == nil { + m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{} + } + if err := m.MaxUnavailable.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *RollingUpdateDeployment) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -12352,7 +10389,7 @@ func (m *RollingUpdateDeployment) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.MaxUnavailable == nil { - m.MaxUnavailable = &k8s_io_kubernetes_pkg_util_intstr.IntOrString{} + m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{} } if err := m.MaxUnavailable.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -12385,7 +10422,7 @@ func (m *RollingUpdateDeployment) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.MaxSurge == nil { - m.MaxSurge = &k8s_io_kubernetes_pkg_util_intstr.IntOrString{} + m.MaxSurge = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{} } if err := m.MaxSurge.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -13052,172 +11089,6 @@ func (m *ScaleStatus) Unmarshal(data []byte) error { } return nil } -func (m *SubresourceReference) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SubresourceReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SubresourceReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.APIVersion = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subresource", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subresource = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *SupplementalGroupsStrategyOptions) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -13907,251 +11778,216 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 3921 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe4, 0x1b, 0x4d, 0x8f, 0x1c, 0x47, - 0x35, 0x33, 0xb3, 0x1f, 0x33, 0xb5, 0x1f, 0x5e, 0x97, 0xd7, 0xf6, 0x64, 0x93, 0xd8, 0x49, 0x47, - 0x84, 0x44, 0xc4, 0xb3, 0xd8, 0x24, 0xc1, 0x71, 0x12, 0x27, 0x3b, 0xfb, 0x61, 0x3b, 0xd9, 0xb5, - 0x27, 0x35, 0x6b, 0x27, 0xe4, 0x93, 0xde, 0x99, 0xda, 0xd9, 0xf6, 0xf6, 0x4c, 0x4f, 0xfa, 0x63, - 0xbd, 0x13, 0x84, 0x08, 0x02, 0x24, 0x2e, 0x09, 0xb9, 0x11, 0x09, 0x38, 0x20, 0x81, 0x38, 0x20, - 0x22, 0x90, 0x90, 0x72, 0xe0, 0x02, 0x48, 0x08, 0x73, 0x40, 0x04, 0x04, 0x82, 0x0b, 0x09, 0x04, - 0x41, 0xc4, 0x5f, 0x08, 0x48, 0xf0, 0xaa, 0xba, 0xba, 0xbb, 0xaa, 0xa7, 0x7b, 0xec, 0x99, 0xfd, - 0x90, 0x10, 0x87, 0x95, 0xdd, 0xf5, 0x3e, 0xeb, 0xd5, 0xab, 0xf7, 0x5e, 0x55, 0xbd, 0x41, 0x8f, - 0x6d, 0x9e, 0x76, 0x4a, 0x86, 0x35, 0xbb, 0xe9, 0xad, 0x51, 0xbb, 0x45, 0x5d, 0xea, 0xcc, 0xb6, - 0x37, 0x1b, 0xb3, 0x7a, 0xdb, 0x70, 0x66, 0xe9, 0xb6, 0x4b, 0x5b, 0x8e, 0x61, 0xb5, 0x9c, 0xd9, - 0xad, 0x93, 0x6b, 0xd4, 0xd5, 0x4f, 0xce, 0x36, 0x68, 0x8b, 0xda, 0xba, 0x4b, 0xeb, 0xa5, 0xb6, - 0x6d, 0xb9, 0x16, 0x3e, 0xe1, 0x93, 0x97, 0x22, 0xf2, 0x12, 0x90, 0x97, 0x18, 0x79, 0x29, 0x22, - 0x2f, 0x09, 0xf2, 0x99, 0x13, 0x0d, 0xc3, 0xdd, 0xf0, 0xd6, 0x4a, 0x35, 0xab, 0x39, 0xdb, 0xb0, - 0x1a, 0xd6, 0x2c, 0xe7, 0xb2, 0xe6, 0xad, 0xf3, 0x2f, 0xfe, 0xc1, 0xff, 0xe7, 0x73, 0x9f, 0x39, - 0x95, 0xaa, 0xdc, 0xac, 0x4d, 0x1d, 0xcb, 0xb3, 0x6b, 0x34, 0xae, 0xd1, 0xcc, 0x83, 0xe9, 0x34, - 0x5e, 0x6b, 0x8b, 0xda, 0x4c, 0x21, 0x5a, 0xef, 0x22, 0xbb, 0x3f, 0x9d, 0x6c, 0xab, 0x6b, 0xda, - 0x33, 0x27, 0x92, 0xb1, 0x6d, 0xaf, 0xe5, 0x1a, 0xcd, 0x6e, 0x9d, 0x4e, 0x26, 0xa3, 0x7b, 0xae, - 0x61, 0xce, 0x1a, 0x2d, 0xd7, 0x71, 0xed, 0x38, 0x89, 0x56, 0x42, 0x68, 0xae, 0x72, 0xe1, 0x8a, - 0xaf, 0x2f, 0xbe, 0x13, 0x0d, 0xb5, 0xf4, 0x26, 0x2d, 0x66, 0xee, 0xcc, 0xdc, 0x5b, 0x28, 0x8f, - 0x5f, 0x7f, 0xef, 0xf8, 0x2d, 0x1f, 0xbc, 0x77, 0x7c, 0xe8, 0x22, 0x8c, 0x11, 0x0e, 0xd1, 0x5e, - 0x40, 0xd3, 0xf3, 0x95, 0xcb, 0xab, 0xba, 0xdd, 0xa0, 0xee, 0x65, 0xe0, 0x6b, 0xbc, 0xaa, 0xbb, - 0x8c, 0x72, 0x01, 0x4d, 0xb9, 0x7c, 0xb0, 0x42, 0xc1, 0x5a, 0x2d, 0x57, 0x6f, 0xf8, 0x5c, 0x86, - 0xcb, 0x45, 0xc1, 0x65, 0x6a, 0x35, 0x06, 0x27, 0x5d, 0x14, 0xda, 0xd7, 0x33, 0xe8, 0xd6, 0x79, - 0xcf, 0x71, 0xad, 0xe6, 0x0a, 0x75, 0x6d, 0xa3, 0x36, 0xef, 0xd9, 0x36, 0x80, 0xaa, 0xae, 0xee, - 0x7a, 0xce, 0x8d, 0xb5, 0xc3, 0xcf, 0xa2, 0xe1, 0x2d, 0xdd, 0xf4, 0x68, 0x31, 0x0b, 0x28, 0x63, - 0xa7, 0xee, 0x2f, 0xa5, 0xba, 0x4d, 0x29, 0x58, 0xd8, 0xd2, 0xd3, 0x9e, 0x0e, 0xd6, 0x74, 0x3b, - 0xe5, 0x69, 0xc1, 0x70, 0x5c, 0x48, 0xbd, 0xc2, 0x38, 0x11, 0x9f, 0xa1, 0xf6, 0x46, 0x06, 0xdd, - 0x91, 0xaa, 0xd9, 0xb2, 0xe1, 0xb8, 0xb8, 0x89, 0x86, 0x0d, 0x97, 0x36, 0x1d, 0x50, 0x2f, 0x07, - 0xb2, 0xcf, 0x97, 0xfa, 0x72, 0xd9, 0x52, 0x2a, 0xf3, 0xf2, 0x84, 0xd0, 0x6b, 0xf8, 0x02, 0x63, - 0x4f, 0x7c, 0x29, 0xda, 0xd7, 0x32, 0x08, 0xcb, 0x34, 0xbe, 0x75, 0x6f, 0xc2, 0x46, 0xcf, 0xec, - 0xc4, 0x46, 0x87, 0x04, 0xc3, 0x31, 0x5f, 0x9c, 0x62, 0xa2, 0xd7, 0x32, 0xe8, 0x48, 0xb7, 0x46, - 0xdc, 0x36, 0xeb, 0xaa, 0x6d, 0xe6, 0x76, 0x60, 0x1b, 0x9f, 0x6b, 0x8a, 0x51, 0x7e, 0x90, 0x45, - 0x85, 0x05, 0x9d, 0x36, 0xad, 0x56, 0x15, 0x6c, 0xf1, 0x2c, 0xca, 0x37, 0x81, 0xbe, 0xae, 0xbb, - 0x3a, 0xb7, 0xc7, 0xd8, 0xa9, 0x7b, 0x7b, 0x4c, 0x76, 0xeb, 0x64, 0xe9, 0xd2, 0xda, 0x55, 0x5a, - 0x73, 0x41, 0x8e, 0x5e, 0xc6, 0x82, 0x3f, 0x8a, 0xc6, 0x48, 0xc8, 0x0d, 0xbf, 0x84, 0x86, 0x9c, - 0x36, 0xad, 0x09, 0x13, 0x3e, 0xda, 0xe7, 0x74, 0x42, 0x0d, 0xab, 0xc0, 0x23, 0x5a, 0x23, 0xf6, - 0x45, 0x38, 0x5f, 0xb0, 0xd7, 0x88, 0xc3, 0x17, 0xbf, 0x98, 0xe3, 0x12, 0xce, 0x0e, 0x2c, 0xc1, - 0x77, 0xa1, 0x49, 0x21, 0x63, 0xc4, 0xff, 0x26, 0x82, 0xbb, 0xf6, 0xeb, 0x0c, 0x9a, 0x08, 0x71, - 0xf9, 0x4a, 0xbd, 0xd8, 0x65, 0xb3, 0xd9, 0x1e, 0x36, 0x93, 0x22, 0x5d, 0x89, 0x91, 0x73, 0xd3, - 0x4d, 0x09, 0x61, 0xf9, 0x60, 0x44, 0x32, 0xdc, 0x8b, 0x81, 0x23, 0x64, 0xb9, 0x23, 0x9c, 0x1e, - 0x74, 0x5e, 0x29, 0xeb, 0xff, 0x7b, 0x79, 0x3e, 0x55, 0xdf, 0x92, 0x79, 0x87, 0x9a, 0xb0, 0x82, - 0x96, 0x2d, 0xe6, 0xd3, 0xef, 0x6a, 0x2d, 0xeb, 0x6b, 0xd4, 0xac, 0x0a, 0x1e, 0xe5, 0x71, 0x36, - 0xb1, 0xe0, 0x8b, 0x84, 0xbc, 0xf1, 0xf3, 0x28, 0x0f, 0x1a, 0xb4, 0x4d, 0x08, 0xad, 0xc2, 0x2b, - 0x4e, 0xf4, 0xf6, 0xb5, 0x8a, 0x55, 0x5f, 0x15, 0x04, 0xdc, 0x0d, 0x42, 0xab, 0x05, 0xa3, 0x24, - 0x64, 0xa8, 0xbd, 0x9e, 0x45, 0x07, 0x62, 0x4b, 0x8a, 0xaf, 0xa0, 0x23, 0x35, 0x3f, 0x4c, 0x5c, - 0xf4, 0x9a, 0x20, 0xa0, 0x5a, 0xdb, 0xa0, 0x75, 0xcf, 0xa4, 0x75, 0x11, 0x76, 0x8f, 0x09, 0x7e, - 0x47, 0xe6, 0x13, 0xb1, 0x48, 0x0a, 0x35, 0x7e, 0x12, 0xe1, 0x16, 0x1f, 0x5a, 0x31, 0x1c, 0x27, - 0xe4, 0x99, 0xe5, 0x3c, 0x67, 0x04, 0x4f, 0x7c, 0xb1, 0x0b, 0x83, 0x24, 0x50, 0x31, 0x1d, 0xeb, - 0xd4, 0x31, 0x6c, 0x5a, 0x8f, 0xeb, 0x98, 0x53, 0x75, 0x5c, 0x48, 0xc4, 0x22, 0x29, 0xd4, 0xda, - 0x0f, 0xb3, 0x08, 0x2d, 0xd0, 0xb6, 0x69, 0x75, 0x9a, 0x30, 0x83, 0x3d, 0xdc, 0xe7, 0x2f, 0x2b, - 0xfb, 0xfc, 0xb1, 0x7e, 0xbd, 0x35, 0x54, 0x31, 0x75, 0xa3, 0x37, 0x62, 0x1b, 0xfd, 0xf1, 0xc1, - 0x45, 0xf4, 0xde, 0xe9, 0xbf, 0xc9, 0xa0, 0xc9, 0x08, 0x79, 0x3f, 0xb6, 0xfa, 0x4b, 0xea, 0x56, - 0x7f, 0x78, 0xe0, 0x99, 0xa5, 0xec, 0xf5, 0xb7, 0x72, 0x08, 0x47, 0x48, 0xc4, 0x32, 0xcd, 0x35, - 0xbd, 0xb6, 0x79, 0x13, 0x09, 0xf0, 0xbb, 0x90, 0x39, 0xbd, 0x76, 0x9d, 0x15, 0x41, 0x73, 0xad, - 0x96, 0xe5, 0xf2, 0x02, 0x26, 0x50, 0xf3, 0x33, 0x03, 0xab, 0x19, 0x68, 0x50, 0xba, 0xdc, 0xc5, - 0x7b, 0xb1, 0xe5, 0xda, 0x9d, 0x68, 0xf7, 0x74, 0x23, 0x90, 0x04, 0x85, 0xf0, 0x2b, 0x08, 0xd9, - 0x82, 0xe7, 0xaa, 0x25, 0xfc, 0xa3, 0x5f, 0x17, 0x0c, 0x94, 0x9a, 0xb7, 0x5a, 0xeb, 0x46, 0x23, - 0xf2, 0x76, 0x12, 0x32, 0x26, 0x92, 0x90, 0x99, 0x45, 0x74, 0x34, 0x45, 0x7b, 0x3c, 0x85, 0x72, - 0x9b, 0xb4, 0xe3, 0x9b, 0x95, 0xb0, 0xff, 0xe2, 0x69, 0xb9, 0x90, 0x28, 0x88, 0x2a, 0xe0, 0x4c, - 0xf6, 0x74, 0x46, 0x7b, 0x6b, 0x58, 0x76, 0x36, 0x1e, 0x87, 0xef, 0x45, 0x79, 0x1b, 0x46, 0x8c, - 0x9a, 0xee, 0x88, 0x00, 0xc5, 0x23, 0x29, 0x11, 0x63, 0x24, 0x84, 0x2a, 0x11, 0x3b, 0xbb, 0x4f, - 0x11, 0x3b, 0xb7, 0xcb, 0x11, 0x1b, 0x5b, 0x30, 0x09, 0x97, 0xd5, 0xd9, 0x8d, 0x4e, 0x71, 0x88, - 0x33, 0x9f, 0xdb, 0xc1, 0xce, 0xf6, 0x19, 0x45, 0x02, 0x83, 0x11, 0x12, 0x0a, 0xc1, 0x73, 0xe8, - 0x40, 0xd3, 0x68, 0x11, 0xaa, 0xd7, 0x3b, 0x55, 0x5a, 0xb3, 0x5a, 0x75, 0xa7, 0x38, 0xcc, 0xcd, - 0x7c, 0x54, 0x10, 0x1d, 0x58, 0x51, 0xc1, 0x24, 0x8e, 0x8f, 0x97, 0xd1, 0xb4, 0x4d, 0xb7, 0x0c, - 0xa6, 0xc6, 0x79, 0xd8, 0xce, 0x96, 0xdd, 0x59, 0x36, 0x9a, 0x86, 0x5b, 0x1c, 0xf1, 0xcb, 0x78, - 0xe0, 0x31, 0x4d, 0x12, 0xe0, 0x24, 0x91, 0x0a, 0xdf, 0x83, 0x46, 0xda, 0xba, 0xe7, 0x40, 0xac, - 0x1f, 0x05, 0xfa, 0x7c, 0x14, 0x98, 0x2a, 0x7c, 0x94, 0x08, 0x28, 0x94, 0xcd, 0xb2, 0x97, 0xe7, - 0x77, 0xc3, 0xcb, 0x27, 0xd3, 0x3d, 0x5c, 0xfb, 0x30, 0x8b, 0xa6, 0xe2, 0x41, 0x93, 0xe5, 0x3c, - 0x6b, 0xcd, 0xa1, 0xf6, 0x16, 0xad, 0x9f, 0xf3, 0xcf, 0x47, 0xc0, 0x9e, 0xbb, 0x69, 0x2e, 0xda, - 0xb5, 0x97, 0xba, 0x30, 0x48, 0x02, 0x15, 0xbe, 0x5f, 0x72, 0x74, 0x3f, 0x6b, 0x86, 0xcb, 0x96, - 0xe0, 0xec, 0xb0, 0x6c, 0x62, 0xe7, 0x07, 0x40, 0x91, 0x1a, 0xc3, 0x65, 0xbb, 0xac, 0x82, 0x49, - 0x1c, 0x1f, 0x9f, 0x43, 0x07, 0xf5, 0x2d, 0xdd, 0x30, 0xf5, 0x35, 0x93, 0x86, 0x4c, 0x86, 0x38, - 0x93, 0x5b, 0x05, 0x93, 0x83, 0x73, 0x71, 0x04, 0xd2, 0x4d, 0x83, 0x57, 0xd0, 0x21, 0xaf, 0xd5, - 0xcd, 0xca, 0x77, 0xa3, 0xdb, 0x04, 0xab, 0x43, 0x97, 0xbb, 0x51, 0x48, 0x12, 0x9d, 0xf6, 0xdb, - 0x8c, 0x1c, 0x9f, 0x03, 0x97, 0xc5, 0x67, 0xd0, 0x90, 0xdb, 0x69, 0x07, 0xf1, 0xf9, 0x9e, 0x20, - 0x3e, 0xaf, 0xc2, 0xd8, 0x47, 0xbc, 0x12, 0x88, 0x53, 0x30, 0x08, 0xe1, 0x34, 0xf8, 0x0b, 0x68, - 0x82, 0x2d, 0xa5, 0xd1, 0x6a, 0xf8, 0x56, 0x11, 0xf1, 0x61, 0x69, 0x00, 0x77, 0x09, 0x79, 0x48, - 0x79, 0xe6, 0x20, 0x28, 0x32, 0xa1, 0x00, 0x89, 0x2a, 0x0f, 0x4e, 0xbf, 0x13, 0x8b, 0xdb, 0x6d, - 0xcb, 0x76, 0x2f, 0xb5, 0xfd, 0x18, 0x0d, 0x5e, 0x4e, 0xf9, 0x00, 0x9f, 0x8f, 0xe4, 0xe5, 0x3e, - 0x1a, 0x11, 0x50, 0x7c, 0x37, 0x1a, 0xa6, 0xdb, 0x7a, 0xcd, 0xe5, 0x1a, 0xe7, 0xa3, 0x8c, 0xb6, - 0xc8, 0x06, 0x89, 0x0f, 0xd3, 0x7e, 0x04, 0x07, 0xa8, 0xa5, 0xea, 0x39, 0xdb, 0xf2, 0xda, 0xc1, - 0xe4, 0x03, 0x39, 0x9f, 0x46, 0x43, 0x36, 0x94, 0x3e, 0xc2, 0x6a, 0x77, 0x07, 0x56, 0x23, 0x30, - 0x06, 0x56, 0x3b, 0x14, 0xa3, 0xf2, 0x4d, 0xc6, 0x08, 0x20, 0x0b, 0x8f, 0xd8, 0x7a, 0xab, 0x41, - 0x83, 0xfc, 0xf6, 0x50, 0x9f, 0xb6, 0xba, 0xb0, 0x40, 0x18, 0x79, 0x34, 0x31, 0xfe, 0x09, 0x75, - 0x85, 0xcf, 0x55, 0xfb, 0x56, 0x06, 0x1d, 0x38, 0xbf, 0xba, 0x5a, 0xb9, 0xd0, 0x6a, 0xc0, 0x69, - 0xd1, 0xa9, 0xe8, 0xee, 0x06, 0x4b, 0xc1, 0x6d, 0xf8, 0x37, 0x9e, 0x82, 0x19, 0x8c, 0x70, 0x08, - 0xde, 0x40, 0xa3, 0x6c, 0x3f, 0xd2, 0x56, 0x7d, 0xc0, 0xd2, 0x4a, 0x88, 0x2b, 0xfb, 0x4c, 0xca, - 0x07, 0x84, 0x8c, 0x51, 0x31, 0x40, 0x02, 0xf6, 0xda, 0xe7, 0xd0, 0xb4, 0xa4, 0x1e, 0xb3, 0x17, - 0x3f, 0xb3, 0xe2, 0x1a, 0x1a, 0x66, 0x9a, 0x04, 0x27, 0xd2, 0x7e, 0x0f, 0x58, 0xb1, 0x29, 0x47, - 0x0b, 0xca, 0xbe, 0xa0, 0x44, 0xe1, 0xbc, 0xb5, 0x3f, 0x66, 0xd1, 0xd1, 0xf3, 0x96, 0x6d, 0xbc, - 0x6a, 0xb5, 0x5c, 0xdd, 0x84, 0xfc, 0x31, 0xe7, 0xb9, 0x96, 0x53, 0xd3, 0x4d, 0x6a, 0xef, 0x61, - 0xd1, 0x6a, 0x2a, 0x45, 0xeb, 0x93, 0xfd, 0xce, 0x2c, 0x59, 0xdf, 0xd4, 0x0a, 0xd6, 0x8d, 0x55, - 0xb0, 0xcb, 0xbb, 0x24, 0xaf, 0x77, 0x39, 0xfb, 0xcf, 0x0c, 0xba, 0x2d, 0x85, 0x72, 0x3f, 0x6a, - 0xdb, 0x4d, 0xb5, 0xb6, 0x5d, 0xda, 0x9d, 0x39, 0xa7, 0x14, 0xba, 0xff, 0xca, 0xa6, 0xce, 0x95, - 0x97, 0x56, 0xaf, 0x40, 0xad, 0xc1, 0xbe, 0x08, 0x5d, 0x17, 0x73, 0x9d, 0xef, 0x53, 0x9f, 0xaa, - 0xb7, 0x16, 0x5c, 0xf5, 0x00, 0x13, 0x0a, 0xc7, 0xc2, 0x1a, 0x95, 0xaa, 0x0d, 0xc1, 0x9c, 0x84, - 0x62, 0xf0, 0x49, 0x34, 0xc6, 0xab, 0x07, 0x25, 0xcf, 0x1d, 0x60, 0xf7, 0x42, 0x2b, 0xd1, 0x30, - 0x91, 0x71, 0xf0, 0x83, 0x40, 0xa2, 0x6f, 0xc7, 0xb2, 0x5c, 0x78, 0x9d, 0xb4, 0x12, 0x81, 0x88, - 0x8c, 0x07, 0x21, 0x7f, 0xb2, 0xd6, 0xf6, 0xa4, 0x9b, 0x46, 0x51, 0x4e, 0xf5, 0x3b, 0xc5, 0xa4, - 0x4b, 0xcb, 0x32, 0x06, 0xd1, 0x93, 0x00, 0x91, 0xc6, 0x48, 0x4c, 0x9c, 0xf6, 0xf3, 0x1c, 0xba, - 0xa3, 0xa7, 0x8f, 0xe2, 0xa5, 0x1e, 0xd5, 0xc3, 0x91, 0x3e, 0x2a, 0x87, 0x3a, 0x9a, 0x30, 0x75, - 0xc7, 0xe5, 0xe6, 0x5e, 0x35, 0x9a, 0x41, 0x76, 0xfb, 0xc4, 0x4d, 0x3a, 0x2e, 0x23, 0xf1, 0x53, - 0xd8, 0xb2, 0xcc, 0x85, 0xa8, 0x4c, 0x59, 0xc5, 0x21, 0x4e, 0xfe, 0x69, 0x15, 0xc7, 0xbc, 0x0a, - 0x26, 0x71, 0x7c, 0xc6, 0x42, 0x1c, 0xcc, 0x63, 0xf5, 0x46, 0xc8, 0x62, 0x41, 0x05, 0x93, 0x38, - 0x3e, 0x54, 0x7d, 0xc7, 0x05, 0x57, 0xd5, 0xfc, 0xd2, 0xed, 0xb1, 0x5f, 0x77, 0xdc, 0x0d, 0xec, - 0x8e, 0xcf, 0xf7, 0x46, 0x25, 0x37, 0xe2, 0xa5, 0xad, 0xa0, 0x89, 0xf3, 0x96, 0xe3, 0x56, 0x58, - 0x4a, 0x66, 0x79, 0x0b, 0xdf, 0x81, 0x72, 0xe0, 0x9c, 0xe2, 0x24, 0x32, 0x26, 0xd4, 0xce, 0x31, - 0xe7, 0x65, 0xe3, 0x1c, 0xac, 0x6f, 0x0b, 0xbf, 0x8e, 0xc0, 0xe0, 0x97, 0x6c, 0x5c, 0x3b, 0x87, - 0x46, 0x45, 0x5e, 0x94, 0x19, 0xe5, 0x7a, 0x33, 0xca, 0x25, 0x30, 0xfa, 0x5e, 0x16, 0x38, 0xf9, - 0x69, 0x64, 0x0f, 0x13, 0xc2, 0x0b, 0x4a, 0x42, 0x38, 0x33, 0x58, 0xaa, 0x4d, 0x4d, 0x00, 0xf5, - 0x58, 0x02, 0x78, 0x74, 0x40, 0xfe, 0xbd, 0x03, 0xfe, 0xdb, 0x19, 0x34, 0xa9, 0x26, 0x7d, 0x16, - 0x51, 0xd8, 0x1e, 0x32, 0x6a, 0xf4, 0x62, 0x74, 0xe0, 0x0f, 0x23, 0x4a, 0x35, 0x02, 0x11, 0x19, - 0x0f, 0xd3, 0x90, 0x8c, 0xb9, 0x83, 0x30, 0x4a, 0x29, 0x45, 0x69, 0xf6, 0x74, 0x52, 0xf2, 0x9f, - 0x4e, 0x40, 0x51, 0xf7, 0x12, 0xec, 0x79, 0x1b, 0xca, 0xc1, 0x2e, 0x31, 0xdc, 0xb3, 0x64, 0xbe, - 0xda, 0xaf, 0x32, 0x68, 0x4c, 0x28, 0xbc, 0x1f, 0x19, 0xe9, 0x79, 0x35, 0x23, 0x3d, 0x34, 0x60, - 0x3d, 0x95, 0x9c, 0x81, 0xde, 0x89, 0xe6, 0xc2, 0x2a, 0x28, 0x56, 0xe0, 0x6d, 0xc0, 0x76, 0x8a, - 0x17, 0x78, 0x6c, 0x8b, 0x11, 0x0e, 0xc1, 0x5f, 0xc9, 0xa0, 0x29, 0x23, 0x56, 0x73, 0x09, 0x53, - 0x3f, 0x3e, 0x98, 0x6a, 0x21, 0x9b, 0xe8, 0x41, 0x29, 0x0e, 0x21, 0x5d, 0x22, 0x35, 0x0f, 0x75, - 0x61, 0x61, 0x1d, 0xb4, 0x77, 0xdd, 0xf6, 0x80, 0xb9, 0x32, 0xa9, 0x9a, 0x2c, 0xe7, 0xf9, 0xf4, - 0x01, 0x42, 0x38, 0x6b, 0xed, 0xed, 0x6c, 0x68, 0xb0, 0xaa, 0xbf, 0x47, 0xc2, 0x7a, 0x37, 0xb3, - 0x1b, 0xf5, 0xee, 0x58, 0x52, 0xad, 0x0b, 0x11, 0x24, 0xe7, 0x9a, 0x83, 0xde, 0xb7, 0x09, 0x09, - 0xab, 0xcb, 0xd5, 0x28, 0x4e, 0xc1, 0x07, 0x61, 0x2c, 0xf1, 0xcb, 0x68, 0x98, 0x9d, 0x26, 0xd8, - 0x16, 0xcf, 0x0d, 0x1e, 0x42, 0x98, 0xbd, 0x22, 0x0f, 0x63, 0x5f, 0xe0, 0x61, 0x9c, 0x2f, 0x94, - 0xe9, 0x13, 0x4a, 0x1c, 0xc0, 0x57, 0xd1, 0xb8, 0x69, 0xe9, 0xf5, 0xb2, 0x6e, 0xea, 0x50, 0x8c, - 0x04, 0x77, 0xf7, 0x9f, 0xec, 0x1d, 0x11, 0x97, 0x25, 0x0a, 0x11, 0x4f, 0xc2, 0x47, 0x3d, 0x19, - 0x46, 0x14, 0xde, 0x9a, 0x8e, 0x50, 0x34, 0x7b, 0x7c, 0x1c, 0x0d, 0x33, 0x17, 0xf6, 0x4f, 0x06, - 0x85, 0x72, 0x81, 0xe9, 0xca, 0x3c, 0x1b, 0x74, 0xe5, 0xe3, 0xf8, 0x14, 0x42, 0x0e, 0xad, 0xd9, - 0xd4, 0xe5, 0x61, 0x87, 0x5f, 0x7e, 0x45, 0x01, 0xb8, 0x1a, 0x42, 0x88, 0x84, 0xa5, 0x7d, 0x23, - 0x8b, 0x72, 0x4f, 0x5a, 0x6b, 0x7b, 0x18, 0xe4, 0x9f, 0x55, 0x82, 0x7c, 0xbf, 0xfb, 0x1f, 0x74, - 0x4b, 0x0d, 0xf0, 0x9f, 0x8d, 0x05, 0xf8, 0xd3, 0x03, 0xf0, 0xee, 0x1d, 0xdc, 0x7f, 0x97, 0x43, - 0xe3, 0x80, 0x35, 0x6f, 0xb5, 0xea, 0x06, 0x2f, 0x85, 0x1e, 0x50, 0x2e, 0x09, 0xee, 0x8c, 0x5d, - 0x12, 0x4c, 0xc9, 0xb8, 0xd2, 0xf5, 0xc0, 0x95, 0x50, 0x51, 0x7f, 0x51, 0xce, 0xaa, 0xe2, 0x80, - 0xb2, 0xe7, 0xeb, 0x7b, 0x29, 0xe4, 0xa9, 0xaa, 0x07, 0xa7, 0x55, 0x5e, 0x43, 0x55, 0x6c, 0x6b, - 0xcd, 0x2f, 0xcc, 0x72, 0xfd, 0x17, 0x66, 0x87, 0x85, 0x2e, 0xbc, 0x38, 0x0b, 0x39, 0x11, 0x95, - 0x31, 0xbe, 0x86, 0x30, 0x1b, 0x58, 0x85, 0xc3, 0xb5, 0xe3, 0xcf, 0x8e, 0x89, 0x1b, 0xea, 0x5f, - 0x5c, 0x78, 0x6b, 0xb5, 0xdc, 0xc5, 0x8e, 0x24, 0x88, 0x60, 0xf7, 0x18, 0x36, 0xd5, 0x1d, 0xa8, - 0x5b, 0x87, 0xb9, 0xe9, 0xa2, 0xe3, 0x3e, 0x1f, 0x25, 0x02, 0x8a, 0xef, 0x43, 0xa3, 0x4d, 0xd8, - 0x27, 0xac, 0x3e, 0x1b, 0xe1, 0x88, 0xe1, 0xc9, 0x7b, 0xc5, 0x1f, 0x26, 0x01, 0x5c, 0xfb, 0x59, - 0x06, 0x8d, 0xc2, 0x42, 0xed, 0x47, 0xf2, 0x7b, 0x46, 0x4d, 0x7e, 0xa7, 0xfa, 0x77, 0xd0, 0x94, - 0xc4, 0xf7, 0x93, 0x1c, 0x9f, 0x03, 0x8f, 0xe1, 0x70, 0xe6, 0x69, 0xeb, 0xb6, 0x6e, 0x9a, 0xd4, - 0x34, 0x9c, 0xa6, 0x28, 0x1d, 0xf9, 0x99, 0xa7, 0x12, 0x0d, 0x13, 0x19, 0x87, 0x91, 0xd4, 0xac, - 0x66, 0xdb, 0xa4, 0xc1, 0x0b, 0x43, 0x48, 0x32, 0x1f, 0x0d, 0x13, 0x19, 0x07, 0x5f, 0x42, 0x87, - 0xf5, 0x9a, 0x6b, 0x6c, 0xd1, 0x05, 0xaa, 0xd7, 0x4d, 0xa3, 0x45, 0x83, 0xdb, 0xdc, 0x1c, 0x2f, - 0x21, 0x6f, 0x05, 0xe2, 0xc3, 0x73, 0x49, 0x08, 0x24, 0x99, 0x4e, 0xb9, 0x4e, 0x1f, 0xda, 0xc3, - 0xeb, 0xf4, 0x07, 0xd0, 0xb8, 0x0e, 0x27, 0xa3, 0x00, 0xc2, 0xfd, 0x28, 0x5f, 0x9e, 0x62, 0xa1, - 0x77, 0x4e, 0x1a, 0x27, 0x0a, 0x96, 0x72, 0x09, 0x3f, 0xb2, 0xdb, 0xcf, 0xa6, 0x3f, 0xcd, 0xa1, - 0x42, 0x18, 0x7c, 0xb0, 0x85, 0x50, 0x2d, 0xd8, 0xe0, 0xc1, 0xb5, 0xcf, 0x23, 0xfd, 0x7b, 0x4a, - 0x18, 0x24, 0xa2, 0x78, 0x1c, 0x0e, 0x39, 0x44, 0x12, 0x01, 0x11, 0xb9, 0x00, 0x01, 0xc4, 0x76, - 0x07, 0x3d, 0xcb, 0x4d, 0x00, 0xef, 0x42, 0x35, 0xe0, 0x40, 0x22, 0x66, 0xb8, 0x01, 0x87, 0xe2, - 0xd0, 0x67, 0x06, 0x8d, 0x48, 0xfe, 0xe1, 0x57, 0x61, 0x43, 0x62, 0x6c, 0x59, 0x58, 0xf0, 0xbd, - 0x4a, 0x1c, 0xf0, 0xc2, 0xb0, 0xe0, 0xbb, 0x20, 0x11, 0x50, 0x3c, 0x0b, 0x53, 0xf5, 0x6a, 0x35, - 0x4a, 0xeb, 0xb4, 0x2e, 0x0e, 0x6e, 0x07, 0x05, 0x6a, 0xa1, 0x1a, 0x00, 0x48, 0x84, 0xc3, 0x18, - 0xaf, 0xeb, 0x06, 0x7b, 0x09, 0x1e, 0x51, 0x19, 0x2f, 0xf1, 0x51, 0x22, 0xa0, 0xda, 0x3f, 0xb2, - 0x68, 0x42, 0xf1, 0x3f, 0xfc, 0xe5, 0x0c, 0xbb, 0x48, 0x70, 0x6b, 0x1b, 0x7c, 0x38, 0x58, 0xc8, - 0x95, 0x9d, 0xf8, 0x74, 0x69, 0x25, 0xe2, 0xe7, 0x3f, 0xd5, 0x49, 0xf7, 0x12, 0x21, 0x84, 0xc8, - 0x62, 0xf1, 0xeb, 0x50, 0xe0, 0xf2, 0xef, 0xc5, 0xed, 0x36, 0xab, 0x1c, 0xa4, 0x27, 0xc4, 0x73, - 0x3b, 0xd1, 0x85, 0xd0, 0x57, 0x3c, 0x38, 0x29, 0xf3, 0xfb, 0xe8, 0xb0, 0xd0, 0x5d, 0x89, 0x09, - 0x22, 0x5d, 0xa2, 0x67, 0xce, 0xa2, 0xa9, 0xf8, 0x2c, 0xfa, 0x7a, 0xb2, 0xfb, 0x4e, 0x06, 0x15, - 0xd3, 0x14, 0x61, 0xa7, 0xd8, 0x90, 0x51, 0x54, 0x1d, 0x3e, 0x45, 0x3b, 0x3e, 0xd7, 0x45, 0x94, - 0xb7, 0xda, 0xec, 0x16, 0x43, 0xbc, 0xd8, 0x15, 0xca, 0xf7, 0x05, 0xbb, 0xf2, 0x92, 0x18, 0x87, - 0xdc, 0x7b, 0x58, 0x61, 0x1f, 0x00, 0x48, 0x48, 0x8a, 0x35, 0x34, 0xc2, 0xf5, 0xf1, 0xab, 0xcc, - 0x42, 0x19, 0x31, 0x7f, 0xe0, 0xf5, 0x35, 0xa4, 0x62, 0x1f, 0xa2, 0x7d, 0x1f, 0x0a, 0x6b, 0x96, - 0x00, 0x82, 0x7b, 0xf1, 0x47, 0x58, 0x6a, 0x96, 0xd8, 0x0a, 0x1d, 0xa5, 0x6c, 0x2b, 0x4f, 0x49, - 0xc5, 0x65, 0xc4, 0xeb, 0x06, 0x35, 0xeb, 0x55, 0xf9, 0xb9, 0x51, 0x22, 0x5e, 0x92, 0x81, 0x44, - 0xc5, 0x65, 0x37, 0xfa, 0xd7, 0x98, 0xc1, 0xf9, 0xd6, 0x93, 0x6e, 0xf4, 0x9f, 0x61, 0x83, 0xc4, - 0x87, 0xb1, 0x9b, 0x92, 0xe0, 0x62, 0x4d, 0xb4, 0xd8, 0xf1, 0x8d, 0x54, 0x88, 0x6e, 0x4a, 0x88, - 0x0a, 0x26, 0x71, 0x7c, 0x7c, 0x06, 0x4d, 0xb2, 0x5e, 0x3f, 0xcb, 0x73, 0xe5, 0x77, 0xbd, 0x9c, - 0xbf, 0x7d, 0x57, 0x15, 0x08, 0x89, 0x61, 0xf2, 0xf6, 0x9e, 0x8b, 0xd4, 0xbd, 0x66, 0xd9, 0x9b, - 0x15, 0xcb, 0x34, 0x6a, 0x9d, 0x3d, 0xac, 0x3f, 0xd7, 0x94, 0xfa, 0xf3, 0x89, 0x3e, 0xf7, 0x80, - 0xa2, 0x65, 0x5a, 0x25, 0xaa, 0xfd, 0x1d, 0x9c, 0x54, 0xc1, 0x94, 0x0f, 0xa5, 0x14, 0x0d, 0xb3, - 0xa7, 0x96, 0x20, 0x22, 0xec, 0x48, 0x03, 0x76, 0x82, 0x97, 0xee, 0xf4, 0x19, 0x5b, 0xe2, 0x73, - 0x67, 0xf3, 0x5c, 0xb7, 0xad, 0xa6, 0xd8, 0xeb, 0x3b, 0x93, 0x42, 0xa9, 0x1d, 0xcd, 0x73, 0x09, - 0xb8, 0x12, 0xce, 0x5b, 0xfb, 0x43, 0x06, 0x1d, 0x54, 0x30, 0xf7, 0xa3, 0x88, 0xd2, 0xd5, 0x22, - 0xea, 0xd1, 0x9d, 0xcc, 0x2c, 0xa5, 0x9c, 0xfa, 0x6a, 0x36, 0x36, 0x2f, 0x66, 0x01, 0x48, 0xcc, - 0x63, 0x6d, 0xab, 0x5e, 0xdd, 0xcd, 0x2e, 0x2d, 0xbf, 0x2c, 0x8b, 0x98, 0x12, 0x59, 0x02, 0xfe, - 0x22, 0x98, 0x97, 0x75, 0x82, 0x38, 0x6d, 0xbd, 0x46, 0xab, 0xbb, 0xd9, 0x6b, 0x70, 0x98, 0x3d, - 0xb6, 0x5e, 0x8c, 0xb3, 0x26, 0xdd, 0xd2, 0xb4, 0x1f, 0xc7, 0x97, 0x98, 0x39, 0x19, 0x7e, 0x1a, - 0xe5, 0x79, 0x5b, 0x6e, 0xcd, 0x32, 0x45, 0x24, 0x7b, 0x90, 0xad, 0x56, 0x45, 0x8c, 0x41, 0x14, - 0xfd, 0x58, 0xcf, 0x13, 0x4c, 0x80, 0x48, 0x42, 0x36, 0x78, 0x19, 0x0d, 0xb5, 0x07, 0xbf, 0xe7, - 0xe2, 0x17, 0x1b, 0xfc, 0x72, 0x8b, 0x73, 0xd1, 0xfe, 0x1d, 0x57, 0x9b, 0x97, 0xc6, 0xce, 0xee, - 0xaf, 0x60, 0x98, 0x81, 0x53, 0x57, 0xd1, 0x46, 0xa3, 0xe2, 0xba, 0x67, 0xc0, 0xbc, 0x9b, 0x16, - 0x49, 0xa2, 0x33, 0x4d, 0x30, 0x18, 0x08, 0xe2, 0x1b, 0x93, 0x2b, 0x54, 0xf3, 0x6c, 0xc3, 0xed, - 0xec, 0x79, 0x50, 0x5d, 0x57, 0x82, 0xea, 0x42, 0x9f, 0x13, 0xec, 0xd2, 0x34, 0x35, 0xb0, 0xfe, - 0x39, 0x83, 0x0e, 0x77, 0x61, 0xef, 0x47, 0xd0, 0xa1, 0x6a, 0xd0, 0x79, 0x62, 0xa7, 0x33, 0x4c, - 0x09, 0x3c, 0xd7, 0x51, 0xc2, 0xfc, 0xb8, 0xeb, 0x9e, 0x42, 0xa8, 0x6d, 0x1b, 0x5b, 0x50, 0x6c, - 0x36, 0x44, 0xeb, 0x64, 0x3e, 0x5a, 0x93, 0x4a, 0x08, 0x21, 0x12, 0x16, 0xfe, 0x3c, 0x6b, 0x6b, - 0x5c, 0xd7, 0x3d, 0xd3, 0x9d, 0xab, 0xd7, 0xe7, 0xf5, 0xb6, 0xbe, 0x66, 0x98, 0x50, 0xf3, 0x8b, - 0x37, 0xf6, 0x42, 0x79, 0xd1, 0x6f, 0x69, 0x4c, 0xc2, 0x80, 0x1d, 0xfc, 0xf1, 0xde, 0x77, 0x10, - 0x01, 0x72, 0x87, 0xa4, 0x08, 0xc1, 0x5f, 0x82, 0x2c, 0x68, 0xfb, 0xd5, 0x59, 0x7d, 0xc1, 0xb6, - 0xda, 0x8a, 0x06, 0x7e, 0xe9, 0x74, 0x0e, 0x34, 0x28, 0x92, 0x14, 0x9c, 0x7e, 0x74, 0x48, 0x15, - 0x84, 0x5d, 0x74, 0x08, 0xce, 0xb9, 0xd6, 0x35, 0xaa, 0x5a, 0x60, 0x88, 0xcb, 0x2f, 0xb3, 0x4e, - 0x91, 0xb9, 0x6e, 0x70, 0x3f, 0xa2, 0x93, 0xd8, 0xc3, 0x41, 0x63, 0x74, 0xcb, 0x32, 0x3d, 0x88, - 0xa6, 0x50, 0x06, 0x31, 0x49, 0x2c, 0xe2, 0x8e, 0x5e, 0xf1, 0x87, 0x3e, 0x62, 0xe7, 0x87, 0x2a, - 0xbf, 0x10, 0x0a, 0xb0, 0xd8, 0x23, 0x01, 0xbb, 0xb5, 0x13, 0x7b, 0x9d, 0x9f, 0x36, 0xf2, 0x51, - 0x70, 0x39, 0x1f, 0x81, 0x88, 0x8c, 0x87, 0x9b, 0xa8, 0xb0, 0x21, 0x1e, 0x8c, 0x9c, 0xe2, 0xe8, - 0x40, 0x09, 0x51, 0x79, 0x70, 0x8a, 0x8e, 0x43, 0xc1, 0xb0, 0x43, 0x22, 0x09, 0xec, 0x5a, 0x85, - 0x7f, 0x5c, 0x58, 0xe0, 0x1d, 0x50, 0xf9, 0x28, 0x04, 0x9d, 0xf7, 0x87, 0x49, 0x00, 0x0f, 0x50, - 0x2f, 0x54, 0xe6, 0x8b, 0x85, 0x6e, 0x54, 0x18, 0x26, 0x01, 0x1c, 0xb7, 0xd1, 0xa8, 0x43, 0x97, - 0x8d, 0x96, 0xb7, 0x5d, 0x44, 0x7c, 0xeb, 0x2e, 0xf6, 0xfb, 0x2e, 0xbc, 0xc8, 0xa9, 0x63, 0xcd, - 0x28, 0x91, 0x44, 0x01, 0x27, 0x81, 0x18, 0xbc, 0x8d, 0x0a, 0xb6, 0xd7, 0x9a, 0x73, 0x2e, 0x3b, - 0xd4, 0x2e, 0x8e, 0x71, 0x99, 0xfd, 0x46, 0x65, 0x12, 0xd0, 0xc7, 0xa5, 0x86, 0x16, 0x0c, 0x31, - 0x48, 0x24, 0x0c, 0x7f, 0x33, 0x83, 0xb0, 0xe3, 0xb5, 0xe1, 0xf0, 0xca, 0x4e, 0x2c, 0xba, 0xc9, - 0xfb, 0x61, 0x9c, 0xe2, 0x38, 0xd7, 0xa1, 0xd2, 0xf7, 0x7b, 0x78, 0x9c, 0x51, 0x5c, 0x99, 0xf0, - 0x7e, 0xad, 0x1b, 0x95, 0x24, 0xe8, 0xc1, 0x96, 0x62, 0xdd, 0xe1, 0xff, 0x2f, 0x4e, 0x0c, 0xb4, - 0x14, 0xc9, 0x7d, 0x41, 0xd1, 0x52, 0x08, 0x38, 0x09, 0xc4, 0xb0, 0xde, 0x6b, 0x9b, 0xea, 0xf5, - 0x4b, 0x2d, 0xb3, 0x43, 0x2c, 0xcb, 0x5d, 0x82, 0xd8, 0xe5, 0x74, 0x1c, 0x88, 0x86, 0xc5, 0x49, - 0xee, 0x36, 0x61, 0xef, 0x35, 0x49, 0xc4, 0x22, 0x29, 0xd4, 0xbc, 0xf7, 0x5a, 0x3c, 0xe3, 0xee, - 0xed, 0x6f, 0x2c, 0x76, 0xd6, 0x7b, 0x1d, 0xa9, 0xb8, 0x67, 0xbd, 0xd7, 0x92, 0x88, 0x1b, 0xf7, - 0x5e, 0x47, 0xc8, 0xff, 0x03, 0xbd, 0xd7, 0x91, 0xb2, 0x29, 0xf9, 0xf4, 0x3f, 0xca, 0x8c, 0xfe, - 0x0f, 0x1b, 0x7c, 0xd9, 0x83, 0xce, 0x54, 0xdc, 0x01, 0x94, 0xde, 0xcf, 0xcc, 0x0d, 0x7b, 0x3f, - 0x2b, 0x68, 0x7a, 0xdd, 0x33, 0xcd, 0x0e, 0x9f, 0x8d, 0xd4, 0x4b, 0xe1, 0x5f, 0x13, 0xdf, 0x2e, - 0x28, 0xa7, 0x97, 0x12, 0x70, 0x48, 0x22, 0x65, 0x4a, 0x1f, 0x6b, 0x6e, 0xa0, 0x3e, 0xd6, 0x47, - 0xd0, 0x04, 0x8b, 0x00, 0x9d, 0x58, 0x8b, 0x47, 0x78, 0x39, 0x42, 0x64, 0x20, 0x51, 0x71, 0xb5, - 0xdb, 0xd1, 0x8c, 0xf8, 0x3f, 0xe3, 0x35, 0x6f, 0xb5, 0x5c, 0xd6, 0x47, 0x49, 0xed, 0x05, 0xaf, - 0xd9, 0xec, 0x68, 0x67, 0xc1, 0x79, 0x94, 0x8e, 0x5d, 0xdf, 0x70, 0x7e, 0x13, 0xb1, 0x68, 0xa5, - 0x90, 0x0c, 0xe7, 0x8f, 0x93, 0x10, 0x43, 0x7b, 0x3f, 0x83, 0x8e, 0xa6, 0xf4, 0x70, 0xe2, 0xab, - 0x68, 0xb2, 0xa9, 0x6f, 0x4b, 0x4d, 0xaa, 0x62, 0x7b, 0xf5, 0x7b, 0xf0, 0xe1, 0xd7, 0x2b, 0x2b, - 0x0a, 0x27, 0x12, 0xe3, 0xcc, 0x63, 0x9f, 0xbe, 0x5d, 0xf5, 0xec, 0x06, 0x1d, 0xf0, 0x78, 0xc5, - 0x5d, 0x77, 0x45, 0xf0, 0x20, 0x21, 0x37, 0xd6, 0x09, 0x5a, 0x4c, 0x4b, 0x84, 0x50, 0xd2, 0xc8, - 0xbd, 0xa0, 0x77, 0xc5, 0x7a, 0x41, 0x0f, 0x76, 0xd1, 0xed, 0x53, 0x27, 0xe8, 0x3b, 0x19, 0x74, - 0x24, 0xb9, 0x60, 0xc0, 0x9f, 0x52, 0x34, 0x3e, 0x1e, 0xd3, 0xf8, 0x40, 0x8c, 0x4a, 0xe8, 0xbb, - 0x81, 0x26, 0x45, 0x59, 0x21, 0xd8, 0xdc, 0xc4, 0x0f, 0x16, 0xb7, 0xc2, 0x9a, 0x25, 0x48, 0x90, - 0x7c, 0x1d, 0xd5, 0x31, 0x12, 0xe3, 0xab, 0x7d, 0x3b, 0x8b, 0x86, 0x79, 0x83, 0xd4, 0x1e, 0x66, - 0xb3, 0xe7, 0x94, 0x6c, 0xd6, 0xef, 0x13, 0x2a, 0xd7, 0x2e, 0x35, 0x91, 0xad, 0xc5, 0x12, 0xd9, - 0x99, 0x81, 0xb8, 0xf7, 0xce, 0x61, 0x0f, 0xa3, 0x42, 0xa8, 0x44, 0x7f, 0x71, 0x8e, 0x55, 0x0c, - 0x63, 0x92, 0x88, 0x3e, 0xa3, 0xe4, 0x96, 0x92, 0x2d, 0x06, 0xf9, 0x65, 0xad, 0x24, 0xbb, 0x14, - 0xa4, 0x09, 0xff, 0x9a, 0x3f, 0x6a, 0x71, 0xec, 0xce, 0x1e, 0x10, 0xa4, 0xfc, 0x9f, 0x27, 0x87, - 0xd7, 0x1a, 0x39, 0xee, 0xbd, 0x47, 0x04, 0xcd, 0xe4, 0xaa, 0x02, 0x25, 0x31, 0xec, 0x19, 0x88, - 0x9f, 0x8a, 0xb0, 0xbe, 0x6e, 0xe3, 0x7f, 0x91, 0x41, 0xd3, 0x49, 0x4d, 0x99, 0xac, 0xf3, 0x66, - 0xd3, 0x10, 0x5d, 0x24, 0x52, 0xe7, 0xcd, 0x53, 0x30, 0x46, 0x38, 0x24, 0xfc, 0xfd, 0x53, 0x36, - 0xf5, 0xf7, 0x4f, 0x70, 0xe4, 0x05, 0x53, 0x05, 0xf7, 0xd1, 0x39, 0xb5, 0x7f, 0x21, 0xfa, 0x31, - 0x38, 0x91, 0xb0, 0x78, 0xaf, 0x55, 0xa4, 0x8f, 0xb8, 0xc4, 0x8e, 0x9a, 0xa0, 0x24, 0x55, 0x65, - 0x3c, 0xed, 0x97, 0x19, 0x74, 0xd7, 0x0d, 0x8b, 0x69, 0x5c, 0x56, 0xc2, 0x43, 0x29, 0x16, 0x1e, - 0x8e, 0xa5, 0x33, 0xd8, 0xc7, 0x3e, 0xf7, 0x37, 0xb2, 0x08, 0xaf, 0x6e, 0x18, 0x76, 0xbd, 0xa2, - 0xdb, 0x70, 0x38, 0x15, 0x13, 0xdc, 0xc3, 0x80, 0x01, 0x16, 0xaf, 0x53, 0xa7, 0x66, 0x1b, 0xdc, - 0x48, 0x62, 0x39, 0x43, 0x8b, 0x2f, 0x44, 0x20, 0x22, 0xe3, 0x41, 0x51, 0x9b, 0x17, 0xb5, 0x62, - 0xd0, 0xac, 0xd3, 0x6f, 0xf1, 0x17, 0x79, 0x40, 0xb4, 0x3f, 0xc4, 0x00, 0xec, 0xcb, 0x80, 0xb9, - 0xf6, 0x26, 0x84, 0xfb, 0x6e, 0x83, 0x2c, 0xf8, 0xad, 0x28, 0x7b, 0x65, 0x94, 0xdb, 0xd1, 0x10, - 0xe7, 0xca, 0xac, 0x31, 0xee, 0x5f, 0x4e, 0x32, 0x89, 0x84, 0x8f, 0x6a, 0x1f, 0x66, 0xd0, 0x4c, - 0xb2, 0x4a, 0xfb, 0x51, 0x73, 0x5f, 0x55, 0x6b, 0xee, 0x7e, 0x0f, 0x78, 0xc9, 0x8a, 0xa7, 0xd4, - 0xdf, 0xef, 0x27, 0x1a, 0x7f, 0x3f, 0x66, 0xb9, 0xae, 0xce, 0x72, 0x6e, 0xc7, 0xb3, 0x4c, 0x9e, - 0x61, 0xf9, 0xbe, 0xeb, 0x7f, 0x3d, 0x76, 0xcb, 0xbb, 0xf0, 0xf7, 0x27, 0xf8, 0x7b, 0xed, 0x83, - 0x63, 0x99, 0xeb, 0xf0, 0xf7, 0x2e, 0xfc, 0xfd, 0x05, 0xfe, 0xde, 0xfc, 0xdb, 0xb1, 0x5b, 0x9e, - 0x1b, 0x15, 0x3c, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x58, 0xd8, 0xcd, 0xc3, 0x5b, 0x44, 0x00, - 0x00, + // 3369 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe4, 0x5b, 0xdb, 0x6f, 0x1b, 0xc7, + 0xd5, 0xf7, 0x8a, 0xa4, 0x45, 0x1d, 0x59, 0x92, 0x35, 0x72, 0x64, 0x46, 0x49, 0x44, 0x67, 0x3f, + 0x7c, 0x89, 0xf3, 0x7d, 0x09, 0xf5, 0xc5, 0xf9, 0x9c, 0x26, 0x4e, 0xe2, 0x44, 0x94, 0x7c, 0x51, + 0x21, 0xc9, 0xcc, 0x90, 0x32, 0x1a, 0xe7, 0xd6, 0x15, 0x39, 0xa2, 0xd6, 0xde, 0x5b, 0x76, 0x67, + 0x15, 0x11, 0x41, 0xdb, 0x00, 0x45, 0xf3, 0x58, 0xb4, 0x2f, 0x45, 0x0a, 0xa4, 0x8f, 0x7d, 0xe8, + 0x4b, 0x9b, 0x3c, 0xb4, 0x69, 0xff, 0x82, 0xfa, 0xa1, 0x28, 0x52, 0xa0, 0x05, 0x8a, 0x22, 0x15, + 0x6a, 0x05, 0xcd, 0x3f, 0xd0, 0xe6, 0xc5, 0x4f, 0xc5, 0xcc, 0xce, 0xde, 0x77, 0x65, 0x93, 0xb2, + 0x89, 0x02, 0x7d, 0xe3, 0xce, 0x9c, 0xf3, 0x3b, 0x97, 0x39, 0x73, 0xe6, 0xcc, 0x85, 0xf0, 0xd2, + 0x8d, 0xe7, 0x9c, 0x9a, 0x6a, 0x2e, 0xdc, 0x70, 0x37, 0x89, 0x6d, 0x10, 0x4a, 0x9c, 0x05, 0xeb, + 0x46, 0x77, 0x41, 0xb1, 0x54, 0x67, 0x81, 0xec, 0x52, 0x62, 0x38, 0xaa, 0x69, 0x38, 0x0b, 0x3b, + 0x4f, 0x6f, 0x12, 0xaa, 0x3c, 0xbd, 0xd0, 0x25, 0x06, 0xb1, 0x15, 0x4a, 0x3a, 0x35, 0xcb, 0x36, + 0xa9, 0x89, 0x9e, 0xf2, 0xd8, 0x6b, 0x21, 0x7b, 0xcd, 0xba, 0xd1, 0xad, 0x31, 0xf6, 0x5a, 0xc8, + 0x5e, 0x13, 0xec, 0x73, 0x4f, 0x75, 0x55, 0xba, 0xed, 0x6e, 0xd6, 0xda, 0xa6, 0xbe, 0xd0, 0x35, + 0xbb, 0xe6, 0x02, 0x47, 0xd9, 0x74, 0xb7, 0xf8, 0x17, 0xff, 0xe0, 0xbf, 0x3c, 0xf4, 0xb9, 0xff, + 0x17, 0xca, 0x29, 0x96, 0xaa, 0x2b, 0xed, 0x6d, 0xd5, 0x20, 0x76, 0xcf, 0x57, 0x6f, 0xc1, 0x26, + 0x8e, 0xe9, 0xda, 0x6d, 0x92, 0xd4, 0xe9, 0x40, 0x2e, 0x67, 0x41, 0x27, 0x54, 0x59, 0xd8, 0x49, + 0x59, 0x32, 0xb7, 0x90, 0xc7, 0x65, 0xbb, 0x06, 0x55, 0xf5, 0xb4, 0x98, 0x67, 0xef, 0xc4, 0xe0, + 0xb4, 0xb7, 0x89, 0xae, 0xa4, 0xf8, 0x9e, 0xc9, 0xe3, 0x73, 0xa9, 0xaa, 0x2d, 0xa8, 0x06, 0x75, + 0xa8, 0x7d, 0x90, 0x4d, 0x0e, 0xb1, 0x77, 0x88, 0x1d, 0x1d, 0x25, 0x45, 0xb7, 0x34, 0x92, 0x65, + 0xd3, 0x93, 0xb9, 0x83, 0x9b, 0x41, 0x2d, 0xd7, 0x00, 0x16, 0x1b, 0x2b, 0x57, 0x89, 0xcd, 0xc6, + 0x0c, 0x9d, 0x82, 0xa2, 0xa1, 0xe8, 0xa4, 0x22, 0x9d, 0x92, 0x4e, 0x8f, 0xd5, 0x8f, 0xdd, 0xdc, + 0xab, 0x1e, 0xd9, 0xdf, 0xab, 0x16, 0xd7, 0x15, 0x9d, 0x60, 0xde, 0x23, 0xff, 0x58, 0x82, 0x07, + 0x97, 0x5c, 0x87, 0x9a, 0xfa, 0x1a, 0xa1, 0xb6, 0xda, 0x5e, 0x72, 0x6d, 0x9b, 0x18, 0xb4, 0x49, + 0x15, 0xea, 0x3a, 0x77, 0xe6, 0x47, 0xd7, 0xa0, 0xb4, 0xa3, 0x68, 0x2e, 0xa9, 0x8c, 0x9c, 0x92, + 0x4e, 0x8f, 0x9f, 0xa9, 0xd5, 0x44, 0x2c, 0x45, 0x1d, 0xe3, 0x47, 0x53, 0xcd, 0x1f, 0xed, 0xda, + 0xab, 0xae, 0x62, 0x50, 0x95, 0xf6, 0xea, 0x27, 0x04, 0xe4, 0x31, 0x21, 0xf7, 0x2a, 0xc3, 0xc2, + 0x1e, 0xa4, 0xfc, 0x7d, 0x09, 0x1e, 0xc9, 0xd5, 0x6d, 0x55, 0x75, 0x28, 0xd2, 0xa1, 0xa4, 0x52, + 0xa2, 0x3b, 0x15, 0xe9, 0x54, 0xe1, 0xf4, 0xf8, 0x99, 0xcb, 0xb5, 0xbe, 0x22, 0xb9, 0x96, 0x0b, + 0x5e, 0x9f, 0x10, 0x7a, 0x95, 0x56, 0x18, 0x3c, 0xf6, 0xa4, 0xc8, 0x3f, 0x94, 0x00, 0x45, 0x79, + 0x5a, 0x8a, 0xdd, 0x25, 0xf4, 0x2e, 0xbc, 0xf4, 0xda, 0xe1, 0xbc, 0x34, 0x23, 0x20, 0xc7, 0x3d, + 0x81, 0x31, 0x27, 0xbd, 0x2f, 0xc1, 0x6c, 0x5a, 0x27, 0xee, 0x9d, 0xad, 0xb8, 0x77, 0x16, 0x0f, + 0xe1, 0x1d, 0x0f, 0x35, 0xc7, 0x2d, 0xbf, 0x1c, 0x81, 0xb1, 0x65, 0x85, 0xe8, 0xa6, 0xd1, 0x24, + 0x14, 0x7d, 0x13, 0xca, 0x6c, 0x7a, 0x76, 0x14, 0xaa, 0x70, 0x8f, 0x8c, 0x9f, 0xf9, 0xbf, 0x83, + 0xcc, 0x75, 0x6a, 0x8c, 0xba, 0xb6, 0xf3, 0x74, 0xed, 0xca, 0xe6, 0x75, 0xd2, 0xa6, 0x6b, 0x84, + 0x2a, 0x75, 0x24, 0xe4, 0x40, 0xd8, 0x86, 0x03, 0x54, 0xf4, 0x16, 0x14, 0x1d, 0x8b, 0xb4, 0x85, + 0x33, 0x5f, 0xec, 0xd3, 0xac, 0x40, 0xd3, 0xa6, 0x45, 0xda, 0xe1, 0x68, 0xb1, 0x2f, 0xcc, 0x71, + 0xd1, 0x16, 0x1c, 0x75, 0x78, 0x18, 0x54, 0x0a, 0x5c, 0xc2, 0xf9, 0x81, 0x25, 0x78, 0xc1, 0x34, + 0x29, 0x64, 0x1c, 0xf5, 0xbe, 0xb1, 0x40, 0x97, 0x7f, 0x27, 0xc1, 0x44, 0x40, 0xcb, 0x47, 0xec, + 0x8d, 0x94, 0xef, 0x6a, 0x77, 0xe7, 0x3b, 0xc6, 0xcd, 0x3d, 0x77, 0x5c, 0xc8, 0x2a, 0xfb, 0x2d, + 0x11, 0xbf, 0xbd, 0xe9, 0xc7, 0xc3, 0x08, 0x8f, 0x87, 0xe7, 0x06, 0x35, 0x2b, 0x27, 0x0c, 0xbe, + 0x28, 0x44, 0xcc, 0x61, 0xee, 0x44, 0x6f, 0x42, 0xd9, 0x21, 0x1a, 0x69, 0x53, 0xd3, 0x16, 0xe6, + 0x3c, 0x73, 0x97, 0xe6, 0x28, 0x9b, 0x44, 0x6b, 0x0a, 0xd6, 0xfa, 0x31, 0x66, 0x8f, 0xff, 0x85, + 0x03, 0x48, 0xf4, 0x3a, 0x94, 0x29, 0xd1, 0x2d, 0x4d, 0xa1, 0xfe, 0xc4, 0x7a, 0x2a, 0xdf, 0x24, + 0x06, 0xdb, 0x30, 0x3b, 0x2d, 0xc1, 0xc0, 0x07, 0x3f, 0x70, 0x96, 0xdf, 0x8a, 0x03, 0x40, 0xf4, + 0x81, 0x04, 0x93, 0xae, 0xd5, 0x61, 0xa4, 0x94, 0x25, 0xd8, 0x6e, 0x4f, 0x44, 0xc3, 0xc5, 0x41, + 0xdd, 0xb6, 0x11, 0x43, 0xab, 0xcf, 0x0a, 0xe1, 0x93, 0xf1, 0x76, 0x9c, 0x90, 0x8a, 0x16, 0x61, + 0x4a, 0x57, 0x0d, 0x4c, 0x94, 0x4e, 0xaf, 0x49, 0xda, 0xa6, 0xd1, 0x71, 0x2a, 0xc5, 0x53, 0xd2, + 0xe9, 0x52, 0xfd, 0xa4, 0x00, 0x98, 0x5a, 0x8b, 0x77, 0xe3, 0x24, 0x3d, 0xfa, 0x3a, 0x20, 0xdf, + 0xae, 0x4b, 0xde, 0x7a, 0xa1, 0x9a, 0x46, 0xa5, 0x74, 0x4a, 0x3a, 0x5d, 0xa8, 0xcf, 0x09, 0x14, + 0xd4, 0x4a, 0x51, 0xe0, 0x0c, 0x2e, 0xf9, 0x9f, 0x45, 0x98, 0x4a, 0x04, 0x38, 0xba, 0x0a, 0xb3, + 0x6d, 0x2f, 0x7d, 0xae, 0xbb, 0xfa, 0x26, 0xb1, 0x9b, 0xed, 0x6d, 0xd2, 0x71, 0x35, 0xd2, 0xe1, + 0xa3, 0x5e, 0xaa, 0xcf, 0x0b, 0x19, 0xb3, 0x4b, 0x99, 0x54, 0x38, 0x87, 0x9b, 0xe9, 0x6d, 0xf0, + 0xa6, 0x35, 0xd5, 0x71, 0x02, 0xcc, 0x11, 0x8e, 0x19, 0xe8, 0xbd, 0x9e, 0xa2, 0xc0, 0x19, 0x5c, + 0x4c, 0xc7, 0x0e, 0x71, 0x54, 0x9b, 0x74, 0x92, 0x3a, 0x16, 0xe2, 0x3a, 0x2e, 0x67, 0x52, 0xe1, + 0x1c, 0x6e, 0x74, 0x16, 0xc6, 0x3d, 0x69, 0xdc, 0xe3, 0x62, 0x68, 0x82, 0x84, 0xbd, 0x1e, 0x76, + 0xe1, 0x28, 0x1d, 0x33, 0xcd, 0xdc, 0xe4, 0x55, 0x40, 0x27, 0x7f, 0x48, 0xae, 0xa4, 0x28, 0x70, + 0x06, 0x17, 0x33, 0xcd, 0x8b, 0x99, 0x94, 0x69, 0x47, 0xe3, 0xa6, 0x6d, 0x64, 0x52, 0xe1, 0x1c, + 0x6e, 0x16, 0x79, 0x9e, 0xca, 0x8b, 0x3b, 0x8a, 0xaa, 0x29, 0x9b, 0x1a, 0xa9, 0x8c, 0xc6, 0x23, + 0x6f, 0x3d, 0xde, 0x8d, 0x93, 0xf4, 0xe8, 0x12, 0x4c, 0x7b, 0x4d, 0x1b, 0x86, 0x12, 0x80, 0x94, + 0x39, 0xc8, 0x83, 0x02, 0x64, 0x7a, 0x3d, 0x49, 0x80, 0xd3, 0x3c, 0xf2, 0x5f, 0x24, 0x38, 0x99, + 0x33, 0x93, 0xd0, 0xcb, 0x50, 0xa4, 0x3d, 0xcb, 0x5f, 0x7f, 0xff, 0xd7, 0xcf, 0xe8, 0xad, 0x9e, + 0x45, 0x6e, 0xef, 0x55, 0x1f, 0xca, 0x61, 0x63, 0xdd, 0x98, 0x33, 0xa2, 0x6f, 0xc3, 0x84, 0x6d, + 0x6a, 0x9a, 0x6a, 0x74, 0x3d, 0x12, 0x91, 0x4d, 0x2e, 0xf4, 0x39, 0xd3, 0x71, 0x14, 0x23, 0xcc, + 0x96, 0xd3, 0xfb, 0x7b, 0xd5, 0x89, 0x58, 0x1f, 0x8e, 0x8b, 0x93, 0x7f, 0x3d, 0x02, 0xb0, 0x4c, + 0x2c, 0xcd, 0xec, 0xe9, 0xc4, 0x18, 0xc6, 0x0a, 0xfa, 0x76, 0x6c, 0x05, 0x7d, 0xa9, 0xdf, 0x8c, + 0x16, 0xa8, 0x9a, 0xbb, 0x84, 0x76, 0x13, 0x4b, 0xe8, 0xcb, 0x83, 0x8b, 0x38, 0x78, 0x0d, 0xbd, + 0x55, 0x80, 0x99, 0x90, 0x78, 0xc9, 0x34, 0x3a, 0x2a, 0x9f, 0x13, 0x2f, 0xc4, 0x62, 0xe2, 0xf1, + 0x44, 0x4c, 0x9c, 0xcc, 0x60, 0x89, 0xc4, 0xc3, 0xd5, 0x40, 0xfb, 0x11, 0xce, 0x7e, 0x3e, 0x2e, + 0xfc, 0xf6, 0x5e, 0xf5, 0xc0, 0xa2, 0xbc, 0x16, 0x60, 0xc6, 0x95, 0x45, 0x8f, 0xc1, 0x51, 0x9b, + 0x28, 0x8e, 0x69, 0xf0, 0x34, 0x31, 0x16, 0x1a, 0x85, 0x79, 0x2b, 0x16, 0xbd, 0xe8, 0x09, 0x18, + 0xd5, 0x89, 0xe3, 0x28, 0x5d, 0xc2, 0x33, 0xc2, 0x58, 0x7d, 0x4a, 0x10, 0x8e, 0xae, 0x79, 0xcd, + 0xd8, 0xef, 0x47, 0xd7, 0x61, 0x52, 0x53, 0x1c, 0x11, 0xda, 0x2d, 0x55, 0x27, 0x7c, 0xce, 0x8f, + 0x9f, 0xf9, 0x9f, 0xbb, 0x8b, 0x18, 0xc6, 0x11, 0xae, 0x44, 0xab, 0x31, 0x24, 0x9c, 0x40, 0x46, + 0x3b, 0x80, 0x58, 0x4b, 0xcb, 0x56, 0x0c, 0xc7, 0x73, 0x19, 0x93, 0x37, 0xda, 0xb7, 0xbc, 0x20, + 0xbf, 0xad, 0xa6, 0xd0, 0x70, 0x86, 0x04, 0xf9, 0xf7, 0x12, 0x4c, 0x86, 0x03, 0x36, 0x84, 0x42, + 0xe9, 0xad, 0x78, 0xa1, 0xf4, 0xfc, 0xc0, 0xc1, 0x9b, 0x53, 0x29, 0x7d, 0x58, 0x00, 0x14, 0x12, + 0xb1, 0xd4, 0xb0, 0xa9, 0xb4, 0x6f, 0xdc, 0xc5, 0x3e, 0xe2, 0xa7, 0x12, 0x20, 0x91, 0xac, 0x17, + 0x0d, 0xc3, 0xa4, 0x3c, 0xff, 0xfb, 0x6a, 0xbe, 0x36, 0xb0, 0x9a, 0xbe, 0x06, 0xb5, 0x8d, 0x14, + 0xf6, 0x05, 0x83, 0xda, 0xbd, 0x70, 0xc4, 0xd2, 0x04, 0x38, 0x43, 0x21, 0xf4, 0x0e, 0x80, 0x2d, + 0x30, 0x5b, 0xa6, 0x48, 0x01, 0x2f, 0x0d, 0x90, 0x4d, 0x19, 0xc0, 0x92, 0x69, 0x6c, 0xa9, 0xdd, + 0x30, 0xa1, 0xe1, 0x00, 0x18, 0x47, 0x84, 0xcc, 0x5d, 0x80, 0x93, 0x39, 0xda, 0xa3, 0xe3, 0x50, + 0xb8, 0x41, 0x7a, 0x9e, 0x5b, 0x31, 0xfb, 0x89, 0x4e, 0x44, 0xf7, 0x63, 0x63, 0x62, 0x2b, 0x75, + 0x6e, 0xe4, 0x39, 0x49, 0xfe, 0xb2, 0x14, 0x8d, 0x35, 0x5e, 0xc5, 0x9e, 0x86, 0xb2, 0x4d, 0x2c, + 0x4d, 0x6d, 0x2b, 0x8e, 0xa8, 0x67, 0x78, 0x41, 0x8a, 0x45, 0x1b, 0x0e, 0x7a, 0x63, 0xf5, 0xee, + 0xc8, 0xfd, 0xad, 0x77, 0x0b, 0xf7, 0xba, 0xde, 0x35, 0xa1, 0xec, 0xf8, 0x85, 0x6e, 0x91, 0x83, + 0x2f, 0x1e, 0x22, 0x67, 0x8b, 0x1a, 0x37, 0x10, 0x18, 0x54, 0xb7, 0x81, 0x90, 0xac, 0xba, 0xb6, + 0xd4, 0x67, 0x5d, 0xbb, 0x0a, 0x27, 0x6c, 0xb2, 0xa3, 0x32, 0x35, 0x2e, 0xab, 0x0e, 0x35, 0xed, + 0xde, 0xaa, 0xaa, 0xab, 0x54, 0x94, 0x3d, 0x95, 0xfd, 0xbd, 0xea, 0x09, 0x9c, 0xd1, 0x8f, 0x33, + 0xb9, 0x58, 0x76, 0xb6, 0x14, 0xd7, 0x21, 0x1d, 0x9e, 0xd2, 0xca, 0x61, 0x76, 0x6e, 0xf0, 0x56, + 0x2c, 0x7a, 0x91, 0x1e, 0x0b, 0xee, 0xf2, 0xbd, 0x08, 0xee, 0xc9, 0xfc, 0xc0, 0x46, 0x1b, 0x70, + 0xd2, 0xb2, 0xcd, 0xae, 0x4d, 0x1c, 0x67, 0x99, 0x28, 0x1d, 0x4d, 0x35, 0x88, 0xef, 0xaf, 0x31, + 0x6e, 0xe7, 0x43, 0xfb, 0x7b, 0xd5, 0x93, 0x8d, 0x6c, 0x12, 0x9c, 0xc7, 0x2b, 0x7f, 0x54, 0x84, + 0xe3, 0xc9, 0x55, 0x36, 0xa7, 0x2a, 0x95, 0x06, 0xaa, 0x4a, 0x9f, 0x8c, 0x4c, 0x1b, 0xaf, 0x64, + 0x0f, 0xa2, 0x21, 0x63, 0xea, 0x2c, 0xc2, 0x94, 0xc8, 0x23, 0x7e, 0xa7, 0xa8, 0xcb, 0x83, 0x68, + 0xd8, 0x88, 0x77, 0xe3, 0x24, 0x3d, 0xab, 0x35, 0xc3, 0x12, 0xd2, 0x07, 0x29, 0xc6, 0x6b, 0xcd, + 0xc5, 0x24, 0x01, 0x4e, 0xf3, 0xa0, 0x35, 0x98, 0x71, 0x8d, 0x34, 0x94, 0x17, 0x9d, 0x0f, 0x09, + 0xa8, 0x99, 0x8d, 0x34, 0x09, 0xce, 0xe2, 0x43, 0x3b, 0x00, 0x6d, 0xbf, 0x20, 0x70, 0x2a, 0x47, + 0x79, 0xae, 0xae, 0x0f, 0x3c, 0xb7, 0x82, 0xda, 0x22, 0xcc, 0x88, 0x41, 0x93, 0x83, 0x23, 0x92, + 0xd0, 0x0b, 0x30, 0x61, 0xf3, 0x8d, 0x87, 0x6f, 0x80, 0x57, 0xbc, 0x3f, 0x20, 0xd8, 0x26, 0x70, + 0xb4, 0x13, 0xc7, 0x69, 0xe5, 0x3f, 0x48, 0xd1, 0x25, 0x2a, 0x28, 0xb5, 0xcf, 0xc5, 0xca, 0xaa, + 0xc7, 0x12, 0x65, 0xd5, 0x6c, 0x9a, 0x23, 0x52, 0x55, 0x7d, 0x27, 0xbb, 0xca, 0xbe, 0x78, 0xa8, + 0x2a, 0x3b, 0x5c, 0x6a, 0xef, 0x5c, 0x66, 0x7f, 0x22, 0xc1, 0xec, 0xc5, 0xe6, 0x25, 0xdb, 0x74, + 0x2d, 0x5f, 0xbd, 0x2b, 0x96, 0xe7, 0xab, 0xaf, 0x41, 0xd1, 0x76, 0x35, 0xdf, 0xae, 0xff, 0xf2, + 0xed, 0xc2, 0xae, 0xc6, 0xec, 0x9a, 0x49, 0x70, 0x79, 0x46, 0x31, 0x06, 0xf4, 0x16, 0x1c, 0xb5, + 0x15, 0xa3, 0x4b, 0xfc, 0x45, 0xf8, 0xd9, 0x3e, 0xad, 0x59, 0x59, 0xc6, 0x8c, 0x3d, 0x52, 0x0a, + 0x72, 0x34, 0x2c, 0x50, 0xe5, 0x9f, 0x48, 0x30, 0x75, 0xb9, 0xd5, 0x6a, 0xac, 0x18, 0x7c, 0x16, + 0x37, 0x14, 0xba, 0xcd, 0xea, 0x04, 0x4b, 0xa1, 0xdb, 0xc9, 0x3a, 0x81, 0xf5, 0x61, 0xde, 0x83, + 0xb6, 0x61, 0x94, 0x65, 0x0f, 0x62, 0x74, 0x06, 0x2c, 0xf1, 0x85, 0xb8, 0xba, 0x07, 0x12, 0xd6, + 0x9f, 0xa2, 0x01, 0xfb, 0xf0, 0xf2, 0x7b, 0x70, 0x22, 0xa2, 0x1e, 0xf3, 0x17, 0x3f, 0x9d, 0x44, + 0x6d, 0x28, 0x31, 0x4d, 0xfc, 0xb3, 0xc7, 0x7e, 0x8f, 0xd0, 0x12, 0x26, 0x87, 0x75, 0x14, 0xfb, + 0x72, 0xb0, 0x87, 0x2d, 0xaf, 0xc1, 0xc4, 0x65, 0xd3, 0xa1, 0x0d, 0xd3, 0xa6, 0xdc, 0x6d, 0xe8, + 0x11, 0x28, 0xe8, 0xaa, 0x21, 0x56, 0xe9, 0x71, 0xc1, 0x53, 0x60, 0xeb, 0x08, 0x6b, 0xe7, 0xdd, + 0xca, 0xae, 0xc8, 0x46, 0x61, 0xb7, 0xb2, 0x8b, 0x59, 0xbb, 0x7c, 0x09, 0x46, 0xc5, 0x70, 0x44, + 0x81, 0x0a, 0x07, 0x03, 0x15, 0x32, 0x80, 0x7e, 0x31, 0x02, 0xa3, 0x42, 0xfb, 0x21, 0x6c, 0xe6, + 0xde, 0x88, 0x6d, 0xe6, 0xce, 0x0d, 0x36, 0xd2, 0xb9, 0x3b, 0xb9, 0x4e, 0x62, 0x27, 0xf7, 0xe2, + 0x80, 0xf8, 0x07, 0x6f, 0xe3, 0x3e, 0x96, 0x60, 0x32, 0x1e, 0x73, 0xe8, 0x2c, 0x8c, 0xb3, 0x35, + 0x45, 0x6d, 0x93, 0xf5, 0xb0, 0x28, 0x0e, 0x0e, 0x56, 0x9a, 0x61, 0x17, 0x8e, 0xd2, 0xa1, 0x6e, + 0xc0, 0xc6, 0xc2, 0x42, 0x38, 0x25, 0xdf, 0xe5, 0x2e, 0x55, 0xb5, 0x9a, 0x77, 0x5f, 0x53, 0x5b, + 0x31, 0xe8, 0x15, 0xbb, 0x49, 0x6d, 0xd5, 0xe8, 0xa6, 0x04, 0xf1, 0x18, 0x8b, 0x22, 0xcb, 0x37, + 0x25, 0x18, 0x17, 0x2a, 0x0f, 0x61, 0x4b, 0xf2, 0x7a, 0x7c, 0x4b, 0xf2, 0xec, 0x80, 0xf3, 0x39, + 0x7b, 0x3f, 0xf2, 0x69, 0x68, 0x0a, 0x9b, 0xc1, 0x2c, 0xc1, 0x6c, 0x9b, 0x0e, 0x4d, 0x26, 0x18, + 0x36, 0xd7, 0x30, 0xef, 0x41, 0xdf, 0x93, 0xe0, 0xb8, 0x9a, 0x98, 0xf3, 0xc2, 0xd7, 0x2f, 0x0f, + 0xa6, 0x5a, 0x00, 0x53, 0xaf, 0x08, 0x79, 0xc7, 0x93, 0x3d, 0x38, 0x25, 0x52, 0x76, 0x21, 0x45, + 0x85, 0x14, 0x28, 0x6e, 0x53, 0x6a, 0x89, 0x41, 0x58, 0x1a, 0x3c, 0xf3, 0x84, 0x2a, 0x95, 0xb9, + 0xf9, 0xad, 0x56, 0x03, 0x73, 0x68, 0xf9, 0xe7, 0x23, 0x81, 0xc3, 0x9a, 0xde, 0x24, 0x09, 0xf2, + 0xad, 0x74, 0x2f, 0xf2, 0xed, 0x78, 0x56, 0xae, 0x45, 0xdf, 0x80, 0x02, 0xd5, 0x06, 0xdd, 0x94, + 0x0a, 0x09, 0xad, 0xd5, 0x66, 0x98, 0xb0, 0x5a, 0xab, 0x4d, 0xcc, 0x20, 0xd1, 0xdb, 0x50, 0x62, + 0xab, 0x19, 0x9b, 0xe3, 0x85, 0xc1, 0x73, 0x08, 0xf3, 0x57, 0x18, 0x61, 0xec, 0xcb, 0xc1, 0x1e, + 0xae, 0xfc, 0x1e, 0x4c, 0xc4, 0x12, 0x01, 0xba, 0x0e, 0xc7, 0x34, 0x53, 0xe9, 0xd4, 0x15, 0x4d, + 0x31, 0xda, 0xc4, 0x4e, 0xa6, 0xc6, 0xec, 0xfd, 0xcc, 0x6a, 0x84, 0x43, 0x24, 0x94, 0xe0, 0x02, + 0x31, 0xda, 0x87, 0x63, 0xd8, 0xb2, 0x02, 0x10, 0x5a, 0x8f, 0xaa, 0x50, 0x62, 0x21, 0xec, 0xad, + 0x4c, 0x63, 0xf5, 0x31, 0xa6, 0x2b, 0x8b, 0x6c, 0x07, 0x7b, 0xed, 0xe8, 0x0c, 0x80, 0x43, 0xda, + 0x36, 0xa1, 0x3c, 0xef, 0x78, 0x27, 0x40, 0x41, 0x06, 0x6e, 0x06, 0x3d, 0x38, 0x42, 0x25, 0xff, + 0x49, 0x82, 0x89, 0x75, 0x42, 0xdf, 0x35, 0xed, 0x1b, 0x0d, 0x53, 0x53, 0xdb, 0xbd, 0x21, 0xe4, + 0xfd, 0xcd, 0x58, 0xde, 0x7f, 0xa5, 0xcf, 0x31, 0x8b, 0x69, 0x9b, 0x97, 0xfd, 0xe5, 0xbf, 0x4b, + 0x50, 0x89, 0x51, 0x46, 0xd3, 0x04, 0x81, 0x92, 0x65, 0xda, 0xd4, 0x5f, 0xe3, 0x0f, 0xa5, 0x01, + 0x4b, 0xa9, 0x91, 0x55, 0x9e, 0xc1, 0x62, 0x0f, 0x9d, 0xd9, 0xb9, 0x65, 0x9b, 0xba, 0x88, 0xfb, + 0xc3, 0x49, 0x21, 0xc4, 0x0e, 0xed, 0xbc, 0x68, 0x9b, 0x3a, 0xe6, 0xd8, 0xf2, 0x1f, 0x25, 0x98, + 0x8e, 0x51, 0x0e, 0x21, 0xa5, 0x2b, 0xf1, 0x94, 0xfe, 0xe2, 0x61, 0x0c, 0xcb, 0x49, 0xec, 0x5f, + 0x25, 0xcd, 0x62, 0x0e, 0x40, 0x5b, 0x30, 0x6e, 0x99, 0x9d, 0xe6, 0x3d, 0xb8, 0x99, 0x9b, 0x62, + 0x2b, 0x64, 0x23, 0xc4, 0xc2, 0x51, 0x60, 0xb4, 0x0b, 0xd3, 0x86, 0xa2, 0x13, 0xc7, 0x52, 0xda, + 0xa4, 0x79, 0x0f, 0xce, 0x45, 0x1e, 0xe0, 0xb7, 0x05, 0x49, 0x44, 0x9c, 0x16, 0x22, 0xff, 0x2a, + 0x65, 0xb7, 0x69, 0x53, 0xf4, 0x2a, 0x94, 0xf9, 0x23, 0x89, 0xb6, 0xa9, 0x89, 0xa5, 0xed, 0x2c, + 0x1b, 0x9a, 0x86, 0x68, 0xbb, 0xbd, 0x57, 0xfd, 0xef, 0x03, 0x8f, 0x75, 0x7d, 0x42, 0x1c, 0xc0, + 0xa0, 0x75, 0x28, 0x5a, 0x87, 0x29, 0x33, 0xf8, 0xc2, 0xc2, 0x6b, 0x0b, 0x8e, 0x23, 0xff, 0x23, + 0xa9, 0x38, 0x5f, 0x5e, 0xae, 0xdf, 0xb3, 0x01, 0x0b, 0xca, 0x9a, 0xdc, 0x41, 0xb3, 0x61, 0x54, + 0xac, 0xb2, 0x22, 0x2e, 0x2f, 0x1d, 0x26, 0x2e, 0xa3, 0x2b, 0x43, 0xb0, 0x89, 0xf0, 0x1b, 0x7d, + 0x41, 0xf2, 0x5f, 0x25, 0x98, 0xe6, 0x0a, 0xb5, 0x5d, 0x5b, 0xa5, 0xbd, 0xa1, 0x65, 0xd0, 0xad, + 0x58, 0x06, 0x5d, 0xee, 0xd3, 0xd0, 0x94, 0xc6, 0xb9, 0x59, 0xf4, 0x73, 0x09, 0x1e, 0x48, 0x51, + 0x0f, 0x21, 0xc3, 0x90, 0x78, 0x86, 0x79, 0xe5, 0xb0, 0x06, 0xe6, 0x64, 0x99, 0x9b, 0x90, 0x61, + 0x1e, 0x0f, 0xdc, 0x33, 0x00, 0x96, 0xad, 0xee, 0xa8, 0x1a, 0xe9, 0x8a, 0xcb, 0xe0, 0x72, 0x38, + 0x24, 0x8d, 0xa0, 0x07, 0x47, 0xa8, 0xd0, 0xb7, 0x60, 0xb6, 0x43, 0xb6, 0x14, 0x57, 0xa3, 0x8b, + 0x9d, 0xce, 0x92, 0x62, 0x29, 0x9b, 0xaa, 0xa6, 0x52, 0x55, 0xec, 0xb0, 0xc7, 0xea, 0x17, 0xbc, + 0x4b, 0xda, 0x2c, 0x8a, 0xdb, 0x7b, 0xd5, 0xc7, 0x0f, 0xbe, 0x98, 0xf1, 0x89, 0x7b, 0x38, 0x47, + 0x08, 0xfa, 0xae, 0x04, 0x15, 0x9b, 0xbc, 0xe3, 0xaa, 0x36, 0xe9, 0x2c, 0xdb, 0xa6, 0x15, 0xd3, + 0xa0, 0xc0, 0x35, 0xb8, 0xb4, 0xbf, 0x57, 0xad, 0xe0, 0x1c, 0x9a, 0x7e, 0x74, 0xc8, 0x15, 0x84, + 0x28, 0xcc, 0x28, 0x9a, 0x66, 0xbe, 0x4b, 0xe2, 0x1e, 0x28, 0x72, 0xf9, 0xf5, 0xfd, 0xbd, 0xea, + 0xcc, 0x62, 0xba, 0xbb, 0x1f, 0xd1, 0x59, 0xf0, 0x68, 0x01, 0x46, 0x77, 0x4c, 0xcd, 0xd5, 0x89, + 0x53, 0x29, 0x71, 0x49, 0x2c, 0xe3, 0x8e, 0x5e, 0xf5, 0x9a, 0x6e, 0xef, 0x55, 0x8f, 0x5e, 0x6c, + 0xf2, 0xa3, 0x0f, 0x9f, 0x8a, 0xed, 0xd1, 0x58, 0xcd, 0x24, 0xa6, 0x3c, 0x3f, 0x77, 0x2d, 0x87, + 0x39, 0xe6, 0x72, 0xd8, 0x85, 0xa3, 0x74, 0x48, 0x87, 0xb1, 0x6d, 0xb1, 0x6f, 0x77, 0x2a, 0xa3, + 0x03, 0xad, 0x7e, 0xb1, 0x7d, 0x7f, 0x7d, 0x5a, 0x88, 0x1c, 0xf3, 0x9b, 0x1d, 0x1c, 0x4a, 0x40, + 0x4f, 0xc0, 0x28, 0xff, 0x58, 0x59, 0xe6, 0xa7, 0xb5, 0xe5, 0x30, 0x13, 0x5d, 0xf6, 0x9a, 0xb1, + 0xdf, 0xef, 0x93, 0xae, 0x34, 0x96, 0xf8, 0xe1, 0x6a, 0x82, 0x74, 0xa5, 0xb1, 0x84, 0xfd, 0x7e, + 0x64, 0xc1, 0xa8, 0x43, 0x56, 0x55, 0xc3, 0xdd, 0xad, 0xc0, 0x40, 0xd7, 0xc5, 0xcd, 0x0b, 0x9c, + 0x3b, 0x71, 0x14, 0x15, 0x4a, 0x14, 0xfd, 0xd8, 0x17, 0x83, 0x76, 0x61, 0xcc, 0x76, 0x8d, 0x45, + 0x67, 0xc3, 0x21, 0x76, 0x65, 0x9c, 0xcb, 0xec, 0x37, 0x39, 0x63, 0x9f, 0x3f, 0x29, 0x35, 0xf0, + 0x60, 0x40, 0x81, 0x43, 0x61, 0xe8, 0x23, 0x09, 0x90, 0xe3, 0x5a, 0x96, 0x46, 0x74, 0x62, 0x50, + 0x45, 0xe3, 0xa7, 0x61, 0x4e, 0xe5, 0x18, 0xd7, 0xa1, 0xd1, 0xaf, 0xdd, 0x29, 0xa0, 0xa4, 0x32, + 0xc1, 0x51, 0x73, 0x9a, 0x14, 0x67, 0xe8, 0xc1, 0x86, 0x62, 0xcb, 0xe1, 0xbf, 0x2b, 0x13, 0x03, + 0x0d, 0x45, 0xf6, 0xa9, 0x60, 0x38, 0x14, 0xa2, 0x1f, 0xfb, 0x62, 0xd0, 0x55, 0x98, 0xb5, 0x89, + 0xd2, 0xb9, 0x62, 0x68, 0x3d, 0x6c, 0x9a, 0xf4, 0xa2, 0xaa, 0x11, 0xa7, 0xe7, 0x50, 0xa2, 0x57, + 0x26, 0x79, 0xd8, 0x04, 0x4f, 0x2e, 0x70, 0x26, 0x15, 0xce, 0xe1, 0xe6, 0x2f, 0x01, 0xc4, 0x19, + 0xec, 0x70, 0xde, 0xd2, 0x1d, 0xee, 0x25, 0x40, 0xa8, 0xea, 0x7d, 0x7b, 0x09, 0x10, 0x11, 0x71, + 0xf0, 0x11, 0xd2, 0x57, 0x23, 0x30, 0x13, 0x12, 0xdf, 0xf5, 0x4b, 0x80, 0x0c, 0x96, 0x21, 0xbc, + 0x04, 0xc8, 0xbe, 0x4a, 0x2f, 0xdc, 0xef, 0xab, 0xf4, 0xfb, 0xf0, 0x02, 0x81, 0xdf, 0xce, 0x87, + 0x4e, 0xfc, 0xf7, 0xbf, 0x9d, 0x0f, 0x75, 0xcd, 0x29, 0x67, 0x7e, 0x33, 0x12, 0x35, 0xe8, 0x3f, + 0xe8, 0x0a, 0xf8, 0xf0, 0x2f, 0x0d, 0xe5, 0xcf, 0x0b, 0x70, 0x3c, 0x39, 0x63, 0x63, 0x37, 0x81, + 0xd2, 0x1d, 0x6f, 0x02, 0x1b, 0x70, 0x62, 0xcb, 0xd5, 0xb4, 0x1e, 0x77, 0x48, 0xe4, 0x3a, 0xd0, + 0x3b, 0xb5, 0x7f, 0x58, 0x70, 0x9e, 0xb8, 0x98, 0x41, 0x83, 0x33, 0x39, 0x73, 0x6e, 0x35, 0x0b, + 0x03, 0xdd, 0x6a, 0xa6, 0x2e, 0xd5, 0x8a, 0x77, 0x7f, 0xa9, 0x96, 0x7d, 0x43, 0x59, 0x1a, 0xe0, + 0x86, 0xf2, 0x5e, 0x5c, 0x29, 0x66, 0x24, 0xbe, 0x3b, 0x5d, 0x29, 0xca, 0x0f, 0xc3, 0x9c, 0x60, + 0x63, 0xdf, 0x4b, 0xa6, 0x41, 0x6d, 0x53, 0xd3, 0x88, 0xbd, 0xec, 0xea, 0x7a, 0x4f, 0x3e, 0x0f, + 0x93, 0xf1, 0x7b, 0x6d, 0x6f, 0xe4, 0xbd, 0xab, 0x76, 0x71, 0x97, 0x12, 0x19, 0x79, 0xaf, 0x1d, + 0x07, 0x14, 0xf2, 0x07, 0x12, 0xcc, 0x66, 0xbf, 0xa1, 0x43, 0x1a, 0x4c, 0xea, 0xca, 0x6e, 0xf4, + 0x11, 0xa1, 0x34, 0xe0, 0x8e, 0x1b, 0xed, 0xef, 0x55, 0x27, 0xd7, 0x62, 0x58, 0x38, 0x81, 0x2d, + 0x7f, 0x21, 0xc1, 0xc9, 0x9c, 0x6b, 0xc6, 0xe1, 0x6a, 0x82, 0xae, 0x41, 0x59, 0x57, 0x76, 0x9b, + 0xae, 0xdd, 0x25, 0x03, 0x9f, 0x31, 0xf0, 0x5c, 0xb2, 0x26, 0x50, 0x70, 0x80, 0x27, 0x7f, 0x22, + 0x41, 0x25, 0xaf, 0x1e, 0x44, 0x67, 0x63, 0x17, 0xa2, 0x8f, 0x26, 0x2e, 0x44, 0xa7, 0x53, 0x7c, + 0x43, 0xba, 0x0e, 0xfd, 0x54, 0x82, 0xd9, 0xec, 0xba, 0x19, 0x3d, 0x13, 0xd3, 0xb8, 0x9a, 0xd0, + 0x78, 0x2a, 0xc1, 0x25, 0xf4, 0xdd, 0x86, 0x49, 0x51, 0x5d, 0x0b, 0x18, 0xe1, 0xe5, 0x27, 0x0f, + 0xce, 0xaa, 0x02, 0xcc, 0xaf, 0x13, 0xf9, 0x48, 0xc6, 0xdb, 0x70, 0x02, 0x57, 0xfe, 0xd9, 0x08, + 0x94, 0x9a, 0x6d, 0x45, 0x23, 0x43, 0x28, 0xea, 0xae, 0xc5, 0x8a, 0xba, 0x7e, 0xdf, 0xf9, 0x73, + 0x2d, 0x73, 0xeb, 0xb9, 0xcd, 0x44, 0x3d, 0x77, 0x6e, 0x20, 0xf4, 0x83, 0x4b, 0xb9, 0xe7, 0x61, + 0x2c, 0x50, 0xa2, 0xbf, 0xd5, 0x43, 0xfe, 0x78, 0x04, 0xc6, 0x23, 0x22, 0xfa, 0x5c, 0x7b, 0x76, + 0x62, 0xab, 0xf7, 0x20, 0x7f, 0x29, 0x8a, 0xc8, 0xae, 0xf9, 0xeb, 0xb7, 0xf7, 0x86, 0x2e, 0x7c, + 0x0b, 0x95, 0x5e, 0xd6, 0xcf, 0xc3, 0x24, 0xe5, 0xff, 0xb0, 0x09, 0xce, 0xf8, 0x0a, 0x3c, 0x8a, + 0x83, 0x97, 0x99, 0xad, 0x58, 0x2f, 0x4e, 0x50, 0xcf, 0xbd, 0x00, 0x13, 0x31, 0x61, 0x7d, 0x3d, + 0x79, 0xfb, 0xad, 0x04, 0x8f, 0xde, 0x71, 0x4f, 0x86, 0xea, 0xb1, 0xe9, 0x55, 0x4b, 0x4c, 0xaf, + 0xf9, 0x7c, 0x80, 0x21, 0x3e, 0x96, 0xf8, 0xd1, 0x08, 0xa0, 0xd6, 0xb6, 0x6a, 0x77, 0x1a, 0x8a, + 0x4d, 0x7b, 0x58, 0xfc, 0x8f, 0x6a, 0x08, 0x13, 0xee, 0x2c, 0x8c, 0x77, 0x88, 0xd3, 0xb6, 0x55, + 0xee, 0x2c, 0xb1, 0x57, 0x08, 0xce, 0x41, 0x96, 0xc3, 0x2e, 0x1c, 0xa5, 0x43, 0x5d, 0x28, 0xef, + 0x78, 0xff, 0xd4, 0xf3, 0x6f, 0xde, 0xfa, 0x2d, 0x66, 0xc3, 0xff, 0xfa, 0x85, 0xf1, 0x25, 0x1a, + 0x1c, 0x1c, 0x80, 0xcb, 0x1f, 0x4a, 0x30, 0x9b, 0x76, 0xcc, 0x32, 0x53, 0xfd, 0xfe, 0x3b, 0xe7, + 0x61, 0x28, 0x72, 0x74, 0xe6, 0x95, 0x63, 0xde, 0x89, 0x37, 0x93, 0x8c, 0x79, 0xab, 0xfc, 0xa5, + 0x04, 0x73, 0xd9, 0xaa, 0x0d, 0x61, 0x2b, 0x71, 0x3d, 0xbe, 0x95, 0xe8, 0xf7, 0xd8, 0x20, 0x5b, + 0xef, 0x9c, 0x6d, 0xc5, 0x5e, 0xe6, 0x18, 0x0c, 0xc1, 0xc8, 0xad, 0xb8, 0x91, 0x8b, 0x87, 0x36, + 0x32, 0xdb, 0xc0, 0xfa, 0x13, 0x37, 0x6f, 0xcd, 0x1f, 0xf9, 0xec, 0xd6, 0xfc, 0x91, 0x3f, 0xdf, + 0x9a, 0x3f, 0xf2, 0xfe, 0xfe, 0xbc, 0x74, 0x73, 0x7f, 0x5e, 0xfa, 0x6c, 0x7f, 0x5e, 0xfa, 0xdb, + 0xfe, 0xbc, 0xf4, 0x83, 0x2f, 0xe6, 0x8f, 0x5c, 0x1b, 0x15, 0x98, 0xff, 0x0a, 0x00, 0x00, 0xff, + 0xff, 0x56, 0x18, 0xbd, 0xf5, 0xb1, 0x3c, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.proto similarity index 67% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/generated.proto rename to vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.proto index d0c891c8d..8ba21bc9b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/generated.proto +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,11 +21,13 @@ syntax = 'proto2'; package k8s.io.kubernetes.pkg.apis.extensions.v1beta1; -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; -import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; +import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; @@ -33,21 +35,16 @@ option go_package = "v1beta1"; // An APIVersion represents a single concrete version of an object model. message APIVersion { // Name of this version (e.g. 'v1'). + // +optional optional string name = 1; } -message CPUTargetUtilization { - // fraction of the requested CPU that should be utilized/used, - // e.g. 70 means that 70% of the requested CPU should be in use. - optional int32 targetPercentage = 1; -} - message CustomMetricCurrentStatus { // Custom Metric name. optional string name = 1; // Custom Metric value (average). - optional k8s.io.kubernetes.pkg.api.resource.Quantity value = 2; + optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 2; } message CustomMetricCurrentStatusList { @@ -60,7 +57,7 @@ message CustomMetricTarget { optional string name = 1; // Custom Metric value (average). - optional k8s.io.kubernetes.pkg.api.resource.Quantity value = 2; + optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 2; } message CustomMetricTargetList { @@ -71,17 +68,20 @@ message CustomMetricTargetList { message DaemonSet { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // Spec defines the desired behavior of this daemon set. + // The desired behavior of this daemon set. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional DaemonSetSpec spec = 2; - // Status is the current status of this daemon set. This data may be + // The current status of this daemon set. This data may be // out of date by some window of time. // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional DaemonSetStatus status = 3; } @@ -89,62 +89,144 @@ message DaemonSet { message DaemonSetList { // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - // Items is a list of daemon sets. + // A list of daemon sets. repeated DaemonSet items = 2; } // DaemonSetSpec is the specification of a daemon set. message DaemonSetSpec { - // Selector is a label query over pods that are managed by the daemon set. + // A label query over pods that are managed by the daemon set. // Must match in order to be controlled. // If empty, defaulted to labels on Pod template. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - optional LabelSelector selector = 1; + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1; - // Template is the object that describes the pod that will be created. + // An object that describes the pod that will be created. // The DaemonSet will create exactly one copy of this pod on every node // that matches the template's node selector (or on every node if no node // selector is specified). - // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template + // More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 2; + + // An update strategy to replace existing DaemonSet pods with new pods. + // +optional + optional DaemonSetUpdateStrategy updateStrategy = 3; + + // The minimum number of seconds for which a newly created DaemonSet pod should + // be ready without any of its container crashing, for it to be considered + // available. Defaults to 0 (pod will be considered available as soon as it + // is ready). + // +optional + optional int32 minReadySeconds = 4; + + // A sequence number representing a specific generation of the template. + // Populated by the system. It can be set only during the creation. + // +optional + optional int64 templateGeneration = 5; } // DaemonSetStatus represents the current status of a daemon set. message DaemonSetStatus { - // CurrentNumberScheduled is the number of nodes that are running at least 1 + // The number of nodes that are running at least 1 // daemon pod and are supposed to run the daemon pod. // More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md optional int32 currentNumberScheduled = 1; - // NumberMisscheduled is the number of nodes that are running the daemon pod, but are + // The number of nodes that are running the daemon pod, but are // not supposed to run the daemon pod. // More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md optional int32 numberMisscheduled = 2; - // DesiredNumberScheduled is the total number of nodes that should be running the daemon + // The total number of nodes that should be running the daemon // pod (including nodes correctly running the daemon pod). // More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md optional int32 desiredNumberScheduled = 3; + + // The number of nodes that should be running the daemon pod and have one + // or more of the daemon pod running and ready. + optional int32 numberReady = 4; + + // The most recent generation observed by the daemon set controller. + // +optional + optional int64 observedGeneration = 5; + + // The total number of nodes that are running updated daemon pod + // +optional + optional int32 updatedNumberScheduled = 6; + + // The number of nodes that should be running the + // daemon pod and have one or more of the daemon pod running and + // available (ready for at least spec.minReadySeconds) + // +optional + optional int32 numberAvailable = 7; + + // The number of nodes that should be running the + // daemon pod and have none of the daemon pod running and available + // (ready for at least spec.minReadySeconds) + // +optional + optional int32 numberUnavailable = 8; +} + +message DaemonSetUpdateStrategy { + // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". + // Default is OnDelete. + // +optional + optional string type = 1; + + // Rolling update config params. Present only if type = "RollingUpdate". + // --- + // TODO: Update this to follow our convention for oneOf, whatever we decide it + // to be. Same as DeploymentStrategy.RollingUpdate. + // See https://github.com/kubernetes/kubernetes/issues/35345 + // +optional + optional RollingUpdateDaemonSet rollingUpdate = 2; } // Deployment enables declarative updates for Pods and ReplicaSets. message Deployment { // Standard object metadata. - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the Deployment. + // +optional optional DeploymentSpec spec = 2; // Most recently observed status of the Deployment. + // +optional optional DeploymentStatus status = 3; } +// DeploymentCondition describes the state of a deployment at a certain point. +message DeploymentCondition { + // Type of deployment condition. + optional string type = 1; + + // Status of the condition, one of True, False, Unknown. + optional string status = 2; + + // The last time this condition was updated. + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6; + + // Last time the condition transitioned from one status to another. + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7; + + // The reason for the condition's last transition. + optional string reason = 4; + + // A human readable message indicating details about the transition. + optional string message = 5; +} + // DeploymentList is a list of Deployments. message DeploymentList { // Standard list metadata. - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is the list of Deployments. repeated Deployment items = 2; @@ -156,6 +238,7 @@ message DeploymentRollback { optional string name = 1; // The annotations to be updated to a deployment + // +optional map updatedAnnotations = 2; // The config of this deployment rollback. @@ -166,56 +249,85 @@ message DeploymentRollback { message DeploymentSpec { // Number of desired pods. This is a pointer to distinguish between explicit // zero and not specified. Defaults to 1. + // +optional optional int32 replicas = 1; // Label selector for pods. Existing ReplicaSets whose pods are // selected by this will be the ones affected by this deployment. - optional LabelSelector selector = 2; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; // Template describes the pods that will be created. optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3; // The deployment strategy to use to replace existing pods with new ones. + // +optional optional DeploymentStrategy strategy = 4; // Minimum number of seconds for which a newly created pod should be ready // without any of its container crashing, for it to be considered available. // Defaults to 0 (pod will be considered available as soon as it is ready) + // +optional optional int32 minReadySeconds = 5; // The number of old ReplicaSets to retain to allow rollback. // This is a pointer to distinguish between explicit zero and not specified. + // +optional optional int32 revisionHistoryLimit = 6; // Indicates that the deployment is paused and will not be processed by the // deployment controller. + // +optional optional bool paused = 7; // The config this deployment is rolling back to. Will be cleared after rollback is done. + // +optional optional RollbackConfig rollbackTo = 8; + + // The maximum time in seconds for a deployment to make progress before it + // is considered to be failed. The deployment controller will continue to + // process failed deployments and a condition with a ProgressDeadlineExceeded + // reason will be surfaced in the deployment status. Once autoRollback is + // implemented, the deployment controller will automatically rollback failed + // deployments. Note that progress will not be estimated during the time a + // deployment is paused. This is not set by default. + optional int32 progressDeadlineSeconds = 9; } // DeploymentStatus is the most recently observed status of the Deployment. message DeploymentStatus { // The generation observed by the deployment controller. + // +optional optional int64 observedGeneration = 1; // Total number of non-terminated pods targeted by this deployment (their labels match the selector). + // +optional optional int32 replicas = 2; // Total number of non-terminated pods targeted by this deployment that have the desired template spec. + // +optional optional int32 updatedReplicas = 3; + // Total number of ready pods targeted by this deployment. + // +optional + optional int32 readyReplicas = 7; + // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. + // +optional optional int32 availableReplicas = 4; // Total number of unavailable pods targeted by this deployment. + // +optional optional int32 unavailableReplicas = 5; + + // Represents the latest available observations of a deployment's current state. + repeated DeploymentCondition conditions = 6; } // DeploymentStrategy describes how to replace existing pods with new ones. message DeploymentStrategy { // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. + // +optional optional string type = 1; // Rolling update config params. Present only if DeploymentStrategyType = @@ -223,25 +335,19 @@ message DeploymentStrategy { // --- // TODO: Update this to follow our convention for oneOf, whatever we decide it // to be. + // +optional optional RollingUpdateDeployment rollingUpdate = 2; } -// ExportOptions is the query options to the standard REST get call. -message ExportOptions { - // Should this value be exported. Export strips fields that a user can not specify. - optional bool export = 1; - - // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' - optional bool exact = 2; -} - // FSGroupStrategyOptions defines the strategy type and options used to create the strategy. message FSGroupStrategyOptions { // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. + // +optional optional string rule = 1; // Ranges are the allowed ranges of fs groups. If you would like to force a single // fs group then supply a single range with the same start and end. + // +optional repeated IDRange ranges = 2; } @@ -255,6 +361,7 @@ message HTTPIngressPath { // part of a URL as defined by RFC 3986. Paths must begin with // a '/'. If unspecified, the path defaults to a catch all sending // traffic to the backend. + // +optional optional string path = 1; // Backend defines the referenced service endpoint to which the traffic @@ -272,64 +379,6 @@ message HTTPIngressRuleValue { repeated HTTPIngressPath paths = 1; } -// configuration of a horizontal pod autoscaler. -message HorizontalPodAutoscaler { - // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; - - // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. - optional HorizontalPodAutoscalerSpec spec = 2; - - // current information about the autoscaler. - optional HorizontalPodAutoscalerStatus status = 3; -} - -// list of horizontal pod autoscaler objects. -message HorizontalPodAutoscalerList { - // Standard list metadata. - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; - - // list of horizontal pod autoscaler objects. - repeated HorizontalPodAutoscaler items = 2; -} - -// specification of a horizontal pod autoscaler. -message HorizontalPodAutoscalerSpec { - // reference to Scale subresource; horizontal pod autoscaler will learn the current resource consumption from its status, - // and will set the desired number of pods by modifying its spec. - optional SubresourceReference scaleRef = 1; - - // lower limit for the number of pods that can be set by the autoscaler, default 1. - optional int32 minReplicas = 2; - - // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. - optional int32 maxReplicas = 3; - - // target average CPU utilization (represented as a percentage of requested CPU) over all the pods; - // if not specified it defaults to the target CPU utilization at 80% of the requested resources. - optional CPUTargetUtilization cpuUtilization = 4; -} - -// current status of a horizontal pod autoscaler -message HorizontalPodAutoscalerStatus { - // most recent generation observed by this autoscaler. - optional int64 observedGeneration = 1; - - // last time the HorizontalPodAutoscaler scaled the number of pods; - // used by the autoscaler to control how often the number of pods is changed. - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastScaleTime = 2; - - // current number of replicas of pods managed by this autoscaler. - optional int32 currentReplicas = 3; - - // desired number of replicas of pods managed by this autoscaler. - optional int32 desiredReplicas = 4; - - // current average CPU utilization over all pods, represented as a percentage of requested CPU, - // e.g. 70 means that an average pod is using now 70% of its requested CPU. - optional int32 currentCPUUtilizationPercentage = 5; -} - // Host Port Range defines a range of host ports that will be enabled by a policy // for pods to use. It requires both the start and end to be defined. message HostPortRange { @@ -356,14 +405,17 @@ message IDRange { message Ingress { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is the desired state of the Ingress. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional IngressSpec spec = 2; // Status is the current state of the Ingress. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional IngressStatus status = 3; } @@ -373,14 +425,15 @@ message IngressBackend { optional string serviceName = 1; // Specifies the port of the referenced service. - optional k8s.io.kubernetes.pkg.util.intstr.IntOrString servicePort = 2; + optional k8s.io.apimachinery.pkg.util.intstr.IntOrString servicePort = 2; } // IngressList is a collection of Ingress. message IngressList { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is the list of Ingress. repeated Ingress items = 2; @@ -402,6 +455,7 @@ message IngressRule { // Incoming requests are matched against the host before the IngressRuleValue. // If the host is unspecified, the Ingress routes all traffic based on the // specified IngressRuleValue. + // +optional optional string host = 1; // IngressRuleValue represents a rule to route requests for this IngressRule. @@ -409,6 +463,7 @@ message IngressRule { // just traffic matching the host to the default backend or all traffic to the // default backend, is left to the controller fulfilling the Ingress. Http is // currently the only supported IngressRuleValue. + // +optional optional IngressRuleValue ingressRuleValue = 2; } @@ -417,6 +472,7 @@ message IngressRule { // mixing different types of rules in a single Ingress is disallowed, so exactly // one of the following must be set. message IngressRuleValue { + // +optional optional HTTPIngressRuleValue http = 1; } @@ -426,6 +482,7 @@ message IngressSpec { // rule. At least one of 'backend' or 'rules' must be specified. This field // is optional to allow the loadbalancer controller or defaulting logic to // specify a global default. + // +optional optional IngressBackend backend = 1; // TLS configuration. Currently the Ingress only supports a single TLS @@ -433,16 +490,19 @@ message IngressSpec { // will be multiplexed on the same port according to the hostname specified // through the SNI TLS extension, if the ingress controller fulfilling the // ingress supports SNI. + // +optional repeated IngressTLS tls = 2; // A list of host rules used to configure the Ingress. If unspecified, or // no rule matches, all traffic is sent to the default backend. + // +optional repeated IngressRule rules = 3; } // IngressStatus describe the current state of the Ingress. message IngressStatus { // LoadBalancer contains the current status of the load-balancer. + // +optional optional k8s.io.kubernetes.pkg.api.v1.LoadBalancerStatus loadBalancer = 1; } @@ -452,6 +512,7 @@ message IngressTLS { // this list must match the name/s used in the tlsSecret. Defaults to the // wildcard host setting for the loadbalancer controller fulfilling this // Ingress, if left unspecified. + // +optional repeated string hosts = 1; // SecretName is the name of the secret used to terminate SSL traffic on 443. @@ -459,178 +520,18 @@ message IngressTLS { // If the SNI host in a listener conflicts with the "Host" header field used // by an IngressRule, the SNI host is used for termination and value of the // Host header is used for routing. + // +optional optional string secretName = 2; } -// Job represents the configuration of a single job. -message Job { - // Standard object's metadata. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; - - // Spec is a structure defining the expected behavior of a job. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - optional JobSpec spec = 2; - - // Status is a structure describing current status of a job. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - optional JobStatus status = 3; -} - -// JobCondition describes current state of a job. -message JobCondition { - // Type of job condition, Complete or Failed. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // Last time the condition was checked. - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastProbeTime = 3; - - // Last time the condition transit from one status to another. - optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4; - - // (brief) reason for the condition's last transition. - optional string reason = 5; - - // Human readable message indicating details about last transition. - optional string message = 6; -} - -// JobList is a collection of jobs. -message JobList { - // Standard list metadata - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; - - // Items is the list of Job. - repeated Job items = 2; -} - -// JobSpec describes how the job execution will look like. -message JobSpec { - // Parallelism specifies the maximum desired number of pods the job should - // run at any given time. The actual number of pods running in steady state will - // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), - // i.e. when the work left to do is less than max parallelism. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - optional int32 parallelism = 1; - - // Completions specifies the desired number of successfully finished pods the - // job should be run with. Setting to nil means that the success of any - // pod signals the success of all pods, and allows parallelism to have any positive - // value. Setting to 1 means that parallelism is limited to 1 and the success of that - // pod signals the success of the job. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - optional int32 completions = 2; - - // Optional duration in seconds relative to the startTime that the job may be active - // before the system tries to terminate it; value must be positive integer - optional int64 activeDeadlineSeconds = 3; - - // Selector is a label query over pods that should match the pod count. - // Normally, the system sets this field for you. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - optional LabelSelector selector = 4; - - // AutoSelector controls generation of pod labels and pod selectors. - // It was not present in the original extensions/v1beta1 Job definition, but exists - // to allow conversion from batch/v1 Jobs, where it corresponds to, but has the opposite - // meaning as, ManualSelector. - // More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md - optional bool autoSelector = 5; - - // Template is the object that describes the pod that will be created when - // executing a job. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 6; -} - -// JobStatus represents the current state of a Job. -message JobStatus { - // Conditions represent the latest available observations of an object's current state. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - repeated JobCondition conditions = 1; - - // StartTime represents time when the job was acknowledged by the Job Manager. - // It is not guaranteed to be set in happens-before order across separate operations. - // It is represented in RFC3339 form and is in UTC. - optional k8s.io.kubernetes.pkg.api.unversioned.Time startTime = 2; - - // CompletionTime represents time when the job was completed. It is not guaranteed to - // be set in happens-before order across separate operations. - // It is represented in RFC3339 form and is in UTC. - optional k8s.io.kubernetes.pkg.api.unversioned.Time completionTime = 3; - - // Active is the number of actively running pods. - optional int32 active = 4; - - // Succeeded is the number of pods which reached Phase Succeeded. - optional int32 succeeded = 5; - - // Failed is the number of pods which reached Phase Failed. - optional int32 failed = 6; -} - -// A label selector is a label query over a set of resources. The result of matchLabels and -// matchExpressions are ANDed. An empty label selector matches all objects. A null -// label selector matches no objects. -message LabelSelector { - // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - // map is equivalent to an element of matchExpressions, whose key field is "key", the - // operator is "In", and the values array contains only "value". The requirements are ANDed. - map matchLabels = 1; - - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - repeated LabelSelectorRequirement matchExpressions = 2; -} - -// A label selector requirement is a selector that contains values, a key, and an operator that -// relates the key and values. -message LabelSelectorRequirement { - // key is the label key that the selector applies to. - optional string key = 1; - - // operator represents a key's relationship to a set of values. - // Valid operators ard In, NotIn, Exists and DoesNotExist. - optional string operator = 2; - - // values is an array of string values. If the operator is In or NotIn, - // the values array must be non-empty. If the operator is Exists or DoesNotExist, - // the values array must be empty. This array is replaced during a strategic - // merge patch. - repeated string values = 3; -} - -// ListOptions is the query options to a standard REST list call. -message ListOptions { - // A selector to restrict the list of returned objects by their labels. - // Defaults to everything. - optional string labelSelector = 1; - - // A selector to restrict the list of returned objects by their fields. - // Defaults to everything. - optional string fieldSelector = 2; - - // Watch for changes to the described resources and return them as a stream of - // add, update, and remove notifications. Specify resourceVersion. - optional bool watch = 3; - - // When specified with a watch call, shows changes that occur after that particular version of a resource. - // Defaults to changes from the beginning of history. - optional string resourceVersion = 4; - - // Timeout for the list/watch call. - optional int64 timeoutSeconds = 5; -} - message NetworkPolicy { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior for this NetworkPolicy. + // +optional optional NetworkPolicySpec spec = 2; } @@ -643,6 +544,7 @@ message NetworkPolicyIngressRule { // If this field is present and contains at least one item, then this rule allows traffic // only if the traffic matches at least one port in the list. // TODO: Update this to be a pointer to slice as soon as auto-generation supports it. + // +optional repeated NetworkPolicyPort ports = 1; // List of sources which should be able to access the pods selected for this rule. @@ -652,6 +554,7 @@ message NetworkPolicyIngressRule { // If this field is present and contains at least on item, this rule allows traffic only if the // traffic matches at least one item in the from list. // TODO: Update this to be a pointer to slice as soon as auto-generation supports it. + // +optional repeated NetworkPolicyPeer from = 2; } @@ -659,7 +562,8 @@ message NetworkPolicyIngressRule { message NetworkPolicyList { // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is a list of schema objects. repeated NetworkPolicy items = 2; @@ -670,19 +574,22 @@ message NetworkPolicyPeer { // This field follows standard label selector semantics. // If not provided, this selector selects no pods. // If present but empty, this selector selects all pods in this namespace. - optional LabelSelector podSelector = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1; // Selects Namespaces using cluster scoped-labels. This // matches all pods in all namespaces selected by this label selector. // This field follows standard label selector semantics. // If omitted, this selector selects no namespaces. // If present but empty, this selector selects all namespaces. - optional LabelSelector namespaceSelector = 2; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2; } message NetworkPolicyPort { // Optional. The protocol (TCP or UDP) which traffic must match. // If not specified, this field defaults to TCP. + // +optional optional string protocol = 1; // If specified, the port on the given protocol. This can @@ -690,7 +597,8 @@ message NetworkPolicyPort { // this matches all port names and numbers. // If present, only traffic on the specified protocol AND port // will be matched. - optional k8s.io.kubernetes.pkg.util.intstr.IntOrString port = 2; + // +optional + optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2; } message NetworkPolicySpec { @@ -699,7 +607,7 @@ message NetworkPolicySpec { // same set of pods. In this case, the ingress rules for each are combined additively. // This field is NOT optional and follows standard label selector semantics. // An empty podSelector matches all pods in this namespace. - optional LabelSelector podSelector = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1; // List of ingress rules to be applied to the selected pods. // Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, @@ -709,6 +617,7 @@ message NetworkPolicySpec { // If this field is empty then this NetworkPolicy does not affect ingress isolation. // If this field is present and contains at least one rule, this policy allows any traffic // which matches at least one of the ingress rules in this list. + // +optional repeated NetworkPolicyIngressRule ingress = 2; } @@ -717,9 +626,11 @@ message NetworkPolicySpec { message PodSecurityPolicy { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // spec defines the policy enforced. + // +optional optional PodSecurityPolicySpec spec = 2; } @@ -727,7 +638,8 @@ message PodSecurityPolicy { message PodSecurityPolicyList { // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is a list of schema objects. repeated PodSecurityPolicy items = 2; @@ -736,36 +648,45 @@ message PodSecurityPolicyList { // Pod Security Policy Spec defines the policy enforced. message PodSecurityPolicySpec { // privileged determines if a pod can request to be run as privileged. + // +optional optional bool privileged = 1; // DefaultAddCapabilities is the default set of capabilities that will be added to the container // unless the pod spec specifically drops the capability. You may not list a capabiility in both // DefaultAddCapabilities and RequiredDropCapabilities. + // +optional repeated string defaultAddCapabilities = 2; // RequiredDropCapabilities are the capabilities that will be dropped from the container. These // are required to be dropped and cannot be added. + // +optional repeated string requiredDropCapabilities = 3; // AllowedCapabilities is a list of capabilities that can be requested to add to the container. // Capabilities in this field may be added at the pod author's discretion. // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities. + // +optional repeated string allowedCapabilities = 4; // volumes is a white list of allowed volume plugins. Empty indicates that all plugins // may be used. + // +optional repeated string volumes = 5; // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. + // +optional optional bool hostNetwork = 6; // hostPorts determines which host port ranges are allowed to be exposed. + // +optional repeated HostPortRange hostPorts = 7; // hostPID determines if the policy allows the use of HostPID in the pod spec. + // +optional optional bool hostPID = 8; // hostIPC determines if the policy allows the use of HostIPC in the pod spec. + // +optional optional bool hostIPC = 9; // seLinux is the strategy that will dictate the allowable labels that may be set. @@ -785,6 +706,7 @@ message PodSecurityPolicySpec { // the PSP should deny the pod. // If set to false the container may run with a read only root file system if it wishes but it // will not be forced to. + // +optional optional bool readOnlyRootFilesystem = 14; } @@ -793,10 +715,12 @@ message ReplicaSet { // If the Labels of a ReplicaSet are empty, they are defaulted to // be the same as the Pod(s) that the ReplicaSet manages. // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the specification of the desired behavior of the ReplicaSet. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional ReplicaSetSpec spec = 2; // Status is the most recently observed status of the ReplicaSet. @@ -804,17 +728,40 @@ message ReplicaSet { // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional optional ReplicaSetStatus status = 3; } +// ReplicaSetCondition describes the state of a replica set at a certain point. +message ReplicaSetCondition { + // Type of replica set condition. + optional string type = 1; + + // Status of the condition, one of True, False, Unknown. + optional string status = 2; + + // The last time the condition transitioned from one status to another. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; + + // The reason for the condition's last transition. + // +optional + optional string reason = 4; + + // A human readable message indicating details about the transition. + // +optional + optional string message = 5; +} + // ReplicaSetList is a collection of ReplicaSets. message ReplicaSetList { // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of ReplicaSets. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md + // More info: http://kubernetes.io/docs/user-guide/replication-controller repeated ReplicaSet items = 2; } @@ -823,35 +770,55 @@ message ReplicaSetSpec { // Replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // Defaults to 1. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller + // More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller + // +optional optional int32 replicas = 1; + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + // +optional + optional int32 minReadySeconds = 4; + // Selector is a label query over pods that should match the replica count. // If the selector is empty, it is defaulted to the labels present on the pod template. // Label keys and values that must match in order to be controlled by this replica set. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - optional LabelSelector selector = 2; + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; // Template is the object that describes the pod that will be created if // insufficient replicas are detected. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template + // More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template + // +optional optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3; } // ReplicaSetStatus represents the current status of a ReplicaSet. message ReplicaSetStatus { // Replicas is the most recently oberved number of replicas. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller + // More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller optional int32 replicas = 1; // The number of pods that have labels matching the labels of the pod template of the replicaset. + // +optional optional int32 fullyLabeledReplicas = 2; // The number of ready replicas for this replica set. + // +optional optional int32 readyReplicas = 4; + // The number of available replicas (ready for at least minReadySeconds) for this replica set. + // +optional + optional int32 availableReplicas = 5; + // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. + // +optional optional int64 observedGeneration = 3; + + // Represents the latest available observations of a replica set's current state. + // +optional + repeated ReplicaSetCondition conditions = 6; } // Dummy definition @@ -860,14 +827,35 @@ message ReplicationControllerDummy { message RollbackConfig { // The revision to rollback to. If set to 0, rollbck to the last revision. + // +optional optional int64 revision = 1; } +// Spec to control the desired behavior of daemon set rolling update. +message RollingUpdateDaemonSet { + // The maximum number of DaemonSet pods that can be unavailable during the + // update. Value can be an absolute number (ex: 5) or a percentage of total + // number of DaemonSet pods at the start of the update (ex: 10%). Absolute + // number is calculated from percentage by rounding up. + // This cannot be 0. + // Default value is 1. + // Example: when this is set to 30%, at most 30% of the total number of nodes + // that should be running the daemon pod (i.e. status.desiredNumberScheduled) + // can have their pods stopped for an update at any given + // time. The update starts by stopping at most 30% of those DaemonSet pods + // and then brings up new DaemonSet pods in their place. Once the new pods + // are available, it then proceeds onto other DaemonSet pods, thus ensuring + // that at least 70% of original number of DaemonSet pods are available at + // all times during the update. + // +optional + optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1; +} + // Spec to control the desired behavior of rolling update. message RollingUpdateDeployment { // The maximum number of pods that can be unavailable during the update. // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - // Absolute number is calculated from percentage by rounding up. + // Absolute number is calculated from percentage by rounding down. // This can not be 0 if MaxSurge is 0. // By default, a fixed value of 1 is used. // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods @@ -875,7 +863,8 @@ message RollingUpdateDeployment { // can be scaled down further, followed by scaling up the new RC, ensuring // that the total number of pods available at all times during the update is at // least 70% of desired pods. - optional k8s.io.kubernetes.pkg.util.intstr.IntOrString maxUnavailable = 1; + // +optional + optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1; // The maximum number of pods that can be scheduled above the desired number of // pods. @@ -888,7 +877,8 @@ message RollingUpdateDeployment { // 130% of desired pods. Once old pods have been killed, // new RC can be scaled up further, ensuring that total number of pods running // at any time during the update is atmost 130% of desired pods. - optional k8s.io.kubernetes.pkg.util.intstr.IntOrString maxSurge = 2; + // +optional + optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2; } // Run A sUser Strategy Options defines the strategy type and any options used to create the strategy. @@ -897,6 +887,7 @@ message RunAsUserStrategyOptions { optional string rule = 1; // Ranges are the allowed ranges of uids that may be used. + // +optional repeated IDRange ranges = 2; } @@ -907,24 +898,29 @@ message SELinuxStrategyOptions { // seLinuxOptions required to run as; required for MustRunAs // More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context + // +optional optional k8s.io.kubernetes.pkg.api.v1.SELinuxOptions seLinuxOptions = 2; } // represents a scaling request for a resource. message Scale { // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + // +optional optional ScaleSpec spec = 2; // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only. + // +optional optional ScaleStatus status = 3; } // describes the attributes of a scale subresource message ScaleSpec { // desired number of instances for the scaled object. + // +optional optional int32 replicas = 1; } @@ -933,7 +929,8 @@ message ScaleStatus { // actual number of observed instances of the scaled object. optional int32 replicas = 1; - // label query over pods that should match the replicas count. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors + // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional map selector = 2; // label selector for pods that should match the replicas count. This is a serializated @@ -941,32 +938,20 @@ message ScaleStatus { // avoid introspection in the clients. The string will be in the same format as the // query-param syntax. If the target type only supports map-based selectors, both this // field and map-based selector field are populated. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional optional string targetSelector = 3; } -// SubresourceReference contains enough information to let you inspect or modify the referred subresource. -message SubresourceReference { - // Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds - optional string kind = 1; - - // Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names - optional string name = 2; - - // API version of the referent - optional string apiVersion = 3; - - // Subresource name of the referent - optional string subresource = 4; -} - // SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. message SupplementalGroupsStrategyOptions { // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. + // +optional optional string rule = 1; // Ranges are the allowed ranges of supplemental groups. If you would like to force a single // supplemental group then supply a single range with the same start and end. + // +optional repeated IDRange ranges = 2; } @@ -974,21 +959,26 @@ message SupplementalGroupsStrategyOptions { // types to the API. It consists of one or more Versions of the api. message ThirdPartyResource { // Standard object metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Description is the description of this object. + // +optional optional string description = 2; // Versions are versions for this third party object + // +optional repeated APIVersion versions = 3; } // An internal object, used for versioned storage in etcd. Not exposed to the end user. message ThirdPartyResourceData { // Standard object metadata. - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Data is the raw JSON data for this data. + // +optional optional bytes data = 2; } @@ -996,7 +986,8 @@ message ThirdPartyResourceData { message ThirdPartyResourceDataList { // Standard list metadata // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is the list of ThirdpartyResourceData. repeated ThirdPartyResourceData items = 2; @@ -1005,7 +996,8 @@ message ThirdPartyResourceDataList { // ThirdPartyResourceList is a list of ThirdPartyResources. message ThirdPartyResourceList { // Standard list metadata. - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is the list of ThirdPartyResources. repeated ThirdPartyResource items = 2; diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/register.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/register.go similarity index 76% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/register.go rename to vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/register.go index fb6bf0c5b..fa5b2e1b2 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/register.go @@ -17,17 +17,21 @@ limitations under the License. package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/runtime" - versionedwatch "k8s.io/client-go/1.5/pkg/watch/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "extensions" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1beta1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs) @@ -40,10 +44,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &Deployment{}, &DeploymentList{}, &DeploymentRollback{}, - &HorizontalPodAutoscaler{}, - &HorizontalPodAutoscalerList{}, - &Job{}, - &JobList{}, &ReplicationControllerDummy{}, &Scale{}, &ThirdPartyResource{}, @@ -54,8 +54,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ThirdPartyResourceDataList{}, &Ingress{}, &IngressList{}, - &ListOptions{}, - &v1.DeleteOptions{}, &ReplicaSet{}, &ReplicaSetList{}, &PodSecurityPolicy{}, @@ -64,6 +62,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &NetworkPolicyList{}, ) // Add the watch version that applies - versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go similarity index 50% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/types.generated.go rename to vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go index a2fd0549d..4f179e34f 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/types.generated.go +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go @@ -19,17 +19,17 @@ limitations under the License. // THIS FILE IS AUTO-GENERATED BY codecgen. // ************************************************************ -package extensions +package v1beta1 import ( "errors" "fmt" codec1978 "github.com/ugorji/go/codec" - pkg2_api "k8s.io/client-go/1.5/pkg/api" - pkg4_resource "k8s.io/client-go/1.5/pkg/api/resource" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg3_types "k8s.io/client-go/1.5/pkg/types" - pkg5_intstr "k8s.io/client-go/1.5/pkg/util/intstr" + pkg3_resource "k8s.io/apimachinery/pkg/api/resource" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + pkg5_intstr "k8s.io/apimachinery/pkg/util/intstr" + pkg4_v1 "k8s.io/client-go/pkg/api/v1" "reflect" "runtime" time "time" @@ -65,11 +65,11 @@ func init() { panic(err) } if false { // reference the types, but skip this branch at build/run time - var v0 pkg2_api.ObjectMeta - var v1 pkg4_resource.Quantity - var v2 pkg1_unversioned.LabelSelector - var v3 pkg3_types.UID - var v4 pkg5_intstr.IntOrString + var v0 pkg3_resource.Quantity + var v1 pkg1_v1.TypeMeta + var v2 pkg2_types.UID + var v3 pkg5_intstr.IntOrString + var v4 pkg4_v1.PodTemplateSpec var v5 time.Time _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 } @@ -144,25 +144,25 @@ func (x *ScaleSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym6 := z.DecBinary() - _ = yym6 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct7 := r.ContainerType() - if yyct7 == codecSelferValueTypeMap1234 { - yyl7 := r.ReadMapStart() - if yyl7 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl7, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct7 == codecSelferValueTypeArray1234 { - yyl7 := r.ReadArrayStart() - if yyl7 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl7, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -174,12 +174,12 @@ func (x *ScaleSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys8Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys8Slc - var yyhl8 bool = l >= 0 - for yyj8 := 0; ; yyj8++ { - if yyhl8 { - if yyj8 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -188,24 +188,288 @@ func (x *ScaleSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys8Slc = r.DecodeBytes(yys8Slc, true, true) - yys8 := string(yys8Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys8 { + switch yys3 { case "replicas": if r.TryDecodeAsNil() { x.Replicas = 0 } else { - x.Replicas = int32(r.DecodeInt(32)) + yyv4 := &x.Replicas + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } } default: - z.DecStructFieldNotFound(-1, yys8) - } // end switch yys8 - } // end for yyj8 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } func (x *ScaleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv7 := &x.Replicas + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*int32)(yyv7)) = int32(r.DecodeInt(32)) + } + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj6-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ScaleStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = len(x.Selector) != 0 + yyq2[2] = x.TargetSelector != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Selector == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + z.F.EncMapStringStringV(x.Selector, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("selector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Selector == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + z.F.EncMapStringStringV(x.Selector, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.TargetSelector)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("targetSelector")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.TargetSelector)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ScaleStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ScaleStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "replicas": + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv4 := &x.Replicas + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } + } + case "selector": + if r.TryDecodeAsNil() { + x.Selector = nil + } else { + yyv6 := &x.Selector + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + z.F.DecMapStringStringX(yyv6, false, d) + } + } + case "targetSelector": + if r.TryDecodeAsNil() { + x.TargetSelector = "" + } else { + yyv8 := &x.TargetSelector + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ScaleStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -226,7 +490,57 @@ func (x *ScaleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Replicas = 0 } else { - x.Replicas = int32(r.DecodeInt(32)) + yyv11 := &x.Replicas + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*int32)(yyv11)) = int32(r.DecodeInt(32)) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Selector = nil + } else { + yyv13 := &x.Selector + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + z.F.DecMapStringStringX(yyv13, false, d) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TargetSelector = "" + } else { + yyv15 := &x.TargetSelector + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } for { yyj10++ @@ -244,248 +558,6 @@ func (x *ScaleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *ScaleStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym12 := z.EncBinary() - _ = yym12 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep13 := !z.EncBinary() - yy2arr13 := z.EncBasicHandle().StructToArray - var yyq13 [2]bool - _, _, _ = yysep13, yyq13, yy2arr13 - const yyr13 bool = false - yyq13[1] = x.Selector != nil - var yynn13 int - if yyr13 || yy2arr13 { - r.EncodeArrayStart(2) - } else { - yynn13 = 1 - for _, b := range yyq13 { - if b { - yynn13++ - } - } - r.EncodeMapStart(yynn13) - yynn13 = 0 - } - if yyr13 || yy2arr13 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym15 := z.EncBinary() - _ = yym15 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym16 := z.EncBinary() - _ = yym16 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) - } - } - if yyr13 || yy2arr13 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq13[1] { - if x.Selector == nil { - r.EncodeNil() - } else { - yym18 := z.EncBinary() - _ = yym18 - if false { - } else if z.HasExtensions() && z.EncExt(x.Selector) { - } else { - z.EncFallback(x.Selector) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq13[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("selector")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Selector == nil { - r.EncodeNil() - } else { - yym19 := z.EncBinary() - _ = yym19 - if false { - } else if z.HasExtensions() && z.EncExt(x.Selector) { - } else { - z.EncFallback(x.Selector) - } - } - } - } - if yyr13 || yy2arr13 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ScaleStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym20 := z.DecBinary() - _ = yym20 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct21 := r.ContainerType() - if yyct21 == codecSelferValueTypeMap1234 { - yyl21 := r.ReadMapStart() - if yyl21 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl21, d) - } - } else if yyct21 == codecSelferValueTypeArray1234 { - yyl21 := r.ReadArrayStart() - if yyl21 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl21, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ScaleStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys22Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys22Slc - var yyhl22 bool = l >= 0 - for yyj22 := 0; ; yyj22++ { - if yyhl22 { - if yyj22 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys22Slc = r.DecodeBytes(yys22Slc, true, true) - yys22 := string(yys22Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys22 { - case "replicas": - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - case "selector": - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(pkg1_unversioned.LabelSelector) - } - yym25 := z.DecBinary() - _ = yym25 - if false { - } else if z.HasExtensions() && z.DecExt(x.Selector) { - } else { - z.DecFallback(x.Selector, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys22) - } // end switch yys22 - } // end for yyj22 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ScaleStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj26 int - var yyb26 bool - var yyhl26 bool = l >= 0 - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Replicas = 0 - } else { - x.Replicas = int32(r.DecodeInt(32)) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - if x.Selector != nil { - x.Selector = nil - } - } else { - if x.Selector == nil { - x.Selector = new(pkg1_unversioned.LabelSelector) - } - yym29 := z.DecBinary() - _ = yym29 - if false { - } else if z.HasExtensions() && z.DecExt(x.Selector) { - } else { - z.DecFallback(x.Selector, false) - } - } - for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj26-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -493,39 +565,39 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym30 := z.EncBinary() - _ = yym30 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep31 := !z.EncBinary() - yy2arr31 := z.EncBasicHandle().StructToArray - var yyq31 [5]bool - _, _, _ = yysep31, yyq31, yy2arr31 - const yyr31 bool = false - yyq31[0] = x.Kind != "" - yyq31[1] = x.APIVersion != "" - yyq31[2] = true - yyq31[3] = true - yyq31[4] = true - var yynn31 int - if yyr31 || yy2arr31 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn31 = 0 - for _, b := range yyq31 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn31++ + yynn2++ } } - r.EncodeMapStart(yynn31) - yynn31 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr31 || yy2arr31 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq31[0] { - yym33 := z.EncBinary() - _ = yym33 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -534,23 +606,23 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq31[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym34 := z.EncBinary() - _ = yym34 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr31 || yy2arr31 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq31[1] { - yym36 := z.EncBinary() - _ = yym36 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -559,70 +631,82 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq31[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym37 := z.EncBinary() - _ = yym37 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr31 || yy2arr31 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq31[2] { - yy39 := &x.ObjectMeta - yy39.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq31[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy40 := &x.ObjectMeta - yy40.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr31 || yy2arr31 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq31[3] { - yy42 := &x.Spec - yy42.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq31[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy43 := &x.Spec - yy43.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr31 || yy2arr31 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq31[4] { - yy45 := &x.Status - yy45.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq31[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy46 := &x.Status - yy46.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr31 || yy2arr31 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -635,25 +719,25 @@ func (x *Scale) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym47 := z.DecBinary() - _ = yym47 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct48 := r.ContainerType() - if yyct48 == codecSelferValueTypeMap1234 { - yyl48 := r.ReadMapStart() - if yyl48 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl48, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct48 == codecSelferValueTypeArray1234 { - yyl48 := r.ReadArrayStart() - if yyl48 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl48, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -665,12 +749,12 @@ func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys49Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys49Slc - var yyhl49 bool = l >= 0 - for yyj49 := 0; ; yyj49++ { - if yyhl49 { - if yyj49 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -679,47 +763,65 @@ func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys49Slc = r.DecodeBytes(yys49Slc, true, true) - yys49 := string(yys49Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys49 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv52 := &x.ObjectMeta - yyv52.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ScaleSpec{} } else { - yyv53 := &x.Spec - yyv53.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ScaleStatus{} } else { - yyv54 := &x.Status - yyv54.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys49) - } // end switch yys49 - } // end for yyj49 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -727,16 +829,16 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj55 int - var yyb55 bool - var yyhl55 bool = l >= 0 - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb55 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb55 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -744,15 +846,21 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb55 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb55 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -760,32 +868,44 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb55 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb55 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv58 := &x.ObjectMeta - yyv58.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb55 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb55 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -793,16 +913,16 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ScaleSpec{} } else { - yyv59 := &x.Spec - yyv59.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb55 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb55 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -810,21 +930,21 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ScaleStatus{} } else { - yyv60 := &x.Status - yyv60.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj55++ - if yyhl55 { - yyb55 = yyj55 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb55 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb55 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj55-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -836,36 +956,36 @@ func (x *ReplicationControllerDummy) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym61 := z.EncBinary() - _ = yym61 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep62 := !z.EncBinary() - yy2arr62 := z.EncBasicHandle().StructToArray - var yyq62 [2]bool - _, _, _ = yysep62, yyq62, yy2arr62 - const yyr62 bool = false - yyq62[0] = x.Kind != "" - yyq62[1] = x.APIVersion != "" - var yynn62 int - if yyr62 || yy2arr62 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn62 = 0 - for _, b := range yyq62 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn62++ + yynn2++ } } - r.EncodeMapStart(yynn62) - yynn62 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr62 || yy2arr62 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq62[0] { - yym64 := z.EncBinary() - _ = yym64 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -874,23 +994,23 @@ func (x *ReplicationControllerDummy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq62[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym65 := z.EncBinary() - _ = yym65 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr62 || yy2arr62 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq62[1] { - yym67 := z.EncBinary() - _ = yym67 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -899,19 +1019,19 @@ func (x *ReplicationControllerDummy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq62[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym68 := z.EncBinary() - _ = yym68 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr62 || yy2arr62 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -924,25 +1044,25 @@ func (x *ReplicationControllerDummy) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym69 := z.DecBinary() - _ = yym69 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct70 := r.ContainerType() - if yyct70 == codecSelferValueTypeMap1234 { - yyl70 := r.ReadMapStart() - if yyl70 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl70, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct70 == codecSelferValueTypeArray1234 { - yyl70 := r.ReadArrayStart() - if yyl70 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl70, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -954,12 +1074,12 @@ func (x *ReplicationControllerDummy) codecDecodeSelfFromMap(l int, d *codec1978. var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys71Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys71Slc - var yyhl71 bool = l >= 0 - for yyj71 := 0; ; yyj71++ { - if yyhl71 { - if yyj71 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -968,26 +1088,38 @@ func (x *ReplicationControllerDummy) codecDecodeSelfFromMap(l int, d *codec1978. } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys71Slc = r.DecodeBytes(yys71Slc, true, true) - yys71 := string(yys71Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys71 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys71) - } // end switch yys71 - } // end for yyj71 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -995,16 +1127,16 @@ func (x *ReplicationControllerDummy) codecDecodeSelfFromArray(l int, d *codec197 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj74 int - var yyb74 bool - var yyhl74 bool = l >= 0 - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb74 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb74 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1012,15 +1144,21 @@ func (x *ReplicationControllerDummy) codecDecodeSelfFromArray(l int, d *codec197 if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv9 := &x.Kind + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } } - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb74 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb74 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1028,20 +1166,26 @@ func (x *ReplicationControllerDummy) codecDecodeSelfFromArray(l int, d *codec197 if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv11 := &x.APIVersion + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } for { - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb74 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb74 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj74-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1053,33 +1197,33 @@ func (x *CustomMetricTarget) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym77 := z.EncBinary() - _ = yym77 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep78 := !z.EncBinary() - yy2arr78 := z.EncBasicHandle().StructToArray - var yyq78 [2]bool - _, _, _ = yysep78, yyq78, yy2arr78 - const yyr78 bool = false - var yynn78 int - if yyr78 || yy2arr78 { + 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 { - yynn78 = 2 - for _, b := range yyq78 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn78++ + yynn2++ } } - r.EncodeMapStart(yynn78) - yynn78 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr78 || yy2arr78 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym80 := z.EncBinary() - _ = yym80 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -1088,41 +1232,41 @@ func (x *CustomMetricTarget) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym81 := z.EncBinary() - _ = yym81 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr78 || yy2arr78 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy83 := &x.TargetValue - yym84 := z.EncBinary() - _ = yym84 + yy7 := &x.TargetValue + yym8 := z.EncBinary() + _ = yym8 if false { - } else if z.HasExtensions() && z.EncExt(yy83) { - } else if !yym84 && z.IsJSONHandle() { - z.EncJSONMarshal(yy83) + } else if z.HasExtensions() && z.EncExt(yy7) { + } else if !yym8 && z.IsJSONHandle() { + z.EncJSONMarshal(yy7) } else { - z.EncFallback(yy83) + z.EncFallback(yy7) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("value")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy85 := &x.TargetValue - yym86 := z.EncBinary() - _ = yym86 + yy9 := &x.TargetValue + yym10 := z.EncBinary() + _ = yym10 if false { - } else if z.HasExtensions() && z.EncExt(yy85) { - } else if !yym86 && z.IsJSONHandle() { - z.EncJSONMarshal(yy85) + } else if z.HasExtensions() && z.EncExt(yy9) { + } else if !yym10 && z.IsJSONHandle() { + z.EncJSONMarshal(yy9) } else { - z.EncFallback(yy85) + z.EncFallback(yy9) } } - if yyr78 || yy2arr78 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1135,25 +1279,25 @@ func (x *CustomMetricTarget) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym87 := z.DecBinary() - _ = yym87 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct88 := r.ContainerType() - if yyct88 == codecSelferValueTypeMap1234 { - yyl88 := r.ReadMapStart() - if yyl88 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl88, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct88 == codecSelferValueTypeArray1234 { - yyl88 := r.ReadArrayStart() - if yyl88 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl88, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -1165,12 +1309,12 @@ func (x *CustomMetricTarget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys89Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys89Slc - var yyhl89 bool = l >= 0 - for yyj89 := 0; ; yyj89++ { - if yyhl89 { - if yyj89 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -1179,35 +1323,41 @@ func (x *CustomMetricTarget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys89Slc = r.DecodeBytes(yys89Slc, true, true) - yys89 := string(yys89Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys89 { + switch yys3 { case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "value": if r.TryDecodeAsNil() { - x.TargetValue = pkg4_resource.Quantity{} + x.TargetValue = pkg3_resource.Quantity{} } else { - yyv91 := &x.TargetValue - yym92 := z.DecBinary() - _ = yym92 + yyv6 := &x.TargetValue + yym7 := z.DecBinary() + _ = yym7 if false { - } else if z.HasExtensions() && z.DecExt(yyv91) { - } else if !yym92 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv91) + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) } else { - z.DecFallback(yyv91, false) + z.DecFallback(yyv6, false) } } default: - z.DecStructFieldNotFound(-1, yys89) - } // end switch yys89 - } // end for yyj89 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -1215,16 +1365,16 @@ func (x *CustomMetricTarget) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj93 int - var yyb93 bool - var yyhl93 bool = l >= 0 - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb93 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb93 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1232,45 +1382,51 @@ func (x *CustomMetricTarget) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv9 := &x.Name + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } } - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb93 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb93 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.TargetValue = pkg4_resource.Quantity{} + x.TargetValue = pkg3_resource.Quantity{} } else { - yyv95 := &x.TargetValue - yym96 := z.DecBinary() - _ = yym96 + yyv11 := &x.TargetValue + yym12 := z.DecBinary() + _ = yym12 if false { - } else if z.HasExtensions() && z.DecExt(yyv95) { - } else if !yym96 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv95) + } else if z.HasExtensions() && z.DecExt(yyv11) { + } else if !yym12 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv11) } else { - z.DecFallback(yyv95, false) + z.DecFallback(yyv11, false) } } for { - yyj93++ - if yyhl93 { - yyb93 = yyj93 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb93 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb93 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj93-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1282,36 +1438,36 @@ func (x *CustomMetricTargetList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym97 := z.EncBinary() - _ = yym97 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep98 := !z.EncBinary() - yy2arr98 := z.EncBasicHandle().StructToArray - var yyq98 [1]bool - _, _, _ = yysep98, yyq98, yy2arr98 - const yyr98 bool = false - var yynn98 int - if yyr98 || yy2arr98 { + 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 { - yynn98 = 1 - for _, b := range yyq98 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn98++ + yynn2++ } } - r.EncodeMapStart(yynn98) - yynn98 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr98 || yy2arr98 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym100 := z.EncBinary() - _ = yym100 + yym4 := z.EncBinary() + _ = yym4 if false { } else { h.encSliceCustomMetricTarget(([]CustomMetricTarget)(x.Items), e) @@ -1324,15 +1480,15 @@ func (x *CustomMetricTargetList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym101 := z.EncBinary() - _ = yym101 + yym5 := z.EncBinary() + _ = yym5 if false { } else { h.encSliceCustomMetricTarget(([]CustomMetricTarget)(x.Items), e) } } } - if yyr98 || yy2arr98 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1345,25 +1501,25 @@ func (x *CustomMetricTargetList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym102 := z.DecBinary() - _ = yym102 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct103 := r.ContainerType() - if yyct103 == codecSelferValueTypeMap1234 { - yyl103 := r.ReadMapStart() - if yyl103 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl103, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct103 == codecSelferValueTypeArray1234 { - yyl103 := r.ReadArrayStart() - if yyl103 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl103, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -1375,12 +1531,12 @@ func (x *CustomMetricTargetList) codecDecodeSelfFromMap(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys104Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys104Slc - var yyhl104 bool = l >= 0 - for yyj104 := 0; ; yyj104++ { - if yyhl104 { - if yyj104 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -1389,26 +1545,26 @@ func (x *CustomMetricTargetList) codecDecodeSelfFromMap(l int, d *codec1978.Deco } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys104Slc = r.DecodeBytes(yys104Slc, true, true) - yys104 := string(yys104Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys104 { + switch yys3 { case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv105 := &x.Items - yym106 := z.DecBinary() - _ = yym106 + yyv4 := &x.Items + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSliceCustomMetricTarget((*[]CustomMetricTarget)(yyv105), d) + h.decSliceCustomMetricTarget((*[]CustomMetricTarget)(yyv4), d) } } default: - z.DecStructFieldNotFound(-1, yys104) - } // end switch yys104 - } // end for yyj104 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -1416,16 +1572,16 @@ func (x *CustomMetricTargetList) codecDecodeSelfFromArray(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj107 int - var yyb107 bool - var yyhl107 bool = l >= 0 - yyj107++ - if yyhl107 { - yyb107 = yyj107 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb107 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb107 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1433,26 +1589,26 @@ func (x *CustomMetricTargetList) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Items = nil } else { - yyv108 := &x.Items - yym109 := z.DecBinary() - _ = yym109 + yyv7 := &x.Items + yym8 := z.DecBinary() + _ = yym8 if false { } else { - h.decSliceCustomMetricTarget((*[]CustomMetricTarget)(yyv108), d) + h.decSliceCustomMetricTarget((*[]CustomMetricTarget)(yyv7), d) } } for { - yyj107++ - if yyhl107 { - yyb107 = yyj107 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb107 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb107 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj107-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1464,33 +1620,33 @@ func (x *CustomMetricCurrentStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym110 := z.EncBinary() - _ = yym110 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep111 := !z.EncBinary() - yy2arr111 := z.EncBasicHandle().StructToArray - var yyq111 [2]bool - _, _, _ = yysep111, yyq111, yy2arr111 - const yyr111 bool = false - var yynn111 int - if yyr111 || yy2arr111 { + 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 { - yynn111 = 2 - for _, b := range yyq111 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn111++ + yynn2++ } } - r.EncodeMapStart(yynn111) - yynn111 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr111 || yy2arr111 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym113 := z.EncBinary() - _ = yym113 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -1499,41 +1655,41 @@ func (x *CustomMetricCurrentStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym114 := z.EncBinary() - _ = yym114 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr111 || yy2arr111 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy116 := &x.CurrentValue - yym117 := z.EncBinary() - _ = yym117 + yy7 := &x.CurrentValue + yym8 := z.EncBinary() + _ = yym8 if false { - } else if z.HasExtensions() && z.EncExt(yy116) { - } else if !yym117 && z.IsJSONHandle() { - z.EncJSONMarshal(yy116) + } else if z.HasExtensions() && z.EncExt(yy7) { + } else if !yym8 && z.IsJSONHandle() { + z.EncJSONMarshal(yy7) } else { - z.EncFallback(yy116) + z.EncFallback(yy7) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("value")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy118 := &x.CurrentValue - yym119 := z.EncBinary() - _ = yym119 + yy9 := &x.CurrentValue + yym10 := z.EncBinary() + _ = yym10 if false { - } else if z.HasExtensions() && z.EncExt(yy118) { - } else if !yym119 && z.IsJSONHandle() { - z.EncJSONMarshal(yy118) + } else if z.HasExtensions() && z.EncExt(yy9) { + } else if !yym10 && z.IsJSONHandle() { + z.EncJSONMarshal(yy9) } else { - z.EncFallback(yy118) + z.EncFallback(yy9) } } - if yyr111 || yy2arr111 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1546,25 +1702,25 @@ func (x *CustomMetricCurrentStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym120 := z.DecBinary() - _ = yym120 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct121 := r.ContainerType() - if yyct121 == codecSelferValueTypeMap1234 { - yyl121 := r.ReadMapStart() - if yyl121 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl121, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct121 == codecSelferValueTypeArray1234 { - yyl121 := r.ReadArrayStart() - if yyl121 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl121, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -1576,12 +1732,12 @@ func (x *CustomMetricCurrentStatus) codecDecodeSelfFromMap(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys122Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys122Slc - var yyhl122 bool = l >= 0 - for yyj122 := 0; ; yyj122++ { - if yyhl122 { - if yyj122 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -1590,35 +1746,41 @@ func (x *CustomMetricCurrentStatus) codecDecodeSelfFromMap(l int, d *codec1978.D } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys122Slc = r.DecodeBytes(yys122Slc, true, true) - yys122 := string(yys122Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys122 { + switch yys3 { case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "value": if r.TryDecodeAsNil() { - x.CurrentValue = pkg4_resource.Quantity{} + x.CurrentValue = pkg3_resource.Quantity{} } else { - yyv124 := &x.CurrentValue - yym125 := z.DecBinary() - _ = yym125 + yyv6 := &x.CurrentValue + yym7 := z.DecBinary() + _ = yym7 if false { - } else if z.HasExtensions() && z.DecExt(yyv124) { - } else if !yym125 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv124) + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) } else { - z.DecFallback(yyv124, false) + z.DecFallback(yyv6, false) } } default: - z.DecStructFieldNotFound(-1, yys122) - } // end switch yys122 - } // end for yyj122 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -1626,16 +1788,16 @@ func (x *CustomMetricCurrentStatus) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj126 int - var yyb126 bool - var yyhl126 bool = l >= 0 - yyj126++ - if yyhl126 { - yyb126 = yyj126 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb126 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb126 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1643,45 +1805,51 @@ func (x *CustomMetricCurrentStatus) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv9 := &x.Name + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } } - yyj126++ - if yyhl126 { - yyb126 = yyj126 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb126 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb126 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.CurrentValue = pkg4_resource.Quantity{} + x.CurrentValue = pkg3_resource.Quantity{} } else { - yyv128 := &x.CurrentValue - yym129 := z.DecBinary() - _ = yym129 + yyv11 := &x.CurrentValue + yym12 := z.DecBinary() + _ = yym12 if false { - } else if z.HasExtensions() && z.DecExt(yyv128) { - } else if !yym129 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv128) + } else if z.HasExtensions() && z.DecExt(yyv11) { + } else if !yym12 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv11) } else { - z.DecFallback(yyv128, false) + z.DecFallback(yyv11, false) } } for { - yyj126++ - if yyhl126 { - yyb126 = yyj126 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb126 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb126 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj126-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1693,36 +1861,36 @@ func (x *CustomMetricCurrentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym130 := z.EncBinary() - _ = yym130 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep131 := !z.EncBinary() - yy2arr131 := z.EncBasicHandle().StructToArray - var yyq131 [1]bool - _, _, _ = yysep131, yyq131, yy2arr131 - const yyr131 bool = false - var yynn131 int - if yyr131 || yy2arr131 { + 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 { - yynn131 = 1 - for _, b := range yyq131 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn131++ + yynn2++ } } - r.EncodeMapStart(yynn131) - yynn131 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr131 || yy2arr131 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym133 := z.EncBinary() - _ = yym133 + yym4 := z.EncBinary() + _ = yym4 if false { } else { h.encSliceCustomMetricCurrentStatus(([]CustomMetricCurrentStatus)(x.Items), e) @@ -1735,15 +1903,15 @@ func (x *CustomMetricCurrentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym134 := z.EncBinary() - _ = yym134 + yym5 := z.EncBinary() + _ = yym5 if false { } else { h.encSliceCustomMetricCurrentStatus(([]CustomMetricCurrentStatus)(x.Items), e) } } } - if yyr131 || yy2arr131 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1756,25 +1924,25 @@ func (x *CustomMetricCurrentStatusList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym135 := z.DecBinary() - _ = yym135 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct136 := r.ContainerType() - if yyct136 == codecSelferValueTypeMap1234 { - yyl136 := r.ReadMapStart() - if yyl136 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl136, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct136 == codecSelferValueTypeArray1234 { - yyl136 := r.ReadArrayStart() - if yyl136 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl136, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -1786,12 +1954,12 @@ func (x *CustomMetricCurrentStatusList) codecDecodeSelfFromMap(l int, d *codec19 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys137Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys137Slc - var yyhl137 bool = l >= 0 - for yyj137 := 0; ; yyj137++ { - if yyhl137 { - if yyj137 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -1800,26 +1968,26 @@ func (x *CustomMetricCurrentStatusList) codecDecodeSelfFromMap(l int, d *codec19 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys137Slc = r.DecodeBytes(yys137Slc, true, true) - yys137 := string(yys137Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys137 { + switch yys3 { case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv138 := &x.Items - yym139 := z.DecBinary() - _ = yym139 + yyv4 := &x.Items + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSliceCustomMetricCurrentStatus((*[]CustomMetricCurrentStatus)(yyv138), d) + h.decSliceCustomMetricCurrentStatus((*[]CustomMetricCurrentStatus)(yyv4), d) } } default: - z.DecStructFieldNotFound(-1, yys137) - } // end switch yys137 - } // end for yyj137 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -1827,16 +1995,16 @@ func (x *CustomMetricCurrentStatusList) codecDecodeSelfFromArray(l int, d *codec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj140 int - var yyb140 bool - var yyhl140 bool = l >= 0 - yyj140++ - if yyhl140 { - yyb140 = yyj140 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb140 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb140 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1844,26 +2012,26 @@ func (x *CustomMetricCurrentStatusList) codecDecodeSelfFromArray(l int, d *codec if r.TryDecodeAsNil() { x.Items = nil } else { - yyv141 := &x.Items - yym142 := z.DecBinary() - _ = yym142 + yyv7 := &x.Items + yym8 := z.DecBinary() + _ = yym8 if false { } else { - h.decSliceCustomMetricCurrentStatus((*[]CustomMetricCurrentStatus)(yyv141), d) + h.decSliceCustomMetricCurrentStatus((*[]CustomMetricCurrentStatus)(yyv7), d) } } for { - yyj140++ - if yyhl140 { - yyb140 = yyj140 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb140 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb140 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj140-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1875,39 +2043,39 @@ func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym143 := z.EncBinary() - _ = yym143 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep144 := !z.EncBinary() - yy2arr144 := z.EncBasicHandle().StructToArray - var yyq144 [5]bool - _, _, _ = yysep144, yyq144, yy2arr144 - const yyr144 bool = false - yyq144[0] = x.Kind != "" - yyq144[1] = x.APIVersion != "" - yyq144[2] = true - yyq144[3] = x.Description != "" - yyq144[4] = len(x.Versions) != 0 - var yynn144 int - if yyr144 || yy2arr144 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = x.Description != "" + yyq2[4] = len(x.Versions) != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn144 = 0 - for _, b := range yyq144 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn144++ + yynn2++ } } - r.EncodeMapStart(yynn144) - yynn144 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr144 || yy2arr144 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq144[0] { - yym146 := z.EncBinary() - _ = yym146 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -1916,23 +2084,23 @@ func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq144[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym147 := z.EncBinary() - _ = yym147 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr144 || yy2arr144 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq144[1] { - yym149 := z.EncBinary() - _ = yym149 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -1941,40 +2109,52 @@ func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq144[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym150 := z.EncBinary() - _ = yym150 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr144 || yy2arr144 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq144[2] { - yy152 := &x.ObjectMeta - yy152.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq144[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy153 := &x.ObjectMeta - yy153.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr144 || yy2arr144 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq144[3] { - yym155 := z.EncBinary() - _ = yym155 + if yyq2[3] { + yym15 := z.EncBinary() + _ = yym15 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Description)) @@ -1983,26 +2163,26 @@ func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq144[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("description")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym156 := z.EncBinary() - _ = yym156 + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Description)) } } } - if yyr144 || yy2arr144 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq144[4] { + if yyq2[4] { if x.Versions == nil { r.EncodeNil() } else { - yym158 := z.EncBinary() - _ = yym158 + yym18 := z.EncBinary() + _ = yym18 if false { } else { h.encSliceAPIVersion(([]APIVersion)(x.Versions), e) @@ -2012,15 +2192,15 @@ func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq144[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("versions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Versions == nil { r.EncodeNil() } else { - yym159 := z.EncBinary() - _ = yym159 + yym19 := z.EncBinary() + _ = yym19 if false { } else { h.encSliceAPIVersion(([]APIVersion)(x.Versions), e) @@ -2028,7 +2208,7 @@ func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr144 || yy2arr144 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -2041,25 +2221,25 @@ func (x *ThirdPartyResource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym160 := z.DecBinary() - _ = yym160 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct161 := r.ContainerType() - if yyct161 == codecSelferValueTypeMap1234 { - yyl161 := r.ReadMapStart() - if yyl161 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl161, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct161 == codecSelferValueTypeArray1234 { - yyl161 := r.ReadArrayStart() - if yyl161 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl161, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -2071,12 +2251,12 @@ func (x *ThirdPartyResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys162Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys162Slc - var yyhl162 bool = l >= 0 - for yyj162 := 0; ; yyj162++ { - if yyhl162 { - if yyj162 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -2085,51 +2265,75 @@ func (x *ThirdPartyResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys162Slc = r.DecodeBytes(yys162Slc, true, true) - yys162 := string(yys162Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys162 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv165 := &x.ObjectMeta - yyv165.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "description": if r.TryDecodeAsNil() { x.Description = "" } else { - x.Description = string(r.DecodeString()) + yyv10 := &x.Description + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } case "versions": if r.TryDecodeAsNil() { x.Versions = nil } else { - yyv167 := &x.Versions - yym168 := z.DecBinary() - _ = yym168 + yyv12 := &x.Versions + yym13 := z.DecBinary() + _ = yym13 if false { } else { - h.decSliceAPIVersion((*[]APIVersion)(yyv167), d) + h.decSliceAPIVersion((*[]APIVersion)(yyv12), d) } } default: - z.DecStructFieldNotFound(-1, yys162) - } // end switch yys162 - } // end for yyj162 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -2137,16 +2341,16 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj169 int - var yyb169 bool - var yyhl169 bool = l >= 0 - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb169 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb169 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2154,15 +2358,21 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb169 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb169 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2170,32 +2380,44 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } } - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb169 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb169 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv172 := &x.ObjectMeta - yyv172.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb169 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb169 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2203,15 +2425,21 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Description = "" } else { - x.Description = string(r.DecodeString()) + yyv21 := &x.Description + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } } - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb169 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb169 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2219,26 +2447,26 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Versions = nil } else { - yyv174 := &x.Versions - yym175 := z.DecBinary() - _ = yym175 + yyv23 := &x.Versions + yym24 := z.DecBinary() + _ = yym24 if false { } else { - h.decSliceAPIVersion((*[]APIVersion)(yyv174), d) + h.decSliceAPIVersion((*[]APIVersion)(yyv23), d) } } for { - yyj169++ - if yyhl169 { - yyb169 = yyj169 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb169 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb169 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj169-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2250,37 +2478,37 @@ func (x *ThirdPartyResourceList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym176 := z.EncBinary() - _ = yym176 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep177 := !z.EncBinary() - yy2arr177 := z.EncBasicHandle().StructToArray - var yyq177 [4]bool - _, _, _ = yysep177, yyq177, yy2arr177 - const yyr177 bool = false - yyq177[0] = x.Kind != "" - yyq177[1] = x.APIVersion != "" - yyq177[2] = true - var yynn177 int - if yyr177 || yy2arr177 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn177 = 1 - for _, b := range yyq177 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn177++ + yynn2++ } } - r.EncodeMapStart(yynn177) - yynn177 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr177 || yy2arr177 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq177[0] { - yym179 := z.EncBinary() - _ = yym179 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -2289,23 +2517,23 @@ func (x *ThirdPartyResourceList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq177[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym180 := z.EncBinary() - _ = yym180 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr177 || yy2arr177 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq177[1] { - yym182 := z.EncBinary() - _ = yym182 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -2314,54 +2542,54 @@ func (x *ThirdPartyResourceList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq177[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym183 := z.EncBinary() - _ = yym183 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr177 || yy2arr177 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq177[2] { - yy185 := &x.ListMeta - yym186 := z.EncBinary() - _ = yym186 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy185) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy185) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq177[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy187 := &x.ListMeta - yym188 := z.EncBinary() - _ = yym188 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy187) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy187) + z.EncFallback(yy12) } } } - if yyr177 || yy2arr177 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym190 := z.EncBinary() - _ = yym190 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceThirdPartyResource(([]ThirdPartyResource)(x.Items), e) @@ -2374,15 +2602,15 @@ func (x *ThirdPartyResourceList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym191 := z.EncBinary() - _ = yym191 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceThirdPartyResource(([]ThirdPartyResource)(x.Items), e) } } } - if yyr177 || yy2arr177 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -2395,25 +2623,25 @@ func (x *ThirdPartyResourceList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym192 := z.DecBinary() - _ = yym192 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct193 := r.ContainerType() - if yyct193 == codecSelferValueTypeMap1234 { - yyl193 := r.ReadMapStart() - if yyl193 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl193, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct193 == codecSelferValueTypeArray1234 { - yyl193 := r.ReadArrayStart() - if yyl193 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl193, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -2425,12 +2653,12 @@ func (x *ThirdPartyResourceList) codecDecodeSelfFromMap(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys194Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys194Slc - var yyhl194 bool = l >= 0 - for yyj194 := 0; ; yyj194++ { - if yyhl194 { - if yyj194 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -2439,51 +2667,63 @@ func (x *ThirdPartyResourceList) codecDecodeSelfFromMap(l int, d *codec1978.Deco } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys194Slc = r.DecodeBytes(yys194Slc, true, true) - yys194 := string(yys194Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys194 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv197 := &x.ListMeta - yym198 := z.DecBinary() - _ = yym198 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv197) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv197, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv199 := &x.Items - yym200 := z.DecBinary() - _ = yym200 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceThirdPartyResource((*[]ThirdPartyResource)(yyv199), d) + h.decSliceThirdPartyResource((*[]ThirdPartyResource)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys194) - } // end switch yys194 - } // end for yyj194 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -2491,16 +2731,16 @@ func (x *ThirdPartyResourceList) codecDecodeSelfFromArray(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj201 int - var yyb201 bool - var yyhl201 bool = l >= 0 - yyj201++ - if yyhl201 { - yyb201 = yyj201 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb201 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb201 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2508,15 +2748,21 @@ func (x *ThirdPartyResourceList) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj201++ - if yyhl201 { - yyb201 = yyj201 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb201 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb201 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2524,38 +2770,44 @@ func (x *ThirdPartyResourceList) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj201++ - if yyhl201 { - yyb201 = yyj201 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb201 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb201 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv204 := &x.ListMeta - yym205 := z.DecBinary() - _ = yym205 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv204) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv204, false) + z.DecFallback(yyv17, false) } } - yyj201++ - if yyhl201 { - yyb201 = yyj201 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb201 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb201 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2563,26 +2815,26 @@ func (x *ThirdPartyResourceList) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Items = nil } else { - yyv206 := &x.Items - yym207 := z.DecBinary() - _ = yym207 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceThirdPartyResource((*[]ThirdPartyResource)(yyv206), d) + h.decSliceThirdPartyResource((*[]ThirdPartyResource)(yyv19), d) } } for { - yyj201++ - if yyhl201 { - yyb201 = yyj201 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb201 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb201 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj201-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2594,35 +2846,35 @@ func (x *APIVersion) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym208 := z.EncBinary() - _ = yym208 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep209 := !z.EncBinary() - yy2arr209 := z.EncBasicHandle().StructToArray - var yyq209 [1]bool - _, _, _ = yysep209, yyq209, yy2arr209 - const yyr209 bool = false - yyq209[0] = x.Name != "" - var yynn209 int - if yyr209 || yy2arr209 { + 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 { - yynn209 = 0 - for _, b := range yyq209 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn209++ + yynn2++ } } - r.EncodeMapStart(yynn209) - yynn209 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr209 || yy2arr209 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq209[0] { - yym211 := z.EncBinary() - _ = yym211 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -2631,19 +2883,19 @@ func (x *APIVersion) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq209[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym212 := z.EncBinary() - _ = yym212 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } } - if yyr209 || yy2arr209 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -2656,25 +2908,25 @@ func (x *APIVersion) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym213 := z.DecBinary() - _ = yym213 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct214 := r.ContainerType() - if yyct214 == codecSelferValueTypeMap1234 { - yyl214 := r.ReadMapStart() - if yyl214 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl214, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct214 == codecSelferValueTypeArray1234 { - yyl214 := r.ReadArrayStart() - if yyl214 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl214, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -2686,12 +2938,12 @@ func (x *APIVersion) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys215Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys215Slc - var yyhl215 bool = l >= 0 - for yyj215 := 0; ; yyj215++ { - if yyhl215 { - if yyj215 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -2700,20 +2952,26 @@ func (x *APIVersion) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys215Slc = r.DecodeBytes(yys215Slc, true, true) - yys215 := string(yys215Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys215 { + switch yys3 { case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys215) - } // end switch yys215 - } // end for yyj215 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -2721,16 +2979,16 @@ func (x *APIVersion) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj217 int - var yyb217 bool - var yyhl217 bool = l >= 0 - yyj217++ - if yyhl217 { - yyb217 = yyj217 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb217 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb217 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2738,20 +2996,26 @@ func (x *APIVersion) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv7 := &x.Name + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*string)(yyv7)) = r.DecodeString() + } } for { - yyj217++ - if yyhl217 { - yyb217 = yyj217 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb217 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb217 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj217-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2763,38 +3027,38 @@ func (x *ThirdPartyResourceData) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym219 := z.EncBinary() - _ = yym219 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep220 := !z.EncBinary() - yy2arr220 := z.EncBasicHandle().StructToArray - var yyq220 [4]bool - _, _, _ = yysep220, yyq220, yy2arr220 - const yyr220 bool = false - yyq220[0] = x.Kind != "" - yyq220[1] = x.APIVersion != "" - yyq220[2] = true - yyq220[3] = len(x.Data) != 0 - var yynn220 int - if yyr220 || yy2arr220 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = len(x.Data) != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn220 = 0 - for _, b := range yyq220 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn220++ + yynn2++ } } - r.EncodeMapStart(yynn220) - yynn220 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr220 || yy2arr220 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq220[0] { - yym222 := z.EncBinary() - _ = yym222 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -2803,23 +3067,23 @@ func (x *ThirdPartyResourceData) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq220[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym223 := z.EncBinary() - _ = yym223 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr220 || yy2arr220 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq220[1] { - yym225 := z.EncBinary() - _ = yym225 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -2828,43 +3092,55 @@ func (x *ThirdPartyResourceData) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq220[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym226 := z.EncBinary() - _ = yym226 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr220 || yy2arr220 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq220[2] { - yy228 := &x.ObjectMeta - yy228.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq220[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy229 := &x.ObjectMeta - yy229.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr220 || yy2arr220 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq220[3] { + if yyq2[3] { if x.Data == nil { r.EncodeNil() } else { - yym231 := z.EncBinary() - _ = yym231 + yym15 := z.EncBinary() + _ = yym15 if false { } else { r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data)) @@ -2874,15 +3150,15 @@ func (x *ThirdPartyResourceData) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq220[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("data")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Data == nil { r.EncodeNil() } else { - yym232 := z.EncBinary() - _ = yym232 + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data)) @@ -2890,7 +3166,7 @@ func (x *ThirdPartyResourceData) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr220 || yy2arr220 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -2903,25 +3179,25 @@ func (x *ThirdPartyResourceData) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym233 := z.DecBinary() - _ = yym233 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct234 := r.ContainerType() - if yyct234 == codecSelferValueTypeMap1234 { - yyl234 := r.ReadMapStart() - if yyl234 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl234, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct234 == codecSelferValueTypeArray1234 { - yyl234 := r.ReadArrayStart() - if yyl234 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl234, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -2933,12 +3209,12 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromMap(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys235Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys235Slc - var yyhl235 bool = l >= 0 - for yyj235 := 0; ; yyj235++ { - if yyhl235 { - if yyj235 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -2947,45 +3223,63 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromMap(l int, d *codec1978.Deco } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys235Slc = r.DecodeBytes(yys235Slc, true, true) - yys235 := string(yys235Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys235 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv238 := &x.ObjectMeta - yyv238.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv239 := &x.Data - yym240 := z.DecBinary() - _ = yym240 + yyv10 := &x.Data + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *yyv239 = r.DecodeBytes(*(*[]byte)(yyv239), false, false) + *yyv10 = r.DecodeBytes(*(*[]byte)(yyv10), false, false) } } default: - z.DecStructFieldNotFound(-1, yys235) - } // end switch yys235 - } // end for yyj235 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -2993,16 +3287,16 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj241 int - var yyb241 bool - var yyhl241 bool = l >= 0 - yyj241++ - if yyhl241 { - yyb241 = yyj241 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb241 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb241 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3010,15 +3304,21 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj241++ - if yyhl241 { - yyb241 = yyj241 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb241 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb241 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3026,32 +3326,44 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj241++ - if yyhl241 { - yyb241 = yyj241 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb241 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb241 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv244 := &x.ObjectMeta - yyv244.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj241++ - if yyhl241 { - yyb241 = yyj241 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb241 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb241 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3059,26 +3371,26 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Data = nil } else { - yyv245 := &x.Data - yym246 := z.DecBinary() - _ = yym246 + yyv19 := &x.Data + yym20 := z.DecBinary() + _ = yym20 if false { } else { - *yyv245 = r.DecodeBytes(*(*[]byte)(yyv245), false, false) + *yyv19 = r.DecodeBytes(*(*[]byte)(yyv19), false, false) } } for { - yyj241++ - if yyhl241 { - yyb241 = yyj241 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb241 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb241 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj241-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -3090,39 +3402,39 @@ func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym247 := z.EncBinary() - _ = yym247 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep248 := !z.EncBinary() - yy2arr248 := z.EncBasicHandle().StructToArray - var yyq248 [5]bool - _, _, _ = yysep248, yyq248, yy2arr248 - const yyr248 bool = false - yyq248[0] = x.Kind != "" - yyq248[1] = x.APIVersion != "" - yyq248[2] = true - yyq248[3] = true - yyq248[4] = true - var yynn248 int - if yyr248 || yy2arr248 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn248 = 0 - for _, b := range yyq248 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn248++ + yynn2++ } } - r.EncodeMapStart(yynn248) - yynn248 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr248 || yy2arr248 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq248[0] { - yym250 := z.EncBinary() - _ = yym250 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -3131,23 +3443,23 @@ func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq248[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym251 := z.EncBinary() - _ = yym251 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr248 || yy2arr248 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq248[1] { - yym253 := z.EncBinary() - _ = yym253 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -3156,70 +3468,82 @@ func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq248[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym254 := z.EncBinary() - _ = yym254 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr248 || yy2arr248 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq248[2] { - yy256 := &x.ObjectMeta - yy256.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq248[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy257 := &x.ObjectMeta - yy257.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr248 || yy2arr248 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq248[3] { - yy259 := &x.Spec - yy259.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq248[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy260 := &x.Spec - yy260.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr248 || yy2arr248 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq248[4] { - yy262 := &x.Status - yy262.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq248[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy263 := &x.Status - yy263.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr248 || yy2arr248 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -3232,25 +3556,25 @@ func (x *Deployment) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym264 := z.DecBinary() - _ = yym264 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct265 := r.ContainerType() - if yyct265 == codecSelferValueTypeMap1234 { - yyl265 := r.ReadMapStart() - if yyl265 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl265, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct265 == codecSelferValueTypeArray1234 { - yyl265 := r.ReadArrayStart() - if yyl265 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl265, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -3262,12 +3586,12 @@ func (x *Deployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys266Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys266Slc - var yyhl266 bool = l >= 0 - for yyj266 := 0; ; yyj266++ { - if yyhl266 { - if yyj266 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -3276,47 +3600,65 @@ func (x *Deployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys266Slc = r.DecodeBytes(yys266Slc, true, true) - yys266 := string(yys266Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys266 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv269 := &x.ObjectMeta - yyv269.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = DeploymentSpec{} } else { - yyv270 := &x.Spec - yyv270.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = DeploymentStatus{} } else { - yyv271 := &x.Status - yyv271.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys266) - } // end switch yys266 - } // end for yyj266 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -3324,16 +3666,16 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj272 int - var yyb272 bool - var yyhl272 bool = l >= 0 - yyj272++ - if yyhl272 { - yyb272 = yyj272 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb272 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb272 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3341,15 +3683,21 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj272++ - if yyhl272 { - yyb272 = yyj272 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb272 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb272 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3357,32 +3705,44 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj272++ - if yyhl272 { - yyb272 = yyj272 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb272 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb272 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv275 := &x.ObjectMeta - yyv275.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj272++ - if yyhl272 { - yyb272 = yyj272 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb272 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb272 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3390,16 +3750,16 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = DeploymentSpec{} } else { - yyv276 := &x.Spec - yyv276.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj272++ - if yyhl272 { - yyb272 = yyj272 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb272 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb272 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3407,21 +3767,21 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = DeploymentStatus{} } else { - yyv277 := &x.Status - yyv277.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj272++ - if yyhl272 { - yyb272 = yyj272 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb272 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb272 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj272-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -3433,69 +3793,80 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym278 := z.EncBinary() - _ = yym278 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep279 := !z.EncBinary() - yy2arr279 := z.EncBasicHandle().StructToArray - var yyq279 [8]bool - _, _, _ = yysep279, yyq279, yy2arr279 - const yyr279 bool = false - yyq279[0] = x.Replicas != 0 - yyq279[1] = x.Selector != nil - yyq279[3] = true - yyq279[4] = x.MinReadySeconds != 0 - yyq279[5] = x.RevisionHistoryLimit != nil - yyq279[6] = x.Paused != false - yyq279[7] = x.RollbackTo != nil - var yynn279 int - if yyr279 || yy2arr279 { - r.EncodeArrayStart(8) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [9]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Replicas != nil + yyq2[1] = x.Selector != nil + yyq2[3] = true + yyq2[4] = x.MinReadySeconds != 0 + yyq2[5] = x.RevisionHistoryLimit != nil + yyq2[6] = x.Paused != false + yyq2[7] = x.RollbackTo != nil + yyq2[8] = x.ProgressDeadlineSeconds != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(9) } else { - yynn279 = 1 - for _, b := range yyq279 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn279++ + yynn2++ } } - r.EncodeMapStart(yynn279) - yynn279 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr279 || yy2arr279 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq279[0] { - yym281 := z.EncBinary() - _ = yym281 - if false { + if yyq2[0] { + if x.Replicas == nil { + r.EncodeNil() } else { - r.EncodeInt(int64(x.Replicas)) + yy4 := *x.Replicas + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(yy4)) + } } } else { - r.EncodeInt(0) + r.EncodeNil() } } else { - if yyq279[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("replicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym282 := z.EncBinary() - _ = yym282 - if false { + if x.Replicas == nil { + r.EncodeNil() } else { - r.EncodeInt(int64(x.Replicas)) + yy6 := *x.Replicas + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeInt(int64(yy6)) + } } } } - if yyr279 || yy2arr279 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq279[1] { + if yyq2[1] { if x.Selector == nil { r.EncodeNil() } else { - yym284 := z.EncBinary() - _ = yym284 + yym9 := z.EncBinary() + _ = yym9 if false { } else if z.HasExtensions() && z.EncExt(x.Selector) { } else { @@ -3506,15 +3877,15 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq279[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("selector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Selector == nil { r.EncodeNil() } else { - yym285 := z.EncBinary() - _ = yym285 + yym10 := z.EncBinary() + _ = yym10 if false { } else if z.HasExtensions() && z.EncExt(x.Selector) { } else { @@ -3523,39 +3894,39 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr279 || yy2arr279 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy287 := &x.Template - yy287.CodecEncodeSelf(e) + yy12 := &x.Template + yy12.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("template")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy288 := &x.Template - yy288.CodecEncodeSelf(e) + yy14 := &x.Template + yy14.CodecEncodeSelf(e) } - if yyr279 || yy2arr279 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq279[3] { - yy290 := &x.Strategy - yy290.CodecEncodeSelf(e) + if yyq2[3] { + yy17 := &x.Strategy + yy17.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq279[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("strategy")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy291 := &x.Strategy - yy291.CodecEncodeSelf(e) + yy19 := &x.Strategy + yy19.CodecEncodeSelf(e) } } - if yyr279 || yy2arr279 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq279[4] { - yym293 := z.EncBinary() - _ = yym293 + if yyq2[4] { + yym22 := z.EncBinary() + _ = yym22 if false { } else { r.EncodeInt(int64(x.MinReadySeconds)) @@ -3564,58 +3935,58 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq279[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym294 := z.EncBinary() - _ = yym294 + yym23 := z.EncBinary() + _ = yym23 if false { } else { r.EncodeInt(int64(x.MinReadySeconds)) } } } - if yyr279 || yy2arr279 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq279[5] { + if yyq2[5] { if x.RevisionHistoryLimit == nil { r.EncodeNil() } else { - yy296 := *x.RevisionHistoryLimit - yym297 := z.EncBinary() - _ = yym297 + yy25 := *x.RevisionHistoryLimit + yym26 := z.EncBinary() + _ = yym26 if false { } else { - r.EncodeInt(int64(yy296)) + r.EncodeInt(int64(yy25)) } } } else { r.EncodeNil() } } else { - if yyq279[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RevisionHistoryLimit == nil { r.EncodeNil() } else { - yy298 := *x.RevisionHistoryLimit - yym299 := z.EncBinary() - _ = yym299 + yy27 := *x.RevisionHistoryLimit + yym28 := z.EncBinary() + _ = yym28 if false { } else { - r.EncodeInt(int64(yy298)) + r.EncodeInt(int64(yy27)) } } } } - if yyr279 || yy2arr279 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq279[6] { - yym301 := z.EncBinary() - _ = yym301 + if yyq2[6] { + yym30 := z.EncBinary() + _ = yym30 if false { } else { r.EncodeBool(bool(x.Paused)) @@ -3624,21 +3995,21 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq279[6] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("paused")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym302 := z.EncBinary() - _ = yym302 + yym31 := z.EncBinary() + _ = yym31 if false { } else { r.EncodeBool(bool(x.Paused)) } } } - if yyr279 || yy2arr279 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq279[7] { + if yyq2[7] { if x.RollbackTo == nil { r.EncodeNil() } else { @@ -3648,7 +4019,7 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq279[7] { + if yyq2[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rollbackTo")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -3659,7 +4030,42 @@ func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr279 || yy2arr279 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[8] { + if x.ProgressDeadlineSeconds == nil { + r.EncodeNil() + } else { + yy36 := *x.ProgressDeadlineSeconds + yym37 := z.EncBinary() + _ = yym37 + if false { + } else { + r.EncodeInt(int64(yy36)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[8] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("progressDeadlineSeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ProgressDeadlineSeconds == nil { + r.EncodeNil() + } else { + yy38 := *x.ProgressDeadlineSeconds + yym39 := z.EncBinary() + _ = yym39 + if false { + } else { + r.EncodeInt(int64(yy38)) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -3672,25 +4078,25 @@ func (x *DeploymentSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym304 := z.DecBinary() - _ = yym304 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct305 := r.ContainerType() - if yyct305 == codecSelferValueTypeMap1234 { - yyl305 := r.ReadMapStart() - if yyl305 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl305, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct305 == codecSelferValueTypeArray1234 { - yyl305 := r.ReadArrayStart() - if yyl305 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl305, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -3702,12 +4108,12 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys306Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys306Slc - var yyhl306 bool = l >= 0 - for yyj306 := 0; ; yyj306++ { - if yyhl306 { - if yyj306 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -3716,15 +4122,25 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys306Slc = r.DecodeBytes(yys306Slc, true, true) - yys306 := string(yys306Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys306 { + switch yys3 { case "replicas": if r.TryDecodeAsNil() { - x.Replicas = 0 + if x.Replicas != nil { + x.Replicas = nil + } } else { - x.Replicas = int32(r.DecodeInt(32)) + 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() { @@ -3733,10 +4149,10 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } else { if x.Selector == nil { - x.Selector = new(pkg1_unversioned.LabelSelector) + x.Selector = new(pkg1_v1.LabelSelector) } - yym309 := z.DecBinary() - _ = yym309 + yym7 := z.DecBinary() + _ = yym7 if false { } else if z.HasExtensions() && z.DecExt(x.Selector) { } else { @@ -3745,23 +4161,29 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_api.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { - yyv310 := &x.Template - yyv310.CodecDecodeSelf(d) + yyv8 := &x.Template + yyv8.CodecDecodeSelf(d) } case "strategy": if r.TryDecodeAsNil() { x.Strategy = DeploymentStrategy{} } else { - yyv311 := &x.Strategy - yyv311.CodecDecodeSelf(d) + yyv9 := &x.Strategy + yyv9.CodecDecodeSelf(d) } case "minReadySeconds": if r.TryDecodeAsNil() { x.MinReadySeconds = 0 } else { - x.MinReadySeconds = int32(r.DecodeInt(32)) + yyv10 := &x.MinReadySeconds + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int32)(yyv10)) = int32(r.DecodeInt(32)) + } } case "revisionHistoryLimit": if r.TryDecodeAsNil() { @@ -3772,8 +4194,8 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.RevisionHistoryLimit == nil { x.RevisionHistoryLimit = new(int32) } - yym314 := z.DecBinary() - _ = yym314 + yym13 := z.DecBinary() + _ = yym13 if false { } else { *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32)) @@ -3783,7 +4205,13 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Paused = false } else { - x.Paused = bool(r.DecodeBool()) + yyv14 := &x.Paused + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*bool)(yyv14)) = r.DecodeBool() + } } case "rollbackTo": if r.TryDecodeAsNil() { @@ -3796,10 +4224,26 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } x.RollbackTo.CodecDecodeSelf(d) } + case "progressDeadlineSeconds": + if r.TryDecodeAsNil() { + if x.ProgressDeadlineSeconds != nil { + x.ProgressDeadlineSeconds = nil + } + } else { + if x.ProgressDeadlineSeconds == nil { + x.ProgressDeadlineSeconds = new(int32) + } + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*int32)(x.ProgressDeadlineSeconds)) = int32(r.DecodeInt(32)) + } + } default: - z.DecStructFieldNotFound(-1, yys306) - } // end switch yys306 - } // end for yyj306 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -3807,32 +4251,42 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj317 int - var yyb317 bool - var yyhl317 bool = l >= 0 - yyj317++ - if yyhl317 { - yyb317 = yyj317 > l + var yyj19 int + var yyb19 bool + var yyhl19 bool = l >= 0 + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb317 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb317 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Replicas = 0 + if x.Replicas != nil { + x.Replicas = nil + } } else { - x.Replicas = int32(r.DecodeInt(32)) + if x.Replicas == nil { + x.Replicas = new(int32) + } + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) + } } - yyj317++ - if yyhl317 { - yyb317 = yyj317 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb317 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb317 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3843,40 +4297,40 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } } else { if x.Selector == nil { - x.Selector = new(pkg1_unversioned.LabelSelector) + x.Selector = new(pkg1_v1.LabelSelector) } - yym320 := z.DecBinary() - _ = yym320 + yym23 := z.DecBinary() + _ = yym23 if false { } else if z.HasExtensions() && z.DecExt(x.Selector) { } else { z.DecFallback(x.Selector, false) } } - yyj317++ - if yyhl317 { - yyb317 = yyj317 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb317 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb317 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_api.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { - yyv321 := &x.Template - yyv321.CodecDecodeSelf(d) + yyv24 := &x.Template + yyv24.CodecDecodeSelf(d) } - yyj317++ - if yyhl317 { - yyb317 = yyj317 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb317 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb317 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3884,16 +4338,16 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Strategy = DeploymentStrategy{} } else { - yyv322 := &x.Strategy - yyv322.CodecDecodeSelf(d) + yyv25 := &x.Strategy + yyv25.CodecDecodeSelf(d) } - yyj317++ - if yyhl317 { - yyb317 = yyj317 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb317 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb317 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3901,15 +4355,21 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.MinReadySeconds = 0 } else { - x.MinReadySeconds = int32(r.DecodeInt(32)) + yyv26 := &x.MinReadySeconds + yym27 := z.DecBinary() + _ = yym27 + if false { + } else { + *((*int32)(yyv26)) = int32(r.DecodeInt(32)) + } } - yyj317++ - if yyhl317 { - yyb317 = yyj317 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb317 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb317 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3922,20 +4382,20 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.RevisionHistoryLimit == nil { x.RevisionHistoryLimit = new(int32) } - yym325 := z.DecBinary() - _ = yym325 + yym29 := z.DecBinary() + _ = yym29 if false { } else { *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32)) } } - yyj317++ - if yyhl317 { - yyb317 = yyj317 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb317 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb317 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3943,15 +4403,21 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Paused = false } else { - x.Paused = bool(r.DecodeBool()) + yyv30 := &x.Paused + yym31 := z.DecBinary() + _ = yym31 + if false { + } else { + *((*bool)(yyv30)) = r.DecodeBool() + } } - yyj317++ - if yyhl317 { - yyb317 = yyj317 > l + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l } else { - yyb317 = r.CheckBreak() + yyb19 = r.CheckBreak() } - if yyb317 { + if yyb19 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3966,18 +4432,44 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.RollbackTo.CodecDecodeSelf(d) } - for { - yyj317++ - if yyhl317 { - yyb317 = yyj317 > l - } else { - yyb317 = r.CheckBreak() + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.ProgressDeadlineSeconds != nil { + x.ProgressDeadlineSeconds = nil } - if yyb317 { + } else { + if x.ProgressDeadlineSeconds == nil { + x.ProgressDeadlineSeconds = new(int32) + } + yym34 := z.DecBinary() + _ = yym34 + if false { + } else { + *((*int32)(x.ProgressDeadlineSeconds)) = int32(r.DecodeInt(32)) + } + } + for { + yyj19++ + if yyhl19 { + yyb19 = yyj19 > l + } else { + yyb19 = r.CheckBreak() + } + if yyb19 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj317-1, "") + z.DecStructFieldNotFound(yyj19-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -3989,37 +4481,37 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym328 := z.EncBinary() - _ = yym328 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep329 := !z.EncBinary() - yy2arr329 := z.EncBasicHandle().StructToArray - var yyq329 [5]bool - _, _, _ = yysep329, yyq329, yy2arr329 - const yyr329 bool = false - yyq329[0] = x.Kind != "" - yyq329[1] = x.APIVersion != "" - yyq329[3] = len(x.UpdatedAnnotations) != 0 - var yynn329 int - if yyr329 || yy2arr329 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[3] = len(x.UpdatedAnnotations) != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn329 = 2 - for _, b := range yyq329 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn329++ + yynn2++ } } - r.EncodeMapStart(yynn329) - yynn329 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr329 || yy2arr329 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq329[0] { - yym331 := z.EncBinary() - _ = yym331 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -4028,23 +4520,23 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq329[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym332 := z.EncBinary() - _ = yym332 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr329 || yy2arr329 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq329[1] { - yym334 := z.EncBinary() - _ = yym334 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -4053,22 +4545,22 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq329[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym335 := z.EncBinary() - _ = yym335 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr329 || yy2arr329 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym337 := z.EncBinary() - _ = yym337 + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -4077,21 +4569,21 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym338 := z.EncBinary() - _ = yym338 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr329 || yy2arr329 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq329[3] { + if yyq2[3] { if x.UpdatedAnnotations == nil { r.EncodeNil() } else { - yym340 := z.EncBinary() - _ = yym340 + yym13 := z.EncBinary() + _ = yym13 if false { } else { z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e) @@ -4101,15 +4593,15 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq329[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("updatedAnnotations")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.UpdatedAnnotations == nil { r.EncodeNil() } else { - yym341 := z.EncBinary() - _ = yym341 + yym14 := z.EncBinary() + _ = yym14 if false { } else { z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e) @@ -4117,18 +4609,18 @@ func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr329 || yy2arr329 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy343 := &x.RollbackTo - yy343.CodecEncodeSelf(e) + yy16 := &x.RollbackTo + yy16.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rollbackTo")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy344 := &x.RollbackTo - yy344.CodecEncodeSelf(e) + yy18 := &x.RollbackTo + yy18.CodecEncodeSelf(e) } - if yyr329 || yy2arr329 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -4141,25 +4633,25 @@ func (x *DeploymentRollback) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym345 := z.DecBinary() - _ = yym345 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct346 := r.ContainerType() - if yyct346 == codecSelferValueTypeMap1234 { - yyl346 := r.ReadMapStart() - if yyl346 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl346, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct346 == codecSelferValueTypeArray1234 { - yyl346 := r.ReadArrayStart() - if yyl346 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl346, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -4171,12 +4663,12 @@ func (x *DeploymentRollback) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys347Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys347Slc - var yyhl347 bool = l >= 0 - for yyj347 := 0; ; yyj347++ { - if yyhl347 { - if yyj347 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -4185,51 +4677,69 @@ func (x *DeploymentRollback) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys347Slc = r.DecodeBytes(yys347Slc, true, true) - yys347 := string(yys347Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys347 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv8 := &x.Name + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } case "updatedAnnotations": if r.TryDecodeAsNil() { x.UpdatedAnnotations = nil } else { - yyv351 := &x.UpdatedAnnotations - yym352 := z.DecBinary() - _ = yym352 + yyv10 := &x.UpdatedAnnotations + yym11 := z.DecBinary() + _ = yym11 if false { } else { - z.F.DecMapStringStringX(yyv351, false, d) + z.F.DecMapStringStringX(yyv10, false, d) } } case "rollbackTo": if r.TryDecodeAsNil() { x.RollbackTo = RollbackConfig{} } else { - yyv353 := &x.RollbackTo - yyv353.CodecDecodeSelf(d) + yyv12 := &x.RollbackTo + yyv12.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys347) - } // end switch yys347 - } // end for yyj347 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -4237,16 +4747,16 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj354 int - var yyb354 bool - var yyhl354 bool = l >= 0 - yyj354++ - if yyhl354 { - yyb354 = yyj354 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb354 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb354 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4254,15 +4764,21 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj354++ - if yyhl354 { - yyb354 = yyj354 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb354 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb354 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4270,15 +4786,21 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } - yyj354++ - if yyhl354 { - yyb354 = yyj354 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb354 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb354 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4286,15 +4808,21 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv18 := &x.Name + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *((*string)(yyv18)) = r.DecodeString() + } } - yyj354++ - if yyhl354 { - yyb354 = yyj354 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb354 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb354 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4302,21 +4830,21 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.UpdatedAnnotations = nil } else { - yyv358 := &x.UpdatedAnnotations - yym359 := z.DecBinary() - _ = yym359 + yyv20 := &x.UpdatedAnnotations + yym21 := z.DecBinary() + _ = yym21 if false { } else { - z.F.DecMapStringStringX(yyv358, false, d) + z.F.DecMapStringStringX(yyv20, false, d) } } - yyj354++ - if yyhl354 { - yyb354 = yyj354 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb354 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb354 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4324,21 +4852,21 @@ func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.RollbackTo = RollbackConfig{} } else { - yyv360 := &x.RollbackTo - yyv360.CodecDecodeSelf(d) + yyv22 := &x.RollbackTo + yyv22.CodecDecodeSelf(d) } for { - yyj354++ - if yyhl354 { - yyb354 = yyj354 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb354 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb354 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj354-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4350,35 +4878,35 @@ func (x *RollbackConfig) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym361 := z.EncBinary() - _ = yym361 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep362 := !z.EncBinary() - yy2arr362 := z.EncBasicHandle().StructToArray - var yyq362 [1]bool - _, _, _ = yysep362, yyq362, yy2arr362 - const yyr362 bool = false - yyq362[0] = x.Revision != 0 - var yynn362 int - if yyr362 || yy2arr362 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [1]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Revision != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(1) } else { - yynn362 = 0 - for _, b := range yyq362 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn362++ + yynn2++ } } - r.EncodeMapStart(yynn362) - yynn362 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr362 || yy2arr362 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq362[0] { - yym364 := z.EncBinary() - _ = yym364 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeInt(int64(x.Revision)) @@ -4387,19 +4915,19 @@ func (x *RollbackConfig) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq362[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("revision")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym365 := z.EncBinary() - _ = yym365 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeInt(int64(x.Revision)) } } } - if yyr362 || yy2arr362 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -4412,25 +4940,25 @@ func (x *RollbackConfig) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym366 := z.DecBinary() - _ = yym366 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct367 := r.ContainerType() - if yyct367 == codecSelferValueTypeMap1234 { - yyl367 := r.ReadMapStart() - if yyl367 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl367, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct367 == codecSelferValueTypeArray1234 { - yyl367 := r.ReadArrayStart() - if yyl367 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl367, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -4442,12 +4970,12 @@ func (x *RollbackConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys368Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys368Slc - var yyhl368 bool = l >= 0 - for yyj368 := 0; ; yyj368++ { - if yyhl368 { - if yyj368 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -4456,20 +4984,26 @@ func (x *RollbackConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys368Slc = r.DecodeBytes(yys368Slc, true, true) - yys368 := string(yys368Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys368 { + switch yys3 { case "revision": if r.TryDecodeAsNil() { x.Revision = 0 } else { - x.Revision = int64(r.DecodeInt(64)) + yyv4 := &x.Revision + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int64)(yyv4)) = int64(r.DecodeInt(64)) + } } default: - z.DecStructFieldNotFound(-1, yys368) - } // end switch yys368 - } // end for yyj368 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -4477,16 +5011,16 @@ func (x *RollbackConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj370 int - var yyb370 bool - var yyhl370 bool = l >= 0 - yyj370++ - if yyhl370 { - yyb370 = yyj370 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb370 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb370 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4494,20 +5028,26 @@ func (x *RollbackConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Revision = 0 } else { - x.Revision = int64(r.DecodeInt(64)) + yyv7 := &x.Revision + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*int64)(yyv7)) = int64(r.DecodeInt(64)) + } } for { - yyj370++ - if yyhl370 { - yyb370 = yyj370 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb370 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb370 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj370-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4519,49 +5059,49 @@ func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym372 := z.EncBinary() - _ = yym372 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep373 := !z.EncBinary() - yy2arr373 := z.EncBasicHandle().StructToArray - var yyq373 [2]bool - _, _, _ = yysep373, yyq373, yy2arr373 - const yyr373 bool = false - yyq373[0] = x.Type != "" - yyq373[1] = x.RollingUpdate != nil - var yynn373 int - if yyr373 || yy2arr373 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Type != "" + yyq2[1] = x.RollingUpdate != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn373 = 0 - for _, b := range yyq373 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn373++ + yynn2++ } } - r.EncodeMapStart(yynn373) - yynn373 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr373 || yy2arr373 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq373[0] { + if yyq2[0] { x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq373[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } } - if yyr373 || yy2arr373 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq373[1] { + if yyq2[1] { if x.RollingUpdate == nil { r.EncodeNil() } else { @@ -4571,7 +5111,7 @@ func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq373[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rollingUpdate")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -4582,7 +5122,7 @@ func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr373 || yy2arr373 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -4595,25 +5135,25 @@ func (x *DeploymentStrategy) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym376 := z.DecBinary() - _ = yym376 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct377 := r.ContainerType() - if yyct377 == codecSelferValueTypeMap1234 { - yyl377 := r.ReadMapStart() - if yyl377 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl377, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct377 == codecSelferValueTypeArray1234 { - yyl377 := r.ReadArrayStart() - if yyl377 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl377, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -4625,12 +5165,12 @@ func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys378Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys378Slc - var yyhl378 bool = l >= 0 - for yyj378 := 0; ; yyj378++ { - if yyhl378 { - if yyj378 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -4639,15 +5179,16 @@ func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys378Slc = r.DecodeBytes(yys378Slc, true, true) - yys378 := string(yys378Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys378 { + switch yys3 { case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = DeploymentStrategyType(r.DecodeString()) + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) } case "rollingUpdate": if r.TryDecodeAsNil() { @@ -4661,9 +5202,9 @@ func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) x.RollingUpdate.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys378) - } // end switch yys378 - } // end for yyj378 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -4671,16 +5212,16 @@ func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj381 int - var yyb381 bool - var yyhl381 bool = l >= 0 - yyj381++ - if yyhl381 { - yyb381 = yyj381 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb381 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb381 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4688,15 +5229,16 @@ func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Type = "" } else { - x.Type = DeploymentStrategyType(r.DecodeString()) + yyv7 := &x.Type + yyv7.CodecDecodeSelf(d) } - yyj381++ - if yyhl381 { - yyb381 = yyj381 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb381 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb381 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4712,17 +5254,17 @@ func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decode x.RollingUpdate.CodecDecodeSelf(d) } for { - yyj381++ - if yyhl381 { - yyb381 = yyj381 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb381 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb381 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj381-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4731,8 +5273,8 @@ func (x DeploymentStrategyType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym384 := z.EncBinary() - _ = yym384 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -4744,8 +5286,8 @@ func (x *DeploymentStrategyType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym385 := z.DecBinary() - _ = yym385 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -4760,98 +5302,110 @@ func (x *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym386 := z.EncBinary() - _ = yym386 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep387 := !z.EncBinary() - yy2arr387 := z.EncBasicHandle().StructToArray - var yyq387 [2]bool - _, _, _ = yysep387, yyq387, yy2arr387 - const yyr387 bool = false - yyq387[0] = true - yyq387[1] = true - var yynn387 int - if yyr387 || yy2arr387 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.MaxUnavailable != nil + yyq2[1] = x.MaxSurge != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn387 = 0 - for _, b := range yyq387 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn387++ + yynn2++ } } - r.EncodeMapStart(yynn387) - yynn387 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr387 || yy2arr387 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq387[0] { - yy389 := &x.MaxUnavailable - yym390 := z.EncBinary() - _ = yym390 - if false { - } else if z.HasExtensions() && z.EncExt(yy389) { - } else if !yym390 && z.IsJSONHandle() { - z.EncJSONMarshal(yy389) + if yyq2[0] { + if x.MaxUnavailable == nil { + r.EncodeNil() } else { - z.EncFallback(yy389) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) { + } else if !yym4 && z.IsJSONHandle() { + z.EncJSONMarshal(x.MaxUnavailable) + } else { + z.EncFallback(x.MaxUnavailable) + } } } else { r.EncodeNil() } } else { - if yyq387[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy391 := &x.MaxUnavailable - yym392 := z.EncBinary() - _ = yym392 - if false { - } else if z.HasExtensions() && z.EncExt(yy391) { - } else if !yym392 && z.IsJSONHandle() { - z.EncJSONMarshal(yy391) + if x.MaxUnavailable == nil { + r.EncodeNil() } else { - z.EncFallback(yy391) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) { + } else if !yym5 && z.IsJSONHandle() { + z.EncJSONMarshal(x.MaxUnavailable) + } else { + z.EncFallback(x.MaxUnavailable) + } } } } - if yyr387 || yy2arr387 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq387[1] { - yy394 := &x.MaxSurge - yym395 := z.EncBinary() - _ = yym395 - if false { - } else if z.HasExtensions() && z.EncExt(yy394) { - } else if !yym395 && z.IsJSONHandle() { - z.EncJSONMarshal(yy394) + if yyq2[1] { + if x.MaxSurge == nil { + r.EncodeNil() } else { - z.EncFallback(yy394) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(x.MaxSurge) { + } else if !yym7 && z.IsJSONHandle() { + z.EncJSONMarshal(x.MaxSurge) + } else { + z.EncFallback(x.MaxSurge) + } } } else { r.EncodeNil() } } else { - if yyq387[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maxSurge")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy396 := &x.MaxSurge - yym397 := z.EncBinary() - _ = yym397 - if false { - } else if z.HasExtensions() && z.EncExt(yy396) { - } else if !yym397 && z.IsJSONHandle() { - z.EncJSONMarshal(yy396) + if x.MaxSurge == nil { + r.EncodeNil() } else { - z.EncFallback(yy396) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.EncExt(x.MaxSurge) { + } else if !yym8 && z.IsJSONHandle() { + z.EncJSONMarshal(x.MaxSurge) + } else { + z.EncFallback(x.MaxSurge) + } } } } - if yyr387 || yy2arr387 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -4864,25 +5418,25 @@ func (x *RollingUpdateDeployment) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym398 := z.DecBinary() - _ = yym398 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct399 := r.ContainerType() - if yyct399 == codecSelferValueTypeMap1234 { - yyl399 := r.ReadMapStart() - if yyl399 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl399, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct399 == codecSelferValueTypeArray1234 { - yyl399 := r.ReadArrayStart() - if yyl399 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl399, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -4894,12 +5448,12 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys400Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys400Slc - var yyhl400 bool = l >= 0 - for yyj400 := 0; ; yyj400++ { - if yyhl400 { - if yyj400 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -4908,44 +5462,52 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys400Slc = r.DecodeBytes(yys400Slc, true, true) - yys400 := string(yys400Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys400 { + switch yys3 { case "maxUnavailable": if r.TryDecodeAsNil() { - x.MaxUnavailable = pkg5_intstr.IntOrString{} + if x.MaxUnavailable != nil { + x.MaxUnavailable = nil + } } else { - yyv401 := &x.MaxUnavailable - yym402 := z.DecBinary() - _ = yym402 + if x.MaxUnavailable == nil { + x.MaxUnavailable = new(pkg5_intstr.IntOrString) + } + yym5 := z.DecBinary() + _ = yym5 if false { - } else if z.HasExtensions() && z.DecExt(yyv401) { - } else if !yym402 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv401) + } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) { + } else if !yym5 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.MaxUnavailable) } else { - z.DecFallback(yyv401, false) + z.DecFallback(x.MaxUnavailable, false) } } case "maxSurge": if r.TryDecodeAsNil() { - x.MaxSurge = pkg5_intstr.IntOrString{} + if x.MaxSurge != nil { + x.MaxSurge = nil + } } else { - yyv403 := &x.MaxSurge - yym404 := z.DecBinary() - _ = yym404 + if x.MaxSurge == nil { + x.MaxSurge = new(pkg5_intstr.IntOrString) + } + yym7 := z.DecBinary() + _ = yym7 if false { - } else if z.HasExtensions() && z.DecExt(yyv403) { - } else if !yym404 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv403) + } else if z.HasExtensions() && z.DecExt(x.MaxSurge) { + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.MaxSurge) } else { - z.DecFallback(yyv403, false) + z.DecFallback(x.MaxSurge, false) } } default: - z.DecStructFieldNotFound(-1, yys400) - } // end switch yys400 - } // end for yyj400 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -4953,71 +5515,79 @@ func (x *RollingUpdateDeployment) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj405 int - var yyb405 bool - var yyhl405 bool = l >= 0 - yyj405++ - if yyhl405 { - yyb405 = yyj405 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb405 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb405 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.MaxUnavailable = pkg5_intstr.IntOrString{} + if x.MaxUnavailable != nil { + x.MaxUnavailable = nil + } } else { - yyv406 := &x.MaxUnavailable - yym407 := z.DecBinary() - _ = yym407 + if x.MaxUnavailable == nil { + x.MaxUnavailable = new(pkg5_intstr.IntOrString) + } + yym10 := z.DecBinary() + _ = yym10 if false { - } else if z.HasExtensions() && z.DecExt(yyv406) { - } else if !yym407 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv406) + } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) { + } else if !yym10 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.MaxUnavailable) } else { - z.DecFallback(yyv406, false) + z.DecFallback(x.MaxUnavailable, false) } } - yyj405++ - if yyhl405 { - yyb405 = yyj405 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb405 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb405 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.MaxSurge = pkg5_intstr.IntOrString{} + if x.MaxSurge != nil { + x.MaxSurge = nil + } } else { - yyv408 := &x.MaxSurge - yym409 := z.DecBinary() - _ = yym409 + if x.MaxSurge == nil { + x.MaxSurge = new(pkg5_intstr.IntOrString) + } + yym12 := z.DecBinary() + _ = yym12 if false { - } else if z.HasExtensions() && z.DecExt(yyv408) { - } else if !yym409 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv408) + } else if z.HasExtensions() && z.DecExt(x.MaxSurge) { + } else if !yym12 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.MaxSurge) } else { - z.DecFallback(yyv408, false) + z.DecFallback(x.MaxSurge, false) } } for { - yyj405++ - if yyhl405 { - yyb405 = yyj405 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb405 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb405 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj405-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -5029,39 +5599,41 @@ func (x *DeploymentStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym410 := z.EncBinary() - _ = yym410 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep411 := !z.EncBinary() - yy2arr411 := z.EncBasicHandle().StructToArray - var yyq411 [5]bool - _, _, _ = yysep411, yyq411, yy2arr411 - const yyr411 bool = false - yyq411[0] = x.ObservedGeneration != 0 - yyq411[1] = x.Replicas != 0 - yyq411[2] = x.UpdatedReplicas != 0 - yyq411[3] = x.AvailableReplicas != 0 - yyq411[4] = x.UnavailableReplicas != 0 - var yynn411 int - if yyr411 || yy2arr411 { - r.EncodeArrayStart(5) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [7]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.ObservedGeneration != 0 + yyq2[1] = x.Replicas != 0 + yyq2[2] = x.UpdatedReplicas != 0 + yyq2[3] = x.ReadyReplicas != 0 + yyq2[4] = x.AvailableReplicas != 0 + yyq2[5] = x.UnavailableReplicas != 0 + yyq2[6] = len(x.Conditions) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(7) } else { - yynn411 = 0 - for _, b := range yyq411 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn411++ + yynn2++ } } - r.EncodeMapStart(yynn411) - yynn411 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr411 || yy2arr411 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq411[0] { - yym413 := z.EncBinary() - _ = yym413 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeInt(int64(x.ObservedGeneration)) @@ -5070,23 +5642,23 @@ func (x *DeploymentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq411[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym414 := z.EncBinary() - _ = yym414 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeInt(int64(x.ObservedGeneration)) } } } - if yyr411 || yy2arr411 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq411[1] { - yym416 := z.EncBinary() - _ = yym416 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeInt(int64(x.Replicas)) @@ -5095,23 +5667,23 @@ func (x *DeploymentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq411[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("replicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym417 := z.EncBinary() - _ = yym417 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeInt(int64(x.Replicas)) } } } - if yyr411 || yy2arr411 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq411[2] { - yym419 := z.EncBinary() - _ = yym419 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeInt(int64(x.UpdatedReplicas)) @@ -5120,23 +5692,48 @@ func (x *DeploymentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq411[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("updatedReplicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym420 := z.EncBinary() - _ = yym420 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeInt(int64(x.UpdatedReplicas)) } } } - if yyr411 || yy2arr411 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq411[3] { - yym422 := z.EncBinary() - _ = yym422 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeInt(int64(x.ReadyReplicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("readyReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeInt(int64(x.ReadyReplicas)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeInt(int64(x.AvailableReplicas)) @@ -5145,23 +5742,23 @@ func (x *DeploymentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq411[3] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("availableReplicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym423 := z.EncBinary() - _ = yym423 + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeInt(int64(x.AvailableReplicas)) } } } - if yyr411 || yy2arr411 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq411[4] { - yym425 := z.EncBinary() - _ = yym425 + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 if false { } else { r.EncodeInt(int64(x.UnavailableReplicas)) @@ -5170,19 +5767,52 @@ func (x *DeploymentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq411[4] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("unavailableReplicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym426 := z.EncBinary() - _ = yym426 + yym20 := z.EncBinary() + _ = yym20 if false { } else { r.EncodeInt(int64(x.UnavailableReplicas)) } } } - if yyr411 || yy2arr411 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[6] { + if x.Conditions == nil { + r.EncodeNil() + } else { + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + h.encSliceDeploymentCondition(([]DeploymentCondition)(x.Conditions), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("conditions")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Conditions == nil { + r.EncodeNil() + } else { + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + h.encSliceDeploymentCondition(([]DeploymentCondition)(x.Conditions), e) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -5195,25 +5825,25 @@ func (x *DeploymentStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym427 := z.DecBinary() - _ = yym427 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct428 := r.ContainerType() - if yyct428 == codecSelferValueTypeMap1234 { - yyl428 := r.ReadMapStart() - if yyl428 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl428, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct428 == codecSelferValueTypeArray1234 { - yyl428 := r.ReadArrayStart() - if yyl428 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl428, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -5225,12 +5855,12 @@ func (x *DeploymentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys429Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys429Slc - var yyhl429 bool = l >= 0 - for yyj429 := 0; ; yyj429++ { - if yyhl429 { - if yyj429 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -5239,44 +5869,98 @@ func (x *DeploymentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys429Slc = r.DecodeBytes(yys429Slc, true, true) - yys429 := string(yys429Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys429 { + switch yys3 { case "observedGeneration": if r.TryDecodeAsNil() { x.ObservedGeneration = 0 } else { - x.ObservedGeneration = int64(r.DecodeInt(64)) + yyv4 := &x.ObservedGeneration + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int64)(yyv4)) = int64(r.DecodeInt(64)) + } } case "replicas": if r.TryDecodeAsNil() { x.Replicas = 0 } else { - x.Replicas = int32(r.DecodeInt(32)) + yyv6 := &x.Replicas + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(yyv6)) = int32(r.DecodeInt(32)) + } } case "updatedReplicas": if r.TryDecodeAsNil() { x.UpdatedReplicas = 0 } else { - x.UpdatedReplicas = int32(r.DecodeInt(32)) + yyv8 := &x.UpdatedReplicas + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } + } + case "readyReplicas": + if r.TryDecodeAsNil() { + x.ReadyReplicas = 0 + } else { + yyv10 := &x.ReadyReplicas + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int32)(yyv10)) = int32(r.DecodeInt(32)) + } } case "availableReplicas": if r.TryDecodeAsNil() { x.AvailableReplicas = 0 } else { - x.AvailableReplicas = int32(r.DecodeInt(32)) + yyv12 := &x.AvailableReplicas + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int32)(yyv12)) = int32(r.DecodeInt(32)) + } } case "unavailableReplicas": if r.TryDecodeAsNil() { x.UnavailableReplicas = 0 } else { - x.UnavailableReplicas = int32(r.DecodeInt(32)) + yyv14 := &x.UnavailableReplicas + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*int32)(yyv14)) = int32(r.DecodeInt(32)) + } + } + case "conditions": + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv16 := &x.Conditions + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + h.decSliceDeploymentCondition((*[]DeploymentCondition)(yyv16), d) + } } default: - z.DecStructFieldNotFound(-1, yys429) - } // end switch yys429 - } // end for yyj429 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -5284,16 +5968,16 @@ func (x *DeploymentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj435 int - var yyb435 bool - var yyhl435 bool = l >= 0 - yyj435++ - if yyhl435 { - yyb435 = yyj435 > l + var yyj18 int + var yyb18 bool + var yyhl18 bool = l >= 0 + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb435 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb435 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5301,15 +5985,21 @@ func (x *DeploymentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ObservedGeneration = 0 } else { - x.ObservedGeneration = int64(r.DecodeInt(64)) + yyv19 := &x.ObservedGeneration + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*int64)(yyv19)) = int64(r.DecodeInt(64)) + } } - yyj435++ - if yyhl435 { - yyb435 = yyj435 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb435 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb435 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5317,15 +6007,21 @@ func (x *DeploymentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Replicas = 0 } else { - x.Replicas = int32(r.DecodeInt(32)) + yyv21 := &x.Replicas + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*int32)(yyv21)) = int32(r.DecodeInt(32)) + } } - yyj435++ - if yyhl435 { - yyb435 = yyj435 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb435 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb435 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5333,15 +6029,43 @@ func (x *DeploymentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.UpdatedReplicas = 0 } else { - x.UpdatedReplicas = int32(r.DecodeInt(32)) + yyv23 := &x.UpdatedReplicas + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*int32)(yyv23)) = int32(r.DecodeInt(32)) + } } - yyj435++ - if yyhl435 { - yyb435 = yyj435 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb435 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb435 { + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ReadyReplicas = 0 + } else { + yyv25 := &x.ReadyReplicas + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*int32)(yyv25)) = int32(r.DecodeInt(32)) + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5349,15 +6073,21 @@ func (x *DeploymentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.AvailableReplicas = 0 } else { - x.AvailableReplicas = int32(r.DecodeInt(32)) + yyv27 := &x.AvailableReplicas + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*int32)(yyv27)) = int32(r.DecodeInt(32)) + } } - yyj435++ - if yyhl435 { - yyb435 = yyj435 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb435 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb435 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5365,20 +6095,547 @@ func (x *DeploymentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.UnavailableReplicas = 0 } else { - x.UnavailableReplicas = int32(r.DecodeInt(32)) + yyv29 := &x.UnavailableReplicas + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*int32)(yyv29)) = int32(r.DecodeInt(32)) + } + } + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l + } else { + yyb18 = r.CheckBreak() + } + if yyb18 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv31 := &x.Conditions + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + h.decSliceDeploymentCondition((*[]DeploymentCondition)(yyv31), d) + } } for { - yyj435++ - if yyhl435 { - yyb435 = yyj435 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb435 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb435 { + if yyb18 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj435-1, "") + z.DecStructFieldNotFound(yyj18-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x DeploymentConditionType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *DeploymentConditionType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *DeploymentCondition) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [6]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[2] = true + yyq2[3] = true + yyq2[4] = x.Reason != "" + yyq2[5] = x.Message != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(6) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yysf7 := &x.Status + yysf7.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yysf8 := &x.Status + yysf8.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.LastUpdateTime + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else if yym11 { + z.EncBinaryMarshal(yy10) + } else if !yym11 && z.IsJSONHandle() { + z.EncJSONMarshal(yy10) + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastUpdateTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.LastUpdateTime + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else if yym13 { + z.EncBinaryMarshal(yy12) + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(yy12) + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy15 := &x.LastTransitionTime + yym16 := z.EncBinary() + _ = yym16 + if false { + } else if z.HasExtensions() && z.EncExt(yy15) { + } else if yym16 { + z.EncBinaryMarshal(yy15) + } else if !yym16 && z.IsJSONHandle() { + z.EncJSONMarshal(yy15) + } else { + z.EncFallback(yy15) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy17 := &x.LastTransitionTime + yym18 := z.EncBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.EncExt(yy17) { + } else if yym18 { + z.EncBinaryMarshal(yy17) + } else if !yym18 && z.IsJSONHandle() { + z.EncJSONMarshal(yy17) + } else { + z.EncFallback(yy17) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym21 := z.EncBinary() + _ = yym21 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("message")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym24 := z.EncBinary() + _ = yym24 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *DeploymentCondition) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *DeploymentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = "" + } else { + yyv5 := &x.Status + yyv5.CodecDecodeSelf(d) + } + case "lastUpdateTime": + if r.TryDecodeAsNil() { + x.LastUpdateTime = pkg1_v1.Time{} + } else { + yyv6 := &x.LastUpdateTime + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if yym7 { + z.DecBinaryUnmarshal(yyv6) + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) + } else { + z.DecFallback(yyv6, false) + } + } + case "lastTransitionTime": + if r.TryDecodeAsNil() { + x.LastTransitionTime = pkg1_v1.Time{} + } else { + yyv8 := &x.LastTransitionTime + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else if yym9 { + z.DecBinaryUnmarshal(yyv8) + } else if !yym9 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv8) + } else { + z.DecFallback(yyv8, false) + } + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv10 := &x.Reason + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + case "message": + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv12 := &x.Message + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *DeploymentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv15 := &x.Type + yyv15.CodecDecodeSelf(d) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = "" + } else { + yyv16 := &x.Status + yyv16.CodecDecodeSelf(d) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastUpdateTime = pkg1_v1.Time{} + } else { + yyv17 := &x.LastUpdateTime + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else if yym18 { + z.DecBinaryUnmarshal(yyv17) + } else if !yym18 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv17) + } else { + z.DecFallback(yyv17, false) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastTransitionTime = pkg1_v1.Time{} + } else { + yyv19 := &x.LastTransitionTime + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else if yym20 { + z.DecBinaryUnmarshal(yyv19) + } else if !yym20 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv19) + } else { + z.DecFallback(yyv19, false) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv21 := &x.Reason + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv23 := &x.Message + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*string)(yyv23)) = r.DecodeString() + } + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -5390,37 +6647,37 @@ func (x *DeploymentList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym441 := z.EncBinary() - _ = yym441 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep442 := !z.EncBinary() - yy2arr442 := z.EncBasicHandle().StructToArray - var yyq442 [4]bool - _, _, _ = yysep442, yyq442, yy2arr442 - const yyr442 bool = false - yyq442[0] = x.Kind != "" - yyq442[1] = x.APIVersion != "" - yyq442[2] = true - var yynn442 int - if yyr442 || yy2arr442 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn442 = 1 - for _, b := range yyq442 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn442++ + yynn2++ } } - r.EncodeMapStart(yynn442) - yynn442 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr442 || yy2arr442 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq442[0] { - yym444 := z.EncBinary() - _ = yym444 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -5429,23 +6686,23 @@ func (x *DeploymentList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq442[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym445 := z.EncBinary() - _ = yym445 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr442 || yy2arr442 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq442[1] { - yym447 := z.EncBinary() - _ = yym447 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -5454,54 +6711,54 @@ func (x *DeploymentList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq442[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym448 := z.EncBinary() - _ = yym448 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr442 || yy2arr442 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq442[2] { - yy450 := &x.ListMeta - yym451 := z.EncBinary() - _ = yym451 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy450) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy450) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq442[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy452 := &x.ListMeta - yym453 := z.EncBinary() - _ = yym453 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy452) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy452) + z.EncFallback(yy12) } } } - if yyr442 || yy2arr442 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym455 := z.EncBinary() - _ = yym455 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceDeployment(([]Deployment)(x.Items), e) @@ -5514,15 +6771,15 @@ func (x *DeploymentList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym456 := z.EncBinary() - _ = yym456 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceDeployment(([]Deployment)(x.Items), e) } } } - if yyr442 || yy2arr442 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -5535,25 +6792,25 @@ func (x *DeploymentList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym457 := z.DecBinary() - _ = yym457 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct458 := r.ContainerType() - if yyct458 == codecSelferValueTypeMap1234 { - yyl458 := r.ReadMapStart() - if yyl458 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl458, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct458 == codecSelferValueTypeArray1234 { - yyl458 := r.ReadArrayStart() - if yyl458 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl458, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -5565,12 +6822,12 @@ func (x *DeploymentList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys459Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys459Slc - var yyhl459 bool = l >= 0 - for yyj459 := 0; ; yyj459++ { - if yyhl459 { - if yyj459 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -5579,51 +6836,63 @@ func (x *DeploymentList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys459Slc = r.DecodeBytes(yys459Slc, true, true) - yys459 := string(yys459Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys459 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv462 := &x.ListMeta - yym463 := z.DecBinary() - _ = yym463 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv462) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv462, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv464 := &x.Items - yym465 := z.DecBinary() - _ = yym465 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceDeployment((*[]Deployment)(yyv464), d) + h.decSliceDeployment((*[]Deployment)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys459) - } // end switch yys459 - } // end for yyj459 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -5631,16 +6900,16 @@ func (x *DeploymentList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj466 int - var yyb466 bool - var yyhl466 bool = l >= 0 - yyj466++ - if yyhl466 { - yyb466 = yyj466 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb466 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb466 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5648,15 +6917,21 @@ func (x *DeploymentList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj466++ - if yyhl466 { - yyb466 = yyj466 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb466 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb466 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5664,38 +6939,44 @@ func (x *DeploymentList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj466++ - if yyhl466 { - yyb466 = yyj466 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb466 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb466 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv469 := &x.ListMeta - yym470 := z.DecBinary() - _ = yym470 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv469) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv469, false) + z.DecFallback(yyv17, false) } } - yyj466++ - if yyhl466 { - yyb466 = yyj466 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb466 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb466 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5703,26 +6984,478 @@ func (x *DeploymentList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv471 := &x.Items - yym472 := z.DecBinary() - _ = yym472 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceDeployment((*[]Deployment)(yyv471), d) + h.decSliceDeployment((*[]Deployment)(yyv19), d) } } for { - yyj466++ - if yyhl466 { - yyb466 = yyj466 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb466 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb466 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj466-1, "") + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *DaemonSetUpdateStrategy) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Type != "" + yyq2[1] = x.RollingUpdate != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + x.Type.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.RollingUpdate == nil { + r.EncodeNil() + } else { + x.RollingUpdate.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("rollingUpdate")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.RollingUpdate == nil { + r.EncodeNil() + } else { + x.RollingUpdate.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *DaemonSetUpdateStrategy) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *DaemonSetUpdateStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) + } + case "rollingUpdate": + if r.TryDecodeAsNil() { + if x.RollingUpdate != nil { + x.RollingUpdate = nil + } + } else { + if x.RollingUpdate == nil { + x.RollingUpdate = new(RollingUpdateDaemonSet) + } + x.RollingUpdate.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *DaemonSetUpdateStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv7 := &x.Type + yyv7.CodecDecodeSelf(d) + } + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.RollingUpdate != nil { + x.RollingUpdate = nil + } + } else { + if x.RollingUpdate == nil { + x.RollingUpdate = new(RollingUpdateDaemonSet) + } + x.RollingUpdate.CodecDecodeSelf(d) + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj6-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x DaemonSetUpdateStrategyType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *DaemonSetUpdateStrategyType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *RollingUpdateDaemonSet) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [1]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.MaxUnavailable != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(1) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.MaxUnavailable == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) { + } else if !yym4 && z.IsJSONHandle() { + z.EncJSONMarshal(x.MaxUnavailable) + } else { + z.EncFallback(x.MaxUnavailable) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.MaxUnavailable == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) { + } else if !yym5 && z.IsJSONHandle() { + z.EncJSONMarshal(x.MaxUnavailable) + } else { + z.EncFallback(x.MaxUnavailable) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RollingUpdateDaemonSet) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RollingUpdateDaemonSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "maxUnavailable": + if r.TryDecodeAsNil() { + if x.MaxUnavailable != nil { + x.MaxUnavailable = nil + } + } else { + if x.MaxUnavailable == nil { + x.MaxUnavailable = new(pkg5_intstr.IntOrString) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) { + } else if !yym5 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.MaxUnavailable) + } else { + z.DecFallback(x.MaxUnavailable, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RollingUpdateDaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.MaxUnavailable != nil { + x.MaxUnavailable = nil + } + } else { + if x.MaxUnavailable == nil { + x.MaxUnavailable = new(pkg5_intstr.IntOrString) + } + yym8 := z.DecBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) { + } else if !yym8 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.MaxUnavailable) + } else { + z.DecFallback(x.MaxUnavailable, false) + } + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -5734,38 +7467,41 @@ func (x *DaemonSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym473 := z.EncBinary() - _ = yym473 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep474 := !z.EncBinary() - yy2arr474 := z.EncBasicHandle().StructToArray - var yyq474 [2]bool - _, _, _ = yysep474, yyq474, yy2arr474 - const yyr474 bool = false - yyq474[0] = x.Selector != nil - var yynn474 int - if yyr474 || yy2arr474 { - r.EncodeArrayStart(2) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Selector != nil + yyq2[2] = true + yyq2[3] = x.MinReadySeconds != 0 + yyq2[4] = x.TemplateGeneration != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) } else { - yynn474 = 1 - for _, b := range yyq474 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn474++ + yynn2++ } } - r.EncodeMapStart(yynn474) - yynn474 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr474 || yy2arr474 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq474[0] { + if yyq2[0] { if x.Selector == nil { r.EncodeNil() } else { - yym476 := z.EncBinary() - _ = yym476 + yym4 := z.EncBinary() + _ = yym4 if false { } else if z.HasExtensions() && z.EncExt(x.Selector) { } else { @@ -5776,15 +7512,15 @@ func (x *DaemonSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq474[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("selector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Selector == nil { r.EncodeNil() } else { - yym477 := z.EncBinary() - _ = yym477 + yym5 := z.EncBinary() + _ = yym5 if false { } else if z.HasExtensions() && z.EncExt(x.Selector) { } else { @@ -5793,18 +7529,85 @@ func (x *DaemonSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr474 || yy2arr474 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy479 := &x.Template - yy479.CodecEncodeSelf(e) + yy7 := &x.Template + yy7.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("template")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy480 := &x.Template - yy480.CodecEncodeSelf(e) + yy9 := &x.Template + yy9.CodecEncodeSelf(e) } - if yyr474 || yy2arr474 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy12 := &x.UpdateStrategy + yy12.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("updateStrategy")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy14 := &x.UpdateStrategy + yy14.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeInt(int64(x.MinReadySeconds)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + r.EncodeInt(int64(x.MinReadySeconds)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeInt(int64(x.TemplateGeneration)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("templateGeneration")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym21 := z.EncBinary() + _ = yym21 + if false { + } else { + r.EncodeInt(int64(x.TemplateGeneration)) + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -5817,25 +7620,25 @@ func (x *DaemonSetSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym481 := z.DecBinary() - _ = yym481 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct482 := r.ContainerType() - if yyct482 == codecSelferValueTypeMap1234 { - yyl482 := r.ReadMapStart() - if yyl482 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl482, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct482 == codecSelferValueTypeArray1234 { - yyl482 := r.ReadArrayStart() - if yyl482 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl482, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -5847,12 +7650,12 @@ func (x *DaemonSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys483Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys483Slc - var yyhl483 bool = l >= 0 - for yyj483 := 0; ; yyj483++ { - if yyhl483 { - if yyj483 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -5861,10 +7664,10 @@ func (x *DaemonSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys483Slc = r.DecodeBytes(yys483Slc, true, true) - yys483 := string(yys483Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys483 { + switch yys3 { case "selector": if r.TryDecodeAsNil() { if x.Selector != nil { @@ -5872,10 +7675,10 @@ func (x *DaemonSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } else { if x.Selector == nil { - x.Selector = new(pkg1_unversioned.LabelSelector) + x.Selector = new(pkg1_v1.LabelSelector) } - yym485 := z.DecBinary() - _ = yym485 + yym5 := z.DecBinary() + _ = yym5 if false { } else if z.HasExtensions() && z.DecExt(x.Selector) { } else { @@ -5884,15 +7687,46 @@ func (x *DaemonSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_api.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { - yyv486 := &x.Template - yyv486.CodecDecodeSelf(d) + yyv6 := &x.Template + yyv6.CodecDecodeSelf(d) + } + case "updateStrategy": + if r.TryDecodeAsNil() { + x.UpdateStrategy = DaemonSetUpdateStrategy{} + } else { + yyv7 := &x.UpdateStrategy + yyv7.CodecDecodeSelf(d) + } + case "minReadySeconds": + if r.TryDecodeAsNil() { + x.MinReadySeconds = 0 + } else { + yyv8 := &x.MinReadySeconds + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } + } + case "templateGeneration": + if r.TryDecodeAsNil() { + x.TemplateGeneration = 0 + } else { + yyv10 := &x.TemplateGeneration + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int64)(yyv10)) = int64(r.DecodeInt(64)) + } } default: - z.DecStructFieldNotFound(-1, yys483) - } // end switch yys483 - } // end for yyj483 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -5900,16 +7734,16 @@ func (x *DaemonSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj487 int - var yyb487 bool - var yyhl487 bool = l >= 0 - yyj487++ - if yyhl487 { - yyb487 = yyj487 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb487 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb487 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5920,45 +7754,106 @@ func (x *DaemonSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } } else { if x.Selector == nil { - x.Selector = new(pkg1_unversioned.LabelSelector) + x.Selector = new(pkg1_v1.LabelSelector) } - yym489 := z.DecBinary() - _ = yym489 + yym14 := z.DecBinary() + _ = yym14 if false { } else if z.HasExtensions() && z.DecExt(x.Selector) { } else { z.DecFallback(x.Selector, false) } } - yyj487++ - if yyhl487 { - yyb487 = yyj487 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb487 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb487 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_api.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { - yyv490 := &x.Template - yyv490.CodecDecodeSelf(d) + yyv15 := &x.Template + 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.UpdateStrategy = DaemonSetUpdateStrategy{} + } else { + yyv16 := &x.UpdateStrategy + yyv16.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.MinReadySeconds = 0 + } else { + yyv17 := &x.MinReadySeconds + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*int32)(yyv17)) = int32(r.DecodeInt(32)) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TemplateGeneration = 0 + } else { + yyv19 := &x.TemplateGeneration + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*int64)(yyv19)) = int64(r.DecodeInt(64)) + } } for { - yyj487++ - if yyhl487 { - yyb487 = yyj487 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb487 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb487 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj487-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -5970,33 +7865,37 @@ func (x *DaemonSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym491 := z.EncBinary() - _ = yym491 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep492 := !z.EncBinary() - yy2arr492 := z.EncBasicHandle().StructToArray - var yyq492 [3]bool - _, _, _ = yysep492, yyq492, yy2arr492 - const yyr492 bool = false - var yynn492 int - if yyr492 || yy2arr492 { - r.EncodeArrayStart(3) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [8]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[4] = x.ObservedGeneration != 0 + yyq2[5] = x.UpdatedNumberScheduled != 0 + yyq2[6] = x.NumberAvailable != 0 + yyq2[7] = x.NumberUnavailable != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(8) } else { - yynn492 = 3 - for _, b := range yyq492 { + yynn2 = 4 + for _, b := range yyq2 { if b { - yynn492++ + yynn2++ } } - r.EncodeMapStart(yynn492) - yynn492 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr492 || yy2arr492 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym494 := z.EncBinary() - _ = yym494 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeInt(int64(x.CurrentNumberScheduled)) @@ -6005,17 +7904,17 @@ func (x *DaemonSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("currentNumberScheduled")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym495 := z.EncBinary() - _ = yym495 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeInt(int64(x.CurrentNumberScheduled)) } } - if yyr492 || yy2arr492 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym497 := z.EncBinary() - _ = yym497 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeInt(int64(x.NumberMisscheduled)) @@ -6024,17 +7923,17 @@ func (x *DaemonSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("numberMisscheduled")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym498 := z.EncBinary() - _ = yym498 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeInt(int64(x.NumberMisscheduled)) } } - if yyr492 || yy2arr492 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym500 := z.EncBinary() - _ = yym500 + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeInt(int64(x.DesiredNumberScheduled)) @@ -6043,14 +7942,133 @@ func (x *DaemonSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("desiredNumberScheduled")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym501 := z.EncBinary() - _ = yym501 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeInt(int64(x.DesiredNumberScheduled)) } } - if yyr492 || yy2arr492 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeInt(int64(x.NumberReady)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("numberReady")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeInt(int64(x.NumberReady)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeInt(int64(x.ObservedGeneration)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeInt(int64(x.ObservedGeneration)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeInt(int64(x.UpdatedNumberScheduled)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("updatedNumberScheduled")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeInt(int64(x.UpdatedNumberScheduled)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[6] { + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + r.EncodeInt(int64(x.NumberAvailable)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("numberAvailable")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeInt(int64(x.NumberAvailable)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[7] { + yym25 := z.EncBinary() + _ = yym25 + if false { + } else { + r.EncodeInt(int64(x.NumberUnavailable)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[7] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("numberUnavailable")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym26 := z.EncBinary() + _ = yym26 + if false { + } else { + r.EncodeInt(int64(x.NumberUnavailable)) + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6063,25 +8081,25 @@ func (x *DaemonSetStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym502 := z.DecBinary() - _ = yym502 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct503 := r.ContainerType() - if yyct503 == codecSelferValueTypeMap1234 { - yyl503 := r.ReadMapStart() - if yyl503 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl503, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct503 == codecSelferValueTypeArray1234 { - yyl503 := r.ReadArrayStart() - if yyl503 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl503, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6093,12 +8111,12 @@ func (x *DaemonSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys504Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys504Slc - var yyhl504 bool = l >= 0 - for yyj504 := 0; ; yyj504++ { - if yyhl504 { - if yyj504 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -6107,32 +8125,110 @@ func (x *DaemonSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys504Slc = r.DecodeBytes(yys504Slc, true, true) - yys504 := string(yys504Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys504 { + switch yys3 { case "currentNumberScheduled": if r.TryDecodeAsNil() { x.CurrentNumberScheduled = 0 } else { - x.CurrentNumberScheduled = int32(r.DecodeInt(32)) + yyv4 := &x.CurrentNumberScheduled + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } } case "numberMisscheduled": if r.TryDecodeAsNil() { x.NumberMisscheduled = 0 } else { - x.NumberMisscheduled = int32(r.DecodeInt(32)) + yyv6 := &x.NumberMisscheduled + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(yyv6)) = int32(r.DecodeInt(32)) + } } case "desiredNumberScheduled": if r.TryDecodeAsNil() { x.DesiredNumberScheduled = 0 } else { - x.DesiredNumberScheduled = int32(r.DecodeInt(32)) + yyv8 := &x.DesiredNumberScheduled + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } + } + case "numberReady": + if r.TryDecodeAsNil() { + x.NumberReady = 0 + } else { + yyv10 := &x.NumberReady + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int32)(yyv10)) = int32(r.DecodeInt(32)) + } + } + case "observedGeneration": + if r.TryDecodeAsNil() { + x.ObservedGeneration = 0 + } else { + yyv12 := &x.ObservedGeneration + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int64)(yyv12)) = int64(r.DecodeInt(64)) + } + } + case "updatedNumberScheduled": + if r.TryDecodeAsNil() { + x.UpdatedNumberScheduled = 0 + } else { + yyv14 := &x.UpdatedNumberScheduled + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*int32)(yyv14)) = int32(r.DecodeInt(32)) + } + } + case "numberAvailable": + if r.TryDecodeAsNil() { + x.NumberAvailable = 0 + } else { + yyv16 := &x.NumberAvailable + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*int32)(yyv16)) = int32(r.DecodeInt(32)) + } + } + case "numberUnavailable": + if r.TryDecodeAsNil() { + x.NumberUnavailable = 0 + } else { + yyv18 := &x.NumberUnavailable + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *((*int32)(yyv18)) = int32(r.DecodeInt(32)) + } } default: - z.DecStructFieldNotFound(-1, yys504) - } // end switch yys504 - } // end for yyj504 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -6140,16 +8236,16 @@ func (x *DaemonSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj508 int - var yyb508 bool - var yyhl508 bool = l >= 0 - yyj508++ - if yyhl508 { - yyb508 = yyj508 > l + var yyj20 int + var yyb20 bool + var yyhl20 bool = l >= 0 + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l } else { - yyb508 = r.CheckBreak() + yyb20 = r.CheckBreak() } - if yyb508 { + if yyb20 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6157,15 +8253,21 @@ func (x *DaemonSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.CurrentNumberScheduled = 0 } else { - x.CurrentNumberScheduled = int32(r.DecodeInt(32)) + yyv21 := &x.CurrentNumberScheduled + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*int32)(yyv21)) = int32(r.DecodeInt(32)) + } } - yyj508++ - if yyhl508 { - yyb508 = yyj508 > l + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l } else { - yyb508 = r.CheckBreak() + yyb20 = r.CheckBreak() } - if yyb508 { + if yyb20 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6173,15 +8275,21 @@ func (x *DaemonSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.NumberMisscheduled = 0 } else { - x.NumberMisscheduled = int32(r.DecodeInt(32)) + yyv23 := &x.NumberMisscheduled + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*int32)(yyv23)) = int32(r.DecodeInt(32)) + } } - yyj508++ - if yyhl508 { - yyb508 = yyj508 > l + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l } else { - yyb508 = r.CheckBreak() + yyb20 = r.CheckBreak() } - if yyb508 { + if yyb20 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6189,20 +8297,136 @@ func (x *DaemonSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.DesiredNumberScheduled = 0 } else { - x.DesiredNumberScheduled = int32(r.DecodeInt(32)) + yyv25 := &x.DesiredNumberScheduled + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*int32)(yyv25)) = int32(r.DecodeInt(32)) + } + } + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l + } else { + yyb20 = r.CheckBreak() + } + if yyb20 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NumberReady = 0 + } else { + yyv27 := &x.NumberReady + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*int32)(yyv27)) = int32(r.DecodeInt(32)) + } + } + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l + } else { + yyb20 = r.CheckBreak() + } + if yyb20 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObservedGeneration = 0 + } else { + yyv29 := &x.ObservedGeneration + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*int64)(yyv29)) = int64(r.DecodeInt(64)) + } + } + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l + } else { + yyb20 = r.CheckBreak() + } + if yyb20 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.UpdatedNumberScheduled = 0 + } else { + yyv31 := &x.UpdatedNumberScheduled + yym32 := z.DecBinary() + _ = yym32 + if false { + } else { + *((*int32)(yyv31)) = int32(r.DecodeInt(32)) + } + } + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l + } else { + yyb20 = r.CheckBreak() + } + if yyb20 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NumberAvailable = 0 + } else { + yyv33 := &x.NumberAvailable + yym34 := z.DecBinary() + _ = yym34 + if false { + } else { + *((*int32)(yyv33)) = int32(r.DecodeInt(32)) + } + } + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l + } else { + yyb20 = r.CheckBreak() + } + if yyb20 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NumberUnavailable = 0 + } else { + yyv35 := &x.NumberUnavailable + yym36 := z.DecBinary() + _ = yym36 + if false { + } else { + *((*int32)(yyv35)) = int32(r.DecodeInt(32)) + } } for { - yyj508++ - if yyhl508 { - yyb508 = yyj508 > l + yyj20++ + if yyhl20 { + yyb20 = yyj20 > l } else { - yyb508 = r.CheckBreak() + yyb20 = r.CheckBreak() } - if yyb508 { + if yyb20 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj508-1, "") + z.DecStructFieldNotFound(yyj20-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6214,39 +8438,39 @@ func (x *DaemonSet) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym512 := z.EncBinary() - _ = yym512 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep513 := !z.EncBinary() - yy2arr513 := z.EncBasicHandle().StructToArray - var yyq513 [5]bool - _, _, _ = yysep513, yyq513, yy2arr513 - const yyr513 bool = false - yyq513[0] = x.Kind != "" - yyq513[1] = x.APIVersion != "" - yyq513[2] = true - yyq513[3] = true - yyq513[4] = true - var yynn513 int - if yyr513 || yy2arr513 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn513 = 0 - for _, b := range yyq513 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn513++ + yynn2++ } } - r.EncodeMapStart(yynn513) - yynn513 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr513 || yy2arr513 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq513[0] { - yym515 := z.EncBinary() - _ = yym515 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -6255,23 +8479,23 @@ func (x *DaemonSet) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq513[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym516 := z.EncBinary() - _ = yym516 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr513 || yy2arr513 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq513[1] { - yym518 := z.EncBinary() - _ = yym518 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -6280,70 +8504,82 @@ func (x *DaemonSet) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq513[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym519 := z.EncBinary() - _ = yym519 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr513 || yy2arr513 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq513[2] { - yy521 := &x.ObjectMeta - yy521.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq513[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy522 := &x.ObjectMeta - yy522.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr513 || yy2arr513 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq513[3] { - yy524 := &x.Spec - yy524.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq513[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy525 := &x.Spec - yy525.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr513 || yy2arr513 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq513[4] { - yy527 := &x.Status - yy527.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq513[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy528 := &x.Status - yy528.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr513 || yy2arr513 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6356,25 +8592,25 @@ func (x *DaemonSet) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym529 := z.DecBinary() - _ = yym529 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct530 := r.ContainerType() - if yyct530 == codecSelferValueTypeMap1234 { - yyl530 := r.ReadMapStart() - if yyl530 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl530, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct530 == codecSelferValueTypeArray1234 { - yyl530 := r.ReadArrayStart() - if yyl530 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl530, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6386,12 +8622,12 @@ func (x *DaemonSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys531Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys531Slc - var yyhl531 bool = l >= 0 - for yyj531 := 0; ; yyj531++ { - if yyhl531 { - if yyj531 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -6400,47 +8636,65 @@ func (x *DaemonSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys531Slc = r.DecodeBytes(yys531Slc, true, true) - yys531 := string(yys531Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys531 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv534 := &x.ObjectMeta - yyv534.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = DaemonSetSpec{} } else { - yyv535 := &x.Spec - yyv535.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = DaemonSetStatus{} } else { - yyv536 := &x.Status - yyv536.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys531) - } // end switch yys531 - } // end for yyj531 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -6448,16 +8702,16 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj537 int - var yyb537 bool - var yyhl537 bool = l >= 0 - yyj537++ - if yyhl537 { - yyb537 = yyj537 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb537 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb537 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6465,15 +8719,21 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj537++ - if yyhl537 { - yyb537 = yyj537 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb537 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb537 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6481,32 +8741,44 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj537++ - if yyhl537 { - yyb537 = yyj537 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb537 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb537 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv540 := &x.ObjectMeta - yyv540.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj537++ - if yyhl537 { - yyb537 = yyj537 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb537 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb537 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6514,16 +8786,16 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = DaemonSetSpec{} } else { - yyv541 := &x.Spec - yyv541.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj537++ - if yyhl537 { - yyb537 = yyj537 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb537 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb537 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6531,21 +8803,21 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = DaemonSetStatus{} } else { - yyv542 := &x.Status - yyv542.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj537++ - if yyhl537 { - yyb537 = yyj537 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb537 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb537 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj537-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6557,37 +8829,37 @@ func (x *DaemonSetList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym543 := z.EncBinary() - _ = yym543 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep544 := !z.EncBinary() - yy2arr544 := z.EncBasicHandle().StructToArray - var yyq544 [4]bool - _, _, _ = yysep544, yyq544, yy2arr544 - const yyr544 bool = false - yyq544[0] = x.Kind != "" - yyq544[1] = x.APIVersion != "" - yyq544[2] = true - var yynn544 int - if yyr544 || yy2arr544 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn544 = 1 - for _, b := range yyq544 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn544++ + yynn2++ } } - r.EncodeMapStart(yynn544) - yynn544 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr544 || yy2arr544 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq544[0] { - yym546 := z.EncBinary() - _ = yym546 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -6596,23 +8868,23 @@ func (x *DaemonSetList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq544[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym547 := z.EncBinary() - _ = yym547 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr544 || yy2arr544 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq544[1] { - yym549 := z.EncBinary() - _ = yym549 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -6621,54 +8893,54 @@ func (x *DaemonSetList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq544[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym550 := z.EncBinary() - _ = yym550 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr544 || yy2arr544 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq544[2] { - yy552 := &x.ListMeta - yym553 := z.EncBinary() - _ = yym553 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy552) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy552) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq544[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy554 := &x.ListMeta - yym555 := z.EncBinary() - _ = yym555 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy554) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy554) + z.EncFallback(yy12) } } } - if yyr544 || yy2arr544 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym557 := z.EncBinary() - _ = yym557 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceDaemonSet(([]DaemonSet)(x.Items), e) @@ -6681,15 +8953,15 @@ func (x *DaemonSetList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym558 := z.EncBinary() - _ = yym558 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceDaemonSet(([]DaemonSet)(x.Items), e) } } } - if yyr544 || yy2arr544 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6702,25 +8974,25 @@ func (x *DaemonSetList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym559 := z.DecBinary() - _ = yym559 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct560 := r.ContainerType() - if yyct560 == codecSelferValueTypeMap1234 { - yyl560 := r.ReadMapStart() - if yyl560 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl560, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct560 == codecSelferValueTypeArray1234 { - yyl560 := r.ReadArrayStart() - if yyl560 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl560, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6732,12 +9004,12 @@ func (x *DaemonSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys561Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys561Slc - var yyhl561 bool = l >= 0 - for yyj561 := 0; ; yyj561++ { - if yyhl561 { - if yyj561 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -6746,51 +9018,63 @@ func (x *DaemonSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys561Slc = r.DecodeBytes(yys561Slc, true, true) - yys561 := string(yys561Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys561 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv564 := &x.ListMeta - yym565 := z.DecBinary() - _ = yym565 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv564) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv564, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv566 := &x.Items - yym567 := z.DecBinary() - _ = yym567 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceDaemonSet((*[]DaemonSet)(yyv566), d) + h.decSliceDaemonSet((*[]DaemonSet)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys561) - } // end switch yys561 - } // end for yyj561 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -6798,16 +9082,16 @@ func (x *DaemonSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj568 int - var yyb568 bool - var yyhl568 bool = l >= 0 - yyj568++ - if yyhl568 { - yyb568 = yyj568 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb568 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb568 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6815,15 +9099,21 @@ func (x *DaemonSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj568++ - if yyhl568 { - yyb568 = yyj568 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb568 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb568 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6831,38 +9121,44 @@ func (x *DaemonSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj568++ - if yyhl568 { - yyb568 = yyj568 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb568 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb568 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv571 := &x.ListMeta - yym572 := z.DecBinary() - _ = yym572 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv571) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv571, false) + z.DecFallback(yyv17, false) } } - yyj568++ - if yyhl568 { - yyb568 = yyj568 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb568 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb568 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6870,26 +9166,26 @@ func (x *DaemonSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv573 := &x.Items - yym574 := z.DecBinary() - _ = yym574 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceDaemonSet((*[]DaemonSet)(yyv573), d) + h.decSliceDaemonSet((*[]DaemonSet)(yyv19), d) } } for { - yyj568++ - if yyhl568 { - yyb568 = yyj568 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb568 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb568 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj568-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6901,37 +9197,37 @@ func (x *ThirdPartyResourceDataList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym575 := z.EncBinary() - _ = yym575 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep576 := !z.EncBinary() - yy2arr576 := z.EncBasicHandle().StructToArray - var yyq576 [4]bool - _, _, _ = yysep576, yyq576, yy2arr576 - const yyr576 bool = false - yyq576[0] = x.Kind != "" - yyq576[1] = x.APIVersion != "" - yyq576[2] = true - var yynn576 int - if yyr576 || yy2arr576 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn576 = 1 - for _, b := range yyq576 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn576++ + yynn2++ } } - r.EncodeMapStart(yynn576) - yynn576 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr576 || yy2arr576 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq576[0] { - yym578 := z.EncBinary() - _ = yym578 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -6940,23 +9236,23 @@ func (x *ThirdPartyResourceDataList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq576[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym579 := z.EncBinary() - _ = yym579 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr576 || yy2arr576 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq576[1] { - yym581 := z.EncBinary() - _ = yym581 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -6965,54 +9261,54 @@ func (x *ThirdPartyResourceDataList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq576[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym582 := z.EncBinary() - _ = yym582 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr576 || yy2arr576 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq576[2] { - yy584 := &x.ListMeta - yym585 := z.EncBinary() - _ = yym585 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy584) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy584) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq576[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy586 := &x.ListMeta - yym587 := z.EncBinary() - _ = yym587 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy586) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy586) + z.EncFallback(yy12) } } } - if yyr576 || yy2arr576 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym589 := z.EncBinary() - _ = yym589 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceThirdPartyResourceData(([]ThirdPartyResourceData)(x.Items), e) @@ -7025,15 +9321,15 @@ func (x *ThirdPartyResourceDataList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym590 := z.EncBinary() - _ = yym590 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceThirdPartyResourceData(([]ThirdPartyResourceData)(x.Items), e) } } } - if yyr576 || yy2arr576 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -7046,25 +9342,25 @@ func (x *ThirdPartyResourceDataList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym591 := z.DecBinary() - _ = yym591 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct592 := r.ContainerType() - if yyct592 == codecSelferValueTypeMap1234 { - yyl592 := r.ReadMapStart() - if yyl592 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl592, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct592 == codecSelferValueTypeArray1234 { - yyl592 := r.ReadArrayStart() - if yyl592 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl592, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -7076,12 +9372,12 @@ func (x *ThirdPartyResourceDataList) codecDecodeSelfFromMap(l int, d *codec1978. var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys593Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys593Slc - var yyhl593 bool = l >= 0 - for yyj593 := 0; ; yyj593++ { - if yyhl593 { - if yyj593 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -7090,51 +9386,63 @@ func (x *ThirdPartyResourceDataList) codecDecodeSelfFromMap(l int, d *codec1978. } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys593Slc = r.DecodeBytes(yys593Slc, true, true) - yys593 := string(yys593Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys593 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv596 := &x.ListMeta - yym597 := z.DecBinary() - _ = yym597 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv596) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv596, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv598 := &x.Items - yym599 := z.DecBinary() - _ = yym599 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceThirdPartyResourceData((*[]ThirdPartyResourceData)(yyv598), d) + h.decSliceThirdPartyResourceData((*[]ThirdPartyResourceData)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys593) - } // end switch yys593 - } // end for yyj593 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -7142,16 +9450,16 @@ func (x *ThirdPartyResourceDataList) codecDecodeSelfFromArray(l int, d *codec197 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj600 int - var yyb600 bool - var yyhl600 bool = l >= 0 - yyj600++ - if yyhl600 { - yyb600 = yyj600 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb600 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb600 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7159,15 +9467,21 @@ func (x *ThirdPartyResourceDataList) codecDecodeSelfFromArray(l int, d *codec197 if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj600++ - if yyhl600 { - yyb600 = yyj600 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb600 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb600 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7175,38 +9489,44 @@ func (x *ThirdPartyResourceDataList) codecDecodeSelfFromArray(l int, d *codec197 if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj600++ - if yyhl600 { - yyb600 = yyj600 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb600 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb600 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv603 := &x.ListMeta - yym604 := z.DecBinary() - _ = yym604 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv603) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv603, false) + z.DecFallback(yyv17, false) } } - yyj600++ - if yyhl600 { - yyb600 = yyj600 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb600 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb600 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7214,26 +9534,26 @@ func (x *ThirdPartyResourceDataList) codecDecodeSelfFromArray(l int, d *codec197 if r.TryDecodeAsNil() { x.Items = nil } else { - yyv605 := &x.Items - yym606 := z.DecBinary() - _ = yym606 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceThirdPartyResourceData((*[]ThirdPartyResourceData)(yyv605), d) + h.decSliceThirdPartyResourceData((*[]ThirdPartyResourceData)(yyv19), d) } } for { - yyj600++ - if yyhl600 { - yyb600 = yyj600 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb600 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb600 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj600-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -7245,39 +9565,39 @@ func (x *Ingress) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym607 := z.EncBinary() - _ = yym607 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep608 := !z.EncBinary() - yy2arr608 := z.EncBasicHandle().StructToArray - var yyq608 [5]bool - _, _, _ = yysep608, yyq608, yy2arr608 - const yyr608 bool = false - yyq608[0] = x.Kind != "" - yyq608[1] = x.APIVersion != "" - yyq608[2] = true - yyq608[3] = true - yyq608[4] = true - var yynn608 int - if yyr608 || yy2arr608 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn608 = 0 - for _, b := range yyq608 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn608++ + yynn2++ } } - r.EncodeMapStart(yynn608) - yynn608 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr608 || yy2arr608 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq608[0] { - yym610 := z.EncBinary() - _ = yym610 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -7286,23 +9606,23 @@ func (x *Ingress) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq608[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym611 := z.EncBinary() - _ = yym611 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr608 || yy2arr608 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq608[1] { - yym613 := z.EncBinary() - _ = yym613 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -7311,70 +9631,82 @@ func (x *Ingress) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq608[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym614 := z.EncBinary() - _ = yym614 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr608 || yy2arr608 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq608[2] { - yy616 := &x.ObjectMeta - yy616.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq608[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy617 := &x.ObjectMeta - yy617.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr608 || yy2arr608 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq608[3] { - yy619 := &x.Spec - yy619.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq608[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy620 := &x.Spec - yy620.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr608 || yy2arr608 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq608[4] { - yy622 := &x.Status - yy622.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq608[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy623 := &x.Status - yy623.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr608 || yy2arr608 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -7387,25 +9719,25 @@ func (x *Ingress) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym624 := z.DecBinary() - _ = yym624 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct625 := r.ContainerType() - if yyct625 == codecSelferValueTypeMap1234 { - yyl625 := r.ReadMapStart() - if yyl625 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl625, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct625 == codecSelferValueTypeArray1234 { - yyl625 := r.ReadArrayStart() - if yyl625 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl625, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -7417,12 +9749,12 @@ func (x *Ingress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys626Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys626Slc - var yyhl626 bool = l >= 0 - for yyj626 := 0; ; yyj626++ { - if yyhl626 { - if yyj626 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -7431,47 +9763,65 @@ func (x *Ingress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys626Slc = r.DecodeBytes(yys626Slc, true, true) - yys626 := string(yys626Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys626 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv629 := &x.ObjectMeta - yyv629.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = IngressSpec{} } else { - yyv630 := &x.Spec - yyv630.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = IngressStatus{} } else { - yyv631 := &x.Status - yyv631.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys626) - } // end switch yys626 - } // end for yyj626 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -7479,16 +9829,16 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj632 int - var yyb632 bool - var yyhl632 bool = l >= 0 - yyj632++ - if yyhl632 { - yyb632 = yyj632 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb632 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb632 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7496,15 +9846,21 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj632++ - if yyhl632 { - yyb632 = yyj632 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb632 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb632 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7512,32 +9868,44 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj632++ - if yyhl632 { - yyb632 = yyj632 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb632 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb632 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv635 := &x.ObjectMeta - yyv635.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj632++ - if yyhl632 { - yyb632 = yyj632 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb632 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb632 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7545,16 +9913,16 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = IngressSpec{} } else { - yyv636 := &x.Spec - yyv636.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj632++ - if yyhl632 { - yyb632 = yyj632 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb632 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb632 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7562,21 +9930,21 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = IngressStatus{} } else { - yyv637 := &x.Status - yyv637.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj632++ - if yyhl632 { - yyb632 = yyj632 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb632 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb632 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj632-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -7588,37 +9956,37 @@ func (x *IngressList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym638 := z.EncBinary() - _ = yym638 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep639 := !z.EncBinary() - yy2arr639 := z.EncBasicHandle().StructToArray - var yyq639 [4]bool - _, _, _ = yysep639, yyq639, yy2arr639 - const yyr639 bool = false - yyq639[0] = x.Kind != "" - yyq639[1] = x.APIVersion != "" - yyq639[2] = true - var yynn639 int - if yyr639 || yy2arr639 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn639 = 1 - for _, b := range yyq639 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn639++ + yynn2++ } } - r.EncodeMapStart(yynn639) - yynn639 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr639 || yy2arr639 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq639[0] { - yym641 := z.EncBinary() - _ = yym641 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -7627,23 +9995,23 @@ func (x *IngressList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq639[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym642 := z.EncBinary() - _ = yym642 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr639 || yy2arr639 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq639[1] { - yym644 := z.EncBinary() - _ = yym644 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -7652,54 +10020,54 @@ func (x *IngressList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq639[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym645 := z.EncBinary() - _ = yym645 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr639 || yy2arr639 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq639[2] { - yy647 := &x.ListMeta - yym648 := z.EncBinary() - _ = yym648 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy647) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy647) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq639[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy649 := &x.ListMeta - yym650 := z.EncBinary() - _ = yym650 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy649) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy649) + z.EncFallback(yy12) } } } - if yyr639 || yy2arr639 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym652 := z.EncBinary() - _ = yym652 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceIngress(([]Ingress)(x.Items), e) @@ -7712,15 +10080,15 @@ func (x *IngressList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym653 := z.EncBinary() - _ = yym653 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceIngress(([]Ingress)(x.Items), e) } } } - if yyr639 || yy2arr639 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -7733,25 +10101,25 @@ func (x *IngressList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym654 := z.DecBinary() - _ = yym654 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct655 := r.ContainerType() - if yyct655 == codecSelferValueTypeMap1234 { - yyl655 := r.ReadMapStart() - if yyl655 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl655, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct655 == codecSelferValueTypeArray1234 { - yyl655 := r.ReadArrayStart() - if yyl655 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl655, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -7763,12 +10131,12 @@ func (x *IngressList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys656Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys656Slc - var yyhl656 bool = l >= 0 - for yyj656 := 0; ; yyj656++ { - if yyhl656 { - if yyj656 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -7777,51 +10145,63 @@ func (x *IngressList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys656Slc = r.DecodeBytes(yys656Slc, true, true) - yys656 := string(yys656Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys656 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv659 := &x.ListMeta - yym660 := z.DecBinary() - _ = yym660 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv659) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv659, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv661 := &x.Items - yym662 := z.DecBinary() - _ = yym662 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceIngress((*[]Ingress)(yyv661), d) + h.decSliceIngress((*[]Ingress)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys656) - } // end switch yys656 - } // end for yyj656 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -7829,16 +10209,16 @@ func (x *IngressList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj663 int - var yyb663 bool - var yyhl663 bool = l >= 0 - yyj663++ - if yyhl663 { - yyb663 = yyj663 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb663 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb663 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7846,15 +10226,21 @@ func (x *IngressList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj663++ - if yyhl663 { - yyb663 = yyj663 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb663 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb663 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7862,38 +10248,44 @@ func (x *IngressList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj663++ - if yyhl663 { - yyb663 = yyj663 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb663 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb663 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv666 := &x.ListMeta - yym667 := z.DecBinary() - _ = yym667 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv666) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv666, false) + z.DecFallback(yyv17, false) } } - yyj663++ - if yyhl663 { - yyb663 = yyj663 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb663 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb663 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -7901,26 +10293,26 @@ func (x *IngressList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv668 := &x.Items - yym669 := z.DecBinary() - _ = yym669 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceIngress((*[]Ingress)(yyv668), d) + h.decSliceIngress((*[]Ingress)(yyv19), d) } } for { - yyj663++ - if yyhl663 { - yyb663 = yyj663 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb663 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb663 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj663-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -7932,35 +10324,35 @@ func (x *IngressSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym670 := z.EncBinary() - _ = yym670 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep671 := !z.EncBinary() - yy2arr671 := z.EncBasicHandle().StructToArray - var yyq671 [3]bool - _, _, _ = yysep671, yyq671, yy2arr671 - const yyr671 bool = false - yyq671[0] = x.Backend != nil - yyq671[1] = len(x.TLS) != 0 - yyq671[2] = len(x.Rules) != 0 - var yynn671 int - if yyr671 || yy2arr671 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Backend != nil + yyq2[1] = len(x.TLS) != 0 + yyq2[2] = len(x.Rules) != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(3) } else { - yynn671 = 0 - for _, b := range yyq671 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn671++ + yynn2++ } } - r.EncodeMapStart(yynn671) - yynn671 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr671 || yy2arr671 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq671[0] { + if yyq2[0] { if x.Backend == nil { r.EncodeNil() } else { @@ -7970,7 +10362,7 @@ func (x *IngressSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq671[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("backend")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -7981,14 +10373,14 @@ func (x *IngressSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr671 || yy2arr671 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq671[1] { + if yyq2[1] { if x.TLS == nil { r.EncodeNil() } else { - yym674 := z.EncBinary() - _ = yym674 + yym7 := z.EncBinary() + _ = yym7 if false { } else { h.encSliceIngressTLS(([]IngressTLS)(x.TLS), e) @@ -7998,15 +10390,15 @@ func (x *IngressSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq671[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("tls")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.TLS == nil { r.EncodeNil() } else { - yym675 := z.EncBinary() - _ = yym675 + yym8 := z.EncBinary() + _ = yym8 if false { } else { h.encSliceIngressTLS(([]IngressTLS)(x.TLS), e) @@ -8014,14 +10406,14 @@ func (x *IngressSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr671 || yy2arr671 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq671[2] { + if yyq2[2] { if x.Rules == nil { r.EncodeNil() } else { - yym677 := z.EncBinary() - _ = yym677 + yym10 := z.EncBinary() + _ = yym10 if false { } else { h.encSliceIngressRule(([]IngressRule)(x.Rules), e) @@ -8031,15 +10423,15 @@ func (x *IngressSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq671[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rules")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Rules == nil { r.EncodeNil() } else { - yym678 := z.EncBinary() - _ = yym678 + yym11 := z.EncBinary() + _ = yym11 if false { } else { h.encSliceIngressRule(([]IngressRule)(x.Rules), e) @@ -8047,7 +10439,7 @@ func (x *IngressSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr671 || yy2arr671 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -8060,25 +10452,25 @@ func (x *IngressSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym679 := z.DecBinary() - _ = yym679 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct680 := r.ContainerType() - if yyct680 == codecSelferValueTypeMap1234 { - yyl680 := r.ReadMapStart() - if yyl680 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl680, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct680 == codecSelferValueTypeArray1234 { - yyl680 := r.ReadArrayStart() - if yyl680 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl680, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -8090,12 +10482,12 @@ func (x *IngressSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys681Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys681Slc - var yyhl681 bool = l >= 0 - for yyj681 := 0; ; yyj681++ { - if yyhl681 { - if yyj681 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -8104,10 +10496,10 @@ func (x *IngressSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys681Slc = r.DecodeBytes(yys681Slc, true, true) - yys681 := string(yys681Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys681 { + switch yys3 { case "backend": if r.TryDecodeAsNil() { if x.Backend != nil { @@ -8123,30 +10515,30 @@ func (x *IngressSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.TLS = nil } else { - yyv683 := &x.TLS - yym684 := z.DecBinary() - _ = yym684 + yyv5 := &x.TLS + yym6 := z.DecBinary() + _ = yym6 if false { } else { - h.decSliceIngressTLS((*[]IngressTLS)(yyv683), d) + h.decSliceIngressTLS((*[]IngressTLS)(yyv5), d) } } case "rules": if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv685 := &x.Rules - yym686 := z.DecBinary() - _ = yym686 + yyv7 := &x.Rules + yym8 := z.DecBinary() + _ = yym8 if false { } else { - h.decSliceIngressRule((*[]IngressRule)(yyv685), d) + h.decSliceIngressRule((*[]IngressRule)(yyv7), d) } } default: - z.DecStructFieldNotFound(-1, yys681) - } // end switch yys681 - } // end for yyj681 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -8154,16 +10546,16 @@ func (x *IngressSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj687 int - var yyb687 bool - var yyhl687 bool = l >= 0 - yyj687++ - if yyhl687 { - yyb687 = yyj687 > l + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb687 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb687 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8178,13 +10570,13 @@ func (x *IngressSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Backend.CodecDecodeSelf(d) } - yyj687++ - if yyhl687 { - yyb687 = yyj687 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb687 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb687 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8192,21 +10584,21 @@ func (x *IngressSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.TLS = nil } else { - yyv689 := &x.TLS - yym690 := z.DecBinary() - _ = yym690 + yyv11 := &x.TLS + yym12 := z.DecBinary() + _ = yym12 if false { } else { - h.decSliceIngressTLS((*[]IngressTLS)(yyv689), d) + h.decSliceIngressTLS((*[]IngressTLS)(yyv11), d) } } - yyj687++ - if yyhl687 { - yyb687 = yyj687 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb687 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb687 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8214,26 +10606,26 @@ func (x *IngressSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv691 := &x.Rules - yym692 := z.DecBinary() - _ = yym692 + yyv13 := &x.Rules + yym14 := z.DecBinary() + _ = yym14 if false { } else { - h.decSliceIngressRule((*[]IngressRule)(yyv691), d) + h.decSliceIngressRule((*[]IngressRule)(yyv13), d) } } for { - yyj687++ - if yyhl687 { - yyb687 = yyj687 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb687 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb687 { + if yyb9 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj687-1, "") + z.DecStructFieldNotFound(yyj9-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -8245,39 +10637,39 @@ func (x *IngressTLS) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym693 := z.EncBinary() - _ = yym693 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep694 := !z.EncBinary() - yy2arr694 := z.EncBasicHandle().StructToArray - var yyq694 [2]bool - _, _, _ = yysep694, yyq694, yy2arr694 - const yyr694 bool = false - yyq694[0] = len(x.Hosts) != 0 - yyq694[1] = x.SecretName != "" - var yynn694 int - if yyr694 || yy2arr694 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = len(x.Hosts) != 0 + yyq2[1] = x.SecretName != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn694 = 0 - for _, b := range yyq694 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn694++ + yynn2++ } } - r.EncodeMapStart(yynn694) - yynn694 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr694 || yy2arr694 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq694[0] { + if yyq2[0] { if x.Hosts == nil { r.EncodeNil() } else { - yym696 := z.EncBinary() - _ = yym696 + yym4 := z.EncBinary() + _ = yym4 if false { } else { z.F.EncSliceStringV(x.Hosts, false, e) @@ -8287,15 +10679,15 @@ func (x *IngressTLS) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq694[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hosts")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Hosts == nil { r.EncodeNil() } else { - yym697 := z.EncBinary() - _ = yym697 + yym5 := z.EncBinary() + _ = yym5 if false { } else { z.F.EncSliceStringV(x.Hosts, false, e) @@ -8303,11 +10695,11 @@ func (x *IngressTLS) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr694 || yy2arr694 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq694[1] { - yym699 := z.EncBinary() - _ = yym699 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SecretName)) @@ -8316,19 +10708,19 @@ func (x *IngressTLS) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq694[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("secretName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym700 := z.EncBinary() - _ = yym700 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SecretName)) } } } - if yyr694 || yy2arr694 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -8341,25 +10733,25 @@ func (x *IngressTLS) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym701 := z.DecBinary() - _ = yym701 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct702 := r.ContainerType() - if yyct702 == codecSelferValueTypeMap1234 { - yyl702 := r.ReadMapStart() - if yyl702 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl702, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct702 == codecSelferValueTypeArray1234 { - yyl702 := r.ReadArrayStart() - if yyl702 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl702, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -8371,12 +10763,12 @@ func (x *IngressTLS) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys703Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys703Slc - var yyhl703 bool = l >= 0 - for yyj703 := 0; ; yyj703++ { - if yyhl703 { - if yyj703 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -8385,32 +10777,38 @@ func (x *IngressTLS) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys703Slc = r.DecodeBytes(yys703Slc, true, true) - yys703 := string(yys703Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys703 { + switch yys3 { case "hosts": if r.TryDecodeAsNil() { x.Hosts = nil } else { - yyv704 := &x.Hosts - yym705 := z.DecBinary() - _ = yym705 + yyv4 := &x.Hosts + yym5 := z.DecBinary() + _ = yym5 if false { } else { - z.F.DecSliceStringX(yyv704, false, d) + z.F.DecSliceStringX(yyv4, false, d) } } case "secretName": if r.TryDecodeAsNil() { x.SecretName = "" } else { - x.SecretName = string(r.DecodeString()) + yyv6 := &x.SecretName + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys703) - } // end switch yys703 - } // end for yyj703 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -8418,16 +10816,16 @@ func (x *IngressTLS) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj707 int - var yyb707 bool - var yyhl707 bool = l >= 0 - yyj707++ - if yyhl707 { - yyb707 = yyj707 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb707 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb707 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8435,21 +10833,21 @@ func (x *IngressTLS) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Hosts = nil } else { - yyv708 := &x.Hosts - yym709 := z.DecBinary() - _ = yym709 + yyv9 := &x.Hosts + yym10 := z.DecBinary() + _ = yym10 if false { } else { - z.F.DecSliceStringX(yyv708, false, d) + z.F.DecSliceStringX(yyv9, false, d) } } - yyj707++ - if yyhl707 { - yyb707 = yyj707 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb707 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb707 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8457,20 +10855,26 @@ func (x *IngressTLS) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.SecretName = "" } else { - x.SecretName = string(r.DecodeString()) + yyv11 := &x.SecretName + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } for { - yyj707++ - if yyhl707 { - yyb707 = yyj707 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb707 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb707 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj707-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -8482,48 +10886,48 @@ func (x *IngressStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym711 := z.EncBinary() - _ = yym711 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep712 := !z.EncBinary() - yy2arr712 := z.EncBasicHandle().StructToArray - var yyq712 [1]bool - _, _, _ = yysep712, yyq712, yy2arr712 - const yyr712 bool = false - yyq712[0] = true - var yynn712 int - if yyr712 || yy2arr712 { + 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 { - yynn712 = 0 - for _, b := range yyq712 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn712++ + yynn2++ } } - r.EncodeMapStart(yynn712) - yynn712 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr712 || yy2arr712 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq712[0] { - yy714 := &x.LoadBalancer - yy714.CodecEncodeSelf(e) + if yyq2[0] { + yy4 := &x.LoadBalancer + yy4.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq712[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("loadBalancer")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy715 := &x.LoadBalancer - yy715.CodecEncodeSelf(e) + yy6 := &x.LoadBalancer + yy6.CodecEncodeSelf(e) } } - if yyr712 || yy2arr712 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -8536,25 +10940,25 @@ func (x *IngressStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym716 := z.DecBinary() - _ = yym716 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct717 := r.ContainerType() - if yyct717 == codecSelferValueTypeMap1234 { - yyl717 := r.ReadMapStart() - if yyl717 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl717, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct717 == codecSelferValueTypeArray1234 { - yyl717 := r.ReadArrayStart() - if yyl717 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl717, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -8566,12 +10970,12 @@ func (x *IngressStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys718Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys718Slc - var yyhl718 bool = l >= 0 - for yyj718 := 0; ; yyj718++ { - if yyhl718 { - if yyj718 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -8580,21 +10984,21 @@ func (x *IngressStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys718Slc = r.DecodeBytes(yys718Slc, true, true) - yys718 := string(yys718Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys718 { + switch yys3 { case "loadBalancer": if r.TryDecodeAsNil() { - x.LoadBalancer = pkg2_api.LoadBalancerStatus{} + x.LoadBalancer = pkg4_v1.LoadBalancerStatus{} } else { - yyv719 := &x.LoadBalancer - yyv719.CodecDecodeSelf(d) + yyv4 := &x.LoadBalancer + yyv4.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys718) - } // end switch yys718 - } // end for yyj718 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -8602,38 +11006,38 @@ func (x *IngressStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj720 int - var yyb720 bool - var yyhl720 bool = l >= 0 - yyj720++ - if yyhl720 { - yyb720 = yyj720 > l + var yyj5 int + var yyb5 bool + var yyhl5 bool = l >= 0 + yyj5++ + if yyhl5 { + yyb5 = yyj5 > l } else { - yyb720 = r.CheckBreak() + yyb5 = r.CheckBreak() } - if yyb720 { + if yyb5 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.LoadBalancer = pkg2_api.LoadBalancerStatus{} + x.LoadBalancer = pkg4_v1.LoadBalancerStatus{} } else { - yyv721 := &x.LoadBalancer - yyv721.CodecDecodeSelf(d) + yyv6 := &x.LoadBalancer + yyv6.CodecDecodeSelf(d) } for { - yyj720++ - if yyhl720 { - yyb720 = yyj720 > l + yyj5++ + if yyhl5 { + yyb5 = yyj5 > l } else { - yyb720 = r.CheckBreak() + yyb5 = r.CheckBreak() } - if yyb720 { + if yyb5 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj720-1, "") + z.DecStructFieldNotFound(yyj5-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -8645,36 +11049,36 @@ func (x *IngressRule) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym722 := z.EncBinary() - _ = yym722 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep723 := !z.EncBinary() - yy2arr723 := z.EncBasicHandle().StructToArray - var yyq723 [2]bool - _, _, _ = yysep723, yyq723, yy2arr723 - const yyr723 bool = false - yyq723[0] = x.Host != "" - yyq723[1] = x.IngressRuleValue.HTTP != nil && x.HTTP != nil - var yynn723 int - if yyr723 || yy2arr723 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Host != "" + yyq2[1] = x.IngressRuleValue.HTTP != nil && x.HTTP != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn723 = 0 - for _, b := range yyq723 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn723++ + yynn2++ } } - r.EncodeMapStart(yynn723) - yynn723 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr723 || yy2arr723 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq723[0] { - yym725 := z.EncBinary() - _ = yym725 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Host)) @@ -8683,30 +11087,30 @@ func (x *IngressRule) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq723[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("host")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym726 := z.EncBinary() - _ = yym726 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Host)) } } } - var yyn727 bool + var yyn6 bool if x.IngressRuleValue.HTTP == nil { - yyn727 = true - goto LABEL727 + yyn6 = true + goto LABEL6 } - LABEL727: - if yyr723 || yy2arr723 { - if yyn727 { + LABEL6: + if yyr2 || yy2arr2 { + if yyn6 { r.EncodeNil() } else { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq723[1] { + if yyq2[1] { if x.HTTP == nil { r.EncodeNil() } else { @@ -8717,11 +11121,11 @@ func (x *IngressRule) CodecEncodeSelf(e *codec1978.Encoder) { } } } else { - if yyq723[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("http")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyn727 { + if yyn6 { r.EncodeNil() } else { if x.HTTP == nil { @@ -8732,7 +11136,7 @@ func (x *IngressRule) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr723 || yy2arr723 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -8745,25 +11149,25 @@ func (x *IngressRule) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym728 := z.DecBinary() - _ = yym728 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct729 := r.ContainerType() - if yyct729 == codecSelferValueTypeMap1234 { - yyl729 := r.ReadMapStart() - if yyl729 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl729, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct729 == codecSelferValueTypeArray1234 { - yyl729 := r.ReadArrayStart() - if yyl729 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl729, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -8775,12 +11179,12 @@ func (x *IngressRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys730Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys730Slc - var yyhl730 bool = l >= 0 - for yyj730 := 0; ; yyj730++ { - if yyhl730 { - if yyj730 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -8789,15 +11193,21 @@ func (x *IngressRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys730Slc = r.DecodeBytes(yys730Slc, true, true) - yys730 := string(yys730Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys730 { + switch yys3 { case "host": if r.TryDecodeAsNil() { x.Host = "" } else { - x.Host = string(r.DecodeString()) + yyv4 := &x.Host + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "http": if x.IngressRuleValue.HTTP == nil { @@ -8814,9 +11224,9 @@ func (x *IngressRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.HTTP.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys730) - } // end switch yys730 - } // end for yyj730 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -8824,16 +11234,16 @@ func (x *IngressRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj733 int - var yyb733 bool - var yyhl733 bool = l >= 0 - yyj733++ - if yyhl733 { - yyb733 = yyj733 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb733 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb733 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8841,18 +11251,24 @@ func (x *IngressRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Host = "" } else { - x.Host = string(r.DecodeString()) + yyv8 := &x.Host + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } if x.IngressRuleValue.HTTP == nil { x.IngressRuleValue.HTTP = new(HTTPIngressRuleValue) } - yyj733++ - if yyhl733 { - yyb733 = yyj733 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb733 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb733 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8868,17 +11284,17 @@ func (x *IngressRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.HTTP.CodecDecodeSelf(d) } for { - yyj733++ - if yyhl733 { - yyb733 = yyj733 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb733 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb733 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj733-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -8890,33 +11306,33 @@ func (x *IngressRuleValue) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym736 := z.EncBinary() - _ = yym736 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep737 := !z.EncBinary() - yy2arr737 := z.EncBasicHandle().StructToArray - var yyq737 [1]bool - _, _, _ = yysep737, yyq737, yy2arr737 - const yyr737 bool = false - yyq737[0] = x.HTTP != nil - var yynn737 int - if yyr737 || yy2arr737 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [1]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.HTTP != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(1) } else { - yynn737 = 0 - for _, b := range yyq737 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn737++ + yynn2++ } } - r.EncodeMapStart(yynn737) - yynn737 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr737 || yy2arr737 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq737[0] { + if yyq2[0] { if x.HTTP == nil { r.EncodeNil() } else { @@ -8926,7 +11342,7 @@ func (x *IngressRuleValue) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq737[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("http")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -8937,7 +11353,7 @@ func (x *IngressRuleValue) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr737 || yy2arr737 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -8950,25 +11366,25 @@ func (x *IngressRuleValue) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym739 := z.DecBinary() - _ = yym739 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct740 := r.ContainerType() - if yyct740 == codecSelferValueTypeMap1234 { - yyl740 := r.ReadMapStart() - if yyl740 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl740, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct740 == codecSelferValueTypeArray1234 { - yyl740 := r.ReadArrayStart() - if yyl740 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl740, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -8980,12 +11396,12 @@ func (x *IngressRuleValue) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys741Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys741Slc - var yyhl741 bool = l >= 0 - for yyj741 := 0; ; yyj741++ { - if yyhl741 { - if yyj741 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -8994,10 +11410,10 @@ func (x *IngressRuleValue) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys741Slc = r.DecodeBytes(yys741Slc, true, true) - yys741 := string(yys741Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys741 { + switch yys3 { case "http": if r.TryDecodeAsNil() { if x.HTTP != nil { @@ -9010,9 +11426,9 @@ func (x *IngressRuleValue) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.HTTP.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys741) - } // end switch yys741 - } // end for yyj741 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -9020,16 +11436,16 @@ func (x *IngressRuleValue) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj743 int - var yyb743 bool - var yyhl743 bool = l >= 0 - yyj743++ - if yyhl743 { - yyb743 = yyj743 > l + var yyj5 int + var yyb5 bool + var yyhl5 bool = l >= 0 + yyj5++ + if yyhl5 { + yyb5 = yyj5 > l } else { - yyb743 = r.CheckBreak() + yyb5 = r.CheckBreak() } - if yyb743 { + if yyb5 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9045,17 +11461,17 @@ func (x *IngressRuleValue) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.HTTP.CodecDecodeSelf(d) } for { - yyj743++ - if yyhl743 { - yyb743 = yyj743 > l + yyj5++ + if yyhl5 { + yyb5 = yyj5 > l } else { - yyb743 = r.CheckBreak() + yyb5 = r.CheckBreak() } - if yyb743 { + if yyb5 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj743-1, "") + z.DecStructFieldNotFound(yyj5-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -9067,36 +11483,36 @@ func (x *HTTPIngressRuleValue) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym745 := z.EncBinary() - _ = yym745 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep746 := !z.EncBinary() - yy2arr746 := z.EncBasicHandle().StructToArray - var yyq746 [1]bool - _, _, _ = yysep746, yyq746, yy2arr746 - const yyr746 bool = false - var yynn746 int - if yyr746 || yy2arr746 { + 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 { - yynn746 = 1 - for _, b := range yyq746 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn746++ + yynn2++ } } - r.EncodeMapStart(yynn746) - yynn746 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr746 || yy2arr746 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Paths == nil { r.EncodeNil() } else { - yym748 := z.EncBinary() - _ = yym748 + yym4 := z.EncBinary() + _ = yym4 if false { } else { h.encSliceHTTPIngressPath(([]HTTPIngressPath)(x.Paths), e) @@ -9109,15 +11525,15 @@ func (x *HTTPIngressRuleValue) CodecEncodeSelf(e *codec1978.Encoder) { if x.Paths == nil { r.EncodeNil() } else { - yym749 := z.EncBinary() - _ = yym749 + yym5 := z.EncBinary() + _ = yym5 if false { } else { h.encSliceHTTPIngressPath(([]HTTPIngressPath)(x.Paths), e) } } } - if yyr746 || yy2arr746 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -9130,25 +11546,25 @@ func (x *HTTPIngressRuleValue) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym750 := z.DecBinary() - _ = yym750 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct751 := r.ContainerType() - if yyct751 == codecSelferValueTypeMap1234 { - yyl751 := r.ReadMapStart() - if yyl751 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl751, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct751 == codecSelferValueTypeArray1234 { - yyl751 := r.ReadArrayStart() - if yyl751 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl751, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -9160,12 +11576,12 @@ func (x *HTTPIngressRuleValue) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys752Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys752Slc - var yyhl752 bool = l >= 0 - for yyj752 := 0; ; yyj752++ { - if yyhl752 { - if yyj752 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -9174,26 +11590,26 @@ func (x *HTTPIngressRuleValue) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys752Slc = r.DecodeBytes(yys752Slc, true, true) - yys752 := string(yys752Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys752 { + switch yys3 { case "paths": if r.TryDecodeAsNil() { x.Paths = nil } else { - yyv753 := &x.Paths - yym754 := z.DecBinary() - _ = yym754 + yyv4 := &x.Paths + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSliceHTTPIngressPath((*[]HTTPIngressPath)(yyv753), d) + h.decSliceHTTPIngressPath((*[]HTTPIngressPath)(yyv4), d) } } default: - z.DecStructFieldNotFound(-1, yys752) - } // end switch yys752 - } // end for yyj752 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -9201,16 +11617,16 @@ func (x *HTTPIngressRuleValue) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj755 int - var yyb755 bool - var yyhl755 bool = l >= 0 - yyj755++ - if yyhl755 { - yyb755 = yyj755 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb755 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb755 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9218,26 +11634,26 @@ func (x *HTTPIngressRuleValue) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Paths = nil } else { - yyv756 := &x.Paths - yym757 := z.DecBinary() - _ = yym757 + yyv7 := &x.Paths + yym8 := z.DecBinary() + _ = yym8 if false { } else { - h.decSliceHTTPIngressPath((*[]HTTPIngressPath)(yyv756), d) + h.decSliceHTTPIngressPath((*[]HTTPIngressPath)(yyv7), d) } } for { - yyj755++ - if yyhl755 { - yyb755 = yyj755 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb755 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb755 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj755-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -9249,35 +11665,35 @@ func (x *HTTPIngressPath) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym758 := z.EncBinary() - _ = yym758 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep759 := !z.EncBinary() - yy2arr759 := z.EncBasicHandle().StructToArray - var yyq759 [2]bool - _, _, _ = yysep759, yyq759, yy2arr759 - const yyr759 bool = false - yyq759[0] = x.Path != "" - var yynn759 int - if yyr759 || yy2arr759 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Path != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn759 = 1 - for _, b := range yyq759 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn759++ + yynn2++ } } - r.EncodeMapStart(yynn759) - yynn759 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr759 || yy2arr759 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq759[0] { - yym761 := z.EncBinary() - _ = yym761 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) @@ -9286,30 +11702,30 @@ func (x *HTTPIngressPath) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq759[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("path")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym762 := z.EncBinary() - _ = yym762 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) } } } - if yyr759 || yy2arr759 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy764 := &x.Backend - yy764.CodecEncodeSelf(e) + yy7 := &x.Backend + yy7.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("backend")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy765 := &x.Backend - yy765.CodecEncodeSelf(e) + yy9 := &x.Backend + yy9.CodecEncodeSelf(e) } - if yyr759 || yy2arr759 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -9322,25 +11738,25 @@ func (x *HTTPIngressPath) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym766 := z.DecBinary() - _ = yym766 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct767 := r.ContainerType() - if yyct767 == codecSelferValueTypeMap1234 { - yyl767 := r.ReadMapStart() - if yyl767 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl767, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct767 == codecSelferValueTypeArray1234 { - yyl767 := r.ReadArrayStart() - if yyl767 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl767, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -9352,12 +11768,12 @@ func (x *HTTPIngressPath) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys768Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys768Slc - var yyhl768 bool = l >= 0 - for yyj768 := 0; ; yyj768++ { - if yyhl768 { - if yyj768 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -9366,27 +11782,33 @@ func (x *HTTPIngressPath) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys768Slc = r.DecodeBytes(yys768Slc, true, true) - yys768 := string(yys768Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys768 { + switch yys3 { case "path": if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv4 := &x.Path + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "backend": if r.TryDecodeAsNil() { x.Backend = IngressBackend{} } else { - yyv770 := &x.Backend - yyv770.CodecDecodeSelf(d) + yyv6 := &x.Backend + yyv6.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys768) - } // end switch yys768 - } // end for yyj768 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -9394,16 +11816,16 @@ func (x *HTTPIngressPath) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj771 int - var yyb771 bool - var yyhl771 bool = l >= 0 - yyj771++ - if yyhl771 { - yyb771 = yyj771 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb771 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb771 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9411,15 +11833,21 @@ func (x *HTTPIngressPath) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Path = "" } else { - x.Path = string(r.DecodeString()) + yyv8 := &x.Path + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } - yyj771++ - if yyhl771 { - yyb771 = yyj771 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb771 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb771 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9427,21 +11855,21 @@ func (x *HTTPIngressPath) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Backend = IngressBackend{} } else { - yyv773 := &x.Backend - yyv773.CodecDecodeSelf(d) + yyv10 := &x.Backend + yyv10.CodecDecodeSelf(d) } for { - yyj771++ - if yyhl771 { - yyb771 = yyj771 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb771 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb771 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj771-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -9453,33 +11881,33 @@ func (x *IngressBackend) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym774 := z.EncBinary() - _ = yym774 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep775 := !z.EncBinary() - yy2arr775 := z.EncBasicHandle().StructToArray - var yyq775 [2]bool - _, _, _ = yysep775, yyq775, yy2arr775 - const yyr775 bool = false - var yynn775 int - if yyr775 || yy2arr775 { + 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 { - yynn775 = 2 - for _, b := range yyq775 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn775++ + yynn2++ } } - r.EncodeMapStart(yynn775) - yynn775 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr775 || yy2arr775 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym777 := z.EncBinary() - _ = yym777 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) @@ -9488,41 +11916,41 @@ func (x *IngressBackend) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("serviceName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym778 := z.EncBinary() - _ = yym778 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName)) } } - if yyr775 || yy2arr775 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy780 := &x.ServicePort - yym781 := z.EncBinary() - _ = yym781 + yy7 := &x.ServicePort + yym8 := z.EncBinary() + _ = yym8 if false { - } else if z.HasExtensions() && z.EncExt(yy780) { - } else if !yym781 && z.IsJSONHandle() { - z.EncJSONMarshal(yy780) + } else if z.HasExtensions() && z.EncExt(yy7) { + } else if !yym8 && z.IsJSONHandle() { + z.EncJSONMarshal(yy7) } else { - z.EncFallback(yy780) + z.EncFallback(yy7) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("servicePort")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy782 := &x.ServicePort - yym783 := z.EncBinary() - _ = yym783 + yy9 := &x.ServicePort + yym10 := z.EncBinary() + _ = yym10 if false { - } else if z.HasExtensions() && z.EncExt(yy782) { - } else if !yym783 && z.IsJSONHandle() { - z.EncJSONMarshal(yy782) + } else if z.HasExtensions() && z.EncExt(yy9) { + } else if !yym10 && z.IsJSONHandle() { + z.EncJSONMarshal(yy9) } else { - z.EncFallback(yy782) + z.EncFallback(yy9) } } - if yyr775 || yy2arr775 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -9535,25 +11963,25 @@ func (x *IngressBackend) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym784 := z.DecBinary() - _ = yym784 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct785 := r.ContainerType() - if yyct785 == codecSelferValueTypeMap1234 { - yyl785 := r.ReadMapStart() - if yyl785 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl785, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct785 == codecSelferValueTypeArray1234 { - yyl785 := r.ReadArrayStart() - if yyl785 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl785, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -9565,12 +11993,12 @@ func (x *IngressBackend) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys786Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys786Slc - var yyhl786 bool = l >= 0 - for yyj786 := 0; ; yyj786++ { - if yyhl786 { - if yyj786 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -9579,35 +12007,41 @@ func (x *IngressBackend) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys786Slc = r.DecodeBytes(yys786Slc, true, true) - yys786 := string(yys786Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys786 { + switch yys3 { case "serviceName": if r.TryDecodeAsNil() { x.ServiceName = "" } else { - x.ServiceName = string(r.DecodeString()) + yyv4 := &x.ServiceName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "servicePort": if r.TryDecodeAsNil() { x.ServicePort = pkg5_intstr.IntOrString{} } else { - yyv788 := &x.ServicePort - yym789 := z.DecBinary() - _ = yym789 + yyv6 := &x.ServicePort + yym7 := z.DecBinary() + _ = yym7 if false { - } else if z.HasExtensions() && z.DecExt(yyv788) { - } else if !yym789 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv788) + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) } else { - z.DecFallback(yyv788, false) + z.DecFallback(yyv6, false) } } default: - z.DecStructFieldNotFound(-1, yys786) - } // end switch yys786 - } // end for yyj786 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -9615,16 +12049,16 @@ func (x *IngressBackend) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj790 int - var yyb790 bool - var yyhl790 bool = l >= 0 - yyj790++ - if yyhl790 { - yyb790 = yyj790 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb790 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb790 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9632,15 +12066,21 @@ func (x *IngressBackend) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ServiceName = "" } else { - x.ServiceName = string(r.DecodeString()) + yyv9 := &x.ServiceName + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } } - yyj790++ - if yyhl790 { - yyb790 = yyj790 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb790 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb790 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9648,29 +12088,29 @@ func (x *IngressBackend) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ServicePort = pkg5_intstr.IntOrString{} } else { - yyv792 := &x.ServicePort - yym793 := z.DecBinary() - _ = yym793 + yyv11 := &x.ServicePort + yym12 := z.DecBinary() + _ = yym12 if false { - } else if z.HasExtensions() && z.DecExt(yyv792) { - } else if !yym793 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv792) + } else if z.HasExtensions() && z.DecExt(yyv11) { + } else if !yym12 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv11) } else { - z.DecFallback(yyv792, false) + z.DecFallback(yyv11, false) } } for { - yyj790++ - if yyhl790 { - yyb790 = yyj790 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb790 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb790 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj790-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -9682,39 +12122,39 @@ func (x *ReplicaSet) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym794 := z.EncBinary() - _ = yym794 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep795 := !z.EncBinary() - yy2arr795 := z.EncBasicHandle().StructToArray - var yyq795 [5]bool - _, _, _ = yysep795, yyq795, yy2arr795 - const yyr795 bool = false - yyq795[0] = x.Kind != "" - yyq795[1] = x.APIVersion != "" - yyq795[2] = true - yyq795[3] = true - yyq795[4] = true - var yynn795 int - if yyr795 || yy2arr795 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn795 = 0 - for _, b := range yyq795 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn795++ + yynn2++ } } - r.EncodeMapStart(yynn795) - yynn795 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr795 || yy2arr795 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq795[0] { - yym797 := z.EncBinary() - _ = yym797 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -9723,23 +12163,23 @@ func (x *ReplicaSet) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq795[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym798 := z.EncBinary() - _ = yym798 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr795 || yy2arr795 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq795[1] { - yym800 := z.EncBinary() - _ = yym800 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -9748,70 +12188,82 @@ func (x *ReplicaSet) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq795[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym801 := z.EncBinary() - _ = yym801 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr795 || yy2arr795 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq795[2] { - yy803 := &x.ObjectMeta - yy803.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq795[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy804 := &x.ObjectMeta - yy804.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr795 || yy2arr795 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq795[3] { - yy806 := &x.Spec - yy806.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq795[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy807 := &x.Spec - yy807.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr795 || yy2arr795 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq795[4] { - yy809 := &x.Status - yy809.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq795[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy810 := &x.Status - yy810.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr795 || yy2arr795 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -9824,25 +12276,25 @@ func (x *ReplicaSet) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym811 := z.DecBinary() - _ = yym811 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct812 := r.ContainerType() - if yyct812 == codecSelferValueTypeMap1234 { - yyl812 := r.ReadMapStart() - if yyl812 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl812, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct812 == codecSelferValueTypeArray1234 { - yyl812 := r.ReadArrayStart() - if yyl812 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl812, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -9854,12 +12306,12 @@ func (x *ReplicaSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys813Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys813Slc - var yyhl813 bool = l >= 0 - for yyj813 := 0; ; yyj813++ { - if yyhl813 { - if yyj813 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -9868,47 +12320,65 @@ func (x *ReplicaSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys813Slc = r.DecodeBytes(yys813Slc, true, true) - yys813 := string(yys813Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys813 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv816 := &x.ObjectMeta - yyv816.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ReplicaSetSpec{} } else { - yyv817 := &x.Spec - yyv817.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ReplicaSetStatus{} } else { - yyv818 := &x.Status - yyv818.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys813) - } // end switch yys813 - } // end for yyj813 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -9916,16 +12386,16 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj819 int - var yyb819 bool - var yyhl819 bool = l >= 0 - yyj819++ - if yyhl819 { - yyb819 = yyj819 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb819 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb819 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9933,15 +12403,21 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj819++ - if yyhl819 { - yyb819 = yyj819 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb819 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb819 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9949,32 +12425,44 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj819++ - if yyhl819 { - yyb819 = yyj819 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb819 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb819 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv822 := &x.ObjectMeta - yyv822.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj819++ - if yyhl819 { - yyb819 = yyj819 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb819 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb819 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9982,16 +12470,16 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ReplicaSetSpec{} } else { - yyv823 := &x.Spec - yyv823.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj819++ - if yyhl819 { - yyb819 = yyj819 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb819 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb819 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9999,21 +12487,21 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ReplicaSetStatus{} } else { - yyv824 := &x.Status - yyv824.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj819++ - if yyhl819 { - yyb819 = yyj819 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb819 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb819 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj819-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -10025,37 +12513,37 @@ func (x *ReplicaSetList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym825 := z.EncBinary() - _ = yym825 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep826 := !z.EncBinary() - yy2arr826 := z.EncBasicHandle().StructToArray - var yyq826 [4]bool - _, _, _ = yysep826, yyq826, yy2arr826 - const yyr826 bool = false - yyq826[0] = x.Kind != "" - yyq826[1] = x.APIVersion != "" - yyq826[2] = true - var yynn826 int - if yyr826 || yy2arr826 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn826 = 1 - for _, b := range yyq826 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn826++ + yynn2++ } } - r.EncodeMapStart(yynn826) - yynn826 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr826 || yy2arr826 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq826[0] { - yym828 := z.EncBinary() - _ = yym828 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -10064,23 +12552,23 @@ func (x *ReplicaSetList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq826[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym829 := z.EncBinary() - _ = yym829 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr826 || yy2arr826 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq826[1] { - yym831 := z.EncBinary() - _ = yym831 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -10089,54 +12577,54 @@ func (x *ReplicaSetList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq826[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym832 := z.EncBinary() - _ = yym832 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr826 || yy2arr826 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq826[2] { - yy834 := &x.ListMeta - yym835 := z.EncBinary() - _ = yym835 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy834) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy834) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq826[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy836 := &x.ListMeta - yym837 := z.EncBinary() - _ = yym837 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy836) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy836) + z.EncFallback(yy12) } } } - if yyr826 || yy2arr826 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym839 := z.EncBinary() - _ = yym839 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceReplicaSet(([]ReplicaSet)(x.Items), e) @@ -10149,15 +12637,15 @@ func (x *ReplicaSetList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym840 := z.EncBinary() - _ = yym840 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceReplicaSet(([]ReplicaSet)(x.Items), e) } } } - if yyr826 || yy2arr826 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -10170,25 +12658,25 @@ func (x *ReplicaSetList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym841 := z.DecBinary() - _ = yym841 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct842 := r.ContainerType() - if yyct842 == codecSelferValueTypeMap1234 { - yyl842 := r.ReadMapStart() - if yyl842 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl842, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct842 == codecSelferValueTypeArray1234 { - yyl842 := r.ReadArrayStart() - if yyl842 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl842, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -10200,12 +12688,12 @@ func (x *ReplicaSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys843Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys843Slc - var yyhl843 bool = l >= 0 - for yyj843 := 0; ; yyj843++ { - if yyhl843 { - if yyj843 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -10214,51 +12702,63 @@ func (x *ReplicaSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys843Slc = r.DecodeBytes(yys843Slc, true, true) - yys843 := string(yys843Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys843 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv846 := &x.ListMeta - yym847 := z.DecBinary() - _ = yym847 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv846) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv846, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv848 := &x.Items - yym849 := z.DecBinary() - _ = yym849 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceReplicaSet((*[]ReplicaSet)(yyv848), d) + h.decSliceReplicaSet((*[]ReplicaSet)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys843) - } // end switch yys843 - } // end for yyj843 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -10266,16 +12766,16 @@ func (x *ReplicaSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj850 int - var yyb850 bool - var yyhl850 bool = l >= 0 - yyj850++ - if yyhl850 { - yyb850 = yyj850 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb850 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb850 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10283,15 +12783,21 @@ func (x *ReplicaSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj850++ - if yyhl850 { - yyb850 = yyj850 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb850 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb850 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10299,38 +12805,44 @@ func (x *ReplicaSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj850++ - if yyhl850 { - yyb850 = yyj850 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb850 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb850 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv853 := &x.ListMeta - yym854 := z.DecBinary() - _ = yym854 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv853) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv853, false) + z.DecFallback(yyv17, false) } } - yyj850++ - if yyhl850 { - yyb850 = yyj850 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb850 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb850 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10338,26 +12850,26 @@ func (x *ReplicaSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv855 := &x.Items - yym856 := z.DecBinary() - _ = yym856 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceReplicaSet((*[]ReplicaSet)(yyv855), d) + h.decSliceReplicaSet((*[]ReplicaSet)(yyv19), d) } } for { - yyj850++ - if yyhl850 { - yyb850 = yyj850 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb850 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb850 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj850-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -10369,58 +12881,101 @@ func (x *ReplicaSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym857 := z.EncBinary() - _ = yym857 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep858 := !z.EncBinary() - yy2arr858 := z.EncBasicHandle().StructToArray - var yyq858 [3]bool - _, _, _ = yysep858, yyq858, yy2arr858 - const yyr858 bool = false - yyq858[1] = x.Selector != nil - yyq858[2] = true - var yynn858 int - if yyr858 || yy2arr858 { - r.EncodeArrayStart(3) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Replicas != nil + yyq2[1] = x.MinReadySeconds != 0 + yyq2[2] = x.Selector != nil + yyq2[3] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) } else { - yynn858 = 1 - for _, b := range yyq858 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn858++ + yynn2++ } } - r.EncodeMapStart(yynn858) - yynn858 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr858 || yy2arr858 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym860 := z.EncBinary() - _ = yym860 - if false { + 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.EncodeInt(int64(x.Replicas)) + r.EncodeNil() } } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("replicas")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym861 := z.EncBinary() - _ = yym861 - if false { - } else { - r.EncodeInt(int64(x.Replicas)) + 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 yyr858 || yy2arr858 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq858[1] { + if yyq2[1] { + yym9 := z.EncBinary() + _ = yym9 + if false { + } else { + r.EncodeInt(int64(x.MinReadySeconds)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(x.MinReadySeconds)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { if x.Selector == nil { r.EncodeNil() } else { - yym863 := z.EncBinary() - _ = yym863 + yym12 := z.EncBinary() + _ = yym12 if false { } else if z.HasExtensions() && z.EncExt(x.Selector) { } else { @@ -10431,15 +12986,15 @@ func (x *ReplicaSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq858[1] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("selector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Selector == nil { r.EncodeNil() } else { - yym864 := z.EncBinary() - _ = yym864 + yym13 := z.EncBinary() + _ = yym13 if false { } else if z.HasExtensions() && z.EncExt(x.Selector) { } else { @@ -10448,24 +13003,24 @@ func (x *ReplicaSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr858 || yy2arr858 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq858[2] { - yy866 := &x.Template - yy866.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Template + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq858[2] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("template")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy867 := &x.Template - yy867.CodecEncodeSelf(e) + yy17 := &x.Template + yy17.CodecEncodeSelf(e) } } - if yyr858 || yy2arr858 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -10478,25 +13033,25 @@ func (x *ReplicaSetSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym868 := z.DecBinary() - _ = yym868 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct869 := r.ContainerType() - if yyct869 == codecSelferValueTypeMap1234 { - yyl869 := r.ReadMapStart() - if yyl869 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl869, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct869 == codecSelferValueTypeArray1234 { - yyl869 := r.ReadArrayStart() - if yyl869 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl869, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -10508,12 +13063,12 @@ func (x *ReplicaSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys870Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys870Slc - var yyhl870 bool = l >= 0 - for yyj870 := 0; ; yyj870++ { - if yyhl870 { - if yyj870 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -10522,15 +13077,37 @@ func (x *ReplicaSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys870Slc = r.DecodeBytes(yys870Slc, true, true) - yys870 := string(yys870Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys870 { + switch yys3 { case "replicas": if r.TryDecodeAsNil() { - x.Replicas = 0 + if x.Replicas != nil { + x.Replicas = nil + } } else { - x.Replicas = int32(r.DecodeInt(32)) + if x.Replicas == nil { + x.Replicas = new(int32) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) + } + } + case "minReadySeconds": + if r.TryDecodeAsNil() { + x.MinReadySeconds = 0 + } else { + yyv6 := &x.MinReadySeconds + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(yyv6)) = int32(r.DecodeInt(32)) + } } case "selector": if r.TryDecodeAsNil() { @@ -10539,10 +13116,10 @@ func (x *ReplicaSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } else { if x.Selector == nil { - x.Selector = new(pkg1_unversioned.LabelSelector) + x.Selector = new(pkg1_v1.LabelSelector) } - yym873 := z.DecBinary() - _ = yym873 + yym9 := z.DecBinary() + _ = yym9 if false { } else if z.HasExtensions() && z.DecExt(x.Selector) { } else { @@ -10551,15 +13128,15 @@ func (x *ReplicaSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_api.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { - yyv874 := &x.Template - yyv874.CodecDecodeSelf(d) + yyv10 := &x.Template + yyv10.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys870) - } // end switch yys870 - } // end for yyj870 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -10567,32 +13144,64 @@ func (x *ReplicaSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj875 int - var yyb875 bool - var yyhl875 bool = l >= 0 - yyj875++ - if yyhl875 { - yyb875 = yyj875 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb875 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb875 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Replicas = 0 + if x.Replicas != nil { + x.Replicas = nil + } } else { - x.Replicas = int32(r.DecodeInt(32)) + if x.Replicas == nil { + x.Replicas = new(int32) + } + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int32)(x.Replicas)) = int32(r.DecodeInt(32)) + } } - yyj875++ - if yyhl875 { - yyb875 = yyj875 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb875 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb875 { + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MinReadySeconds = 0 + } else { + yyv14 := &x.MinReadySeconds + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*int32)(yyv14)) = int32(r.DecodeInt(32)) + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10603,45 +13212,45 @@ func (x *ReplicaSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } } else { if x.Selector == nil { - x.Selector = new(pkg1_unversioned.LabelSelector) + x.Selector = new(pkg1_v1.LabelSelector) } - yym878 := z.DecBinary() - _ = yym878 + yym17 := z.DecBinary() + _ = yym17 if false { } else if z.HasExtensions() && z.DecExt(x.Selector) { } else { z.DecFallback(x.Selector, false) } } - yyj875++ - if yyhl875 { - yyb875 = yyj875 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb875 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb875 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_api.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { - yyv879 := &x.Template - yyv879.CodecDecodeSelf(d) + yyv18 := &x.Template + yyv18.CodecDecodeSelf(d) } for { - yyj875++ - if yyhl875 { - yyb875 = yyj875 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb875 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb875 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj875-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -10653,36 +13262,38 @@ func (x *ReplicaSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym880 := z.EncBinary() - _ = yym880 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep881 := !z.EncBinary() - yy2arr881 := z.EncBasicHandle().StructToArray - var yyq881 [4]bool - _, _, _ = yysep881, yyq881, yy2arr881 - const yyr881 bool = false - yyq881[1] = x.FullyLabeledReplicas != 0 - yyq881[2] = x.ReadyReplicas != 0 - yyq881[3] = x.ObservedGeneration != 0 - var yynn881 int - if yyr881 || yy2arr881 { - r.EncodeArrayStart(4) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [6]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.FullyLabeledReplicas != 0 + yyq2[2] = x.ReadyReplicas != 0 + yyq2[3] = x.AvailableReplicas != 0 + yyq2[4] = x.ObservedGeneration != 0 + yyq2[5] = len(x.Conditions) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(6) } else { - yynn881 = 1 - for _, b := range yyq881 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn881++ + yynn2++ } } - r.EncodeMapStart(yynn881) - yynn881 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr881 || yy2arr881 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym883 := z.EncBinary() - _ = yym883 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeInt(int64(x.Replicas)) @@ -10691,18 +13302,18 @@ func (x *ReplicaSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("replicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym884 := z.EncBinary() - _ = yym884 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeInt(int64(x.Replicas)) } } - if yyr881 || yy2arr881 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq881[1] { - yym886 := z.EncBinary() - _ = yym886 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeInt(int64(x.FullyLabeledReplicas)) @@ -10711,23 +13322,23 @@ func (x *ReplicaSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq881[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fullyLabeledReplicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym887 := z.EncBinary() - _ = yym887 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeInt(int64(x.FullyLabeledReplicas)) } } } - if yyr881 || yy2arr881 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq881[2] { - yym889 := z.EncBinary() - _ = yym889 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeInt(int64(x.ReadyReplicas)) @@ -10736,23 +13347,48 @@ func (x *ReplicaSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq881[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("readyReplicas")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym890 := z.EncBinary() - _ = yym890 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeInt(int64(x.ReadyReplicas)) } } } - if yyr881 || yy2arr881 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq881[3] { - yym892 := z.EncBinary() - _ = yym892 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeInt(int64(x.AvailableReplicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("availableReplicas")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeInt(int64(x.AvailableReplicas)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeInt(int64(x.ObservedGeneration)) @@ -10761,19 +13397,52 @@ func (x *ReplicaSetStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq881[3] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym893 := z.EncBinary() - _ = yym893 + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeInt(int64(x.ObservedGeneration)) } } } - if yyr881 || yy2arr881 { + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + if x.Conditions == nil { + r.EncodeNil() + } else { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + h.encSliceReplicaSetCondition(([]ReplicaSetCondition)(x.Conditions), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("conditions")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Conditions == nil { + r.EncodeNil() + } else { + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + h.encSliceReplicaSetCondition(([]ReplicaSetCondition)(x.Conditions), e) + } + } + } + } + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -10786,25 +13455,25 @@ func (x *ReplicaSetStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym894 := z.DecBinary() - _ = yym894 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct895 := r.ContainerType() - if yyct895 == codecSelferValueTypeMap1234 { - yyl895 := r.ReadMapStart() - if yyl895 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl895, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct895 == codecSelferValueTypeArray1234 { - yyl895 := r.ReadArrayStart() - if yyl895 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl895, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -10816,12 +13485,12 @@ func (x *ReplicaSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys896Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys896Slc - var yyhl896 bool = l >= 0 - for yyj896 := 0; ; yyj896++ { - if yyhl896 { - if yyj896 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -10830,38 +13499,86 @@ func (x *ReplicaSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys896Slc = r.DecodeBytes(yys896Slc, true, true) - yys896 := string(yys896Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys896 { + switch yys3 { case "replicas": if r.TryDecodeAsNil() { x.Replicas = 0 } else { - x.Replicas = int32(r.DecodeInt(32)) + yyv4 := &x.Replicas + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } } case "fullyLabeledReplicas": if r.TryDecodeAsNil() { x.FullyLabeledReplicas = 0 } else { - x.FullyLabeledReplicas = int32(r.DecodeInt(32)) + yyv6 := &x.FullyLabeledReplicas + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(yyv6)) = int32(r.DecodeInt(32)) + } } case "readyReplicas": if r.TryDecodeAsNil() { x.ReadyReplicas = 0 } else { - x.ReadyReplicas = int32(r.DecodeInt(32)) + yyv8 := &x.ReadyReplicas + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } + } + case "availableReplicas": + if r.TryDecodeAsNil() { + x.AvailableReplicas = 0 + } else { + yyv10 := &x.AvailableReplicas + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int32)(yyv10)) = int32(r.DecodeInt(32)) + } } case "observedGeneration": if r.TryDecodeAsNil() { x.ObservedGeneration = 0 } else { - x.ObservedGeneration = int64(r.DecodeInt(64)) + yyv12 := &x.ObservedGeneration + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int64)(yyv12)) = int64(r.DecodeInt(64)) + } + } + case "conditions": + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv14 := &x.Conditions + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + h.decSliceReplicaSetCondition((*[]ReplicaSetCondition)(yyv14), d) + } } default: - z.DecStructFieldNotFound(-1, yys896) - } // end switch yys896 - } // end for yyj896 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -10869,16 +13586,16 @@ func (x *ReplicaSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj901 int - var yyb901 bool - var yyhl901 bool = l >= 0 - yyj901++ - if yyhl901 { - yyb901 = yyj901 > l + var yyj16 int + var yyb16 bool + var yyhl16 bool = l >= 0 + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb901 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb901 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10886,15 +13603,21 @@ func (x *ReplicaSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Replicas = 0 } else { - x.Replicas = int32(r.DecodeInt(32)) + yyv17 := &x.Replicas + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*int32)(yyv17)) = int32(r.DecodeInt(32)) + } } - yyj901++ - if yyhl901 { - yyb901 = yyj901 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb901 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb901 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10902,15 +13625,21 @@ func (x *ReplicaSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.FullyLabeledReplicas = 0 } else { - x.FullyLabeledReplicas = int32(r.DecodeInt(32)) + yyv19 := &x.FullyLabeledReplicas + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*int32)(yyv19)) = int32(r.DecodeInt(32)) + } } - yyj901++ - if yyhl901 { - yyb901 = yyj901 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb901 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb901 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10918,15 +13647,43 @@ func (x *ReplicaSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ReadyReplicas = 0 } else { - x.ReadyReplicas = int32(r.DecodeInt(32)) + yyv21 := &x.ReadyReplicas + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*int32)(yyv21)) = int32(r.DecodeInt(32)) + } } - yyj901++ - if yyhl901 { - yyb901 = yyj901 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb901 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb901 { + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.AvailableReplicas = 0 + } else { + yyv23 := &x.AvailableReplicas + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*int32)(yyv23)) = int32(r.DecodeInt(32)) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10934,20 +13691,465 @@ func (x *ReplicaSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ObservedGeneration = 0 } else { - x.ObservedGeneration = int64(r.DecodeInt(64)) + yyv25 := &x.ObservedGeneration + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*int64)(yyv25)) = int64(r.DecodeInt(64)) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv27 := &x.Conditions + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + h.decSliceReplicaSetCondition((*[]ReplicaSetCondition)(yyv27), d) + } } for { - yyj901++ - if yyhl901 { - yyb901 = yyj901 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb901 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb901 { + if yyb16 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj901-1, "") + z.DecStructFieldNotFound(yyj16-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x ReplicaSetConditionType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *ReplicaSetConditionType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *ReplicaSetCondition) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[2] = true + yyq2[3] = x.Reason != "" + yyq2[4] = x.Message != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yysf7 := &x.Status + yysf7.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yysf8 := &x.Status + yysf8.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.LastTransitionTime + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else if yym11 { + z.EncBinaryMarshal(yy10) + } else if !yym11 && z.IsJSONHandle() { + z.EncJSONMarshal(yy10) + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.LastTransitionTime + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else if yym13 { + z.EncBinaryMarshal(yy12) + } else if !yym13 && z.IsJSONHandle() { + z.EncJSONMarshal(yy12) + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("message")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ReplicaSetCondition) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ReplicaSetCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv4 := &x.Type + yyv4.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = "" + } else { + yyv5 := &x.Status + yyv5.CodecDecodeSelf(d) + } + case "lastTransitionTime": + if r.TryDecodeAsNil() { + x.LastTransitionTime = pkg1_v1.Time{} + } else { + yyv6 := &x.LastTransitionTime + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(yyv6) { + } else if yym7 { + z.DecBinaryUnmarshal(yyv6) + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv6) + } else { + z.DecFallback(yyv6, false) + } + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv8 := &x.Reason + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "message": + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv10 := &x.Message + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ReplicaSetCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + yyv13 := &x.Type + yyv13.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = "" + } else { + yyv14 := &x.Status + yyv14.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastTransitionTime = pkg1_v1.Time{} + } else { + yyv15 := &x.LastTransitionTime + yym16 := z.DecBinary() + _ = yym16 + if false { + } else if z.HasExtensions() && z.DecExt(yyv15) { + } else if yym16 { + z.DecBinaryUnmarshal(yyv15) + } else if !yym16 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv15) + } else { + z.DecFallback(yyv15, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv17 := &x.Reason + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv19 := &x.Message + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -10959,38 +14161,38 @@ func (x *PodSecurityPolicy) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym906 := z.EncBinary() - _ = yym906 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep907 := !z.EncBinary() - yy2arr907 := z.EncBasicHandle().StructToArray - var yyq907 [4]bool - _, _, _ = yysep907, yyq907, yy2arr907 - const yyr907 bool = false - yyq907[0] = x.Kind != "" - yyq907[1] = x.APIVersion != "" - yyq907[2] = true - yyq907[3] = true - var yynn907 int - if yyr907 || yy2arr907 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn907 = 0 - for _, b := range yyq907 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn907++ + yynn2++ } } - r.EncodeMapStart(yynn907) - yynn907 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr907 || yy2arr907 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq907[0] { - yym909 := z.EncBinary() - _ = yym909 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -10999,23 +14201,23 @@ func (x *PodSecurityPolicy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq907[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym910 := z.EncBinary() - _ = yym910 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr907 || yy2arr907 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq907[1] { - yym912 := z.EncBinary() - _ = yym912 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -11024,53 +14226,65 @@ func (x *PodSecurityPolicy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq907[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym913 := z.EncBinary() - _ = yym913 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr907 || yy2arr907 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq907[2] { - yy915 := &x.ObjectMeta - yy915.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq907[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy916 := &x.ObjectMeta - yy916.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr907 || yy2arr907 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq907[3] { - yy918 := &x.Spec - yy918.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq907[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy919 := &x.Spec - yy919.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr907 || yy2arr907 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -11083,25 +14297,25 @@ func (x *PodSecurityPolicy) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym920 := z.DecBinary() - _ = yym920 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct921 := r.ContainerType() - if yyct921 == codecSelferValueTypeMap1234 { - yyl921 := r.ReadMapStart() - if yyl921 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl921, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct921 == codecSelferValueTypeArray1234 { - yyl921 := r.ReadArrayStart() - if yyl921 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl921, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -11113,12 +14327,12 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys922Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys922Slc - var yyhl922 bool = l >= 0 - for yyj922 := 0; ; yyj922++ { - if yyhl922 { - if yyj922 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -11127,40 +14341,58 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys922Slc = r.DecodeBytes(yys922Slc, true, true) - yys922 := string(yys922Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys922 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv925 := &x.ObjectMeta - yyv925.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSecurityPolicySpec{} } else { - yyv926 := &x.Spec - yyv926.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys922) - } // end switch yys922 - } // end for yyj922 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -11168,16 +14400,16 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj927 int - var yyb927 bool - var yyhl927 bool = l >= 0 - yyj927++ - if yyhl927 { - yyb927 = yyj927 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb927 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb927 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11185,15 +14417,21 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } - yyj927++ - if yyhl927 { - yyb927 = yyj927 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb927 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb927 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11201,32 +14439,44 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj927++ - if yyhl927 { - yyb927 = yyj927 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb927 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb927 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv930 := &x.ObjectMeta - yyv930.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj927++ - if yyhl927 { - yyb927 = yyj927 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb927 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb927 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11234,21 +14484,21 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Spec = PodSecurityPolicySpec{} } else { - yyv931 := &x.Spec - yyv931.CodecDecodeSelf(d) + yyv18 := &x.Spec + yyv18.CodecDecodeSelf(d) } for { - yyj927++ - if yyhl927 { - yyb927 = yyj927 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb927 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb927 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj927-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -11260,44 +14510,44 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym932 := z.EncBinary() - _ = yym932 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep933 := !z.EncBinary() - yy2arr933 := z.EncBasicHandle().StructToArray - var yyq933 [14]bool - _, _, _ = yysep933, yyq933, yy2arr933 - const yyr933 bool = false - yyq933[0] = x.Privileged != false - yyq933[1] = len(x.DefaultAddCapabilities) != 0 - yyq933[2] = len(x.RequiredDropCapabilities) != 0 - yyq933[3] = len(x.AllowedCapabilities) != 0 - yyq933[4] = len(x.Volumes) != 0 - yyq933[5] = x.HostNetwork != false - yyq933[6] = len(x.HostPorts) != 0 - yyq933[7] = x.HostPID != false - yyq933[8] = x.HostIPC != false - yyq933[13] = x.ReadOnlyRootFilesystem != false - var yynn933 int - if yyr933 || yy2arr933 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [14]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Privileged != false + yyq2[1] = len(x.DefaultAddCapabilities) != 0 + yyq2[2] = len(x.RequiredDropCapabilities) != 0 + yyq2[3] = len(x.AllowedCapabilities) != 0 + yyq2[4] = len(x.Volumes) != 0 + yyq2[5] = x.HostNetwork != false + yyq2[6] = len(x.HostPorts) != 0 + yyq2[7] = x.HostPID != false + yyq2[8] = x.HostIPC != false + yyq2[13] = x.ReadOnlyRootFilesystem != false + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(14) } else { - yynn933 = 4 - for _, b := range yyq933 { + yynn2 = 4 + for _, b := range yyq2 { if b { - yynn933++ + yynn2++ } } - r.EncodeMapStart(yynn933) - yynn933 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq933[0] { - yym935 := z.EncBinary() - _ = yym935 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeBool(bool(x.Privileged)) @@ -11306,125 +14556,125 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq933[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("privileged")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym936 := z.EncBinary() - _ = yym936 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeBool(bool(x.Privileged)) } } } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq933[1] { + if yyq2[1] { if x.DefaultAddCapabilities == nil { r.EncodeNil() } else { - yym938 := z.EncBinary() - _ = yym938 + yym7 := z.EncBinary() + _ = yym7 if false { } else { - h.encSliceapi_Capability(([]pkg2_api.Capability)(x.DefaultAddCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.DefaultAddCapabilities), e) } } } else { r.EncodeNil() } } else { - if yyq933[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("defaultAddCapabilities")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.DefaultAddCapabilities == nil { r.EncodeNil() } else { - yym939 := z.EncBinary() - _ = yym939 + yym8 := z.EncBinary() + _ = yym8 if false { } else { - h.encSliceapi_Capability(([]pkg2_api.Capability)(x.DefaultAddCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.DefaultAddCapabilities), e) } } } } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq933[2] { + if yyq2[2] { if x.RequiredDropCapabilities == nil { r.EncodeNil() } else { - yym941 := z.EncBinary() - _ = yym941 + yym10 := z.EncBinary() + _ = yym10 if false { } else { - h.encSliceapi_Capability(([]pkg2_api.Capability)(x.RequiredDropCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.RequiredDropCapabilities), e) } } } else { r.EncodeNil() } } else { - if yyq933[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("requiredDropCapabilities")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RequiredDropCapabilities == nil { r.EncodeNil() } else { - yym942 := z.EncBinary() - _ = yym942 + yym11 := z.EncBinary() + _ = yym11 if false { } else { - h.encSliceapi_Capability(([]pkg2_api.Capability)(x.RequiredDropCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.RequiredDropCapabilities), e) } } } } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq933[3] { + if yyq2[3] { if x.AllowedCapabilities == nil { r.EncodeNil() } else { - yym944 := z.EncBinary() - _ = yym944 + yym13 := z.EncBinary() + _ = yym13 if false { } else { - h.encSliceapi_Capability(([]pkg2_api.Capability)(x.AllowedCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.AllowedCapabilities), e) } } } else { r.EncodeNil() } } else { - if yyq933[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("allowedCapabilities")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.AllowedCapabilities == nil { r.EncodeNil() } else { - yym945 := z.EncBinary() - _ = yym945 + yym14 := z.EncBinary() + _ = yym14 if false { } else { - h.encSliceapi_Capability(([]pkg2_api.Capability)(x.AllowedCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.AllowedCapabilities), e) } } } } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq933[4] { + if yyq2[4] { if x.Volumes == nil { r.EncodeNil() } else { - yym947 := z.EncBinary() - _ = yym947 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceFSType(([]FSType)(x.Volumes), e) @@ -11434,15 +14684,15 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq933[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Volumes == nil { r.EncodeNil() } else { - yym948 := z.EncBinary() - _ = yym948 + yym17 := z.EncBinary() + _ = yym17 if false { } else { h.encSliceFSType(([]FSType)(x.Volumes), e) @@ -11450,11 +14700,11 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq933[5] { - yym950 := z.EncBinary() - _ = yym950 + if yyq2[5] { + yym19 := z.EncBinary() + _ = yym19 if false { } else { r.EncodeBool(bool(x.HostNetwork)) @@ -11463,26 +14713,26 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq933[5] { + if yyq2[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostNetwork")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym951 := z.EncBinary() - _ = yym951 + yym20 := z.EncBinary() + _ = yym20 if false { } else { r.EncodeBool(bool(x.HostNetwork)) } } } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq933[6] { + if yyq2[6] { if x.HostPorts == nil { r.EncodeNil() } else { - yym953 := z.EncBinary() - _ = yym953 + yym22 := z.EncBinary() + _ = yym22 if false { } else { h.encSliceHostPortRange(([]HostPortRange)(x.HostPorts), e) @@ -11492,15 +14742,15 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq933[6] { + if yyq2[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostPorts")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.HostPorts == nil { r.EncodeNil() } else { - yym954 := z.EncBinary() - _ = yym954 + yym23 := z.EncBinary() + _ = yym23 if false { } else { h.encSliceHostPortRange(([]HostPortRange)(x.HostPorts), e) @@ -11508,11 +14758,11 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq933[7] { - yym956 := z.EncBinary() - _ = yym956 + if yyq2[7] { + yym25 := z.EncBinary() + _ = yym25 if false { } else { r.EncodeBool(bool(x.HostPID)) @@ -11521,23 +14771,23 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq933[7] { + if yyq2[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostPID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym957 := z.EncBinary() - _ = yym957 + yym26 := z.EncBinary() + _ = yym26 if false { } else { r.EncodeBool(bool(x.HostPID)) } } } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq933[8] { - yym959 := z.EncBinary() - _ = yym959 + if yyq2[8] { + yym28 := z.EncBinary() + _ = yym28 if false { } else { r.EncodeBool(bool(x.HostIPC)) @@ -11546,67 +14796,67 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq933[8] { + if yyq2[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hostIPC")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym960 := z.EncBinary() - _ = yym960 + yym29 := z.EncBinary() + _ = yym29 if false { } else { r.EncodeBool(bool(x.HostIPC)) } } } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy962 := &x.SELinux - yy962.CodecEncodeSelf(e) + yy31 := &x.SELinux + yy31.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("seLinux")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy963 := &x.SELinux - yy963.CodecEncodeSelf(e) + yy33 := &x.SELinux + yy33.CodecEncodeSelf(e) } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy965 := &x.RunAsUser - yy965.CodecEncodeSelf(e) + yy36 := &x.RunAsUser + yy36.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsUser")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy966 := &x.RunAsUser - yy966.CodecEncodeSelf(e) + yy38 := &x.RunAsUser + yy38.CodecEncodeSelf(e) } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy968 := &x.SupplementalGroups - yy968.CodecEncodeSelf(e) + yy41 := &x.SupplementalGroups + yy41.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("supplementalGroups")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy969 := &x.SupplementalGroups - yy969.CodecEncodeSelf(e) + yy43 := &x.SupplementalGroups + yy43.CodecEncodeSelf(e) } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy971 := &x.FSGroup - yy971.CodecEncodeSelf(e) + yy46 := &x.FSGroup + yy46.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fsGroup")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy972 := &x.FSGroup - yy972.CodecEncodeSelf(e) + yy48 := &x.FSGroup + yy48.CodecEncodeSelf(e) } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq933[13] { - yym974 := z.EncBinary() - _ = yym974 + if yyq2[13] { + yym51 := z.EncBinary() + _ = yym51 if false { } else { r.EncodeBool(bool(x.ReadOnlyRootFilesystem)) @@ -11615,19 +14865,19 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq933[13] { + if yyq2[13] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("readOnlyRootFilesystem")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym975 := z.EncBinary() - _ = yym975 + yym52 := z.EncBinary() + _ = yym52 if false { } else { r.EncodeBool(bool(x.ReadOnlyRootFilesystem)) } } } - if yyr933 || yy2arr933 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -11640,25 +14890,25 @@ func (x *PodSecurityPolicySpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym976 := z.DecBinary() - _ = yym976 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct977 := r.ContainerType() - if yyct977 == codecSelferValueTypeMap1234 { - yyl977 := r.ReadMapStart() - if yyl977 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl977, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct977 == codecSelferValueTypeArray1234 { - yyl977 := r.ReadArrayStart() - if yyl977 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl977, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -11670,12 +14920,12 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys978Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys978Slc - var yyhl978 bool = l >= 0 - for yyj978 := 0; ; yyj978++ { - if yyhl978 { - if yyj978 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -11684,132 +14934,162 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys978Slc = r.DecodeBytes(yys978Slc, true, true) - yys978 := string(yys978Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys978 { + switch yys3 { case "privileged": if r.TryDecodeAsNil() { x.Privileged = false } else { - x.Privileged = bool(r.DecodeBool()) + yyv4 := &x.Privileged + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*bool)(yyv4)) = r.DecodeBool() + } } case "defaultAddCapabilities": if r.TryDecodeAsNil() { x.DefaultAddCapabilities = nil } else { - yyv980 := &x.DefaultAddCapabilities - yym981 := z.DecBinary() - _ = yym981 + yyv6 := &x.DefaultAddCapabilities + yym7 := z.DecBinary() + _ = yym7 if false { } else { - h.decSliceapi_Capability((*[]pkg2_api.Capability)(yyv980), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv6), d) } } case "requiredDropCapabilities": if r.TryDecodeAsNil() { x.RequiredDropCapabilities = nil } else { - yyv982 := &x.RequiredDropCapabilities - yym983 := z.DecBinary() - _ = yym983 + yyv8 := &x.RequiredDropCapabilities + yym9 := z.DecBinary() + _ = yym9 if false { } else { - h.decSliceapi_Capability((*[]pkg2_api.Capability)(yyv982), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv8), d) } } case "allowedCapabilities": if r.TryDecodeAsNil() { x.AllowedCapabilities = nil } else { - yyv984 := &x.AllowedCapabilities - yym985 := z.DecBinary() - _ = yym985 + yyv10 := &x.AllowedCapabilities + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceapi_Capability((*[]pkg2_api.Capability)(yyv984), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv10), d) } } case "volumes": if r.TryDecodeAsNil() { x.Volumes = nil } else { - yyv986 := &x.Volumes - yym987 := z.DecBinary() - _ = yym987 + yyv12 := &x.Volumes + yym13 := z.DecBinary() + _ = yym13 if false { } else { - h.decSliceFSType((*[]FSType)(yyv986), d) + h.decSliceFSType((*[]FSType)(yyv12), d) } } case "hostNetwork": if r.TryDecodeAsNil() { x.HostNetwork = false } else { - x.HostNetwork = bool(r.DecodeBool()) + yyv14 := &x.HostNetwork + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*bool)(yyv14)) = r.DecodeBool() + } } case "hostPorts": if r.TryDecodeAsNil() { x.HostPorts = nil } else { - yyv989 := &x.HostPorts - yym990 := z.DecBinary() - _ = yym990 + yyv16 := &x.HostPorts + yym17 := z.DecBinary() + _ = yym17 if false { } else { - h.decSliceHostPortRange((*[]HostPortRange)(yyv989), d) + h.decSliceHostPortRange((*[]HostPortRange)(yyv16), d) } } case "hostPID": if r.TryDecodeAsNil() { x.HostPID = false } else { - x.HostPID = bool(r.DecodeBool()) + yyv18 := &x.HostPID + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *((*bool)(yyv18)) = r.DecodeBool() + } } case "hostIPC": if r.TryDecodeAsNil() { x.HostIPC = false } else { - x.HostIPC = bool(r.DecodeBool()) + yyv20 := &x.HostIPC + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + *((*bool)(yyv20)) = r.DecodeBool() + } } case "seLinux": if r.TryDecodeAsNil() { x.SELinux = SELinuxStrategyOptions{} } else { - yyv993 := &x.SELinux - yyv993.CodecDecodeSelf(d) + yyv22 := &x.SELinux + yyv22.CodecDecodeSelf(d) } case "runAsUser": if r.TryDecodeAsNil() { x.RunAsUser = RunAsUserStrategyOptions{} } else { - yyv994 := &x.RunAsUser - yyv994.CodecDecodeSelf(d) + yyv23 := &x.RunAsUser + yyv23.CodecDecodeSelf(d) } case "supplementalGroups": if r.TryDecodeAsNil() { x.SupplementalGroups = SupplementalGroupsStrategyOptions{} } else { - yyv995 := &x.SupplementalGroups - yyv995.CodecDecodeSelf(d) + yyv24 := &x.SupplementalGroups + yyv24.CodecDecodeSelf(d) } case "fsGroup": if r.TryDecodeAsNil() { x.FSGroup = FSGroupStrategyOptions{} } else { - yyv996 := &x.FSGroup - yyv996.CodecDecodeSelf(d) + yyv25 := &x.FSGroup + yyv25.CodecDecodeSelf(d) } case "readOnlyRootFilesystem": if r.TryDecodeAsNil() { x.ReadOnlyRootFilesystem = false } else { - x.ReadOnlyRootFilesystem = bool(r.DecodeBool()) + yyv26 := &x.ReadOnlyRootFilesystem + yym27 := z.DecBinary() + _ = yym27 + if false { + } else { + *((*bool)(yyv26)) = r.DecodeBool() + } } default: - z.DecStructFieldNotFound(-1, yys978) - } // end switch yys978 - } // end for yyj978 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -11817,16 +15097,16 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj998 int - var yyb998 bool - var yyhl998 bool = l >= 0 - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + var yyj28 int + var yyb28 bool + var yyhl28 bool = l >= 0 + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11834,15 +15114,21 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Privileged = false } else { - x.Privileged = bool(r.DecodeBool()) + yyv29 := &x.Privileged + yym30 := z.DecBinary() + _ = yym30 + if false { + } else { + *((*bool)(yyv29)) = r.DecodeBool() + } } - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11850,21 +15136,21 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.DefaultAddCapabilities = nil } else { - yyv1000 := &x.DefaultAddCapabilities - yym1001 := z.DecBinary() - _ = yym1001 + yyv31 := &x.DefaultAddCapabilities + yym32 := z.DecBinary() + _ = yym32 if false { } else { - h.decSliceapi_Capability((*[]pkg2_api.Capability)(yyv1000), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv31), d) } } - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11872,21 +15158,21 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.RequiredDropCapabilities = nil } else { - yyv1002 := &x.RequiredDropCapabilities - yym1003 := z.DecBinary() - _ = yym1003 + yyv33 := &x.RequiredDropCapabilities + yym34 := z.DecBinary() + _ = yym34 if false { } else { - h.decSliceapi_Capability((*[]pkg2_api.Capability)(yyv1002), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv33), d) } } - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11894,21 +15180,21 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.AllowedCapabilities = nil } else { - yyv1004 := &x.AllowedCapabilities - yym1005 := z.DecBinary() - _ = yym1005 + yyv35 := &x.AllowedCapabilities + yym36 := z.DecBinary() + _ = yym36 if false { } else { - h.decSliceapi_Capability((*[]pkg2_api.Capability)(yyv1004), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv35), d) } } - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11916,21 +15202,21 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Volumes = nil } else { - yyv1006 := &x.Volumes - yym1007 := z.DecBinary() - _ = yym1007 + yyv37 := &x.Volumes + yym38 := z.DecBinary() + _ = yym38 if false { } else { - h.decSliceFSType((*[]FSType)(yyv1006), d) + h.decSliceFSType((*[]FSType)(yyv37), d) } } - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11938,15 +15224,21 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.HostNetwork = false } else { - x.HostNetwork = bool(r.DecodeBool()) + yyv39 := &x.HostNetwork + yym40 := z.DecBinary() + _ = yym40 + if false { + } else { + *((*bool)(yyv39)) = r.DecodeBool() + } } - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11954,21 +15246,21 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.HostPorts = nil } else { - yyv1009 := &x.HostPorts - yym1010 := z.DecBinary() - _ = yym1010 + yyv41 := &x.HostPorts + yym42 := z.DecBinary() + _ = yym42 if false { } else { - h.decSliceHostPortRange((*[]HostPortRange)(yyv1009), d) + h.decSliceHostPortRange((*[]HostPortRange)(yyv41), d) } } - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11976,15 +15268,21 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.HostPID = false } else { - x.HostPID = bool(r.DecodeBool()) + yyv43 := &x.HostPID + yym44 := z.DecBinary() + _ = yym44 + if false { + } else { + *((*bool)(yyv43)) = r.DecodeBool() + } } - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11992,15 +15290,21 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.HostIPC = false } else { - x.HostIPC = bool(r.DecodeBool()) + yyv45 := &x.HostIPC + yym46 := z.DecBinary() + _ = yym46 + if false { + } else { + *((*bool)(yyv45)) = r.DecodeBool() + } } - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12008,16 +15312,16 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.SELinux = SELinuxStrategyOptions{} } else { - yyv1013 := &x.SELinux - yyv1013.CodecDecodeSelf(d) + yyv47 := &x.SELinux + yyv47.CodecDecodeSelf(d) } - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12025,16 +15329,16 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.RunAsUser = RunAsUserStrategyOptions{} } else { - yyv1014 := &x.RunAsUser - yyv1014.CodecDecodeSelf(d) + yyv48 := &x.RunAsUser + yyv48.CodecDecodeSelf(d) } - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12042,16 +15346,16 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.SupplementalGroups = SupplementalGroupsStrategyOptions{} } else { - yyv1015 := &x.SupplementalGroups - yyv1015.CodecDecodeSelf(d) + yyv49 := &x.SupplementalGroups + yyv49.CodecDecodeSelf(d) } - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12059,16 +15363,16 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.FSGroup = FSGroupStrategyOptions{} } else { - yyv1016 := &x.FSGroup - yyv1016.CodecDecodeSelf(d) + yyv50 := &x.FSGroup + yyv50.CodecDecodeSelf(d) } - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12076,24 +15380,56 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.ReadOnlyRootFilesystem = false } else { - x.ReadOnlyRootFilesystem = bool(r.DecodeBool()) + yyv51 := &x.ReadOnlyRootFilesystem + yym52 := z.DecBinary() + _ = yym52 + if false { + } else { + *((*bool)(yyv51)) = r.DecodeBool() + } } for { - yyj998++ - if yyhl998 { - yyb998 = yyj998 > l + yyj28++ + if yyhl28 { + yyb28 = yyj28 > l } else { - yyb998 = r.CheckBreak() + yyb28 = r.CheckBreak() } - if yyb998 { + if yyb28 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj998-1, "") + z.DecStructFieldNotFound(yyj28-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } +func (x FSType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *FSType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + func (x *HostPortRange) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -12101,33 +15437,33 @@ func (x *HostPortRange) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1018 := z.EncBinary() - _ = yym1018 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1019 := !z.EncBinary() - yy2arr1019 := z.EncBasicHandle().StructToArray - var yyq1019 [2]bool - _, _, _ = yysep1019, yyq1019, yy2arr1019 - const yyr1019 bool = false - var yynn1019 int - if yyr1019 || yy2arr1019 { + 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 { - yynn1019 = 2 - for _, b := range yyq1019 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn1019++ + yynn2++ } } - r.EncodeMapStart(yynn1019) - yynn1019 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1019 || yy2arr1019 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1021 := z.EncBinary() - _ = yym1021 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeInt(int64(x.Min)) @@ -12136,17 +15472,17 @@ func (x *HostPortRange) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("min")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1022 := z.EncBinary() - _ = yym1022 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeInt(int64(x.Min)) } } - if yyr1019 || yy2arr1019 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1024 := z.EncBinary() - _ = yym1024 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeInt(int64(x.Max)) @@ -12155,14 +15491,14 @@ func (x *HostPortRange) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("max")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1025 := z.EncBinary() - _ = yym1025 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeInt(int64(x.Max)) } } - if yyr1019 || yy2arr1019 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -12175,25 +15511,25 @@ func (x *HostPortRange) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1026 := z.DecBinary() - _ = yym1026 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1027 := r.ContainerType() - if yyct1027 == codecSelferValueTypeMap1234 { - yyl1027 := r.ReadMapStart() - if yyl1027 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1027, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1027 == codecSelferValueTypeArray1234 { - yyl1027 := r.ReadArrayStart() - if yyl1027 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1027, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -12205,12 +15541,12 @@ func (x *HostPortRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1028Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1028Slc - var yyhl1028 bool = l >= 0 - for yyj1028 := 0; ; yyj1028++ { - if yyhl1028 { - if yyj1028 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -12219,26 +15555,38 @@ func (x *HostPortRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1028Slc = r.DecodeBytes(yys1028Slc, true, true) - yys1028 := string(yys1028Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1028 { + switch yys3 { case "min": if r.TryDecodeAsNil() { x.Min = 0 } else { - x.Min = int(r.DecodeInt(codecSelferBitsize1234)) + yyv4 := &x.Min + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int32)(yyv4)) = int32(r.DecodeInt(32)) + } } case "max": if r.TryDecodeAsNil() { x.Max = 0 } else { - x.Max = int(r.DecodeInt(codecSelferBitsize1234)) + yyv6 := &x.Max + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(yyv6)) = int32(r.DecodeInt(32)) + } } default: - z.DecStructFieldNotFound(-1, yys1028) - } // end switch yys1028 - } // end for yyj1028 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -12246,16 +15594,16 @@ func (x *HostPortRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1031 int - var yyb1031 bool - var yyhl1031 bool = l >= 0 - yyj1031++ - if yyhl1031 { - yyb1031 = yyj1031 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1031 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1031 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12263,15 +15611,21 @@ func (x *HostPortRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Min = 0 } else { - x.Min = int(r.DecodeInt(codecSelferBitsize1234)) + yyv9 := &x.Min + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*int32)(yyv9)) = int32(r.DecodeInt(32)) + } } - yyj1031++ - if yyhl1031 { - yyb1031 = yyj1031 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1031 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1031 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12279,50 +15633,30 @@ func (x *HostPortRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Max = 0 } else { - x.Max = int(r.DecodeInt(codecSelferBitsize1234)) + yyv11 := &x.Max + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*int32)(yyv11)) = int32(r.DecodeInt(32)) + } } for { - yyj1031++ - if yyhl1031 { - yyb1031 = yyj1031 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1031 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1031 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1031-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x FSType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - yym1034 := z.EncBinary() - _ = yym1034 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x)) - } -} - -func (x *FSType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1035 := z.DecBinary() - _ = yym1035 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - *((*string)(x)) = r.DecodeString() - } -} - func (x *SELinuxStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -12330,31 +15664,31 @@ func (x *SELinuxStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1036 := z.EncBinary() - _ = yym1036 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1037 := !z.EncBinary() - yy2arr1037 := z.EncBasicHandle().StructToArray - var yyq1037 [2]bool - _, _, _ = yysep1037, yyq1037, yy2arr1037 - const yyr1037 bool = false - yyq1037[1] = x.SELinuxOptions != nil - var yynn1037 int - if yyr1037 || yy2arr1037 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.SELinuxOptions != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn1037 = 1 - for _, b := range yyq1037 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1037++ + yynn2++ } } - r.EncodeMapStart(yynn1037) - yynn1037 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1037 || yy2arr1037 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Rule.CodecEncodeSelf(e) } else { @@ -12363,9 +15697,9 @@ func (x *SELinuxStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Rule.CodecEncodeSelf(e) } - if yyr1037 || yy2arr1037 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1037[1] { + if yyq2[1] { if x.SELinuxOptions == nil { r.EncodeNil() } else { @@ -12375,7 +15709,7 @@ func (x *SELinuxStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1037[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -12386,7 +15720,7 @@ func (x *SELinuxStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1037 || yy2arr1037 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -12399,25 +15733,25 @@ func (x *SELinuxStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1040 := z.DecBinary() - _ = yym1040 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1041 := r.ContainerType() - if yyct1041 == codecSelferValueTypeMap1234 { - yyl1041 := r.ReadMapStart() - if yyl1041 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1041, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1041 == codecSelferValueTypeArray1234 { - yyl1041 := r.ReadArrayStart() - if yyl1041 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1041, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -12429,12 +15763,12 @@ func (x *SELinuxStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1042Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1042Slc - var yyhl1042 bool = l >= 0 - for yyj1042 := 0; ; yyj1042++ { - if yyhl1042 { - if yyj1042 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -12443,15 +15777,16 @@ func (x *SELinuxStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Deco } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1042Slc = r.DecodeBytes(yys1042Slc, true, true) - yys1042 := string(yys1042Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1042 { + switch yys3 { case "rule": if r.TryDecodeAsNil() { x.Rule = "" } else { - x.Rule = SELinuxStrategy(r.DecodeString()) + yyv4 := &x.Rule + yyv4.CodecDecodeSelf(d) } case "seLinuxOptions": if r.TryDecodeAsNil() { @@ -12460,14 +15795,14 @@ func (x *SELinuxStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Deco } } else { if x.SELinuxOptions == nil { - x.SELinuxOptions = new(pkg2_api.SELinuxOptions) + x.SELinuxOptions = new(pkg4_v1.SELinuxOptions) } x.SELinuxOptions.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1042) - } // end switch yys1042 - } // end for yyj1042 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -12475,16 +15810,16 @@ func (x *SELinuxStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1045 int - var yyb1045 bool - var yyhl1045 bool = l >= 0 - yyj1045++ - if yyhl1045 { - yyb1045 = yyj1045 > l + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1045 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1045 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12492,15 +15827,16 @@ func (x *SELinuxStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Rule = "" } else { - x.Rule = SELinuxStrategy(r.DecodeString()) + yyv7 := &x.Rule + yyv7.CodecDecodeSelf(d) } - yyj1045++ - if yyhl1045 { - yyb1045 = yyj1045 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1045 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1045 { + if yyb6 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12511,22 +15847,22 @@ func (x *SELinuxStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.De } } else { if x.SELinuxOptions == nil { - x.SELinuxOptions = new(pkg2_api.SELinuxOptions) + x.SELinuxOptions = new(pkg4_v1.SELinuxOptions) } x.SELinuxOptions.CodecDecodeSelf(d) } for { - yyj1045++ - if yyhl1045 { - yyb1045 = yyj1045 > l + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l } else { - yyb1045 = r.CheckBreak() + yyb6 = r.CheckBreak() } - if yyb1045 { + if yyb6 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1045-1, "") + z.DecStructFieldNotFound(yyj6-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -12535,8 +15871,8 @@ func (x SELinuxStrategy) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1048 := z.EncBinary() - _ = yym1048 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -12548,8 +15884,8 @@ func (x *SELinuxStrategy) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1049 := z.DecBinary() - _ = yym1049 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -12564,31 +15900,31 @@ func (x *RunAsUserStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1050 := z.EncBinary() - _ = yym1050 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1051 := !z.EncBinary() - yy2arr1051 := z.EncBasicHandle().StructToArray - var yyq1051 [2]bool - _, _, _ = yysep1051, yyq1051, yy2arr1051 - const yyr1051 bool = false - yyq1051[1] = len(x.Ranges) != 0 - var yynn1051 int - if yyr1051 || yy2arr1051 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = len(x.Ranges) != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn1051 = 1 - for _, b := range yyq1051 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1051++ + yynn2++ } } - r.EncodeMapStart(yynn1051) - yynn1051 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1051 || yy2arr1051 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Rule.CodecEncodeSelf(e) } else { @@ -12597,14 +15933,14 @@ func (x *RunAsUserStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Rule.CodecEncodeSelf(e) } - if yyr1051 || yy2arr1051 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1051[1] { + if yyq2[1] { if x.Ranges == nil { r.EncodeNil() } else { - yym1054 := z.EncBinary() - _ = yym1054 + yym7 := z.EncBinary() + _ = yym7 if false { } else { h.encSliceIDRange(([]IDRange)(x.Ranges), e) @@ -12614,15 +15950,15 @@ func (x *RunAsUserStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1051[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ranges")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Ranges == nil { r.EncodeNil() } else { - yym1055 := z.EncBinary() - _ = yym1055 + yym8 := z.EncBinary() + _ = yym8 if false { } else { h.encSliceIDRange(([]IDRange)(x.Ranges), e) @@ -12630,7 +15966,7 @@ func (x *RunAsUserStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1051 || yy2arr1051 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -12643,25 +15979,25 @@ func (x *RunAsUserStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1056 := z.DecBinary() - _ = yym1056 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1057 := r.ContainerType() - if yyct1057 == codecSelferValueTypeMap1234 { - yyl1057 := r.ReadMapStart() - if yyl1057 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1057, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1057 == codecSelferValueTypeArray1234 { - yyl1057 := r.ReadArrayStart() - if yyl1057 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1057, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -12673,12 +16009,12 @@ func (x *RunAsUserStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1058Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1058Slc - var yyhl1058 bool = l >= 0 - for yyj1058 := 0; ; yyj1058++ { - if yyhl1058 { - if yyj1058 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -12687,32 +16023,33 @@ func (x *RunAsUserStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.De } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1058Slc = r.DecodeBytes(yys1058Slc, true, true) - yys1058 := string(yys1058Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1058 { + switch yys3 { case "rule": if r.TryDecodeAsNil() { x.Rule = "" } else { - x.Rule = RunAsUserStrategy(r.DecodeString()) + yyv4 := &x.Rule + yyv4.CodecDecodeSelf(d) } case "ranges": if r.TryDecodeAsNil() { x.Ranges = nil } else { - yyv1060 := &x.Ranges - yym1061 := z.DecBinary() - _ = yym1061 + yyv5 := &x.Ranges + yym6 := z.DecBinary() + _ = yym6 if false { } else { - h.decSliceIDRange((*[]IDRange)(yyv1060), d) + h.decSliceIDRange((*[]IDRange)(yyv5), d) } } default: - z.DecStructFieldNotFound(-1, yys1058) - } // end switch yys1058 - } // end for yyj1058 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -12720,16 +16057,16 @@ func (x *RunAsUserStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978. var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1062 int - var yyb1062 bool - var yyhl1062 bool = l >= 0 - yyj1062++ - if yyhl1062 { - yyb1062 = yyj1062 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1062 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1062 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12737,15 +16074,16 @@ func (x *RunAsUserStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Rule = "" } else { - x.Rule = RunAsUserStrategy(r.DecodeString()) + yyv8 := &x.Rule + yyv8.CodecDecodeSelf(d) } - yyj1062++ - if yyhl1062 { - yyb1062 = yyj1062 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1062 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1062 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12753,26 +16091,26 @@ func (x *RunAsUserStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Ranges = nil } else { - yyv1064 := &x.Ranges - yym1065 := z.DecBinary() - _ = yym1065 + yyv9 := &x.Ranges + yym10 := z.DecBinary() + _ = yym10 if false { } else { - h.decSliceIDRange((*[]IDRange)(yyv1064), d) + h.decSliceIDRange((*[]IDRange)(yyv9), d) } } for { - yyj1062++ - if yyhl1062 { - yyb1062 = yyj1062 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1062 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1062 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1062-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -12784,33 +16122,33 @@ func (x *IDRange) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1066 := z.EncBinary() - _ = yym1066 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1067 := !z.EncBinary() - yy2arr1067 := z.EncBasicHandle().StructToArray - var yyq1067 [2]bool - _, _, _ = yysep1067, yyq1067, yy2arr1067 - const yyr1067 bool = false - var yynn1067 int - if yyr1067 || yy2arr1067 { + 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 { - yynn1067 = 2 - for _, b := range yyq1067 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn1067++ + yynn2++ } } - r.EncodeMapStart(yynn1067) - yynn1067 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1067 || yy2arr1067 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1069 := z.EncBinary() - _ = yym1069 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeInt(int64(x.Min)) @@ -12819,17 +16157,17 @@ func (x *IDRange) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("min")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1070 := z.EncBinary() - _ = yym1070 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeInt(int64(x.Min)) } } - if yyr1067 || yy2arr1067 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1072 := z.EncBinary() - _ = yym1072 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeInt(int64(x.Max)) @@ -12838,14 +16176,14 @@ func (x *IDRange) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("max")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1073 := z.EncBinary() - _ = yym1073 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeInt(int64(x.Max)) } } - if yyr1067 || yy2arr1067 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -12858,25 +16196,25 @@ func (x *IDRange) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1074 := z.DecBinary() - _ = yym1074 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1075 := r.ContainerType() - if yyct1075 == codecSelferValueTypeMap1234 { - yyl1075 := r.ReadMapStart() - if yyl1075 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1075, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1075 == codecSelferValueTypeArray1234 { - yyl1075 := r.ReadArrayStart() - if yyl1075 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1075, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -12888,12 +16226,12 @@ func (x *IDRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1076Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1076Slc - var yyhl1076 bool = l >= 0 - for yyj1076 := 0; ; yyj1076++ { - if yyhl1076 { - if yyj1076 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -12902,26 +16240,38 @@ func (x *IDRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1076Slc = r.DecodeBytes(yys1076Slc, true, true) - yys1076 := string(yys1076Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1076 { + switch yys3 { case "min": if r.TryDecodeAsNil() { x.Min = 0 } else { - x.Min = int64(r.DecodeInt(64)) + yyv4 := &x.Min + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int64)(yyv4)) = int64(r.DecodeInt(64)) + } } case "max": if r.TryDecodeAsNil() { x.Max = 0 } else { - x.Max = int64(r.DecodeInt(64)) + yyv6 := &x.Max + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int64)(yyv6)) = int64(r.DecodeInt(64)) + } } default: - z.DecStructFieldNotFound(-1, yys1076) - } // end switch yys1076 - } // end for yyj1076 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -12929,16 +16279,16 @@ func (x *IDRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1079 int - var yyb1079 bool - var yyhl1079 bool = l >= 0 - yyj1079++ - if yyhl1079 { - yyb1079 = yyj1079 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1079 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1079 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12946,15 +16296,21 @@ func (x *IDRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Min = 0 } else { - x.Min = int64(r.DecodeInt(64)) + yyv9 := &x.Min + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*int64)(yyv9)) = int64(r.DecodeInt(64)) + } } - yyj1079++ - if yyhl1079 { - yyb1079 = yyj1079 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1079 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1079 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -12962,20 +16318,26 @@ func (x *IDRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Max = 0 } else { - x.Max = int64(r.DecodeInt(64)) + yyv11 := &x.Max + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*int64)(yyv11)) = int64(r.DecodeInt(64)) + } } for { - yyj1079++ - if yyhl1079 { - yyb1079 = yyj1079 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1079 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1079 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1079-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -12984,8 +16346,8 @@ func (x RunAsUserStrategy) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1082 := z.EncBinary() - _ = yym1082 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -12997,8 +16359,8 @@ func (x *RunAsUserStrategy) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1083 := z.DecBinary() - _ = yym1083 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -13013,54 +16375,54 @@ func (x *FSGroupStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1084 := z.EncBinary() - _ = yym1084 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1085 := !z.EncBinary() - yy2arr1085 := z.EncBasicHandle().StructToArray - var yyq1085 [2]bool - _, _, _ = yysep1085, yyq1085, yy2arr1085 - const yyr1085 bool = false - yyq1085[0] = x.Rule != "" - yyq1085[1] = len(x.Ranges) != 0 - var yynn1085 int - if yyr1085 || yy2arr1085 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Rule != "" + yyq2[1] = len(x.Ranges) != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn1085 = 0 - for _, b := range yyq1085 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1085++ + yynn2++ } } - r.EncodeMapStart(yynn1085) - yynn1085 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1085 || yy2arr1085 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1085[0] { + if yyq2[0] { x.Rule.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1085[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rule")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Rule.CodecEncodeSelf(e) } } - if yyr1085 || yy2arr1085 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1085[1] { + if yyq2[1] { if x.Ranges == nil { r.EncodeNil() } else { - yym1088 := z.EncBinary() - _ = yym1088 + yym7 := z.EncBinary() + _ = yym7 if false { } else { h.encSliceIDRange(([]IDRange)(x.Ranges), e) @@ -13070,15 +16432,15 @@ func (x *FSGroupStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1085[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ranges")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Ranges == nil { r.EncodeNil() } else { - yym1089 := z.EncBinary() - _ = yym1089 + yym8 := z.EncBinary() + _ = yym8 if false { } else { h.encSliceIDRange(([]IDRange)(x.Ranges), e) @@ -13086,7 +16448,7 @@ func (x *FSGroupStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1085 || yy2arr1085 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -13099,25 +16461,25 @@ func (x *FSGroupStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1090 := z.DecBinary() - _ = yym1090 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1091 := r.ContainerType() - if yyct1091 == codecSelferValueTypeMap1234 { - yyl1091 := r.ReadMapStart() - if yyl1091 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1091, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1091 == codecSelferValueTypeArray1234 { - yyl1091 := r.ReadArrayStart() - if yyl1091 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1091, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -13129,12 +16491,12 @@ func (x *FSGroupStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1092Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1092Slc - var yyhl1092 bool = l >= 0 - for yyj1092 := 0; ; yyj1092++ { - if yyhl1092 { - if yyj1092 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -13143,32 +16505,33 @@ func (x *FSGroupStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Deco } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1092Slc = r.DecodeBytes(yys1092Slc, true, true) - yys1092 := string(yys1092Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1092 { + switch yys3 { case "rule": if r.TryDecodeAsNil() { x.Rule = "" } else { - x.Rule = FSGroupStrategyType(r.DecodeString()) + yyv4 := &x.Rule + yyv4.CodecDecodeSelf(d) } case "ranges": if r.TryDecodeAsNil() { x.Ranges = nil } else { - yyv1094 := &x.Ranges - yym1095 := z.DecBinary() - _ = yym1095 + yyv5 := &x.Ranges + yym6 := z.DecBinary() + _ = yym6 if false { } else { - h.decSliceIDRange((*[]IDRange)(yyv1094), d) + h.decSliceIDRange((*[]IDRange)(yyv5), d) } } default: - z.DecStructFieldNotFound(-1, yys1092) - } // end switch yys1092 - } // end for yyj1092 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -13176,16 +16539,16 @@ func (x *FSGroupStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1096 int - var yyb1096 bool - var yyhl1096 bool = l >= 0 - yyj1096++ - if yyhl1096 { - yyb1096 = yyj1096 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1096 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1096 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13193,15 +16556,16 @@ func (x *FSGroupStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Rule = "" } else { - x.Rule = FSGroupStrategyType(r.DecodeString()) + yyv8 := &x.Rule + yyv8.CodecDecodeSelf(d) } - yyj1096++ - if yyhl1096 { - yyb1096 = yyj1096 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1096 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1096 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13209,26 +16573,26 @@ func (x *FSGroupStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Ranges = nil } else { - yyv1098 := &x.Ranges - yym1099 := z.DecBinary() - _ = yym1099 + yyv9 := &x.Ranges + yym10 := z.DecBinary() + _ = yym10 if false { } else { - h.decSliceIDRange((*[]IDRange)(yyv1098), d) + h.decSliceIDRange((*[]IDRange)(yyv9), d) } } for { - yyj1096++ - if yyhl1096 { - yyb1096 = yyj1096 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1096 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1096 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1096-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -13237,8 +16601,8 @@ func (x FSGroupStrategyType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1100 := z.EncBinary() - _ = yym1100 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -13250,8 +16614,8 @@ func (x *FSGroupStrategyType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1101 := z.DecBinary() - _ = yym1101 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -13266,54 +16630,54 @@ func (x *SupplementalGroupsStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder if x == nil { r.EncodeNil() } else { - yym1102 := z.EncBinary() - _ = yym1102 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1103 := !z.EncBinary() - yy2arr1103 := z.EncBasicHandle().StructToArray - var yyq1103 [2]bool - _, _, _ = yysep1103, yyq1103, yy2arr1103 - const yyr1103 bool = false - yyq1103[0] = x.Rule != "" - yyq1103[1] = len(x.Ranges) != 0 - var yynn1103 int - if yyr1103 || yy2arr1103 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Rule != "" + yyq2[1] = len(x.Ranges) != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn1103 = 0 - for _, b := range yyq1103 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1103++ + yynn2++ } } - r.EncodeMapStart(yynn1103) - yynn1103 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1103 || yy2arr1103 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1103[0] { + if yyq2[0] { x.Rule.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1103[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rule")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Rule.CodecEncodeSelf(e) } } - if yyr1103 || yy2arr1103 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1103[1] { + if yyq2[1] { if x.Ranges == nil { r.EncodeNil() } else { - yym1106 := z.EncBinary() - _ = yym1106 + yym7 := z.EncBinary() + _ = yym7 if false { } else { h.encSliceIDRange(([]IDRange)(x.Ranges), e) @@ -13323,15 +16687,15 @@ func (x *SupplementalGroupsStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder r.EncodeNil() } } else { - if yyq1103[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ranges")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Ranges == nil { r.EncodeNil() } else { - yym1107 := z.EncBinary() - _ = yym1107 + yym8 := z.EncBinary() + _ = yym8 if false { } else { h.encSliceIDRange(([]IDRange)(x.Ranges), e) @@ -13339,7 +16703,7 @@ func (x *SupplementalGroupsStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder } } } - if yyr1103 || yy2arr1103 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -13352,25 +16716,25 @@ func (x *SupplementalGroupsStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1108 := z.DecBinary() - _ = yym1108 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1109 := r.ContainerType() - if yyct1109 == codecSelferValueTypeMap1234 { - yyl1109 := r.ReadMapStart() - if yyl1109 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1109, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1109 == codecSelferValueTypeArray1234 { - yyl1109 := r.ReadArrayStart() - if yyl1109 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1109, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -13382,12 +16746,12 @@ func (x *SupplementalGroupsStrategyOptions) codecDecodeSelfFromMap(l int, d *cod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1110Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1110Slc - var yyhl1110 bool = l >= 0 - for yyj1110 := 0; ; yyj1110++ { - if yyhl1110 { - if yyj1110 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -13396,32 +16760,33 @@ func (x *SupplementalGroupsStrategyOptions) codecDecodeSelfFromMap(l int, d *cod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1110Slc = r.DecodeBytes(yys1110Slc, true, true) - yys1110 := string(yys1110Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1110 { + switch yys3 { case "rule": if r.TryDecodeAsNil() { x.Rule = "" } else { - x.Rule = SupplementalGroupsStrategyType(r.DecodeString()) + yyv4 := &x.Rule + yyv4.CodecDecodeSelf(d) } case "ranges": if r.TryDecodeAsNil() { x.Ranges = nil } else { - yyv1112 := &x.Ranges - yym1113 := z.DecBinary() - _ = yym1113 + yyv5 := &x.Ranges + yym6 := z.DecBinary() + _ = yym6 if false { } else { - h.decSliceIDRange((*[]IDRange)(yyv1112), d) + h.decSliceIDRange((*[]IDRange)(yyv5), d) } } default: - z.DecStructFieldNotFound(-1, yys1110) - } // end switch yys1110 - } // end for yyj1110 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -13429,16 +16794,16 @@ func (x *SupplementalGroupsStrategyOptions) codecDecodeSelfFromArray(l int, d *c var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1114 int - var yyb1114 bool - var yyhl1114 bool = l >= 0 - yyj1114++ - if yyhl1114 { - yyb1114 = yyj1114 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1114 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1114 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13446,15 +16811,16 @@ func (x *SupplementalGroupsStrategyOptions) codecDecodeSelfFromArray(l int, d *c if r.TryDecodeAsNil() { x.Rule = "" } else { - x.Rule = SupplementalGroupsStrategyType(r.DecodeString()) + yyv8 := &x.Rule + yyv8.CodecDecodeSelf(d) } - yyj1114++ - if yyhl1114 { - yyb1114 = yyj1114 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1114 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1114 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13462,26 +16828,26 @@ func (x *SupplementalGroupsStrategyOptions) codecDecodeSelfFromArray(l int, d *c if r.TryDecodeAsNil() { x.Ranges = nil } else { - yyv1116 := &x.Ranges - yym1117 := z.DecBinary() - _ = yym1117 + yyv9 := &x.Ranges + yym10 := z.DecBinary() + _ = yym10 if false { } else { - h.decSliceIDRange((*[]IDRange)(yyv1116), d) + h.decSliceIDRange((*[]IDRange)(yyv9), d) } } for { - yyj1114++ - if yyhl1114 { - yyb1114 = yyj1114 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1114 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1114 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1114-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -13490,8 +16856,8 @@ func (x SupplementalGroupsStrategyType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym1118 := z.EncBinary() - _ = yym1118 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -13503,8 +16869,8 @@ func (x *SupplementalGroupsStrategyType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1119 := z.DecBinary() - _ = yym1119 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -13519,37 +16885,37 @@ func (x *PodSecurityPolicyList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1120 := z.EncBinary() - _ = yym1120 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1121 := !z.EncBinary() - yy2arr1121 := z.EncBasicHandle().StructToArray - var yyq1121 [4]bool - _, _, _ = yysep1121, yyq1121, yy2arr1121 - const yyr1121 bool = false - yyq1121[0] = x.Kind != "" - yyq1121[1] = x.APIVersion != "" - yyq1121[2] = true - var yynn1121 int - if yyr1121 || yy2arr1121 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn1121 = 1 - for _, b := range yyq1121 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1121++ + yynn2++ } } - r.EncodeMapStart(yynn1121) - yynn1121 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1121 || yy2arr1121 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1121[0] { - yym1123 := z.EncBinary() - _ = yym1123 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -13558,23 +16924,23 @@ func (x *PodSecurityPolicyList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1121[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1124 := z.EncBinary() - _ = yym1124 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1121 || yy2arr1121 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1121[1] { - yym1126 := z.EncBinary() - _ = yym1126 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -13583,54 +16949,54 @@ func (x *PodSecurityPolicyList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1121[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1127 := z.EncBinary() - _ = yym1127 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1121 || yy2arr1121 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1121[2] { - yy1129 := &x.ListMeta - yym1130 := z.EncBinary() - _ = yym1130 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy1129) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy1129) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq1121[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1131 := &x.ListMeta - yym1132 := z.EncBinary() - _ = yym1132 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy1131) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy1131) + z.EncFallback(yy12) } } } - if yyr1121 || yy2arr1121 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym1134 := z.EncBinary() - _ = yym1134 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSlicePodSecurityPolicy(([]PodSecurityPolicy)(x.Items), e) @@ -13643,15 +17009,15 @@ func (x *PodSecurityPolicyList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym1135 := z.EncBinary() - _ = yym1135 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSlicePodSecurityPolicy(([]PodSecurityPolicy)(x.Items), e) } } } - if yyr1121 || yy2arr1121 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -13664,25 +17030,25 @@ func (x *PodSecurityPolicyList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1136 := z.DecBinary() - _ = yym1136 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1137 := r.ContainerType() - if yyct1137 == codecSelferValueTypeMap1234 { - yyl1137 := r.ReadMapStart() - if yyl1137 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1137, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1137 == codecSelferValueTypeArray1234 { - yyl1137 := r.ReadArrayStart() - if yyl1137 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1137, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -13694,12 +17060,12 @@ func (x *PodSecurityPolicyList) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1138Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1138Slc - var yyhl1138 bool = l >= 0 - for yyj1138 := 0; ; yyj1138++ { - if yyhl1138 { - if yyj1138 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -13708,51 +17074,63 @@ func (x *PodSecurityPolicyList) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1138Slc = r.DecodeBytes(yys1138Slc, true, true) - yys1138 := string(yys1138Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1138 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv1141 := &x.ListMeta - yym1142 := z.DecBinary() - _ = yym1142 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv1141) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv1141, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1143 := &x.Items - yym1144 := z.DecBinary() - _ = yym1144 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv1143), d) + h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys1138) - } // end switch yys1138 - } // end for yyj1138 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -13760,16 +17138,16 @@ func (x *PodSecurityPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1145 int - var yyb1145 bool - var yyhl1145 bool = l >= 0 - yyj1145++ - if yyhl1145 { - yyb1145 = yyj1145 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1145 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1145 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13777,15 +17155,21 @@ func (x *PodSecurityPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj1145++ - if yyhl1145 { - yyb1145 = yyj1145 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1145 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1145 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13793,38 +17177,44 @@ func (x *PodSecurityPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj1145++ - if yyhl1145 { - yyb1145 = yyj1145 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1145 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1145 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv1148 := &x.ListMeta - yym1149 := z.DecBinary() - _ = yym1149 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv1148) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv1148, false) + z.DecFallback(yyv17, false) } } - yyj1145++ - if yyhl1145 { - yyb1145 = yyj1145 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1145 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1145 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13832,26 +17222,26 @@ func (x *PodSecurityPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1150 := &x.Items - yym1151 := z.DecBinary() - _ = yym1151 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv1150), d) + h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv19), d) } } for { - yyj1145++ - if yyhl1145 { - yyb1145 = yyj1145 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1145 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1145 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1145-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -13863,38 +17253,38 @@ func (x *NetworkPolicy) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1152 := z.EncBinary() - _ = yym1152 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1153 := !z.EncBinary() - yy2arr1153 := z.EncBasicHandle().StructToArray - var yyq1153 [4]bool - _, _, _ = yysep1153, yyq1153, yy2arr1153 - const yyr1153 bool = false - yyq1153[0] = x.Kind != "" - yyq1153[1] = x.APIVersion != "" - yyq1153[2] = true - yyq1153[3] = true - var yynn1153 int - if yyr1153 || yy2arr1153 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn1153 = 0 - for _, b := range yyq1153 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1153++ + yynn2++ } } - r.EncodeMapStart(yynn1153) - yynn1153 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1153 || yy2arr1153 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1153[0] { - yym1155 := z.EncBinary() - _ = yym1155 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -13903,23 +17293,23 @@ func (x *NetworkPolicy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1153[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1156 := z.EncBinary() - _ = yym1156 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1153 || yy2arr1153 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1153[1] { - yym1158 := z.EncBinary() - _ = yym1158 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -13928,53 +17318,65 @@ func (x *NetworkPolicy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1153[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1159 := z.EncBinary() - _ = yym1159 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1153 || yy2arr1153 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1153[2] { - yy1161 := &x.ObjectMeta - yy1161.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq1153[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1162 := &x.ObjectMeta - yy1162.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr1153 || yy2arr1153 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1153[3] { - yy1164 := &x.Spec - yy1164.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq1153[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1165 := &x.Spec - yy1165.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr1153 || yy2arr1153 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -13987,25 +17389,25 @@ func (x *NetworkPolicy) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1166 := z.DecBinary() - _ = yym1166 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1167 := r.ContainerType() - if yyct1167 == codecSelferValueTypeMap1234 { - yyl1167 := r.ReadMapStart() - if yyl1167 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1167, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1167 == codecSelferValueTypeArray1234 { - yyl1167 := r.ReadArrayStart() - if yyl1167 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1167, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -14017,12 +17419,12 @@ func (x *NetworkPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1168Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1168Slc - var yyhl1168 bool = l >= 0 - for yyj1168 := 0; ; yyj1168++ { - if yyhl1168 { - if yyj1168 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -14031,40 +17433,58 @@ func (x *NetworkPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1168Slc = r.DecodeBytes(yys1168Slc, true, true) - yys1168 := string(yys1168Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1168 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv1171 := &x.ObjectMeta - yyv1171.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = NetworkPolicySpec{} } else { - yyv1172 := &x.Spec - yyv1172.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys1168) - } // end switch yys1168 - } // end for yyj1168 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -14072,16 +17492,16 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1173 int - var yyb1173 bool - var yyhl1173 bool = l >= 0 - yyj1173++ - if yyhl1173 { - yyb1173 = yyj1173 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb1173 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb1173 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -14089,15 +17509,21 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } } - yyj1173++ - if yyhl1173 { - yyb1173 = yyj1173 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb1173 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb1173 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -14105,32 +17531,44 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj1173++ - if yyhl1173 { - yyb1173 = yyj1173 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb1173 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb1173 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_api.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv1176 := &x.ObjectMeta - yyv1176.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj1173++ - if yyhl1173 { - yyb1173 = yyj1173 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb1173 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb1173 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -14138,21 +17576,21 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NetworkPolicySpec{} } else { - yyv1177 := &x.Spec - yyv1177.CodecDecodeSelf(d) + yyv18 := &x.Spec + yyv18.CodecDecodeSelf(d) } for { - yyj1173++ - if yyhl1173 { - yyb1173 = yyj1173 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb1173 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb1173 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1173-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -14164,61 +17602,61 @@ func (x *NetworkPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1178 := z.EncBinary() - _ = yym1178 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1179 := !z.EncBinary() - yy2arr1179 := z.EncBasicHandle().StructToArray - var yyq1179 [2]bool - _, _, _ = yysep1179, yyq1179, yy2arr1179 - const yyr1179 bool = false - yyq1179[1] = len(x.Ingress) != 0 - var yynn1179 int - if yyr1179 || yy2arr1179 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = len(x.Ingress) != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn1179 = 1 - for _, b := range yyq1179 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1179++ + yynn2++ } } - r.EncodeMapStart(yynn1179) - yynn1179 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1179 || yy2arr1179 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1181 := &x.PodSelector - yym1182 := z.EncBinary() - _ = yym1182 + yy4 := &x.PodSelector + yym5 := z.EncBinary() + _ = yym5 if false { - } else if z.HasExtensions() && z.EncExt(yy1181) { + } else if z.HasExtensions() && z.EncExt(yy4) { } else { - z.EncFallback(yy1181) + z.EncFallback(yy4) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podSelector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1183 := &x.PodSelector - yym1184 := z.EncBinary() - _ = yym1184 + yy6 := &x.PodSelector + yym7 := z.EncBinary() + _ = yym7 if false { - } else if z.HasExtensions() && z.EncExt(yy1183) { + } else if z.HasExtensions() && z.EncExt(yy6) { } else { - z.EncFallback(yy1183) + z.EncFallback(yy6) } } - if yyr1179 || yy2arr1179 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1179[1] { + if yyq2[1] { if x.Ingress == nil { r.EncodeNil() } else { - yym1186 := z.EncBinary() - _ = yym1186 + yym9 := z.EncBinary() + _ = yym9 if false { } else { h.encSliceNetworkPolicyIngressRule(([]NetworkPolicyIngressRule)(x.Ingress), e) @@ -14228,15 +17666,15 @@ func (x *NetworkPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1179[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ingress")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Ingress == nil { r.EncodeNil() } else { - yym1187 := z.EncBinary() - _ = yym1187 + yym10 := z.EncBinary() + _ = yym10 if false { } else { h.encSliceNetworkPolicyIngressRule(([]NetworkPolicyIngressRule)(x.Ingress), e) @@ -14244,7 +17682,7 @@ func (x *NetworkPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1179 || yy2arr1179 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -14257,25 +17695,25 @@ func (x *NetworkPolicySpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1188 := z.DecBinary() - _ = yym1188 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1189 := r.ContainerType() - if yyct1189 == codecSelferValueTypeMap1234 { - yyl1189 := r.ReadMapStart() - if yyl1189 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1189, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1189 == codecSelferValueTypeArray1234 { - yyl1189 := r.ReadArrayStart() - if yyl1189 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1189, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -14287,12 +17725,12 @@ func (x *NetworkPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1190Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1190Slc - var yyhl1190 bool = l >= 0 - for yyj1190 := 0; ; yyj1190++ { - if yyhl1190 { - if yyj1190 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -14301,39 +17739,39 @@ func (x *NetworkPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1190Slc = r.DecodeBytes(yys1190Slc, true, true) - yys1190 := string(yys1190Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1190 { + switch yys3 { case "podSelector": if r.TryDecodeAsNil() { - x.PodSelector = pkg1_unversioned.LabelSelector{} + x.PodSelector = pkg1_v1.LabelSelector{} } else { - yyv1191 := &x.PodSelector - yym1192 := z.DecBinary() - _ = yym1192 + yyv4 := &x.PodSelector + yym5 := z.DecBinary() + _ = yym5 if false { - } else if z.HasExtensions() && z.DecExt(yyv1191) { + } else if z.HasExtensions() && z.DecExt(yyv4) { } else { - z.DecFallback(yyv1191, false) + z.DecFallback(yyv4, false) } } case "ingress": if r.TryDecodeAsNil() { x.Ingress = nil } else { - yyv1193 := &x.Ingress - yym1194 := z.DecBinary() - _ = yym1194 + yyv6 := &x.Ingress + yym7 := z.DecBinary() + _ = yym7 if false { } else { - h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv1193), d) + h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv6), d) } } default: - z.DecStructFieldNotFound(-1, yys1190) - } // end switch yys1190 - } // end for yyj1190 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -14341,39 +17779,39 @@ func (x *NetworkPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1195 int - var yyb1195 bool - var yyhl1195 bool = l >= 0 - yyj1195++ - if yyhl1195 { - yyb1195 = yyj1195 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1195 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1195 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.PodSelector = pkg1_unversioned.LabelSelector{} + x.PodSelector = pkg1_v1.LabelSelector{} } else { - yyv1196 := &x.PodSelector - yym1197 := z.DecBinary() - _ = yym1197 + yyv9 := &x.PodSelector + yym10 := z.DecBinary() + _ = yym10 if false { - } else if z.HasExtensions() && z.DecExt(yyv1196) { + } else if z.HasExtensions() && z.DecExt(yyv9) { } else { - z.DecFallback(yyv1196, false) + z.DecFallback(yyv9, false) } } - yyj1195++ - if yyhl1195 { - yyb1195 = yyj1195 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1195 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1195 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -14381,26 +17819,26 @@ func (x *NetworkPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Ingress = nil } else { - yyv1198 := &x.Ingress - yym1199 := z.DecBinary() - _ = yym1199 + yyv11 := &x.Ingress + yym12 := z.DecBinary() + _ = yym12 if false { } else { - h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv1198), d) + h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv11), d) } } for { - yyj1195++ - if yyhl1195 { - yyb1195 = yyj1195 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1195 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1195 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1195-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -14412,39 +17850,39 @@ func (x *NetworkPolicyIngressRule) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1200 := z.EncBinary() - _ = yym1200 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1201 := !z.EncBinary() - yy2arr1201 := z.EncBasicHandle().StructToArray - var yyq1201 [2]bool - _, _, _ = yysep1201, yyq1201, yy2arr1201 - const yyr1201 bool = false - yyq1201[0] = len(x.Ports) != 0 - yyq1201[1] = len(x.From) != 0 - var yynn1201 int - if yyr1201 || yy2arr1201 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = len(x.Ports) != 0 + yyq2[1] = len(x.From) != 0 + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn1201 = 0 - for _, b := range yyq1201 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1201++ + yynn2++ } } - r.EncodeMapStart(yynn1201) - yynn1201 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1201 || yy2arr1201 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1201[0] { + if yyq2[0] { if x.Ports == nil { r.EncodeNil() } else { - yym1203 := z.EncBinary() - _ = yym1203 + yym4 := z.EncBinary() + _ = yym4 if false { } else { h.encSliceNetworkPolicyPort(([]NetworkPolicyPort)(x.Ports), e) @@ -14454,15 +17892,15 @@ func (x *NetworkPolicyIngressRule) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1201[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ports")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Ports == nil { r.EncodeNil() } else { - yym1204 := z.EncBinary() - _ = yym1204 + yym5 := z.EncBinary() + _ = yym5 if false { } else { h.encSliceNetworkPolicyPort(([]NetworkPolicyPort)(x.Ports), e) @@ -14470,14 +17908,14 @@ func (x *NetworkPolicyIngressRule) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1201 || yy2arr1201 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1201[1] { + if yyq2[1] { if x.From == nil { r.EncodeNil() } else { - yym1206 := z.EncBinary() - _ = yym1206 + yym7 := z.EncBinary() + _ = yym7 if false { } else { h.encSliceNetworkPolicyPeer(([]NetworkPolicyPeer)(x.From), e) @@ -14487,15 +17925,15 @@ func (x *NetworkPolicyIngressRule) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1201[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("from")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.From == nil { r.EncodeNil() } else { - yym1207 := z.EncBinary() - _ = yym1207 + yym8 := z.EncBinary() + _ = yym8 if false { } else { h.encSliceNetworkPolicyPeer(([]NetworkPolicyPeer)(x.From), e) @@ -14503,7 +17941,7 @@ func (x *NetworkPolicyIngressRule) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1201 || yy2arr1201 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -14516,25 +17954,25 @@ func (x *NetworkPolicyIngressRule) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1208 := z.DecBinary() - _ = yym1208 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1209 := r.ContainerType() - if yyct1209 == codecSelferValueTypeMap1234 { - yyl1209 := r.ReadMapStart() - if yyl1209 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1209, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1209 == codecSelferValueTypeArray1234 { - yyl1209 := r.ReadArrayStart() - if yyl1209 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1209, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -14546,12 +17984,12 @@ func (x *NetworkPolicyIngressRule) codecDecodeSelfFromMap(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1210Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1210Slc - var yyhl1210 bool = l >= 0 - for yyj1210 := 0; ; yyj1210++ { - if yyhl1210 { - if yyj1210 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -14560,38 +17998,38 @@ func (x *NetworkPolicyIngressRule) codecDecodeSelfFromMap(l int, d *codec1978.De } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1210Slc = r.DecodeBytes(yys1210Slc, true, true) - yys1210 := string(yys1210Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1210 { + switch yys3 { case "ports": if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv1211 := &x.Ports - yym1212 := z.DecBinary() - _ = yym1212 + yyv4 := &x.Ports + yym5 := z.DecBinary() + _ = yym5 if false { } else { - h.decSliceNetworkPolicyPort((*[]NetworkPolicyPort)(yyv1211), d) + h.decSliceNetworkPolicyPort((*[]NetworkPolicyPort)(yyv4), d) } } case "from": if r.TryDecodeAsNil() { x.From = nil } else { - yyv1213 := &x.From - yym1214 := z.DecBinary() - _ = yym1214 + yyv6 := &x.From + yym7 := z.DecBinary() + _ = yym7 if false { } else { - h.decSliceNetworkPolicyPeer((*[]NetworkPolicyPeer)(yyv1213), d) + h.decSliceNetworkPolicyPeer((*[]NetworkPolicyPeer)(yyv6), d) } } default: - z.DecStructFieldNotFound(-1, yys1210) - } // end switch yys1210 - } // end for yyj1210 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -14599,16 +18037,16 @@ func (x *NetworkPolicyIngressRule) codecDecodeSelfFromArray(l int, d *codec1978. var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1215 int - var yyb1215 bool - var yyhl1215 bool = l >= 0 - yyj1215++ - if yyhl1215 { - yyb1215 = yyj1215 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1215 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1215 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -14616,21 +18054,21 @@ func (x *NetworkPolicyIngressRule) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv1216 := &x.Ports - yym1217 := z.DecBinary() - _ = yym1217 + yyv9 := &x.Ports + yym10 := z.DecBinary() + _ = yym10 if false { } else { - h.decSliceNetworkPolicyPort((*[]NetworkPolicyPort)(yyv1216), d) + h.decSliceNetworkPolicyPort((*[]NetworkPolicyPort)(yyv9), d) } } - yyj1215++ - if yyhl1215 { - yyb1215 = yyj1215 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1215 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1215 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -14638,26 +18076,26 @@ func (x *NetworkPolicyIngressRule) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.From = nil } else { - yyv1218 := &x.From - yym1219 := z.DecBinary() - _ = yym1219 + yyv11 := &x.From + yym12 := z.DecBinary() + _ = yym12 if false { } else { - h.decSliceNetworkPolicyPeer((*[]NetworkPolicyPeer)(yyv1218), d) + h.decSliceNetworkPolicyPeer((*[]NetworkPolicyPeer)(yyv11), d) } } for { - yyj1215++ - if yyhl1215 { - yyb1215 = yyj1215 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1215 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1215 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1215-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -14669,79 +18107,69 @@ func (x *NetworkPolicyPort) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1220 := z.EncBinary() - _ = yym1220 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1221 := !z.EncBinary() - yy2arr1221 := z.EncBasicHandle().StructToArray - var yyq1221 [2]bool - _, _, _ = yysep1221, yyq1221, yy2arr1221 - const yyr1221 bool = false - yyq1221[0] = x.Protocol != nil - yyq1221[1] = x.Port != nil - var yynn1221 int - if yyr1221 || yy2arr1221 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Protocol != nil + yyq2[1] = x.Port != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn1221 = 0 - for _, b := range yyq1221 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1221++ + yynn2++ } } - r.EncodeMapStart(yynn1221) - yynn1221 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1221 || yy2arr1221 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1221[0] { + if yyq2[0] { if x.Protocol == nil { r.EncodeNil() } else { - yy1223 := *x.Protocol - yym1224 := z.EncBinary() - _ = yym1224 - if false { - } else if z.HasExtensions() && z.EncExt(yy1223) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(yy1223)) - } + yy4 := *x.Protocol + yysf5 := &yy4 + yysf5.CodecEncodeSelf(e) } } else { r.EncodeNil() } } else { - if yyq1221[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("protocol")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Protocol == nil { r.EncodeNil() } else { - yy1225 := *x.Protocol - yym1226 := z.EncBinary() - _ = yym1226 - if false { - } else if z.HasExtensions() && z.EncExt(yy1225) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(yy1225)) - } + yy6 := *x.Protocol + yysf7 := &yy6 + yysf7.CodecEncodeSelf(e) } } } - if yyr1221 || yy2arr1221 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1221[1] { + if yyq2[1] { if x.Port == nil { r.EncodeNil() } else { - yym1228 := z.EncBinary() - _ = yym1228 + yym9 := z.EncBinary() + _ = yym9 if false { } else if z.HasExtensions() && z.EncExt(x.Port) { - } else if !yym1228 && z.IsJSONHandle() { + } else if !yym9 && z.IsJSONHandle() { z.EncJSONMarshal(x.Port) } else { z.EncFallback(x.Port) @@ -14751,18 +18179,18 @@ func (x *NetworkPolicyPort) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1221[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Port == nil { r.EncodeNil() } else { - yym1229 := z.EncBinary() - _ = yym1229 + yym10 := z.EncBinary() + _ = yym10 if false { } else if z.HasExtensions() && z.EncExt(x.Port) { - } else if !yym1229 && z.IsJSONHandle() { + } else if !yym10 && z.IsJSONHandle() { z.EncJSONMarshal(x.Port) } else { z.EncFallback(x.Port) @@ -14770,7 +18198,7 @@ func (x *NetworkPolicyPort) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1221 || yy2arr1221 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -14783,25 +18211,25 @@ func (x *NetworkPolicyPort) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1230 := z.DecBinary() - _ = yym1230 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1231 := r.ContainerType() - if yyct1231 == codecSelferValueTypeMap1234 { - yyl1231 := r.ReadMapStart() - if yyl1231 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1231, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1231 == codecSelferValueTypeArray1234 { - yyl1231 := r.ReadArrayStart() - if yyl1231 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1231, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -14813,12 +18241,12 @@ func (x *NetworkPolicyPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1232Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1232Slc - var yyhl1232 bool = l >= 0 - for yyj1232 := 0; ; yyj1232++ { - if yyhl1232 { - if yyj1232 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -14827,10 +18255,10 @@ func (x *NetworkPolicyPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1232Slc = r.DecodeBytes(yys1232Slc, true, true) - yys1232 := string(yys1232Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1232 { + switch yys3 { case "protocol": if r.TryDecodeAsNil() { if x.Protocol != nil { @@ -14838,7 +18266,7 @@ func (x *NetworkPolicyPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } else { if x.Protocol == nil { - x.Protocol = new(pkg2_api.Protocol) + x.Protocol = new(pkg4_v1.Protocol) } x.Protocol.CodecDecodeSelf(d) } @@ -14851,20 +18279,20 @@ func (x *NetworkPolicyPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if x.Port == nil { x.Port = new(pkg5_intstr.IntOrString) } - yym1235 := z.DecBinary() - _ = yym1235 + yym6 := z.DecBinary() + _ = yym6 if false { } else if z.HasExtensions() && z.DecExt(x.Port) { - } else if !yym1235 && z.IsJSONHandle() { + } else if !yym6 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.Port) } else { z.DecFallback(x.Port, false) } } default: - z.DecStructFieldNotFound(-1, yys1232) - } // end switch yys1232 - } // end for yyj1232 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -14872,16 +18300,16 @@ func (x *NetworkPolicyPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1236 int - var yyb1236 bool - var yyhl1236 bool = l >= 0 - yyj1236++ - if yyhl1236 { - yyb1236 = yyj1236 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1236 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1236 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -14892,17 +18320,17 @@ func (x *NetworkPolicyPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } } else { if x.Protocol == nil { - x.Protocol = new(pkg2_api.Protocol) + x.Protocol = new(pkg4_v1.Protocol) } x.Protocol.CodecDecodeSelf(d) } - yyj1236++ - if yyhl1236 { - yyb1236 = yyj1236 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1236 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1236 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -14915,28 +18343,28 @@ func (x *NetworkPolicyPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if x.Port == nil { x.Port = new(pkg5_intstr.IntOrString) } - yym1239 := z.DecBinary() - _ = yym1239 + yym10 := z.DecBinary() + _ = yym10 if false { } else if z.HasExtensions() && z.DecExt(x.Port) { - } else if !yym1239 && z.IsJSONHandle() { + } else if !yym10 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.Port) } else { z.DecFallback(x.Port, false) } } for { - yyj1236++ - if yyhl1236 { - yyb1236 = yyj1236 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb1236 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb1236 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1236-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -14948,39 +18376,39 @@ func (x *NetworkPolicyPeer) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1240 := z.EncBinary() - _ = yym1240 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1241 := !z.EncBinary() - yy2arr1241 := z.EncBasicHandle().StructToArray - var yyq1241 [2]bool - _, _, _ = yysep1241, yyq1241, yy2arr1241 - const yyr1241 bool = false - yyq1241[0] = x.PodSelector != nil - yyq1241[1] = x.NamespaceSelector != nil - var yynn1241 int - if yyr1241 || yy2arr1241 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.PodSelector != nil + yyq2[1] = x.NamespaceSelector != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(2) } else { - yynn1241 = 0 - for _, b := range yyq1241 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn1241++ + yynn2++ } } - r.EncodeMapStart(yynn1241) - yynn1241 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1241 || yy2arr1241 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1241[0] { + if yyq2[0] { if x.PodSelector == nil { r.EncodeNil() } else { - yym1243 := z.EncBinary() - _ = yym1243 + yym4 := z.EncBinary() + _ = yym4 if false { } else if z.HasExtensions() && z.EncExt(x.PodSelector) { } else { @@ -14991,15 +18419,15 @@ func (x *NetworkPolicyPeer) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1241[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podSelector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.PodSelector == nil { r.EncodeNil() } else { - yym1244 := z.EncBinary() - _ = yym1244 + yym5 := z.EncBinary() + _ = yym5 if false { } else if z.HasExtensions() && z.EncExt(x.PodSelector) { } else { @@ -15008,14 +18436,14 @@ func (x *NetworkPolicyPeer) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1241 || yy2arr1241 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1241[1] { + if yyq2[1] { if x.NamespaceSelector == nil { r.EncodeNil() } else { - yym1246 := z.EncBinary() - _ = yym1246 + yym7 := z.EncBinary() + _ = yym7 if false { } else if z.HasExtensions() && z.EncExt(x.NamespaceSelector) { } else { @@ -15026,15 +18454,15 @@ func (x *NetworkPolicyPeer) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq1241[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("namespaceSelector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.NamespaceSelector == nil { r.EncodeNil() } else { - yym1247 := z.EncBinary() - _ = yym1247 + yym8 := z.EncBinary() + _ = yym8 if false { } else if z.HasExtensions() && z.EncExt(x.NamespaceSelector) { } else { @@ -15043,7 +18471,7 @@ func (x *NetworkPolicyPeer) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr1241 || yy2arr1241 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -15056,25 +18484,25 @@ func (x *NetworkPolicyPeer) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1248 := z.DecBinary() - _ = yym1248 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1249 := r.ContainerType() - if yyct1249 == codecSelferValueTypeMap1234 { - yyl1249 := r.ReadMapStart() - if yyl1249 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1249, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1249 == codecSelferValueTypeArray1234 { - yyl1249 := r.ReadArrayStart() - if yyl1249 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1249, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -15086,12 +18514,12 @@ func (x *NetworkPolicyPeer) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1250Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1250Slc - var yyhl1250 bool = l >= 0 - for yyj1250 := 0; ; yyj1250++ { - if yyhl1250 { - if yyj1250 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -15100,10 +18528,10 @@ func (x *NetworkPolicyPeer) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1250Slc = r.DecodeBytes(yys1250Slc, true, true) - yys1250 := string(yys1250Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1250 { + switch yys3 { case "podSelector": if r.TryDecodeAsNil() { if x.PodSelector != nil { @@ -15111,10 +18539,10 @@ func (x *NetworkPolicyPeer) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } else { if x.PodSelector == nil { - x.PodSelector = new(pkg1_unversioned.LabelSelector) + x.PodSelector = new(pkg1_v1.LabelSelector) } - yym1252 := z.DecBinary() - _ = yym1252 + yym5 := z.DecBinary() + _ = yym5 if false { } else if z.HasExtensions() && z.DecExt(x.PodSelector) { } else { @@ -15128,10 +18556,10 @@ func (x *NetworkPolicyPeer) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } else { if x.NamespaceSelector == nil { - x.NamespaceSelector = new(pkg1_unversioned.LabelSelector) + x.NamespaceSelector = new(pkg1_v1.LabelSelector) } - yym1254 := z.DecBinary() - _ = yym1254 + yym7 := z.DecBinary() + _ = yym7 if false { } else if z.HasExtensions() && z.DecExt(x.NamespaceSelector) { } else { @@ -15139,9 +18567,9 @@ func (x *NetworkPolicyPeer) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } default: - z.DecStructFieldNotFound(-1, yys1250) - } // end switch yys1250 - } // end for yyj1250 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -15149,16 +18577,16 @@ func (x *NetworkPolicyPeer) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1255 int - var yyb1255 bool - var yyhl1255 bool = l >= 0 - yyj1255++ - if yyhl1255 { - yyb1255 = yyj1255 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1255 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1255 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15169,23 +18597,23 @@ func (x *NetworkPolicyPeer) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } } else { if x.PodSelector == nil { - x.PodSelector = new(pkg1_unversioned.LabelSelector) + x.PodSelector = new(pkg1_v1.LabelSelector) } - yym1257 := z.DecBinary() - _ = yym1257 + yym10 := z.DecBinary() + _ = yym10 if false { } else if z.HasExtensions() && z.DecExt(x.PodSelector) { } else { z.DecFallback(x.PodSelector, false) } } - yyj1255++ - if yyhl1255 { - yyb1255 = yyj1255 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1255 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1255 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15196,10 +18624,10 @@ func (x *NetworkPolicyPeer) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } } else { if x.NamespaceSelector == nil { - x.NamespaceSelector = new(pkg1_unversioned.LabelSelector) + x.NamespaceSelector = new(pkg1_v1.LabelSelector) } - yym1259 := z.DecBinary() - _ = yym1259 + yym12 := z.DecBinary() + _ = yym12 if false { } else if z.HasExtensions() && z.DecExt(x.NamespaceSelector) { } else { @@ -15207,17 +18635,17 @@ func (x *NetworkPolicyPeer) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } } for { - yyj1255++ - if yyhl1255 { - yyb1255 = yyj1255 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb1255 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb1255 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1255-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15229,37 +18657,37 @@ func (x *NetworkPolicyList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1260 := z.EncBinary() - _ = yym1260 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1261 := !z.EncBinary() - yy2arr1261 := z.EncBasicHandle().StructToArray - var yyq1261 [4]bool - _, _, _ = yysep1261, yyq1261, yy2arr1261 - const yyr1261 bool = false - yyq1261[0] = x.Kind != "" - yyq1261[1] = x.APIVersion != "" - yyq1261[2] = true - var yynn1261 int - if yyr1261 || yy2arr1261 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn1261 = 1 - for _, b := range yyq1261 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn1261++ + yynn2++ } } - r.EncodeMapStart(yynn1261) - yynn1261 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr1261 || yy2arr1261 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1261[0] { - yym1263 := z.EncBinary() - _ = yym1263 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -15268,23 +18696,23 @@ func (x *NetworkPolicyList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1261[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1264 := z.EncBinary() - _ = yym1264 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr1261 || yy2arr1261 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1261[1] { - yym1266 := z.EncBinary() - _ = yym1266 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -15293,54 +18721,54 @@ func (x *NetworkPolicyList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq1261[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1267 := z.EncBinary() - _ = yym1267 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr1261 || yy2arr1261 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq1261[2] { - yy1269 := &x.ListMeta - yym1270 := z.EncBinary() - _ = yym1270 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy1269) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy1269) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq1261[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1271 := &x.ListMeta - yym1272 := z.EncBinary() - _ = yym1272 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy1271) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy1271) + z.EncFallback(yy12) } } } - if yyr1261 || yy2arr1261 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym1274 := z.EncBinary() - _ = yym1274 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceNetworkPolicy(([]NetworkPolicy)(x.Items), e) @@ -15353,15 +18781,15 @@ func (x *NetworkPolicyList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym1275 := z.EncBinary() - _ = yym1275 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceNetworkPolicy(([]NetworkPolicy)(x.Items), e) } } } - if yyr1261 || yy2arr1261 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -15374,25 +18802,25 @@ func (x *NetworkPolicyList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1276 := z.DecBinary() - _ = yym1276 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1277 := r.ContainerType() - if yyct1277 == codecSelferValueTypeMap1234 { - yyl1277 := r.ReadMapStart() - if yyl1277 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1277, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct1277 == codecSelferValueTypeArray1234 { - yyl1277 := r.ReadArrayStart() - if yyl1277 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1277, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -15404,12 +18832,12 @@ func (x *NetworkPolicyList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1278Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1278Slc - var yyhl1278 bool = l >= 0 - for yyj1278 := 0; ; yyj1278++ { - if yyhl1278 { - if yyj1278 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -15418,51 +18846,63 @@ func (x *NetworkPolicyList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1278Slc = r.DecodeBytes(yys1278Slc, true, true) - yys1278 := string(yys1278Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1278 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv1281 := &x.ListMeta - yym1282 := z.DecBinary() - _ = yym1282 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv1281) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv1281, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1283 := &x.Items - yym1284 := z.DecBinary() - _ = yym1284 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv1283), d) + h.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys1278) - } // end switch yys1278 - } // end for yyj1278 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -15470,16 +18910,16 @@ func (x *NetworkPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1285 int - var yyb1285 bool - var yyhl1285 bool = l >= 0 - yyj1285++ - if yyhl1285 { - yyb1285 = yyj1285 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1285 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1285 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15487,15 +18927,21 @@ func (x *NetworkPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj1285++ - if yyhl1285 { - yyb1285 = yyj1285 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1285 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1285 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15503,38 +18949,44 @@ func (x *NetworkPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj1285++ - if yyhl1285 { - yyb1285 = yyj1285 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1285 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1285 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv1288 := &x.ListMeta - yym1289 := z.DecBinary() - _ = yym1289 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv1288) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv1288, false) + z.DecFallback(yyv17, false) } } - yyj1285++ - if yyhl1285 { - yyb1285 = yyj1285 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1285 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1285 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15542,26 +18994,26 @@ func (x *NetworkPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Items = nil } else { - yyv1290 := &x.Items - yym1291 := z.DecBinary() - _ = yym1291 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv1290), d) + h.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv19), d) } } for { - yyj1285++ - if yyhl1285 { - yyb1285 = yyj1285 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb1285 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb1285 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1285-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15571,10 +19023,10 @@ func (x codecSelfer1234) encSliceCustomMetricTarget(v []CustomMetricTarget, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1292 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1293 := &yyv1292 - yy1293.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15584,83 +19036,86 @@ func (x codecSelfer1234) decSliceCustomMetricTarget(v *[]CustomMetricTarget, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1294 := *v - yyh1294, yyl1294 := z.DecSliceHelperStart() - var yyc1294 bool - if yyl1294 == 0 { - if yyv1294 == nil { - yyv1294 = []CustomMetricTarget{} - yyc1294 = true - } else if len(yyv1294) != 0 { - yyv1294 = yyv1294[:0] - yyc1294 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []CustomMetricTarget{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1294 > 0 { - var yyrr1294, yyrl1294 int - var yyrt1294 bool - if yyl1294 > cap(yyv1294) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1294 := len(yyv1294) > 0 - yyv21294 := yyv1294 - yyrl1294, yyrt1294 = z.DecInferLen(yyl1294, z.DecBasicHandle().MaxInitLen, 72) - if yyrt1294 { - if yyrl1294 <= cap(yyv1294) { - yyv1294 = yyv1294[:yyrl1294] + 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 { - yyv1294 = make([]CustomMetricTarget, yyrl1294) + yyv1 = make([]CustomMetricTarget, yyrl1) } } else { - yyv1294 = make([]CustomMetricTarget, yyrl1294) + yyv1 = make([]CustomMetricTarget, yyrl1) } - yyc1294 = true - yyrr1294 = len(yyv1294) - if yyrg1294 { - copy(yyv1294, yyv21294) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1294 != len(yyv1294) { - yyv1294 = yyv1294[:yyl1294] - yyc1294 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1294 := 0 - for ; yyj1294 < yyrr1294; yyj1294++ { - yyh1294.ElemContainerState(yyj1294) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1294[yyj1294] = CustomMetricTarget{} + yyv1[yyj1] = CustomMetricTarget{} } else { - yyv1295 := &yyv1294[yyj1294] - yyv1295.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1294 { - for ; yyj1294 < yyl1294; yyj1294++ { - yyv1294 = append(yyv1294, CustomMetricTarget{}) - yyh1294.ElemContainerState(yyj1294) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, CustomMetricTarget{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1294[yyj1294] = CustomMetricTarget{} + yyv1[yyj1] = CustomMetricTarget{} } else { - yyv1296 := &yyv1294[yyj1294] - yyv1296.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1294 := 0 - for ; !r.CheckBreak(); yyj1294++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1294 >= len(yyv1294) { - yyv1294 = append(yyv1294, CustomMetricTarget{}) // var yyz1294 CustomMetricTarget - yyc1294 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, CustomMetricTarget{}) // var yyz1 CustomMetricTarget + yyc1 = true } - yyh1294.ElemContainerState(yyj1294) - if yyj1294 < len(yyv1294) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1294[yyj1294] = CustomMetricTarget{} + yyv1[yyj1] = CustomMetricTarget{} } else { - yyv1297 := &yyv1294[yyj1294] - yyv1297.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -15668,17 +19123,17 @@ func (x codecSelfer1234) decSliceCustomMetricTarget(v *[]CustomMetricTarget, d * } } - if yyj1294 < len(yyv1294) { - yyv1294 = yyv1294[:yyj1294] - yyc1294 = true - } else if yyj1294 == 0 && yyv1294 == nil { - yyv1294 = []CustomMetricTarget{} - yyc1294 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []CustomMetricTarget{} + yyc1 = true } } - yyh1294.End() - if yyc1294 { - *v = yyv1294 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -15687,10 +19142,10 @@ func (x codecSelfer1234) encSliceCustomMetricCurrentStatus(v []CustomMetricCurre z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1298 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1299 := &yyv1298 - yy1299.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15700,83 +19155,86 @@ func (x codecSelfer1234) decSliceCustomMetricCurrentStatus(v *[]CustomMetricCurr z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1300 := *v - yyh1300, yyl1300 := z.DecSliceHelperStart() - var yyc1300 bool - if yyl1300 == 0 { - if yyv1300 == nil { - yyv1300 = []CustomMetricCurrentStatus{} - yyc1300 = true - } else if len(yyv1300) != 0 { - yyv1300 = yyv1300[:0] - yyc1300 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []CustomMetricCurrentStatus{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1300 > 0 { - var yyrr1300, yyrl1300 int - var yyrt1300 bool - if yyl1300 > cap(yyv1300) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1300 := len(yyv1300) > 0 - yyv21300 := yyv1300 - yyrl1300, yyrt1300 = z.DecInferLen(yyl1300, z.DecBasicHandle().MaxInitLen, 72) - if yyrt1300 { - if yyrl1300 <= cap(yyv1300) { - yyv1300 = yyv1300[:yyrl1300] + 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 { - yyv1300 = make([]CustomMetricCurrentStatus, yyrl1300) + yyv1 = make([]CustomMetricCurrentStatus, yyrl1) } } else { - yyv1300 = make([]CustomMetricCurrentStatus, yyrl1300) + yyv1 = make([]CustomMetricCurrentStatus, yyrl1) } - yyc1300 = true - yyrr1300 = len(yyv1300) - if yyrg1300 { - copy(yyv1300, yyv21300) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1300 != len(yyv1300) { - yyv1300 = yyv1300[:yyl1300] - yyc1300 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1300 := 0 - for ; yyj1300 < yyrr1300; yyj1300++ { - yyh1300.ElemContainerState(yyj1300) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1300[yyj1300] = CustomMetricCurrentStatus{} + yyv1[yyj1] = CustomMetricCurrentStatus{} } else { - yyv1301 := &yyv1300[yyj1300] - yyv1301.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1300 { - for ; yyj1300 < yyl1300; yyj1300++ { - yyv1300 = append(yyv1300, CustomMetricCurrentStatus{}) - yyh1300.ElemContainerState(yyj1300) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, CustomMetricCurrentStatus{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1300[yyj1300] = CustomMetricCurrentStatus{} + yyv1[yyj1] = CustomMetricCurrentStatus{} } else { - yyv1302 := &yyv1300[yyj1300] - yyv1302.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1300 := 0 - for ; !r.CheckBreak(); yyj1300++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1300 >= len(yyv1300) { - yyv1300 = append(yyv1300, CustomMetricCurrentStatus{}) // var yyz1300 CustomMetricCurrentStatus - yyc1300 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, CustomMetricCurrentStatus{}) // var yyz1 CustomMetricCurrentStatus + yyc1 = true } - yyh1300.ElemContainerState(yyj1300) - if yyj1300 < len(yyv1300) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1300[yyj1300] = CustomMetricCurrentStatus{} + yyv1[yyj1] = CustomMetricCurrentStatus{} } else { - yyv1303 := &yyv1300[yyj1300] - yyv1303.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -15784,17 +19242,17 @@ func (x codecSelfer1234) decSliceCustomMetricCurrentStatus(v *[]CustomMetricCurr } } - if yyj1300 < len(yyv1300) { - yyv1300 = yyv1300[:yyj1300] - yyc1300 = true - } else if yyj1300 == 0 && yyv1300 == nil { - yyv1300 = []CustomMetricCurrentStatus{} - yyc1300 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []CustomMetricCurrentStatus{} + yyc1 = true } } - yyh1300.End() - if yyc1300 { - *v = yyv1300 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -15803,10 +19261,10 @@ func (x codecSelfer1234) encSliceAPIVersion(v []APIVersion, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1304 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1305 := &yyv1304 - yy1305.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15816,83 +19274,86 @@ func (x codecSelfer1234) decSliceAPIVersion(v *[]APIVersion, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1306 := *v - yyh1306, yyl1306 := z.DecSliceHelperStart() - var yyc1306 bool - if yyl1306 == 0 { - if yyv1306 == nil { - yyv1306 = []APIVersion{} - yyc1306 = true - } else if len(yyv1306) != 0 { - yyv1306 = yyv1306[:0] - yyc1306 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []APIVersion{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1306 > 0 { - var yyrr1306, yyrl1306 int - var yyrt1306 bool - if yyl1306 > cap(yyv1306) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1306 := len(yyv1306) > 0 - yyv21306 := yyv1306 - yyrl1306, yyrt1306 = z.DecInferLen(yyl1306, z.DecBasicHandle().MaxInitLen, 16) - if yyrt1306 { - if yyrl1306 <= cap(yyv1306) { - yyv1306 = yyv1306[:yyrl1306] + 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 { - yyv1306 = make([]APIVersion, yyrl1306) + yyv1 = make([]APIVersion, yyrl1) } } else { - yyv1306 = make([]APIVersion, yyrl1306) + yyv1 = make([]APIVersion, yyrl1) } - yyc1306 = true - yyrr1306 = len(yyv1306) - if yyrg1306 { - copy(yyv1306, yyv21306) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1306 != len(yyv1306) { - yyv1306 = yyv1306[:yyl1306] - yyc1306 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1306 := 0 - for ; yyj1306 < yyrr1306; yyj1306++ { - yyh1306.ElemContainerState(yyj1306) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1306[yyj1306] = APIVersion{} + yyv1[yyj1] = APIVersion{} } else { - yyv1307 := &yyv1306[yyj1306] - yyv1307.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1306 { - for ; yyj1306 < yyl1306; yyj1306++ { - yyv1306 = append(yyv1306, APIVersion{}) - yyh1306.ElemContainerState(yyj1306) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, APIVersion{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1306[yyj1306] = APIVersion{} + yyv1[yyj1] = APIVersion{} } else { - yyv1308 := &yyv1306[yyj1306] - yyv1308.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1306 := 0 - for ; !r.CheckBreak(); yyj1306++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1306 >= len(yyv1306) { - yyv1306 = append(yyv1306, APIVersion{}) // var yyz1306 APIVersion - yyc1306 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, APIVersion{}) // var yyz1 APIVersion + yyc1 = true } - yyh1306.ElemContainerState(yyj1306) - if yyj1306 < len(yyv1306) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1306[yyj1306] = APIVersion{} + yyv1[yyj1] = APIVersion{} } else { - yyv1309 := &yyv1306[yyj1306] - yyv1309.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -15900,17 +19361,17 @@ func (x codecSelfer1234) decSliceAPIVersion(v *[]APIVersion, d *codec1978.Decode } } - if yyj1306 < len(yyv1306) { - yyv1306 = yyv1306[:yyj1306] - yyc1306 = true - } else if yyj1306 == 0 && yyv1306 == nil { - yyv1306 = []APIVersion{} - yyc1306 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []APIVersion{} + yyc1 = true } } - yyh1306.End() - if yyc1306 { - *v = yyv1306 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -15919,10 +19380,10 @@ func (x codecSelfer1234) encSliceThirdPartyResource(v []ThirdPartyResource, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1310 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1311 := &yyv1310 - yy1311.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15932,83 +19393,86 @@ func (x codecSelfer1234) decSliceThirdPartyResource(v *[]ThirdPartyResource, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1312 := *v - yyh1312, yyl1312 := z.DecSliceHelperStart() - var yyc1312 bool - if yyl1312 == 0 { - if yyv1312 == nil { - yyv1312 = []ThirdPartyResource{} - yyc1312 = true - } else if len(yyv1312) != 0 { - yyv1312 = yyv1312[:0] - yyc1312 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []ThirdPartyResource{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1312 > 0 { - var yyrr1312, yyrl1312 int - var yyrt1312 bool - if yyl1312 > cap(yyv1312) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1312 := len(yyv1312) > 0 - yyv21312 := yyv1312 - yyrl1312, yyrt1312 = z.DecInferLen(yyl1312, z.DecBasicHandle().MaxInitLen, 296) - if yyrt1312 { - if yyrl1312 <= cap(yyv1312) { - yyv1312 = yyv1312[:yyrl1312] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 296) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv1312 = make([]ThirdPartyResource, yyrl1312) + yyv1 = make([]ThirdPartyResource, yyrl1) } } else { - yyv1312 = make([]ThirdPartyResource, yyrl1312) + yyv1 = make([]ThirdPartyResource, yyrl1) } - yyc1312 = true - yyrr1312 = len(yyv1312) - if yyrg1312 { - copy(yyv1312, yyv21312) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1312 != len(yyv1312) { - yyv1312 = yyv1312[:yyl1312] - yyc1312 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1312 := 0 - for ; yyj1312 < yyrr1312; yyj1312++ { - yyh1312.ElemContainerState(yyj1312) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1312[yyj1312] = ThirdPartyResource{} + yyv1[yyj1] = ThirdPartyResource{} } else { - yyv1313 := &yyv1312[yyj1312] - yyv1313.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1312 { - for ; yyj1312 < yyl1312; yyj1312++ { - yyv1312 = append(yyv1312, ThirdPartyResource{}) - yyh1312.ElemContainerState(yyj1312) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ThirdPartyResource{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1312[yyj1312] = ThirdPartyResource{} + yyv1[yyj1] = ThirdPartyResource{} } else { - yyv1314 := &yyv1312[yyj1312] - yyv1314.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1312 := 0 - for ; !r.CheckBreak(); yyj1312++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1312 >= len(yyv1312) { - yyv1312 = append(yyv1312, ThirdPartyResource{}) // var yyz1312 ThirdPartyResource - yyc1312 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ThirdPartyResource{}) // var yyz1 ThirdPartyResource + yyc1 = true } - yyh1312.ElemContainerState(yyj1312) - if yyj1312 < len(yyv1312) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1312[yyj1312] = ThirdPartyResource{} + yyv1[yyj1] = ThirdPartyResource{} } else { - yyv1315 := &yyv1312[yyj1312] - yyv1315.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -16016,17 +19480,136 @@ func (x codecSelfer1234) decSliceThirdPartyResource(v *[]ThirdPartyResource, d * } } - if yyj1312 < len(yyv1312) { - yyv1312 = yyv1312[:yyj1312] - yyc1312 = true - } else if yyj1312 == 0 && yyv1312 == nil { - yyv1312 = []ThirdPartyResource{} - yyc1312 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ThirdPartyResource{} + yyc1 = true } } - yyh1312.End() - if yyc1312 { - *v = yyv1312 + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceDeploymentCondition(v []DeploymentCondition, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceDeploymentCondition(v *[]DeploymentCondition, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []DeploymentCondition{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 112) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]DeploymentCondition, yyrl1) + } + } else { + yyv1 = make([]DeploymentCondition, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = DeploymentCondition{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, DeploymentCondition{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = DeploymentCondition{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, DeploymentCondition{}) // var yyz1 DeploymentCondition + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = DeploymentCondition{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []DeploymentCondition{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -16035,10 +19618,10 @@ func (x codecSelfer1234) encSliceDeployment(v []Deployment, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1316 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1317 := &yyv1316 - yy1317.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16048,83 +19631,86 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1318 := *v - yyh1318, yyl1318 := z.DecSliceHelperStart() - var yyc1318 bool - if yyl1318 == 0 { - if yyv1318 == nil { - yyv1318 = []Deployment{} - yyc1318 = true - } else if len(yyv1318) != 0 { - yyv1318 = yyv1318[:0] - yyc1318 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []Deployment{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1318 > 0 { - var yyrr1318, yyrl1318 int - var yyrt1318 bool - if yyl1318 > cap(yyv1318) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1318 := len(yyv1318) > 0 - yyv21318 := yyv1318 - yyrl1318, yyrt1318 = z.DecInferLen(yyl1318, z.DecBasicHandle().MaxInitLen, 800) - if yyrt1318 { - if yyrl1318 <= cap(yyv1318) { - yyv1318 = yyv1318[:yyrl1318] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 920) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv1318 = make([]Deployment, yyrl1318) + yyv1 = make([]Deployment, yyrl1) } } else { - yyv1318 = make([]Deployment, yyrl1318) + yyv1 = make([]Deployment, yyrl1) } - yyc1318 = true - yyrr1318 = len(yyv1318) - if yyrg1318 { - copy(yyv1318, yyv21318) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1318 != len(yyv1318) { - yyv1318 = yyv1318[:yyl1318] - yyc1318 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1318 := 0 - for ; yyj1318 < yyrr1318; yyj1318++ { - yyh1318.ElemContainerState(yyj1318) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1318[yyj1318] = Deployment{} + yyv1[yyj1] = Deployment{} } else { - yyv1319 := &yyv1318[yyj1318] - yyv1319.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1318 { - for ; yyj1318 < yyl1318; yyj1318++ { - yyv1318 = append(yyv1318, Deployment{}) - yyh1318.ElemContainerState(yyj1318) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Deployment{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1318[yyj1318] = Deployment{} + yyv1[yyj1] = Deployment{} } else { - yyv1320 := &yyv1318[yyj1318] - yyv1320.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1318 := 0 - for ; !r.CheckBreak(); yyj1318++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1318 >= len(yyv1318) { - yyv1318 = append(yyv1318, Deployment{}) // var yyz1318 Deployment - yyc1318 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Deployment{}) // var yyz1 Deployment + yyc1 = true } - yyh1318.ElemContainerState(yyj1318) - if yyj1318 < len(yyv1318) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1318[yyj1318] = Deployment{} + yyv1[yyj1] = Deployment{} } else { - yyv1321 := &yyv1318[yyj1318] - yyv1321.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -16132,17 +19718,17 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode } } - if yyj1318 < len(yyv1318) { - yyv1318 = yyv1318[:yyj1318] - yyc1318 = true - } else if yyj1318 == 0 && yyv1318 == nil { - yyv1318 = []Deployment{} - yyc1318 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Deployment{} + yyc1 = true } } - yyh1318.End() - if yyc1318 { - *v = yyv1318 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -16151,10 +19737,10 @@ func (x codecSelfer1234) encSliceDaemonSet(v []DaemonSet, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1322 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1323 := &yyv1322 - yy1323.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16164,83 +19750,86 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1324 := *v - yyh1324, yyl1324 := z.DecSliceHelperStart() - var yyc1324 bool - if yyl1324 == 0 { - if yyv1324 == nil { - yyv1324 = []DaemonSet{} - yyc1324 = true - } else if len(yyv1324) != 0 { - yyv1324 = yyv1324[:0] - yyc1324 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []DaemonSet{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1324 > 0 { - var yyrr1324, yyrl1324 int - var yyrt1324 bool - if yyl1324 > cap(yyv1324) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1324 := len(yyv1324) > 0 - yyv21324 := yyv1324 - yyrl1324, yyrt1324 = z.DecInferLen(yyl1324, z.DecBasicHandle().MaxInitLen, 728) - if yyrt1324 { - if yyrl1324 <= cap(yyv1324) { - yyv1324 = yyv1324[:yyrl1324] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 872) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv1324 = make([]DaemonSet, yyrl1324) + yyv1 = make([]DaemonSet, yyrl1) } } else { - yyv1324 = make([]DaemonSet, yyrl1324) + yyv1 = make([]DaemonSet, yyrl1) } - yyc1324 = true - yyrr1324 = len(yyv1324) - if yyrg1324 { - copy(yyv1324, yyv21324) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1324 != len(yyv1324) { - yyv1324 = yyv1324[:yyl1324] - yyc1324 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1324 := 0 - for ; yyj1324 < yyrr1324; yyj1324++ { - yyh1324.ElemContainerState(yyj1324) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1324[yyj1324] = DaemonSet{} + yyv1[yyj1] = DaemonSet{} } else { - yyv1325 := &yyv1324[yyj1324] - yyv1325.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1324 { - for ; yyj1324 < yyl1324; yyj1324++ { - yyv1324 = append(yyv1324, DaemonSet{}) - yyh1324.ElemContainerState(yyj1324) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, DaemonSet{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1324[yyj1324] = DaemonSet{} + yyv1[yyj1] = DaemonSet{} } else { - yyv1326 := &yyv1324[yyj1324] - yyv1326.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1324 := 0 - for ; !r.CheckBreak(); yyj1324++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1324 >= len(yyv1324) { - yyv1324 = append(yyv1324, DaemonSet{}) // var yyz1324 DaemonSet - yyc1324 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, DaemonSet{}) // var yyz1 DaemonSet + yyc1 = true } - yyh1324.ElemContainerState(yyj1324) - if yyj1324 < len(yyv1324) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1324[yyj1324] = DaemonSet{} + yyv1[yyj1] = DaemonSet{} } else { - yyv1327 := &yyv1324[yyj1324] - yyv1327.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -16248,17 +19837,17 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) } } - if yyj1324 < len(yyv1324) { - yyv1324 = yyv1324[:yyj1324] - yyc1324 = true - } else if yyj1324 == 0 && yyv1324 == nil { - yyv1324 = []DaemonSet{} - yyc1324 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []DaemonSet{} + yyc1 = true } } - yyh1324.End() - if yyc1324 { - *v = yyv1324 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -16267,10 +19856,10 @@ func (x codecSelfer1234) encSliceThirdPartyResourceData(v []ThirdPartyResourceDa z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1328 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1329 := &yyv1328 - yy1329.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16280,83 +19869,86 @@ func (x codecSelfer1234) decSliceThirdPartyResourceData(v *[]ThirdPartyResourceD z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1330 := *v - yyh1330, yyl1330 := z.DecSliceHelperStart() - var yyc1330 bool - if yyl1330 == 0 { - if yyv1330 == nil { - yyv1330 = []ThirdPartyResourceData{} - yyc1330 = true - } else if len(yyv1330) != 0 { - yyv1330 = yyv1330[:0] - yyc1330 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []ThirdPartyResourceData{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1330 > 0 { - var yyrr1330, yyrl1330 int - var yyrt1330 bool - if yyl1330 > cap(yyv1330) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1330 := len(yyv1330) > 0 - yyv21330 := yyv1330 - yyrl1330, yyrt1330 = z.DecInferLen(yyl1330, z.DecBasicHandle().MaxInitLen, 280) - if yyrt1330 { - if yyrl1330 <= cap(yyv1330) { - yyv1330 = yyv1330[:yyrl1330] + 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 { - yyv1330 = make([]ThirdPartyResourceData, yyrl1330) + yyv1 = make([]ThirdPartyResourceData, yyrl1) } } else { - yyv1330 = make([]ThirdPartyResourceData, yyrl1330) + yyv1 = make([]ThirdPartyResourceData, yyrl1) } - yyc1330 = true - yyrr1330 = len(yyv1330) - if yyrg1330 { - copy(yyv1330, yyv21330) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1330 != len(yyv1330) { - yyv1330 = yyv1330[:yyl1330] - yyc1330 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1330 := 0 - for ; yyj1330 < yyrr1330; yyj1330++ { - yyh1330.ElemContainerState(yyj1330) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1330[yyj1330] = ThirdPartyResourceData{} + yyv1[yyj1] = ThirdPartyResourceData{} } else { - yyv1331 := &yyv1330[yyj1330] - yyv1331.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1330 { - for ; yyj1330 < yyl1330; yyj1330++ { - yyv1330 = append(yyv1330, ThirdPartyResourceData{}) - yyh1330.ElemContainerState(yyj1330) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ThirdPartyResourceData{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1330[yyj1330] = ThirdPartyResourceData{} + yyv1[yyj1] = ThirdPartyResourceData{} } else { - yyv1332 := &yyv1330[yyj1330] - yyv1332.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1330 := 0 - for ; !r.CheckBreak(); yyj1330++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1330 >= len(yyv1330) { - yyv1330 = append(yyv1330, ThirdPartyResourceData{}) // var yyz1330 ThirdPartyResourceData - yyc1330 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ThirdPartyResourceData{}) // var yyz1 ThirdPartyResourceData + yyc1 = true } - yyh1330.ElemContainerState(yyj1330) - if yyj1330 < len(yyv1330) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1330[yyj1330] = ThirdPartyResourceData{} + yyv1[yyj1] = ThirdPartyResourceData{} } else { - yyv1333 := &yyv1330[yyj1330] - yyv1333.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -16364,17 +19956,17 @@ func (x codecSelfer1234) decSliceThirdPartyResourceData(v *[]ThirdPartyResourceD } } - if yyj1330 < len(yyv1330) { - yyv1330 = yyv1330[:yyj1330] - yyc1330 = true - } else if yyj1330 == 0 && yyv1330 == nil { - yyv1330 = []ThirdPartyResourceData{} - yyc1330 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ThirdPartyResourceData{} + yyc1 = true } } - yyh1330.End() - if yyc1330 { - *v = yyv1330 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -16383,10 +19975,10 @@ func (x codecSelfer1234) encSliceIngress(v []Ingress, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1334 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1335 := &yyv1334 - yy1335.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16396,83 +19988,86 @@ func (x codecSelfer1234) decSliceIngress(v *[]Ingress, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1336 := *v - yyh1336, yyl1336 := z.DecSliceHelperStart() - var yyc1336 bool - if yyl1336 == 0 { - if yyv1336 == nil { - yyv1336 = []Ingress{} - yyc1336 = true - } else if len(yyv1336) != 0 { - yyv1336 = yyv1336[:0] - yyc1336 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []Ingress{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1336 > 0 { - var yyrr1336, yyrl1336 int - var yyrt1336 bool - if yyl1336 > cap(yyv1336) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1336 := len(yyv1336) > 0 - yyv21336 := yyv1336 - yyrl1336, yyrt1336 = z.DecInferLen(yyl1336, z.DecBasicHandle().MaxInitLen, 336) - if yyrt1336 { - if yyrl1336 <= cap(yyv1336) { - yyv1336 = yyv1336[:yyrl1336] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 336) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv1336 = make([]Ingress, yyrl1336) + yyv1 = make([]Ingress, yyrl1) } } else { - yyv1336 = make([]Ingress, yyrl1336) + yyv1 = make([]Ingress, yyrl1) } - yyc1336 = true - yyrr1336 = len(yyv1336) - if yyrg1336 { - copy(yyv1336, yyv21336) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1336 != len(yyv1336) { - yyv1336 = yyv1336[:yyl1336] - yyc1336 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1336 := 0 - for ; yyj1336 < yyrr1336; yyj1336++ { - yyh1336.ElemContainerState(yyj1336) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1336[yyj1336] = Ingress{} + yyv1[yyj1] = Ingress{} } else { - yyv1337 := &yyv1336[yyj1336] - yyv1337.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1336 { - for ; yyj1336 < yyl1336; yyj1336++ { - yyv1336 = append(yyv1336, Ingress{}) - yyh1336.ElemContainerState(yyj1336) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Ingress{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1336[yyj1336] = Ingress{} + yyv1[yyj1] = Ingress{} } else { - yyv1338 := &yyv1336[yyj1336] - yyv1338.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1336 := 0 - for ; !r.CheckBreak(); yyj1336++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1336 >= len(yyv1336) { - yyv1336 = append(yyv1336, Ingress{}) // var yyz1336 Ingress - yyc1336 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Ingress{}) // var yyz1 Ingress + yyc1 = true } - yyh1336.ElemContainerState(yyj1336) - if yyj1336 < len(yyv1336) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1336[yyj1336] = Ingress{} + yyv1[yyj1] = Ingress{} } else { - yyv1339 := &yyv1336[yyj1336] - yyv1339.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -16480,17 +20075,17 @@ func (x codecSelfer1234) decSliceIngress(v *[]Ingress, d *codec1978.Decoder) { } } - if yyj1336 < len(yyv1336) { - yyv1336 = yyv1336[:yyj1336] - yyc1336 = true - } else if yyj1336 == 0 && yyv1336 == nil { - yyv1336 = []Ingress{} - yyc1336 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Ingress{} + yyc1 = true } } - yyh1336.End() - if yyc1336 { - *v = yyv1336 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -16499,10 +20094,10 @@ func (x codecSelfer1234) encSliceIngressTLS(v []IngressTLS, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1340 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1341 := &yyv1340 - yy1341.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16512,83 +20107,86 @@ func (x codecSelfer1234) decSliceIngressTLS(v *[]IngressTLS, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1342 := *v - yyh1342, yyl1342 := z.DecSliceHelperStart() - var yyc1342 bool - if yyl1342 == 0 { - if yyv1342 == nil { - yyv1342 = []IngressTLS{} - yyc1342 = true - } else if len(yyv1342) != 0 { - yyv1342 = yyv1342[:0] - yyc1342 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []IngressTLS{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1342 > 0 { - var yyrr1342, yyrl1342 int - var yyrt1342 bool - if yyl1342 > cap(yyv1342) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1342 := len(yyv1342) > 0 - yyv21342 := yyv1342 - yyrl1342, yyrt1342 = z.DecInferLen(yyl1342, z.DecBasicHandle().MaxInitLen, 40) - if yyrt1342 { - if yyrl1342 <= cap(yyv1342) { - yyv1342 = yyv1342[:yyrl1342] + 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 { - yyv1342 = make([]IngressTLS, yyrl1342) + yyv1 = make([]IngressTLS, yyrl1) } } else { - yyv1342 = make([]IngressTLS, yyrl1342) + yyv1 = make([]IngressTLS, yyrl1) } - yyc1342 = true - yyrr1342 = len(yyv1342) - if yyrg1342 { - copy(yyv1342, yyv21342) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1342 != len(yyv1342) { - yyv1342 = yyv1342[:yyl1342] - yyc1342 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1342 := 0 - for ; yyj1342 < yyrr1342; yyj1342++ { - yyh1342.ElemContainerState(yyj1342) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1342[yyj1342] = IngressTLS{} + yyv1[yyj1] = IngressTLS{} } else { - yyv1343 := &yyv1342[yyj1342] - yyv1343.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1342 { - for ; yyj1342 < yyl1342; yyj1342++ { - yyv1342 = append(yyv1342, IngressTLS{}) - yyh1342.ElemContainerState(yyj1342) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, IngressTLS{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1342[yyj1342] = IngressTLS{} + yyv1[yyj1] = IngressTLS{} } else { - yyv1344 := &yyv1342[yyj1342] - yyv1344.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1342 := 0 - for ; !r.CheckBreak(); yyj1342++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1342 >= len(yyv1342) { - yyv1342 = append(yyv1342, IngressTLS{}) // var yyz1342 IngressTLS - yyc1342 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, IngressTLS{}) // var yyz1 IngressTLS + yyc1 = true } - yyh1342.ElemContainerState(yyj1342) - if yyj1342 < len(yyv1342) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1342[yyj1342] = IngressTLS{} + yyv1[yyj1] = IngressTLS{} } else { - yyv1345 := &yyv1342[yyj1342] - yyv1345.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -16596,17 +20194,17 @@ func (x codecSelfer1234) decSliceIngressTLS(v *[]IngressTLS, d *codec1978.Decode } } - if yyj1342 < len(yyv1342) { - yyv1342 = yyv1342[:yyj1342] - yyc1342 = true - } else if yyj1342 == 0 && yyv1342 == nil { - yyv1342 = []IngressTLS{} - yyc1342 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []IngressTLS{} + yyc1 = true } } - yyh1342.End() - if yyc1342 { - *v = yyv1342 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -16615,10 +20213,10 @@ func (x codecSelfer1234) encSliceIngressRule(v []IngressRule, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1346 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1347 := &yyv1346 - yy1347.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16628,83 +20226,86 @@ func (x codecSelfer1234) decSliceIngressRule(v *[]IngressRule, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1348 := *v - yyh1348, yyl1348 := z.DecSliceHelperStart() - var yyc1348 bool - if yyl1348 == 0 { - if yyv1348 == nil { - yyv1348 = []IngressRule{} - yyc1348 = true - } else if len(yyv1348) != 0 { - yyv1348 = yyv1348[:0] - yyc1348 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []IngressRule{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1348 > 0 { - var yyrr1348, yyrl1348 int - var yyrt1348 bool - if yyl1348 > cap(yyv1348) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1348 := len(yyv1348) > 0 - yyv21348 := yyv1348 - yyrl1348, yyrt1348 = z.DecInferLen(yyl1348, z.DecBasicHandle().MaxInitLen, 24) - if yyrt1348 { - if yyrl1348 <= cap(yyv1348) { - yyv1348 = yyv1348[:yyrl1348] + 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 { - yyv1348 = make([]IngressRule, yyrl1348) + yyv1 = make([]IngressRule, yyrl1) } } else { - yyv1348 = make([]IngressRule, yyrl1348) + yyv1 = make([]IngressRule, yyrl1) } - yyc1348 = true - yyrr1348 = len(yyv1348) - if yyrg1348 { - copy(yyv1348, yyv21348) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1348 != len(yyv1348) { - yyv1348 = yyv1348[:yyl1348] - yyc1348 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1348 := 0 - for ; yyj1348 < yyrr1348; yyj1348++ { - yyh1348.ElemContainerState(yyj1348) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1348[yyj1348] = IngressRule{} + yyv1[yyj1] = IngressRule{} } else { - yyv1349 := &yyv1348[yyj1348] - yyv1349.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1348 { - for ; yyj1348 < yyl1348; yyj1348++ { - yyv1348 = append(yyv1348, IngressRule{}) - yyh1348.ElemContainerState(yyj1348) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, IngressRule{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1348[yyj1348] = IngressRule{} + yyv1[yyj1] = IngressRule{} } else { - yyv1350 := &yyv1348[yyj1348] - yyv1350.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1348 := 0 - for ; !r.CheckBreak(); yyj1348++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1348 >= len(yyv1348) { - yyv1348 = append(yyv1348, IngressRule{}) // var yyz1348 IngressRule - yyc1348 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, IngressRule{}) // var yyz1 IngressRule + yyc1 = true } - yyh1348.ElemContainerState(yyj1348) - if yyj1348 < len(yyv1348) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1348[yyj1348] = IngressRule{} + yyv1[yyj1] = IngressRule{} } else { - yyv1351 := &yyv1348[yyj1348] - yyv1351.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -16712,17 +20313,17 @@ func (x codecSelfer1234) decSliceIngressRule(v *[]IngressRule, d *codec1978.Deco } } - if yyj1348 < len(yyv1348) { - yyv1348 = yyv1348[:yyj1348] - yyc1348 = true - } else if yyj1348 == 0 && yyv1348 == nil { - yyv1348 = []IngressRule{} - yyc1348 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []IngressRule{} + yyc1 = true } } - yyh1348.End() - if yyc1348 { - *v = yyv1348 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -16731,10 +20332,10 @@ func (x codecSelfer1234) encSliceHTTPIngressPath(v []HTTPIngressPath, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1352 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1353 := &yyv1352 - yy1353.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16744,83 +20345,86 @@ func (x codecSelfer1234) decSliceHTTPIngressPath(v *[]HTTPIngressPath, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1354 := *v - yyh1354, yyl1354 := z.DecSliceHelperStart() - var yyc1354 bool - if yyl1354 == 0 { - if yyv1354 == nil { - yyv1354 = []HTTPIngressPath{} - yyc1354 = true - } else if len(yyv1354) != 0 { - yyv1354 = yyv1354[:0] - yyc1354 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []HTTPIngressPath{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1354 > 0 { - var yyrr1354, yyrl1354 int - var yyrt1354 bool - if yyl1354 > cap(yyv1354) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1354 := len(yyv1354) > 0 - yyv21354 := yyv1354 - yyrl1354, yyrt1354 = z.DecInferLen(yyl1354, z.DecBasicHandle().MaxInitLen, 64) - if yyrt1354 { - if yyrl1354 <= cap(yyv1354) { - yyv1354 = yyv1354[:yyrl1354] + 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 { - yyv1354 = make([]HTTPIngressPath, yyrl1354) + yyv1 = make([]HTTPIngressPath, yyrl1) } } else { - yyv1354 = make([]HTTPIngressPath, yyrl1354) + yyv1 = make([]HTTPIngressPath, yyrl1) } - yyc1354 = true - yyrr1354 = len(yyv1354) - if yyrg1354 { - copy(yyv1354, yyv21354) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1354 != len(yyv1354) { - yyv1354 = yyv1354[:yyl1354] - yyc1354 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1354 := 0 - for ; yyj1354 < yyrr1354; yyj1354++ { - yyh1354.ElemContainerState(yyj1354) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1354[yyj1354] = HTTPIngressPath{} + yyv1[yyj1] = HTTPIngressPath{} } else { - yyv1355 := &yyv1354[yyj1354] - yyv1355.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1354 { - for ; yyj1354 < yyl1354; yyj1354++ { - yyv1354 = append(yyv1354, HTTPIngressPath{}) - yyh1354.ElemContainerState(yyj1354) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, HTTPIngressPath{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1354[yyj1354] = HTTPIngressPath{} + yyv1[yyj1] = HTTPIngressPath{} } else { - yyv1356 := &yyv1354[yyj1354] - yyv1356.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1354 := 0 - for ; !r.CheckBreak(); yyj1354++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1354 >= len(yyv1354) { - yyv1354 = append(yyv1354, HTTPIngressPath{}) // var yyz1354 HTTPIngressPath - yyc1354 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, HTTPIngressPath{}) // var yyz1 HTTPIngressPath + yyc1 = true } - yyh1354.ElemContainerState(yyj1354) - if yyj1354 < len(yyv1354) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1354[yyj1354] = HTTPIngressPath{} + yyv1[yyj1] = HTTPIngressPath{} } else { - yyv1357 := &yyv1354[yyj1354] - yyv1357.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -16828,17 +20432,17 @@ func (x codecSelfer1234) decSliceHTTPIngressPath(v *[]HTTPIngressPath, d *codec1 } } - if yyj1354 < len(yyv1354) { - yyv1354 = yyv1354[:yyj1354] - yyc1354 = true - } else if yyj1354 == 0 && yyv1354 == nil { - yyv1354 = []HTTPIngressPath{} - yyc1354 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []HTTPIngressPath{} + yyc1 = true } } - yyh1354.End() - if yyc1354 { - *v = yyv1354 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -16847,10 +20451,10 @@ func (x codecSelfer1234) encSliceReplicaSet(v []ReplicaSet, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1358 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1359 := &yyv1358 - yy1359.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16860,83 +20464,86 @@ func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1360 := *v - yyh1360, yyl1360 := z.DecSliceHelperStart() - var yyc1360 bool - if yyl1360 == 0 { - if yyv1360 == nil { - yyv1360 = []ReplicaSet{} - yyc1360 = true - } else if len(yyv1360) != 0 { - yyv1360 = yyv1360[:0] - yyc1360 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []ReplicaSet{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1360 > 0 { - var yyrr1360, yyrl1360 int - var yyrt1360 bool - if yyl1360 > cap(yyv1360) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1360 := len(yyv1360) > 0 - yyv21360 := yyv1360 - yyrl1360, yyrt1360 = z.DecInferLen(yyl1360, z.DecBasicHandle().MaxInitLen, 744) - if yyrt1360 { - if yyrl1360 <= cap(yyv1360) { - yyv1360 = yyv1360[:yyrl1360] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 856) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv1360 = make([]ReplicaSet, yyrl1360) + yyv1 = make([]ReplicaSet, yyrl1) } } else { - yyv1360 = make([]ReplicaSet, yyrl1360) + yyv1 = make([]ReplicaSet, yyrl1) } - yyc1360 = true - yyrr1360 = len(yyv1360) - if yyrg1360 { - copy(yyv1360, yyv21360) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1360 != len(yyv1360) { - yyv1360 = yyv1360[:yyl1360] - yyc1360 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1360 := 0 - for ; yyj1360 < yyrr1360; yyj1360++ { - yyh1360.ElemContainerState(yyj1360) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1360[yyj1360] = ReplicaSet{} + yyv1[yyj1] = ReplicaSet{} } else { - yyv1361 := &yyv1360[yyj1360] - yyv1361.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1360 { - for ; yyj1360 < yyl1360; yyj1360++ { - yyv1360 = append(yyv1360, ReplicaSet{}) - yyh1360.ElemContainerState(yyj1360) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ReplicaSet{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1360[yyj1360] = ReplicaSet{} + yyv1[yyj1] = ReplicaSet{} } else { - yyv1362 := &yyv1360[yyj1360] - yyv1362.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1360 := 0 - for ; !r.CheckBreak(); yyj1360++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1360 >= len(yyv1360) { - yyv1360 = append(yyv1360, ReplicaSet{}) // var yyz1360 ReplicaSet - yyc1360 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ReplicaSet{}) // var yyz1 ReplicaSet + yyc1 = true } - yyh1360.ElemContainerState(yyj1360) - if yyj1360 < len(yyv1360) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1360[yyj1360] = ReplicaSet{} + yyv1[yyj1] = ReplicaSet{} } else { - yyv1363 := &yyv1360[yyj1360] - yyv1363.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -16944,112 +20551,118 @@ func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decode } } - if yyj1360 < len(yyv1360) { - yyv1360 = yyv1360[:yyj1360] - yyc1360 = true - } else if yyj1360 == 0 && yyv1360 == nil { - yyv1360 = []ReplicaSet{} - yyc1360 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ReplicaSet{} + yyc1 = true } } - yyh1360.End() - if yyc1360 { - *v = yyv1360 + yyh1.End() + if yyc1 { + *v = yyv1 } } -func (x codecSelfer1234) encSliceapi_Capability(v []pkg2_api.Capability, e *codec1978.Encoder) { +func (x codecSelfer1234) encSliceReplicaSetCondition(v []ReplicaSetCondition, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1364 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1365 := z.EncBinary() - _ = yym1365 - if false { - } else if z.HasExtensions() && z.EncExt(yyv1364) { - } else { - r.EncodeString(codecSelferC_UTF81234, string(yyv1364)) - } + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSliceapi_Capability(v *[]pkg2_api.Capability, d *codec1978.Decoder) { +func (x codecSelfer1234) decSliceReplicaSetCondition(v *[]ReplicaSetCondition, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1366 := *v - yyh1366, yyl1366 := z.DecSliceHelperStart() - var yyc1366 bool - if yyl1366 == 0 { - if yyv1366 == nil { - yyv1366 = []pkg2_api.Capability{} - yyc1366 = true - } else if len(yyv1366) != 0 { - yyv1366 = yyv1366[:0] - yyc1366 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []ReplicaSetCondition{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1366 > 0 { - var yyrr1366, yyrl1366 int - var yyrt1366 bool - if yyl1366 > cap(yyv1366) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrl1366, yyrt1366 = z.DecInferLen(yyl1366, z.DecBasicHandle().MaxInitLen, 16) - if yyrt1366 { - if yyrl1366 <= cap(yyv1366) { - yyv1366 = yyv1366[:yyrl1366] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 88) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv1366 = make([]pkg2_api.Capability, yyrl1366) + yyv1 = make([]ReplicaSetCondition, yyrl1) } } else { - yyv1366 = make([]pkg2_api.Capability, yyrl1366) + yyv1 = make([]ReplicaSetCondition, yyrl1) } - yyc1366 = true - yyrr1366 = len(yyv1366) - } else if yyl1366 != len(yyv1366) { - yyv1366 = yyv1366[:yyl1366] - yyc1366 = true + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1366 := 0 - for ; yyj1366 < yyrr1366; yyj1366++ { - yyh1366.ElemContainerState(yyj1366) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1366[yyj1366] = "" + yyv1[yyj1] = ReplicaSetCondition{} } else { - yyv1366[yyj1366] = pkg2_api.Capability(r.DecodeString()) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1366 { - for ; yyj1366 < yyl1366; yyj1366++ { - yyv1366 = append(yyv1366, "") - yyh1366.ElemContainerState(yyj1366) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ReplicaSetCondition{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1366[yyj1366] = "" + yyv1[yyj1] = ReplicaSetCondition{} } else { - yyv1366[yyj1366] = pkg2_api.Capability(r.DecodeString()) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1366 := 0 - for ; !r.CheckBreak(); yyj1366++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1366 >= len(yyv1366) { - yyv1366 = append(yyv1366, "") // var yyz1366 pkg2_api.Capability - yyc1366 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ReplicaSetCondition{}) // var yyz1 ReplicaSetCondition + yyc1 = true } - yyh1366.ElemContainerState(yyj1366) - if yyj1366 < len(yyv1366) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1366[yyj1366] = "" + yyv1[yyj1] = ReplicaSetCondition{} } else { - yyv1366[yyj1366] = pkg2_api.Capability(r.DecodeString()) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -17057,17 +20670,131 @@ func (x codecSelfer1234) decSliceapi_Capability(v *[]pkg2_api.Capability, d *cod } } - if yyj1366 < len(yyv1366) { - yyv1366 = yyv1366[:yyj1366] - yyc1366 = true - } else if yyj1366 == 0 && yyv1366 == nil { - yyv1366 = []pkg2_api.Capability{} - yyc1366 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ReplicaSetCondition{} + yyc1 = true } } - yyh1366.End() - if yyc1366 { - *v = yyv1366 + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSlicev1_Capability(v []pkg4_v1.Capability, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yysf2 := &yyv1 + yysf2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg4_v1.Capability, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []pkg4_v1.Capability{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]pkg4_v1.Capability, yyrl1) + } + } else { + yyv1 = make([]pkg4_v1.Capability, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = "" + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, "") + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = "" + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, "") // var yyz1 pkg4_v1.Capability + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = "" + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []pkg4_v1.Capability{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -17076,9 +20803,9 @@ func (x codecSelfer1234) encSliceFSType(v []FSType, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1370 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv1370.CodecEncodeSelf(e) + yyv1.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17088,75 +20815,81 @@ func (x codecSelfer1234) decSliceFSType(v *[]FSType, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1371 := *v - yyh1371, yyl1371 := z.DecSliceHelperStart() - var yyc1371 bool - if yyl1371 == 0 { - if yyv1371 == nil { - yyv1371 = []FSType{} - yyc1371 = true - } else if len(yyv1371) != 0 { - yyv1371 = yyv1371[:0] - yyc1371 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []FSType{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1371 > 0 { - var yyrr1371, yyrl1371 int - var yyrt1371 bool - if yyl1371 > cap(yyv1371) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrl1371, yyrt1371 = z.DecInferLen(yyl1371, z.DecBasicHandle().MaxInitLen, 16) - if yyrt1371 { - if yyrl1371 <= cap(yyv1371) { - yyv1371 = yyv1371[:yyrl1371] + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv1371 = make([]FSType, yyrl1371) + yyv1 = make([]FSType, yyrl1) } } else { - yyv1371 = make([]FSType, yyrl1371) + yyv1 = make([]FSType, yyrl1) } - yyc1371 = true - yyrr1371 = len(yyv1371) - } else if yyl1371 != len(yyv1371) { - yyv1371 = yyv1371[:yyl1371] - yyc1371 = true + yyc1 = true + yyrr1 = len(yyv1) + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1371 := 0 - for ; yyj1371 < yyrr1371; yyj1371++ { - yyh1371.ElemContainerState(yyj1371) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1371[yyj1371] = "" + yyv1[yyj1] = "" } else { - yyv1371[yyj1371] = FSType(r.DecodeString()) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1371 { - for ; yyj1371 < yyl1371; yyj1371++ { - yyv1371 = append(yyv1371, "") - yyh1371.ElemContainerState(yyj1371) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, "") + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1371[yyj1371] = "" + yyv1[yyj1] = "" } else { - yyv1371[yyj1371] = FSType(r.DecodeString()) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1371 := 0 - for ; !r.CheckBreak(); yyj1371++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1371 >= len(yyv1371) { - yyv1371 = append(yyv1371, "") // var yyz1371 FSType - yyc1371 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, "") // var yyz1 FSType + yyc1 = true } - yyh1371.ElemContainerState(yyj1371) - if yyj1371 < len(yyv1371) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1371[yyj1371] = "" + yyv1[yyj1] = "" } else { - yyv1371[yyj1371] = FSType(r.DecodeString()) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -17164,17 +20897,17 @@ func (x codecSelfer1234) decSliceFSType(v *[]FSType, d *codec1978.Decoder) { } } - if yyj1371 < len(yyv1371) { - yyv1371 = yyv1371[:yyj1371] - yyc1371 = true - } else if yyj1371 == 0 && yyv1371 == nil { - yyv1371 = []FSType{} - yyc1371 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []FSType{} + yyc1 = true } } - yyh1371.End() - if yyc1371 { - *v = yyv1371 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -17183,10 +20916,10 @@ func (x codecSelfer1234) encSliceHostPortRange(v []HostPortRange, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1375 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1376 := &yyv1375 - yy1376.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17196,83 +20929,86 @@ func (x codecSelfer1234) decSliceHostPortRange(v *[]HostPortRange, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1377 := *v - yyh1377, yyl1377 := z.DecSliceHelperStart() - var yyc1377 bool - if yyl1377 == 0 { - if yyv1377 == nil { - yyv1377 = []HostPortRange{} - yyc1377 = true - } else if len(yyv1377) != 0 { - yyv1377 = yyv1377[:0] - yyc1377 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []HostPortRange{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1377 > 0 { - var yyrr1377, yyrl1377 int - var yyrt1377 bool - if yyl1377 > cap(yyv1377) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1377 := len(yyv1377) > 0 - yyv21377 := yyv1377 - yyrl1377, yyrt1377 = z.DecInferLen(yyl1377, z.DecBasicHandle().MaxInitLen, 16) - if yyrt1377 { - if yyrl1377 <= cap(yyv1377) { - yyv1377 = yyv1377[:yyrl1377] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv1377 = make([]HostPortRange, yyrl1377) + yyv1 = make([]HostPortRange, yyrl1) } } else { - yyv1377 = make([]HostPortRange, yyrl1377) + yyv1 = make([]HostPortRange, yyrl1) } - yyc1377 = true - yyrr1377 = len(yyv1377) - if yyrg1377 { - copy(yyv1377, yyv21377) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1377 != len(yyv1377) { - yyv1377 = yyv1377[:yyl1377] - yyc1377 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1377 := 0 - for ; yyj1377 < yyrr1377; yyj1377++ { - yyh1377.ElemContainerState(yyj1377) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1377[yyj1377] = HostPortRange{} + yyv1[yyj1] = HostPortRange{} } else { - yyv1378 := &yyv1377[yyj1377] - yyv1378.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1377 { - for ; yyj1377 < yyl1377; yyj1377++ { - yyv1377 = append(yyv1377, HostPortRange{}) - yyh1377.ElemContainerState(yyj1377) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, HostPortRange{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1377[yyj1377] = HostPortRange{} + yyv1[yyj1] = HostPortRange{} } else { - yyv1379 := &yyv1377[yyj1377] - yyv1379.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1377 := 0 - for ; !r.CheckBreak(); yyj1377++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1377 >= len(yyv1377) { - yyv1377 = append(yyv1377, HostPortRange{}) // var yyz1377 HostPortRange - yyc1377 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, HostPortRange{}) // var yyz1 HostPortRange + yyc1 = true } - yyh1377.ElemContainerState(yyj1377) - if yyj1377 < len(yyv1377) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1377[yyj1377] = HostPortRange{} + yyv1[yyj1] = HostPortRange{} } else { - yyv1380 := &yyv1377[yyj1377] - yyv1380.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -17280,17 +21016,17 @@ func (x codecSelfer1234) decSliceHostPortRange(v *[]HostPortRange, d *codec1978. } } - if yyj1377 < len(yyv1377) { - yyv1377 = yyv1377[:yyj1377] - yyc1377 = true - } else if yyj1377 == 0 && yyv1377 == nil { - yyv1377 = []HostPortRange{} - yyc1377 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []HostPortRange{} + yyc1 = true } } - yyh1377.End() - if yyc1377 { - *v = yyv1377 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -17299,10 +21035,10 @@ func (x codecSelfer1234) encSliceIDRange(v []IDRange, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1381 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1382 := &yyv1381 - yy1382.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17312,83 +21048,86 @@ func (x codecSelfer1234) decSliceIDRange(v *[]IDRange, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1383 := *v - yyh1383, yyl1383 := z.DecSliceHelperStart() - var yyc1383 bool - if yyl1383 == 0 { - if yyv1383 == nil { - yyv1383 = []IDRange{} - yyc1383 = true - } else if len(yyv1383) != 0 { - yyv1383 = yyv1383[:0] - yyc1383 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []IDRange{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1383 > 0 { - var yyrr1383, yyrl1383 int - var yyrt1383 bool - if yyl1383 > cap(yyv1383) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1383 := len(yyv1383) > 0 - yyv21383 := yyv1383 - yyrl1383, yyrt1383 = z.DecInferLen(yyl1383, z.DecBasicHandle().MaxInitLen, 16) - if yyrt1383 { - if yyrl1383 <= cap(yyv1383) { - yyv1383 = yyv1383[:yyrl1383] + 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 { - yyv1383 = make([]IDRange, yyrl1383) + yyv1 = make([]IDRange, yyrl1) } } else { - yyv1383 = make([]IDRange, yyrl1383) + yyv1 = make([]IDRange, yyrl1) } - yyc1383 = true - yyrr1383 = len(yyv1383) - if yyrg1383 { - copy(yyv1383, yyv21383) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1383 != len(yyv1383) { - yyv1383 = yyv1383[:yyl1383] - yyc1383 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1383 := 0 - for ; yyj1383 < yyrr1383; yyj1383++ { - yyh1383.ElemContainerState(yyj1383) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1383[yyj1383] = IDRange{} + yyv1[yyj1] = IDRange{} } else { - yyv1384 := &yyv1383[yyj1383] - yyv1384.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1383 { - for ; yyj1383 < yyl1383; yyj1383++ { - yyv1383 = append(yyv1383, IDRange{}) - yyh1383.ElemContainerState(yyj1383) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, IDRange{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1383[yyj1383] = IDRange{} + yyv1[yyj1] = IDRange{} } else { - yyv1385 := &yyv1383[yyj1383] - yyv1385.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1383 := 0 - for ; !r.CheckBreak(); yyj1383++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1383 >= len(yyv1383) { - yyv1383 = append(yyv1383, IDRange{}) // var yyz1383 IDRange - yyc1383 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, IDRange{}) // var yyz1 IDRange + yyc1 = true } - yyh1383.ElemContainerState(yyj1383) - if yyj1383 < len(yyv1383) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1383[yyj1383] = IDRange{} + yyv1[yyj1] = IDRange{} } else { - yyv1386 := &yyv1383[yyj1383] - yyv1386.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -17396,17 +21135,17 @@ func (x codecSelfer1234) decSliceIDRange(v *[]IDRange, d *codec1978.Decoder) { } } - if yyj1383 < len(yyv1383) { - yyv1383 = yyv1383[:yyj1383] - yyc1383 = true - } else if yyj1383 == 0 && yyv1383 == nil { - yyv1383 = []IDRange{} - yyc1383 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []IDRange{} + yyc1 = true } } - yyh1383.End() - if yyc1383 { - *v = yyv1383 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -17415,10 +21154,10 @@ func (x codecSelfer1234) encSlicePodSecurityPolicy(v []PodSecurityPolicy, e *cod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1387 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1388 := &yyv1387 - yy1388.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17428,83 +21167,86 @@ func (x codecSelfer1234) decSlicePodSecurityPolicy(v *[]PodSecurityPolicy, d *co z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1389 := *v - yyh1389, yyl1389 := z.DecSliceHelperStart() - var yyc1389 bool - if yyl1389 == 0 { - if yyv1389 == nil { - yyv1389 = []PodSecurityPolicy{} - yyc1389 = true - } else if len(yyv1389) != 0 { - yyv1389 = yyv1389[:0] - yyc1389 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []PodSecurityPolicy{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1389 > 0 { - var yyrr1389, yyrl1389 int - var yyrt1389 bool - if yyl1389 > cap(yyv1389) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1389 := len(yyv1389) > 0 - yyv21389 := yyv1389 - yyrl1389, yyrt1389 = z.DecInferLen(yyl1389, z.DecBasicHandle().MaxInitLen, 552) - if yyrt1389 { - if yyrl1389 <= cap(yyv1389) { - yyv1389 = yyv1389[:yyrl1389] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 552) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv1389 = make([]PodSecurityPolicy, yyrl1389) + yyv1 = make([]PodSecurityPolicy, yyrl1) } } else { - yyv1389 = make([]PodSecurityPolicy, yyrl1389) + yyv1 = make([]PodSecurityPolicy, yyrl1) } - yyc1389 = true - yyrr1389 = len(yyv1389) - if yyrg1389 { - copy(yyv1389, yyv21389) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1389 != len(yyv1389) { - yyv1389 = yyv1389[:yyl1389] - yyc1389 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1389 := 0 - for ; yyj1389 < yyrr1389; yyj1389++ { - yyh1389.ElemContainerState(yyj1389) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1389[yyj1389] = PodSecurityPolicy{} + yyv1[yyj1] = PodSecurityPolicy{} } else { - yyv1390 := &yyv1389[yyj1389] - yyv1390.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1389 { - for ; yyj1389 < yyl1389; yyj1389++ { - yyv1389 = append(yyv1389, PodSecurityPolicy{}) - yyh1389.ElemContainerState(yyj1389) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, PodSecurityPolicy{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1389[yyj1389] = PodSecurityPolicy{} + yyv1[yyj1] = PodSecurityPolicy{} } else { - yyv1391 := &yyv1389[yyj1389] - yyv1391.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1389 := 0 - for ; !r.CheckBreak(); yyj1389++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1389 >= len(yyv1389) { - yyv1389 = append(yyv1389, PodSecurityPolicy{}) // var yyz1389 PodSecurityPolicy - yyc1389 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, PodSecurityPolicy{}) // var yyz1 PodSecurityPolicy + yyc1 = true } - yyh1389.ElemContainerState(yyj1389) - if yyj1389 < len(yyv1389) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1389[yyj1389] = PodSecurityPolicy{} + yyv1[yyj1] = PodSecurityPolicy{} } else { - yyv1392 := &yyv1389[yyj1389] - yyv1392.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -17512,17 +21254,17 @@ func (x codecSelfer1234) decSlicePodSecurityPolicy(v *[]PodSecurityPolicy, d *co } } - if yyj1389 < len(yyv1389) { - yyv1389 = yyv1389[:yyj1389] - yyc1389 = true - } else if yyj1389 == 0 && yyv1389 == nil { - yyv1389 = []PodSecurityPolicy{} - yyc1389 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []PodSecurityPolicy{} + yyc1 = true } } - yyh1389.End() - if yyc1389 { - *v = yyv1389 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -17531,10 +21273,10 @@ func (x codecSelfer1234) encSliceNetworkPolicyIngressRule(v []NetworkPolicyIngre z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1393 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1394 := &yyv1393 - yy1394.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17544,83 +21286,86 @@ func (x codecSelfer1234) decSliceNetworkPolicyIngressRule(v *[]NetworkPolicyIngr z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1395 := *v - yyh1395, yyl1395 := z.DecSliceHelperStart() - var yyc1395 bool - if yyl1395 == 0 { - if yyv1395 == nil { - yyv1395 = []NetworkPolicyIngressRule{} - yyc1395 = true - } else if len(yyv1395) != 0 { - yyv1395 = yyv1395[:0] - yyc1395 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []NetworkPolicyIngressRule{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1395 > 0 { - var yyrr1395, yyrl1395 int - var yyrt1395 bool - if yyl1395 > cap(yyv1395) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1395 := len(yyv1395) > 0 - yyv21395 := yyv1395 - yyrl1395, yyrt1395 = z.DecInferLen(yyl1395, z.DecBasicHandle().MaxInitLen, 48) - if yyrt1395 { - if yyrl1395 <= cap(yyv1395) { - yyv1395 = yyv1395[:yyrl1395] + 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 { - yyv1395 = make([]NetworkPolicyIngressRule, yyrl1395) + yyv1 = make([]NetworkPolicyIngressRule, yyrl1) } } else { - yyv1395 = make([]NetworkPolicyIngressRule, yyrl1395) + yyv1 = make([]NetworkPolicyIngressRule, yyrl1) } - yyc1395 = true - yyrr1395 = len(yyv1395) - if yyrg1395 { - copy(yyv1395, yyv21395) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1395 != len(yyv1395) { - yyv1395 = yyv1395[:yyl1395] - yyc1395 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1395 := 0 - for ; yyj1395 < yyrr1395; yyj1395++ { - yyh1395.ElemContainerState(yyj1395) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1395[yyj1395] = NetworkPolicyIngressRule{} + yyv1[yyj1] = NetworkPolicyIngressRule{} } else { - yyv1396 := &yyv1395[yyj1395] - yyv1396.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1395 { - for ; yyj1395 < yyl1395; yyj1395++ { - yyv1395 = append(yyv1395, NetworkPolicyIngressRule{}) - yyh1395.ElemContainerState(yyj1395) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, NetworkPolicyIngressRule{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1395[yyj1395] = NetworkPolicyIngressRule{} + yyv1[yyj1] = NetworkPolicyIngressRule{} } else { - yyv1397 := &yyv1395[yyj1395] - yyv1397.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1395 := 0 - for ; !r.CheckBreak(); yyj1395++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1395 >= len(yyv1395) { - yyv1395 = append(yyv1395, NetworkPolicyIngressRule{}) // var yyz1395 NetworkPolicyIngressRule - yyc1395 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, NetworkPolicyIngressRule{}) // var yyz1 NetworkPolicyIngressRule + yyc1 = true } - yyh1395.ElemContainerState(yyj1395) - if yyj1395 < len(yyv1395) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1395[yyj1395] = NetworkPolicyIngressRule{} + yyv1[yyj1] = NetworkPolicyIngressRule{} } else { - yyv1398 := &yyv1395[yyj1395] - yyv1398.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -17628,17 +21373,17 @@ func (x codecSelfer1234) decSliceNetworkPolicyIngressRule(v *[]NetworkPolicyIngr } } - if yyj1395 < len(yyv1395) { - yyv1395 = yyv1395[:yyj1395] - yyc1395 = true - } else if yyj1395 == 0 && yyv1395 == nil { - yyv1395 = []NetworkPolicyIngressRule{} - yyc1395 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []NetworkPolicyIngressRule{} + yyc1 = true } } - yyh1395.End() - if yyc1395 { - *v = yyv1395 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -17647,10 +21392,10 @@ func (x codecSelfer1234) encSliceNetworkPolicyPort(v []NetworkPolicyPort, e *cod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1399 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1400 := &yyv1399 - yy1400.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17660,83 +21405,86 @@ func (x codecSelfer1234) decSliceNetworkPolicyPort(v *[]NetworkPolicyPort, d *co z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1401 := *v - yyh1401, yyl1401 := z.DecSliceHelperStart() - var yyc1401 bool - if yyl1401 == 0 { - if yyv1401 == nil { - yyv1401 = []NetworkPolicyPort{} - yyc1401 = true - } else if len(yyv1401) != 0 { - yyv1401 = yyv1401[:0] - yyc1401 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []NetworkPolicyPort{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1401 > 0 { - var yyrr1401, yyrl1401 int - var yyrt1401 bool - if yyl1401 > cap(yyv1401) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1401 := len(yyv1401) > 0 - yyv21401 := yyv1401 - yyrl1401, yyrt1401 = z.DecInferLen(yyl1401, z.DecBasicHandle().MaxInitLen, 16) - if yyrt1401 { - if yyrl1401 <= cap(yyv1401) { - yyv1401 = yyv1401[:yyrl1401] + 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 { - yyv1401 = make([]NetworkPolicyPort, yyrl1401) + yyv1 = make([]NetworkPolicyPort, yyrl1) } } else { - yyv1401 = make([]NetworkPolicyPort, yyrl1401) + yyv1 = make([]NetworkPolicyPort, yyrl1) } - yyc1401 = true - yyrr1401 = len(yyv1401) - if yyrg1401 { - copy(yyv1401, yyv21401) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1401 != len(yyv1401) { - yyv1401 = yyv1401[:yyl1401] - yyc1401 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1401 := 0 - for ; yyj1401 < yyrr1401; yyj1401++ { - yyh1401.ElemContainerState(yyj1401) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1401[yyj1401] = NetworkPolicyPort{} + yyv1[yyj1] = NetworkPolicyPort{} } else { - yyv1402 := &yyv1401[yyj1401] - yyv1402.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1401 { - for ; yyj1401 < yyl1401; yyj1401++ { - yyv1401 = append(yyv1401, NetworkPolicyPort{}) - yyh1401.ElemContainerState(yyj1401) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, NetworkPolicyPort{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1401[yyj1401] = NetworkPolicyPort{} + yyv1[yyj1] = NetworkPolicyPort{} } else { - yyv1403 := &yyv1401[yyj1401] - yyv1403.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1401 := 0 - for ; !r.CheckBreak(); yyj1401++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1401 >= len(yyv1401) { - yyv1401 = append(yyv1401, NetworkPolicyPort{}) // var yyz1401 NetworkPolicyPort - yyc1401 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, NetworkPolicyPort{}) // var yyz1 NetworkPolicyPort + yyc1 = true } - yyh1401.ElemContainerState(yyj1401) - if yyj1401 < len(yyv1401) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1401[yyj1401] = NetworkPolicyPort{} + yyv1[yyj1] = NetworkPolicyPort{} } else { - yyv1404 := &yyv1401[yyj1401] - yyv1404.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -17744,17 +21492,17 @@ func (x codecSelfer1234) decSliceNetworkPolicyPort(v *[]NetworkPolicyPort, d *co } } - if yyj1401 < len(yyv1401) { - yyv1401 = yyv1401[:yyj1401] - yyc1401 = true - } else if yyj1401 == 0 && yyv1401 == nil { - yyv1401 = []NetworkPolicyPort{} - yyc1401 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []NetworkPolicyPort{} + yyc1 = true } } - yyh1401.End() - if yyc1401 { - *v = yyv1401 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -17763,10 +21511,10 @@ func (x codecSelfer1234) encSliceNetworkPolicyPeer(v []NetworkPolicyPeer, e *cod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1405 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1406 := &yyv1405 - yy1406.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17776,83 +21524,86 @@ func (x codecSelfer1234) decSliceNetworkPolicyPeer(v *[]NetworkPolicyPeer, d *co z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1407 := *v - yyh1407, yyl1407 := z.DecSliceHelperStart() - var yyc1407 bool - if yyl1407 == 0 { - if yyv1407 == nil { - yyv1407 = []NetworkPolicyPeer{} - yyc1407 = true - } else if len(yyv1407) != 0 { - yyv1407 = yyv1407[:0] - yyc1407 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []NetworkPolicyPeer{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1407 > 0 { - var yyrr1407, yyrl1407 int - var yyrt1407 bool - if yyl1407 > cap(yyv1407) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1407 := len(yyv1407) > 0 - yyv21407 := yyv1407 - yyrl1407, yyrt1407 = z.DecInferLen(yyl1407, z.DecBasicHandle().MaxInitLen, 16) - if yyrt1407 { - if yyrl1407 <= cap(yyv1407) { - yyv1407 = yyv1407[:yyrl1407] + 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 { - yyv1407 = make([]NetworkPolicyPeer, yyrl1407) + yyv1 = make([]NetworkPolicyPeer, yyrl1) } } else { - yyv1407 = make([]NetworkPolicyPeer, yyrl1407) + yyv1 = make([]NetworkPolicyPeer, yyrl1) } - yyc1407 = true - yyrr1407 = len(yyv1407) - if yyrg1407 { - copy(yyv1407, yyv21407) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1407 != len(yyv1407) { - yyv1407 = yyv1407[:yyl1407] - yyc1407 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1407 := 0 - for ; yyj1407 < yyrr1407; yyj1407++ { - yyh1407.ElemContainerState(yyj1407) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1407[yyj1407] = NetworkPolicyPeer{} + yyv1[yyj1] = NetworkPolicyPeer{} } else { - yyv1408 := &yyv1407[yyj1407] - yyv1408.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1407 { - for ; yyj1407 < yyl1407; yyj1407++ { - yyv1407 = append(yyv1407, NetworkPolicyPeer{}) - yyh1407.ElemContainerState(yyj1407) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, NetworkPolicyPeer{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1407[yyj1407] = NetworkPolicyPeer{} + yyv1[yyj1] = NetworkPolicyPeer{} } else { - yyv1409 := &yyv1407[yyj1407] - yyv1409.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1407 := 0 - for ; !r.CheckBreak(); yyj1407++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1407 >= len(yyv1407) { - yyv1407 = append(yyv1407, NetworkPolicyPeer{}) // var yyz1407 NetworkPolicyPeer - yyc1407 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, NetworkPolicyPeer{}) // var yyz1 NetworkPolicyPeer + yyc1 = true } - yyh1407.ElemContainerState(yyj1407) - if yyj1407 < len(yyv1407) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1407[yyj1407] = NetworkPolicyPeer{} + yyv1[yyj1] = NetworkPolicyPeer{} } else { - yyv1410 := &yyv1407[yyj1407] - yyv1410.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -17860,17 +21611,17 @@ func (x codecSelfer1234) decSliceNetworkPolicyPeer(v *[]NetworkPolicyPeer, d *co } } - if yyj1407 < len(yyv1407) { - yyv1407 = yyv1407[:yyj1407] - yyc1407 = true - } else if yyj1407 == 0 && yyv1407 == nil { - yyv1407 = []NetworkPolicyPeer{} - yyc1407 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []NetworkPolicyPeer{} + yyc1 = true } } - yyh1407.End() - if yyc1407 { - *v = yyv1407 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -17879,10 +21630,10 @@ func (x codecSelfer1234) encSliceNetworkPolicy(v []NetworkPolicy, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv1411 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1412 := &yyv1411 - yy1412.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -17892,83 +21643,86 @@ func (x codecSelfer1234) decSliceNetworkPolicy(v *[]NetworkPolicy, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1413 := *v - yyh1413, yyl1413 := z.DecSliceHelperStart() - var yyc1413 bool - if yyl1413 == 0 { - if yyv1413 == nil { - yyv1413 = []NetworkPolicy{} - yyc1413 = true - } else if len(yyv1413) != 0 { - yyv1413 = yyv1413[:0] - yyc1413 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []NetworkPolicy{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl1413 > 0 { - var yyrr1413, yyrl1413 int - var yyrt1413 bool - if yyl1413 > cap(yyv1413) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg1413 := len(yyv1413) > 0 - yyv21413 := yyv1413 - yyrl1413, yyrt1413 = z.DecInferLen(yyl1413, z.DecBasicHandle().MaxInitLen, 312) - if yyrt1413 { - if yyrl1413 <= cap(yyv1413) { - yyv1413 = yyv1413[:yyrl1413] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 312) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv1413 = make([]NetworkPolicy, yyrl1413) + yyv1 = make([]NetworkPolicy, yyrl1) } } else { - yyv1413 = make([]NetworkPolicy, yyrl1413) + yyv1 = make([]NetworkPolicy, yyrl1) } - yyc1413 = true - yyrr1413 = len(yyv1413) - if yyrg1413 { - copy(yyv1413, yyv21413) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl1413 != len(yyv1413) { - yyv1413 = yyv1413[:yyl1413] - yyc1413 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj1413 := 0 - for ; yyj1413 < yyrr1413; yyj1413++ { - yyh1413.ElemContainerState(yyj1413) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1413[yyj1413] = NetworkPolicy{} + yyv1[yyj1] = NetworkPolicy{} } else { - yyv1414 := &yyv1413[yyj1413] - yyv1414.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt1413 { - for ; yyj1413 < yyl1413; yyj1413++ { - yyv1413 = append(yyv1413, NetworkPolicy{}) - yyh1413.ElemContainerState(yyj1413) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, NetworkPolicy{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1413[yyj1413] = NetworkPolicy{} + yyv1[yyj1] = NetworkPolicy{} } else { - yyv1415 := &yyv1413[yyj1413] - yyv1415.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj1413 := 0 - for ; !r.CheckBreak(); yyj1413++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj1413 >= len(yyv1413) { - yyv1413 = append(yyv1413, NetworkPolicy{}) // var yyz1413 NetworkPolicy - yyc1413 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, NetworkPolicy{}) // var yyz1 NetworkPolicy + yyc1 = true } - yyh1413.ElemContainerState(yyj1413) - if yyj1413 < len(yyv1413) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1413[yyj1413] = NetworkPolicy{} + yyv1[yyj1] = NetworkPolicy{} } else { - yyv1416 := &yyv1413[yyj1413] - yyv1416.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -17976,16 +21730,16 @@ func (x codecSelfer1234) decSliceNetworkPolicy(v *[]NetworkPolicy, d *codec1978. } } - if yyj1413 < len(yyv1413) { - yyv1413 = yyv1413[:yyj1413] - yyc1413 = true - } else if yyj1413 == 0 && yyv1413 == nil { - yyv1413 = []NetworkPolicy{} - yyc1413 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []NetworkPolicy{} + yyc1 = true } } - yyh1413.End() - if yyc1413 { - *v = yyv1413 + yyh1.End() + if yyc1 { + *v = yyv1 } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go similarity index 66% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/types.go rename to vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go index 1b916ecaf..43dd2a9b0 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/types.go +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go @@ -17,15 +17,16 @@ limitations under the License. package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/api/resource" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/util/intstr" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/client-go/pkg/api/v1" ) // describes the attributes of a scale subresource type ScaleSpec struct { // desired number of instances for the scaled object. + // +optional Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` } @@ -34,7 +35,8 @@ type ScaleStatus struct { // actual number of observed instances of the scaled object. Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"` - // label query over pods that should match the replicas count. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors + // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"` // label selector for pods that should match the replicas count. This is a serializated @@ -42,7 +44,8 @@ type ScaleStatus struct { // avoid introspection in the clients. The string will be in the same format as the // query-param syntax. If the target type only supports map-based selectors, both this // field and map-based selector field are populated. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional TargetSelector string `json:"targetSelector,omitempty" protobuf:"bytes,3,opt,name=targetSelector"` } @@ -51,38 +54,23 @@ type ScaleStatus struct { // represents a scaling request for a resource. type Scale struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + // +optional Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only. + // +optional Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // Dummy definition type ReplicationControllerDummy struct { - unversioned.TypeMeta `json:",inline"` -} - -// SubresourceReference contains enough information to let you inspect or modify the referred subresource. -type SubresourceReference struct { - // Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds - Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` - // Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names - Name string `json:"name,omitempty" protobuf:"bytes,2,opt,name=name"` - // API version of the referent - APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"` - // Subresource name of the referent - Subresource string `json:"subresource,omitempty" protobuf:"bytes,4,opt,name=subresource"` -} - -type CPUTargetUtilization struct { - // fraction of the requested CPU that should be utilized/used, - // e.g. 70 means that 70% of the requested CPU should be in use. - TargetPercentage int32 `json:"targetPercentage" protobuf:"varint,1,opt,name=targetPercentage"` + metav1.TypeMeta `json:",inline"` } // Alpha-level support for Custom Metrics in HPA (as annotations). @@ -108,87 +96,34 @@ type CustomMetricCurrentStatusList struct { Items []CustomMetricCurrentStatus `json:"items" protobuf:"bytes,1,rep,name=items"` } -// specification of a horizontal pod autoscaler. -type HorizontalPodAutoscalerSpec struct { - // reference to Scale subresource; horizontal pod autoscaler will learn the current resource consumption from its status, - // and will set the desired number of pods by modifying its spec. - ScaleRef SubresourceReference `json:"scaleRef" protobuf:"bytes,1,opt,name=scaleRef"` - // lower limit for the number of pods that can be set by the autoscaler, default 1. - MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"` - // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. - MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"` - // target average CPU utilization (represented as a percentage of requested CPU) over all the pods; - // if not specified it defaults to the target CPU utilization at 80% of the requested resources. - CPUUtilization *CPUTargetUtilization `json:"cpuUtilization,omitempty" protobuf:"bytes,4,opt,name=cpuUtilization"` -} - -// current status of a horizontal pod autoscaler -type HorizontalPodAutoscalerStatus struct { - // most recent generation observed by this autoscaler. - ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` - - // last time the HorizontalPodAutoscaler scaled the number of pods; - // used by the autoscaler to control how often the number of pods is changed. - LastScaleTime *unversioned.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"` - - // current number of replicas of pods managed by this autoscaler. - CurrentReplicas int32 `json:"currentReplicas" protobuf:"varint,3,opt,name=currentReplicas"` - - // desired number of replicas of pods managed by this autoscaler. - DesiredReplicas int32 `json:"desiredReplicas" protobuf:"varint,4,opt,name=desiredReplicas"` - - // current average CPU utilization over all pods, represented as a percentage of requested CPU, - // e.g. 70 means that an average pod is using now 70% of its requested CPU. - CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty" protobuf:"varint,5,opt,name=currentCPUUtilizationPercentage"` -} - -// configuration of a horizontal pod autoscaler. -type HorizontalPodAutoscaler struct { - unversioned.TypeMeta `json:",inline"` - // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. - Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // current information about the autoscaler. - Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// list of horizontal pod autoscaler objects. -type HorizontalPodAutoscalerList struct { - unversioned.TypeMeta `json:",inline"` - // Standard list metadata. - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // list of horizontal pod autoscaler objects. - Items []HorizontalPodAutoscaler `json:"items" protobuf:"bytes,2,rep,name=items"` -} - // +genclient=true // +nonNamespaced=true // A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource // types to the API. It consists of one or more Versions of the api. type ThirdPartyResource struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Description is the description of this object. + // +optional Description string `json:"description,omitempty" protobuf:"bytes,2,opt,name=description"` // Versions are versions for this third party object + // +optional Versions []APIVersion `json:"versions,omitempty" protobuf:"bytes,3,rep,name=versions"` } // ThirdPartyResourceList is a list of ThirdPartyResources. type ThirdPartyResourceList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard list metadata. - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is the list of ThirdPartyResources. Items []ThirdPartyResource `json:"items" protobuf:"bytes,2,rep,name=items"` @@ -197,16 +132,19 @@ type ThirdPartyResourceList struct { // An APIVersion represents a single concrete version of an object model. type APIVersion struct { // Name of this version (e.g. 'v1'). + // +optional Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` } // An internal object, used for versioned storage in etcd. Not exposed to the end user. type ThirdPartyResourceData struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object metadata. - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Data is the raw JSON data for this data. + // +optional Data []byte `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"` } @@ -214,14 +152,17 @@ type ThirdPartyResourceData struct { // Deployment enables declarative updates for Pods and ReplicaSets. type Deployment struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object metadata. - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the Deployment. + // +optional Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Most recently observed status of the Deployment. + // +optional Status DeploymentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -229,40 +170,58 @@ type Deployment struct { type DeploymentSpec struct { // Number of desired pods. This is a pointer to distinguish between explicit // zero and not specified. Defaults to 1. + // +optional Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` // Label selector for pods. Existing ReplicaSets whose pods are // selected by this will be the ones affected by this deployment. - Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` + // +optional + Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` // Template describes the pods that will be created. Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"` // The deployment strategy to use to replace existing pods with new ones. + // +optional Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"` // Minimum number of seconds for which a newly created pod should be ready // without any of its container crashing, for it to be considered available. // Defaults to 0 (pod will be considered available as soon as it is ready) + // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,5,opt,name=minReadySeconds"` // The number of old ReplicaSets to retain to allow rollback. // This is a pointer to distinguish between explicit zero and not specified. + // +optional RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"` // Indicates that the deployment is paused and will not be processed by the // deployment controller. + // +optional Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"` + // The config this deployment is rolling back to. Will be cleared after rollback is done. + // +optional RollbackTo *RollbackConfig `json:"rollbackTo,omitempty" protobuf:"bytes,8,opt,name=rollbackTo"` + + // The maximum time in seconds for a deployment to make progress before it + // is considered to be failed. The deployment controller will continue to + // process failed deployments and a condition with a ProgressDeadlineExceeded + // reason will be surfaced in the deployment status. Once autoRollback is + // implemented, the deployment controller will automatically rollback failed + // deployments. Note that progress will not be estimated during the time a + // deployment is paused. This is not set by default. + ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"` } // DeploymentRollback stores the information required to rollback a deployment. type DeploymentRollback struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Required: This must match the Name of a deployment. Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // The annotations to be updated to a deployment + // +optional UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty" protobuf:"bytes,2,rep,name=updatedAnnotations"` // The config of this deployment rollback. RollbackTo RollbackConfig `json:"rollbackTo" protobuf:"bytes,3,opt,name=rollbackTo"` @@ -270,6 +229,7 @@ type DeploymentRollback struct { type RollbackConfig struct { // The revision to rollback to. If set to 0, rollbck to the last revision. + // +optional Revision int64 `json:"revision,omitempty" protobuf:"varint,1,opt,name=revision"` } @@ -283,6 +243,7 @@ const ( // DeploymentStrategy describes how to replace existing pods with new ones. type DeploymentStrategy struct { // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. + // +optional Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"` // Rolling update config params. Present only if DeploymentStrategyType = @@ -290,6 +251,7 @@ type DeploymentStrategy struct { //--- // TODO: Update this to follow our convention for oneOf, whatever we decide it // to be. + // +optional RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"` } @@ -307,7 +269,7 @@ const ( type RollingUpdateDeployment struct { // The maximum number of pods that can be unavailable during the update. // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - // Absolute number is calculated from percentage by rounding up. + // Absolute number is calculated from percentage by rounding down. // This can not be 0 if MaxSurge is 0. // By default, a fixed value of 1 is used. // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods @@ -315,6 +277,7 @@ type RollingUpdateDeployment struct { // can be scaled down further, followed by scaling up the new RC, ensuring // that the total number of pods available at all times during the update is at // least 70% of desired pods. + // +optional MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"` // The maximum number of pods that can be scheduled above the desired number of @@ -328,49 +291,97 @@ type RollingUpdateDeployment struct { // 130% of desired pods. Once old pods have been killed, // new RC can be scaled up further, ensuring that total number of pods running // at any time during the update is atmost 130% of desired pods. + // +optional MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"` } // DeploymentStatus is the most recently observed status of the Deployment. type DeploymentStatus struct { // The generation observed by the deployment controller. + // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` // Total number of non-terminated pods targeted by this deployment (their labels match the selector). + // +optional Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"` // Total number of non-terminated pods targeted by this deployment that have the desired template spec. + // +optional UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"` + // Total number of ready pods targeted by this deployment. + // +optional + ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"` + // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. + // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"` // Total number of unavailable pods targeted by this deployment. + // +optional UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"` + + // Represents the latest available observations of a deployment's current state. + Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` +} + +type DeploymentConditionType string + +// These are valid conditions of a deployment. +const ( + // Available means the deployment is available, ie. at least the minimum available + // replicas required are up and running for at least minReadySeconds. + DeploymentAvailable DeploymentConditionType = "Available" + // Progressing means the deployment is progressing. Progress for a deployment is + // considered when a new replica set is created or adopted, and when new pods scale + // up or old pods scale down. Progress is not estimated for paused deployments or + // when progressDeadlineSeconds is not specified. + DeploymentProgressing DeploymentConditionType = "Progressing" + // ReplicaFailure is added in a deployment when one of its pods fails to be created + // or deleted. + DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure" +) + +// DeploymentCondition describes the state of a deployment at a certain point. +type DeploymentCondition struct { + // Type of deployment condition. + Type DeploymentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DeploymentConditionType"` + // Status of the condition, one of True, False, Unknown. + Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"` + // The last time this condition was updated. + LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,6,opt,name=lastUpdateTime"` + // Last time the condition transitioned from one status to another. + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,7,opt,name=lastTransitionTime"` + // The reason for the condition's last transition. + Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` + // A human readable message indicating details about the transition. + Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` } // DeploymentList is a list of Deployments. type DeploymentList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard list metadata. - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is the list of Deployments. Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"` } -// TODO(madhusudancs): Uncomment while implementing DaemonSet updates. -/* Commenting out for v1.2. We are planning to bring these types back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting the types out. type DaemonSetUpdateStrategy struct { - // Type of daemon set update. Only "RollingUpdate" is supported at this time. Default is RollingUpdate. - Type DaemonSetUpdateStrategyType `json:"type,omitempty"` + // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". + // Default is OnDelete. + // +optional + Type DaemonSetUpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type"` - // Rolling update config params. Present only if DaemonSetUpdateStrategy = - // RollingUpdate. + // Rolling update config params. Present only if type = "RollingUpdate". //--- // TODO: Update this to follow our convention for oneOf, whatever we decide it // to be. Same as DeploymentStrategy.RollingUpdate. - RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty"` + // See https://github.com/kubernetes/kubernetes/issues/35345 + // +optional + RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"` } type DaemonSetUpdateStrategyType string @@ -378,6 +389,9 @@ type DaemonSetUpdateStrategyType string const ( // Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other. RollingUpdateDaemonSetStrategyType DaemonSetUpdateStrategyType = "RollingUpdate" + + // Replace the old daemons only when it's killed + OnDeleteDaemonSetStrategyType DaemonSetUpdateStrategyType = "OnDelete" ) // Spec to control the desired behavior of daemon set rolling update. @@ -388,117 +402,143 @@ type RollingUpdateDaemonSet struct { // number is calculated from percentage by rounding up. // This cannot be 0. // Default value is 1. - // Example: when this is set to 30%, 30% of the currently running DaemonSet - // pods can be stopped for an update at any given time. The update starts - // by stopping at most 30% of the currently running DaemonSet pods and then - // brings up new DaemonSet pods in their place. Once the new pods are ready, - // it then proceeds onto other DaemonSet pods, thus ensuring that at least - // 70% of original number of DaemonSet pods are available at all times - // during the update. - MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` - - // Minimum number of seconds for which a newly created DaemonSet pod should - // be ready without any of its container crashing, for it to be considered - // available. Defaults to 0 (pod will be considered available as soon as it - // is ready). - MinReadySeconds int32 `json:"minReadySeconds,omitempty"` + // Example: when this is set to 30%, at most 30% of the total number of nodes + // that should be running the daemon pod (i.e. status.desiredNumberScheduled) + // can have their pods stopped for an update at any given + // time. The update starts by stopping at most 30% of those DaemonSet pods + // and then brings up new DaemonSet pods in their place. Once the new pods + // are available, it then proceeds onto other DaemonSet pods, thus ensuring + // that at least 70% of original number of DaemonSet pods are available at + // all times during the update. + // +optional + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"` } -*/ // DaemonSetSpec is the specification of a daemon set. type DaemonSetSpec struct { - // Selector is a label query over pods that are managed by the daemon set. + // A label query over pods that are managed by the daemon set. // Must match in order to be controlled. // If empty, defaulted to labels on Pod template. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"` + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"` - // Template is the object that describes the pod that will be created. + // An object that describes the pod that will be created. // The DaemonSet will create exactly one copy of this pod on every node // that matches the template's node selector (or on every node if no node // selector is specified). - // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template + // More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,2,opt,name=template"` - // TODO(madhusudancs): Uncomment while implementing DaemonSet updates. - /* Commenting out for v1.2. We are planning to bring these fields back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting these fields out. - // Update strategy to replace existing DaemonSet pods with new pods. - UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"` + // An update strategy to replace existing DaemonSet pods with new pods. + // +optional + UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,3,opt,name=updateStrategy"` - // Label key that is added to DaemonSet pods to distinguish between old and - // new pod templates during DaemonSet update. - // Users can set this to an empty string to indicate that the system should - // not add any label. If unspecified, system uses - // DefaultDaemonSetUniqueLabelKey("daemonset.kubernetes.io/podTemplateHash"). - // Value of this key is hash of DaemonSetSpec.PodTemplateSpec. - // No label is added if this is set to empty string. - UniqueLabelKey *string `json:"uniqueLabelKey,omitempty"` - */ + // The minimum number of seconds for which a newly created DaemonSet pod should + // be ready without any of its container crashing, for it to be considered + // available. Defaults to 0 (pod will be considered available as soon as it + // is ready). + // +optional + MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"` + + // A sequence number representing a specific generation of the template. + // Populated by the system. It can be set only during the creation. + // +optional + TemplateGeneration int64 `json:"templateGeneration,omitempty" protobuf:"varint,5,opt,name=templateGeneration"` } -const ( - // DefaultDaemonSetUniqueLabelKey is the default key of the labels that is added - // to daemon set pods to distinguish between old and new pod templates during - // DaemonSet update. See DaemonSetSpec's UniqueLabelKey field for more information. - DefaultDaemonSetUniqueLabelKey string = "daemonset.kubernetes.io/podTemplateHash" -) - // DaemonSetStatus represents the current status of a daemon set. type DaemonSetStatus struct { - // CurrentNumberScheduled is the number of nodes that are running at least 1 + // The number of nodes that are running at least 1 // daemon pod and are supposed to run the daemon pod. // More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md CurrentNumberScheduled int32 `json:"currentNumberScheduled" protobuf:"varint,1,opt,name=currentNumberScheduled"` - // NumberMisscheduled is the number of nodes that are running the daemon pod, but are + // The number of nodes that are running the daemon pod, but are // not supposed to run the daemon pod. // More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md NumberMisscheduled int32 `json:"numberMisscheduled" protobuf:"varint,2,opt,name=numberMisscheduled"` - // DesiredNumberScheduled is the total number of nodes that should be running the daemon + // The total number of nodes that should be running the daemon // pod (including nodes correctly running the daemon pod). // More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md DesiredNumberScheduled int32 `json:"desiredNumberScheduled" protobuf:"varint,3,opt,name=desiredNumberScheduled"` + + // The number of nodes that should be running the daemon pod and have one + // or more of the daemon pod running and ready. + NumberReady int32 `json:"numberReady" protobuf:"varint,4,opt,name=numberReady"` + + // The most recent generation observed by the daemon set controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,5,opt,name=observedGeneration"` + + // The total number of nodes that are running updated daemon pod + // +optional + UpdatedNumberScheduled int32 `json:"updatedNumberScheduled,omitempty" protobuf:"varint,6,opt,name=updatedNumberScheduled"` + + // The number of nodes that should be running the + // daemon pod and have one or more of the daemon pod running and + // available (ready for at least spec.minReadySeconds) + // +optional + NumberAvailable int32 `json:"numberAvailable,omitempty" protobuf:"varint,7,opt,name=numberAvailable"` + + // The number of nodes that should be running the + // daemon pod and have none of the daemon pod running and available + // (ready for at least spec.minReadySeconds) + // +optional + NumberUnavailable int32 `json:"numberUnavailable,omitempty" protobuf:"varint,8,opt,name=numberUnavailable"` } // +genclient=true // DaemonSet represents the configuration of a daemon set. type DaemonSet struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Spec defines the desired behavior of this daemon set. + // The desired behavior of this daemon set. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Spec DaemonSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - // Status is the current status of this daemon set. This data may be + // The current status of this daemon set. This data may be // out of date by some window of time. // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Status DaemonSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } +const ( + // DaemonSetTemplateGenerationKey is the key of the labels that is added + // to daemon set pods to distinguish between old and new pod templates + // during DaemonSet template update. + DaemonSetTemplateGenerationKey string = "pod-template-generation" +) + // DaemonSetList is a collection of daemon sets. type DaemonSetList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Items is a list of daemon sets. + // A list of daemon sets. Items []DaemonSet `json:"items" protobuf:"bytes,2,rep,name=items"` } // ThirdPartyResrouceDataList is a list of ThirdPartyResourceData. type ThirdPartyResourceDataList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is the list of ThirdpartyResourceData. Items []ThirdPartyResourceData `json:"items" protobuf:"bytes,2,rep,name=items"` @@ -506,153 +546,35 @@ type ThirdPartyResourceDataList struct { // +genclient=true -// Job represents the configuration of a single job. -type Job struct { - unversioned.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec is a structure defining the expected behavior of a job. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Status is a structure describing current status of a job. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// JobList is a collection of jobs. -type JobList struct { - unversioned.TypeMeta `json:",inline"` - // Standard list metadata - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is the list of Job. - Items []Job `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// JobSpec describes how the job execution will look like. -type JobSpec struct { - - // Parallelism specifies the maximum desired number of pods the job should - // run at any given time. The actual number of pods running in steady state will - // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), - // i.e. when the work left to do is less than max parallelism. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"` - - // Completions specifies the desired number of successfully finished pods the - // job should be run with. Setting to nil means that the success of any - // pod signals the success of all pods, and allows parallelism to have any positive - // value. Setting to 1 means that parallelism is limited to 1 and the success of that - // pod signals the success of the job. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - Completions *int32 `json:"completions,omitempty" protobuf:"varint,2,opt,name=completions"` - - // Optional duration in seconds relative to the startTime that the job may be active - // before the system tries to terminate it; value must be positive integer - ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"` - - // Selector is a label query over pods that should match the pod count. - // Normally, the system sets this field for you. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"` - - // AutoSelector controls generation of pod labels and pod selectors. - // It was not present in the original extensions/v1beta1 Job definition, but exists - // to allow conversion from batch/v1 Jobs, where it corresponds to, but has the opposite - // meaning as, ManualSelector. - // More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md - AutoSelector *bool `json:"autoSelector,omitempty" protobuf:"varint,5,opt,name=autoSelector"` - - // Template is the object that describes the pod that will be created when - // executing a job. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,6,opt,name=template"` -} - -// JobStatus represents the current state of a Job. -type JobStatus struct { - - // Conditions represent the latest available observations of an object's current state. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md - Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` - - // StartTime represents time when the job was acknowledged by the Job Manager. - // It is not guaranteed to be set in happens-before order across separate operations. - // It is represented in RFC3339 form and is in UTC. - StartTime *unversioned.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"` - - // CompletionTime represents time when the job was completed. It is not guaranteed to - // be set in happens-before order across separate operations. - // It is represented in RFC3339 form and is in UTC. - CompletionTime *unversioned.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"` - - // Active is the number of actively running pods. - Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"` - - // Succeeded is the number of pods which reached Phase Succeeded. - Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"` - - // Failed is the number of pods which reached Phase Failed. - Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"` -} - -type JobConditionType string - -// These are valid conditions of a job. -const ( - // JobComplete means the job has completed its execution. - JobComplete JobConditionType = "Complete" - // JobFailed means the job has failed its execution. - JobFailed JobConditionType = "Failed" -) - -// JobCondition describes current state of a job. -type JobCondition struct { - // Type of job condition, Complete or Failed. - Type JobConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=JobConditionType"` - // Status of the condition, one of True, False, Unknown. - Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"` - // Last time the condition was checked. - LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` - // Last time the condition transit from one status to another. - LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` - // (brief) reason for the condition's last transition. - Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` - // Human readable message indicating details about last transition. - Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` -} - -// +genclient=true - // Ingress is a collection of rules that allow inbound connections to reach the // endpoints defined by a backend. An Ingress can be configured to give services // externally-reachable urls, load balance traffic, terminate SSL, offer name // based virtual hosting etc. type Ingress struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec is the desired state of the Ingress. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Spec IngressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Status is the current state of the Ingress. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Status IngressStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // IngressList is a collection of Ingress. type IngressList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is the list of Ingress. Items []Ingress `json:"items" protobuf:"bytes,2,rep,name=items"` @@ -664,6 +586,7 @@ type IngressSpec struct { // rule. At least one of 'backend' or 'rules' must be specified. This field // is optional to allow the loadbalancer controller or defaulting logic to // specify a global default. + // +optional Backend *IngressBackend `json:"backend,omitempty" protobuf:"bytes,1,opt,name=backend"` // TLS configuration. Currently the Ingress only supports a single TLS @@ -671,10 +594,12 @@ type IngressSpec struct { // will be multiplexed on the same port according to the hostname specified // through the SNI TLS extension, if the ingress controller fulfilling the // ingress supports SNI. + // +optional TLS []IngressTLS `json:"tls,omitempty" protobuf:"bytes,2,rep,name=tls"` // A list of host rules used to configure the Ingress. If unspecified, or // no rule matches, all traffic is sent to the default backend. + // +optional Rules []IngressRule `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` // TODO: Add the ability to specify load-balancer IP through claims } @@ -685,12 +610,14 @@ type IngressTLS struct { // this list must match the name/s used in the tlsSecret. Defaults to the // wildcard host setting for the loadbalancer controller fulfilling this // Ingress, if left unspecified. + // +optional Hosts []string `json:"hosts,omitempty" protobuf:"bytes,1,rep,name=hosts"` // SecretName is the name of the secret used to terminate SSL traffic on 443. // Field is left optional to allow SSL routing based on SNI hostname alone. // If the SNI host in a listener conflicts with the "Host" header field used // by an IngressRule, the SNI host is used for termination and value of the // Host header is used for routing. + // +optional SecretName string `json:"secretName,omitempty" protobuf:"bytes,2,opt,name=secretName"` // TODO: Consider specifying different modes of termination, protocols etc. } @@ -698,6 +625,7 @@ type IngressTLS struct { // IngressStatus describe the current state of the Ingress. type IngressStatus struct { // LoadBalancer contains the current status of the load-balancer. + // +optional LoadBalancer v1.LoadBalancerStatus `json:"loadBalancer,omitempty" protobuf:"bytes,1,opt,name=loadBalancer"` } @@ -717,12 +645,14 @@ type IngressRule struct { // Incoming requests are matched against the host before the IngressRuleValue. // If the host is unspecified, the Ingress routes all traffic based on the // specified IngressRuleValue. + // +optional Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"` // IngressRuleValue represents a rule to route requests for this IngressRule. // If unspecified, the rule defaults to a http catch-all. Whether that sends // just traffic matching the host to the default backend or all traffic to the // default backend, is left to the controller fulfilling the Ingress. Http is // currently the only supported IngressRuleValue. + // +optional IngressRuleValue `json:",inline,omitempty" protobuf:"bytes,2,opt,name=ingressRuleValue"` } @@ -737,6 +667,7 @@ type IngressRuleValue struct { // 2. Consider adding fields for ingress-type specific global options // usable by a loadbalancer, like http keep-alive. + // +optional HTTP *HTTPIngressRuleValue `json:"http,omitempty" protobuf:"bytes,1,opt,name=http"` } @@ -762,6 +693,7 @@ type HTTPIngressPath struct { // part of a URL as defined by RFC 3986. Paths must begin with // a '/'. If unspecified, the path defaults to a catch all sending // traffic to the backend. + // +optional Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` // Backend defines the referenced service endpoint to which the traffic @@ -778,85 +710,21 @@ type IngressBackend struct { ServicePort intstr.IntOrString `json:"servicePort" protobuf:"bytes,2,opt,name=servicePort"` } -// ExportOptions is the query options to the standard REST get call. -type ExportOptions struct { - unversioned.TypeMeta `json:",inline"` - // Should this value be exported. Export strips fields that a user can not specify. - Export bool `json:"export" protobuf:"varint,1,opt,name=export"` - // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' - Exact bool `json:"exact" protobuf:"varint,2,opt,name=exact"` -} - -// ListOptions is the query options to a standard REST list call. -type ListOptions struct { - unversioned.TypeMeta `json:",inline"` - - // A selector to restrict the list of returned objects by their labels. - // Defaults to everything. - LabelSelector string `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"` - // A selector to restrict the list of returned objects by their fields. - // Defaults to everything. - FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"` - // Watch for changes to the described resources and return them as a stream of - // add, update, and remove notifications. Specify resourceVersion. - Watch bool `json:"watch,omitempty" protobuf:"varint,3,opt,name=watch"` - // When specified with a watch call, shows changes that occur after that particular version of a resource. - // Defaults to changes from the beginning of history. - ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"` - // Timeout for the list/watch call. - TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,5,opt,name=timeoutSeconds"` -} - -// A label selector is a label query over a set of resources. The result of matchLabels and -// matchExpressions are ANDed. An empty label selector matches all objects. A null -// label selector matches no objects. -type LabelSelector struct { - // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - // map is equivalent to an element of matchExpressions, whose key field is "key", the - // operator is "In", and the values array contains only "value". The requirements are ANDed. - MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"` - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"` -} - -// A label selector requirement is a selector that contains values, a key, and an operator that -// relates the key and values. -type LabelSelectorRequirement struct { - // key is the label key that the selector applies to. - Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"` - // operator represents a key's relationship to a set of values. - // Valid operators ard In, NotIn, Exists and DoesNotExist. - Operator LabelSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=LabelSelectorOperator"` - // values is an array of string values. If the operator is In or NotIn, - // the values array must be non-empty. If the operator is Exists or DoesNotExist, - // the values array must be empty. This array is replaced during a strategic - // merge patch. - Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` -} - -// A label selector operator is the set of operators that can be used in a selector requirement. -type LabelSelectorOperator string - -const ( - LabelSelectorOpIn LabelSelectorOperator = "In" - LabelSelectorOpNotIn LabelSelectorOperator = "NotIn" - LabelSelectorOpExists LabelSelectorOperator = "Exists" - LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist" -) - // +genclient=true // ReplicaSet represents the configuration of a ReplicaSet. type ReplicaSet struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // If the Labels of a ReplicaSet are empty, they are defaulted to // be the same as the Pod(s) that the ReplicaSet manages. // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the specification of the desired behavior of the ReplicaSet. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Spec ReplicaSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Status is the most recently observed status of the ReplicaSet. @@ -864,18 +732,20 @@ type ReplicaSet struct { // Populated by the system. // Read-only. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + // +optional Status ReplicaSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // ReplicaSetList is a collection of ReplicaSets. type ReplicaSetList struct { - unversioned.TypeMeta `json:",inline"` + metav1.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"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ReplicaSets. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md + // More info: http://kubernetes.io/docs/user-guide/replication-controller Items []ReplicaSet `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -884,35 +754,82 @@ type ReplicaSetSpec struct { // Replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // Defaults to 1. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller + // More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller + // +optional Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` + // Minimum number of seconds for which a newly created pod should be ready + // without any of its container crashing, for it to be considered available. + // Defaults to 0 (pod will be considered available as soon as it is ready) + // +optional + MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"` + // Selector is a label query over pods that should match the replica count. // If the selector is empty, it is defaulted to the labels present on the pod template. // Label keys and values that must match in order to be controlled by this replica set. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors - Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` + // More info: http://kubernetes.io/docs/user-guide/labels#label-selectors + // +optional + Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` // Template is the object that describes the pod that will be created if // insufficient replicas are detected. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template + // More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template + // +optional Template v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"` } // ReplicaSetStatus represents the current status of a ReplicaSet. type ReplicaSetStatus struct { // Replicas is the most recently oberved number of replicas. - // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller + // More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"` // The number of pods that have labels matching the labels of the pod template of the replicaset. + // +optional FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"` // The number of ready replicas for this replica set. + // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"` + // The number of available replicas (ready for at least minReadySeconds) for this replica set. + // +optional + AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"` + // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. + // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"` + + // Represents the latest available observations of a replica set's current state. + // +optional + Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` +} + +type ReplicaSetConditionType string + +// These are valid conditions of a replica set. +const ( + // ReplicaSetReplicaFailure is added in a replica set when one of its pods fails to be created + // due to insufficient quota, limit ranges, pod security policy, node selectors, etc. or deleted + // due to kubelet being down or finalizers are failing. + ReplicaSetReplicaFailure ReplicaSetConditionType = "ReplicaFailure" +) + +// ReplicaSetCondition describes the state of a replica set at a certain point. +type ReplicaSetCondition struct { + // Type of replica set condition. + Type ReplicaSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ReplicaSetConditionType"` + // Status of the condition, one of True, False, Unknown. + Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"` + // The last time the condition transitioned from one status to another. + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` + // The reason for the condition's last transition. + // +optional + Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` + // A human readable message indicating details about the transition. + // +optional + Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` } // +genclient=true @@ -921,40 +838,51 @@ type ReplicaSetStatus struct { // Pod Security Policy governs the ability to make requests that affect the Security Context // that will be applied to a pod and container. type PodSecurityPolicy struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // spec defines the policy enforced. + // +optional Spec PodSecurityPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } // Pod Security Policy Spec defines the policy enforced. type PodSecurityPolicySpec struct { // privileged determines if a pod can request to be run as privileged. + // +optional Privileged bool `json:"privileged,omitempty" protobuf:"varint,1,opt,name=privileged"` // DefaultAddCapabilities is the default set of capabilities that will be added to the container // unless the pod spec specifically drops the capability. You may not list a capabiility in both // DefaultAddCapabilities and RequiredDropCapabilities. + // +optional DefaultAddCapabilities []v1.Capability `json:"defaultAddCapabilities,omitempty" protobuf:"bytes,2,rep,name=defaultAddCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"` // RequiredDropCapabilities are the capabilities that will be dropped from the container. These // are required to be dropped and cannot be added. + // +optional RequiredDropCapabilities []v1.Capability `json:"requiredDropCapabilities,omitempty" protobuf:"bytes,3,rep,name=requiredDropCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"` // AllowedCapabilities is a list of capabilities that can be requested to add to the container. // Capabilities in this field may be added at the pod author's discretion. // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities. + // +optional AllowedCapabilities []v1.Capability `json:"allowedCapabilities,omitempty" protobuf:"bytes,4,rep,name=allowedCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"` // volumes is a white list of allowed volume plugins. Empty indicates that all plugins // may be used. + // +optional Volumes []FSType `json:"volumes,omitempty" protobuf:"bytes,5,rep,name=volumes,casttype=FSType"` // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. + // +optional HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,6,opt,name=hostNetwork"` // hostPorts determines which host port ranges are allowed to be exposed. + // +optional HostPorts []HostPortRange `json:"hostPorts,omitempty" protobuf:"bytes,7,rep,name=hostPorts"` // hostPID determines if the policy allows the use of HostPID in the pod spec. + // +optional HostPID bool `json:"hostPID,omitempty" protobuf:"varint,8,opt,name=hostPID"` // hostIPC determines if the policy allows the use of HostIPC in the pod spec. + // +optional HostIPC bool `json:"hostIPC,omitempty" protobuf:"varint,9,opt,name=hostIPC"` // seLinux is the strategy that will dictate the allowable labels that may be set. SELinux SELinuxStrategyOptions `json:"seLinux" protobuf:"bytes,10,opt,name=seLinux"` @@ -969,6 +897,7 @@ type PodSecurityPolicySpec struct { // the PSP should deny the pod. // If set to false the container may run with a read only root file system if it wishes but it // will not be forced to. + // +optional ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty" protobuf:"varint,14,opt,name=readOnlyRootFilesystem"` } @@ -1015,6 +944,7 @@ type SELinuxStrategyOptions struct { Rule SELinuxStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=SELinuxStrategy"` // seLinuxOptions required to run as; required for MustRunAs // More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context + // +optional SELinuxOptions *v1.SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,2,opt,name=seLinuxOptions"` } @@ -1034,6 +964,7 @@ type RunAsUserStrategyOptions struct { // Rule is the strategy that will dictate the allowable RunAsUser values that may be set. Rule RunAsUserStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=RunAsUserStrategy"` // Ranges are the allowed ranges of uids that may be used. + // +optional Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"` } @@ -1061,9 +992,11 @@ const ( // FSGroupStrategyOptions defines the strategy type and options used to create the strategy. type FSGroupStrategyOptions struct { // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. + // +optional Rule FSGroupStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=FSGroupStrategyType"` // Ranges are the allowed ranges of fs groups. If you would like to force a single // fs group then supply a single range with the same start and end. + // +optional Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"` } @@ -1081,9 +1014,11 @@ const ( // SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. type SupplementalGroupsStrategyOptions struct { // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. + // +optional Rule SupplementalGroupsStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=SupplementalGroupsStrategyType"` // Ranges are the allowed ranges of supplemental groups. If you would like to force a single // supplemental group then supply a single range with the same start and end. + // +optional Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"` } @@ -1100,22 +1035,25 @@ const ( // Pod Security Policy List is a list of PodSecurityPolicy objects. type PodSecurityPolicyList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is a list of schema objects. Items []PodSecurityPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` } type NetworkPolicy struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior for this NetworkPolicy. + // +optional Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } @@ -1125,7 +1063,7 @@ type NetworkPolicySpec struct { // same set of pods. In this case, the ingress rules for each are combined additively. // This field is NOT optional and follows standard label selector semantics. // An empty podSelector matches all pods in this namespace. - PodSelector LabelSelector `json:"podSelector" protobuf:"bytes,1,opt,name=podSelector"` + PodSelector metav1.LabelSelector `json:"podSelector" protobuf:"bytes,1,opt,name=podSelector"` // List of ingress rules to be applied to the selected pods. // Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, @@ -1135,6 +1073,7 @@ type NetworkPolicySpec struct { // If this field is empty then this NetworkPolicy does not affect ingress isolation. // If this field is present and contains at least one rule, this policy allows any traffic // which matches at least one of the ingress rules in this list. + // +optional Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty" protobuf:"bytes,2,rep,name=ingress"` } @@ -1147,6 +1086,7 @@ type NetworkPolicyIngressRule struct { // If this field is present and contains at least one item, then this rule allows traffic // only if the traffic matches at least one port in the list. // TODO: Update this to be a pointer to slice as soon as auto-generation supports it. + // +optional Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"` // List of sources which should be able to access the pods selected for this rule. @@ -1156,12 +1096,14 @@ type NetworkPolicyIngressRule struct { // If this field is present and contains at least on item, this rule allows traffic only if the // traffic matches at least one item in the from list. // TODO: Update this to be a pointer to slice as soon as auto-generation supports it. + // +optional From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"` } type NetworkPolicyPort struct { // Optional. The protocol (TCP or UDP) which traffic must match. // If not specified, this field defaults to TCP. + // +optional Protocol *v1.Protocol `json:"protocol,omitempty" protobuf:"bytes,1,opt,name=protocol,casttype=k8s.io/kubernetes/pkg/api/v1.Protocol"` // If specified, the port on the given protocol. This can @@ -1169,6 +1111,7 @@ type NetworkPolicyPort struct { // this matches all port names and numbers. // If present, only traffic on the specified protocol AND port // will be matched. + // +optional Port *intstr.IntOrString `json:"port,omitempty" protobuf:"bytes,2,opt,name=port"` } @@ -1179,22 +1122,25 @@ type NetworkPolicyPeer struct { // This field follows standard label selector semantics. // If not provided, this selector selects no pods. // If present but empty, this selector selects all pods in this namespace. - PodSelector *LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"` + // +optional + PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"` // Selects Namespaces using cluster scoped-labels. This // matches all pods in all namespaces selected by this label selector. // This field follows standard label selector semantics. // If omitted, this selector selects no namespaces. // If present but empty, this selector selects all namespaces. - NamespaceSelector *LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"` + // +optional + NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"` } // Network Policy List is a list of NetworkPolicy objects. type NetworkPolicyList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is a list of schema objects. Items []NetworkPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go similarity index 64% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go rename to vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go index 4b1e22ba5..587615590 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go @@ -36,14 +36,6 @@ func (APIVersion) SwaggerDoc() map[string]string { return map_APIVersion } -var map_CPUTargetUtilization = map[string]string{ - "targetPercentage": "fraction of the requested CPU that should be utilized/used, e.g. 70 means that 70% of the requested CPU should be in use.", -} - -func (CPUTargetUtilization) SwaggerDoc() map[string]string { - return map_CPUTargetUtilization -} - var map_CustomMetricCurrentStatus = map[string]string{ "name": "Custom Metric name.", "value": "Custom Metric value (average).", @@ -66,8 +58,8 @@ func (CustomMetricTarget) SwaggerDoc() map[string]string { var map_DaemonSet = map[string]string{ "": "DaemonSet represents the configuration of a daemon set.", "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "spec": "Spec defines the desired behavior of this daemon set. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", - "status": "Status is the current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "spec": "The desired behavior of this daemon set. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "status": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", } func (DaemonSet) SwaggerDoc() map[string]string { @@ -77,7 +69,7 @@ func (DaemonSet) SwaggerDoc() map[string]string { var map_DaemonSetList = map[string]string{ "": "DaemonSetList is a collection of daemon sets.", "metadata": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "items": "Items is a list of daemon sets.", + "items": "A list of daemon sets.", } func (DaemonSetList) SwaggerDoc() map[string]string { @@ -85,9 +77,12 @@ func (DaemonSetList) SwaggerDoc() map[string]string { } var map_DaemonSetSpec = map[string]string{ - "": "DaemonSetSpec is the specification of a daemon set.", - "selector": "Selector is a label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors", - "template": "Template is the object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template", + "": "DaemonSetSpec is the specification of a daemon set.", + "selector": "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "template": "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template", + "updateStrategy": "An update strategy to replace existing DaemonSet pods with new pods.", + "minReadySeconds": "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).", + "templateGeneration": "A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation.", } func (DaemonSetSpec) SwaggerDoc() map[string]string { @@ -96,15 +91,29 @@ func (DaemonSetSpec) SwaggerDoc() map[string]string { var map_DaemonSetStatus = map[string]string{ "": "DaemonSetStatus represents the current status of a daemon set.", - "currentNumberScheduled": "CurrentNumberScheduled is the number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md", - "numberMisscheduled": "NumberMisscheduled is the number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md", - "desiredNumberScheduled": "DesiredNumberScheduled is the total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md", + "currentNumberScheduled": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md", + "numberMisscheduled": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md", + "desiredNumberScheduled": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md", + "numberReady": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", + "observedGeneration": "The most recent generation observed by the daemon set controller.", + "updatedNumberScheduled": "The total number of nodes that are running updated daemon pod", + "numberAvailable": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)", + "numberUnavailable": "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)", } func (DaemonSetStatus) SwaggerDoc() map[string]string { return map_DaemonSetStatus } +var map_DaemonSetUpdateStrategy = map[string]string{ + "type": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is OnDelete.", + "rollingUpdate": "Rolling update config params. Present only if type = \"RollingUpdate\".", +} + +func (DaemonSetUpdateStrategy) SwaggerDoc() map[string]string { + return map_DaemonSetUpdateStrategy +} + var map_Deployment = map[string]string{ "": "Deployment enables declarative updates for Pods and ReplicaSets.", "metadata": "Standard object metadata.", @@ -116,6 +125,20 @@ func (Deployment) SwaggerDoc() map[string]string { return map_Deployment } +var map_DeploymentCondition = map[string]string{ + "": "DeploymentCondition describes the state of a deployment at a certain point.", + "type": "Type of deployment condition.", + "status": "Status of the condition, one of True, False, Unknown.", + "lastUpdateTime": "The last time this condition was updated.", + "lastTransitionTime": "Last time the condition transitioned from one status to another.", + "reason": "The reason for the condition's last transition.", + "message": "A human readable message indicating details about the transition.", +} + +func (DeploymentCondition) SwaggerDoc() map[string]string { + return map_DeploymentCondition +} + var map_DeploymentList = map[string]string{ "": "DeploymentList is a list of Deployments.", "metadata": "Standard list metadata.", @@ -138,15 +161,16 @@ func (DeploymentRollback) SwaggerDoc() map[string]string { } var map_DeploymentSpec = map[string]string{ - "": "DeploymentSpec is the specification of the desired behavior of the Deployment.", - "replicas": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", - "selector": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", - "template": "Template describes the pods that will be created.", - "strategy": "The deployment strategy to use to replace existing pods with new ones.", - "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - "revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified.", - "paused": "Indicates that the deployment is paused and will not be processed by the deployment controller.", - "rollbackTo": "The config this deployment is rolling back to. Will be cleared after rollback is done.", + "": "DeploymentSpec is the specification of the desired behavior of the Deployment.", + "replicas": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + "selector": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", + "template": "Template describes the pods that will be created.", + "strategy": "The deployment strategy to use to replace existing pods with new ones.", + "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified.", + "paused": "Indicates that the deployment is paused and will not be processed by the deployment controller.", + "rollbackTo": "The config this deployment is rolling back to. Will be cleared after rollback is done.", + "progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. This is not set by default.", } func (DeploymentSpec) SwaggerDoc() map[string]string { @@ -158,8 +182,10 @@ var map_DeploymentStatus = map[string]string{ "observedGeneration": "The generation observed by the deployment controller.", "replicas": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", "updatedReplicas": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", + "readyReplicas": "Total number of ready pods targeted by this deployment.", "availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", "unavailableReplicas": "Total number of unavailable pods targeted by this deployment.", + "conditions": "Represents the latest available observations of a deployment's current state.", } func (DeploymentStatus) SwaggerDoc() map[string]string { @@ -176,16 +202,6 @@ func (DeploymentStrategy) SwaggerDoc() map[string]string { return map_DeploymentStrategy } -var map_ExportOptions = map[string]string{ - "": "ExportOptions is the query options to the standard REST get call.", - "export": "Should this value be exported. Export strips fields that a user can not specify.", - "exact": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", -} - -func (ExportOptions) SwaggerDoc() map[string]string { - return map_ExportOptions -} - var map_FSGroupStrategyOptions = map[string]string{ "": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", "rule": "Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.", @@ -215,52 +231,6 @@ func (HTTPIngressRuleValue) SwaggerDoc() map[string]string { return map_HTTPIngressRuleValue } -var map_HorizontalPodAutoscaler = map[string]string{ - "": "configuration of a horizontal pod autoscaler.", - "metadata": "Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "spec": "behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", - "status": "current information about the autoscaler.", -} - -func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string { - return map_HorizontalPodAutoscaler -} - -var map_HorizontalPodAutoscalerList = map[string]string{ - "": "list of horizontal pod autoscaler objects.", - "metadata": "Standard list metadata.", - "items": "list of horizontal pod autoscaler objects.", -} - -func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string { - return map_HorizontalPodAutoscalerList -} - -var map_HorizontalPodAutoscalerSpec = map[string]string{ - "": "specification of a horizontal pod autoscaler.", - "scaleRef": "reference to Scale subresource; horizontal pod autoscaler will learn the current resource consumption from its status, and will set the desired number of pods by modifying its spec.", - "minReplicas": "lower limit for the number of pods that can be set by the autoscaler, default 1.", - "maxReplicas": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.", - "cpuUtilization": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified it defaults to the target CPU utilization at 80% of the requested resources.", -} - -func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string { - return map_HorizontalPodAutoscalerSpec -} - -var map_HorizontalPodAutoscalerStatus = map[string]string{ - "": "current status of a horizontal pod autoscaler", - "observedGeneration": "most recent generation observed by this autoscaler.", - "lastScaleTime": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.", - "currentReplicas": "current number of replicas of pods managed by this autoscaler.", - "desiredReplicas": "desired number of replicas of pods managed by this autoscaler.", - "currentCPUUtilizationPercentage": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.", -} - -func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string { - return map_HorizontalPodAutoscalerStatus -} - var map_HostPortRange = map[string]string{ "": "Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", "min": "min is the start of the range, inclusive.", @@ -359,103 +329,6 @@ func (IngressTLS) SwaggerDoc() map[string]string { return map_IngressTLS } -var map_Job = map[string]string{ - "": "Job represents the configuration of a single job.", - "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "spec": "Spec is a structure defining the expected behavior of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", - "status": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", -} - -func (Job) SwaggerDoc() map[string]string { - return map_Job -} - -var map_JobCondition = map[string]string{ - "": "JobCondition describes current state of a job.", - "type": "Type of job condition, Complete or Failed.", - "status": "Status of the condition, one of True, False, Unknown.", - "lastProbeTime": "Last time the condition was checked.", - "lastTransitionTime": "Last time the condition transit from one status to another.", - "reason": "(brief) reason for the condition's last transition.", - "message": "Human readable message indicating details about last transition.", -} - -func (JobCondition) SwaggerDoc() map[string]string { - return map_JobCondition -} - -var map_JobList = map[string]string{ - "": "JobList is a collection of jobs.", - "metadata": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "items": "Items is the list of Job.", -} - -func (JobList) SwaggerDoc() map[string]string { - return map_JobList -} - -var map_JobSpec = map[string]string{ - "": "JobSpec describes how the job execution will look like.", - "parallelism": "Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", - "completions": "Completions specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", - "activeDeadlineSeconds": "Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer", - "selector": "Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors", - "autoSelector": "AutoSelector controls generation of pod labels and pod selectors. It was not present in the original extensions/v1beta1 Job definition, but exists to allow conversion from batch/v1 Jobs, where it corresponds to, but has the opposite meaning as, ManualSelector. More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md", - "template": "Template is the object that describes the pod that will be created when executing a job. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", -} - -func (JobSpec) SwaggerDoc() map[string]string { - return map_JobSpec -} - -var map_JobStatus = map[string]string{ - "": "JobStatus represents the current state of a Job.", - "conditions": "Conditions represent the latest available observations of an object's current state. More info: http://releases.k8s.io/HEAD/docs/user-guide/jobs.md", - "startTime": "StartTime represents time when the job was acknowledged by the Job Manager. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - "completionTime": "CompletionTime represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - "active": "Active is the number of actively running pods.", - "succeeded": "Succeeded is the number of pods which reached Phase Succeeded.", - "failed": "Failed is the number of pods which reached Phase Failed.", -} - -func (JobStatus) SwaggerDoc() map[string]string { - return map_JobStatus -} - -var map_LabelSelector = map[string]string{ - "": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", - "matchLabels": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", - "matchExpressions": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", -} - -func (LabelSelector) SwaggerDoc() map[string]string { - return map_LabelSelector -} - -var map_LabelSelectorRequirement = map[string]string{ - "": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", - "key": "key is the label key that the selector applies to.", - "operator": "operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist.", - "values": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", -} - -func (LabelSelectorRequirement) SwaggerDoc() map[string]string { - return map_LabelSelectorRequirement -} - -var map_ListOptions = map[string]string{ - "": "ListOptions is the query options to a standard REST list call.", - "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "timeoutSeconds": "Timeout for the list/watch call.", -} - -func (ListOptions) SwaggerDoc() map[string]string { - return map_ListOptions -} - var map_NetworkPolicy = map[string]string{ "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "spec": "Specification of the desired behavior for this NetworkPolicy.", @@ -565,10 +438,23 @@ func (ReplicaSet) SwaggerDoc() map[string]string { return map_ReplicaSet } +var map_ReplicaSetCondition = map[string]string{ + "": "ReplicaSetCondition describes the state of a replica set at a certain point.", + "type": "Type of replica set condition.", + "status": "Status of the condition, one of True, False, Unknown.", + "lastTransitionTime": "The last time the condition transitioned from one status to another.", + "reason": "The reason for the condition's last transition.", + "message": "A human readable message indicating details about the transition.", +} + +func (ReplicaSetCondition) SwaggerDoc() map[string]string { + return map_ReplicaSetCondition +} + var map_ReplicaSetList = map[string]string{ "": "ReplicaSetList is a collection of ReplicaSets.", "metadata": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", - "items": "List of ReplicaSets. More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md", + "items": "List of ReplicaSets. More info: http://kubernetes.io/docs/user-guide/replication-controller", } func (ReplicaSetList) SwaggerDoc() map[string]string { @@ -576,10 +462,11 @@ func (ReplicaSetList) SwaggerDoc() map[string]string { } var map_ReplicaSetSpec = map[string]string{ - "": "ReplicaSetSpec is the specification of a ReplicaSet.", - "replicas": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller", - "selector": "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors", - "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template", + "": "ReplicaSetSpec is the specification of a ReplicaSet.", + "replicas": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller", + "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "selector": "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template", } func (ReplicaSetSpec) SwaggerDoc() map[string]string { @@ -588,10 +475,12 @@ func (ReplicaSetSpec) SwaggerDoc() map[string]string { var map_ReplicaSetStatus = map[string]string{ "": "ReplicaSetStatus represents the current status of a ReplicaSet.", - "replicas": "Replicas is the most recently oberved number of replicas. More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller", + "replicas": "Replicas is the most recently oberved number of replicas. More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller", "fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replicaset.", "readyReplicas": "The number of ready replicas for this replica set.", + "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this replica set.", "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", + "conditions": "Represents the latest available observations of a replica set's current state.", } func (ReplicaSetStatus) SwaggerDoc() map[string]string { @@ -614,9 +503,18 @@ func (RollbackConfig) SwaggerDoc() map[string]string { return map_RollbackConfig } +var map_RollingUpdateDaemonSet = map[string]string{ + "": "Spec to control the desired behavior of daemon set rolling update.", + "maxUnavailable": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", +} + +func (RollingUpdateDaemonSet) SwaggerDoc() map[string]string { + return map_RollingUpdateDaemonSet +} + var map_RollingUpdateDeployment = map[string]string{ "": "Spec to control the desired behavior of rolling update.", - "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", } @@ -667,26 +565,14 @@ func (ScaleSpec) SwaggerDoc() map[string]string { var map_ScaleStatus = map[string]string{ "": "represents the current status of a scale subresource.", "replicas": "actual number of observed instances of the scaled object.", - "selector": "label query over pods that should match the replicas count. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors", - "targetSelector": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors", + "selector": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "targetSelector": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", } func (ScaleStatus) SwaggerDoc() map[string]string { return map_ScaleStatus } -var map_SubresourceReference = map[string]string{ - "": "SubresourceReference contains enough information to let you inspect or modify the referred subresource.", - "kind": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", - "name": "Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names", - "apiVersion": "API version of the referent", - "subresource": "Subresource name of the referent", -} - -func (SubresourceReference) SwaggerDoc() map[string]string { - return map_SubresourceReference -} - var map_SupplementalGroupsStrategyOptions = map[string]string{ "": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", "rule": "Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.", diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.conversion.go similarity index 55% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/zz_generated.conversion.go rename to vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.conversion.go index 6c76c93cd..2baeaa676 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,14 +21,14 @@ limitations under the License. package v1beta1 import ( - api "k8s.io/client-go/1.5/pkg/api" - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - autoscaling "k8s.io/client-go/1.5/pkg/apis/autoscaling" - batch "k8s.io/client-go/1.5/pkg/apis/batch" - extensions "k8s.io/client-go/1.5/pkg/apis/extensions" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + intstr "k8s.io/apimachinery/pkg/util/intstr" + api "k8s.io/client-go/pkg/api" + api_v1 "k8s.io/client-go/pkg/api/v1" + extensions "k8s.io/client-go/pkg/apis/extensions" + unsafe "unsafe" ) func init() { @@ -57,8 +57,12 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec, Convert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus, Convert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus, + Convert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy, + Convert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy, Convert_v1beta1_Deployment_To_extensions_Deployment, Convert_extensions_Deployment_To_v1beta1_Deployment, + Convert_v1beta1_DeploymentCondition_To_extensions_DeploymentCondition, + Convert_extensions_DeploymentCondition_To_v1beta1_DeploymentCondition, Convert_v1beta1_DeploymentList_To_extensions_DeploymentList, Convert_extensions_DeploymentList_To_v1beta1_DeploymentList, Convert_v1beta1_DeploymentRollback_To_extensions_DeploymentRollback, @@ -69,22 +73,12 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus, Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy, Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy, - Convert_v1beta1_ExportOptions_To_api_ExportOptions, - Convert_api_ExportOptions_To_v1beta1_ExportOptions, Convert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions, Convert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions, Convert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath, Convert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath, Convert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue, Convert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue, - Convert_v1beta1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler, - Convert_autoscaling_HorizontalPodAutoscaler_To_v1beta1_HorizontalPodAutoscaler, - Convert_v1beta1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList, - Convert_autoscaling_HorizontalPodAutoscalerList_To_v1beta1_HorizontalPodAutoscalerList, - Convert_v1beta1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec, - Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1beta1_HorizontalPodAutoscalerSpec, - Convert_v1beta1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus, - Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1beta1_HorizontalPodAutoscalerStatus, Convert_v1beta1_HostPortRange_To_extensions_HostPortRange, Convert_extensions_HostPortRange_To_v1beta1_HostPortRange, Convert_v1beta1_IDRange_To_extensions_IDRange, @@ -105,22 +99,6 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_extensions_IngressStatus_To_v1beta1_IngressStatus, Convert_v1beta1_IngressTLS_To_extensions_IngressTLS, Convert_extensions_IngressTLS_To_v1beta1_IngressTLS, - Convert_v1beta1_Job_To_batch_Job, - Convert_batch_Job_To_v1beta1_Job, - Convert_v1beta1_JobCondition_To_batch_JobCondition, - Convert_batch_JobCondition_To_v1beta1_JobCondition, - Convert_v1beta1_JobList_To_batch_JobList, - Convert_batch_JobList_To_v1beta1_JobList, - Convert_v1beta1_JobSpec_To_batch_JobSpec, - Convert_batch_JobSpec_To_v1beta1_JobSpec, - Convert_v1beta1_JobStatus_To_batch_JobStatus, - Convert_batch_JobStatus_To_v1beta1_JobStatus, - Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector, - Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector, - Convert_v1beta1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement, - Convert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement, - Convert_v1beta1_ListOptions_To_api_ListOptions, - Convert_api_ListOptions_To_v1beta1_ListOptions, Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy, Convert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy, Convert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule, @@ -141,6 +119,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec, Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet, Convert_extensions_ReplicaSet_To_v1beta1_ReplicaSet, + Convert_v1beta1_ReplicaSetCondition_To_extensions_ReplicaSetCondition, + Convert_extensions_ReplicaSetCondition_To_v1beta1_ReplicaSetCondition, Convert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList, Convert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList, Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec, @@ -151,6 +131,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_extensions_ReplicationControllerDummy_To_v1beta1_ReplicationControllerDummy, Convert_v1beta1_RollbackConfig_To_extensions_RollbackConfig, Convert_extensions_RollbackConfig_To_v1beta1_RollbackConfig, + Convert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet, + Convert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet, Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment, Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment, Convert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions, @@ -196,9 +178,7 @@ func Convert_extensions_APIVersion_To_v1beta1_APIVersion(in *extensions.APIVersi func autoConvert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus(in *CustomMetricCurrentStatus, out *extensions.CustomMetricCurrentStatus, s conversion.Scope) error { out.Name = in.Name - if err := api.Convert_resource_Quantity_To_resource_Quantity(&in.CurrentValue, &out.CurrentValue, s); err != nil { - return err - } + out.CurrentValue = in.CurrentValue return nil } @@ -208,9 +188,7 @@ func Convert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrent func autoConvert_extensions_CustomMetricCurrentStatus_To_v1beta1_CustomMetricCurrentStatus(in *extensions.CustomMetricCurrentStatus, out *CustomMetricCurrentStatus, s conversion.Scope) error { out.Name = in.Name - if err := api.Convert_resource_Quantity_To_resource_Quantity(&in.CurrentValue, &out.CurrentValue, s); err != nil { - return err - } + out.CurrentValue = in.CurrentValue return nil } @@ -219,17 +197,7 @@ func Convert_extensions_CustomMetricCurrentStatus_To_v1beta1_CustomMetricCurrent } func autoConvert_v1beta1_CustomMetricCurrentStatusList_To_extensions_CustomMetricCurrentStatusList(in *CustomMetricCurrentStatusList, out *extensions.CustomMetricCurrentStatusList, s conversion.Scope) error { - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]extensions.CustomMetricCurrentStatus, len(*in)) - for i := range *in { - if err := Convert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.Items = *(*[]extensions.CustomMetricCurrentStatus)(unsafe.Pointer(&in.Items)) return nil } @@ -238,16 +206,10 @@ func Convert_v1beta1_CustomMetricCurrentStatusList_To_extensions_CustomMetricCur } func autoConvert_extensions_CustomMetricCurrentStatusList_To_v1beta1_CustomMetricCurrentStatusList(in *extensions.CustomMetricCurrentStatusList, out *CustomMetricCurrentStatusList, s conversion.Scope) error { - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CustomMetricCurrentStatus, len(*in)) - for i := range *in { - if err := Convert_extensions_CustomMetricCurrentStatus_To_v1beta1_CustomMetricCurrentStatus(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } + if in.Items == nil { + out.Items = make([]CustomMetricCurrentStatus, 0) } else { - out.Items = nil + out.Items = *(*[]CustomMetricCurrentStatus)(unsafe.Pointer(&in.Items)) } return nil } @@ -258,9 +220,7 @@ func Convert_extensions_CustomMetricCurrentStatusList_To_v1beta1_CustomMetricCur func autoConvert_v1beta1_CustomMetricTarget_To_extensions_CustomMetricTarget(in *CustomMetricTarget, out *extensions.CustomMetricTarget, s conversion.Scope) error { out.Name = in.Name - if err := api.Convert_resource_Quantity_To_resource_Quantity(&in.TargetValue, &out.TargetValue, s); err != nil { - return err - } + out.TargetValue = in.TargetValue return nil } @@ -270,9 +230,7 @@ func Convert_v1beta1_CustomMetricTarget_To_extensions_CustomMetricTarget(in *Cus func autoConvert_extensions_CustomMetricTarget_To_v1beta1_CustomMetricTarget(in *extensions.CustomMetricTarget, out *CustomMetricTarget, s conversion.Scope) error { out.Name = in.Name - if err := api.Convert_resource_Quantity_To_resource_Quantity(&in.TargetValue, &out.TargetValue, s); err != nil { - return err - } + out.TargetValue = in.TargetValue return nil } @@ -281,17 +239,7 @@ func Convert_extensions_CustomMetricTarget_To_v1beta1_CustomMetricTarget(in *ext } func autoConvert_v1beta1_CustomMetricTargetList_To_extensions_CustomMetricTargetList(in *CustomMetricTargetList, out *extensions.CustomMetricTargetList, s conversion.Scope) error { - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]extensions.CustomMetricTarget, len(*in)) - for i := range *in { - if err := Convert_v1beta1_CustomMetricTarget_To_extensions_CustomMetricTarget(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.Items = *(*[]extensions.CustomMetricTarget)(unsafe.Pointer(&in.Items)) return nil } @@ -300,16 +248,10 @@ func Convert_v1beta1_CustomMetricTargetList_To_extensions_CustomMetricTargetList } func autoConvert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList(in *extensions.CustomMetricTargetList, out *CustomMetricTargetList, s conversion.Scope) error { - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CustomMetricTarget, len(*in)) - for i := range *in { - if err := Convert_extensions_CustomMetricTarget_To_v1beta1_CustomMetricTarget(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } + if in.Items == nil { + out.Items = make([]CustomMetricTarget, 0) } else { - out.Items = nil + out.Items = *(*[]CustomMetricTarget)(unsafe.Pointer(&in.Items)) } return nil } @@ -319,14 +261,7 @@ func Convert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList } func autoConvert_v1beta1_DaemonSet_To_extensions_DaemonSet(in *DaemonSet, out *extensions.DaemonSet, s conversion.Scope) error { - SetDefaults_DaemonSet(in) - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -341,13 +276,7 @@ func Convert_v1beta1_DaemonSet_To_extensions_DaemonSet(in *DaemonSet, out *exten } func autoConvert_extensions_DaemonSet_To_v1beta1_DaemonSet(in *extensions.DaemonSet, out *DaemonSet, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -362,12 +291,7 @@ func Convert_extensions_DaemonSet_To_v1beta1_DaemonSet(in *extensions.DaemonSet, } func autoConvert_v1beta1_DaemonSetList_To_extensions_DaemonSetList(in *DaemonSetList, out *extensions.DaemonSetList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]extensions.DaemonSet, len(*in)) @@ -387,12 +311,7 @@ func Convert_v1beta1_DaemonSetList_To_extensions_DaemonSetList(in *DaemonSetList } func autoConvert_extensions_DaemonSetList_To_v1beta1_DaemonSetList(in *extensions.DaemonSetList, out *DaemonSetList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]DaemonSet, len(*in)) @@ -402,7 +321,7 @@ func autoConvert_extensions_DaemonSetList_To_v1beta1_DaemonSetList(in *extension } } } else { - out.Items = nil + out.Items = make([]DaemonSet, 0) } return nil } @@ -412,18 +331,15 @@ func Convert_extensions_DaemonSetList_To_v1beta1_DaemonSetList(in *extensions.Da } func autoConvert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec(in *DaemonSetSpec, out *extensions.DaemonSetSpec, s conversion.Scope) error { - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(unversioned.LabelSelector) - if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.Selector = nil - } - if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { + out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector)) + if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } + if err := Convert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil { + return err + } + out.MinReadySeconds = in.MinReadySeconds + out.TemplateGeneration = in.TemplateGeneration return nil } @@ -432,18 +348,15 @@ func Convert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec(in *DaemonSetSpec } func autoConvert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec(in *extensions.DaemonSetSpec, out *DaemonSetSpec, s conversion.Scope) error { - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(LabelSelector) - if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.Selector = nil - } - if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { + out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector)) + if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } + if err := Convert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil { + return err + } + out.MinReadySeconds = in.MinReadySeconds + out.TemplateGeneration = in.TemplateGeneration return nil } @@ -455,6 +368,11 @@ func autoConvert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus(in *Daemo out.CurrentNumberScheduled = in.CurrentNumberScheduled out.NumberMisscheduled = in.NumberMisscheduled out.DesiredNumberScheduled = in.DesiredNumberScheduled + out.NumberReady = in.NumberReady + out.ObservedGeneration = in.ObservedGeneration + out.UpdatedNumberScheduled = in.UpdatedNumberScheduled + out.NumberAvailable = in.NumberAvailable + out.NumberUnavailable = in.NumberUnavailable return nil } @@ -466,6 +384,11 @@ func autoConvert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus(in *exten out.CurrentNumberScheduled = in.CurrentNumberScheduled out.NumberMisscheduled = in.NumberMisscheduled out.DesiredNumberScheduled = in.DesiredNumberScheduled + out.NumberReady = in.NumberReady + out.ObservedGeneration = in.ObservedGeneration + out.UpdatedNumberScheduled = in.UpdatedNumberScheduled + out.NumberAvailable = in.NumberAvailable + out.NumberUnavailable = in.NumberUnavailable return nil } @@ -473,15 +396,44 @@ func Convert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus(in *extension return autoConvert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus(in, out, s) } +func autoConvert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy(in *DaemonSetUpdateStrategy, out *extensions.DaemonSetUpdateStrategy, s conversion.Scope) error { + out.Type = extensions.DaemonSetUpdateStrategyType(in.Type) + if in.RollingUpdate != nil { + in, out := &in.RollingUpdate, &out.RollingUpdate + *out = new(extensions.RollingUpdateDaemonSet) + if err := Convert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet(*in, *out, s); err != nil { + return err + } + } else { + out.RollingUpdate = nil + } + return nil +} + +func Convert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy(in *DaemonSetUpdateStrategy, out *extensions.DaemonSetUpdateStrategy, s conversion.Scope) error { + return autoConvert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy(in, out, s) +} + +func autoConvert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy(in *extensions.DaemonSetUpdateStrategy, out *DaemonSetUpdateStrategy, s conversion.Scope) error { + out.Type = DaemonSetUpdateStrategyType(in.Type) + if in.RollingUpdate != nil { + in, out := &in.RollingUpdate, &out.RollingUpdate + *out = new(RollingUpdateDaemonSet) + if err := Convert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet(*in, *out, s); err != nil { + return err + } + } else { + out.RollingUpdate = nil + } + return nil +} + +func Convert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy(in *extensions.DaemonSetUpdateStrategy, out *DaemonSetUpdateStrategy, s conversion.Scope) error { + return autoConvert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy(in, out, s) +} + func autoConvert_v1beta1_Deployment_To_extensions_Deployment(in *Deployment, out *extensions.Deployment, s conversion.Scope) error { - SetDefaults_Deployment(in) - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -496,13 +448,7 @@ func Convert_v1beta1_Deployment_To_extensions_Deployment(in *Deployment, out *ex } func autoConvert_extensions_Deployment_To_v1beta1_Deployment(in *extensions.Deployment, out *Deployment, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -516,13 +462,36 @@ func Convert_extensions_Deployment_To_v1beta1_Deployment(in *extensions.Deployme return autoConvert_extensions_Deployment_To_v1beta1_Deployment(in, out, s) } +func autoConvert_v1beta1_DeploymentCondition_To_extensions_DeploymentCondition(in *DeploymentCondition, out *extensions.DeploymentCondition, s conversion.Scope) error { + out.Type = extensions.DeploymentConditionType(in.Type) + out.Status = api.ConditionStatus(in.Status) + out.LastUpdateTime = in.LastUpdateTime + out.LastTransitionTime = in.LastTransitionTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +func Convert_v1beta1_DeploymentCondition_To_extensions_DeploymentCondition(in *DeploymentCondition, out *extensions.DeploymentCondition, s conversion.Scope) error { + return autoConvert_v1beta1_DeploymentCondition_To_extensions_DeploymentCondition(in, out, s) +} + +func autoConvert_extensions_DeploymentCondition_To_v1beta1_DeploymentCondition(in *extensions.DeploymentCondition, out *DeploymentCondition, s conversion.Scope) error { + out.Type = DeploymentConditionType(in.Type) + out.Status = api_v1.ConditionStatus(in.Status) + out.LastUpdateTime = in.LastUpdateTime + out.LastTransitionTime = in.LastTransitionTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +func Convert_extensions_DeploymentCondition_To_v1beta1_DeploymentCondition(in *extensions.DeploymentCondition, out *DeploymentCondition, s conversion.Scope) error { + return autoConvert_extensions_DeploymentCondition_To_v1beta1_DeploymentCondition(in, out, s) +} + func autoConvert_v1beta1_DeploymentList_To_extensions_DeploymentList(in *DeploymentList, out *extensions.DeploymentList, s conversion.Scope) error { - 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]extensions.Deployment, len(*in)) @@ -542,12 +511,7 @@ func Convert_v1beta1_DeploymentList_To_extensions_DeploymentList(in *DeploymentL } func autoConvert_extensions_DeploymentList_To_v1beta1_DeploymentList(in *extensions.DeploymentList, out *DeploymentList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Deployment, len(*in)) @@ -557,7 +521,7 @@ func autoConvert_extensions_DeploymentList_To_v1beta1_DeploymentList(in *extensi } } } else { - out.Items = nil + out.Items = make([]Deployment, 0) } return nil } @@ -567,11 +531,8 @@ func Convert_extensions_DeploymentList_To_v1beta1_DeploymentList(in *extensions. } func autoConvert_v1beta1_DeploymentRollback_To_extensions_DeploymentRollback(in *DeploymentRollback, out *extensions.DeploymentRollback, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } out.Name = in.Name - out.UpdatedAnnotations = in.UpdatedAnnotations + out.UpdatedAnnotations = *(*map[string]string)(unsafe.Pointer(&in.UpdatedAnnotations)) if err := Convert_v1beta1_RollbackConfig_To_extensions_RollbackConfig(&in.RollbackTo, &out.RollbackTo, s); err != nil { return err } @@ -583,11 +544,8 @@ func Convert_v1beta1_DeploymentRollback_To_extensions_DeploymentRollback(in *Dep } func autoConvert_extensions_DeploymentRollback_To_v1beta1_DeploymentRollback(in *extensions.DeploymentRollback, out *DeploymentRollback, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } out.Name = in.Name - out.UpdatedAnnotations = in.UpdatedAnnotations + out.UpdatedAnnotations = *(*map[string]string)(unsafe.Pointer(&in.UpdatedAnnotations)) if err := Convert_extensions_RollbackConfig_To_v1beta1_RollbackConfig(&in.RollbackTo, &out.RollbackTo, s); err != nil { return err } @@ -599,70 +557,40 @@ func Convert_extensions_DeploymentRollback_To_v1beta1_DeploymentRollback(in *ext } func autoConvert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(in *DeploymentSpec, out *extensions.DeploymentSpec, s conversion.Scope) error { - if err := api.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil { + if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil { return err } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(unversioned.LabelSelector) - if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.Selector = nil - } - if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { + out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector)) + if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } if err := Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil { return err } out.MinReadySeconds = in.MinReadySeconds - out.RevisionHistoryLimit = in.RevisionHistoryLimit + out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) out.Paused = in.Paused - if in.RollbackTo != nil { - in, out := &in.RollbackTo, &out.RollbackTo - *out = new(extensions.RollbackConfig) - if err := Convert_v1beta1_RollbackConfig_To_extensions_RollbackConfig(*in, *out, s); err != nil { - return err - } - } else { - out.RollbackTo = nil - } + out.RollbackTo = (*extensions.RollbackConfig)(unsafe.Pointer(in.RollbackTo)) + out.ProgressDeadlineSeconds = (*int32)(unsafe.Pointer(in.ProgressDeadlineSeconds)) return nil } func autoConvert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(in *extensions.DeploymentSpec, out *DeploymentSpec, s conversion.Scope) error { - if err := api.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil { + if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil { return err } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(LabelSelector) - if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.Selector = nil - } - if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { + out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector)) + if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } if err := Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil { return err } out.MinReadySeconds = in.MinReadySeconds - out.RevisionHistoryLimit = in.RevisionHistoryLimit + out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit)) out.Paused = in.Paused - if in.RollbackTo != nil { - in, out := &in.RollbackTo, &out.RollbackTo - *out = new(RollbackConfig) - if err := Convert_extensions_RollbackConfig_To_v1beta1_RollbackConfig(*in, *out, s); err != nil { - return err - } - } else { - out.RollbackTo = nil - } + out.RollbackTo = (*RollbackConfig)(unsafe.Pointer(in.RollbackTo)) + out.ProgressDeadlineSeconds = (*int32)(unsafe.Pointer(in.ProgressDeadlineSeconds)) return nil } @@ -670,8 +598,10 @@ func autoConvert_v1beta1_DeploymentStatus_To_extensions_DeploymentStatus(in *Dep out.ObservedGeneration = in.ObservedGeneration out.Replicas = in.Replicas out.UpdatedReplicas = in.UpdatedReplicas + out.ReadyReplicas = in.ReadyReplicas out.AvailableReplicas = in.AvailableReplicas out.UnavailableReplicas = in.UnavailableReplicas + out.Conditions = *(*[]extensions.DeploymentCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -683,8 +613,10 @@ func autoConvert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus(in *ext out.ObservedGeneration = in.ObservedGeneration out.Replicas = in.Replicas out.UpdatedReplicas = in.UpdatedReplicas + out.ReadyReplicas = in.ReadyReplicas out.AvailableReplicas = in.AvailableReplicas out.UnavailableReplicas = in.UnavailableReplicas + out.Conditions = *(*[]DeploymentCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -720,45 +652,9 @@ func autoConvert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(in return nil } -func autoConvert_v1beta1_ExportOptions_To_api_ExportOptions(in *ExportOptions, out *api.ExportOptions, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - out.Export = in.Export - out.Exact = in.Exact - return nil -} - -func Convert_v1beta1_ExportOptions_To_api_ExportOptions(in *ExportOptions, out *api.ExportOptions, s conversion.Scope) error { - return autoConvert_v1beta1_ExportOptions_To_api_ExportOptions(in, out, s) -} - -func autoConvert_api_ExportOptions_To_v1beta1_ExportOptions(in *api.ExportOptions, out *ExportOptions, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - out.Export = in.Export - out.Exact = in.Exact - return nil -} - -func Convert_api_ExportOptions_To_v1beta1_ExportOptions(in *api.ExportOptions, out *ExportOptions, s conversion.Scope) error { - return autoConvert_api_ExportOptions_To_v1beta1_ExportOptions(in, out, s) -} - func autoConvert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions(in *FSGroupStrategyOptions, out *extensions.FSGroupStrategyOptions, s conversion.Scope) error { out.Rule = extensions.FSGroupStrategyType(in.Rule) - if in.Ranges != nil { - in, out := &in.Ranges, &out.Ranges - *out = make([]extensions.IDRange, len(*in)) - for i := range *in { - if err := Convert_v1beta1_IDRange_To_extensions_IDRange(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Ranges = nil - } + out.Ranges = *(*[]extensions.IDRange)(unsafe.Pointer(&in.Ranges)) return nil } @@ -768,17 +664,7 @@ func Convert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions func autoConvert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions(in *extensions.FSGroupStrategyOptions, out *FSGroupStrategyOptions, s conversion.Scope) error { out.Rule = FSGroupStrategyType(in.Rule) - if in.Ranges != nil { - in, out := &in.Ranges, &out.Ranges - *out = make([]IDRange, len(*in)) - for i := range *in { - if err := Convert_extensions_IDRange_To_v1beta1_IDRange(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Ranges = nil - } + out.Ranges = *(*[]IDRange)(unsafe.Pointer(&in.Ranges)) return nil } @@ -811,17 +697,7 @@ func Convert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath(in *extension } func autoConvert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue(in *HTTPIngressRuleValue, out *extensions.HTTPIngressRuleValue, s conversion.Scope) error { - if in.Paths != nil { - in, out := &in.Paths, &out.Paths - *out = make([]extensions.HTTPIngressPath, len(*in)) - for i := range *in { - if err := Convert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Paths = nil - } + out.Paths = *(*[]extensions.HTTPIngressPath)(unsafe.Pointer(&in.Paths)) return nil } @@ -830,16 +706,10 @@ func Convert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue(in } func autoConvert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in *extensions.HTTPIngressRuleValue, out *HTTPIngressRuleValue, s conversion.Scope) error { - if in.Paths != nil { - in, out := &in.Paths, &out.Paths - *out = make([]HTTPIngressPath, len(*in)) - for i := range *in { - if err := Convert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } + if in.Paths == nil { + out.Paths = make([]HTTPIngressPath, 0) } else { - out.Paths = nil + out.Paths = *(*[]HTTPIngressPath)(unsafe.Pointer(&in.Paths)) } return nil } @@ -848,141 +718,6 @@ func Convert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in return autoConvert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in, out, s) } -func autoConvert_v1beta1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { - SetDefaults_HorizontalPodAutoscaler(in) - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v1beta1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_v1beta1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { - return autoConvert_v1beta1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in, out, s) -} - -func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1beta1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1beta1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1beta1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_autoscaling_HorizontalPodAutoscaler_To_v1beta1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error { - return autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1beta1_HorizontalPodAutoscaler(in, out, s) -} - -func autoConvert_v1beta1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]autoscaling.HorizontalPodAutoscaler, len(*in)) - for i := range *in { - if err := Convert_v1beta1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_v1beta1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error { - return autoConvert_v1beta1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in, out, s) -} - -func autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v1beta1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]HorizontalPodAutoscaler, len(*in)) - for i := range *in { - if err := Convert_autoscaling_HorizontalPodAutoscaler_To_v1beta1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_autoscaling_HorizontalPodAutoscalerList_To_v1beta1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error { - return autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v1beta1_HorizontalPodAutoscalerList(in, out, s) -} - -func autoConvert_v1beta1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error { - // WARNING: in.ScaleRef requires manual conversion: does not exist in peer-type - out.MinReplicas = in.MinReplicas - out.MaxReplicas = in.MaxReplicas - // WARNING: in.CPUUtilization requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v1beta1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error { - // WARNING: in.ScaleTargetRef requires manual conversion: does not exist in peer-type - out.MinReplicas = in.MinReplicas - out.MaxReplicas = in.MaxReplicas - // WARNING: in.TargetCPUUtilizationPercentage requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error { - out.ObservedGeneration = in.ObservedGeneration - out.LastScaleTime = in.LastScaleTime - out.CurrentReplicas = in.CurrentReplicas - out.DesiredReplicas = in.DesiredReplicas - out.CurrentCPUUtilizationPercentage = in.CurrentCPUUtilizationPercentage - return nil -} - -func Convert_v1beta1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error { - return autoConvert_v1beta1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in, out, s) -} - -func autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v1beta1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error { - out.ObservedGeneration = in.ObservedGeneration - out.LastScaleTime = in.LastScaleTime - out.CurrentReplicas = in.CurrentReplicas - out.DesiredReplicas = in.DesiredReplicas - out.CurrentCPUUtilizationPercentage = in.CurrentCPUUtilizationPercentage - return nil -} - -func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1beta1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error { - return autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v1beta1_HorizontalPodAutoscalerStatus(in, out, s) -} - func autoConvert_v1beta1_HostPortRange_To_extensions_HostPortRange(in *HostPortRange, out *extensions.HostPortRange, s conversion.Scope) error { out.Min = int(in.Min) out.Max = int(in.Max) @@ -1024,13 +759,7 @@ func Convert_extensions_IDRange_To_v1beta1_IDRange(in *extensions.IDRange, out * } func autoConvert_v1beta1_Ingress_To_extensions_Ingress(in *Ingress, out *extensions.Ingress, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_IngressSpec_To_extensions_IngressSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1045,13 +774,7 @@ func Convert_v1beta1_Ingress_To_extensions_Ingress(in *Ingress, out *extensions. } func autoConvert_extensions_Ingress_To_v1beta1_Ingress(in *extensions.Ingress, out *Ingress, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_IngressSpec_To_v1beta1_IngressSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1067,9 +790,7 @@ func Convert_extensions_Ingress_To_v1beta1_Ingress(in *extensions.Ingress, out * func autoConvert_v1beta1_IngressBackend_To_extensions_IngressBackend(in *IngressBackend, out *extensions.IngressBackend, s conversion.Scope) error { out.ServiceName = in.ServiceName - if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.ServicePort, &out.ServicePort, s); err != nil { - return err - } + out.ServicePort = in.ServicePort return nil } @@ -1079,9 +800,7 @@ func Convert_v1beta1_IngressBackend_To_extensions_IngressBackend(in *IngressBack func autoConvert_extensions_IngressBackend_To_v1beta1_IngressBackend(in *extensions.IngressBackend, out *IngressBackend, s conversion.Scope) error { out.ServiceName = in.ServiceName - if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.ServicePort, &out.ServicePort, s); err != nil { - return err - } + out.ServicePort = in.ServicePort return nil } @@ -1090,23 +809,8 @@ func Convert_extensions_IngressBackend_To_v1beta1_IngressBackend(in *extensions. } func autoConvert_v1beta1_IngressList_To_extensions_IngressList(in *IngressList, out *extensions.IngressList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]extensions.Ingress, len(*in)) - for i := range *in { - if err := Convert_v1beta1_Ingress_To_extensions_Ingress(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.ListMeta = in.ListMeta + out.Items = *(*[]extensions.Ingress)(unsafe.Pointer(&in.Items)) return nil } @@ -1115,22 +819,11 @@ func Convert_v1beta1_IngressList_To_extensions_IngressList(in *IngressList, out } func autoConvert_extensions_IngressList_To_v1beta1_IngressList(in *extensions.IngressList, out *IngressList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Ingress, len(*in)) - for i := range *in { - if err := Convert_extensions_Ingress_To_v1beta1_Ingress(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]Ingress, 0) } else { - out.Items = nil + out.Items = *(*[]Ingress)(unsafe.Pointer(&in.Items)) } return nil } @@ -1164,15 +857,7 @@ func Convert_extensions_IngressRule_To_v1beta1_IngressRule(in *extensions.Ingres } func autoConvert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue(in *IngressRuleValue, out *extensions.IngressRuleValue, s conversion.Scope) error { - if in.HTTP != nil { - in, out := &in.HTTP, &out.HTTP - *out = new(extensions.HTTPIngressRuleValue) - if err := Convert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue(*in, *out, s); err != nil { - return err - } - } else { - out.HTTP = nil - } + out.HTTP = (*extensions.HTTPIngressRuleValue)(unsafe.Pointer(in.HTTP)) return nil } @@ -1181,15 +866,7 @@ func Convert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue(in *Ingress } func autoConvert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue(in *extensions.IngressRuleValue, out *IngressRuleValue, s conversion.Scope) error { - if in.HTTP != nil { - in, out := &in.HTTP, &out.HTTP - *out = new(HTTPIngressRuleValue) - if err := Convert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(*in, *out, s); err != nil { - return err - } - } else { - out.HTTP = nil - } + out.HTTP = (*HTTPIngressRuleValue)(unsafe.Pointer(in.HTTP)) return nil } @@ -1198,37 +875,9 @@ func Convert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue(in *extensi } func autoConvert_v1beta1_IngressSpec_To_extensions_IngressSpec(in *IngressSpec, out *extensions.IngressSpec, s conversion.Scope) error { - if in.Backend != nil { - in, out := &in.Backend, &out.Backend - *out = new(extensions.IngressBackend) - if err := Convert_v1beta1_IngressBackend_To_extensions_IngressBackend(*in, *out, s); err != nil { - return err - } - } else { - out.Backend = nil - } - if in.TLS != nil { - in, out := &in.TLS, &out.TLS - *out = make([]extensions.IngressTLS, len(*in)) - for i := range *in { - if err := Convert_v1beta1_IngressTLS_To_extensions_IngressTLS(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.TLS = nil - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]extensions.IngressRule, len(*in)) - for i := range *in { - if err := Convert_v1beta1_IngressRule_To_extensions_IngressRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Rules = nil - } + out.Backend = (*extensions.IngressBackend)(unsafe.Pointer(in.Backend)) + out.TLS = *(*[]extensions.IngressTLS)(unsafe.Pointer(&in.TLS)) + out.Rules = *(*[]extensions.IngressRule)(unsafe.Pointer(&in.Rules)) return nil } @@ -1237,37 +886,9 @@ func Convert_v1beta1_IngressSpec_To_extensions_IngressSpec(in *IngressSpec, out } func autoConvert_extensions_IngressSpec_To_v1beta1_IngressSpec(in *extensions.IngressSpec, out *IngressSpec, s conversion.Scope) error { - if in.Backend != nil { - in, out := &in.Backend, &out.Backend - *out = new(IngressBackend) - if err := Convert_extensions_IngressBackend_To_v1beta1_IngressBackend(*in, *out, s); err != nil { - return err - } - } else { - out.Backend = nil - } - if in.TLS != nil { - in, out := &in.TLS, &out.TLS - *out = make([]IngressTLS, len(*in)) - for i := range *in { - if err := Convert_extensions_IngressTLS_To_v1beta1_IngressTLS(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.TLS = nil - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]IngressRule, len(*in)) - for i := range *in { - if err := Convert_extensions_IngressRule_To_v1beta1_IngressRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Rules = nil - } + out.Backend = (*IngressBackend)(unsafe.Pointer(in.Backend)) + out.TLS = *(*[]IngressTLS)(unsafe.Pointer(&in.TLS)) + out.Rules = *(*[]IngressRule)(unsafe.Pointer(&in.Rules)) return nil } @@ -1300,7 +921,7 @@ func Convert_extensions_IngressStatus_To_v1beta1_IngressStatus(in *extensions.In } func autoConvert_v1beta1_IngressTLS_To_extensions_IngressTLS(in *IngressTLS, out *extensions.IngressTLS, s conversion.Scope) error { - out.Hosts = in.Hosts + out.Hosts = *(*[]string)(unsafe.Pointer(&in.Hosts)) out.SecretName = in.SecretName return nil } @@ -1310,7 +931,7 @@ func Convert_v1beta1_IngressTLS_To_extensions_IngressTLS(in *IngressTLS, out *ex } func autoConvert_extensions_IngressTLS_To_v1beta1_IngressTLS(in *extensions.IngressTLS, out *IngressTLS, s conversion.Scope) error { - out.Hosts = in.Hosts + out.Hosts = *(*[]string)(unsafe.Pointer(&in.Hosts)) out.SecretName = in.SecretName return nil } @@ -1319,334 +940,8 @@ func Convert_extensions_IngressTLS_To_v1beta1_IngressTLS(in *extensions.IngressT return autoConvert_extensions_IngressTLS_To_v1beta1_IngressTLS(in, out, s) } -func autoConvert_v1beta1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { - SetDefaults_Job(in) - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v1beta1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_JobStatus_To_batch_JobStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_v1beta1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { - return autoConvert_v1beta1_Job_To_batch_Job(in, out, s) -} - -func autoConvert_batch_Job_To_v1beta1_Job(in *batch.Job, out *Job, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_batch_JobSpec_To_v1beta1_JobSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_batch_JobStatus_To_v1beta1_JobStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_batch_Job_To_v1beta1_Job(in *batch.Job, out *Job, s conversion.Scope) error { - return autoConvert_batch_Job_To_v1beta1_Job(in, out, s) -} - -func autoConvert_v1beta1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error { - out.Type = batch.JobConditionType(in.Type) - out.Status = api.ConditionStatus(in.Status) - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil { - return err - } - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil { - return err - } - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -func Convert_v1beta1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error { - return autoConvert_v1beta1_JobCondition_To_batch_JobCondition(in, out, s) -} - -func autoConvert_batch_JobCondition_To_v1beta1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error { - out.Type = JobConditionType(in.Type) - out.Status = v1.ConditionStatus(in.Status) - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil { - return err - } - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil { - return err - } - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -func Convert_batch_JobCondition_To_v1beta1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error { - return autoConvert_batch_JobCondition_To_v1beta1_JobCondition(in, out, s) -} - -func autoConvert_v1beta1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]batch.Job, len(*in)) - for i := range *in { - if err := Convert_v1beta1_Job_To_batch_Job(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_v1beta1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error { - return autoConvert_v1beta1_JobList_To_batch_JobList(in, out, s) -} - -func autoConvert_batch_JobList_To_v1beta1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Job, len(*in)) - for i := range *in { - if err := Convert_batch_Job_To_v1beta1_Job(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_batch_JobList_To_v1beta1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error { - return autoConvert_batch_JobList_To_v1beta1_JobList(in, out, s) -} - -func autoConvert_v1beta1_JobSpec_To_batch_JobSpec(in *JobSpec, out *batch.JobSpec, s conversion.Scope) error { - out.Parallelism = in.Parallelism - out.Completions = in.Completions - out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(unversioned.LabelSelector) - if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.Selector = nil - } - // WARNING: in.AutoSelector requires manual conversion: does not exist in peer-type - if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -func autoConvert_batch_JobSpec_To_v1beta1_JobSpec(in *batch.JobSpec, out *JobSpec, s conversion.Scope) error { - out.Parallelism = in.Parallelism - out.Completions = in.Completions - out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(LabelSelector) - if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.Selector = nil - } - // WARNING: in.ManualSelector requires manual conversion: does not exist in peer-type - if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]batch.JobCondition, len(*in)) - for i := range *in { - if err := Convert_v1beta1_JobCondition_To_batch_JobCondition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - out.StartTime = in.StartTime - out.CompletionTime = in.CompletionTime - out.Active = in.Active - out.Succeeded = in.Succeeded - out.Failed = in.Failed - return nil -} - -func Convert_v1beta1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error { - return autoConvert_v1beta1_JobStatus_To_batch_JobStatus(in, out, s) -} - -func autoConvert_batch_JobStatus_To_v1beta1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]JobCondition, len(*in)) - for i := range *in { - if err := Convert_batch_JobCondition_To_v1beta1_JobCondition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - out.StartTime = in.StartTime - out.CompletionTime = in.CompletionTime - out.Active = in.Active - out.Succeeded = in.Succeeded - out.Failed = in.Failed - return nil -} - -func Convert_batch_JobStatus_To_v1beta1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error { - return autoConvert_batch_JobStatus_To_v1beta1_JobStatus(in, out, s) -} - -func autoConvert_v1beta1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error { - out.MatchLabels = in.MatchLabels - if in.MatchExpressions != nil { - in, out := &in.MatchExpressions, &out.MatchExpressions - *out = make([]unversioned.LabelSelectorRequirement, len(*in)) - for i := range *in { - if err := Convert_v1beta1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.MatchExpressions = nil - } - return nil -} - -func Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(in *LabelSelector, out *unversioned.LabelSelector, s conversion.Scope) error { - return autoConvert_v1beta1_LabelSelector_To_unversioned_LabelSelector(in, out, s) -} - -func autoConvert_unversioned_LabelSelector_To_v1beta1_LabelSelector(in *unversioned.LabelSelector, out *LabelSelector, s conversion.Scope) error { - out.MatchLabels = in.MatchLabels - if in.MatchExpressions != nil { - in, out := &in.MatchExpressions, &out.MatchExpressions - *out = make([]LabelSelectorRequirement, len(*in)) - for i := range *in { - if err := Convert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.MatchExpressions = nil - } - return nil -} - -func Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(in *unversioned.LabelSelector, out *LabelSelector, s conversion.Scope) error { - return autoConvert_unversioned_LabelSelector_To_v1beta1_LabelSelector(in, out, s) -} - -func autoConvert_v1beta1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in *LabelSelectorRequirement, out *unversioned.LabelSelectorRequirement, s conversion.Scope) error { - out.Key = in.Key - out.Operator = unversioned.LabelSelectorOperator(in.Operator) - out.Values = in.Values - return nil -} - -func Convert_v1beta1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in *LabelSelectorRequirement, out *unversioned.LabelSelectorRequirement, s conversion.Scope) error { - return autoConvert_v1beta1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement(in, out, s) -} - -func autoConvert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement(in *unversioned.LabelSelectorRequirement, out *LabelSelectorRequirement, s conversion.Scope) error { - out.Key = in.Key - out.Operator = LabelSelectorOperator(in.Operator) - out.Values = in.Values - return nil -} - -func Convert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement(in *unversioned.LabelSelectorRequirement, out *LabelSelectorRequirement, s conversion.Scope) error { - return autoConvert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement(in, out, s) -} - -func autoConvert_v1beta1_ListOptions_To_api_ListOptions(in *ListOptions, out *api.ListOptions, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_string_To_labels_Selector(&in.LabelSelector, &out.LabelSelector, s); err != nil { - return err - } - if err := api.Convert_string_To_fields_Selector(&in.FieldSelector, &out.FieldSelector, s); err != nil { - return err - } - out.Watch = in.Watch - out.ResourceVersion = in.ResourceVersion - out.TimeoutSeconds = in.TimeoutSeconds - return nil -} - -func Convert_v1beta1_ListOptions_To_api_ListOptions(in *ListOptions, out *api.ListOptions, s conversion.Scope) error { - return autoConvert_v1beta1_ListOptions_To_api_ListOptions(in, out, s) -} - -func autoConvert_api_ListOptions_To_v1beta1_ListOptions(in *api.ListOptions, out *ListOptions, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_labels_Selector_To_string(&in.LabelSelector, &out.LabelSelector, s); err != nil { - return err - } - if err := api.Convert_fields_Selector_To_string(&in.FieldSelector, &out.FieldSelector, s); err != nil { - return err - } - out.Watch = in.Watch - out.ResourceVersion = in.ResourceVersion - out.TimeoutSeconds = in.TimeoutSeconds - return nil -} - -func Convert_api_ListOptions_To_v1beta1_ListOptions(in *api.ListOptions, out *ListOptions, s conversion.Scope) error { - return autoConvert_api_ListOptions_To_v1beta1_ListOptions(in, out, s) -} - func autoConvert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy, out *extensions.NetworkPolicy, s conversion.Scope) error { - SetDefaults_NetworkPolicy(in) - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1658,13 +953,7 @@ func Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy } func autoConvert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy(in *extensions.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1676,28 +965,8 @@ func Convert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy(in *extensions.Ne } func autoConvert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule(in *NetworkPolicyIngressRule, out *extensions.NetworkPolicyIngressRule, s conversion.Scope) error { - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]extensions.NetworkPolicyPort, len(*in)) - for i := range *in { - if err := Convert_v1beta1_NetworkPolicyPort_To_extensions_NetworkPolicyPort(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Ports = nil - } - if in.From != nil { - in, out := &in.From, &out.From - *out = make([]extensions.NetworkPolicyPeer, len(*in)) - for i := range *in { - if err := Convert_v1beta1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.From = nil - } + out.Ports = *(*[]extensions.NetworkPolicyPort)(unsafe.Pointer(&in.Ports)) + out.From = *(*[]extensions.NetworkPolicyPeer)(unsafe.Pointer(&in.From)) return nil } @@ -1706,28 +975,8 @@ func Convert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngress } func autoConvert_extensions_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule(in *extensions.NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, s conversion.Scope) error { - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]NetworkPolicyPort, len(*in)) - for i := range *in { - if err := Convert_extensions_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Ports = nil - } - if in.From != nil { - in, out := &in.From, &out.From - *out = make([]NetworkPolicyPeer, len(*in)) - for i := range *in { - if err := Convert_extensions_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.From = nil - } + out.Ports = *(*[]NetworkPolicyPort)(unsafe.Pointer(&in.Ports)) + out.From = *(*[]NetworkPolicyPeer)(unsafe.Pointer(&in.From)) return nil } @@ -1736,23 +985,8 @@ func Convert_extensions_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngress } func autoConvert_v1beta1_NetworkPolicyList_To_extensions_NetworkPolicyList(in *NetworkPolicyList, out *extensions.NetworkPolicyList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]extensions.NetworkPolicy, len(*in)) - for i := range *in { - if err := Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.ListMeta = in.ListMeta + out.Items = *(*[]extensions.NetworkPolicy)(unsafe.Pointer(&in.Items)) return nil } @@ -1761,22 +995,11 @@ func Convert_v1beta1_NetworkPolicyList_To_extensions_NetworkPolicyList(in *Netwo } func autoConvert_extensions_NetworkPolicyList_To_v1beta1_NetworkPolicyList(in *extensions.NetworkPolicyList, out *NetworkPolicyList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]NetworkPolicy, len(*in)) - for i := range *in { - if err := Convert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]NetworkPolicy, 0) } else { - out.Items = nil + out.Items = *(*[]NetworkPolicy)(unsafe.Pointer(&in.Items)) } return nil } @@ -1786,24 +1009,8 @@ func Convert_extensions_NetworkPolicyList_To_v1beta1_NetworkPolicyList(in *exten } func autoConvert_v1beta1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer(in *NetworkPolicyPeer, out *extensions.NetworkPolicyPeer, s conversion.Scope) error { - if in.PodSelector != nil { - in, out := &in.PodSelector, &out.PodSelector - *out = new(unversioned.LabelSelector) - if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.PodSelector = nil - } - if in.NamespaceSelector != nil { - in, out := &in.NamespaceSelector, &out.NamespaceSelector - *out = new(unversioned.LabelSelector) - if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.NamespaceSelector = nil - } + out.PodSelector = (*v1.LabelSelector)(unsafe.Pointer(in.PodSelector)) + out.NamespaceSelector = (*v1.LabelSelector)(unsafe.Pointer(in.NamespaceSelector)) return nil } @@ -1812,24 +1019,8 @@ func Convert_v1beta1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer(in *Netwo } func autoConvert_extensions_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer(in *extensions.NetworkPolicyPeer, out *NetworkPolicyPeer, s conversion.Scope) error { - if in.PodSelector != nil { - in, out := &in.PodSelector, &out.PodSelector - *out = new(LabelSelector) - if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.PodSelector = nil - } - if in.NamespaceSelector != nil { - in, out := &in.NamespaceSelector, &out.NamespaceSelector - *out = new(LabelSelector) - if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.NamespaceSelector = nil - } + out.PodSelector = (*v1.LabelSelector)(unsafe.Pointer(in.PodSelector)) + out.NamespaceSelector = (*v1.LabelSelector)(unsafe.Pointer(in.NamespaceSelector)) return nil } @@ -1838,14 +1029,8 @@ func Convert_extensions_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer(in *exten } func autoConvert_v1beta1_NetworkPolicyPort_To_extensions_NetworkPolicyPort(in *NetworkPolicyPort, out *extensions.NetworkPolicyPort, s conversion.Scope) error { - if in.Protocol != nil { - in, out := &in.Protocol, &out.Protocol - *out = new(api.Protocol) - **out = api.Protocol(**in) - } else { - out.Protocol = nil - } - out.Port = in.Port + out.Protocol = (*api.Protocol)(unsafe.Pointer(in.Protocol)) + out.Port = (*intstr.IntOrString)(unsafe.Pointer(in.Port)) return nil } @@ -1854,14 +1039,8 @@ func Convert_v1beta1_NetworkPolicyPort_To_extensions_NetworkPolicyPort(in *Netwo } func autoConvert_extensions_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort(in *extensions.NetworkPolicyPort, out *NetworkPolicyPort, s conversion.Scope) error { - if in.Protocol != nil { - in, out := &in.Protocol, &out.Protocol - *out = new(v1.Protocol) - **out = v1.Protocol(**in) - } else { - out.Protocol = nil - } - out.Port = in.Port + out.Protocol = (*api_v1.Protocol)(unsafe.Pointer(in.Protocol)) + out.Port = (*intstr.IntOrString)(unsafe.Pointer(in.Port)) return nil } @@ -1870,20 +1049,8 @@ func Convert_extensions_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort(in *exten } func autoConvert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(in *NetworkPolicySpec, out *extensions.NetworkPolicySpec, s conversion.Scope) error { - if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(&in.PodSelector, &out.PodSelector, s); err != nil { - return err - } - if in.Ingress != nil { - in, out := &in.Ingress, &out.Ingress - *out = make([]extensions.NetworkPolicyIngressRule, len(*in)) - for i := range *in { - if err := Convert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Ingress = nil - } + out.PodSelector = in.PodSelector + out.Ingress = *(*[]extensions.NetworkPolicyIngressRule)(unsafe.Pointer(&in.Ingress)) return nil } @@ -1892,20 +1059,8 @@ func Convert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(in *Netwo } func autoConvert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(in *extensions.NetworkPolicySpec, out *NetworkPolicySpec, s conversion.Scope) error { - if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(&in.PodSelector, &out.PodSelector, s); err != nil { - return err - } - if in.Ingress != nil { - in, out := &in.Ingress, &out.Ingress - *out = make([]NetworkPolicyIngressRule, len(*in)) - for i := range *in { - if err := Convert_extensions_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Ingress = nil - } + out.PodSelector = in.PodSelector + out.Ingress = *(*[]NetworkPolicyIngressRule)(unsafe.Pointer(&in.Ingress)) return nil } @@ -1914,13 +1069,7 @@ func Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(in *exten } func autoConvert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in *PodSecurityPolicy, out *extensions.PodSecurityPolicy, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1932,13 +1081,7 @@ func Convert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in *PodSe } func autoConvert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *extensions.PodSecurityPolicy, out *PodSecurityPolicy, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1950,12 +1093,7 @@ func Convert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *exten } func autoConvert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList(in *PodSecurityPolicyList, out *extensions.PodSecurityPolicyList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]extensions.PodSecurityPolicy, len(*in)) @@ -1975,12 +1113,7 @@ func Convert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList(i } func autoConvert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList(in *extensions.PodSecurityPolicyList, out *PodSecurityPolicyList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PodSecurityPolicy, len(*in)) @@ -1990,7 +1123,7 @@ func autoConvert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyLi } } } else { - out.Items = nil + out.Items = make([]PodSecurityPolicy, 0) } return nil } @@ -2001,42 +1134,10 @@ func Convert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList(i func autoConvert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(in *PodSecurityPolicySpec, out *extensions.PodSecurityPolicySpec, s conversion.Scope) error { out.Privileged = in.Privileged - if in.DefaultAddCapabilities != nil { - in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities - *out = make([]api.Capability, len(*in)) - for i := range *in { - (*out)[i] = api.Capability((*in)[i]) - } - } else { - out.DefaultAddCapabilities = nil - } - if in.RequiredDropCapabilities != nil { - in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities - *out = make([]api.Capability, len(*in)) - for i := range *in { - (*out)[i] = api.Capability((*in)[i]) - } - } else { - out.RequiredDropCapabilities = nil - } - if in.AllowedCapabilities != nil { - in, out := &in.AllowedCapabilities, &out.AllowedCapabilities - *out = make([]api.Capability, len(*in)) - for i := range *in { - (*out)[i] = api.Capability((*in)[i]) - } - } else { - out.AllowedCapabilities = nil - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]extensions.FSType, len(*in)) - for i := range *in { - (*out)[i] = extensions.FSType((*in)[i]) - } - } else { - out.Volumes = nil - } + out.DefaultAddCapabilities = *(*[]api.Capability)(unsafe.Pointer(&in.DefaultAddCapabilities)) + out.RequiredDropCapabilities = *(*[]api.Capability)(unsafe.Pointer(&in.RequiredDropCapabilities)) + out.AllowedCapabilities = *(*[]api.Capability)(unsafe.Pointer(&in.AllowedCapabilities)) + out.Volumes = *(*[]extensions.FSType)(unsafe.Pointer(&in.Volumes)) out.HostNetwork = in.HostNetwork if in.HostPorts != nil { in, out := &in.HostPorts, &out.HostPorts @@ -2073,42 +1174,10 @@ func Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(i func autoConvert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(in *extensions.PodSecurityPolicySpec, out *PodSecurityPolicySpec, s conversion.Scope) error { out.Privileged = in.Privileged - if in.DefaultAddCapabilities != nil { - in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities - *out = make([]v1.Capability, len(*in)) - for i := range *in { - (*out)[i] = v1.Capability((*in)[i]) - } - } else { - out.DefaultAddCapabilities = nil - } - if in.RequiredDropCapabilities != nil { - in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities - *out = make([]v1.Capability, len(*in)) - for i := range *in { - (*out)[i] = v1.Capability((*in)[i]) - } - } else { - out.RequiredDropCapabilities = nil - } - if in.AllowedCapabilities != nil { - in, out := &in.AllowedCapabilities, &out.AllowedCapabilities - *out = make([]v1.Capability, len(*in)) - for i := range *in { - (*out)[i] = v1.Capability((*in)[i]) - } - } else { - out.AllowedCapabilities = nil - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]FSType, len(*in)) - for i := range *in { - (*out)[i] = FSType((*in)[i]) - } - } else { - out.Volumes = nil - } + out.DefaultAddCapabilities = *(*[]api_v1.Capability)(unsafe.Pointer(&in.DefaultAddCapabilities)) + out.RequiredDropCapabilities = *(*[]api_v1.Capability)(unsafe.Pointer(&in.RequiredDropCapabilities)) + out.AllowedCapabilities = *(*[]api_v1.Capability)(unsafe.Pointer(&in.AllowedCapabilities)) + out.Volumes = *(*[]FSType)(unsafe.Pointer(&in.Volumes)) out.HostNetwork = in.HostNetwork if in.HostPorts != nil { in, out := &in.HostPorts, &out.HostPorts @@ -2144,14 +1213,7 @@ func Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(i } func autoConvert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *extensions.ReplicaSet, s conversion.Scope) error { - SetDefaults_ReplicaSet(in) - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2166,13 +1228,7 @@ func Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *ex } func autoConvert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in *extensions.ReplicaSet, out *ReplicaSet, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2186,13 +1242,34 @@ func Convert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in *extensions.ReplicaS return autoConvert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in, out, s) } +func autoConvert_v1beta1_ReplicaSetCondition_To_extensions_ReplicaSetCondition(in *ReplicaSetCondition, out *extensions.ReplicaSetCondition, s conversion.Scope) error { + out.Type = extensions.ReplicaSetConditionType(in.Type) + out.Status = api.ConditionStatus(in.Status) + out.LastTransitionTime = in.LastTransitionTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +func Convert_v1beta1_ReplicaSetCondition_To_extensions_ReplicaSetCondition(in *ReplicaSetCondition, out *extensions.ReplicaSetCondition, s conversion.Scope) error { + return autoConvert_v1beta1_ReplicaSetCondition_To_extensions_ReplicaSetCondition(in, out, s) +} + +func autoConvert_extensions_ReplicaSetCondition_To_v1beta1_ReplicaSetCondition(in *extensions.ReplicaSetCondition, out *ReplicaSetCondition, s conversion.Scope) error { + out.Type = ReplicaSetConditionType(in.Type) + out.Status = api_v1.ConditionStatus(in.Status) + out.LastTransitionTime = in.LastTransitionTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +func Convert_extensions_ReplicaSetCondition_To_v1beta1_ReplicaSetCondition(in *extensions.ReplicaSetCondition, out *ReplicaSetCondition, s conversion.Scope) error { + return autoConvert_extensions_ReplicaSetCondition_To_v1beta1_ReplicaSetCondition(in, out, s) +} + func autoConvert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList(in *ReplicaSetList, out *extensions.ReplicaSetList, s conversion.Scope) error { - 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]extensions.ReplicaSet, len(*in)) @@ -2212,12 +1289,7 @@ func Convert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList(in *ReplicaSetL } func autoConvert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList(in *extensions.ReplicaSetList, out *ReplicaSetList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ReplicaSet, len(*in)) @@ -2227,7 +1299,7 @@ func autoConvert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList(in *extensi } } } else { - out.Items = nil + out.Items = make([]ReplicaSet, 0) } return nil } @@ -2237,38 +1309,24 @@ func Convert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList(in *extensions. } func autoConvert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(in *ReplicaSetSpec, out *extensions.ReplicaSetSpec, s conversion.Scope) error { - if err := api.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil { + if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil { return err } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(unversioned.LabelSelector) - if err := Convert_v1beta1_LabelSelector_To_unversioned_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.Selector = nil - } - if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { + out.MinReadySeconds = in.MinReadySeconds + out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector)) + if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } return nil } func autoConvert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(in *extensions.ReplicaSetSpec, out *ReplicaSetSpec, s conversion.Scope) error { - if err := api.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil { + if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil { return err } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(LabelSelector) - if err := Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector(*in, *out, s); err != nil { - return err - } - } else { - out.Selector = nil - } - if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { + out.MinReadySeconds = in.MinReadySeconds + out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector)) + if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } return nil @@ -2278,7 +1336,9 @@ func autoConvert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus(in *Rep out.Replicas = in.Replicas out.FullyLabeledReplicas = in.FullyLabeledReplicas out.ReadyReplicas = in.ReadyReplicas + out.AvailableReplicas = in.AvailableReplicas out.ObservedGeneration = in.ObservedGeneration + out.Conditions = *(*[]extensions.ReplicaSetCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -2290,7 +1350,9 @@ func autoConvert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus(in *ext out.Replicas = in.Replicas out.FullyLabeledReplicas = in.FullyLabeledReplicas out.ReadyReplicas = in.ReadyReplicas + out.AvailableReplicas = in.AvailableReplicas out.ObservedGeneration = in.ObservedGeneration + out.Conditions = *(*[]ReplicaSetCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -2299,9 +1361,6 @@ func Convert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus(in *extensi } func autoConvert_v1beta1_ReplicationControllerDummy_To_extensions_ReplicationControllerDummy(in *ReplicationControllerDummy, out *extensions.ReplicationControllerDummy, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } return nil } @@ -2310,9 +1369,6 @@ func Convert_v1beta1_ReplicationControllerDummy_To_extensions_ReplicationControl } func autoConvert_extensions_ReplicationControllerDummy_To_v1beta1_ReplicationControllerDummy(in *extensions.ReplicationControllerDummy, out *ReplicationControllerDummy, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } return nil } @@ -2338,31 +1394,31 @@ func Convert_extensions_RollbackConfig_To_v1beta1_RollbackConfig(in *extensions. return autoConvert_extensions_RollbackConfig_To_v1beta1_RollbackConfig(in, out, s) } +func autoConvert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet(in *RollingUpdateDaemonSet, out *extensions.RollingUpdateDaemonSet, s conversion.Scope) error { + // WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/util/intstr.IntOrString vs k8s.io/apimachinery/pkg/util/intstr.IntOrString) + return nil +} + +func autoConvert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet(in *extensions.RollingUpdateDaemonSet, out *RollingUpdateDaemonSet, s conversion.Scope) error { + // WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (k8s.io/apimachinery/pkg/util/intstr.IntOrString vs *k8s.io/apimachinery/pkg/util/intstr.IntOrString) + return nil +} + func autoConvert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(in *RollingUpdateDeployment, out *extensions.RollingUpdateDeployment, s conversion.Scope) error { - // WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (*k8s.io/kubernetes/pkg/util/intstr.IntOrString vs k8s.io/kubernetes/pkg/util/intstr.IntOrString) - // WARNING: in.MaxSurge requires manual conversion: inconvertible types (*k8s.io/kubernetes/pkg/util/intstr.IntOrString vs k8s.io/kubernetes/pkg/util/intstr.IntOrString) + // WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/util/intstr.IntOrString vs k8s.io/apimachinery/pkg/util/intstr.IntOrString) + // WARNING: in.MaxSurge requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/util/intstr.IntOrString vs k8s.io/apimachinery/pkg/util/intstr.IntOrString) return nil } func autoConvert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(in *extensions.RollingUpdateDeployment, out *RollingUpdateDeployment, s conversion.Scope) error { - // WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (k8s.io/kubernetes/pkg/util/intstr.IntOrString vs *k8s.io/kubernetes/pkg/util/intstr.IntOrString) - // WARNING: in.MaxSurge requires manual conversion: inconvertible types (k8s.io/kubernetes/pkg/util/intstr.IntOrString vs *k8s.io/kubernetes/pkg/util/intstr.IntOrString) + // WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (k8s.io/apimachinery/pkg/util/intstr.IntOrString vs *k8s.io/apimachinery/pkg/util/intstr.IntOrString) + // WARNING: in.MaxSurge requires manual conversion: inconvertible types (k8s.io/apimachinery/pkg/util/intstr.IntOrString vs *k8s.io/apimachinery/pkg/util/intstr.IntOrString) return nil } func autoConvert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(in *RunAsUserStrategyOptions, out *extensions.RunAsUserStrategyOptions, s conversion.Scope) error { out.Rule = extensions.RunAsUserStrategy(in.Rule) - if in.Ranges != nil { - in, out := &in.Ranges, &out.Ranges - *out = make([]extensions.IDRange, len(*in)) - for i := range *in { - if err := Convert_v1beta1_IDRange_To_extensions_IDRange(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Ranges = nil - } + out.Ranges = *(*[]extensions.IDRange)(unsafe.Pointer(&in.Ranges)) return nil } @@ -2372,17 +1428,7 @@ func Convert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOpt func autoConvert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(in *extensions.RunAsUserStrategyOptions, out *RunAsUserStrategyOptions, s conversion.Scope) error { out.Rule = RunAsUserStrategy(in.Rule) - if in.Ranges != nil { - in, out := &in.Ranges, &out.Ranges - *out = make([]IDRange, len(*in)) - for i := range *in { - if err := Convert_extensions_IDRange_To_v1beta1_IDRange(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Ranges = nil - } + out.Ranges = *(*[]IDRange)(unsafe.Pointer(&in.Ranges)) return nil } @@ -2392,16 +1438,7 @@ func Convert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOpt func autoConvert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions(in *SELinuxStrategyOptions, out *extensions.SELinuxStrategyOptions, s conversion.Scope) error { out.Rule = extensions.SELinuxStrategy(in.Rule) - if in.SELinuxOptions != nil { - in, out := &in.SELinuxOptions, &out.SELinuxOptions - *out = new(api.SELinuxOptions) - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(*in, *out, 0); err != nil { - return err - } - } else { - out.SELinuxOptions = nil - } + out.SELinuxOptions = (*api.SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions)) return nil } @@ -2411,16 +1448,7 @@ func Convert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions func autoConvert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions(in *extensions.SELinuxStrategyOptions, out *SELinuxStrategyOptions, s conversion.Scope) error { out.Rule = SELinuxStrategy(in.Rule) - if in.SELinuxOptions != nil { - in, out := &in.SELinuxOptions, &out.SELinuxOptions - *out = new(v1.SELinuxOptions) - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(*in, *out, 0); err != nil { - return err - } - } else { - out.SELinuxOptions = nil - } + out.SELinuxOptions = (*api_v1.SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions)) return nil } @@ -2429,13 +1457,7 @@ func Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions } func autoConvert_v1beta1_Scale_To_extensions_Scale(in *Scale, out *extensions.Scale, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2450,13 +1472,7 @@ func Convert_v1beta1_Scale_To_extensions_Scale(in *Scale, out *extensions.Scale, } func autoConvert_extensions_Scale_To_v1beta1_Scale(in *extensions.Scale, out *Scale, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2490,30 +1506,20 @@ func Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in *extensions.ScaleSpec, func autoConvert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(in *ScaleStatus, out *extensions.ScaleStatus, s conversion.Scope) error { out.Replicas = in.Replicas - // WARNING: in.Selector requires manual conversion: inconvertible types (map[string]string vs *k8s.io/kubernetes/pkg/api/unversioned.LabelSelector) + // WARNING: in.Selector requires manual conversion: inconvertible types (map[string]string vs *k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector) // WARNING: in.TargetSelector requires manual conversion: does not exist in peer-type return nil } func autoConvert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(in *extensions.ScaleStatus, out *ScaleStatus, s conversion.Scope) error { out.Replicas = in.Replicas - // WARNING: in.Selector requires manual conversion: inconvertible types (*k8s.io/kubernetes/pkg/api/unversioned.LabelSelector vs map[string]string) + // WARNING: in.Selector requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector vs map[string]string) return nil } func autoConvert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions(in *SupplementalGroupsStrategyOptions, out *extensions.SupplementalGroupsStrategyOptions, s conversion.Scope) error { out.Rule = extensions.SupplementalGroupsStrategyType(in.Rule) - if in.Ranges != nil { - in, out := &in.Ranges, &out.Ranges - *out = make([]extensions.IDRange, len(*in)) - for i := range *in { - if err := Convert_v1beta1_IDRange_To_extensions_IDRange(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Ranges = nil - } + out.Ranges = *(*[]extensions.IDRange)(unsafe.Pointer(&in.Ranges)) return nil } @@ -2523,17 +1529,7 @@ func Convert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_Supplementa func autoConvert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(in *extensions.SupplementalGroupsStrategyOptions, out *SupplementalGroupsStrategyOptions, s conversion.Scope) error { out.Rule = SupplementalGroupsStrategyType(in.Rule) - if in.Ranges != nil { - in, out := &in.Ranges, &out.Ranges - *out = make([]IDRange, len(*in)) - for i := range *in { - if err := Convert_extensions_IDRange_To_v1beta1_IDRange(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Ranges = nil - } + out.Ranges = *(*[]IDRange)(unsafe.Pointer(&in.Ranges)) return nil } @@ -2542,25 +1538,9 @@ func Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_Supplementa } func autoConvert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *ThirdPartyResource, out *extensions.ThirdPartyResource, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Description = in.Description - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]extensions.APIVersion, len(*in)) - for i := range *in { - if err := Convert_v1beta1_APIVersion_To_extensions_APIVersion(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Versions = nil - } + out.Versions = *(*[]extensions.APIVersion)(unsafe.Pointer(&in.Versions)) return nil } @@ -2569,25 +1549,9 @@ func Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *Thi } func autoConvert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in *extensions.ThirdPartyResource, out *ThirdPartyResource, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Description = in.Description - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]APIVersion, len(*in)) - for i := range *in { - if err := Convert_extensions_APIVersion_To_v1beta1_APIVersion(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Versions = nil - } + out.Versions = *(*[]APIVersion)(unsafe.Pointer(&in.Versions)) return nil } @@ -2596,16 +1560,8 @@ func Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in *ext } func autoConvert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(in *ThirdPartyResourceData, out *extensions.ThirdPartyResourceData, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Data, &out.Data, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta + out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil } @@ -2614,16 +1570,8 @@ func Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData } func autoConvert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(in *extensions.ThirdPartyResourceData, out *ThirdPartyResourceData, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Data, &out.Data, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta + out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil } @@ -2632,23 +1580,8 @@ func Convert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData } func autoConvert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList(in *ThirdPartyResourceDataList, out *extensions.ThirdPartyResourceDataList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]extensions.ThirdPartyResourceData, len(*in)) - for i := range *in { - if err := Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.ListMeta = in.ListMeta + out.Items = *(*[]extensions.ThirdPartyResourceData)(unsafe.Pointer(&in.Items)) return nil } @@ -2657,22 +1590,11 @@ func Convert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResource } func autoConvert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList(in *extensions.ThirdPartyResourceDataList, out *ThirdPartyResourceDataList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ThirdPartyResourceData, len(*in)) - for i := range *in { - if err := Convert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]ThirdPartyResourceData, 0) } else { - out.Items = nil + out.Items = *(*[]ThirdPartyResourceData)(unsafe.Pointer(&in.Items)) } return nil } @@ -2682,23 +1604,8 @@ func Convert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResource } func autoConvert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList(in *ThirdPartyResourceList, out *extensions.ThirdPartyResourceList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]extensions.ThirdPartyResource, len(*in)) - for i := range *in { - if err := Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.ListMeta = in.ListMeta + out.Items = *(*[]extensions.ThirdPartyResource)(unsafe.Pointer(&in.Items)) return nil } @@ -2707,22 +1614,11 @@ func Convert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList } func autoConvert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList(in *extensions.ThirdPartyResourceList, out *ThirdPartyResourceList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ThirdPartyResource, len(*in)) - for i := range *in { - if err := Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]ThirdPartyResource, 0) } else { - out.Items = nil + out.Items = *(*[]ThirdPartyResource)(unsafe.Pointer(&in.Items)) } return nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go similarity index 63% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go index 614d0d6c1..a8088c8fb 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,11 +21,11 @@ limitations under the License. package v1beta1 import ( - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - v1 "k8s.io/client-go/1.5/pkg/api/v1" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" - intstr "k8s.io/client-go/1.5/pkg/util/intstr" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + intstr "k8s.io/apimachinery/pkg/util/intstr" + api_v1 "k8s.io/client-go/pkg/api/v1" reflect "reflect" ) @@ -38,7 +38,6 @@ func init() { func RegisterDeepCopies(scheme *runtime.Scheme) error { return scheme.AddGeneratedDeepCopyFuncs( conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_APIVersion, InType: reflect.TypeOf(&APIVersion{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CPUTargetUtilization, InType: reflect.TypeOf(&CPUTargetUtilization{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CustomMetricCurrentStatus, InType: reflect.TypeOf(&CustomMetricCurrentStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CustomMetricCurrentStatusList, InType: reflect.TypeOf(&CustomMetricCurrentStatusList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CustomMetricTarget, InType: reflect.TypeOf(&CustomMetricTarget{})}, @@ -47,20 +46,17 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DaemonSetList, InType: reflect.TypeOf(&DaemonSetList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DaemonSetSpec, InType: reflect.TypeOf(&DaemonSetSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DaemonSetStatus, InType: reflect.TypeOf(&DaemonSetStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DaemonSetUpdateStrategy, InType: reflect.TypeOf(&DaemonSetUpdateStrategy{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Deployment, InType: reflect.TypeOf(&Deployment{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentCondition, InType: reflect.TypeOf(&DeploymentCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentList, InType: reflect.TypeOf(&DeploymentList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentRollback, InType: reflect.TypeOf(&DeploymentRollback{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentSpec, InType: reflect.TypeOf(&DeploymentSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentStatus, InType: reflect.TypeOf(&DeploymentStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentStrategy, InType: reflect.TypeOf(&DeploymentStrategy{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ExportOptions, InType: reflect.TypeOf(&ExportOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_FSGroupStrategyOptions, InType: reflect.TypeOf(&FSGroupStrategyOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_HTTPIngressPath, InType: reflect.TypeOf(&HTTPIngressPath{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_HTTPIngressRuleValue, InType: reflect.TypeOf(&HTTPIngressRuleValue{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_HostPortRange, InType: reflect.TypeOf(&HostPortRange{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IDRange, InType: reflect.TypeOf(&IDRange{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Ingress, InType: reflect.TypeOf(&Ingress{})}, @@ -71,14 +67,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressSpec, InType: reflect.TypeOf(&IngressSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressStatus, InType: reflect.TypeOf(&IngressStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressTLS, InType: reflect.TypeOf(&IngressTLS{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Job, InType: reflect.TypeOf(&Job{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_JobCondition, InType: reflect.TypeOf(&JobCondition{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_JobList, InType: reflect.TypeOf(&JobList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_JobSpec, InType: reflect.TypeOf(&JobSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_JobStatus, InType: reflect.TypeOf(&JobStatus{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_LabelSelector, InType: reflect.TypeOf(&LabelSelector{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_LabelSelectorRequirement, InType: reflect.TypeOf(&LabelSelectorRequirement{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ListOptions, InType: reflect.TypeOf(&ListOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicy, InType: reflect.TypeOf(&NetworkPolicy{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicyIngressRule, InType: reflect.TypeOf(&NetworkPolicyIngressRule{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicyList, InType: reflect.TypeOf(&NetworkPolicyList{})}, @@ -89,18 +77,19 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodSecurityPolicyList, InType: reflect.TypeOf(&PodSecurityPolicyList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodSecurityPolicySpec, InType: reflect.TypeOf(&PodSecurityPolicySpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSet, InType: reflect.TypeOf(&ReplicaSet{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSetCondition, InType: reflect.TypeOf(&ReplicaSetCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSetList, InType: reflect.TypeOf(&ReplicaSetList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSetSpec, InType: reflect.TypeOf(&ReplicaSetSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSetStatus, InType: reflect.TypeOf(&ReplicaSetStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicationControllerDummy, InType: reflect.TypeOf(&ReplicationControllerDummy{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollbackConfig, InType: reflect.TypeOf(&RollbackConfig{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollingUpdateDaemonSet, InType: reflect.TypeOf(&RollingUpdateDaemonSet{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollingUpdateDeployment, InType: reflect.TypeOf(&RollingUpdateDeployment{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RunAsUserStrategyOptions, InType: reflect.TypeOf(&RunAsUserStrategyOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SELinuxStrategyOptions, InType: reflect.TypeOf(&SELinuxStrategyOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Scale, InType: reflect.TypeOf(&Scale{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubresourceReference, InType: reflect.TypeOf(&SubresourceReference{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SupplementalGroupsStrategyOptions, InType: reflect.TypeOf(&SupplementalGroupsStrategyOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResource, InType: reflect.TypeOf(&ThirdPartyResource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResourceData, InType: reflect.TypeOf(&ThirdPartyResourceData{})}, @@ -113,16 +102,7 @@ func DeepCopy_v1beta1_APIVersion(in interface{}, out interface{}, c *conversion. { in := in.(*APIVersion) out := out.(*APIVersion) - out.Name = in.Name - return nil - } -} - -func DeepCopy_v1beta1_CPUTargetUtilization(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*CPUTargetUtilization) - out := out.(*CPUTargetUtilization) - out.TargetPercentage = in.TargetPercentage + *out = *in return nil } } @@ -131,7 +111,7 @@ func DeepCopy_v1beta1_CustomMetricCurrentStatus(in interface{}, out interface{}, { in := in.(*CustomMetricCurrentStatus) out := out.(*CustomMetricCurrentStatus) - out.Name = in.Name + *out = *in out.CurrentValue = in.CurrentValue.DeepCopy() return nil } @@ -141,6 +121,7 @@ func DeepCopy_v1beta1_CustomMetricCurrentStatusList(in interface{}, out interfac { in := in.(*CustomMetricCurrentStatusList) out := out.(*CustomMetricCurrentStatusList) + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]CustomMetricCurrentStatus, len(*in)) @@ -149,8 +130,6 @@ func DeepCopy_v1beta1_CustomMetricCurrentStatusList(in interface{}, out interfac return err } } - } else { - out.Items = nil } return nil } @@ -160,7 +139,7 @@ func DeepCopy_v1beta1_CustomMetricTarget(in interface{}, out interface{}, c *con { in := in.(*CustomMetricTarget) out := out.(*CustomMetricTarget) - out.Name = in.Name + *out = *in out.TargetValue = in.TargetValue.DeepCopy() return nil } @@ -170,6 +149,7 @@ func DeepCopy_v1beta1_CustomMetricTargetList(in interface{}, out interface{}, c { in := in.(*CustomMetricTargetList) out := out.(*CustomMetricTargetList) + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]CustomMetricTarget, len(*in)) @@ -178,8 +158,6 @@ func DeepCopy_v1beta1_CustomMetricTargetList(in interface{}, out interface{}, c return err } } - } else { - out.Items = nil } return nil } @@ -189,14 +167,15 @@ func DeepCopy_v1beta1_DaemonSet(in interface{}, out interface{}, c *conversion.C { in := in.(*DaemonSet) out := out.(*DaemonSet) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_DaemonSetSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status return nil } } @@ -205,8 +184,7 @@ func DeepCopy_v1beta1_DaemonSetList(in interface{}, out interface{}, c *conversi { in := in.(*DaemonSetList) out := out.(*DaemonSetList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]DaemonSet, len(*in)) @@ -215,8 +193,6 @@ func DeepCopy_v1beta1_DaemonSetList(in interface{}, out interface{}, c *conversi return err } } - } else { - out.Items = nil } return nil } @@ -226,16 +202,19 @@ func DeepCopy_v1beta1_DaemonSetSpec(in interface{}, out interface{}, c *conversi { in := in.(*DaemonSetSpec) out := out.(*DaemonSetSpec) + *out = *in if in.Selector != nil { in, out := &in.Selector, &out.Selector - *out = new(LabelSelector) - if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } else { - out.Selector = nil } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + return err + } + if err := DeepCopy_v1beta1_DaemonSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, c); err != nil { return err } return nil @@ -246,9 +225,23 @@ func DeepCopy_v1beta1_DaemonSetStatus(in interface{}, out interface{}, c *conver { in := in.(*DaemonSetStatus) out := out.(*DaemonSetStatus) - out.CurrentNumberScheduled = in.CurrentNumberScheduled - out.NumberMisscheduled = in.NumberMisscheduled - out.DesiredNumberScheduled = in.DesiredNumberScheduled + *out = *in + return nil + } +} + +func DeepCopy_v1beta1_DaemonSetUpdateStrategy(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*DaemonSetUpdateStrategy) + out := out.(*DaemonSetUpdateStrategy) + *out = *in + if in.RollingUpdate != nil { + in, out := &in.RollingUpdate, &out.RollingUpdate + *out = new(RollingUpdateDaemonSet) + if err := DeepCopy_v1beta1_RollingUpdateDaemonSet(*in, *out, c); err != nil { + return err + } + } return nil } } @@ -257,14 +250,29 @@ func DeepCopy_v1beta1_Deployment(in interface{}, out interface{}, c *conversion. { in := in.(*Deployment) out := out.(*Deployment) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status + if err := DeepCopy_v1beta1_DeploymentStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1beta1_DeploymentCondition(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*DeploymentCondition) + out := out.(*DeploymentCondition) + *out = *in + out.LastUpdateTime = in.LastUpdateTime.DeepCopy() + out.LastTransitionTime = in.LastTransitionTime.DeepCopy() return nil } } @@ -273,8 +281,7 @@ func DeepCopy_v1beta1_DeploymentList(in interface{}, out interface{}, c *convers { in := in.(*DeploymentList) out := out.(*DeploymentList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Deployment, len(*in)) @@ -283,8 +290,6 @@ func DeepCopy_v1beta1_DeploymentList(in interface{}, out interface{}, c *convers return err } } - } else { - out.Items = nil } return nil } @@ -294,18 +299,14 @@ func DeepCopy_v1beta1_DeploymentRollback(in interface{}, out interface{}, c *con { in := in.(*DeploymentRollback) out := out.(*DeploymentRollback) - out.TypeMeta = in.TypeMeta - out.Name = in.Name + *out = *in if in.UpdatedAnnotations != nil { in, out := &in.UpdatedAnnotations, &out.UpdatedAnnotations *out = make(map[string]string) for key, val := range *in { (*out)[key] = val } - } else { - out.UpdatedAnnotations = nil } - out.RollbackTo = in.RollbackTo return nil } } @@ -314,43 +315,40 @@ func DeepCopy_v1beta1_DeploymentSpec(in interface{}, out interface{}, c *convers { in := in.(*DeploymentSpec) out := out.(*DeploymentSpec) + *out = *in if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas *out = new(int32) **out = **in - } else { - out.Replicas = nil } if in.Selector != nil { in, out := &in.Selector, &out.Selector - *out = new(LabelSelector) - if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } else { - out.Selector = nil } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } if err := DeepCopy_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, c); err != nil { return err } - out.MinReadySeconds = in.MinReadySeconds if in.RevisionHistoryLimit != nil { in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit *out = new(int32) **out = **in - } else { - out.RevisionHistoryLimit = nil } - out.Paused = in.Paused if in.RollbackTo != nil { in, out := &in.RollbackTo, &out.RollbackTo *out = new(RollbackConfig) **out = **in - } else { - out.RollbackTo = nil + } + if in.ProgressDeadlineSeconds != nil { + in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds + *out = new(int32) + **out = **in } return nil } @@ -360,11 +358,16 @@ func DeepCopy_v1beta1_DeploymentStatus(in interface{}, out interface{}, c *conve { in := in.(*DeploymentStatus) out := out.(*DeploymentStatus) - out.ObservedGeneration = in.ObservedGeneration - out.Replicas = in.Replicas - out.UpdatedReplicas = in.UpdatedReplicas - out.AvailableReplicas = in.AvailableReplicas - out.UnavailableReplicas = in.UnavailableReplicas + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]DeploymentCondition, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_DeploymentCondition(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } return nil } } @@ -373,44 +376,27 @@ func DeepCopy_v1beta1_DeploymentStrategy(in interface{}, out interface{}, c *con { in := in.(*DeploymentStrategy) out := out.(*DeploymentStrategy) - out.Type = in.Type + *out = *in if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate *out = new(RollingUpdateDeployment) if err := DeepCopy_v1beta1_RollingUpdateDeployment(*in, *out, c); err != nil { return err } - } else { - out.RollingUpdate = nil } return nil } } -func DeepCopy_v1beta1_ExportOptions(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ExportOptions) - out := out.(*ExportOptions) - out.TypeMeta = in.TypeMeta - out.Export = in.Export - out.Exact = in.Exact - return nil - } -} - func DeepCopy_v1beta1_FSGroupStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*FSGroupStrategyOptions) out := out.(*FSGroupStrategyOptions) - out.Rule = in.Rule + *out = *in if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Ranges = nil + copy(*out, *in) } return nil } @@ -420,8 +406,7 @@ func DeepCopy_v1beta1_HTTPIngressPath(in interface{}, out interface{}, c *conver { in := in.(*HTTPIngressPath) out := out.(*HTTPIngressPath) - out.Path = in.Path - out.Backend = in.Backend + *out = *in return nil } } @@ -430,108 +415,11 @@ func DeepCopy_v1beta1_HTTPIngressRuleValue(in interface{}, out interface{}, c *c { in := in.(*HTTPIngressRuleValue) out := out.(*HTTPIngressRuleValue) + *out = *in if in.Paths != nil { in, out := &in.Paths, &out.Paths *out = make([]HTTPIngressPath, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Paths = nil - } - return nil - } -} - -func DeepCopy_v1beta1_HorizontalPodAutoscaler(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*HorizontalPodAutoscaler) - out := out.(*HorizontalPodAutoscaler) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - if err := DeepCopy_v1beta1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - if err := DeepCopy_v1beta1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_v1beta1_HorizontalPodAutoscalerList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*HorizontalPodAutoscalerList) - out := out.(*HorizontalPodAutoscalerList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]HorizontalPodAutoscaler, len(*in)) - for i := range *in { - if err := DeepCopy_v1beta1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil - } -} - -func DeepCopy_v1beta1_HorizontalPodAutoscalerSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*HorizontalPodAutoscalerSpec) - out := out.(*HorizontalPodAutoscalerSpec) - out.ScaleRef = in.ScaleRef - if in.MinReplicas != nil { - in, out := &in.MinReplicas, &out.MinReplicas - *out = new(int32) - **out = **in - } else { - out.MinReplicas = nil - } - out.MaxReplicas = in.MaxReplicas - if in.CPUUtilization != nil { - in, out := &in.CPUUtilization, &out.CPUUtilization - *out = new(CPUTargetUtilization) - **out = **in - } else { - out.CPUUtilization = nil - } - return nil - } -} - -func DeepCopy_v1beta1_HorizontalPodAutoscalerStatus(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*HorizontalPodAutoscalerStatus) - out := out.(*HorizontalPodAutoscalerStatus) - if in.ObservedGeneration != nil { - in, out := &in.ObservedGeneration, &out.ObservedGeneration - *out = new(int64) - **out = **in - } else { - out.ObservedGeneration = nil - } - if in.LastScaleTime != nil { - in, out := &in.LastScaleTime, &out.LastScaleTime - *out = new(unversioned.Time) - **out = (*in).DeepCopy() - } else { - out.LastScaleTime = nil - } - out.CurrentReplicas = in.CurrentReplicas - out.DesiredReplicas = in.DesiredReplicas - if in.CurrentCPUUtilizationPercentage != nil { - in, out := &in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage - *out = new(int32) - **out = **in - } else { - out.CurrentCPUUtilizationPercentage = nil + copy(*out, *in) } return nil } @@ -541,8 +429,7 @@ func DeepCopy_v1beta1_HostPortRange(in interface{}, out interface{}, c *conversi { in := in.(*HostPortRange) out := out.(*HostPortRange) - out.Min = in.Min - out.Max = in.Max + *out = *in return nil } } @@ -551,8 +438,7 @@ func DeepCopy_v1beta1_IDRange(in interface{}, out interface{}, c *conversion.Clo { in := in.(*IDRange) out := out.(*IDRange) - out.Min = in.Min - out.Max = in.Max + *out = *in return nil } } @@ -561,9 +447,11 @@ func DeepCopy_v1beta1_Ingress(in interface{}, out interface{}, c *conversion.Clo { in := in.(*Ingress) out := out.(*Ingress) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_IngressSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -579,8 +467,7 @@ func DeepCopy_v1beta1_IngressBackend(in interface{}, out interface{}, c *convers { in := in.(*IngressBackend) out := out.(*IngressBackend) - out.ServiceName = in.ServiceName - out.ServicePort = in.ServicePort + *out = *in return nil } } @@ -589,8 +476,7 @@ func DeepCopy_v1beta1_IngressList(in interface{}, out interface{}, c *conversion { in := in.(*IngressList) out := out.(*IngressList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Ingress, len(*in)) @@ -599,8 +485,6 @@ func DeepCopy_v1beta1_IngressList(in interface{}, out interface{}, c *conversion return err } } - } else { - out.Items = nil } return nil } @@ -610,7 +494,7 @@ func DeepCopy_v1beta1_IngressRule(in interface{}, out interface{}, c *conversion { in := in.(*IngressRule) out := out.(*IngressRule) - out.Host = in.Host + *out = *in if err := DeepCopy_v1beta1_IngressRuleValue(&in.IngressRuleValue, &out.IngressRuleValue, c); err != nil { return err } @@ -622,14 +506,13 @@ func DeepCopy_v1beta1_IngressRuleValue(in interface{}, out interface{}, c *conve { in := in.(*IngressRuleValue) out := out.(*IngressRuleValue) + *out = *in if in.HTTP != nil { in, out := &in.HTTP, &out.HTTP *out = new(HTTPIngressRuleValue) if err := DeepCopy_v1beta1_HTTPIngressRuleValue(*in, *out, c); err != nil { return err } - } else { - out.HTTP = nil } return nil } @@ -639,12 +522,11 @@ func DeepCopy_v1beta1_IngressSpec(in interface{}, out interface{}, c *conversion { in := in.(*IngressSpec) out := out.(*IngressSpec) + *out = *in if in.Backend != nil { in, out := &in.Backend, &out.Backend *out = new(IngressBackend) **out = **in - } else { - out.Backend = nil } if in.TLS != nil { in, out := &in.TLS, &out.TLS @@ -654,8 +536,6 @@ func DeepCopy_v1beta1_IngressSpec(in interface{}, out interface{}, c *conversion return err } } - } else { - out.TLS = nil } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -665,8 +545,6 @@ func DeepCopy_v1beta1_IngressSpec(in interface{}, out interface{}, c *conversion return err } } - } else { - out.Rules = nil } return nil } @@ -676,7 +554,8 @@ func DeepCopy_v1beta1_IngressStatus(in interface{}, out interface{}, c *conversi { in := in.(*IngressStatus) out := out.(*IngressStatus) - if err := v1.DeepCopy_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil { + *out = *in + if err := api_v1.DeepCopy_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil { return err } return nil @@ -687,215 +566,11 @@ func DeepCopy_v1beta1_IngressTLS(in interface{}, out interface{}, c *conversion. { in := in.(*IngressTLS) out := out.(*IngressTLS) + *out = *in if in.Hosts != nil { in, out := &in.Hosts, &out.Hosts *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Hosts = nil - } - out.SecretName = in.SecretName - return nil - } -} - -func DeepCopy_v1beta1_Job(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Job) - out := out.(*Job) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { - return err - } - if err := DeepCopy_v1beta1_JobSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - if err := DeepCopy_v1beta1_JobStatus(&in.Status, &out.Status, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_v1beta1_JobCondition(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*JobCondition) - out := out.(*JobCondition) - out.Type = in.Type - out.Status = in.Status - out.LastProbeTime = in.LastProbeTime.DeepCopy() - out.LastTransitionTime = in.LastTransitionTime.DeepCopy() - out.Reason = in.Reason - out.Message = in.Message - return nil - } -} - -func DeepCopy_v1beta1_JobList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*JobList) - out := out.(*JobList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Job, len(*in)) - for i := range *in { - if err := DeepCopy_v1beta1_Job(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil - } -} - -func DeepCopy_v1beta1_JobSpec(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*JobSpec) - out := out.(*JobSpec) - if in.Parallelism != nil { - in, out := &in.Parallelism, &out.Parallelism - *out = new(int32) - **out = **in - } else { - out.Parallelism = nil - } - if in.Completions != nil { - in, out := &in.Completions, &out.Completions - *out = new(int32) - **out = **in - } else { - out.Completions = nil - } - if in.ActiveDeadlineSeconds != nil { - in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds - *out = new(int64) - **out = **in - } else { - out.ActiveDeadlineSeconds = nil - } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(LabelSelector) - if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil { - return err - } - } else { - out.Selector = nil - } - if in.AutoSelector != nil { - in, out := &in.AutoSelector, &out.AutoSelector - *out = new(bool) - **out = **in - } else { - out.AutoSelector = nil - } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { - return err - } - return nil - } -} - -func DeepCopy_v1beta1_JobStatus(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*JobStatus) - out := out.(*JobStatus) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]JobCondition, len(*in)) - for i := range *in { - if err := DeepCopy_v1beta1_JobCondition(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - if in.StartTime != nil { - in, out := &in.StartTime, &out.StartTime - *out = new(unversioned.Time) - **out = (*in).DeepCopy() - } else { - out.StartTime = nil - } - if in.CompletionTime != nil { - in, out := &in.CompletionTime, &out.CompletionTime - *out = new(unversioned.Time) - **out = (*in).DeepCopy() - } else { - out.CompletionTime = nil - } - out.Active = in.Active - out.Succeeded = in.Succeeded - out.Failed = in.Failed - return nil - } -} - -func DeepCopy_v1beta1_LabelSelector(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*LabelSelector) - out := out.(*LabelSelector) - if in.MatchLabels != nil { - in, out := &in.MatchLabels, &out.MatchLabels - *out = make(map[string]string) - for key, val := range *in { - (*out)[key] = val - } - } else { - out.MatchLabels = nil - } - if in.MatchExpressions != nil { - in, out := &in.MatchExpressions, &out.MatchExpressions - *out = make([]LabelSelectorRequirement, len(*in)) - for i := range *in { - if err := DeepCopy_v1beta1_LabelSelectorRequirement(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } else { - out.MatchExpressions = nil - } - return nil - } -} - -func DeepCopy_v1beta1_LabelSelectorRequirement(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*LabelSelectorRequirement) - out := out.(*LabelSelectorRequirement) - out.Key = in.Key - out.Operator = in.Operator - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = make([]string, len(*in)) - copy(*out, *in) - } else { - out.Values = nil - } - return nil - } -} - -func DeepCopy_v1beta1_ListOptions(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ListOptions) - out := out.(*ListOptions) - 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 } @@ -905,9 +580,11 @@ func DeepCopy_v1beta1_NetworkPolicy(in interface{}, out interface{}, c *conversi { in := in.(*NetworkPolicy) out := out.(*NetworkPolicy) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -920,6 +597,7 @@ func DeepCopy_v1beta1_NetworkPolicyIngressRule(in interface{}, out interface{}, { in := in.(*NetworkPolicyIngressRule) out := out.(*NetworkPolicyIngressRule) + *out = *in if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]NetworkPolicyPort, len(*in)) @@ -928,8 +606,6 @@ func DeepCopy_v1beta1_NetworkPolicyIngressRule(in interface{}, out interface{}, return err } } - } else { - out.Ports = nil } if in.From != nil { in, out := &in.From, &out.From @@ -939,8 +615,6 @@ func DeepCopy_v1beta1_NetworkPolicyIngressRule(in interface{}, out interface{}, return err } } - } else { - out.From = nil } return nil } @@ -950,8 +624,7 @@ func DeepCopy_v1beta1_NetworkPolicyList(in interface{}, out interface{}, c *conv { in := in.(*NetworkPolicyList) out := out.(*NetworkPolicyList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]NetworkPolicy, len(*in)) @@ -960,8 +633,6 @@ func DeepCopy_v1beta1_NetworkPolicyList(in interface{}, out interface{}, c *conv return err } } - } else { - out.Items = nil } return nil } @@ -971,23 +642,22 @@ func DeepCopy_v1beta1_NetworkPolicyPeer(in interface{}, out interface{}, c *conv { in := in.(*NetworkPolicyPeer) out := out.(*NetworkPolicyPeer) + *out = *in if in.PodSelector != nil { in, out := &in.PodSelector, &out.PodSelector - *out = new(LabelSelector) - if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } else { - out.PodSelector = nil } if in.NamespaceSelector != nil { in, out := &in.NamespaceSelector, &out.NamespaceSelector - *out = new(LabelSelector) - if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } else { - out.NamespaceSelector = nil } return nil } @@ -997,19 +667,16 @@ func DeepCopy_v1beta1_NetworkPolicyPort(in interface{}, out interface{}, c *conv { in := in.(*NetworkPolicyPort) out := out.(*NetworkPolicyPort) + *out = *in if in.Protocol != nil { in, out := &in.Protocol, &out.Protocol - *out = new(v1.Protocol) + *out = new(api_v1.Protocol) **out = **in - } else { - out.Protocol = nil } if in.Port != nil { in, out := &in.Port, &out.Port *out = new(intstr.IntOrString) **out = **in - } else { - out.Port = nil } return nil } @@ -1019,8 +686,11 @@ func DeepCopy_v1beta1_NetworkPolicySpec(in interface{}, out interface{}, c *conv { in := in.(*NetworkPolicySpec) out := out.(*NetworkPolicySpec) - if err := DeepCopy_v1beta1_LabelSelector(&in.PodSelector, &out.PodSelector, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.PodSelector); err != nil { return err + } else { + out.PodSelector = *newVal.(*v1.LabelSelector) } if in.Ingress != nil { in, out := &in.Ingress, &out.Ingress @@ -1030,8 +700,6 @@ func DeepCopy_v1beta1_NetworkPolicySpec(in interface{}, out interface{}, c *conv return err } } - } else { - out.Ingress = nil } return nil } @@ -1041,9 +709,11 @@ func DeepCopy_v1beta1_PodSecurityPolicy(in interface{}, out interface{}, c *conv { in := in.(*PodSecurityPolicy) out := out.(*PodSecurityPolicy) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_PodSecurityPolicySpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1056,8 +726,7 @@ func DeepCopy_v1beta1_PodSecurityPolicyList(in interface{}, out interface{}, c * { in := in.(*PodSecurityPolicyList) out := out.(*PodSecurityPolicyList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PodSecurityPolicy, len(*in)) @@ -1066,8 +735,6 @@ func DeepCopy_v1beta1_PodSecurityPolicyList(in interface{}, out interface{}, c * return err } } - } else { - out.Items = nil } return nil } @@ -1077,55 +744,32 @@ func DeepCopy_v1beta1_PodSecurityPolicySpec(in interface{}, out interface{}, c * { in := in.(*PodSecurityPolicySpec) out := out.(*PodSecurityPolicySpec) - out.Privileged = in.Privileged + *out = *in if in.DefaultAddCapabilities != nil { in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities - *out = make([]v1.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.DefaultAddCapabilities = nil + *out = make([]api_v1.Capability, len(*in)) + copy(*out, *in) } if in.RequiredDropCapabilities != nil { in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities - *out = make([]v1.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.RequiredDropCapabilities = nil + *out = make([]api_v1.Capability, len(*in)) + copy(*out, *in) } if in.AllowedCapabilities != nil { in, out := &in.AllowedCapabilities, &out.AllowedCapabilities - *out = make([]v1.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.AllowedCapabilities = nil + *out = make([]api_v1.Capability, len(*in)) + copy(*out, *in) } if in.Volumes != nil { in, out := &in.Volumes, &out.Volumes *out = make([]FSType, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Volumes = nil + copy(*out, *in) } - out.HostNetwork = in.HostNetwork if in.HostPorts != nil { in, out := &in.HostPorts, &out.HostPorts *out = make([]HostPortRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.HostPorts = nil + copy(*out, *in) } - out.HostPID = in.HostPID - out.HostIPC = in.HostIPC if err := DeepCopy_v1beta1_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, c); err != nil { return err } @@ -1138,7 +782,6 @@ func DeepCopy_v1beta1_PodSecurityPolicySpec(in interface{}, out interface{}, c * if err := DeepCopy_v1beta1_FSGroupStrategyOptions(&in.FSGroup, &out.FSGroup, c); err != nil { return err } - out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem return nil } } @@ -1147,14 +790,28 @@ func DeepCopy_v1beta1_ReplicaSet(in interface{}, out interface{}, c *conversion. { in := in.(*ReplicaSet) out := out.(*ReplicaSet) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_ReplicaSetSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status + if err := DeepCopy_v1beta1_ReplicaSetStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1beta1_ReplicaSetCondition(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ReplicaSetCondition) + out := out.(*ReplicaSetCondition) + *out = *in + out.LastTransitionTime = in.LastTransitionTime.DeepCopy() return nil } } @@ -1163,8 +820,7 @@ func DeepCopy_v1beta1_ReplicaSetList(in interface{}, out interface{}, c *convers { in := in.(*ReplicaSetList) out := out.(*ReplicaSetList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ReplicaSet, len(*in)) @@ -1173,8 +829,6 @@ func DeepCopy_v1beta1_ReplicaSetList(in interface{}, out interface{}, c *convers return err } } - } else { - out.Items = nil } return nil } @@ -1184,23 +838,21 @@ func DeepCopy_v1beta1_ReplicaSetSpec(in interface{}, out interface{}, c *convers { in := in.(*ReplicaSetSpec) out := out.(*ReplicaSetSpec) + *out = *in if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas *out = new(int32) **out = **in - } else { - out.Replicas = nil } if in.Selector != nil { in, out := &in.Selector, &out.Selector - *out = new(LabelSelector) - if err := DeepCopy_v1beta1_LabelSelector(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } else { - out.Selector = nil } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } return nil @@ -1211,10 +863,16 @@ func DeepCopy_v1beta1_ReplicaSetStatus(in interface{}, out interface{}, c *conve { in := in.(*ReplicaSetStatus) out := out.(*ReplicaSetStatus) - out.Replicas = in.Replicas - out.FullyLabeledReplicas = in.FullyLabeledReplicas - out.ReadyReplicas = in.ReadyReplicas - out.ObservedGeneration = in.ObservedGeneration + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]ReplicaSetCondition, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_ReplicaSetCondition(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } return nil } } @@ -1223,7 +881,7 @@ func DeepCopy_v1beta1_ReplicationControllerDummy(in interface{}, out interface{} { in := in.(*ReplicationControllerDummy) out := out.(*ReplicationControllerDummy) - out.TypeMeta = in.TypeMeta + *out = *in return nil } } @@ -1232,7 +890,21 @@ func DeepCopy_v1beta1_RollbackConfig(in interface{}, out interface{}, c *convers { in := in.(*RollbackConfig) out := out.(*RollbackConfig) - out.Revision = in.Revision + *out = *in + return nil + } +} + +func DeepCopy_v1beta1_RollingUpdateDaemonSet(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RollingUpdateDaemonSet) + out := out.(*RollingUpdateDaemonSet) + *out = *in + if in.MaxUnavailable != nil { + in, out := &in.MaxUnavailable, &out.MaxUnavailable + *out = new(intstr.IntOrString) + **out = **in + } return nil } } @@ -1241,19 +913,16 @@ func DeepCopy_v1beta1_RollingUpdateDeployment(in interface{}, out interface{}, c { in := in.(*RollingUpdateDeployment) out := out.(*RollingUpdateDeployment) + *out = *in if in.MaxUnavailable != nil { in, out := &in.MaxUnavailable, &out.MaxUnavailable *out = new(intstr.IntOrString) **out = **in - } else { - out.MaxUnavailable = nil } if in.MaxSurge != nil { in, out := &in.MaxSurge, &out.MaxSurge *out = new(intstr.IntOrString) **out = **in - } else { - out.MaxSurge = nil } return nil } @@ -1263,15 +932,11 @@ func DeepCopy_v1beta1_RunAsUserStrategyOptions(in interface{}, out interface{}, { in := in.(*RunAsUserStrategyOptions) out := out.(*RunAsUserStrategyOptions) - out.Rule = in.Rule + *out = *in if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Ranges = nil + copy(*out, *in) } return nil } @@ -1281,13 +946,11 @@ func DeepCopy_v1beta1_SELinuxStrategyOptions(in interface{}, out interface{}, c { in := in.(*SELinuxStrategyOptions) out := out.(*SELinuxStrategyOptions) - out.Rule = in.Rule + *out = *in if in.SELinuxOptions != nil { in, out := &in.SELinuxOptions, &out.SELinuxOptions - *out = new(v1.SELinuxOptions) + *out = new(api_v1.SELinuxOptions) **out = **in - } else { - out.SELinuxOptions = nil } return nil } @@ -1297,11 +960,12 @@ func DeepCopy_v1beta1_Scale(in interface{}, out interface{}, c *conversion.Clone { in := in.(*Scale) out := out.(*Scale) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } - out.Spec = in.Spec if err := DeepCopy_v1beta1_ScaleStatus(&in.Status, &out.Status, c); err != nil { return err } @@ -1313,7 +977,7 @@ func DeepCopy_v1beta1_ScaleSpec(in interface{}, out interface{}, c *conversion.C { in := in.(*ScaleSpec) out := out.(*ScaleSpec) - out.Replicas = in.Replicas + *out = *in return nil } } @@ -1322,29 +986,14 @@ func DeepCopy_v1beta1_ScaleStatus(in interface{}, out interface{}, c *conversion { in := in.(*ScaleStatus) out := out.(*ScaleStatus) - out.Replicas = in.Replicas + *out = *in if in.Selector != nil { in, out := &in.Selector, &out.Selector *out = make(map[string]string) for key, val := range *in { (*out)[key] = val } - } else { - out.Selector = nil } - out.TargetSelector = in.TargetSelector - return nil - } -} - -func DeepCopy_v1beta1_SubresourceReference(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*SubresourceReference) - out := out.(*SubresourceReference) - out.Kind = in.Kind - out.Name = in.Name - out.APIVersion = in.APIVersion - out.Subresource = in.Subresource return nil } } @@ -1353,15 +1002,11 @@ func DeepCopy_v1beta1_SupplementalGroupsStrategyOptions(in interface{}, out inte { in := in.(*SupplementalGroupsStrategyOptions) out := out.(*SupplementalGroupsStrategyOptions) - out.Rule = in.Rule + *out = *in if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Ranges = nil + copy(*out, *in) } return nil } @@ -1371,19 +1016,16 @@ func DeepCopy_v1beta1_ThirdPartyResource(in interface{}, out interface{}, c *con { in := in.(*ThirdPartyResource) out := out.(*ThirdPartyResource) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } - out.Description = in.Description if in.Versions != nil { in, out := &in.Versions, &out.Versions *out = make([]APIVersion, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Versions = nil + copy(*out, *in) } return nil } @@ -1393,16 +1035,16 @@ func DeepCopy_v1beta1_ThirdPartyResourceData(in interface{}, out interface{}, c { in := in.(*ThirdPartyResourceData) out := out.(*ThirdPartyResourceData) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data *out = make([]byte, len(*in)) copy(*out, *in) - } else { - out.Data = nil } return nil } @@ -1412,8 +1054,7 @@ func DeepCopy_v1beta1_ThirdPartyResourceDataList(in interface{}, out interface{} { in := in.(*ThirdPartyResourceDataList) out := out.(*ThirdPartyResourceDataList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ThirdPartyResourceData, len(*in)) @@ -1422,8 +1063,6 @@ func DeepCopy_v1beta1_ThirdPartyResourceDataList(in interface{}, out interface{} return err } } - } else { - out.Items = nil } return nil } @@ -1433,8 +1072,7 @@ func DeepCopy_v1beta1_ThirdPartyResourceList(in interface{}, out interface{}, c { in := in.(*ThirdPartyResourceList) out := out.(*ThirdPartyResourceList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ThirdPartyResource, len(*in)) @@ -1443,8 +1081,6 @@ func DeepCopy_v1beta1_ThirdPartyResourceList(in interface{}, out interface{}, c return err } } - } else { - out.Items = nil } return nil } diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.defaults.go new file mode 100644 index 000000000..770faa513 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.defaults.go @@ -0,0 +1,475 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" + v1 "k8s.io/client-go/pkg/api/v1" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&DaemonSet{}, func(obj interface{}) { SetObjectDefaults_DaemonSet(obj.(*DaemonSet)) }) + scheme.AddTypeDefaultingFunc(&DaemonSetList{}, func(obj interface{}) { SetObjectDefaults_DaemonSetList(obj.(*DaemonSetList)) }) + scheme.AddTypeDefaultingFunc(&Deployment{}, func(obj interface{}) { SetObjectDefaults_Deployment(obj.(*Deployment)) }) + scheme.AddTypeDefaultingFunc(&DeploymentList{}, func(obj interface{}) { SetObjectDefaults_DeploymentList(obj.(*DeploymentList)) }) + scheme.AddTypeDefaultingFunc(&NetworkPolicy{}, func(obj interface{}) { SetObjectDefaults_NetworkPolicy(obj.(*NetworkPolicy)) }) + scheme.AddTypeDefaultingFunc(&NetworkPolicyList{}, func(obj interface{}) { SetObjectDefaults_NetworkPolicyList(obj.(*NetworkPolicyList)) }) + scheme.AddTypeDefaultingFunc(&ReplicaSet{}, func(obj interface{}) { SetObjectDefaults_ReplicaSet(obj.(*ReplicaSet)) }) + scheme.AddTypeDefaultingFunc(&ReplicaSetList{}, func(obj interface{}) { SetObjectDefaults_ReplicaSetList(obj.(*ReplicaSetList)) }) + return nil +} + +func SetObjectDefaults_DaemonSet(in *DaemonSet) { + SetDefaults_DaemonSet(in) + v1.SetDefaults_PodSpec(&in.Spec.Template.Spec) + for i := range in.Spec.Template.Spec.Volumes { + a := &in.Spec.Template.Spec.Volumes[i] + v1.SetDefaults_Volume(a) + if a.VolumeSource.Secret != nil { + v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret) + } + if a.VolumeSource.ISCSI != nil { + v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI) + } + if a.VolumeSource.RBD != nil { + v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD) + } + if a.VolumeSource.DownwardAPI != nil { + v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI) + for j := range a.VolumeSource.DownwardAPI.Items { + b := &a.VolumeSource.DownwardAPI.Items[j] + if b.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.FieldRef) + } + } + } + if a.VolumeSource.ConfigMap != nil { + v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap) + } + if a.VolumeSource.AzureDisk != nil { + v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk) + } + if a.VolumeSource.Projected != nil { + v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected) + for j := range a.VolumeSource.Projected.Sources { + b := &a.VolumeSource.Projected.Sources[j] + if b.DownwardAPI != nil { + for k := range b.DownwardAPI.Items { + c := &b.DownwardAPI.Items[k] + if c.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(c.FieldRef) + } + } + } + } + } + if a.VolumeSource.ScaleIO != nil { + v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + } + } + for i := range in.Spec.Template.Spec.InitContainers { + a := &in.Spec.Template.Spec.InitContainers[i] + v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + v1.SetDefaults_ResourceList(&a.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } + for i := range in.Spec.Template.Spec.Containers { + a := &in.Spec.Template.Spec.Containers[i] + v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + v1.SetDefaults_ResourceList(&a.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } +} + +func SetObjectDefaults_DaemonSetList(in *DaemonSetList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_DaemonSet(a) + } +} + +func SetObjectDefaults_Deployment(in *Deployment) { + SetDefaults_Deployment(in) + v1.SetDefaults_PodSpec(&in.Spec.Template.Spec) + for i := range in.Spec.Template.Spec.Volumes { + a := &in.Spec.Template.Spec.Volumes[i] + v1.SetDefaults_Volume(a) + if a.VolumeSource.Secret != nil { + v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret) + } + if a.VolumeSource.ISCSI != nil { + v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI) + } + if a.VolumeSource.RBD != nil { + v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD) + } + if a.VolumeSource.DownwardAPI != nil { + v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI) + for j := range a.VolumeSource.DownwardAPI.Items { + b := &a.VolumeSource.DownwardAPI.Items[j] + if b.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.FieldRef) + } + } + } + if a.VolumeSource.ConfigMap != nil { + v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap) + } + if a.VolumeSource.AzureDisk != nil { + v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk) + } + if a.VolumeSource.Projected != nil { + v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected) + for j := range a.VolumeSource.Projected.Sources { + b := &a.VolumeSource.Projected.Sources[j] + if b.DownwardAPI != nil { + for k := range b.DownwardAPI.Items { + c := &b.DownwardAPI.Items[k] + if c.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(c.FieldRef) + } + } + } + } + } + if a.VolumeSource.ScaleIO != nil { + v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + } + } + for i := range in.Spec.Template.Spec.InitContainers { + a := &in.Spec.Template.Spec.InitContainers[i] + v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + v1.SetDefaults_ResourceList(&a.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } + for i := range in.Spec.Template.Spec.Containers { + a := &in.Spec.Template.Spec.Containers[i] + v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + v1.SetDefaults_ResourceList(&a.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } +} + +func SetObjectDefaults_DeploymentList(in *DeploymentList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_Deployment(a) + } +} + +func SetObjectDefaults_NetworkPolicy(in *NetworkPolicy) { + SetDefaults_NetworkPolicy(in) +} + +func SetObjectDefaults_NetworkPolicyList(in *NetworkPolicyList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_NetworkPolicy(a) + } +} + +func SetObjectDefaults_ReplicaSet(in *ReplicaSet) { + SetDefaults_ReplicaSet(in) + v1.SetDefaults_PodSpec(&in.Spec.Template.Spec) + for i := range in.Spec.Template.Spec.Volumes { + a := &in.Spec.Template.Spec.Volumes[i] + v1.SetDefaults_Volume(a) + if a.VolumeSource.Secret != nil { + v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret) + } + if a.VolumeSource.ISCSI != nil { + v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI) + } + if a.VolumeSource.RBD != nil { + v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD) + } + if a.VolumeSource.DownwardAPI != nil { + v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI) + for j := range a.VolumeSource.DownwardAPI.Items { + b := &a.VolumeSource.DownwardAPI.Items[j] + if b.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.FieldRef) + } + } + } + if a.VolumeSource.ConfigMap != nil { + v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap) + } + if a.VolumeSource.AzureDisk != nil { + v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk) + } + if a.VolumeSource.Projected != nil { + v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected) + for j := range a.VolumeSource.Projected.Sources { + b := &a.VolumeSource.Projected.Sources[j] + if b.DownwardAPI != nil { + for k := range b.DownwardAPI.Items { + c := &b.DownwardAPI.Items[k] + if c.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(c.FieldRef) + } + } + } + } + } + if a.VolumeSource.ScaleIO != nil { + v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + } + } + for i := range in.Spec.Template.Spec.InitContainers { + a := &in.Spec.Template.Spec.InitContainers[i] + v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + v1.SetDefaults_ResourceList(&a.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } + for i := range in.Spec.Template.Spec.Containers { + a := &in.Spec.Template.Spec.Containers[i] + v1.SetDefaults_Container(a) + for j := range a.Ports { + b := &a.Ports[j] + v1.SetDefaults_ContainerPort(b) + } + for j := range a.Env { + b := &a.Env[j] + if b.ValueFrom != nil { + if b.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef) + } + } + } + v1.SetDefaults_ResourceList(&a.Resources.Limits) + v1.SetDefaults_ResourceList(&a.Resources.Requests) + if a.LivenessProbe != nil { + v1.SetDefaults_Probe(a.LivenessProbe) + if a.LivenessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet) + } + } + if a.ReadinessProbe != nil { + v1.SetDefaults_Probe(a.ReadinessProbe) + if a.ReadinessProbe.Handler.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) + } + } + if a.Lifecycle != nil { + if a.Lifecycle.PostStart != nil { + if a.Lifecycle.PostStart.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet) + } + } + if a.Lifecycle.PreStop != nil { + if a.Lifecycle.PreStop.HTTPGet != nil { + v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet) + } + } + } + } +} + +func SetObjectDefaults_ReplicaSetList(in *ReplicaSetList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ReplicaSet(a) + } +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/extensions/zz_generated.deepcopy.go similarity index 81% rename from vendor/k8s.io/client-go/1.5/pkg/apis/extensions/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/apis/extensions/zz_generated.deepcopy.go index 4f5b015af..93409cb61 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/extensions/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/apis/extensions/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,11 +21,11 @@ limitations under the License. package extensions import ( - api "k8s.io/client-go/1.5/pkg/api" - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" - intstr "k8s.io/client-go/1.5/pkg/util/intstr" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + intstr "k8s.io/apimachinery/pkg/util/intstr" + api "k8s.io/client-go/pkg/api" reflect "reflect" ) @@ -46,7 +46,9 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DaemonSetList, InType: reflect.TypeOf(&DaemonSetList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DaemonSetSpec, InType: reflect.TypeOf(&DaemonSetSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DaemonSetStatus, InType: reflect.TypeOf(&DaemonSetStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DaemonSetUpdateStrategy, InType: reflect.TypeOf(&DaemonSetUpdateStrategy{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_Deployment, InType: reflect.TypeOf(&Deployment{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentCondition, InType: reflect.TypeOf(&DeploymentCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentList, InType: reflect.TypeOf(&DeploymentList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentRollback, InType: reflect.TypeOf(&DeploymentRollback{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentSpec, InType: reflect.TypeOf(&DeploymentSpec{})}, @@ -75,11 +77,13 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_PodSecurityPolicyList, InType: reflect.TypeOf(&PodSecurityPolicyList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_PodSecurityPolicySpec, InType: reflect.TypeOf(&PodSecurityPolicySpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSet, InType: reflect.TypeOf(&ReplicaSet{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSetCondition, InType: reflect.TypeOf(&ReplicaSetCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSetList, InType: reflect.TypeOf(&ReplicaSetList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSetSpec, InType: reflect.TypeOf(&ReplicaSetSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSetStatus, InType: reflect.TypeOf(&ReplicaSetStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicationControllerDummy, InType: reflect.TypeOf(&ReplicationControllerDummy{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_RollbackConfig, InType: reflect.TypeOf(&RollbackConfig{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_RollingUpdateDaemonSet, InType: reflect.TypeOf(&RollingUpdateDaemonSet{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_RollingUpdateDeployment, InType: reflect.TypeOf(&RollingUpdateDeployment{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_RunAsUserStrategyOptions, InType: reflect.TypeOf(&RunAsUserStrategyOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_SELinuxStrategyOptions, InType: reflect.TypeOf(&SELinuxStrategyOptions{})}, @@ -98,7 +102,7 @@ func DeepCopy_extensions_APIVersion(in interface{}, out interface{}, c *conversi { in := in.(*APIVersion) out := out.(*APIVersion) - out.Name = in.Name + *out = *in return nil } } @@ -107,7 +111,7 @@ func DeepCopy_extensions_CustomMetricCurrentStatus(in interface{}, out interface { in := in.(*CustomMetricCurrentStatus) out := out.(*CustomMetricCurrentStatus) - out.Name = in.Name + *out = *in out.CurrentValue = in.CurrentValue.DeepCopy() return nil } @@ -117,6 +121,7 @@ func DeepCopy_extensions_CustomMetricCurrentStatusList(in interface{}, out inter { in := in.(*CustomMetricCurrentStatusList) out := out.(*CustomMetricCurrentStatusList) + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]CustomMetricCurrentStatus, len(*in)) @@ -125,8 +130,6 @@ func DeepCopy_extensions_CustomMetricCurrentStatusList(in interface{}, out inter return err } } - } else { - out.Items = nil } return nil } @@ -136,7 +139,7 @@ func DeepCopy_extensions_CustomMetricTarget(in interface{}, out interface{}, c * { in := in.(*CustomMetricTarget) out := out.(*CustomMetricTarget) - out.Name = in.Name + *out = *in out.TargetValue = in.TargetValue.DeepCopy() return nil } @@ -146,6 +149,7 @@ func DeepCopy_extensions_CustomMetricTargetList(in interface{}, out interface{}, { in := in.(*CustomMetricTargetList) out := out.(*CustomMetricTargetList) + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]CustomMetricTarget, len(*in)) @@ -154,8 +158,6 @@ func DeepCopy_extensions_CustomMetricTargetList(in interface{}, out interface{}, return err } } - } else { - out.Items = nil } return nil } @@ -165,14 +167,15 @@ func DeepCopy_extensions_DaemonSet(in interface{}, out interface{}, c *conversio { in := in.(*DaemonSet) out := out.(*DaemonSet) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_DaemonSetSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status return nil } } @@ -181,8 +184,7 @@ func DeepCopy_extensions_DaemonSetList(in interface{}, out interface{}, c *conve { in := in.(*DaemonSetList) out := out.(*DaemonSetList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]DaemonSet, len(*in)) @@ -191,8 +193,6 @@ func DeepCopy_extensions_DaemonSetList(in interface{}, out interface{}, c *conve return err } } - } else { - out.Items = nil } return nil } @@ -202,18 +202,21 @@ func DeepCopy_extensions_DaemonSetSpec(in interface{}, out interface{}, c *conve { in := in.(*DaemonSetSpec) out := out.(*DaemonSetSpec) + *out = *in 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 { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } else { - out.Selector = nil } if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } + if err := DeepCopy_extensions_DaemonSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, c); err != nil { + return err + } return nil } } @@ -222,9 +225,21 @@ func DeepCopy_extensions_DaemonSetStatus(in interface{}, out interface{}, c *con { in := in.(*DaemonSetStatus) out := out.(*DaemonSetStatus) - out.CurrentNumberScheduled = in.CurrentNumberScheduled - out.NumberMisscheduled = in.NumberMisscheduled - out.DesiredNumberScheduled = in.DesiredNumberScheduled + *out = *in + return nil + } +} + +func DeepCopy_extensions_DaemonSetUpdateStrategy(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*DaemonSetUpdateStrategy) + out := out.(*DaemonSetUpdateStrategy) + *out = *in + if in.RollingUpdate != nil { + in, out := &in.RollingUpdate, &out.RollingUpdate + *out = new(RollingUpdateDaemonSet) + **out = **in + } return nil } } @@ -233,14 +248,29 @@ func DeepCopy_extensions_Deployment(in interface{}, out interface{}, c *conversi { in := in.(*Deployment) out := out.(*Deployment) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_DeploymentSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status + if err := DeepCopy_extensions_DeploymentStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_extensions_DeploymentCondition(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*DeploymentCondition) + out := out.(*DeploymentCondition) + *out = *in + out.LastUpdateTime = in.LastUpdateTime.DeepCopy() + out.LastTransitionTime = in.LastTransitionTime.DeepCopy() return nil } } @@ -249,8 +279,7 @@ func DeepCopy_extensions_DeploymentList(in interface{}, out interface{}, c *conv { in := in.(*DeploymentList) out := out.(*DeploymentList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Deployment, len(*in)) @@ -259,8 +288,6 @@ func DeepCopy_extensions_DeploymentList(in interface{}, out interface{}, c *conv return err } } - } else { - out.Items = nil } return nil } @@ -270,18 +297,14 @@ func DeepCopy_extensions_DeploymentRollback(in interface{}, out interface{}, c * { in := in.(*DeploymentRollback) out := out.(*DeploymentRollback) - out.TypeMeta = in.TypeMeta - out.Name = in.Name + *out = *in if in.UpdatedAnnotations != nil { in, out := &in.UpdatedAnnotations, &out.UpdatedAnnotations *out = make(map[string]string) for key, val := range *in { (*out)[key] = val } - } else { - out.UpdatedAnnotations = nil } - out.RollbackTo = in.RollbackTo return nil } } @@ -290,15 +313,14 @@ func DeepCopy_extensions_DeploymentSpec(in interface{}, out interface{}, c *conv { in := in.(*DeploymentSpec) out := out.(*DeploymentSpec) - out.Replicas = in.Replicas + *out = *in 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 { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } else { - out.Selector = nil } if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -306,21 +328,20 @@ func DeepCopy_extensions_DeploymentSpec(in interface{}, out interface{}, c *conv if err := DeepCopy_extensions_DeploymentStrategy(&in.Strategy, &out.Strategy, c); err != nil { return err } - out.MinReadySeconds = in.MinReadySeconds if in.RevisionHistoryLimit != nil { in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit *out = new(int32) **out = **in - } else { - out.RevisionHistoryLimit = nil } - out.Paused = in.Paused if in.RollbackTo != nil { in, out := &in.RollbackTo, &out.RollbackTo *out = new(RollbackConfig) **out = **in - } else { - out.RollbackTo = nil + } + if in.ProgressDeadlineSeconds != nil { + in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds + *out = new(int32) + **out = **in } return nil } @@ -330,11 +351,16 @@ func DeepCopy_extensions_DeploymentStatus(in interface{}, out interface{}, c *co { in := in.(*DeploymentStatus) out := out.(*DeploymentStatus) - out.ObservedGeneration = in.ObservedGeneration - out.Replicas = in.Replicas - out.UpdatedReplicas = in.UpdatedReplicas - out.AvailableReplicas = in.AvailableReplicas - out.UnavailableReplicas = in.UnavailableReplicas + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]DeploymentCondition, len(*in)) + for i := range *in { + if err := DeepCopy_extensions_DeploymentCondition(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } return nil } } @@ -343,13 +369,11 @@ func DeepCopy_extensions_DeploymentStrategy(in interface{}, out interface{}, c * { in := in.(*DeploymentStrategy) out := out.(*DeploymentStrategy) - out.Type = in.Type + *out = *in if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate *out = new(RollingUpdateDeployment) **out = **in - } else { - out.RollingUpdate = nil } return nil } @@ -359,15 +383,11 @@ func DeepCopy_extensions_FSGroupStrategyOptions(in interface{}, out interface{}, { in := in.(*FSGroupStrategyOptions) out := out.(*FSGroupStrategyOptions) - out.Rule = in.Rule + *out = *in if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Ranges = nil + copy(*out, *in) } return nil } @@ -377,8 +397,7 @@ func DeepCopy_extensions_HTTPIngressPath(in interface{}, out interface{}, c *con { in := in.(*HTTPIngressPath) out := out.(*HTTPIngressPath) - out.Path = in.Path - out.Backend = in.Backend + *out = *in return nil } } @@ -387,14 +406,11 @@ func DeepCopy_extensions_HTTPIngressRuleValue(in interface{}, out interface{}, c { in := in.(*HTTPIngressRuleValue) out := out.(*HTTPIngressRuleValue) + *out = *in if in.Paths != nil { in, out := &in.Paths, &out.Paths *out = make([]HTTPIngressPath, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Paths = nil + copy(*out, *in) } return nil } @@ -404,8 +420,7 @@ func DeepCopy_extensions_HostPortRange(in interface{}, out interface{}, c *conve { in := in.(*HostPortRange) out := out.(*HostPortRange) - out.Min = in.Min - out.Max = in.Max + *out = *in return nil } } @@ -414,8 +429,7 @@ func DeepCopy_extensions_IDRange(in interface{}, out interface{}, c *conversion. { in := in.(*IDRange) out := out.(*IDRange) - out.Min = in.Min - out.Max = in.Max + *out = *in return nil } } @@ -424,9 +438,11 @@ func DeepCopy_extensions_Ingress(in interface{}, out interface{}, c *conversion. { in := in.(*Ingress) out := out.(*Ingress) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_IngressSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -442,8 +458,7 @@ func DeepCopy_extensions_IngressBackend(in interface{}, out interface{}, c *conv { in := in.(*IngressBackend) out := out.(*IngressBackend) - out.ServiceName = in.ServiceName - out.ServicePort = in.ServicePort + *out = *in return nil } } @@ -452,8 +467,7 @@ func DeepCopy_extensions_IngressList(in interface{}, out interface{}, c *convers { in := in.(*IngressList) out := out.(*IngressList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Ingress, len(*in)) @@ -462,8 +476,6 @@ func DeepCopy_extensions_IngressList(in interface{}, out interface{}, c *convers return err } } - } else { - out.Items = nil } return nil } @@ -473,7 +485,7 @@ func DeepCopy_extensions_IngressRule(in interface{}, out interface{}, c *convers { in := in.(*IngressRule) out := out.(*IngressRule) - out.Host = in.Host + *out = *in if err := DeepCopy_extensions_IngressRuleValue(&in.IngressRuleValue, &out.IngressRuleValue, c); err != nil { return err } @@ -485,14 +497,13 @@ func DeepCopy_extensions_IngressRuleValue(in interface{}, out interface{}, c *co { in := in.(*IngressRuleValue) out := out.(*IngressRuleValue) + *out = *in if in.HTTP != nil { in, out := &in.HTTP, &out.HTTP *out = new(HTTPIngressRuleValue) if err := DeepCopy_extensions_HTTPIngressRuleValue(*in, *out, c); err != nil { return err } - } else { - out.HTTP = nil } return nil } @@ -502,12 +513,11 @@ func DeepCopy_extensions_IngressSpec(in interface{}, out interface{}, c *convers { in := in.(*IngressSpec) out := out.(*IngressSpec) + *out = *in if in.Backend != nil { in, out := &in.Backend, &out.Backend *out = new(IngressBackend) **out = **in - } else { - out.Backend = nil } if in.TLS != nil { in, out := &in.TLS, &out.TLS @@ -517,8 +527,6 @@ func DeepCopy_extensions_IngressSpec(in interface{}, out interface{}, c *convers return err } } - } else { - out.TLS = nil } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -528,8 +536,6 @@ func DeepCopy_extensions_IngressSpec(in interface{}, out interface{}, c *convers return err } } - } else { - out.Rules = nil } return nil } @@ -539,6 +545,7 @@ func DeepCopy_extensions_IngressStatus(in interface{}, out interface{}, c *conve { in := in.(*IngressStatus) out := out.(*IngressStatus) + *out = *in if err := api.DeepCopy_api_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil { return err } @@ -550,14 +557,12 @@ func DeepCopy_extensions_IngressTLS(in interface{}, out interface{}, c *conversi { in := in.(*IngressTLS) out := out.(*IngressTLS) + *out = *in if in.Hosts != nil { in, out := &in.Hosts, &out.Hosts *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Hosts = nil } - out.SecretName = in.SecretName return nil } } @@ -566,9 +571,11 @@ func DeepCopy_extensions_NetworkPolicy(in interface{}, out interface{}, c *conve { in := in.(*NetworkPolicy) out := out.(*NetworkPolicy) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -581,6 +588,7 @@ func DeepCopy_extensions_NetworkPolicyIngressRule(in interface{}, out interface{ { in := in.(*NetworkPolicyIngressRule) out := out.(*NetworkPolicyIngressRule) + *out = *in if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]NetworkPolicyPort, len(*in)) @@ -589,8 +597,6 @@ func DeepCopy_extensions_NetworkPolicyIngressRule(in interface{}, out interface{ return err } } - } else { - out.Ports = nil } if in.From != nil { in, out := &in.From, &out.From @@ -600,8 +606,6 @@ func DeepCopy_extensions_NetworkPolicyIngressRule(in interface{}, out interface{ return err } } - } else { - out.From = nil } return nil } @@ -611,8 +615,7 @@ func DeepCopy_extensions_NetworkPolicyList(in interface{}, out interface{}, c *c { in := in.(*NetworkPolicyList) out := out.(*NetworkPolicyList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]NetworkPolicy, len(*in)) @@ -621,8 +624,6 @@ func DeepCopy_extensions_NetworkPolicyList(in interface{}, out interface{}, c *c return err } } - } else { - out.Items = nil } return nil } @@ -632,23 +633,22 @@ func DeepCopy_extensions_NetworkPolicyPeer(in interface{}, out interface{}, c *c { in := in.(*NetworkPolicyPeer) out := out.(*NetworkPolicyPeer) + *out = *in if in.PodSelector != nil { in, out := &in.PodSelector, &out.PodSelector - *out = new(unversioned.LabelSelector) - if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } else { - out.PodSelector = nil } if in.NamespaceSelector != nil { in, out := &in.NamespaceSelector, &out.NamespaceSelector - *out = new(unversioned.LabelSelector) - if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } else { - out.NamespaceSelector = nil } return nil } @@ -658,19 +658,16 @@ func DeepCopy_extensions_NetworkPolicyPort(in interface{}, out interface{}, c *c { in := in.(*NetworkPolicyPort) out := out.(*NetworkPolicyPort) + *out = *in if in.Protocol != nil { in, out := &in.Protocol, &out.Protocol *out = new(api.Protocol) **out = **in - } else { - out.Protocol = nil } if in.Port != nil { in, out := &in.Port, &out.Port *out = new(intstr.IntOrString) **out = **in - } else { - out.Port = nil } return nil } @@ -680,8 +677,11 @@ func DeepCopy_extensions_NetworkPolicySpec(in interface{}, out interface{}, c *c { in := in.(*NetworkPolicySpec) out := out.(*NetworkPolicySpec) - if err := unversioned.DeepCopy_unversioned_LabelSelector(&in.PodSelector, &out.PodSelector, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.PodSelector); err != nil { return err + } else { + out.PodSelector = *newVal.(*v1.LabelSelector) } if in.Ingress != nil { in, out := &in.Ingress, &out.Ingress @@ -691,8 +691,6 @@ func DeepCopy_extensions_NetworkPolicySpec(in interface{}, out interface{}, c *c return err } } - } else { - out.Ingress = nil } return nil } @@ -702,9 +700,11 @@ func DeepCopy_extensions_PodSecurityPolicy(in interface{}, out interface{}, c *c { in := in.(*PodSecurityPolicy) out := out.(*PodSecurityPolicy) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_PodSecurityPolicySpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -717,8 +717,7 @@ func DeepCopy_extensions_PodSecurityPolicyList(in interface{}, out interface{}, { in := in.(*PodSecurityPolicyList) out := out.(*PodSecurityPolicyList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PodSecurityPolicy, len(*in)) @@ -727,8 +726,6 @@ func DeepCopy_extensions_PodSecurityPolicyList(in interface{}, out interface{}, return err } } - } else { - out.Items = nil } return nil } @@ -738,55 +735,32 @@ func DeepCopy_extensions_PodSecurityPolicySpec(in interface{}, out interface{}, { in := in.(*PodSecurityPolicySpec) out := out.(*PodSecurityPolicySpec) - out.Privileged = in.Privileged + *out = *in if in.DefaultAddCapabilities != nil { in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities *out = make([]api.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.DefaultAddCapabilities = nil + copy(*out, *in) } if in.RequiredDropCapabilities != nil { in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities *out = make([]api.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.RequiredDropCapabilities = nil + copy(*out, *in) } if in.AllowedCapabilities != nil { in, out := &in.AllowedCapabilities, &out.AllowedCapabilities *out = make([]api.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.AllowedCapabilities = nil + copy(*out, *in) } if in.Volumes != nil { in, out := &in.Volumes, &out.Volumes *out = make([]FSType, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Volumes = nil + copy(*out, *in) } - out.HostNetwork = in.HostNetwork if in.HostPorts != nil { in, out := &in.HostPorts, &out.HostPorts *out = make([]HostPortRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.HostPorts = nil + copy(*out, *in) } - out.HostPID = in.HostPID - out.HostIPC = in.HostIPC if err := DeepCopy_extensions_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, c); err != nil { return err } @@ -799,7 +773,6 @@ func DeepCopy_extensions_PodSecurityPolicySpec(in interface{}, out interface{}, if err := DeepCopy_extensions_FSGroupStrategyOptions(&in.FSGroup, &out.FSGroup, c); err != nil { return err } - out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem return nil } } @@ -808,14 +781,28 @@ func DeepCopy_extensions_ReplicaSet(in interface{}, out interface{}, c *conversi { in := in.(*ReplicaSet) out := out.(*ReplicaSet) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status + if err := DeepCopy_extensions_ReplicaSetStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_extensions_ReplicaSetCondition(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ReplicaSetCondition) + out := out.(*ReplicaSetCondition) + *out = *in + out.LastTransitionTime = in.LastTransitionTime.DeepCopy() return nil } } @@ -824,8 +811,7 @@ func DeepCopy_extensions_ReplicaSetList(in interface{}, out interface{}, c *conv { in := in.(*ReplicaSetList) out := out.(*ReplicaSetList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ReplicaSet, len(*in)) @@ -834,8 +820,6 @@ func DeepCopy_extensions_ReplicaSetList(in interface{}, out interface{}, c *conv return err } } - } else { - out.Items = nil } return nil } @@ -845,15 +829,14 @@ func DeepCopy_extensions_ReplicaSetSpec(in interface{}, out interface{}, c *conv { in := in.(*ReplicaSetSpec) out := out.(*ReplicaSetSpec) - out.Replicas = in.Replicas + *out = *in 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 { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } else { - out.Selector = nil } if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -866,10 +849,16 @@ func DeepCopy_extensions_ReplicaSetStatus(in interface{}, out interface{}, c *co { in := in.(*ReplicaSetStatus) out := out.(*ReplicaSetStatus) - out.Replicas = in.Replicas - out.FullyLabeledReplicas = in.FullyLabeledReplicas - out.ReadyReplicas = in.ReadyReplicas - out.ObservedGeneration = in.ObservedGeneration + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]ReplicaSetCondition, len(*in)) + for i := range *in { + if err := DeepCopy_extensions_ReplicaSetCondition(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } return nil } } @@ -878,7 +867,7 @@ func DeepCopy_extensions_ReplicationControllerDummy(in interface{}, out interfac { in := in.(*ReplicationControllerDummy) out := out.(*ReplicationControllerDummy) - out.TypeMeta = in.TypeMeta + *out = *in return nil } } @@ -887,7 +876,16 @@ func DeepCopy_extensions_RollbackConfig(in interface{}, out interface{}, c *conv { in := in.(*RollbackConfig) out := out.(*RollbackConfig) - out.Revision = in.Revision + *out = *in + return nil + } +} + +func DeepCopy_extensions_RollingUpdateDaemonSet(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RollingUpdateDaemonSet) + out := out.(*RollingUpdateDaemonSet) + *out = *in return nil } } @@ -896,8 +894,7 @@ func DeepCopy_extensions_RollingUpdateDeployment(in interface{}, out interface{} { in := in.(*RollingUpdateDeployment) out := out.(*RollingUpdateDeployment) - out.MaxUnavailable = in.MaxUnavailable - out.MaxSurge = in.MaxSurge + *out = *in return nil } } @@ -906,15 +903,11 @@ func DeepCopy_extensions_RunAsUserStrategyOptions(in interface{}, out interface{ { in := in.(*RunAsUserStrategyOptions) out := out.(*RunAsUserStrategyOptions) - out.Rule = in.Rule + *out = *in if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Ranges = nil + copy(*out, *in) } return nil } @@ -924,13 +917,11 @@ func DeepCopy_extensions_SELinuxStrategyOptions(in interface{}, out interface{}, { in := in.(*SELinuxStrategyOptions) out := out.(*SELinuxStrategyOptions) - out.Rule = in.Rule + *out = *in if in.SELinuxOptions != nil { in, out := &in.SELinuxOptions, &out.SELinuxOptions *out = new(api.SELinuxOptions) **out = **in - } else { - out.SELinuxOptions = nil } return nil } @@ -940,11 +931,12 @@ func DeepCopy_extensions_Scale(in interface{}, out interface{}, c *conversion.Cl { in := in.(*Scale) out := out.(*Scale) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } - out.Spec = in.Spec if err := DeepCopy_extensions_ScaleStatus(&in.Status, &out.Status, c); err != nil { return err } @@ -956,7 +948,7 @@ func DeepCopy_extensions_ScaleSpec(in interface{}, out interface{}, c *conversio { in := in.(*ScaleSpec) out := out.(*ScaleSpec) - out.Replicas = in.Replicas + *out = *in return nil } } @@ -965,15 +957,14 @@ func DeepCopy_extensions_ScaleStatus(in interface{}, out interface{}, c *convers { in := in.(*ScaleStatus) out := out.(*ScaleStatus) - out.Replicas = in.Replicas + *out = *in 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 { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } else { - out.Selector = nil } return nil } @@ -983,15 +974,11 @@ func DeepCopy_extensions_SupplementalGroupsStrategyOptions(in interface{}, out i { in := in.(*SupplementalGroupsStrategyOptions) out := out.(*SupplementalGroupsStrategyOptions) - out.Rule = in.Rule + *out = *in if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Ranges = nil + copy(*out, *in) } return nil } @@ -1001,19 +988,16 @@ func DeepCopy_extensions_ThirdPartyResource(in interface{}, out interface{}, c * { in := in.(*ThirdPartyResource) out := out.(*ThirdPartyResource) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } - out.Description = in.Description if in.Versions != nil { in, out := &in.Versions, &out.Versions *out = make([]APIVersion, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Versions = nil + copy(*out, *in) } return nil } @@ -1023,16 +1007,16 @@ func DeepCopy_extensions_ThirdPartyResourceData(in interface{}, out interface{}, { in := in.(*ThirdPartyResourceData) out := out.(*ThirdPartyResourceData) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data *out = make([]byte, len(*in)) copy(*out, *in) - } else { - out.Data = nil } return nil } @@ -1042,8 +1026,7 @@ func DeepCopy_extensions_ThirdPartyResourceDataList(in interface{}, out interfac { in := in.(*ThirdPartyResourceDataList) out := out.(*ThirdPartyResourceDataList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ThirdPartyResourceData, len(*in)) @@ -1052,8 +1035,6 @@ func DeepCopy_extensions_ThirdPartyResourceDataList(in interface{}, out interfac return err } } - } else { - out.Items = nil } return nil } @@ -1063,8 +1044,7 @@ func DeepCopy_extensions_ThirdPartyResourceList(in interface{}, out interface{}, { in := in.(*ThirdPartyResourceList) out := out.(*ThirdPartyResourceList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ThirdPartyResource, len(*in)) @@ -1073,8 +1053,6 @@ func DeepCopy_extensions_ThirdPartyResourceList(in interface{}, out interface{}, return err } } - } else { - out.Items = nil } return nil } diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/OWNERS b/vendor/k8s.io/client-go/pkg/apis/policy/OWNERS new file mode 100755 index 000000000..8d0eea516 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/policy/OWNERS @@ -0,0 +1,14 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- deads2k +- caesarxuchao +- sttts +- ncdc +- timothysc +- dims +- mml +- mbohlool +- david-mcmahon +- jianhuiz diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/doc.go b/vendor/k8s.io/client-go/pkg/apis/policy/doc.go new file mode 100644 index 000000000..8feeef8e4 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/policy/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package policy diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/install/install.go b/vendor/k8s.io/client-go/pkg/apis/policy/install/install.go similarity index 57% rename from vendor/k8s.io/client-go/1.5/pkg/apis/authorization/install/install.go rename to vendor/k8s.io/client-go/pkg/apis/policy/install/install.go index 49667c72f..6253d5bc2 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/authorization/install/install.go +++ b/vendor/k8s.io/client-go/pkg/apis/policy/install/install.go @@ -19,25 +19,31 @@ limitations under the License. package install import ( - "k8s.io/client-go/1.5/pkg/apimachinery/announced" - "k8s.io/client-go/1.5/pkg/apis/authorization" - "k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/apis/policy" + "k8s.io/client-go/pkg/apis/policy/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ - GroupName: authorization.GroupName, + GroupName: policy.GroupName, VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version}, - ImportPrefix: "k8s.io/client-go/1.5/pkg/apis/authorization", - RootScopedKinds: sets.NewString("SubjectAccessReview", "SelfSubjectAccessReview"), - AddInternalObjectsToScheme: authorization.AddToScheme, + ImportPrefix: "k8s.io/client-go/pkg/apis/policy", + AddInternalObjectsToScheme: policy.AddToScheme, }, announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/register.go b/vendor/k8s.io/client-go/pkg/apis/policy/register.go similarity index 80% rename from vendor/k8s.io/client-go/1.5/pkg/apis/policy/register.go rename to vendor/k8s.io/client-go/pkg/apis/policy/register.go index bb0f6c63e..5aadc3f1b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/policy/register.go @@ -17,24 +17,23 @@ limitations under the License. package policy import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "policy" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} // Kind takes an unqualified kind and returns a Group qualified GroupKind -func Kind(kind string) unversioned.GroupKind { +func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) unversioned.GroupResource { +func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } @@ -49,7 +48,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &PodDisruptionBudget{}, &PodDisruptionBudgetList{}, - &api.ListOptions{}, &Eviction{}, ) return nil diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/types.go b/vendor/k8s.io/client-go/pkg/apis/policy/types.go new file mode 100644 index 000000000..ef2ff713a --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/policy/types.go @@ -0,0 +1,113 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package policy + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" +) + +// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. +type PodDisruptionBudgetSpec struct { + // An eviction is allowed if at least "minAvailable" pods selected by + // "selector" will still be available after the eviction, i.e. even in the + // absence of the evicted pod. So for example you can prevent all voluntary + // evictions by specifying "100%". + // +optional + MinAvailable intstr.IntOrString + + // Label query over pods whose evictions are managed by the disruption + // budget. + // +optional + Selector *metav1.LabelSelector +} + +// PodDisruptionBudgetStatus represents information about the status of a +// PodDisruptionBudget. Status may trail the actual state of a system. +type PodDisruptionBudgetStatus struct { + // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other + // status informatio is valid only if observedGeneration equals to PDB's object generation. + // +optional + ObservedGeneration int64 + + // DisruptedPods contains information about pods whose eviction was + // processed by the API server eviction subresource handler but has not + // yet been observed by the PodDisruptionBudget controller. + // A pod will be in this map from the time when the API server processed the + // eviction request to the time when the pod is seen by PDB controller + // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod + // and the value is the time when the API server processed the eviction request. If + // the deletion didn't occur and a pod is still there it will be removed from + // the list automatically by PodDisruptionBudget controller after some time. + // If everything goes smooth this map should be empty for the most of the time. + // Large number of entries in the map may indicate problems with pod deletions. + DisruptedPods map[string]metav1.Time + + // Number of pod disruptions that are currently allowed. + PodDisruptionsAllowed int32 + + // current number of healthy pods + CurrentHealthy int32 + + // minimum desired number of healthy pods + DesiredHealthy int32 + + // total number of pods counted by this disruption budget + ExpectedPods int32 +} + +// +genclient=true + +// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods +type PodDisruptionBudget struct { + metav1.TypeMeta + // +optional + metav1.ObjectMeta + + // Specification of the desired behavior of the PodDisruptionBudget. + // +optional + Spec PodDisruptionBudgetSpec + // Most recently observed status of the PodDisruptionBudget. + // +optional + Status PodDisruptionBudgetStatus +} + +// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. +type PodDisruptionBudgetList struct { + metav1.TypeMeta + // +optional + metav1.ListMeta + Items []PodDisruptionBudget +} + +// +genclient=true +// +noMethods=true + +// Eviction evicts a pod from its node subject to certain policies and safety constraints. +// This is a subresource of Pod. A request to cause such an eviction is +// created by POSTing to .../pods//eviction. +type Eviction struct { + metav1.TypeMeta + + // ObjectMeta describes the pod that is being evicted. + // +optional + metav1.ObjectMeta + + // DeleteOptions may be provided + // +optional + DeleteOptions *metav1.DeleteOptions +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/doc.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/doc.go similarity index 84% rename from vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/doc.go rename to vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/doc.go index 90fb7f928..aadbe1416 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/doc.go +++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/doc.go @@ -14,11 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/policy - // Package policy is for any kind of policy object. Suitable examples, even if // they aren't all here, are PodDisruptionBudget, PodSecurityPolicy, // NetworkPolicy, etc. -// +k8s:openapi-gen=true -package v1alpha1 +package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.pb.go similarity index 69% rename from vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/generated.pb.go rename to vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.pb.go index cc337cb9b..3b68f56fa 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,14 +15,14 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.proto +// source: k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto // DO NOT EDIT! /* - Package v1alpha1 is a generated protocol buffer package. + Package v1beta1 is a generated protocol buffer package. It is generated from these files: - k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.proto + k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto It has these top-level messages: Eviction @@ -31,17 +31,17 @@ limitations under the License. PodDisruptionBudgetSpec PodDisruptionBudgetStatus */ -package v1alpha1 +package v1beta1 import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" -import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/1.5/pkg/api/v1" +import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" import strings "strings" import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" @@ -77,11 +77,11 @@ func (*PodDisruptionBudgetStatus) Descriptor() ([]byte, []int) { } func init() { - proto.RegisterType((*Eviction)(nil), "k8s.io.client-go.1.5.pkg.apis.policy.v1alpha1.Eviction") - proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.client-go.1.5.pkg.apis.policy.v1alpha1.PodDisruptionBudget") - proto.RegisterType((*PodDisruptionBudgetList)(nil), "k8s.io.client-go.1.5.pkg.apis.policy.v1alpha1.PodDisruptionBudgetList") - proto.RegisterType((*PodDisruptionBudgetSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.policy.v1alpha1.PodDisruptionBudgetSpec") - proto.RegisterType((*PodDisruptionBudgetStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.policy.v1alpha1.PodDisruptionBudgetStatus") + proto.RegisterType((*Eviction)(nil), "k8s.io.client-go.pkg.apis.policy.v1beta1.Eviction") + proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.client-go.pkg.apis.policy.v1beta1.PodDisruptionBudget") + proto.RegisterType((*PodDisruptionBudgetList)(nil), "k8s.io.client-go.pkg.apis.policy.v1beta1.PodDisruptionBudgetList") + proto.RegisterType((*PodDisruptionBudgetSpec)(nil), "k8s.io.client-go.pkg.apis.policy.v1beta1.PodDisruptionBudgetSpec") + proto.RegisterType((*PodDisruptionBudgetStatus)(nil), "k8s.io.client-go.pkg.apis.policy.v1beta1.PodDisruptionBudgetStatus") } func (m *Eviction) Marshal() (data []byte, err error) { size := m.Size() @@ -252,20 +252,40 @@ func (m *PodDisruptionBudgetStatus) MarshalTo(data []byte) (int, error) { _ = l data[i] = 0x8 i++ - if m.PodDisruptionAllowed { - data[i] = 1 - } else { - data[i] = 0 + i = encodeVarintGenerated(data, i, uint64(m.ObservedGeneration)) + if len(m.DisruptedPods) > 0 { + for k := range m.DisruptedPods { + data[i] = 0x12 + i++ + v := m.DisruptedPods[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())) + n9, err := (&v).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + } } - i++ - data[i] = 0x10 - i++ - i = encodeVarintGenerated(data, i, uint64(m.CurrentHealthy)) data[i] = 0x18 i++ - i = encodeVarintGenerated(data, i, uint64(m.DesiredHealthy)) + i = encodeVarintGenerated(data, i, uint64(m.PodDisruptionsAllowed)) data[i] = 0x20 i++ + i = encodeVarintGenerated(data, i, uint64(m.CurrentHealthy)) + data[i] = 0x28 + i++ + i = encodeVarintGenerated(data, i, uint64(m.DesiredHealthy)) + data[i] = 0x30 + i++ i = encodeVarintGenerated(data, i, uint64(m.ExpectedPods)) return i, nil } @@ -350,7 +370,17 @@ func (m *PodDisruptionBudgetSpec) Size() (n int) { func (m *PodDisruptionBudgetStatus) Size() (n int) { var l int _ = l - n += 2 + n += 1 + sovGenerated(uint64(m.ObservedGeneration)) + if len(m.DisruptedPods) > 0 { + for k, v := range m.DisruptedPods { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + n += 1 + sovGenerated(uint64(m.PodDisruptionsAllowed)) n += 1 + sovGenerated(uint64(m.CurrentHealthy)) n += 1 + sovGenerated(uint64(m.DesiredHealthy)) n += 1 + sovGenerated(uint64(m.ExpectedPods)) @@ -375,8 +405,8 @@ func (this *Eviction) String() string { return "nil" } s := strings.Join([]string{`&Eviction{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `DeleteOptions:` + strings.Replace(fmt.Sprintf("%v", this.DeleteOptions), "DeleteOptions", "k8s_io_kubernetes_pkg_api_v1.DeleteOptions", 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `DeleteOptions:` + strings.Replace(fmt.Sprintf("%v", this.DeleteOptions), "DeleteOptions", "k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions", 1) + `,`, `}`, }, "") return s @@ -386,7 +416,7 @@ func (this *PodDisruptionBudget) String() string { return "nil" } s := strings.Join([]string{`&PodDisruptionBudget{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodDisruptionBudgetSpec", "PodDisruptionBudgetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodDisruptionBudgetStatus", "PodDisruptionBudgetStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -398,7 +428,7 @@ func (this *PodDisruptionBudgetList) String() string { return "nil" } s := strings.Join([]string{`&PodDisruptionBudgetList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodDisruptionBudget", "PodDisruptionBudget", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -409,8 +439,8 @@ func (this *PodDisruptionBudgetSpec) String() string { return "nil" } s := strings.Join([]string{`&PodDisruptionBudgetSpec{`, - `MinAvailable:` + strings.Replace(strings.Replace(this.MinAvailable.String(), "IntOrString", "k8s_io_kubernetes_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`, - `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_kubernetes_pkg_api_unversioned.LabelSelector", 1) + `,`, + `MinAvailable:` + strings.Replace(strings.Replace(this.MinAvailable.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`, + `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, `}`, }, "") return s @@ -419,8 +449,20 @@ func (this *PodDisruptionBudgetStatus) String() string { if this == nil { return "nil" } + keysForDisruptedPods := make([]string, 0, len(this.DisruptedPods)) + for k := range this.DisruptedPods { + keysForDisruptedPods = append(keysForDisruptedPods, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods) + mapStringForDisruptedPods := "map[string]k8s_io_apimachinery_pkg_apis_meta_v1.Time{" + for _, k := range keysForDisruptedPods { + mapStringForDisruptedPods += fmt.Sprintf("%v: %v,", k, this.DisruptedPods[k]) + } + mapStringForDisruptedPods += "}" s := strings.Join([]string{`&PodDisruptionBudgetStatus{`, - `PodDisruptionAllowed:` + fmt.Sprintf("%v", this.PodDisruptionAllowed) + `,`, + `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, + `DisruptedPods:` + mapStringForDisruptedPods + `,`, + `PodDisruptionsAllowed:` + fmt.Sprintf("%v", this.PodDisruptionsAllowed) + `,`, `CurrentHealthy:` + fmt.Sprintf("%v", this.CurrentHealthy) + `,`, `DesiredHealthy:` + fmt.Sprintf("%v", this.DesiredHealthy) + `,`, `ExpectedPods:` + fmt.Sprintf("%v", this.ExpectedPods) + `,`, @@ -522,7 +564,7 @@ func (m *Eviction) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.DeleteOptions == nil { - m.DeleteOptions = &k8s_io_kubernetes_pkg_api_v1.DeleteOptions{} + m.DeleteOptions = &k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions{} } if err := m.DeleteOptions.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -886,7 +928,7 @@ func (m *PodDisruptionBudgetSpec) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.Selector == nil { - m.Selector = &k8s_io_kubernetes_pkg_api_unversioned.LabelSelector{} + m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} } if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -944,9 +986,9 @@ func (m *PodDisruptionBudgetStatus) Unmarshal(data []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PodDisruptionAllowed", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) } - var v int + m.ObservedGeneration = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -956,13 +998,147 @@ func (m *PodDisruptionBudgetStatus) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + m.ObservedGeneration |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } - m.PodDisruptionAllowed = bool(v != 0) case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DisruptedPods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.DisruptedPods == nil { + m.DisruptedPods = make(map[string]k8s_io_apimachinery_pkg_apis_meta_v1.Time) + } + m.DisruptedPods[mapkey] = *mapvalue + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PodDisruptionsAllowed", wireType) + } + m.PodDisruptionsAllowed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.PodDisruptionsAllowed |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CurrentHealthy", wireType) } @@ -981,7 +1157,7 @@ func (m *PodDisruptionBudgetStatus) Unmarshal(data []byte) error { break } } - case 3: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DesiredHealthy", wireType) } @@ -1000,7 +1176,7 @@ func (m *PodDisruptionBudgetStatus) Unmarshal(data []byte) error { break } } - case 4: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ExpectedPods", wireType) } @@ -1146,46 +1322,54 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 648 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x94, 0xdf, 0x6a, 0xd4, 0x4e, - 0x14, 0xc7, 0xbb, 0xfd, 0xc7, 0x32, 0xbf, 0x6d, 0xf9, 0x35, 0x16, 0x5d, 0x17, 0x69, 0x65, 0xaf, - 0x4a, 0xb5, 0x13, 0x5a, 0x14, 0x8a, 0x17, 0x4a, 0xd3, 0x16, 0xac, 0x58, 0x2a, 0xe9, 0x8d, 0x08, - 0x0a, 0x93, 0xe4, 0x98, 0x1d, 0x9b, 0x64, 0xc2, 0xcc, 0x64, 0xb5, 0x77, 0x3e, 0x82, 0xaf, 0xe0, - 0xc3, 0x08, 0xc5, 0xab, 0x5e, 0x7a, 0xb5, 0x68, 0xfb, 0x22, 0x4e, 0x26, 0xb3, 0xdb, 0xcd, 0xee, - 0xa6, 0x14, 0x8a, 0x17, 0x03, 0x39, 0x33, 0xe7, 0xf3, 0x3d, 0x7f, 0xe6, 0x4c, 0xd0, 0xb3, 0x93, - 0x6d, 0x81, 0x29, 0xb3, 0x4f, 0x32, 0x0f, 0x78, 0x02, 0x12, 0x84, 0x9d, 0x9e, 0x84, 0x36, 0x49, - 0xa9, 0xfa, 0x60, 0x11, 0xf5, 0x4f, 0xed, 0xee, 0x26, 0x89, 0xd2, 0x0e, 0xd9, 0xb4, 0x43, 0x48, - 0x80, 0x13, 0x09, 0x01, 0x4e, 0x39, 0x93, 0xcc, 0x5a, 0x2f, 0x58, 0x7c, 0xc5, 0x62, 0xc5, 0xe2, - 0x9c, 0xc5, 0x05, 0x8b, 0xfb, 0x6c, 0x6b, 0x23, 0xa4, 0xb2, 0x93, 0x79, 0xd8, 0x67, 0xb1, 0x1d, - 0xb2, 0x90, 0xd9, 0x5a, 0xc2, 0xcb, 0x3e, 0x6a, 0x4b, 0x1b, 0xfa, 0xab, 0x90, 0x6e, 0x6d, 0x55, - 0xa6, 0x65, 0x73, 0x10, 0x2c, 0xe3, 0x3e, 0x8c, 0xa6, 0xd3, 0x7a, 0x5a, 0xcd, 0x64, 0x49, 0x17, - 0xb8, 0xa0, 0x2c, 0x81, 0x60, 0x0c, 0x7b, 0x5c, 0x8d, 0x75, 0xc7, 0x6a, 0x6e, 0x6d, 0x4c, 0xf6, - 0xe6, 0x59, 0x22, 0x69, 0x3c, 0x9e, 0xd3, 0xe6, 0x64, 0xf7, 0x4c, 0xd2, 0xc8, 0xa6, 0x89, 0x14, - 0x92, 0x8f, 0x22, 0xed, 0x9f, 0x35, 0x54, 0xdf, 0xef, 0x52, 0x5f, 0xaa, 0x74, 0xad, 0xb7, 0xa8, - 0x1e, 0x83, 0x24, 0x01, 0x91, 0xa4, 0x59, 0x7b, 0x58, 0x5b, 0xfb, 0x6f, 0x6b, 0x0d, 0x57, 0x76, - 0x5d, 0x75, 0x1b, 0x1f, 0x79, 0x9f, 0xc0, 0x97, 0x87, 0x8a, 0x71, 0xac, 0xb3, 0xde, 0xea, 0xd4, - 0x45, 0x6f, 0x15, 0x5d, 0xed, 0xb9, 0x03, 0x35, 0x2b, 0x40, 0x0b, 0x01, 0x44, 0x0a, 0x3f, 0x4a, - 0xf3, 0x48, 0xa2, 0x39, 0xad, 0xe5, 0x1f, 0x5d, 0x2f, 0xbf, 0x37, 0x8c, 0x38, 0x4b, 0x4a, 0x7d, - 0xa1, 0xb4, 0xe5, 0x96, 0x45, 0xdb, 0x3f, 0xa6, 0xd1, 0x9d, 0x37, 0x2c, 0xd8, 0xa3, 0x82, 0x67, - 0x7a, 0xcb, 0xc9, 0x82, 0x10, 0xe4, 0x3f, 0xac, 0x0b, 0xd0, 0xac, 0x48, 0xc1, 0x37, 0xe5, 0xec, - 0xe2, 0x9b, 0xcf, 0x28, 0x9e, 0x90, 0xe8, 0xb1, 0x92, 0x72, 0x1a, 0x26, 0xe0, 0x6c, 0x6e, 0xb9, - 0x5a, 0xde, 0x8a, 0xd1, 0xbc, 0x90, 0x44, 0x66, 0xa2, 0x39, 0xa3, 0x03, 0xed, 0xdf, 0x36, 0x90, - 0x16, 0x73, 0x16, 0x4d, 0xa8, 0xf9, 0xc2, 0x76, 0x4d, 0x90, 0x76, 0xaf, 0x86, 0xee, 0x4d, 0xa0, - 0x5e, 0x53, 0x21, 0xad, 0xf7, 0x63, 0xbd, 0xb4, 0xaf, 0xe9, 0xe5, 0xd0, 0x53, 0xc0, 0x39, 0xae, - 0x5b, 0xfa, 0xbf, 0x09, 0x5b, 0xef, 0xef, 0x94, 0x06, 0x65, 0x8e, 0x4a, 0x88, 0xf3, 0x01, 0x99, - 0x51, 0xda, 0x2f, 0x6e, 0x59, 0xa8, 0xb3, 0x60, 0x62, 0xcd, 0x1d, 0xe4, 0xaa, 0x6e, 0x21, 0xde, - 0xbe, 0x9c, 0x5c, 0x60, 0xde, 0x71, 0xab, 0x83, 0x1a, 0x31, 0x4d, 0x76, 0xba, 0x84, 0x46, 0xc4, - 0x8b, 0xc0, 0x14, 0x89, 0x2b, 0x12, 0xc9, 0xdf, 0x16, 0x2e, 0xde, 0x16, 0x3e, 0x48, 0xe4, 0x11, - 0x3f, 0x96, 0x9c, 0x26, 0xa1, 0xb3, 0x6c, 0xe2, 0x36, 0x0e, 0x87, 0xb4, 0xdc, 0x92, 0xb2, 0xf5, - 0x01, 0xd5, 0x85, 0x9a, 0x5f, 0x5f, 0x32, 0x6e, 0x06, 0xe8, 0xc9, 0x4d, 0x5b, 0x49, 0x3c, 0x88, - 0x8e, 0x0d, 0xeb, 0x34, 0xf2, 0x5e, 0xf6, 0x2d, 0x77, 0xa0, 0xd9, 0xfe, 0x3e, 0x8d, 0xee, 0x57, - 0x5e, 0xbe, 0xf5, 0x0a, 0x2d, 0x05, 0x83, 0x93, 0x9d, 0x28, 0x62, 0x9f, 0x21, 0xd0, 0xc5, 0xd6, - 0x9d, 0x07, 0x26, 0xf9, 0xe5, 0x12, 0x6d, 0x7c, 0xdc, 0x71, 0xcc, 0x7a, 0x8e, 0x16, 0xfd, 0x8c, - 0x73, 0x48, 0xe4, 0x4b, 0x20, 0x91, 0xec, 0x9c, 0xea, 0x7a, 0xe6, 0x9c, 0xbb, 0x46, 0x68, 0x71, - 0xb7, 0x74, 0xea, 0x8e, 0x78, 0xe7, 0x7c, 0x00, 0x82, 0x72, 0x08, 0xfa, 0xfc, 0x4c, 0x99, 0xdf, - 0x2b, 0x9d, 0xba, 0x23, 0xde, 0xd6, 0x36, 0x6a, 0xc0, 0x17, 0x75, 0x79, 0xea, 0xbf, 0xa6, 0x52, - 0x16, 0xcd, 0x59, 0x4d, 0x0f, 0xee, 0x60, 0x7f, 0xe8, 0xcc, 0x2d, 0x79, 0x3a, 0xeb, 0x67, 0x7f, - 0x56, 0xa6, 0xce, 0xd5, 0xfa, 0xa5, 0xd6, 0xd7, 0x8b, 0x95, 0xda, 0x99, 0x5a, 0xe7, 0x6a, 0xfd, - 0x56, 0xeb, 0xdb, 0xe5, 0xca, 0xd4, 0xbb, 0x7a, 0x7f, 0xbe, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, - 0x7d, 0xdd, 0x26, 0x2d, 0xbe, 0x06, 0x00, 0x00, + // 773 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x94, 0xcb, 0x6e, 0xf3, 0x44, + 0x18, 0x86, 0xe3, 0x26, 0x29, 0x61, 0x9a, 0x54, 0x65, 0xa0, 0x10, 0x22, 0xe1, 0xa2, 0xac, 0x5a, + 0x04, 0x63, 0xda, 0x22, 0x54, 0x58, 0x54, 0xd4, 0xa4, 0x82, 0xa2, 0x56, 0xa9, 0x5c, 0x24, 0x24, + 0x04, 0x12, 0x63, 0xfb, 0xc3, 0x99, 0xc6, 0x27, 0x8d, 0xc7, 0xa1, 0xd9, 0x71, 0x09, 0x2c, 0xb8, + 0xa8, 0x4a, 0x6c, 0xba, 0x44, 0x08, 0x55, 0x34, 0x70, 0x0b, 0xec, 0x91, 0xc7, 0x93, 0x83, 0x9b, + 0x44, 0x0d, 0xea, 0xaf, 0x7f, 0xe7, 0x39, 0x3c, 0xef, 0xfb, 0x9d, 0xc6, 0xe8, 0x93, 0xfe, 0x51, + 0x42, 0x58, 0x64, 0xf4, 0x53, 0x1b, 0x78, 0x08, 0x02, 0x12, 0x23, 0xee, 0x7b, 0x06, 0x8d, 0x59, + 0x62, 0xc4, 0x91, 0xcf, 0x9c, 0xa1, 0x31, 0xd8, 0xb7, 0x41, 0xd0, 0x7d, 0xc3, 0x83, 0x10, 0x38, + 0x15, 0xe0, 0x92, 0x98, 0x47, 0x22, 0xc2, 0x7b, 0x39, 0x4a, 0xa6, 0x28, 0x89, 0xfb, 0x1e, 0xc9, + 0x50, 0x92, 0xa3, 0x44, 0xa1, 0xad, 0x0f, 0x3c, 0x26, 0x7a, 0xa9, 0x4d, 0x9c, 0x28, 0x30, 0xbc, + 0xc8, 0x8b, 0x0c, 0xa9, 0x60, 0xa7, 0x3f, 0xca, 0x95, 0x5c, 0xc8, 0xaf, 0x5c, 0xb9, 0xf5, 0x91, + 0x0a, 0x8a, 0xc6, 0x2c, 0xa0, 0x4e, 0x8f, 0x85, 0xc0, 0x87, 0xd3, 0xb0, 0x02, 0x10, 0xd4, 0x18, + 0xcc, 0xc5, 0xd3, 0x32, 0x96, 0x51, 0x3c, 0x0d, 0x05, 0x0b, 0x60, 0x0e, 0xf8, 0xf8, 0x29, 0x20, + 0x71, 0x7a, 0x10, 0xd0, 0x39, 0xee, 0x70, 0x19, 0x97, 0x0a, 0xe6, 0x1b, 0x2c, 0x14, 0x89, 0xe0, + 0x73, 0xd0, 0x4c, 0x4e, 0x09, 0xf0, 0x01, 0xf0, 0x69, 0x42, 0x70, 0x43, 0x83, 0xd8, 0x87, 0x45, + 0x39, 0xbd, 0xbf, 0xb4, 0x3d, 0x0b, 0x6e, 0xb7, 0xff, 0xd0, 0x50, 0xed, 0x74, 0xc0, 0x1c, 0xc1, + 0xa2, 0x10, 0xff, 0x80, 0x6a, 0x59, 0xa5, 0x5c, 0x2a, 0x68, 0x53, 0x7b, 0x57, 0xdb, 0xdd, 0x38, + 0xf8, 0x90, 0xa8, 0x8e, 0xcd, 0x06, 0x3e, 0xed, 0x59, 0x76, 0x9b, 0x0c, 0xf6, 0x49, 0xd7, 0xbe, + 0x06, 0x47, 0x5c, 0x80, 0xa0, 0x26, 0xbe, 0xbd, 0xdf, 0x29, 0x8d, 0xee, 0x77, 0xd0, 0x74, 0xcf, + 0x9a, 0xa8, 0x62, 0x1f, 0x35, 0x5c, 0xf0, 0x41, 0x40, 0x37, 0xce, 0x1c, 0x93, 0xe6, 0x9a, 0xb4, + 0x39, 0x5c, 0xcd, 0xa6, 0x33, 0x8b, 0x9a, 0xaf, 0x8d, 0xee, 0x77, 0x1a, 0x85, 0x2d, 0xab, 0x28, + 0xde, 0xfe, 0x6d, 0x0d, 0xbd, 0x7e, 0x19, 0xb9, 0x1d, 0x96, 0xf0, 0x54, 0x6e, 0x99, 0xa9, 0xeb, + 0x81, 0x78, 0x09, 0x79, 0xba, 0xa8, 0x92, 0xc4, 0xe0, 0xa8, 0xf4, 0x4c, 0xb2, 0xf2, 0xdc, 0x93, + 0x05, 0xf1, 0x5e, 0xc5, 0xe0, 0x98, 0x75, 0xe5, 0x57, 0xc9, 0x56, 0x96, 0x54, 0xc7, 0x3e, 0x5a, + 0x4f, 0x04, 0x15, 0x69, 0xd2, 0x2c, 0x4b, 0x9f, 0xce, 0x33, 0x7d, 0xa4, 0x96, 0xb9, 0xa9, 0x9c, + 0xd6, 0xf3, 0xb5, 0xa5, 0x3c, 0xda, 0x7f, 0x6a, 0xe8, 0xad, 0x05, 0xd4, 0x39, 0x4b, 0x04, 0xfe, + 0x6e, 0xae, 0xa2, 0x64, 0xb5, 0x8a, 0x66, 0xb4, 0xac, 0xe7, 0x96, 0x72, 0xad, 0x8d, 0x77, 0x66, + 0xaa, 0xe9, 0xa0, 0x2a, 0x13, 0x10, 0x64, 0xd3, 0x52, 0xde, 0xdd, 0x38, 0x38, 0x7e, 0x5e, 0x9a, + 0x66, 0x43, 0x59, 0x55, 0xcf, 0x32, 0x51, 0x2b, 0xd7, 0x6e, 0xff, 0xb3, 0x38, 0xbd, 0xac, 0xdc, + 0xf8, 0x1a, 0xd5, 0x03, 0x16, 0x9e, 0x0c, 0x28, 0xf3, 0xa9, 0xed, 0xc3, 0x93, 0x43, 0x93, 0xbd, + 0x6a, 0x92, 0xbf, 0x6a, 0x72, 0x16, 0x8a, 0x2e, 0xbf, 0x12, 0x9c, 0x85, 0x9e, 0xf9, 0x86, 0x72, + 0xae, 0x5f, 0xcc, 0xa8, 0x59, 0x05, 0x6d, 0xfc, 0x3d, 0xaa, 0x25, 0xe0, 0x83, 0x23, 0x22, 0xfe, + 0xff, 0x5e, 0xc7, 0x39, 0xb5, 0xc1, 0xbf, 0x52, 0xa8, 0x59, 0xcf, 0x6a, 0x39, 0x5e, 0x59, 0x13, + 0xc9, 0xf6, 0xbf, 0x15, 0xf4, 0xf6, 0xd2, 0xde, 0xe3, 0xaf, 0x10, 0x8e, 0x6c, 0xf9, 0xb3, 0x71, + 0xbf, 0xc8, 0xff, 0x14, 0x2c, 0x0a, 0x65, 0xba, 0x65, 0xb3, 0xa5, 0x82, 0xc7, 0xdd, 0xb9, 0x1b, + 0xd6, 0x02, 0x0a, 0xff, 0xaa, 0xa1, 0x86, 0x9b, 0xdb, 0x80, 0x7b, 0x19, 0xb9, 0xe3, 0xf6, 0x7d, + 0xf3, 0x22, 0xa6, 0x94, 0x74, 0x66, 0x95, 0x4f, 0x43, 0xc1, 0x87, 0xe6, 0xb6, 0x0a, 0xb0, 0x51, + 0x38, 0xb3, 0x8a, 0x41, 0xe0, 0x0b, 0x84, 0xdd, 0x89, 0x64, 0x72, 0xe2, 0xfb, 0xd1, 0x4f, 0xe0, + 0xca, 0x07, 0x54, 0x35, 0xdf, 0x51, 0x0a, 0xdb, 0x05, 0xdf, 0xf1, 0x25, 0x6b, 0x01, 0x88, 0x8f, + 0xd1, 0xa6, 0x93, 0x72, 0x0e, 0xa1, 0xf8, 0x12, 0xa8, 0x2f, 0x7a, 0xc3, 0x66, 0x45, 0x4a, 0xbd, + 0xa9, 0xa4, 0x36, 0x3f, 0x2f, 0x9c, 0x5a, 0x8f, 0x6e, 0x67, 0xbc, 0x0b, 0x09, 0xe3, 0xe0, 0x8e, + 0xf9, 0x6a, 0x91, 0xef, 0x14, 0x4e, 0xad, 0x47, 0xb7, 0xf1, 0x11, 0xaa, 0xc3, 0x4d, 0x0c, 0xce, + 0xb8, 0xc6, 0xeb, 0x92, 0x9e, 0x0c, 0xda, 0xe9, 0xcc, 0x99, 0x55, 0xb8, 0xd9, 0xf2, 0x11, 0x9e, + 0x2f, 0x22, 0xde, 0x42, 0xe5, 0x3e, 0x0c, 0x65, 0xcb, 0x5f, 0xb5, 0xb2, 0x4f, 0xfc, 0x19, 0xaa, + 0x0e, 0xa8, 0x9f, 0x82, 0x9a, 0xc6, 0xf7, 0x56, 0x9b, 0xc6, 0xaf, 0x59, 0x00, 0x56, 0x0e, 0x7e, + 0xba, 0x76, 0xa4, 0x99, 0x7b, 0xb7, 0x0f, 0x7a, 0xe9, 0xee, 0x41, 0x2f, 0xfd, 0xfe, 0xa0, 0x97, + 0x7e, 0x1e, 0xe9, 0xda, 0xed, 0x48, 0xd7, 0xee, 0x46, 0xba, 0xf6, 0xd7, 0x48, 0xd7, 0x7e, 0xf9, + 0x5b, 0x2f, 0x7d, 0xfb, 0x8a, 0x6a, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1b, 0xe9, 0x2f, + 0xf1, 0x61, 0x08, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.proto new file mode 100644 index 000000000..d14d5de30 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.proto @@ -0,0 +1,109 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.kubernetes.pkg.apis.policy.v1beta1; + +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1beta1"; + +// Eviction evicts a pod from its node subject to certain policies and safety constraints. +// This is a subresource of Pod. A request to cause such an eviction is +// created by POSTing to .../pods//evictions. +message Eviction { + // ObjectMeta describes the pod that is being evicted. + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // DeleteOptions may be provided + optional k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions deleteOptions = 2; +} + +// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods +message PodDisruptionBudget { + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the desired behavior of the PodDisruptionBudget. + optional PodDisruptionBudgetSpec spec = 2; + + // Most recently observed status of the PodDisruptionBudget. + optional PodDisruptionBudgetStatus status = 3; +} + +// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. +message PodDisruptionBudgetList { + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + repeated PodDisruptionBudget items = 2; +} + +// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. +message PodDisruptionBudgetSpec { + // An eviction is allowed if at least "minAvailable" pods selected by + // "selector" will still be available after the eviction, i.e. even in the + // absence of the evicted pod. So for example you can prevent all voluntary + // evictions by specifying "100%". + optional k8s.io.apimachinery.pkg.util.intstr.IntOrString minAvailable = 1; + + // Label query over pods whose evictions are managed by the disruption + // budget. + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; +} + +// PodDisruptionBudgetStatus represents information about the status of a +// PodDisruptionBudget. Status may trail the actual state of a system. +message PodDisruptionBudgetStatus { + // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other + // status informatio is valid only if observedGeneration equals to PDB's object generation. + // +optional + optional int64 observedGeneration = 1; + + // DisruptedPods contains information about pods whose eviction was + // processed by the API server eviction subresource handler but has not + // yet been observed by the PodDisruptionBudget controller. + // A pod will be in this map from the time when the API server processed the + // eviction request to the time when the pod is seen by PDB controller + // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod + // and the value is the time when the API server processed the eviction request. If + // the deletion didn't occur and a pod is still there it will be removed from + // the list automatically by PodDisruptionBudget controller after some time. + // If everything goes smooth this map should be empty for the most of the time. + // Large number of entries in the map may indicate problems with pod deletions. + map disruptedPods = 2; + + // Number of pod disruptions that are currently allowed. + optional int32 disruptionsAllowed = 3; + + // current number of healthy pods + optional int32 currentHealthy = 4; + + // minimum desired number of healthy pods + optional int32 desiredHealthy = 5; + + // total number of pods counted by this disruption budget + optional int32 expectedPods = 6; +} + diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/register.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/register.go similarity index 69% rename from vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/register.go rename to vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/register.go index f3f36faaa..52bd65c8b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/register.go @@ -14,20 +14,24 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/runtime" - versionedwatch "k8s.io/client-go/1.5/pkg/watch/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "policy" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) @@ -40,10 +44,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PodDisruptionBudget{}, &PodDisruptionBudgetList{}, &Eviction{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, ) // Add the watch version that applies - versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.generated.go similarity index 52% rename from vendor/k8s.io/client-go/1.5/pkg/apis/policy/types.generated.go rename to vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.generated.go index 9afa1aa7b..049bfe8e6 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/types.generated.go +++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.generated.go @@ -19,16 +19,15 @@ limitations under the License. // THIS FILE IS AUTO-GENERATED BY codecgen. // ************************************************************ -package policy +package v1beta1 import ( "errors" "fmt" codec1978 "github.com/ugorji/go/codec" - pkg3_api "k8s.io/client-go/1.5/pkg/api" - pkg2_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg4_types "k8s.io/client-go/1.5/pkg/types" - pkg1_intstr "k8s.io/client-go/1.5/pkg/util/intstr" + pkg2_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg3_types "k8s.io/apimachinery/pkg/types" + pkg1_intstr "k8s.io/apimachinery/pkg/util/intstr" "reflect" "runtime" time "time" @@ -64,12 +63,11 @@ func init() { panic(err) } if false { // reference the types, but skip this branch at build/run time - var v0 pkg3_api.ObjectMeta - var v1 pkg2_unversioned.LabelSelector - var v2 pkg4_types.UID - var v3 pkg1_intstr.IntOrString - var v4 time.Time - _, _, _, _, _ = v0, v1, v2, v3, v4 + var v0 pkg2_v1.LabelSelector + var v1 pkg3_types.UID + var v2 pkg1_intstr.IntOrString + var v3 time.Time + _, _, _, _ = v0, v1, v2, v3 } } @@ -186,25 +184,25 @@ func (x *PodDisruptionBudgetSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym11 := z.DecBinary() - _ = yym11 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct12 := r.ContainerType() - if yyct12 == codecSelferValueTypeMap1234 { - yyl12 := r.ReadMapStart() - if yyl12 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl12, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct12 == codecSelferValueTypeArray1234 { - yyl12 := r.ReadArrayStart() - if yyl12 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl12, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -216,12 +214,12 @@ func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys13Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys13Slc - var yyhl13 bool = l >= 0 - for yyj13 := 0; ; yyj13++ { - if yyhl13 { - if yyj13 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -230,23 +228,23 @@ func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys13Slc = r.DecodeBytes(yys13Slc, true, true) - yys13 := string(yys13Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys13 { + switch yys3 { case "minAvailable": if r.TryDecodeAsNil() { x.MinAvailable = pkg1_intstr.IntOrString{} } else { - yyv14 := &x.MinAvailable - yym15 := z.DecBinary() - _ = yym15 + yyv4 := &x.MinAvailable + yym5 := z.DecBinary() + _ = yym5 if false { - } else if z.HasExtensions() && z.DecExt(yyv14) { - } else if !yym15 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv14) + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else if !yym5 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4) } else { - z.DecFallback(yyv14, false) + z.DecFallback(yyv4, false) } } case "selector": @@ -256,10 +254,10 @@ func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } else { if x.Selector == nil { - x.Selector = new(pkg2_unversioned.LabelSelector) + x.Selector = new(pkg2_v1.LabelSelector) } - yym17 := z.DecBinary() - _ = yym17 + yym7 := z.DecBinary() + _ = yym7 if false { } else if z.HasExtensions() && z.DecExt(x.Selector) { } else { @@ -267,9 +265,9 @@ func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } default: - z.DecStructFieldNotFound(-1, yys13) - } // end switch yys13 - } // end for yyj13 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -277,16 +275,16 @@ func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromArray(l int, d *codec1978.D 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 + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb18 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb18 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -294,24 +292,24 @@ func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.MinAvailable = pkg1_intstr.IntOrString{} } else { - yyv19 := &x.MinAvailable - yym20 := z.DecBinary() - _ = yym20 + yyv9 := &x.MinAvailable + yym10 := z.DecBinary() + _ = yym10 if false { - } else if z.HasExtensions() && z.DecExt(yyv19) { - } else if !yym20 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv19) + } else if z.HasExtensions() && z.DecExt(yyv9) { + } else if !yym10 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv9) } else { - z.DecFallback(yyv19, false) + z.DecFallback(yyv9, false) } } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb18 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb18 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -322,10 +320,10 @@ func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromArray(l int, d *codec1978.D } } else { if x.Selector == nil { - x.Selector = new(pkg2_unversioned.LabelSelector) + x.Selector = new(pkg2_v1.LabelSelector) } - yym22 := z.DecBinary() - _ = yym22 + yym12 := z.DecBinary() + _ = yym12 if false { } else if z.HasExtensions() && z.DecExt(x.Selector) { } else { @@ -333,17 +331,17 @@ func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromArray(l int, d *codec1978.D } } for { - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb18 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb18 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj18-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -355,52 +353,105 @@ func (x *PodDisruptionBudgetStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym23 := z.EncBinary() - _ = yym23 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep24 := !z.EncBinary() - yy2arr24 := z.EncBasicHandle().StructToArray - var yyq24 [4]bool - _, _, _ = yysep24, yyq24, yy2arr24 - const yyr24 bool = false - var yynn24 int - if yyr24 || yy2arr24 { - r.EncodeArrayStart(4) + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [6]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.ObservedGeneration != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(6) } else { - yynn24 = 4 - for _, b := range yyq24 { + yynn2 = 5 + for _, b := range yyq2 { if b { - yynn24++ + yynn2++ } } - r.EncodeMapStart(yynn24) - yynn24 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr24 || yy2arr24 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym26 := z.EncBinary() - _ = yym26 - if false { + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeInt(int64(x.ObservedGeneration)) + } } else { - r.EncodeBool(bool(x.PodDisruptionAllowed)) + r.EncodeInt(0) + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("observedGeneration")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(x.ObservedGeneration)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.DisruptedPods == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + h.encMapstringv1_Time((map[string]pkg2_v1.Time)(x.DisruptedPods), e) + } } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("disruptionAllowed")) + r.EncodeString(codecSelferC_UTF81234, string("disruptedPods")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym27 := z.EncBinary() - _ = yym27 - if false { + if x.DisruptedPods == nil { + r.EncodeNil() } else { - r.EncodeBool(bool(x.PodDisruptionAllowed)) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + h.encMapstringv1_Time((map[string]pkg2_v1.Time)(x.DisruptedPods), e) + } } } - if yyr24 || yy2arr24 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym29 := z.EncBinary() - _ = yym29 + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(x.PodDisruptionsAllowed)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("disruptionsAllowed")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeInt(int64(x.PodDisruptionsAllowed)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeInt(int64(x.CurrentHealthy)) @@ -409,17 +460,17 @@ func (x *PodDisruptionBudgetStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("currentHealthy")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym30 := z.EncBinary() - _ = yym30 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeInt(int64(x.CurrentHealthy)) } } - if yyr24 || yy2arr24 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym32 := z.EncBinary() - _ = yym32 + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeInt(int64(x.DesiredHealthy)) @@ -428,17 +479,17 @@ func (x *PodDisruptionBudgetStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("desiredHealthy")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym33 := z.EncBinary() - _ = yym33 + yym17 := z.EncBinary() + _ = yym17 if false { } else { r.EncodeInt(int64(x.DesiredHealthy)) } } - if yyr24 || yy2arr24 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym35 := z.EncBinary() - _ = yym35 + yym19 := z.EncBinary() + _ = yym19 if false { } else { r.EncodeInt(int64(x.ExpectedPods)) @@ -447,14 +498,14 @@ func (x *PodDisruptionBudgetStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("expectedPods")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym36 := z.EncBinary() - _ = yym36 + yym20 := z.EncBinary() + _ = yym20 if false { } else { r.EncodeInt(int64(x.ExpectedPods)) } } - if yyr24 || yy2arr24 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -467,25 +518,25 @@ func (x *PodDisruptionBudgetStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym37 := z.DecBinary() - _ = yym37 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct38 := r.ContainerType() - if yyct38 == codecSelferValueTypeMap1234 { - yyl38 := r.ReadMapStart() - if yyl38 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl38, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct38 == codecSelferValueTypeArray1234 { - yyl38 := r.ReadArrayStart() - if yyl38 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl38, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -497,12 +548,12 @@ func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromMap(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys39Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys39Slc - var yyhl39 bool = l >= 0 - for yyj39 := 0; ; yyj39++ { - if yyhl39 { - if yyj39 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -511,38 +562,86 @@ func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromMap(l int, d *codec1978.D } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys39Slc = r.DecodeBytes(yys39Slc, true, true) - yys39 := string(yys39Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys39 { - case "disruptionAllowed": + switch yys3 { + case "observedGeneration": if r.TryDecodeAsNil() { - x.PodDisruptionAllowed = false + x.ObservedGeneration = 0 } else { - x.PodDisruptionAllowed = bool(r.DecodeBool()) + yyv4 := &x.ObservedGeneration + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int64)(yyv4)) = int64(r.DecodeInt(64)) + } + } + case "disruptedPods": + if r.TryDecodeAsNil() { + x.DisruptedPods = nil + } else { + yyv6 := &x.DisruptedPods + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + h.decMapstringv1_Time((*map[string]pkg2_v1.Time)(yyv6), d) + } + } + case "disruptionsAllowed": + if r.TryDecodeAsNil() { + x.PodDisruptionsAllowed = 0 + } else { + yyv8 := &x.PodDisruptionsAllowed + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int32)(yyv8)) = int32(r.DecodeInt(32)) + } } case "currentHealthy": if r.TryDecodeAsNil() { x.CurrentHealthy = 0 } else { - x.CurrentHealthy = int32(r.DecodeInt(32)) + yyv10 := &x.CurrentHealthy + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*int32)(yyv10)) = int32(r.DecodeInt(32)) + } } case "desiredHealthy": if r.TryDecodeAsNil() { x.DesiredHealthy = 0 } else { - x.DesiredHealthy = int32(r.DecodeInt(32)) + yyv12 := &x.DesiredHealthy + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int32)(yyv12)) = int32(r.DecodeInt(32)) + } } case "expectedPods": if r.TryDecodeAsNil() { x.ExpectedPods = 0 } else { - x.ExpectedPods = int32(r.DecodeInt(32)) + yyv14 := &x.ExpectedPods + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*int32)(yyv14)) = int32(r.DecodeInt(32)) + } } default: - z.DecStructFieldNotFound(-1, yys39) - } // end switch yys39 - } // end for yyj39 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -550,32 +649,82 @@ func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj44 int - var yyb44 bool - var yyhl44 bool = l >= 0 - yyj44++ - if yyhl44 { - yyb44 = yyj44 > l + var yyj16 int + var yyb16 bool + var yyhl16 bool = l >= 0 + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb44 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb44 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.PodDisruptionAllowed = false + x.ObservedGeneration = 0 } else { - x.PodDisruptionAllowed = bool(r.DecodeBool()) + yyv17 := &x.ObservedGeneration + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*int64)(yyv17)) = int64(r.DecodeInt(64)) + } } - yyj44++ - if yyhl44 { - yyb44 = yyj44 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb44 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb44 { + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.DisruptedPods = nil + } else { + yyv19 := &x.DisruptedPods + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decMapstringv1_Time((*map[string]pkg2_v1.Time)(yyv19), d) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.PodDisruptionsAllowed = 0 + } else { + yyv21 := &x.PodDisruptionsAllowed + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*int32)(yyv21)) = int32(r.DecodeInt(32)) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -583,15 +732,21 @@ func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.CurrentHealthy = 0 } else { - x.CurrentHealthy = int32(r.DecodeInt(32)) + yyv23 := &x.CurrentHealthy + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + *((*int32)(yyv23)) = int32(r.DecodeInt(32)) + } } - yyj44++ - if yyhl44 { - yyb44 = yyj44 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb44 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb44 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -599,15 +754,21 @@ func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.DesiredHealthy = 0 } else { - x.DesiredHealthy = int32(r.DecodeInt(32)) + yyv25 := &x.DesiredHealthy + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*int32)(yyv25)) = int32(r.DecodeInt(32)) + } } - yyj44++ - if yyhl44 { - yyb44 = yyj44 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb44 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb44 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -615,20 +776,26 @@ func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.ExpectedPods = 0 } else { - x.ExpectedPods = int32(r.DecodeInt(32)) + yyv27 := &x.ExpectedPods + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*int32)(yyv27)) = int32(r.DecodeInt(32)) + } } for { - yyj44++ - if yyhl44 { - yyb44 = yyj44 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb44 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb44 { + if yyb16 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj44-1, "") + z.DecStructFieldNotFound(yyj16-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -640,39 +807,39 @@ func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym49 := z.EncBinary() - _ = yym49 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep50 := !z.EncBinary() - yy2arr50 := z.EncBasicHandle().StructToArray - var yyq50 [5]bool - _, _, _ = yysep50, yyq50, yy2arr50 - const yyr50 bool = false - yyq50[0] = x.Kind != "" - yyq50[1] = x.APIVersion != "" - yyq50[2] = true - yyq50[3] = true - yyq50[4] = true - var yynn50 int - if yyr50 || yy2arr50 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn50 = 0 - for _, b := range yyq50 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn50++ + yynn2++ } } - r.EncodeMapStart(yynn50) - yynn50 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr50 || yy2arr50 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq50[0] { - yym52 := z.EncBinary() - _ = yym52 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -681,23 +848,23 @@ func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq50[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym53 := z.EncBinary() - _ = yym53 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr50 || yy2arr50 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq50[1] { - yym55 := z.EncBinary() - _ = yym55 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -706,70 +873,82 @@ func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq50[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym56 := z.EncBinary() - _ = yym56 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr50 || yy2arr50 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq50[2] { - yy58 := &x.ObjectMeta - yy58.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq50[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy59 := &x.ObjectMeta - yy59.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr50 || yy2arr50 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq50[3] { - yy61 := &x.Spec - yy61.CodecEncodeSelf(e) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq50[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy62 := &x.Spec - yy62.CodecEncodeSelf(e) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) } } - if yyr50 || yy2arr50 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq50[4] { - yy64 := &x.Status - yy64.CodecEncodeSelf(e) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq50[4] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy65 := &x.Status - yy65.CodecEncodeSelf(e) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) } } - if yyr50 || yy2arr50 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -782,25 +961,25 @@ func (x *PodDisruptionBudget) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym66 := z.DecBinary() - _ = yym66 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct67 := r.ContainerType() - if yyct67 == codecSelferValueTypeMap1234 { - yyl67 := r.ReadMapStart() - if yyl67 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl67, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct67 == codecSelferValueTypeArray1234 { - yyl67 := r.ReadArrayStart() - if yyl67 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl67, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -812,12 +991,12 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys68Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys68Slc - var yyhl68 bool = l >= 0 - for yyj68 := 0; ; yyj68++ { - if yyhl68 { - if yyj68 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -826,47 +1005,65 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys68Slc = r.DecodeBytes(yys68Slc, true, true) - yys68 := string(yys68Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys68 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_api.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv71 := &x.ObjectMeta - yyv71.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodDisruptionBudgetSpec{} } else { - yyv72 := &x.Spec - yyv72.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PodDisruptionBudgetStatus{} } else { - yyv73 := &x.Status - yyv73.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys68) - } // end switch yys68 - } // end for yyj68 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -874,16 +1071,16 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj74 int - var yyb74 bool - var yyhl74 bool = l >= 0 - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb74 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb74 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -891,15 +1088,21 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb74 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb74 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -907,32 +1110,44 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb74 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb74 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_api.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv77 := &x.ObjectMeta - yyv77.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb74 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb74 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -940,16 +1155,16 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Spec = PodDisruptionBudgetSpec{} } else { - yyv78 := &x.Spec - yyv78.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb74 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb74 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -957,21 +1172,21 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Status = PodDisruptionBudgetStatus{} } else { - yyv79 := &x.Status - yyv79.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj74++ - if yyhl74 { - yyb74 = yyj74 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb74 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb74 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj74-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -983,37 +1198,37 @@ func (x *PodDisruptionBudgetList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym80 := z.EncBinary() - _ = yym80 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep81 := !z.EncBinary() - yy2arr81 := z.EncBasicHandle().StructToArray - var yyq81 [4]bool - _, _, _ = yysep81, yyq81, yy2arr81 - const yyr81 bool = false - yyq81[0] = x.Kind != "" - yyq81[1] = x.APIVersion != "" - yyq81[2] = true - var yynn81 int - if yyr81 || yy2arr81 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn81 = 1 - for _, b := range yyq81 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn81++ + yynn2++ } } - r.EncodeMapStart(yynn81) - yynn81 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr81 || yy2arr81 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq81[0] { - yym83 := z.EncBinary() - _ = yym83 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -1022,23 +1237,23 @@ func (x *PodDisruptionBudgetList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq81[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym84 := z.EncBinary() - _ = yym84 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr81 || yy2arr81 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq81[1] { - yym86 := z.EncBinary() - _ = yym86 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -1047,54 +1262,54 @@ func (x *PodDisruptionBudgetList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq81[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym87 := z.EncBinary() - _ = yym87 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr81 || yy2arr81 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq81[2] { - yy89 := &x.ListMeta - yym90 := z.EncBinary() - _ = yym90 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy89) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy89) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq81[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy91 := &x.ListMeta - yym92 := z.EncBinary() - _ = yym92 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy91) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy91) + z.EncFallback(yy12) } } } - if yyr81 || yy2arr81 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym94 := z.EncBinary() - _ = yym94 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e) @@ -1107,15 +1322,15 @@ func (x *PodDisruptionBudgetList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym95 := z.EncBinary() - _ = yym95 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e) } } } - if yyr81 || yy2arr81 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1128,25 +1343,25 @@ func (x *PodDisruptionBudgetList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym96 := z.DecBinary() - _ = yym96 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct97 := r.ContainerType() - if yyct97 == codecSelferValueTypeMap1234 { - yyl97 := r.ReadMapStart() - if yyl97 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl97, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct97 == codecSelferValueTypeArray1234 { - yyl97 := r.ReadArrayStart() - if yyl97 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl97, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -1158,12 +1373,12 @@ func (x *PodDisruptionBudgetList) codecDecodeSelfFromMap(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys98Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys98Slc - var yyhl98 bool = l >= 0 - for yyj98 := 0; ; yyj98++ { - if yyhl98 { - if yyj98 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -1172,51 +1387,63 @@ func (x *PodDisruptionBudgetList) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys98Slc = r.DecodeBytes(yys98Slc, true, true) - yys98 := string(yys98Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys98 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv101 := &x.ListMeta - yym102 := z.DecBinary() - _ = yym102 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv101) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv101, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv103 := &x.Items - yym104 := z.DecBinary() - _ = yym104 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv103), d) + h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys98) - } // end switch yys98 - } // end for yyj98 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -1224,16 +1451,16 @@ func (x *PodDisruptionBudgetList) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj105 int - var yyb105 bool - var yyhl105 bool = l >= 0 - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb105 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb105 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1241,15 +1468,21 @@ func (x *PodDisruptionBudgetList) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb105 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb105 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1257,38 +1490,44 @@ func (x *PodDisruptionBudgetList) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb105 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb105 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg2_v1.ListMeta{} } else { - yyv108 := &x.ListMeta - yym109 := z.DecBinary() - _ = yym109 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv108) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv108, false) + z.DecFallback(yyv17, false) } } - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb105 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb105 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1296,26 +1535,26 @@ func (x *PodDisruptionBudgetList) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Items = nil } else { - yyv110 := &x.Items - yym111 := z.DecBinary() - _ = yym111 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv110), d) + h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv19), d) } } for { - yyj105++ - if yyhl105 { - yyb105 = yyj105 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb105 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb105 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj105-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1327,38 +1566,38 @@ func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym112 := z.EncBinary() - _ = yym112 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep113 := !z.EncBinary() - yy2arr113 := z.EncBasicHandle().StructToArray - var yyq113 [4]bool - _, _, _ = yysep113, yyq113, yy2arr113 - const yyr113 bool = false - yyq113[0] = x.Kind != "" - yyq113[1] = x.APIVersion != "" - yyq113[2] = true - yyq113[3] = x.DeleteOptions != nil - var yynn113 int - if yyr113 || yy2arr113 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = x.DeleteOptions != nil + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn113 = 0 - for _, b := range yyq113 { + yynn2 = 0 + for _, b := range yyq2 { if b { - yynn113++ + yynn2++ } } - r.EncodeMapStart(yynn113) - yynn113 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr113 || yy2arr113 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[0] { - yym115 := z.EncBinary() - _ = yym115 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -1367,23 +1606,23 @@ func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq113[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym116 := z.EncBinary() - _ = yym116 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr113 || yy2arr113 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[1] { - yym118 := z.EncBinary() - _ = yym118 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -1392,59 +1631,83 @@ func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq113[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym119 := z.EncBinary() - _ = yym119 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr113 || yy2arr113 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[2] { - yy121 := &x.ObjectMeta - yy121.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq113[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("metadata")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy122 := &x.ObjectMeta - yy122.CodecEncodeSelf(e) - } - } - if yyr113 || yy2arr113 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq113[3] { - if x.DeleteOptions == nil { - r.EncodeNil() + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - x.DeleteOptions.CodecEncodeSelf(e) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq113[3] { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.DeleteOptions == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else if z.HasExtensions() && z.EncExt(x.DeleteOptions) { + } else { + z.EncFallback(x.DeleteOptions) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("deleteOptions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.DeleteOptions == nil { r.EncodeNil() } else { - x.DeleteOptions.CodecEncodeSelf(e) + yym16 := z.EncBinary() + _ = yym16 + if false { + } else if z.HasExtensions() && z.EncExt(x.DeleteOptions) { + } else { + z.EncFallback(x.DeleteOptions) + } } } } - if yyr113 || yy2arr113 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1457,25 +1720,25 @@ func (x *Eviction) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym124 := z.DecBinary() - _ = yym124 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct125 := r.ContainerType() - if yyct125 == codecSelferValueTypeMap1234 { - yyl125 := r.ReadMapStart() - if yyl125 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl125, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct125 == codecSelferValueTypeArray1234 { - yyl125 := r.ReadArrayStart() - if yyl125 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl125, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -1487,12 +1750,12 @@ func (x *Eviction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys126Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys126Slc - var yyhl126 bool = l >= 0 - for yyj126 := 0; ; yyj126++ { - if yyhl126 { - if yyj126 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -1501,28 +1764,46 @@ func (x *Eviction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys126Slc = r.DecodeBytes(yys126Slc, true, true) - yys126 := string(yys126Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys126 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_api.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv129 := &x.ObjectMeta - yyv129.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "deleteOptions": if r.TryDecodeAsNil() { @@ -1531,14 +1812,20 @@ func (x *Eviction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } else { if x.DeleteOptions == nil { - x.DeleteOptions = new(pkg3_api.DeleteOptions) + x.DeleteOptions = new(pkg2_v1.DeleteOptions) + } + yym11 := z.DecBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.DecExt(x.DeleteOptions) { + } else { + z.DecFallback(x.DeleteOptions, false) } - x.DeleteOptions.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys126) - } // end switch yys126 - } // end for yyj126 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -1546,16 +1833,16 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj131 int - var yyb131 bool - var yyhl131 bool = l >= 0 - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb131 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb131 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1563,15 +1850,21 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb131 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb131 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1579,32 +1872,44 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb131 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb131 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_api.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv134 := &x.ObjectMeta - yyv134.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb131 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb131 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1615,35 +1920,178 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } } else { if x.DeleteOptions == nil { - x.DeleteOptions = new(pkg3_api.DeleteOptions) + x.DeleteOptions = new(pkg2_v1.DeleteOptions) + } + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(x.DeleteOptions) { + } else { + z.DecFallback(x.DeleteOptions, false) } - x.DeleteOptions.CodecDecodeSelf(d) } for { - yyj131++ - if yyhl131 { - yyb131 = yyj131 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb131 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb131 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj131-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } +func (x codecSelfer1234) encMapstringv1_Time(v map[string]pkg2_v1.Time, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeMapStart(len(v)) + for yyk1, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + yym2 := z.EncBinary() + _ = yym2 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yyk1)) + } + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy3 := &yyv1 + yym4 := z.EncBinary() + _ = yym4 + if false { + } else if z.HasExtensions() && z.EncExt(yy3) { + } else if yym4 { + z.EncBinaryMarshal(yy3) + } else if !yym4 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3) + } else { + z.EncFallback(yy3) + } + } + z.EncSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x codecSelfer1234) decMapstringv1_Time(v *map[string]pkg2_v1.Time, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyl1 := r.ReadMapStart() + yybh1 := z.DecBasicHandle() + if yyv1 == nil { + yyrl1, _ := z.DecInferLen(yyl1, yybh1.MaxInitLen, 40) + yyv1 = make(map[string]pkg2_v1.Time, yyrl1) + *v = yyv1 + } + var yymk1 string + var yymv1 pkg2_v1.Time + var yymg1 bool + if yybh1.MapValueReset { + yymg1 = true + } + if yyl1 > 0 { + for yyj1 := 0; yyj1 < yyl1; yyj1++ { + z.DecSendContainerState(codecSelfer_containerMapKey1234) + if r.TryDecodeAsNil() { + yymk1 = "" + } else { + yyv2 := &yymk1 + yym3 := z.DecBinary() + _ = yym3 + if false { + } else { + *((*string)(yyv2)) = r.DecodeString() + } + } + + if yymg1 { + yymv1 = yyv1[yymk1] + } else { + yymv1 = pkg2_v1.Time{} + } + z.DecSendContainerState(codecSelfer_containerMapValue1234) + if r.TryDecodeAsNil() { + yymv1 = pkg2_v1.Time{} + } else { + yyv4 := &yymv1 + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else if yym5 { + z.DecBinaryUnmarshal(yyv4) + } else if !yym5 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4) + } else { + z.DecFallback(yyv4, false) + } + } + + if yyv1 != nil { + yyv1[yymk1] = yymv1 + } + } + } else if yyl1 < 0 { + for yyj1 := 0; !r.CheckBreak(); yyj1++ { + z.DecSendContainerState(codecSelfer_containerMapKey1234) + if r.TryDecodeAsNil() { + yymk1 = "" + } else { + yyv6 := &yymk1 + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + + if yymg1 { + yymv1 = yyv1[yymk1] + } else { + yymv1 = pkg2_v1.Time{} + } + z.DecSendContainerState(codecSelfer_containerMapValue1234) + if r.TryDecodeAsNil() { + yymv1 = pkg2_v1.Time{} + } else { + yyv8 := &yymv1 + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else if yym9 { + z.DecBinaryUnmarshal(yyv8) + } else if !yym9 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv8) + } else { + z.DecFallback(yyv8, false) + } + } + + if yyv1 != nil { + yyv1[yymk1] = yymv1 + } + } + } // else len==0: TODO: Should we clear map entries? + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + func (x codecSelfer1234) encSlicePodDisruptionBudget(v []PodDisruptionBudget, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv136 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy137 := &yyv136 - yy137.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1653,83 +2101,86 @@ func (x codecSelfer1234) decSlicePodDisruptionBudget(v *[]PodDisruptionBudget, d z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv138 := *v - yyh138, yyl138 := z.DecSliceHelperStart() - var yyc138 bool - if yyl138 == 0 { - if yyv138 == nil { - yyv138 = []PodDisruptionBudget{} - yyc138 = true - } else if len(yyv138) != 0 { - yyv138 = yyv138[:0] - yyc138 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []PodDisruptionBudget{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl138 > 0 { - var yyrr138, yyrl138 int - var yyrt138 bool - if yyl138 > cap(yyv138) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg138 := len(yyv138) > 0 - yyv2138 := yyv138 - yyrl138, yyrt138 = z.DecInferLen(yyl138, z.DecBasicHandle().MaxInitLen, 312) - if yyrt138 { - if yyrl138 <= cap(yyv138) { - yyv138 = yyv138[:yyrl138] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 328) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv138 = make([]PodDisruptionBudget, yyrl138) + yyv1 = make([]PodDisruptionBudget, yyrl1) } } else { - yyv138 = make([]PodDisruptionBudget, yyrl138) + yyv1 = make([]PodDisruptionBudget, yyrl1) } - yyc138 = true - yyrr138 = len(yyv138) - if yyrg138 { - copy(yyv138, yyv2138) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl138 != len(yyv138) { - yyv138 = yyv138[:yyl138] - yyc138 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj138 := 0 - for ; yyj138 < yyrr138; yyj138++ { - yyh138.ElemContainerState(yyj138) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv138[yyj138] = PodDisruptionBudget{} + yyv1[yyj1] = PodDisruptionBudget{} } else { - yyv139 := &yyv138[yyj138] - yyv139.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt138 { - for ; yyj138 < yyl138; yyj138++ { - yyv138 = append(yyv138, PodDisruptionBudget{}) - yyh138.ElemContainerState(yyj138) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, PodDisruptionBudget{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv138[yyj138] = PodDisruptionBudget{} + yyv1[yyj1] = PodDisruptionBudget{} } else { - yyv140 := &yyv138[yyj138] - yyv140.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj138 := 0 - for ; !r.CheckBreak(); yyj138++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj138 >= len(yyv138) { - yyv138 = append(yyv138, PodDisruptionBudget{}) // var yyz138 PodDisruptionBudget - yyc138 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, PodDisruptionBudget{}) // var yyz1 PodDisruptionBudget + yyc1 = true } - yyh138.ElemContainerState(yyj138) - if yyj138 < len(yyv138) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv138[yyj138] = PodDisruptionBudget{} + yyv1[yyj1] = PodDisruptionBudget{} } else { - yyv141 := &yyv138[yyj138] - yyv141.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -1737,16 +2188,16 @@ func (x codecSelfer1234) decSlicePodDisruptionBudget(v *[]PodDisruptionBudget, d } } - if yyj138 < len(yyv138) { - yyv138 = yyv138[:yyj138] - yyc138 = true - } else if yyj138 == 0 && yyv138 == nil { - yyv138 = []PodDisruptionBudget{} - yyc138 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []PodDisruptionBudget{} + yyc1 = true } } - yyh138.End() - if yyc138 { - *v = yyv138 + yyh1.End() + if yyc1 { + *v = yyv1 } } diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.go new file mode 100644 index 000000000..ca5ea3730 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.go @@ -0,0 +1,105 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" +) + +// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. +type PodDisruptionBudgetSpec struct { + // An eviction is allowed if at least "minAvailable" pods selected by + // "selector" will still be available after the eviction, i.e. even in the + // absence of the evicted pod. So for example you can prevent all voluntary + // evictions by specifying "100%". + MinAvailable intstr.IntOrString `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"` + + // Label query over pods whose evictions are managed by the disruption + // budget. + Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` +} + +// PodDisruptionBudgetStatus represents information about the status of a +// PodDisruptionBudget. Status may trail the actual state of a system. +type PodDisruptionBudgetStatus struct { + // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other + // status informatio is valid only if observedGeneration equals to PDB's object generation. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` + + // DisruptedPods contains information about pods whose eviction was + // processed by the API server eviction subresource handler but has not + // yet been observed by the PodDisruptionBudget controller. + // A pod will be in this map from the time when the API server processed the + // eviction request to the time when the pod is seen by PDB controller + // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod + // and the value is the time when the API server processed the eviction request. If + // the deletion didn't occur and a pod is still there it will be removed from + // the list automatically by PodDisruptionBudget controller after some time. + // If everything goes smooth this map should be empty for the most of the time. + // Large number of entries in the map may indicate problems with pod deletions. + DisruptedPods map[string]metav1.Time `json:"disruptedPods" protobuf:"bytes,2,rep,name=disruptedPods"` + + // Number of pod disruptions that are currently allowed. + PodDisruptionsAllowed int32 `json:"disruptionsAllowed" protobuf:"varint,3,opt,name=disruptionsAllowed"` + + // current number of healthy pods + CurrentHealthy int32 `json:"currentHealthy" protobuf:"varint,4,opt,name=currentHealthy"` + + // minimum desired number of healthy pods + DesiredHealthy int32 `json:"desiredHealthy" protobuf:"varint,5,opt,name=desiredHealthy"` + + // total number of pods counted by this disruption budget + ExpectedPods int32 `json:"expectedPods" protobuf:"varint,6,opt,name=expectedPods"` +} + +// +genclient=true + +// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods +type PodDisruptionBudget struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Specification of the desired behavior of the PodDisruptionBudget. + Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + // Most recently observed status of the PodDisruptionBudget. + Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. +type PodDisruptionBudgetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient=true +// +noMethods=true + +// Eviction evicts a pod from its node subject to certain policies and safety constraints. +// This is a subresource of Pod. A request to cause such an eviction is +// created by POSTing to .../pods//evictions. +type Eviction struct { + metav1.TypeMeta `json:",inline"` + + // ObjectMeta describes the pod that is being evicted. + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // DeleteOptions may be provided + DeleteOptions *metav1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"` +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types_swagger_doc_generated.go similarity index 61% rename from vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go rename to vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types_swagger_doc_generated.go index 7750b1007..d919856b2 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types_swagger_doc_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more @@ -57,7 +57,7 @@ func (PodDisruptionBudgetList) SwaggerDoc() map[string]string { var map_PodDisruptionBudgetSpec = map[string]string{ "": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", - "minAvailable": "The minimum number of pods that must be available simultaneously. This can be either an integer or a string specifying a percentage, e.g. \"28%\".", + "minAvailable": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", "selector": "Label query over pods whose evictions are managed by the disruption budget.", } @@ -66,11 +66,13 @@ func (PodDisruptionBudgetSpec) SwaggerDoc() map[string]string { } var map_PodDisruptionBudgetStatus = map[string]string{ - "": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", - "disruptionAllowed": "Whether or not a disruption is currently allowed.", - "currentHealthy": "current number of healthy pods", - "desiredHealthy": "minimum desired number of healthy pods", - "expectedPods": "total number of pods counted by this disruption budget", + "": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", + "observedGeneration": "Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status informatio is valid only if observedGeneration equals to PDB's object generation.", + "disruptedPods": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", + "disruptionsAllowed": "Number of pod disruptions that are currently allowed.", + "currentHealthy": "current number of healthy pods", + "desiredHealthy": "minimum desired number of healthy pods", + "expectedPods": "total number of pods counted by this disruption budget", } func (PodDisruptionBudgetStatus) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.conversion.go new file mode 100644 index 000000000..5a54f5039 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.conversion.go @@ -0,0 +1,172 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + policy "k8s.io/client-go/pkg/apis/policy" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1beta1_Eviction_To_policy_Eviction, + Convert_policy_Eviction_To_v1beta1_Eviction, + Convert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget, + Convert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget, + Convert_v1beta1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList, + Convert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList, + Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec, + Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec, + Convert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus, + Convert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus, + ) +} + +func autoConvert_v1beta1_Eviction_To_policy_Eviction(in *Eviction, out *policy.Eviction, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.DeleteOptions = (*v1.DeleteOptions)(unsafe.Pointer(in.DeleteOptions)) + return nil +} + +func Convert_v1beta1_Eviction_To_policy_Eviction(in *Eviction, out *policy.Eviction, s conversion.Scope) error { + return autoConvert_v1beta1_Eviction_To_policy_Eviction(in, out, s) +} + +func autoConvert_policy_Eviction_To_v1beta1_Eviction(in *policy.Eviction, out *Eviction, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.DeleteOptions = (*v1.DeleteOptions)(unsafe.Pointer(in.DeleteOptions)) + return nil +} + +func Convert_policy_Eviction_To_v1beta1_Eviction(in *policy.Eviction, out *Eviction, s conversion.Scope) error { + return autoConvert_policy_Eviction_To_v1beta1_Eviction(in, out, s) +} + +func autoConvert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error { + return autoConvert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in, out, s) +} + +func autoConvert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error { + return autoConvert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget(in, out, s) +} + +func autoConvert_v1beta1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in *PodDisruptionBudgetList, out *policy.PodDisruptionBudgetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]policy.PodDisruptionBudget)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in *PodDisruptionBudgetList, out *policy.PodDisruptionBudgetList, s conversion.Scope) error { + return autoConvert_v1beta1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in, out, s) +} + +func autoConvert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList(in *policy.PodDisruptionBudgetList, out *PodDisruptionBudgetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]PodDisruptionBudget, 0) + } else { + out.Items = *(*[]PodDisruptionBudget)(unsafe.Pointer(&in.Items)) + } + return nil +} + +func Convert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList(in *policy.PodDisruptionBudgetList, out *PodDisruptionBudgetList, s conversion.Scope) error { + return autoConvert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList(in, out, s) +} + +func autoConvert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in *PodDisruptionBudgetSpec, out *policy.PodDisruptionBudgetSpec, s conversion.Scope) error { + out.MinAvailable = in.MinAvailable + out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector)) + return nil +} + +func Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in *PodDisruptionBudgetSpec, out *policy.PodDisruptionBudgetSpec, s conversion.Scope) error { + return autoConvert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in, out, s) +} + +func autoConvert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(in *policy.PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, s conversion.Scope) error { + out.MinAvailable = in.MinAvailable + out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector)) + return nil +} + +func Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(in *policy.PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, s conversion.Scope) error { + return autoConvert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(in, out, s) +} + +func autoConvert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error { + out.ObservedGeneration = in.ObservedGeneration + out.DisruptedPods = *(*map[string]v1.Time)(unsafe.Pointer(&in.DisruptedPods)) + out.PodDisruptionsAllowed = in.PodDisruptionsAllowed + out.CurrentHealthy = in.CurrentHealthy + out.DesiredHealthy = in.DesiredHealthy + out.ExpectedPods = in.ExpectedPods + return nil +} + +func Convert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error { + return autoConvert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in, out, s) +} + +func autoConvert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error { + out.ObservedGeneration = in.ObservedGeneration + out.DisruptedPods = *(*map[string]v1.Time)(unsafe.Pointer(&in.DisruptedPods)) + out.PodDisruptionsAllowed = in.PodDisruptionsAllowed + out.CurrentHealthy = in.CurrentHealthy + out.DesiredHealthy = in.DesiredHealthy + out.ExpectedPods = in.ExpectedPods + return nil +} + +func Convert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error { + return autoConvert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(in, out, s) +} diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000..395e6689e --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,137 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Eviction, InType: reflect.TypeOf(&Eviction{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodDisruptionBudget, InType: reflect.TypeOf(&PodDisruptionBudget{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodDisruptionBudgetList, InType: reflect.TypeOf(&PodDisruptionBudgetList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodDisruptionBudgetSpec, InType: reflect.TypeOf(&PodDisruptionBudgetSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodDisruptionBudgetStatus, InType: reflect.TypeOf(&PodDisruptionBudgetStatus{})}, + ) +} + +func DeepCopy_v1beta1_Eviction(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Eviction) + out := out.(*Eviction) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if in.DeleteOptions != nil { + in, out := &in.DeleteOptions, &out.DeleteOptions + if newVal, err := c.DeepCopy(*in); err != nil { + return err + } else { + *out = newVal.(*v1.DeleteOptions) + } + } + return nil + } +} + +func DeepCopy_v1beta1_PodDisruptionBudget(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodDisruptionBudget) + out := out.(*PodDisruptionBudget) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_v1beta1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + if err := DeepCopy_v1beta1_PodDisruptionBudgetStatus(&in.Status, &out.Status, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1beta1_PodDisruptionBudgetList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodDisruptionBudgetList) + out := out.(*PodDisruptionBudgetList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PodDisruptionBudget, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_PodDisruptionBudget(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_PodDisruptionBudgetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodDisruptionBudgetSpec) + out := out.(*PodDisruptionBudgetSpec) + *out = *in + if in.Selector != nil { + in, out := &in.Selector, &out.Selector + if newVal, err := c.DeepCopy(*in); err != nil { + return err + } else { + *out = newVal.(*v1.LabelSelector) + } + } + return nil + } +} + +func DeepCopy_v1beta1_PodDisruptionBudgetStatus(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodDisruptionBudgetStatus) + out := out.(*PodDisruptionBudgetStatus) + *out = *in + if in.DisruptedPods != nil { + in, out := &in.DisruptedPods, &out.DisruptedPods + *out = make(map[string]v1.Time) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + return nil + } +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/policy/zz_generated.deepcopy.go similarity index 74% rename from vendor/k8s.io/client-go/1.5/pkg/apis/policy/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/apis/policy/zz_generated.deepcopy.go index 9153d5e74..298ec5fda 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/apis/policy/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,10 +21,9 @@ limitations under the License. package policy import ( - api "k8s.io/client-go/1.5/pkg/api" - unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" reflect "reflect" ) @@ -48,18 +47,19 @@ func DeepCopy_policy_Eviction(in interface{}, out interface{}, c *conversion.Clo { in := in.(*Eviction) out := out.(*Eviction) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.DeleteOptions != nil { in, out := &in.DeleteOptions, &out.DeleteOptions - *out = new(api.DeleteOptions) - if err := api.DeepCopy_api_DeleteOptions(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.DeleteOptions) } - } else { - out.DeleteOptions = nil } return nil } @@ -69,14 +69,18 @@ func DeepCopy_policy_PodDisruptionBudget(in interface{}, out interface{}, c *con { in := in.(*PodDisruptionBudget) out := out.(*PodDisruptionBudget) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, c); err != nil { return err } - out.Status = in.Status + if err := DeepCopy_policy_PodDisruptionBudgetStatus(&in.Status, &out.Status, c); err != nil { + return err + } return nil } } @@ -85,8 +89,7 @@ func DeepCopy_policy_PodDisruptionBudgetList(in interface{}, out interface{}, c { in := in.(*PodDisruptionBudgetList) out := out.(*PodDisruptionBudgetList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PodDisruptionBudget, len(*in)) @@ -95,8 +98,6 @@ func DeepCopy_policy_PodDisruptionBudgetList(in interface{}, out interface{}, c return err } } - } else { - out.Items = nil } return nil } @@ -106,15 +107,14 @@ func DeepCopy_policy_PodDisruptionBudgetSpec(in interface{}, out interface{}, c { in := in.(*PodDisruptionBudgetSpec) out := out.(*PodDisruptionBudgetSpec) - out.MinAvailable = in.MinAvailable + *out = *in 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 { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.LabelSelector) } - } else { - out.Selector = nil } return nil } @@ -124,10 +124,14 @@ func DeepCopy_policy_PodDisruptionBudgetStatus(in interface{}, out interface{}, { in := in.(*PodDisruptionBudgetStatus) out := out.(*PodDisruptionBudgetStatus) - out.PodDisruptionAllowed = in.PodDisruptionAllowed - out.CurrentHealthy = in.CurrentHealthy - out.DesiredHealthy = in.DesiredHealthy - out.ExpectedPods = in.ExpectedPods + *out = *in + if in.DisruptedPods != nil { + in, out := &in.DisruptedPods, &out.DisruptedPods + *out = make(map[string]v1.Time) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } return nil } } diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/OWNERS b/vendor/k8s.io/client-go/pkg/apis/rbac/OWNERS new file mode 100755 index 000000000..a35477b92 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/OWNERS @@ -0,0 +1,17 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- deads2k +- sttts +- ncdc +- timothysc +- dims +- krousey +- mml +- mbohlool +- david-mcmahon +- ericchiang +- lixiaobing10051267 +- jianhuiz +- liggitt diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/doc.go b/vendor/k8s.io/client-go/pkg/apis/rbac/doc.go new file mode 100644 index 000000000..c5f057484 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +groupName=rbac.authorization.k8s.io +package rbac diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/helpers.go b/vendor/k8s.io/client-go/pkg/apis/rbac/helpers.go new file mode 100644 index 000000000..a2ec9e8a5 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/helpers.go @@ -0,0 +1,340 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rbac + +import ( + "fmt" + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/sets" +) + +func RoleRefGroupKind(roleRef RoleRef) schema.GroupKind { + return schema.GroupKind{Group: roleRef.APIGroup, Kind: roleRef.Kind} +} + +func VerbMatches(rule PolicyRule, requestedVerb string) bool { + for _, ruleVerb := range rule.Verbs { + if ruleVerb == VerbAll { + return true + } + if ruleVerb == requestedVerb { + return true + } + } + + return false +} + +func APIGroupMatches(rule PolicyRule, requestedGroup string) bool { + for _, ruleGroup := range rule.APIGroups { + if ruleGroup == APIGroupAll { + return true + } + if ruleGroup == requestedGroup { + return true + } + } + + return false +} + +func ResourceMatches(rule PolicyRule, requestedResource string) bool { + for _, ruleResource := range rule.Resources { + if ruleResource == ResourceAll { + return true + } + if ruleResource == requestedResource { + return true + } + } + + return false +} + +func ResourceNameMatches(rule PolicyRule, requestedName string) bool { + if len(rule.ResourceNames) == 0 { + return true + } + + for _, ruleName := range rule.ResourceNames { + if ruleName == requestedName { + return true + } + } + + return false +} + +func NonResourceURLMatches(rule PolicyRule, requestedURL string) bool { + for _, ruleURL := range rule.NonResourceURLs { + if ruleURL == NonResourceAll { + return true + } + if ruleURL == requestedURL { + return true + } + if strings.HasSuffix(ruleURL, "*") && strings.HasPrefix(requestedURL, strings.TrimRight(ruleURL, "*")) { + return true + } + } + + return false +} + +// subjectsStrings returns users, groups, serviceaccounts, unknown for display purposes. +func SubjectsStrings(subjects []Subject) ([]string, []string, []string, []string) { + users := []string{} + groups := []string{} + sas := []string{} + others := []string{} + + for _, subject := range subjects { + switch subject.Kind { + case ServiceAccountKind: + sas = append(sas, fmt.Sprintf("%s/%s", subject.Namespace, subject.Name)) + + case UserKind: + users = append(users, subject.Name) + + case GroupKind: + groups = append(groups, subject.Name) + + default: + others = append(others, fmt.Sprintf("%s/%s/%s", subject.Kind, subject.Namespace, subject.Name)) + } + } + + return users, groups, sas, others +} + +// PolicyRuleBuilder let's us attach methods. A no-no for API types. +// We use it to construct rules in code. It's more compact than trying to write them +// out in a literal and allows us to perform some basic checking during construction +type PolicyRuleBuilder struct { + PolicyRule PolicyRule +} + +func NewRule(verbs ...string) *PolicyRuleBuilder { + return &PolicyRuleBuilder{ + PolicyRule: PolicyRule{Verbs: sets.NewString(verbs...).List()}, + } +} + +func (r *PolicyRuleBuilder) Groups(groups ...string) *PolicyRuleBuilder { + r.PolicyRule.APIGroups = combine(r.PolicyRule.APIGroups, groups) + return r +} + +func (r *PolicyRuleBuilder) Resources(resources ...string) *PolicyRuleBuilder { + r.PolicyRule.Resources = combine(r.PolicyRule.Resources, resources) + return r +} + +func (r *PolicyRuleBuilder) Names(names ...string) *PolicyRuleBuilder { + r.PolicyRule.ResourceNames = combine(r.PolicyRule.ResourceNames, names) + return r +} + +func (r *PolicyRuleBuilder) URLs(urls ...string) *PolicyRuleBuilder { + r.PolicyRule.NonResourceURLs = combine(r.PolicyRule.NonResourceURLs, urls) + return r +} + +func (r *PolicyRuleBuilder) RuleOrDie() PolicyRule { + ret, err := r.Rule() + if err != nil { + panic(err) + } + return ret +} + +func combine(s1, s2 []string) []string { + s := sets.NewString(s1...) + s.Insert(s2...) + return s.List() +} + +func (r *PolicyRuleBuilder) Rule() (PolicyRule, error) { + if len(r.PolicyRule.Verbs) == 0 { + return PolicyRule{}, fmt.Errorf("verbs are required: %#v", r.PolicyRule) + } + + switch { + case len(r.PolicyRule.NonResourceURLs) > 0: + if len(r.PolicyRule.APIGroups) != 0 || len(r.PolicyRule.Resources) != 0 || len(r.PolicyRule.ResourceNames) != 0 { + return PolicyRule{}, fmt.Errorf("non-resource rule may not have apiGroups, resources, or resourceNames: %#v", r.PolicyRule) + } + case len(r.PolicyRule.Resources) > 0: + if len(r.PolicyRule.NonResourceURLs) != 0 { + return PolicyRule{}, fmt.Errorf("resource rule may not have nonResourceURLs: %#v", r.PolicyRule) + } + if len(r.PolicyRule.APIGroups) == 0 { + // this a common bug + return PolicyRule{}, fmt.Errorf("resource rule must have apiGroups: %#v", r.PolicyRule) + } + default: + return PolicyRule{}, fmt.Errorf("a rule must have either nonResourceURLs or resources: %#v", r.PolicyRule) + } + + return r.PolicyRule, nil +} + +// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types. +// We use it to construct bindings in code. It's more compact than trying to write them +// out in a literal. +type ClusterRoleBindingBuilder struct { + ClusterRoleBinding ClusterRoleBinding +} + +func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder { + return &ClusterRoleBindingBuilder{ + ClusterRoleBinding: ClusterRoleBinding{ + ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName}, + RoleRef: RoleRef{ + APIGroup: GroupName, + Kind: "ClusterRole", + Name: clusterRoleName, + }, + }, + } +} + +func (r *ClusterRoleBindingBuilder) Groups(groups ...string) *ClusterRoleBindingBuilder { + for _, group := range groups { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: GroupKind, APIGroup: GroupName, Name: group}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder { + for _, user := range users { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: UserKind, APIGroup: GroupName, Name: user}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *ClusterRoleBindingBuilder { + for _, saName := range serviceAccountNames { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: ServiceAccountKind, Namespace: namespace, Name: saName}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) BindingOrDie() ClusterRoleBinding { + ret, err := r.Binding() + if err != nil { + panic(err) + } + return ret +} + +func (r *ClusterRoleBindingBuilder) Binding() (ClusterRoleBinding, error) { + if len(r.ClusterRoleBinding.Subjects) == 0 { + return ClusterRoleBinding{}, fmt.Errorf("subjects are required: %#v", r.ClusterRoleBinding) + } + + return r.ClusterRoleBinding, nil +} + +// RoleBindingBuilder let's us attach methods. It is similar to +// ClusterRoleBindingBuilder above. +type RoleBindingBuilder struct { + RoleBinding RoleBinding +} + +// NewRoleBinding creates a RoleBinding builder that can be used +// to define the subjects of a role binding. At least one of +// the `Groups`, `Users` or `SAs` method must be called before +// calling the `Binding*` methods. +func NewRoleBinding(roleName, namespace string) *RoleBindingBuilder { + return &RoleBindingBuilder{ + RoleBinding: RoleBinding{ + ObjectMeta: metav1.ObjectMeta{ + Name: roleName, + Namespace: namespace, + }, + RoleRef: RoleRef{ + APIGroup: GroupName, + Kind: "Role", + Name: roleName, + }, + }, + } +} + +func NewRoleBindingForClusterRole(roleName, namespace string) *RoleBindingBuilder { + return &RoleBindingBuilder{ + RoleBinding: RoleBinding{ + ObjectMeta: metav1.ObjectMeta{ + Name: roleName, + Namespace: namespace, + }, + RoleRef: RoleRef{ + APIGroup: GroupName, + Kind: "ClusterRole", + Name: roleName, + }, + }, + } +} + +// Groups adds the specified groups as the subjects of the RoleBinding. +func (r *RoleBindingBuilder) Groups(groups ...string) *RoleBindingBuilder { + for _, group := range groups { + r.RoleBinding.Subjects = append(r.RoleBinding.Subjects, Subject{Kind: GroupKind, Name: group}) + } + return r +} + +// Users adds the specified users as the subjects of the RoleBinding. +func (r *RoleBindingBuilder) Users(users ...string) *RoleBindingBuilder { + for _, user := range users { + r.RoleBinding.Subjects = append(r.RoleBinding.Subjects, Subject{Kind: UserKind, Name: user}) + } + return r +} + +// SAs adds the specified service accounts as the subjects of the +// RoleBinding. +func (r *RoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *RoleBindingBuilder { + for _, saName := range serviceAccountNames { + r.RoleBinding.Subjects = append(r.RoleBinding.Subjects, Subject{Kind: ServiceAccountKind, Namespace: namespace, Name: saName}) + } + return r +} + +// BindingOrDie calls the binding method and panics if there is an error. +func (r *RoleBindingBuilder) BindingOrDie() RoleBinding { + ret, err := r.Binding() + if err != nil { + panic(err) + } + return ret +} + +// Binding builds and returns the RoleBinding API object from the builder +// object. +func (r *RoleBindingBuilder) Binding() (RoleBinding, error) { + if len(r.RoleBinding.Subjects) == 0 { + return RoleBinding{}, fmt.Errorf("subjects are required: %#v", r.RoleBinding) + } + + return r.RoleBinding, nil +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/install/install.go b/vendor/k8s.io/client-go/pkg/apis/rbac/install/install.go similarity index 55% rename from vendor/k8s.io/client-go/1.5/pkg/apis/rbac/install/install.go rename to vendor/k8s.io/client-go/pkg/apis/rbac/install/install.go index d02f33943..f92c11e06 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/install/install.go +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/install/install.go @@ -19,25 +19,35 @@ limitations under the License. package install import ( - "k8s.io/client-go/1.5/pkg/apimachinery/announced" - "k8s.io/client-go/1.5/pkg/apis/rbac" - "k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/apis/rbac" + "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + "k8s.io/client-go/pkg/apis/rbac/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: rbac.GroupName, - VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version}, - ImportPrefix: "k8s.io/client-go/1.5/pkg/apis/rbac", + VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version, v1alpha1.SchemeGroupVersion.Version}, + ImportPrefix: "k8s.io/client-go/pkg/apis/rbac", RootScopedKinds: sets.NewString("ClusterRole", "ClusterRoleBinding"), AddInternalObjectsToScheme: rbac.AddToScheme, }, announced.VersionToSchemeFunc{ + v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/register.go b/vendor/k8s.io/client-go/pkg/apis/rbac/register.go similarity index 74% rename from vendor/k8s.io/client-go/1.5/pkg/apis/rbac/register.go rename to vendor/k8s.io/client-go/pkg/apis/rbac/register.go index 4ac400d94..f4a838bd8 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/register.go @@ -17,24 +17,22 @@ limitations under the License. package rbac import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/watch/versioned" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) const GroupName = "rbac.authorization.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} // Kind takes an unqualified kind and returns a Group qualified GroupKind -func Kind(kind string) unversioned.GroupKind { +func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) unversioned.GroupResource { +func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } @@ -55,11 +53,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ClusterRoleBinding{}, &ClusterRoleBindingList{}, &ClusterRoleList{}, - - &api.ListOptions{}, - &api.DeleteOptions{}, - &api.ExportOptions{}, ) - versioned.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/types.go b/vendor/k8s.io/client-go/pkg/apis/rbac/types.go similarity index 85% rename from vendor/k8s.io/client-go/1.5/pkg/apis/rbac/types.go rename to vendor/k8s.io/client-go/pkg/apis/rbac/types.go index c2af95acc..ddc2456a0 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/types.go +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/types.go @@ -17,9 +17,7 @@ limitations under the License. package rbac import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // Authorization is calculated against @@ -37,7 +35,8 @@ const ( ServiceAccountKind = "ServiceAccount" UserKind = "User" - UserAll = "*" + // AutoUpdateAnnotationKey is the name of an annotation which prevents reconciliation if set to "false" + AutoUpdateAnnotationKey = "rbac.authorization.kubernetes.io/autoupdate" ) // PolicyRule holds information that describes a policy rule, but does not contain information @@ -45,12 +44,9 @@ const ( type PolicyRule struct { // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. Verbs []string - // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. - // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error. - AttributeRestrictions runtime.Object + // APIGroups is the name of the APIGroup that contains the resources. // If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. - APIGroups []string // Resources is a list of resources this rule applies to. ResourceAll represents all resources. Resources []string @@ -70,9 +66,10 @@ type Subject struct { // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". // If the Authorizer does not recognized the kind value, the Authorizer should report an error. Kind string - // APIVersion holds the API group and version of the referenced object. For non-object references such as "Group" and "User" this is - // expected to be API version of this API group. For example, "rbac/v1alpha1". - APIVersion string + // APIGroup holds the API group of the referenced subject. + // Defaults to "" for ServiceAccount subjects. + // Defaults to "rbac.authorization.k8s.io" for User and Group subjects. + APIGroup string // Name of the object being referenced. Name string // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty @@ -94,9 +91,9 @@ type RoleRef struct { // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. type Role struct { - unversioned.TypeMeta + metav1.TypeMeta // Standard object's metadata. - api.ObjectMeta + metav1.ObjectMeta // Rules holds all the PolicyRules for this Role Rules []PolicyRule @@ -108,8 +105,8 @@ type Role struct { // It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given // namespace only have effect in that namespace. type RoleBinding struct { - unversioned.TypeMeta - api.ObjectMeta + metav1.TypeMeta + metav1.ObjectMeta // Subjects holds references to the objects the role applies to. Subjects []Subject @@ -121,9 +118,9 @@ type RoleBinding struct { // RoleBindingList is a collection of RoleBindings type RoleBindingList struct { - unversioned.TypeMeta + metav1.TypeMeta // Standard object's metadata. - unversioned.ListMeta + metav1.ListMeta // Items is a list of roleBindings Items []RoleBinding @@ -131,9 +128,9 @@ type RoleBindingList struct { // RoleList is a collection of Roles type RoleList struct { - unversioned.TypeMeta + metav1.TypeMeta // Standard object's metadata. - unversioned.ListMeta + metav1.ListMeta // Items is a list of roles Items []Role @@ -144,9 +141,9 @@ type RoleList struct { // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. type ClusterRole struct { - unversioned.TypeMeta + metav1.TypeMeta // Standard object's metadata. - api.ObjectMeta + metav1.ObjectMeta // Rules holds all the PolicyRules for this ClusterRole Rules []PolicyRule @@ -158,9 +155,9 @@ type ClusterRole struct { // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, // and adds who information via Subject. type ClusterRoleBinding struct { - unversioned.TypeMeta + metav1.TypeMeta // Standard object's metadata. - api.ObjectMeta + metav1.ObjectMeta // Subjects holds references to the objects the role applies to. Subjects []Subject @@ -172,9 +169,9 @@ type ClusterRoleBinding struct { // ClusterRoleBindingList is a collection of ClusterRoleBindings type ClusterRoleBindingList struct { - unversioned.TypeMeta + metav1.TypeMeta // Standard object's metadata. - unversioned.ListMeta + metav1.ListMeta // Items is a list of ClusterRoleBindings Items []ClusterRoleBinding @@ -182,9 +179,9 @@ type ClusterRoleBindingList struct { // ClusterRoleList is a collection of ClusterRoles type ClusterRoleList struct { - unversioned.TypeMeta + metav1.TypeMeta // Standard object's metadata. - unversioned.ListMeta + metav1.ListMeta // Items is a list of ClusterRoles Items []ClusterRole diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/conversion.go new file mode 100644 index 000000000..22b3c4076 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/conversion.go @@ -0,0 +1,81 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime/schema" + api "k8s.io/client-go/pkg/apis/rbac" +) + +// allAuthenticated matches k8s.io/apiserver/pkg/authentication/user.AllAuthenticated, +// but we don't want an client library (which must include types), depending on a server library +const allAuthenticated = "system:authenticated" + +func Convert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *api.Subject, s conversion.Scope) error { + if err := autoConvert_v1alpha1_Subject_To_rbac_Subject(in, out, s); err != nil { + return err + } + + // specifically set the APIGroup for the three subjects recognized in v1alpha1 + switch { + case in.Kind == ServiceAccountKind: + out.APIGroup = "" + case in.Kind == UserKind: + out.APIGroup = GroupName + case in.Kind == GroupKind: + out.APIGroup = GroupName + default: + // For unrecognized kinds, use the group portion of the APIVersion if we can get it + if gv, err := schema.ParseGroupVersion(in.APIVersion); err == nil { + out.APIGroup = gv.Group + } + } + + // User * in v1alpha1 will only match all authenticated users + // This is only for compatibility with old RBAC bindings + // Special treatment for * should not be included in v1beta1 + if out.Kind == UserKind && out.APIGroup == GroupName && out.Name == "*" { + out.Kind = GroupKind + out.Name = allAuthenticated + } + + return nil +} + +func Convert_rbac_Subject_To_v1alpha1_Subject(in *api.Subject, out *Subject, s conversion.Scope) error { + if err := autoConvert_rbac_Subject_To_v1alpha1_Subject(in, out, s); err != nil { + return err + } + + switch { + case in.Kind == ServiceAccountKind && in.APIGroup == "": + // Make service accounts v1 + out.APIVersion = "v1" + case in.Kind == UserKind && in.APIGroup == GroupName: + // users in the rbac API group get v1alpha + out.APIVersion = SchemeGroupVersion.String() + case in.Kind == GroupKind && in.APIGroup == GroupName: + // groups in the rbac API group get v1alpha + out.APIVersion = SchemeGroupVersion.String() + default: + // otherwise, they get an unspecified version of a group + out.APIVersion = schema.GroupVersion{Group: in.APIGroup}.String() + } + + return nil +} diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/defaults.go new file mode 100644 index 000000000..49e934916 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/defaults.go @@ -0,0 +1,53 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + RegisterDefaults(scheme) + return scheme.AddDefaultingFuncs( + SetDefaults_ClusterRoleBinding, + SetDefaults_RoleBinding, + SetDefaults_Subject, + ) +} + +func SetDefaults_ClusterRoleBinding(obj *ClusterRoleBinding) { + if len(obj.RoleRef.APIGroup) == 0 { + obj.RoleRef.APIGroup = GroupName + } +} +func SetDefaults_RoleBinding(obj *RoleBinding) { + if len(obj.RoleRef.APIGroup) == 0 { + obj.RoleRef.APIGroup = GroupName + } +} +func SetDefaults_Subject(obj *Subject) { + if len(obj.APIVersion) == 0 { + switch obj.Kind { + case ServiceAccountKind: + obj.APIVersion = "v1" + case UserKind: + obj.APIVersion = SchemeGroupVersion.String() + case GroupKind: + obj.APIVersion = SchemeGroupVersion.String() + } + } +} diff --git a/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/doc.go similarity index 93% rename from vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/generated_expansion.go rename to vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/doc.go index 439a241b0..f43f7bc08 100644 --- a/vendor/k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1/generated_expansion.go +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/doc.go @@ -14,6 +14,5 @@ See the License for the specific language governing permissions and limitations under the License. */ +// +groupName=rbac.authorization.k8s.io package v1alpha1 - -type PetSetExpansion interface{} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.pb.go similarity index 81% rename from vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/generated.pb.go rename to vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.pb.go index fc09bd66f..406c12c17 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -27,9 +27,11 @@ limitations under the License. It has these top-level messages: ClusterRole ClusterRoleBinding + ClusterRoleBindingBuilder ClusterRoleBindingList ClusterRoleList PolicyRule + PolicyRuleBuilder Role RoleBinding RoleBindingList @@ -65,54 +67,66 @@ func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBindin func (*ClusterRoleBinding) ProtoMessage() {} func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } +func (m *ClusterRoleBindingBuilder) Reset() { *m = ClusterRoleBindingBuilder{} } +func (*ClusterRoleBindingBuilder) ProtoMessage() {} +func (*ClusterRoleBindingBuilder) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{2} +} + func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } func (*ClusterRoleBindingList) ProtoMessage() {} -func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } +func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } func (*ClusterRoleList) ProtoMessage() {} -func (*ClusterRoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } +func (*ClusterRoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } func (m *PolicyRule) Reset() { *m = PolicyRule{} } func (*PolicyRule) ProtoMessage() {} -func (*PolicyRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } +func (*PolicyRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + +func (m *PolicyRuleBuilder) Reset() { *m = PolicyRuleBuilder{} } +func (*PolicyRuleBuilder) ProtoMessage() {} +func (*PolicyRuleBuilder) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } func (m *Role) Reset() { *m = Role{} } func (*Role) ProtoMessage() {} -func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } +func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } func (m *RoleBinding) Reset() { *m = RoleBinding{} } func (*RoleBinding) ProtoMessage() {} -func (*RoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } +func (*RoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } func (*RoleBindingList) ProtoMessage() {} -func (*RoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (*RoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } func (m *RoleList) Reset() { *m = RoleList{} } func (*RoleList) ProtoMessage() {} -func (*RoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } +func (*RoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } func (m *RoleRef) Reset() { *m = RoleRef{} } func (*RoleRef) ProtoMessage() {} -func (*RoleRef) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } +func (*RoleRef) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} -func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } +func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } func init() { - proto.RegisterType((*ClusterRole)(nil), "k8s.io.client-go.1.5.pkg.apis.rbac.v1alpha1.ClusterRole") - proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.client-go.1.5.pkg.apis.rbac.v1alpha1.ClusterRoleBinding") - proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.client-go.1.5.pkg.apis.rbac.v1alpha1.ClusterRoleBindingList") - proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.client-go.1.5.pkg.apis.rbac.v1alpha1.ClusterRoleList") - proto.RegisterType((*PolicyRule)(nil), "k8s.io.client-go.1.5.pkg.apis.rbac.v1alpha1.PolicyRule") - proto.RegisterType((*Role)(nil), "k8s.io.client-go.1.5.pkg.apis.rbac.v1alpha1.Role") - proto.RegisterType((*RoleBinding)(nil), "k8s.io.client-go.1.5.pkg.apis.rbac.v1alpha1.RoleBinding") - proto.RegisterType((*RoleBindingList)(nil), "k8s.io.client-go.1.5.pkg.apis.rbac.v1alpha1.RoleBindingList") - proto.RegisterType((*RoleList)(nil), "k8s.io.client-go.1.5.pkg.apis.rbac.v1alpha1.RoleList") - proto.RegisterType((*RoleRef)(nil), "k8s.io.client-go.1.5.pkg.apis.rbac.v1alpha1.RoleRef") - proto.RegisterType((*Subject)(nil), "k8s.io.client-go.1.5.pkg.apis.rbac.v1alpha1.Subject") + proto.RegisterType((*ClusterRole)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.ClusterRole") + proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.ClusterRoleBinding") + proto.RegisterType((*ClusterRoleBindingBuilder)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.ClusterRoleBindingBuilder") + proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.ClusterRoleBindingList") + proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.ClusterRoleList") + proto.RegisterType((*PolicyRule)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.PolicyRule") + proto.RegisterType((*PolicyRuleBuilder)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.PolicyRuleBuilder") + proto.RegisterType((*Role)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.Role") + proto.RegisterType((*RoleBinding)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.RoleBinding") + proto.RegisterType((*RoleBindingList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.RoleBindingList") + proto.RegisterType((*RoleList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.RoleList") + proto.RegisterType((*RoleRef)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.RoleRef") + proto.RegisterType((*Subject)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.Subject") } func (m *ClusterRole) Marshal() (data []byte, err error) { size := m.Size() @@ -198,6 +212,32 @@ func (m *ClusterRoleBinding) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *ClusterRoleBindingBuilder) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRoleBindingBuilder) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ClusterRoleBinding.Size())) + n4, err := m.ClusterRoleBinding.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + return i, nil +} + func (m *ClusterRoleBindingList) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -216,11 +256,11 @@ func (m *ClusterRoleBindingList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n4, err := m.ListMeta.MarshalTo(data[i:]) + n5, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n4 + i += n5 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -254,11 +294,11 @@ func (m *ClusterRoleList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n5, err := m.ListMeta.MarshalTo(data[i:]) + n6, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n5 + i += n6 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -304,14 +344,6 @@ func (m *PolicyRule) MarshalTo(data []byte) (int, error) { i += copy(data[i:], s) } } - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.AttributeRestrictions.Size())) - n6, err := m.AttributeRestrictions.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n6 if len(m.APIGroups) > 0 { for _, s := range m.APIGroups { data[i] = 0x1a @@ -375,6 +407,32 @@ func (m *PolicyRule) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *PolicyRuleBuilder) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PolicyRuleBuilder) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.PolicyRule.Size())) + n7, err := m.PolicyRule.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + return i, nil +} + func (m *Role) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -393,11 +451,11 @@ func (m *Role) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n7, err := m.ObjectMeta.MarshalTo(data[i:]) + n8, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n7 + i += n8 if len(m.Rules) > 0 { for _, msg := range m.Rules { data[i] = 0x12 @@ -431,11 +489,11 @@ func (m *RoleBinding) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n8, err := m.ObjectMeta.MarshalTo(data[i:]) + n9, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n8 + i += n9 if len(m.Subjects) > 0 { for _, msg := range m.Subjects { data[i] = 0x12 @@ -451,11 +509,11 @@ func (m *RoleBinding) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.RoleRef.Size())) - n9, err := m.RoleRef.MarshalTo(data[i:]) + n10, err := m.RoleRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n9 + i += n10 return i, nil } @@ -477,11 +535,11 @@ func (m *RoleBindingList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n10, err := m.ListMeta.MarshalTo(data[i:]) + n11, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n10 + i += n11 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -515,11 +573,11 @@ func (m *RoleList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n11, err := m.ListMeta.MarshalTo(data[i:]) + n12, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n11 + i += n12 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -656,6 +714,14 @@ func (m *ClusterRoleBinding) Size() (n int) { return n } +func (m *ClusterRoleBindingBuilder) Size() (n int) { + var l int + _ = l + l = m.ClusterRoleBinding.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *ClusterRoleBindingList) Size() (n int) { var l int _ = l @@ -693,8 +759,6 @@ func (m *PolicyRule) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } - l = m.AttributeRestrictions.Size() - n += 1 + l + sovGenerated(uint64(l)) if len(m.APIGroups) > 0 { for _, s := range m.APIGroups { l = len(s) @@ -722,6 +786,14 @@ func (m *PolicyRule) Size() (n int) { return n } +func (m *PolicyRuleBuilder) Size() (n int) { + var l int + _ = l + l = m.PolicyRule.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *Role) Size() (n int) { var l int _ = l @@ -824,7 +896,7 @@ func (this *ClusterRole) String() string { return "nil" } s := strings.Join([]string{`&ClusterRole{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -835,19 +907,29 @@ func (this *ClusterRoleBinding) String() string { return "nil" } s := strings.Join([]string{`&ClusterRoleBinding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`, `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } +func (this *ClusterRoleBindingBuilder) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRoleBindingBuilder{`, + `ClusterRoleBinding:` + strings.Replace(strings.Replace(this.ClusterRoleBinding.String(), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} func (this *ClusterRoleBindingList) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ClusterRoleBindingList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -858,7 +940,7 @@ func (this *ClusterRoleList) String() string { return "nil" } s := strings.Join([]string{`&ClusterRoleList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRole", "ClusterRole", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -870,7 +952,6 @@ func (this *PolicyRule) String() string { } s := strings.Join([]string{`&PolicyRule{`, `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, - `AttributeRestrictions:` + strings.Replace(strings.Replace(this.AttributeRestrictions.String(), "RawExtension", "k8s_io_kubernetes_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`, `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`, `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`, `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, @@ -879,12 +960,22 @@ func (this *PolicyRule) String() string { }, "") return s } +func (this *PolicyRuleBuilder) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PolicyRuleBuilder{`, + `PolicyRule:` + strings.Replace(strings.Replace(this.PolicyRule.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} func (this *Role) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Role{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -895,7 +986,7 @@ func (this *RoleBinding) String() string { return "nil" } s := strings.Join([]string{`&RoleBinding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`, `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`, `}`, @@ -907,7 +998,7 @@ func (this *RoleBindingList) String() string { return "nil" } s := strings.Join([]string{`&RoleBindingList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RoleBinding", "RoleBinding", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -918,7 +1009,7 @@ func (this *RoleList) String() string { return "nil" } s := strings.Join([]string{`&RoleList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Role", "Role", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -1209,6 +1300,86 @@ func (m *ClusterRoleBinding) Unmarshal(data []byte) error { } return nil } +func (m *ClusterRoleBindingBuilder) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRoleBindingBuilder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRoleBindingBuilder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClusterRoleBinding", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ClusterRoleBinding.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ClusterRoleBindingList) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -1489,36 +1660,6 @@ func (m *PolicyRule) Unmarshal(data []byte) error { } m.Verbs = append(m.Verbs, string(data[iNdEx:postIndex])) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeRestrictions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.AttributeRestrictions.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType) @@ -1656,6 +1797,86 @@ func (m *PolicyRule) Unmarshal(data []byte) error { } return nil } +func (m *PolicyRuleBuilder) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PolicyRuleBuilder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PolicyRuleBuilder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyRule", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PolicyRule.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Role) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -2539,55 +2760,58 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 800 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x54, 0x41, 0x4f, 0x13, 0x4d, - 0x18, 0x66, 0x69, 0xfb, 0xd1, 0x1d, 0xbe, 0xa6, 0x1f, 0xf3, 0x85, 0x2f, 0x4d, 0x93, 0x0f, 0x48, - 0x4f, 0x8d, 0xc0, 0x6c, 0x4a, 0x24, 0x72, 0xd0, 0x03, 0x6b, 0x8c, 0x21, 0x22, 0x92, 0x21, 0x12, - 0x25, 0x1a, 0xb3, 0x6d, 0x87, 0xb2, 0xb6, 0xdd, 0x6d, 0x76, 0x66, 0x51, 0xe3, 0x85, 0xf8, 0x0b, - 0xfc, 0x15, 0xde, 0xbc, 0x78, 0x35, 0xf1, 0xe0, 0x89, 0x83, 0x07, 0x8e, 0xc6, 0x03, 0x51, 0xfc, - 0x23, 0xbe, 0xb3, 0xbb, 0xd3, 0xdd, 0xd2, 0x56, 0x0a, 0x89, 0x24, 0x26, 0x1e, 0x26, 0xed, 0xbc, - 0xef, 0xf3, 0xbc, 0xf3, 0x3e, 0xef, 0xce, 0x3c, 0x68, 0xa5, 0xb9, 0xc2, 0x89, 0xed, 0x1a, 0x4d, - 0xbf, 0xca, 0x3c, 0x87, 0x09, 0xc6, 0x8d, 0x4e, 0xb3, 0x61, 0x58, 0x1d, 0x9b, 0x1b, 0x5e, 0xd5, - 0xaa, 0x19, 0xfb, 0x15, 0xab, 0xd5, 0xd9, 0xb3, 0x2a, 0x46, 0x83, 0x39, 0xcc, 0xb3, 0x04, 0xab, - 0x93, 0x8e, 0xe7, 0x0a, 0x17, 0x97, 0x43, 0x26, 0x89, 0x99, 0x04, 0x98, 0x44, 0x32, 0x89, 0x64, - 0x12, 0xc5, 0x2c, 0x2e, 0x36, 0x6c, 0xb1, 0xe7, 0x57, 0x49, 0xcd, 0x6d, 0x1b, 0x0d, 0xb7, 0xe1, - 0x1a, 0x41, 0x81, 0xaa, 0xbf, 0x1b, 0xec, 0x82, 0x4d, 0xf0, 0x2f, 0x2c, 0x5c, 0x5c, 0x1a, 0xda, - 0x92, 0xe1, 0x31, 0xee, 0xfa, 0x5e, 0x8d, 0x9d, 0x6e, 0xa6, 0xb8, 0x3c, 0x9c, 0xe3, 0x3b, 0xfb, - 0xcc, 0xe3, 0xb6, 0xeb, 0xb0, 0x7a, 0x1f, 0x6d, 0x61, 0x38, 0x6d, 0xbf, 0x4f, 0x71, 0x71, 0x71, - 0x30, 0xda, 0xf3, 0x1d, 0x61, 0xb7, 0xfb, 0x7b, 0xaa, 0x0c, 0x86, 0xfb, 0xc2, 0x6e, 0x19, 0xb6, - 0x23, 0xb8, 0xf0, 0x4e, 0x53, 0x4a, 0x1f, 0x35, 0x34, 0x79, 0xb3, 0xe5, 0x73, 0xc1, 0x3c, 0xea, - 0xb6, 0x18, 0x7e, 0x80, 0xb2, 0x6d, 0x26, 0xac, 0xba, 0x25, 0xac, 0x82, 0x36, 0xa7, 0x95, 0x27, - 0x97, 0xca, 0x64, 0xe8, 0xd8, 0x61, 0xe0, 0xe4, 0x5e, 0xf5, 0x29, 0xab, 0x89, 0xbb, 0xc0, 0x31, - 0xf1, 0xe1, 0xf1, 0xec, 0xd8, 0xc9, 0xf1, 0x2c, 0x8a, 0x63, 0xb4, 0x5b, 0x0d, 0x3f, 0x44, 0x19, - 0xcf, 0x6f, 0x31, 0x5e, 0x18, 0x9f, 0x4b, 0x41, 0xd9, 0xab, 0x64, 0xd4, 0xaf, 0x49, 0x36, 0xdd, - 0x96, 0x5d, 0x7b, 0x41, 0x81, 0x6c, 0xe6, 0xa2, 0x23, 0x32, 0x72, 0xc7, 0x69, 0x58, 0xb1, 0xf4, - 0x76, 0x1c, 0xe1, 0x84, 0x08, 0xd3, 0x76, 0xea, 0xb6, 0xd3, 0xf8, 0x85, 0x5a, 0x9e, 0xa0, 0x2c, - 0xf7, 0x83, 0x84, 0x92, 0x53, 0x19, 0x5d, 0xce, 0x56, 0xc8, 0x34, 0xff, 0x89, 0x8e, 0xc8, 0x46, - 0x01, 0x4e, 0xbb, 0x45, 0xf1, 0x23, 0x34, 0xe1, 0x81, 0x12, 0xca, 0x76, 0x0b, 0xa9, 0xa0, 0xf3, - 0x73, 0xd4, 0xa7, 0x21, 0xd1, 0xcc, 0x47, 0xf5, 0x27, 0xa2, 0x00, 0x55, 0x25, 0x4b, 0x5f, 0x34, - 0xf4, 0x5f, 0xff, 0xbc, 0xd6, 0x6d, 0x2e, 0xf0, 0xe3, 0xbe, 0x99, 0x19, 0x3f, 0x99, 0x59, 0xe2, - 0xa6, 0x13, 0x49, 0x0f, 0x46, 0xd7, 0xd5, 0xa5, 0x22, 0x89, 0xc1, 0x59, 0x28, 0x63, 0x0b, 0xd6, - 0x56, 0x53, 0xbb, 0x3e, 0xba, 0xaa, 0xfe, 0x7e, 0xe3, 0xcb, 0xb0, 0x26, 0x4b, 0xd2, 0xb0, 0x72, - 0xe9, 0x93, 0x86, 0xf2, 0x09, 0xf0, 0x65, 0xa8, 0xda, 0xe9, 0x55, 0xb5, 0x7c, 0x31, 0x55, 0x83, - 0xe5, 0xbc, 0x4a, 0x21, 0x14, 0x3f, 0x00, 0x3c, 0x8b, 0x32, 0xd0, 0x5c, 0x95, 0x83, 0x8c, 0x54, - 0x59, 0x37, 0x75, 0x89, 0xdf, 0x96, 0x01, 0x1a, 0xc6, 0xf1, 0x81, 0x86, 0xa6, 0x2d, 0x21, 0x3c, - 0xbb, 0xea, 0x0b, 0xf8, 0xd8, 0xf0, 0xe6, 0xed, 0x9a, 0x00, 0x2d, 0xb2, 0x39, 0x29, 0x7c, 0x7e, - 0x48, 0x73, 0x91, 0xa7, 0x10, 0x6a, 0x3d, 0xbb, 0xf5, 0x5c, 0x30, 0x47, 0xea, 0x37, 0xff, 0x8f, - 0x5a, 0x9a, 0x5e, 0x1d, 0x54, 0x91, 0x0e, 0x3e, 0x08, 0xcf, 0x23, 0x1d, 0xa4, 0xde, 0xf6, 0x5c, - 0xbf, 0xc3, 0xe1, 0xfa, 0xca, 0x3e, 0x73, 0x50, 0x44, 0x5f, 0xdd, 0x5c, 0x0b, 0x83, 0x34, 0xce, - 0x4b, 0xb0, 0xf2, 0x58, 0x5e, 0x48, 0xc7, 0x60, 0xaa, 0x82, 0x34, 0xce, 0xe3, 0x6b, 0x28, 0xa7, - 0x36, 0x1b, 0x56, 0x1b, 0x08, 0x99, 0x80, 0x30, 0x05, 0x84, 0x1c, 0x4d, 0x26, 0x68, 0x2f, 0x0e, - 0xdf, 0x40, 0x79, 0xc7, 0x75, 0x14, 0xe4, 0x3e, 0x5d, 0xe7, 0x85, 0xbf, 0x02, 0xea, 0xbf, 0x40, - 0xcd, 0x6f, 0xf4, 0xa6, 0xe8, 0x69, 0x6c, 0xe9, 0xbd, 0x86, 0xd2, 0xbf, 0xaf, 0x3d, 0xbe, 0x19, - 0x47, 0x93, 0x7f, 0x7c, 0x71, 0x04, 0x5f, 0x94, 0xd6, 0x71, 0xc9, 0x86, 0x78, 0x71, 0xeb, 0x38, - 0xdb, 0x09, 0x3f, 0x68, 0x28, 0x7b, 0x59, 0x16, 0xb8, 0xd5, 0xab, 0x83, 0x9c, 0x53, 0xc7, 0x60, - 0x01, 0x2f, 0x91, 0xfa, 0x46, 0x78, 0x01, 0x65, 0x95, 0x67, 0x04, 0xed, 0xeb, 0x71, 0x37, 0xca, - 0x56, 0x68, 0x17, 0x81, 0xe7, 0x50, 0xba, 0x09, 0xa3, 0x09, 0x2c, 0x4f, 0x37, 0xff, 0x8e, 0x90, - 0xe9, 0x3b, 0x10, 0xa3, 0x41, 0x46, 0x22, 0x1c, 0x70, 0x86, 0xe0, 0x16, 0x25, 0x10, 0xd2, 0x2d, - 0x68, 0x90, 0x29, 0xbd, 0xd3, 0xd0, 0x44, 0x74, 0x03, 0xbb, 0xf5, 0xb4, 0xa1, 0xf5, 0x96, 0x10, - 0x82, 0xd3, 0xb7, 0xc3, 0xa1, 0x45, 0xe7, 0x76, 0xdf, 0x0a, 0x74, 0x18, 0x65, 0x68, 0x02, 0x75, - 0x76, 0x0f, 0xd8, 0x40, 0xba, 0xfc, 0xe5, 0x1d, 0xab, 0xc6, 0xc0, 0x1c, 0x25, 0x6c, 0x2a, 0x82, - 0xe9, 0x1b, 0x2a, 0x41, 0x63, 0x8c, 0x79, 0xe5, 0xf0, 0xdb, 0xcc, 0xd8, 0x11, 0xac, 0xcf, 0xb0, - 0x0e, 0x4e, 0x66, 0xb4, 0x43, 0x58, 0x47, 0xb0, 0xbe, 0xc2, 0x7a, 0xfd, 0x7d, 0x66, 0x6c, 0x27, - 0xab, 0x06, 0xff, 0x23, 0x00, 0x00, 0xff, 0xff, 0x62, 0x32, 0x8a, 0x1f, 0x89, 0x0b, 0x00, 0x00, + // 847 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x54, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xce, 0xb4, 0x09, 0x4d, 0x5e, 0xa9, 0x4a, 0x07, 0x09, 0x99, 0x1e, 0x9c, 0xca, 0xa7, 0x0a, + 0x16, 0x9b, 0x96, 0x05, 0xf6, 0x00, 0x87, 0x35, 0x07, 0x54, 0xb1, 0x94, 0x6a, 0x56, 0xac, 0xc4, + 0x6a, 0x25, 0x98, 0x38, 0xb3, 0xc9, 0x10, 0xff, 0xd2, 0x8c, 0x1d, 0xb1, 0x42, 0x48, 0x1c, 0x39, + 0xf2, 0x57, 0x70, 0xe4, 0x80, 0xc4, 0x91, 0x13, 0x97, 0x0a, 0x2e, 0x3d, 0xc2, 0x25, 0xa2, 0xe6, + 0x0f, 0x01, 0x79, 0x3c, 0xfe, 0x51, 0x9c, 0xaa, 0x3f, 0x90, 0x22, 0x21, 0x71, 0x4a, 0xfc, 0xde, + 0xf7, 0x7d, 0xf3, 0xbe, 0x79, 0xf6, 0x07, 0xf7, 0x66, 0xf7, 0xa4, 0xcd, 0x23, 0x67, 0x96, 0x8e, + 0x98, 0x08, 0x59, 0xc2, 0xa4, 0x13, 0xcf, 0x26, 0x0e, 0x8d, 0xb9, 0x74, 0xc4, 0x88, 0x7a, 0xce, + 0xfc, 0x80, 0xfa, 0xf1, 0x94, 0x1e, 0x38, 0x13, 0x16, 0x32, 0x41, 0x13, 0x36, 0xb6, 0x63, 0x11, + 0x25, 0x11, 0xde, 0x2f, 0x98, 0x76, 0xcd, 0xb4, 0xe3, 0xd9, 0xc4, 0xce, 0x99, 0x76, 0xce, 0xb4, + 0x4b, 0xe6, 0xee, 0x6b, 0x13, 0x9e, 0x4c, 0xd3, 0x91, 0xed, 0x45, 0x81, 0x33, 0x89, 0x26, 0x91, + 0xa3, 0x04, 0x46, 0xe9, 0x53, 0xf5, 0xa4, 0x1e, 0xd4, 0xbf, 0x42, 0x78, 0xf7, 0xae, 0x1e, 0x89, + 0xc6, 0x3c, 0xa0, 0xde, 0x94, 0x87, 0x4c, 0x3c, 0xab, 0x87, 0x0a, 0x58, 0x42, 0x9d, 0x79, 0x6b, + 0x9c, 0x5d, 0xe7, 0x32, 0x96, 0x48, 0xc3, 0x84, 0x07, 0xac, 0x45, 0x78, 0xeb, 0x2a, 0x82, 0xf4, + 0xa6, 0x2c, 0xa0, 0x2d, 0xde, 0x1b, 0x97, 0xf1, 0xd2, 0x84, 0xfb, 0x0e, 0x0f, 0x13, 0x99, 0x88, + 0x16, 0xa9, 0xe1, 0x49, 0x32, 0x31, 0x67, 0xa2, 0x36, 0xc4, 0xbe, 0xa0, 0x41, 0xec, 0xb3, 0x65, + 0x9e, 0xee, 0x5c, 0xba, 0x9c, 0x25, 0x68, 0xeb, 0x17, 0x04, 0x9b, 0xef, 0xf9, 0xa9, 0x4c, 0x98, + 0x20, 0x91, 0xcf, 0xf0, 0x67, 0xd0, 0xcf, 0x2f, 0x6b, 0x4c, 0x13, 0x6a, 0xa0, 0x3d, 0xb4, 0xbf, + 0x79, 0xf8, 0xba, 0xad, 0x77, 0xd6, 0x9c, 0xbd, 0xde, 0x5a, 0x8e, 0xb6, 0xe7, 0x07, 0xf6, 0x47, + 0xa3, 0xcf, 0x99, 0x97, 0x7c, 0xc8, 0x12, 0xea, 0xe2, 0xd3, 0xc5, 0xb0, 0x93, 0x2d, 0x86, 0x50, + 0xd7, 0x48, 0xa5, 0x8a, 0x3f, 0x81, 0x9e, 0x48, 0x7d, 0x26, 0x8d, 0xb5, 0xbd, 0xf5, 0xfd, 0xcd, + 0xc3, 0xbb, 0xf6, 0x75, 0x5f, 0x09, 0xfb, 0x24, 0xf2, 0xb9, 0xf7, 0x8c, 0xa4, 0x3e, 0x73, 0xb7, + 0xf4, 0x11, 0xbd, 0xfc, 0x49, 0x92, 0x42, 0xd1, 0xfa, 0x71, 0x0d, 0x70, 0xc3, 0x8c, 0xcb, 0xc3, + 0x31, 0x0f, 0x27, 0x2b, 0xf0, 0xf4, 0x29, 0xf4, 0x65, 0xaa, 0x1a, 0xa5, 0xad, 0x83, 0xeb, 0xdb, + 0x7a, 0x58, 0x30, 0xdd, 0x17, 0xf4, 0x11, 0x7d, 0x5d, 0x90, 0xa4, 0x12, 0xc5, 0x4f, 0x60, 0x43, + 0x44, 0x3e, 0x23, 0xec, 0xa9, 0xb1, 0xae, 0x1c, 0xdc, 0x40, 0x9f, 0x14, 0x44, 0x77, 0x5b, 0xeb, + 0x6f, 0xe8, 0x02, 0x29, 0x25, 0xad, 0xef, 0x10, 0xbc, 0xdc, 0xbe, 0x37, 0x37, 0xe5, 0xfe, 0x98, + 0x09, 0xfc, 0x0d, 0x02, 0xec, 0xb5, 0xba, 0xfa, 0x26, 0xdf, 0xb9, 0xfe, 0x1c, 0x4b, 0x4e, 0xd8, + 0xd5, 0x23, 0x2d, 0xd9, 0x1a, 0x59, 0x72, 0xa6, 0xf5, 0x3b, 0x82, 0x97, 0xda, 0xd0, 0x07, 0x5c, + 0x26, 0xf8, 0x49, 0x6b, 0xc9, 0xf6, 0xf5, 0x96, 0x9c, 0xb3, 0xd5, 0x8a, 0xab, 0xfb, 0x2f, 0x2b, + 0x8d, 0x05, 0x53, 0xe8, 0xf1, 0x84, 0x05, 0xe5, 0x76, 0xff, 0x9d, 0xeb, 0xea, 0xe5, 0x3d, 0xca, + 0x25, 0x49, 0xa1, 0x6c, 0xfd, 0x8a, 0x60, 0xbb, 0x01, 0x5e, 0x81, 0xa9, 0xc7, 0x17, 0x4d, 0xbd, + 0x79, 0x3b, 0x53, 0xcb, 0xdd, 0xfc, 0x85, 0x00, 0xea, 0xef, 0x15, 0x0f, 0xa1, 0x37, 0x67, 0x62, + 0x24, 0x0d, 0xb4, 0xb7, 0xbe, 0x3f, 0x70, 0x07, 0x39, 0xfe, 0x51, 0x5e, 0x20, 0x45, 0x1d, 0xbf, + 0x0a, 0x03, 0x1a, 0xf3, 0xf7, 0x45, 0x94, 0xc6, 0xd2, 0x58, 0x57, 0xa0, 0xad, 0x6c, 0x31, 0x1c, + 0xdc, 0x3f, 0x39, 0x2a, 0x8a, 0xa4, 0xee, 0xe7, 0x60, 0xc1, 0x64, 0x94, 0x0a, 0x8f, 0x49, 0xa3, + 0x5b, 0x83, 0x49, 0x59, 0x24, 0x75, 0x1f, 0xbf, 0x0d, 0x5b, 0xe5, 0xc3, 0x31, 0x0d, 0x98, 0x34, + 0x7a, 0x8a, 0xb0, 0x93, 0x2d, 0x86, 0x5b, 0xa4, 0xd9, 0x20, 0x17, 0x71, 0xf8, 0x5d, 0xd8, 0x0e, + 0xa3, 0xb0, 0x84, 0x7c, 0x4c, 0x1e, 0x48, 0xe3, 0x39, 0x45, 0x7d, 0x31, 0x5b, 0x0c, 0xb7, 0x8f, + 0x2f, 0xb6, 0xc8, 0x3f, 0xb1, 0xd6, 0x57, 0xb0, 0xd3, 0x08, 0x2c, 0xfd, 0x2d, 0x4d, 0x01, 0xe2, + 0xaa, 0xa8, 0x57, 0x7a, 0xbb, 0x04, 0xac, 0x02, 0xa9, 0xae, 0x91, 0x86, 0xb6, 0xf5, 0x33, 0x82, + 0xee, 0x7f, 0x3f, 0xd1, 0xbf, 0x5f, 0x83, 0xcd, 0xff, 0xa3, 0xfc, 0x06, 0x51, 0x9e, 0xa7, 0xc8, + 0x6a, 0xa3, 0xf1, 0xf6, 0x29, 0x72, 0x75, 0x26, 0xfe, 0x84, 0xa0, 0xbf, 0xa2, 0x30, 0x7c, 0x78, + 0xd1, 0x86, 0x7d, 0x43, 0x1b, 0xcb, 0xe7, 0xff, 0x12, 0xca, 0x0d, 0xe1, 0x3b, 0xd0, 0x2f, 0x03, + 0x4c, 0x4d, 0x3f, 0xa8, 0xa7, 0x29, 0x33, 0x8e, 0x54, 0x08, 0xbc, 0x07, 0xdd, 0x19, 0x0f, 0xc7, + 0xc6, 0x9a, 0x42, 0x3e, 0xaf, 0x91, 0xdd, 0x0f, 0x78, 0x38, 0x26, 0xaa, 0x93, 0x23, 0x42, 0x1a, + 0x30, 0xf5, 0x0e, 0x35, 0x10, 0x79, 0x74, 0x11, 0xd5, 0xb1, 0x7e, 0x40, 0xb0, 0xa1, 0xdf, 0xbf, + 0x4a, 0x0f, 0x5d, 0xaa, 0x77, 0x08, 0x40, 0x63, 0xfe, 0x88, 0x09, 0xc9, 0xa3, 0x50, 0x9f, 0x5b, + 0x7d, 0x29, 0xf7, 0x4f, 0x8e, 0x74, 0x87, 0x34, 0x50, 0x57, 0xcf, 0x80, 0x1d, 0x18, 0xe4, 0xbf, + 0x32, 0xa6, 0x1e, 0x33, 0xba, 0x0a, 0xb6, 0xa3, 0x61, 0x83, 0xe3, 0xb2, 0x41, 0x6a, 0x8c, 0xfb, + 0xca, 0xe9, 0xb9, 0xd9, 0x39, 0x3b, 0x37, 0x3b, 0xbf, 0x9d, 0x9b, 0x9d, 0xaf, 0x33, 0x13, 0x9d, + 0x66, 0x26, 0x3a, 0xcb, 0x4c, 0xf4, 0x47, 0x66, 0xa2, 0x6f, 0xff, 0x34, 0x3b, 0x8f, 0xfb, 0xe5, + 0xc5, 0xff, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x53, 0x64, 0x1d, 0x0e, 0x87, 0x0c, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.proto similarity index 75% rename from vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/generated.proto rename to vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.proto index ebb657c4a..5a75fb240 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/generated.proto +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,11 +21,12 @@ syntax = 'proto2'; package k8s.io.kubernetes.pkg.apis.rbac.v1alpha1; -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; -import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1alpha1"; @@ -33,7 +34,8 @@ option go_package = "v1alpha1"; // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. message ClusterRole { // Standard object's metadata. - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Rules holds all the PolicyRules for this ClusterRole repeated PolicyRule rules = 2; @@ -43,7 +45,8 @@ message ClusterRole { // and adds who information via Subject. message ClusterRoleBinding { // Standard object's metadata. - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Subjects holds references to the objects the role applies to. repeated Subject subjects = 2; @@ -53,10 +56,19 @@ message ClusterRoleBinding { optional RoleRef roleRef = 3; } +// +k8s:deepcopy-gen=false +// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types. +// We use it to construct bindings in code. It's more compact than trying to write them +// out in a literal. +message ClusterRoleBindingBuilder { + optional ClusterRoleBinding clusterRoleBinding = 1; +} + // ClusterRoleBindingList is a collection of ClusterRoleBindings message ClusterRoleBindingList { // Standard object's metadata. - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is a list of ClusterRoleBindings repeated ClusterRoleBinding items = 2; @@ -65,7 +77,8 @@ message ClusterRoleBindingList { // ClusterRoleList is a collection of ClusterRoles message ClusterRoleList { // Standard object's metadata. - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is a list of ClusterRoles repeated ClusterRole items = 2; @@ -77,31 +90,40 @@ message PolicyRule { // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. repeated string verbs = 1; - // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. - // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error. - optional k8s.io.kubernetes.pkg.runtime.RawExtension attributeRestrictions = 2; - // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of // the enumerated resources in any API group will be allowed. + // +optional repeated string apiGroups = 3; // Resources is a list of resources this rule applies to. ResourceAll represents all resources. + // +optional repeated string resources = 4; // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + // +optional repeated string resourceNames = 5; // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. + // +optional repeated string nonResourceURLs = 6; } +// +k8s:deepcopy-gen=false +// PolicyRuleBuilder let's us attach methods. A no-no for API types. +// We use it to construct rules in code. It's more compact than trying to write them +// out in a literal and allows us to perform some basic checking during construction +message PolicyRuleBuilder { + optional PolicyRule policyRule = 1; +} + // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. message Role { // Standard object's metadata. - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Rules holds all the PolicyRules for this Role repeated PolicyRule rules = 2; @@ -112,7 +134,8 @@ message Role { // namespace only have effect in that namespace. message RoleBinding { // Standard object's metadata. - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Subjects holds references to the objects the role applies to. repeated Subject subjects = 2; @@ -125,7 +148,8 @@ message RoleBinding { // RoleBindingList is a collection of RoleBindings message RoleBindingList { // Standard object's metadata. - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is a list of RoleBindings repeated RoleBinding items = 2; @@ -134,7 +158,8 @@ message RoleBindingList { // RoleList is a collection of Roles message RoleList { // Standard object's metadata. - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is a list of Roles repeated Role items = 2; @@ -159,7 +184,11 @@ message Subject { // If the Authorizer does not recognized the kind value, the Authorizer should report an error. optional string kind = 1; - // APIVersion holds the API group and version of the referenced object. + // APIVersion holds the API group and version of the referenced subject. + // Defaults to "v1" for ServiceAccount subjects. + // Defaults to "rbac.authorization.k8s.io/v1alpha1" for User and Group subjects. + // +k8s:conversion-gen=false + // +optional optional string apiVersion = 2; // Name of the object being referenced. @@ -167,6 +196,7 @@ message Subject { // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty // the Authorizer should report an error. + // +optional optional string namespace = 4; } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/helpers.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/helpers.go similarity index 58% rename from vendor/k8s.io/client-go/1.5/pkg/apis/rbac/helpers.go rename to vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/helpers.go index 4be3bf062..f417f3be0 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/helpers.go +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/helpers.go @@ -14,94 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. */ -package rbac +package v1alpha1 import ( "fmt" - "strings" - "k8s.io/client-go/1.5/pkg/api/unversioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -func RoleRefGroupKind(roleRef RoleRef) unversioned.GroupKind { - return unversioned.GroupKind{Group: roleRef.APIGroup, Kind: roleRef.Kind} -} - -func VerbMatches(rule PolicyRule, requestedVerb string) bool { - for _, ruleVerb := range rule.Verbs { - if ruleVerb == VerbAll { - return true - } - if ruleVerb == requestedVerb { - return true - } - } - - return false -} - -func APIGroupMatches(rule PolicyRule, requestedGroup string) bool { - for _, ruleGroup := range rule.APIGroups { - if ruleGroup == APIGroupAll { - return true - } - if ruleGroup == requestedGroup { - return true - } - } - - return false -} - -func ResourceMatches(rule PolicyRule, requestedResource string) bool { - for _, ruleResource := range rule.Resources { - if ruleResource == ResourceAll { - return true - } - if ruleResource == requestedResource { - return true - } - } - - return false -} - -func ResourceNameMatches(rule PolicyRule, requestedName string) bool { - if len(rule.ResourceNames) == 0 { - return true - } - - for _, ruleName := range rule.ResourceNames { - if ruleName == requestedName { - return true - } - } - - return false -} - -func NonResourceURLMatches(rule PolicyRule, requestedURL string) bool { - for _, ruleURL := range rule.NonResourceURLs { - if ruleURL == NonResourceAll { - return true - } - if ruleURL == requestedURL { - return true - } - if strings.HasSuffix(ruleURL, "*") && strings.HasPrefix(requestedURL, strings.TrimRight(ruleURL, "*")) { - return true - } - } - - return false -} - -// +k8s:deepcopy-gen=false // PolicyRuleBuilder let's us attach methods. A no-no for API types. // We use it to construct rules in code. It's more compact than trying to write them // out in a literal and allows us to perform some basic checking during construction type PolicyRuleBuilder struct { - PolicyRule PolicyRule + PolicyRule PolicyRule `protobuf:"bytes,1,opt,name=policyRule"` } func NewRule(verbs ...string) *PolicyRuleBuilder { @@ -162,3 +87,60 @@ func (r *PolicyRuleBuilder) Rule() (PolicyRule, error) { return r.PolicyRule, nil } + +// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types. +// We use it to construct bindings in code. It's more compact than trying to write them +// out in a literal. +type ClusterRoleBindingBuilder struct { + ClusterRoleBinding ClusterRoleBinding `protobuf:"bytes,1,opt,name=clusterRoleBinding"` +} + +func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder { + return &ClusterRoleBindingBuilder{ + ClusterRoleBinding: ClusterRoleBinding{ + ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName}, + RoleRef: RoleRef{ + APIGroup: GroupName, + Kind: "ClusterRole", + Name: clusterRoleName, + }, + }, + } +} + +func (r *ClusterRoleBindingBuilder) Groups(groups ...string) *ClusterRoleBindingBuilder { + for _, group := range groups { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: GroupKind, Name: group}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder { + for _, user := range users { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: UserKind, Name: user}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *ClusterRoleBindingBuilder { + for _, saName := range serviceAccountNames { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: ServiceAccountKind, Namespace: namespace, Name: saName}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) BindingOrDie() ClusterRoleBinding { + ret, err := r.Binding() + if err != nil { + panic(err) + } + return ret +} + +func (r *ClusterRoleBindingBuilder) Binding() (ClusterRoleBinding, error) { + if len(r.ClusterRoleBinding.Subjects) == 0 { + return ClusterRoleBinding{}, fmt.Errorf("subjects are required: %#v", r.ClusterRoleBinding) + } + + return r.ClusterRoleBinding, nil +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/register.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/register.go similarity index 71% rename from vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/register.go rename to vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/register.go index 7657ecc29..3977e99c5 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/register.go @@ -17,16 +17,20 @@ limitations under the License. package v1alpha1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/watch/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) const GroupName = "rbac.authorization.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs) @@ -45,11 +49,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ClusterRoleBinding{}, &ClusterRoleBindingList{}, &ClusterRoleList{}, - - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &v1.ExportOptions{}, ) - versioned.AddToGroupVersion(scheme, SchemeGroupVersion) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.generated.go similarity index 57% rename from vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types.generated.go rename to vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.generated.go index 7113b9149..64ba53a9b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types.generated.go +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.generated.go @@ -25,10 +25,8 @@ import ( "errors" "fmt" codec1978 "github.com/ugorji/go/codec" - pkg2_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg3_v1 "k8s.io/client-go/1.5/pkg/api/v1" - pkg1_runtime "k8s.io/client-go/1.5/pkg/runtime" - pkg4_types "k8s.io/client-go/1.5/pkg/types" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,12 +62,10 @@ func init() { panic(err) } if false { // reference the types, but skip this branch at build/run time - var v0 pkg2_unversioned.TypeMeta - var v1 pkg3_v1.ObjectMeta - var v2 pkg1_runtime.RawExtension - var v3 pkg4_types.UID - var v4 time.Time - _, _, _, _, _ = v0, v1, v2, v3, v4 + var v0 pkg1_v1.TypeMeta + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -87,17 +83,16 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [6]bool + var yyq2 [5]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false - yyq2[1] = true - yyq2[2] = len(x.APIGroups) != 0 - yyq2[3] = len(x.Resources) != 0 - yyq2[4] = len(x.ResourceNames) != 0 - yyq2[5] = len(x.NonResourceURLs) != 0 + yyq2[1] = len(x.APIGroups) != 0 + yyq2[2] = len(x.Resources) != 0 + yyq2[3] = len(x.ResourceNames) != 0 + yyq2[4] = len(x.NonResourceURLs) != 0 var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(6) + r.EncodeArrayStart(5) } else { yynn2 = 1 for _, b := range yyq2 { @@ -138,62 +133,29 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[1] { - yy7 := &x.AttributeRestrictions - yym8 := z.EncBinary() - _ = yym8 - if false { - } else if z.HasExtensions() && z.EncExt(yy7) { - } else if !yym8 && z.IsJSONHandle() { - z.EncJSONMarshal(yy7) + if x.APIGroups == nil { + r.EncodeNil() } else { - z.EncFallback(yy7) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + z.F.EncSliceStringV(x.APIGroups, false, e) + } } } else { r.EncodeNil() } } else { if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("attributeRestrictions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy9 := &x.AttributeRestrictions - yym10 := z.EncBinary() - _ = yym10 - if false { - } else if z.HasExtensions() && z.EncExt(yy9) { - } else if !yym10 && z.IsJSONHandle() { - z.EncJSONMarshal(yy9) - } else { - z.EncFallback(yy9) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - if x.APIGroups == nil { - r.EncodeNil() - } else { - yym12 := z.EncBinary() - _ = yym12 - if false { - } else { - z.F.EncSliceStringV(x.APIGroups, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiGroups")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.APIGroups == nil { r.EncodeNil() } else { - yym13 := z.EncBinary() - _ = yym13 + yym8 := z.EncBinary() + _ = yym8 if false { } else { z.F.EncSliceStringV(x.APIGroups, false, e) @@ -203,12 +165,12 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[3] { + if yyq2[2] { if x.Resources == nil { r.EncodeNil() } else { - yym15 := z.EncBinary() - _ = yym15 + yym10 := z.EncBinary() + _ = yym10 if false { } else { z.F.EncSliceStringV(x.Resources, false, e) @@ -218,15 +180,15 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2[3] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resources")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Resources == nil { r.EncodeNil() } else { - yym16 := z.EncBinary() - _ = yym16 + yym11 := z.EncBinary() + _ = yym11 if false { } else { z.F.EncSliceStringV(x.Resources, false, e) @@ -236,12 +198,12 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { + if yyq2[3] { if x.ResourceNames == nil { r.EncodeNil() } else { - yym18 := z.EncBinary() - _ = yym18 + yym13 := z.EncBinary() + _ = yym13 if false { } else { z.F.EncSliceStringV(x.ResourceNames, false, e) @@ -251,15 +213,15 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2[4] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceNames")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ResourceNames == nil { r.EncodeNil() } else { - yym19 := z.EncBinary() - _ = yym19 + yym14 := z.EncBinary() + _ = yym14 if false { } else { z.F.EncSliceStringV(x.ResourceNames, false, e) @@ -269,12 +231,12 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[5] { + if yyq2[4] { if x.NonResourceURLs == nil { r.EncodeNil() } else { - yym21 := z.EncBinary() - _ = yym21 + yym16 := z.EncBinary() + _ = yym16 if false { } else { z.F.EncSliceStringV(x.NonResourceURLs, false, e) @@ -284,15 +246,15 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2[5] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nonResourceURLs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.NonResourceURLs == nil { r.EncodeNil() } else { - yym22 := z.EncBinary() - _ = yym22 + yym17 := z.EncBinary() + _ = yym17 if false { } else { z.F.EncSliceStringV(x.NonResourceURLs, false, e) @@ -313,25 +275,25 @@ func (x *PolicyRule) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym23 := z.DecBinary() - _ = yym23 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct24 := r.ContainerType() - if yyct24 == codecSelferValueTypeMap1234 { - yyl24 := r.ReadMapStart() - if yyl24 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl24, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct24 == codecSelferValueTypeArray1234 { - yyl24 := r.ReadArrayStart() - if yyl24 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl24, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -343,12 +305,12 @@ func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys25Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys25Slc - var yyhl25 bool = l >= 0 - for yyj25 := 0; ; yyj25++ { - if yyhl25 { - if yyj25 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -357,89 +319,74 @@ func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys25Slc = r.DecodeBytes(yys25Slc, true, true) - yys25 := string(yys25Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys25 { + switch yys3 { case "verbs": if r.TryDecodeAsNil() { x.Verbs = nil } else { - yyv26 := &x.Verbs - yym27 := z.DecBinary() - _ = yym27 + yyv4 := &x.Verbs + yym5 := z.DecBinary() + _ = yym5 if false { } else { - z.F.DecSliceStringX(yyv26, false, d) - } - } - case "attributeRestrictions": - if r.TryDecodeAsNil() { - x.AttributeRestrictions = pkg1_runtime.RawExtension{} - } else { - yyv28 := &x.AttributeRestrictions - yym29 := z.DecBinary() - _ = yym29 - if false { - } else if z.HasExtensions() && z.DecExt(yyv28) { - } else if !yym29 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv28) - } else { - z.DecFallback(yyv28, false) + z.F.DecSliceStringX(yyv4, false, d) } } case "apiGroups": if r.TryDecodeAsNil() { x.APIGroups = nil } else { - yyv30 := &x.APIGroups - yym31 := z.DecBinary() - _ = yym31 + yyv6 := &x.APIGroups + yym7 := z.DecBinary() + _ = yym7 if false { } else { - z.F.DecSliceStringX(yyv30, false, d) + z.F.DecSliceStringX(yyv6, false, d) } } case "resources": if r.TryDecodeAsNil() { x.Resources = nil } else { - yyv32 := &x.Resources - yym33 := z.DecBinary() - _ = yym33 + yyv8 := &x.Resources + yym9 := z.DecBinary() + _ = yym9 if false { } else { - z.F.DecSliceStringX(yyv32, false, d) + z.F.DecSliceStringX(yyv8, false, d) } } case "resourceNames": if r.TryDecodeAsNil() { x.ResourceNames = nil } else { - yyv34 := &x.ResourceNames - yym35 := z.DecBinary() - _ = yym35 + yyv10 := &x.ResourceNames + yym11 := z.DecBinary() + _ = yym11 if false { } else { - z.F.DecSliceStringX(yyv34, false, d) + z.F.DecSliceStringX(yyv10, false, d) } } case "nonResourceURLs": if r.TryDecodeAsNil() { x.NonResourceURLs = nil } else { - yyv36 := &x.NonResourceURLs - yym37 := z.DecBinary() - _ = yym37 + yyv12 := &x.NonResourceURLs + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecSliceStringX(yyv36, false, d) + z.F.DecSliceStringX(yyv12, false, d) } } default: - z.DecStructFieldNotFound(-1, yys25) - } // end switch yys25 - } // end for yyj25 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -447,16 +394,16 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj38 int - var yyb38 bool - var yyhl38 bool = l >= 0 - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb38 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb38 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -464,46 +411,21 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Verbs = nil } else { - yyv39 := &x.Verbs - yym40 := z.DecBinary() - _ = yym40 + yyv15 := &x.Verbs + yym16 := z.DecBinary() + _ = yym16 if false { } else { - z.F.DecSliceStringX(yyv39, false, d) + z.F.DecSliceStringX(yyv15, false, d) } } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb38 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb38 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.AttributeRestrictions = pkg1_runtime.RawExtension{} - } else { - yyv41 := &x.AttributeRestrictions - yym42 := z.DecBinary() - _ = yym42 - if false { - } else if z.HasExtensions() && z.DecExt(yyv41) { - } else if !yym42 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv41) - } else { - z.DecFallback(yyv41, false) - } - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -511,21 +433,21 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIGroups = nil } else { - yyv43 := &x.APIGroups - yym44 := z.DecBinary() - _ = yym44 + yyv17 := &x.APIGroups + yym18 := z.DecBinary() + _ = yym18 if false { } else { - z.F.DecSliceStringX(yyv43, false, d) + z.F.DecSliceStringX(yyv17, false, d) } } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb38 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb38 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -533,21 +455,21 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Resources = nil } else { - yyv45 := &x.Resources - yym46 := z.DecBinary() - _ = yym46 + yyv19 := &x.Resources + yym20 := z.DecBinary() + _ = yym20 if false { } else { - z.F.DecSliceStringX(yyv45, false, d) + z.F.DecSliceStringX(yyv19, false, d) } } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb38 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb38 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -555,21 +477,21 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ResourceNames = nil } else { - yyv47 := &x.ResourceNames - yym48 := z.DecBinary() - _ = yym48 + yyv21 := &x.ResourceNames + yym22 := z.DecBinary() + _ = yym22 if false { } else { - z.F.DecSliceStringX(yyv47, false, d) + z.F.DecSliceStringX(yyv21, false, d) } } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb38 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb38 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -577,26 +499,26 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NonResourceURLs = nil } else { - yyv49 := &x.NonResourceURLs - yym50 := z.DecBinary() - _ = yym50 + yyv23 := &x.NonResourceURLs + yym24 := z.DecBinary() + _ = yym24 if false { } else { - z.F.DecSliceStringX(yyv49, false, d) + z.F.DecSliceStringX(yyv23, false, d) } } for { - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb38 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb38 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj38-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -608,35 +530,35 @@ func (x *Subject) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym51 := z.EncBinary() - _ = yym51 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep52 := !z.EncBinary() - yy2arr52 := z.EncBasicHandle().StructToArray - var yyq52 [4]bool - _, _, _ = yysep52, yyq52, yy2arr52 - const yyr52 bool = false - yyq52[1] = x.APIVersion != "" - yyq52[3] = x.Namespace != "" - var yynn52 int - if yyr52 || yy2arr52 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.APIVersion != "" + yyq2[3] = x.Namespace != "" + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn52 = 2 - for _, b := range yyq52 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn52++ + yynn2++ } } - r.EncodeMapStart(yynn52) - yynn52 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr52 || yy2arr52 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym54 := z.EncBinary() - _ = yym54 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -645,18 +567,18 @@ func (x *Subject) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym55 := z.EncBinary() - _ = yym55 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } - if yyr52 || yy2arr52 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq52[1] { - yym57 := z.EncBinary() - _ = yym57 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -665,22 +587,22 @@ func (x *Subject) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq52[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym58 := z.EncBinary() - _ = yym58 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr52 || yy2arr52 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym60 := z.EncBinary() - _ = yym60 + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -689,18 +611,18 @@ func (x *Subject) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym61 := z.EncBinary() - _ = yym61 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr52 || yy2arr52 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq52[3] { - yym63 := z.EncBinary() - _ = yym63 + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) @@ -709,19 +631,19 @@ func (x *Subject) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq52[3] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("namespace")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym64 := z.EncBinary() - _ = yym64 + yym14 := z.EncBinary() + _ = yym14 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) } } } - if yyr52 || yy2arr52 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -734,25 +656,25 @@ func (x *Subject) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym65 := z.DecBinary() - _ = yym65 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct66 := r.ContainerType() - if yyct66 == codecSelferValueTypeMap1234 { - yyl66 := r.ReadMapStart() - if yyl66 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl66, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct66 == codecSelferValueTypeArray1234 { - yyl66 := r.ReadArrayStart() - if yyl66 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl66, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -764,12 +686,12 @@ func (x *Subject) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys67Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys67Slc - var yyhl67 bool = l >= 0 - for yyj67 := 0; ; yyj67++ { - if yyhl67 { - if yyj67 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -778,38 +700,62 @@ func (x *Subject) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys67Slc = r.DecodeBytes(yys67Slc, true, true) - yys67 := string(yys67Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys67 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv8 := &x.Name + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } case "namespace": if r.TryDecodeAsNil() { x.Namespace = "" } else { - x.Namespace = string(r.DecodeString()) + yyv10 := &x.Namespace + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys67) - } // end switch yys67 - } // end for yyj67 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -817,16 +763,16 @@ func (x *Subject) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj72 int - var yyb72 bool - var yyhl72 bool = l >= 0 - yyj72++ - if yyhl72 { - yyb72 = yyj72 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb72 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb72 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -834,15 +780,21 @@ func (x *Subject) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj72++ - if yyhl72 { - yyb72 = yyj72 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb72 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb72 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -850,15 +802,21 @@ func (x *Subject) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj72++ - if yyhl72 { - yyb72 = yyj72 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb72 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb72 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -866,15 +824,21 @@ func (x *Subject) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv17 := &x.Name + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } } - yyj72++ - if yyhl72 { - yyb72 = yyj72 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb72 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb72 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -882,20 +846,26 @@ func (x *Subject) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Namespace = "" } else { - x.Namespace = string(r.DecodeString()) + yyv19 := &x.Namespace + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } } for { - yyj72++ - if yyhl72 { - yyb72 = yyj72 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb72 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb72 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj72-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -907,33 +877,33 @@ func (x *RoleRef) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym77 := z.EncBinary() - _ = yym77 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep78 := !z.EncBinary() - yy2arr78 := z.EncBasicHandle().StructToArray - var yyq78 [3]bool - _, _, _ = yysep78, yyq78, yy2arr78 - const yyr78 bool = false - var yynn78 int - if yyr78 || yy2arr78 { + 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 { - yynn78 = 3 - for _, b := range yyq78 { + yynn2 = 3 + for _, b := range yyq2 { if b { - yynn78++ + yynn2++ } } - r.EncodeMapStart(yynn78) - yynn78 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr78 || yy2arr78 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym80 := z.EncBinary() - _ = yym80 + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup)) @@ -942,17 +912,17 @@ func (x *RoleRef) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiGroup")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym81 := z.EncBinary() - _ = yym81 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup)) } } - if yyr78 || yy2arr78 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym83 := z.EncBinary() - _ = yym83 + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -961,17 +931,17 @@ func (x *RoleRef) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym84 := z.EncBinary() - _ = yym84 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } - if yyr78 || yy2arr78 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym86 := z.EncBinary() - _ = yym86 + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -980,14 +950,14 @@ func (x *RoleRef) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym87 := z.EncBinary() - _ = yym87 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr78 || yy2arr78 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1000,25 +970,25 @@ func (x *RoleRef) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym88 := z.DecBinary() - _ = yym88 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct89 := r.ContainerType() - if yyct89 == codecSelferValueTypeMap1234 { - yyl89 := r.ReadMapStart() - if yyl89 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl89, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct89 == codecSelferValueTypeArray1234 { - yyl89 := r.ReadArrayStart() - if yyl89 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl89, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -1030,12 +1000,12 @@ func (x *RoleRef) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys90Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys90Slc - var yyhl90 bool = l >= 0 - for yyj90 := 0; ; yyj90++ { - if yyhl90 { - if yyj90 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -1044,32 +1014,50 @@ func (x *RoleRef) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys90Slc = r.DecodeBytes(yys90Slc, true, true) - yys90 := string(yys90Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys90 { + switch yys3 { case "apiGroup": if r.TryDecodeAsNil() { x.APIGroup = "" } else { - x.APIGroup = string(r.DecodeString()) + yyv4 := &x.APIGroup + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv6 := &x.Kind + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "name": if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv8 := &x.Name + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } } default: - z.DecStructFieldNotFound(-1, yys90) - } // end switch yys90 - } // end for yyj90 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -1077,16 +1065,16 @@ func (x *RoleRef) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj94 int - var yyb94 bool - var yyhl94 bool = l >= 0 - yyj94++ - if yyhl94 { - yyb94 = yyj94 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb94 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb94 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1094,15 +1082,21 @@ func (x *RoleRef) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIGroup = "" } else { - x.APIGroup = string(r.DecodeString()) + yyv11 := &x.APIGroup + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } } - yyj94++ - if yyhl94 { - yyb94 = yyj94 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb94 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb94 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1110,15 +1104,21 @@ func (x *RoleRef) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj94++ - if yyhl94 { - yyb94 = yyj94 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb94 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb94 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1126,20 +1126,26 @@ func (x *RoleRef) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - x.Name = string(r.DecodeString()) + yyv15 := &x.Name + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } for { - yyj94++ - if yyhl94 { - yyb94 = yyj94 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb94 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb94 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj94-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1151,37 +1157,37 @@ func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym98 := z.EncBinary() - _ = yym98 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep99 := !z.EncBinary() - yy2arr99 := z.EncBasicHandle().StructToArray - var yyq99 [4]bool - _, _, _ = yysep99, yyq99, yy2arr99 - const yyr99 bool = false - yyq99[0] = x.Kind != "" - yyq99[1] = x.APIVersion != "" - yyq99[2] = true - var yynn99 int - if yyr99 || yy2arr99 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn99 = 1 - for _, b := range yyq99 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn99++ + yynn2++ } } - r.EncodeMapStart(yynn99) - yynn99 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr99 || yy2arr99 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq99[0] { - yym101 := z.EncBinary() - _ = yym101 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -1190,23 +1196,23 @@ func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq99[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym102 := z.EncBinary() - _ = yym102 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr99 || yy2arr99 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq99[1] { - yym104 := z.EncBinary() - _ = yym104 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -1215,42 +1221,54 @@ func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq99[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym105 := z.EncBinary() - _ = yym105 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr99 || yy2arr99 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq99[2] { - yy107 := &x.ObjectMeta - yy107.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq99[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy108 := &x.ObjectMeta - yy108.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr99 || yy2arr99 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Rules == nil { r.EncodeNil() } else { - yym110 := z.EncBinary() - _ = yym110 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) @@ -1263,15 +1281,15 @@ func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) { if x.Rules == nil { r.EncodeNil() } else { - yym111 := z.EncBinary() - _ = yym111 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) } } } - if yyr99 || yy2arr99 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1284,25 +1302,25 @@ func (x *Role) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym112 := z.DecBinary() - _ = yym112 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct113 := r.ContainerType() - if yyct113 == codecSelferValueTypeMap1234 { - yyl113 := r.ReadMapStart() - if yyl113 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl113, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct113 == codecSelferValueTypeArray1234 { - yyl113 := r.ReadArrayStart() - if yyl113 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl113, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -1314,12 +1332,12 @@ func (x *Role) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys114Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys114Slc - var yyhl114 bool = l >= 0 - for yyj114 := 0; ; yyj114++ { - if yyhl114 { - if yyj114 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -1328,45 +1346,63 @@ func (x *Role) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys114Slc = r.DecodeBytes(yys114Slc, true, true) - yys114 := string(yys114Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys114 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv117 := &x.ObjectMeta - yyv117.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "rules": if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv118 := &x.Rules - yym119 := z.DecBinary() - _ = yym119 + yyv10 := &x.Rules + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv118), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys114) - } // end switch yys114 - } // end for yyj114 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -1374,16 +1410,16 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj120 int - var yyb120 bool - var yyhl120 bool = l >= 0 - yyj120++ - if yyhl120 { - yyb120 = yyj120 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb120 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb120 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1391,15 +1427,21 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj120++ - if yyhl120 { - yyb120 = yyj120 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb120 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb120 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1407,32 +1449,44 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj120++ - if yyhl120 { - yyb120 = yyj120 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb120 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb120 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv123 := &x.ObjectMeta - yyv123.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj120++ - if yyhl120 { - yyb120 = yyj120 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb120 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb120 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1440,26 +1494,26 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv124 := &x.Rules - yym125 := z.DecBinary() - _ = yym125 + yyv19 := &x.Rules + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv124), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d) } } for { - yyj120++ - if yyhl120 { - yyb120 = yyj120 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb120 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb120 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj120-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1471,37 +1525,37 @@ func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym126 := z.EncBinary() - _ = yym126 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep127 := !z.EncBinary() - yy2arr127 := z.EncBasicHandle().StructToArray - var yyq127 [5]bool - _, _, _ = yysep127, yyq127, yy2arr127 - const yyr127 bool = false - yyq127[0] = x.Kind != "" - yyq127[1] = x.APIVersion != "" - yyq127[2] = true - var yynn127 int - if yyr127 || yy2arr127 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn127 = 2 - for _, b := range yyq127 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn127++ + yynn2++ } } - r.EncodeMapStart(yynn127) - yynn127 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr127 || yy2arr127 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq127[0] { - yym129 := z.EncBinary() - _ = yym129 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -1510,23 +1564,23 @@ func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq127[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym130 := z.EncBinary() - _ = yym130 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr127 || yy2arr127 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq127[1] { - yym132 := z.EncBinary() - _ = yym132 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -1535,42 +1589,54 @@ func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq127[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym133 := z.EncBinary() - _ = yym133 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr127 || yy2arr127 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq127[2] { - yy135 := &x.ObjectMeta - yy135.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq127[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy136 := &x.ObjectMeta - yy136.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr127 || yy2arr127 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Subjects == nil { r.EncodeNil() } else { - yym138 := z.EncBinary() - _ = yym138 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceSubject(([]Subject)(x.Subjects), e) @@ -1583,26 +1649,26 @@ func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { if x.Subjects == nil { r.EncodeNil() } else { - yym139 := z.EncBinary() - _ = yym139 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceSubject(([]Subject)(x.Subjects), e) } } } - if yyr127 || yy2arr127 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy141 := &x.RoleRef - yy141.CodecEncodeSelf(e) + yy18 := &x.RoleRef + yy18.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("roleRef")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy142 := &x.RoleRef - yy142.CodecEncodeSelf(e) + yy20 := &x.RoleRef + yy20.CodecEncodeSelf(e) } - if yyr127 || yy2arr127 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1615,25 +1681,25 @@ func (x *RoleBinding) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym143 := z.DecBinary() - _ = yym143 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct144 := r.ContainerType() - if yyct144 == codecSelferValueTypeMap1234 { - yyl144 := r.ReadMapStart() - if yyl144 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl144, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct144 == codecSelferValueTypeArray1234 { - yyl144 := r.ReadArrayStart() - if yyl144 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl144, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -1645,12 +1711,12 @@ func (x *RoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys145Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys145Slc - var yyhl145 bool = l >= 0 - for yyj145 := 0; ; yyj145++ { - if yyhl145 { - if yyj145 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -1659,52 +1725,70 @@ func (x *RoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys145Slc = r.DecodeBytes(yys145Slc, true, true) - yys145 := string(yys145Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys145 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv148 := &x.ObjectMeta - yyv148.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "subjects": if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv149 := &x.Subjects - yym150 := z.DecBinary() - _ = yym150 + yyv10 := &x.Subjects + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceSubject((*[]Subject)(yyv149), d) + h.decSliceSubject((*[]Subject)(yyv10), d) } } case "roleRef": if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv151 := &x.RoleRef - yyv151.CodecDecodeSelf(d) + yyv12 := &x.RoleRef + yyv12.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys145) - } // end switch yys145 - } // end for yyj145 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -1712,16 +1796,16 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj152 int - var yyb152 bool - var yyhl152 bool = l >= 0 - yyj152++ - if yyhl152 { - yyb152 = yyj152 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb152 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb152 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1729,15 +1813,21 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj152++ - if yyhl152 { - yyb152 = yyj152 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb152 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb152 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1745,32 +1835,44 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } - yyj152++ - if yyhl152 { - yyb152 = yyj152 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb152 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb152 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv155 := &x.ObjectMeta - yyv155.CodecDecodeSelf(d) + yyv18 := &x.ObjectMeta + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else { + z.DecFallback(yyv18, false) + } } - yyj152++ - if yyhl152 { - yyb152 = yyj152 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb152 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb152 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1778,21 +1880,21 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv156 := &x.Subjects - yym157 := z.DecBinary() - _ = yym157 + yyv20 := &x.Subjects + yym21 := z.DecBinary() + _ = yym21 if false { } else { - h.decSliceSubject((*[]Subject)(yyv156), d) + h.decSliceSubject((*[]Subject)(yyv20), d) } } - yyj152++ - if yyhl152 { - yyb152 = yyj152 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb152 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb152 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1800,21 +1902,21 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv158 := &x.RoleRef - yyv158.CodecDecodeSelf(d) + yyv22 := &x.RoleRef + yyv22.CodecDecodeSelf(d) } for { - yyj152++ - if yyhl152 { - yyb152 = yyj152 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb152 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb152 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj152-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1826,37 +1928,37 @@ func (x *RoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym159 := z.EncBinary() - _ = yym159 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep160 := !z.EncBinary() - yy2arr160 := z.EncBasicHandle().StructToArray - var yyq160 [4]bool - _, _, _ = yysep160, yyq160, yy2arr160 - const yyr160 bool = false - yyq160[0] = x.Kind != "" - yyq160[1] = x.APIVersion != "" - yyq160[2] = true - var yynn160 int - if yyr160 || yy2arr160 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn160 = 1 - for _, b := range yyq160 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn160++ + yynn2++ } } - r.EncodeMapStart(yynn160) - yynn160 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr160 || yy2arr160 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq160[0] { - yym162 := z.EncBinary() - _ = yym162 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -1865,23 +1967,23 @@ func (x *RoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq160[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym163 := z.EncBinary() - _ = yym163 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr160 || yy2arr160 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq160[1] { - yym165 := z.EncBinary() - _ = yym165 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -1890,54 +1992,54 @@ func (x *RoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq160[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym166 := z.EncBinary() - _ = yym166 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr160 || yy2arr160 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq160[2] { - yy168 := &x.ListMeta - yym169 := z.EncBinary() - _ = yym169 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy168) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy168) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq160[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy170 := &x.ListMeta - yym171 := z.EncBinary() - _ = yym171 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy170) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy170) + z.EncFallback(yy12) } } } - if yyr160 || yy2arr160 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym173 := z.EncBinary() - _ = yym173 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceRoleBinding(([]RoleBinding)(x.Items), e) @@ -1950,15 +2052,15 @@ func (x *RoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym174 := z.EncBinary() - _ = yym174 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceRoleBinding(([]RoleBinding)(x.Items), e) } } } - if yyr160 || yy2arr160 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -1971,25 +2073,25 @@ func (x *RoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym175 := z.DecBinary() - _ = yym175 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct176 := r.ContainerType() - if yyct176 == codecSelferValueTypeMap1234 { - yyl176 := r.ReadMapStart() - if yyl176 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl176, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct176 == codecSelferValueTypeArray1234 { - yyl176 := r.ReadArrayStart() - if yyl176 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl176, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -2001,12 +2103,12 @@ func (x *RoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys177Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys177Slc - var yyhl177 bool = l >= 0 - for yyj177 := 0; ; yyj177++ { - if yyhl177 { - if yyj177 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -2015,51 +2117,63 @@ func (x *RoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys177Slc = r.DecodeBytes(yys177Slc, true, true) - yys177 := string(yys177Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys177 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv180 := &x.ListMeta - yym181 := z.DecBinary() - _ = yym181 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv180) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv180, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv182 := &x.Items - yym183 := z.DecBinary() - _ = yym183 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceRoleBinding((*[]RoleBinding)(yyv182), d) + h.decSliceRoleBinding((*[]RoleBinding)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys177) - } // end switch yys177 - } // end for yyj177 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -2067,16 +2181,16 @@ func (x *RoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj184 int - var yyb184 bool - var yyhl184 bool = l >= 0 - yyj184++ - if yyhl184 { - yyb184 = yyj184 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb184 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb184 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2084,15 +2198,21 @@ func (x *RoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj184++ - if yyhl184 { - yyb184 = yyj184 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb184 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb184 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2100,38 +2220,44 @@ func (x *RoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj184++ - if yyhl184 { - yyb184 = yyj184 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb184 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb184 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv187 := &x.ListMeta - yym188 := z.DecBinary() - _ = yym188 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv187) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv187, false) + z.DecFallback(yyv17, false) } } - yyj184++ - if yyhl184 { - yyb184 = yyj184 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb184 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb184 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2139,26 +2265,26 @@ func (x *RoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Items = nil } else { - yyv189 := &x.Items - yym190 := z.DecBinary() - _ = yym190 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceRoleBinding((*[]RoleBinding)(yyv189), d) + h.decSliceRoleBinding((*[]RoleBinding)(yyv19), d) } } for { - yyj184++ - if yyhl184 { - yyb184 = yyj184 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb184 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb184 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj184-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2170,37 +2296,37 @@ func (x *RoleList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym191 := z.EncBinary() - _ = yym191 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep192 := !z.EncBinary() - yy2arr192 := z.EncBasicHandle().StructToArray - var yyq192 [4]bool - _, _, _ = yysep192, yyq192, yy2arr192 - const yyr192 bool = false - yyq192[0] = x.Kind != "" - yyq192[1] = x.APIVersion != "" - yyq192[2] = true - var yynn192 int - if yyr192 || yy2arr192 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn192 = 1 - for _, b := range yyq192 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn192++ + yynn2++ } } - r.EncodeMapStart(yynn192) - yynn192 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr192 || yy2arr192 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq192[0] { - yym194 := z.EncBinary() - _ = yym194 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -2209,23 +2335,23 @@ func (x *RoleList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq192[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym195 := z.EncBinary() - _ = yym195 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr192 || yy2arr192 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq192[1] { - yym197 := z.EncBinary() - _ = yym197 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -2234,54 +2360,54 @@ func (x *RoleList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq192[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym198 := z.EncBinary() - _ = yym198 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr192 || yy2arr192 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq192[2] { - yy200 := &x.ListMeta - yym201 := z.EncBinary() - _ = yym201 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy200) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy200) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq192[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy202 := &x.ListMeta - yym203 := z.EncBinary() - _ = yym203 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy202) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy202) + z.EncFallback(yy12) } } } - if yyr192 || yy2arr192 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym205 := z.EncBinary() - _ = yym205 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceRole(([]Role)(x.Items), e) @@ -2294,15 +2420,15 @@ func (x *RoleList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym206 := z.EncBinary() - _ = yym206 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceRole(([]Role)(x.Items), e) } } } - if yyr192 || yy2arr192 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -2315,25 +2441,25 @@ func (x *RoleList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym207 := z.DecBinary() - _ = yym207 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct208 := r.ContainerType() - if yyct208 == codecSelferValueTypeMap1234 { - yyl208 := r.ReadMapStart() - if yyl208 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl208, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct208 == codecSelferValueTypeArray1234 { - yyl208 := r.ReadArrayStart() - if yyl208 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl208, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -2345,12 +2471,12 @@ func (x *RoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys209Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys209Slc - var yyhl209 bool = l >= 0 - for yyj209 := 0; ; yyj209++ { - if yyhl209 { - if yyj209 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -2359,51 +2485,63 @@ func (x *RoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys209Slc = r.DecodeBytes(yys209Slc, true, true) - yys209 := string(yys209Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys209 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv212 := &x.ListMeta - yym213 := z.DecBinary() - _ = yym213 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv212) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv212, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv214 := &x.Items - yym215 := z.DecBinary() - _ = yym215 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceRole((*[]Role)(yyv214), d) + h.decSliceRole((*[]Role)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys209) - } // end switch yys209 - } // end for yyj209 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -2411,16 +2549,16 @@ func (x *RoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj216 int - var yyb216 bool - var yyhl216 bool = l >= 0 - yyj216++ - if yyhl216 { - yyb216 = yyj216 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb216 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb216 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2428,15 +2566,21 @@ func (x *RoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj216++ - if yyhl216 { - yyb216 = yyj216 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb216 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb216 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2444,38 +2588,44 @@ func (x *RoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj216++ - if yyhl216 { - yyb216 = yyj216 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb216 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb216 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv219 := &x.ListMeta - yym220 := z.DecBinary() - _ = yym220 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv219) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv219, false) + z.DecFallback(yyv17, false) } } - yyj216++ - if yyhl216 { - yyb216 = yyj216 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb216 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb216 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2483,26 +2633,26 @@ func (x *RoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv221 := &x.Items - yym222 := z.DecBinary() - _ = yym222 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceRole((*[]Role)(yyv221), d) + h.decSliceRole((*[]Role)(yyv19), d) } } for { - yyj216++ - if yyhl216 { - yyb216 = yyj216 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb216 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb216 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj216-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2514,37 +2664,37 @@ func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym223 := z.EncBinary() - _ = yym223 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep224 := !z.EncBinary() - yy2arr224 := z.EncBasicHandle().StructToArray - var yyq224 [4]bool - _, _, _ = yysep224, yyq224, yy2arr224 - const yyr224 bool = false - yyq224[0] = x.Kind != "" - yyq224[1] = x.APIVersion != "" - yyq224[2] = true - var yynn224 int - if yyr224 || yy2arr224 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn224 = 1 - for _, b := range yyq224 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn224++ + yynn2++ } } - r.EncodeMapStart(yynn224) - yynn224 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr224 || yy2arr224 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq224[0] { - yym226 := z.EncBinary() - _ = yym226 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -2553,23 +2703,23 @@ func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq224[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym227 := z.EncBinary() - _ = yym227 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr224 || yy2arr224 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq224[1] { - yym229 := z.EncBinary() - _ = yym229 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -2578,42 +2728,54 @@ func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq224[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym230 := z.EncBinary() - _ = yym230 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr224 || yy2arr224 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq224[2] { - yy232 := &x.ObjectMeta - yy232.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq224[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy233 := &x.ObjectMeta - yy233.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr224 || yy2arr224 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Rules == nil { r.EncodeNil() } else { - yym235 := z.EncBinary() - _ = yym235 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) @@ -2626,15 +2788,15 @@ func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) { if x.Rules == nil { r.EncodeNil() } else { - yym236 := z.EncBinary() - _ = yym236 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) } } } - if yyr224 || yy2arr224 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -2647,25 +2809,25 @@ func (x *ClusterRole) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym237 := z.DecBinary() - _ = yym237 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct238 := r.ContainerType() - if yyct238 == codecSelferValueTypeMap1234 { - yyl238 := r.ReadMapStart() - if yyl238 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl238, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct238 == codecSelferValueTypeArray1234 { - yyl238 := r.ReadArrayStart() - if yyl238 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl238, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -2677,12 +2839,12 @@ func (x *ClusterRole) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys239Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys239Slc - var yyhl239 bool = l >= 0 - for yyj239 := 0; ; yyj239++ { - if yyhl239 { - if yyj239 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -2691,45 +2853,63 @@ func (x *ClusterRole) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys239Slc = r.DecodeBytes(yys239Slc, true, true) - yys239 := string(yys239Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys239 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv242 := &x.ObjectMeta - yyv242.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "rules": if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv243 := &x.Rules - yym244 := z.DecBinary() - _ = yym244 + yyv10 := &x.Rules + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv243), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys239) - } // end switch yys239 - } // end for yyj239 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -2737,16 +2917,16 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj245 int - var yyb245 bool - var yyhl245 bool = l >= 0 - yyj245++ - if yyhl245 { - yyb245 = yyj245 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb245 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb245 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2754,15 +2934,21 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj245++ - if yyhl245 { - yyb245 = yyj245 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb245 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb245 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2770,32 +2956,44 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj245++ - if yyhl245 { - yyb245 = yyj245 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb245 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb245 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv248 := &x.ObjectMeta - yyv248.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj245++ - if yyhl245 { - yyb245 = yyj245 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb245 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb245 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2803,26 +3001,26 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv249 := &x.Rules - yym250 := z.DecBinary() - _ = yym250 + yyv19 := &x.Rules + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv249), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d) } } for { - yyj245++ - if yyhl245 { - yyb245 = yyj245 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb245 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb245 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj245-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2834,37 +3032,37 @@ func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym251 := z.EncBinary() - _ = yym251 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep252 := !z.EncBinary() - yy2arr252 := z.EncBasicHandle().StructToArray - var yyq252 [5]bool - _, _, _ = yysep252, yyq252, yy2arr252 - const yyr252 bool = false - yyq252[0] = x.Kind != "" - yyq252[1] = x.APIVersion != "" - yyq252[2] = true - var yynn252 int - if yyr252 || yy2arr252 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(5) } else { - yynn252 = 2 - for _, b := range yyq252 { + yynn2 = 2 + for _, b := range yyq2 { if b { - yynn252++ + yynn2++ } } - r.EncodeMapStart(yynn252) - yynn252 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr252 || yy2arr252 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq252[0] { - yym254 := z.EncBinary() - _ = yym254 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -2873,23 +3071,23 @@ func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq252[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym255 := z.EncBinary() - _ = yym255 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr252 || yy2arr252 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq252[1] { - yym257 := z.EncBinary() - _ = yym257 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -2898,42 +3096,54 @@ func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq252[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym258 := z.EncBinary() - _ = yym258 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr252 || yy2arr252 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq252[2] { - yy260 := &x.ObjectMeta - yy260.CodecEncodeSelf(e) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } } else { - if yyq252[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy261 := &x.ObjectMeta - yy261.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } - if yyr252 || yy2arr252 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Subjects == nil { r.EncodeNil() } else { - yym263 := z.EncBinary() - _ = yym263 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceSubject(([]Subject)(x.Subjects), e) @@ -2946,26 +3156,26 @@ func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { if x.Subjects == nil { r.EncodeNil() } else { - yym264 := z.EncBinary() - _ = yym264 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceSubject(([]Subject)(x.Subjects), e) } } } - if yyr252 || yy2arr252 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy266 := &x.RoleRef - yy266.CodecEncodeSelf(e) + yy18 := &x.RoleRef + yy18.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("roleRef")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy267 := &x.RoleRef - yy267.CodecEncodeSelf(e) + yy20 := &x.RoleRef + yy20.CodecEncodeSelf(e) } - if yyr252 || yy2arr252 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -2978,25 +3188,25 @@ func (x *ClusterRoleBinding) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym268 := z.DecBinary() - _ = yym268 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct269 := r.ContainerType() - if yyct269 == codecSelferValueTypeMap1234 { - yyl269 := r.ReadMapStart() - if yyl269 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl269, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct269 == codecSelferValueTypeArray1234 { - yyl269 := r.ReadArrayStart() - if yyl269 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl269, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -3008,12 +3218,12 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys270Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys270Slc - var yyhl270 bool = l >= 0 - for yyj270 := 0; ; yyj270++ { - if yyhl270 { - if yyj270 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -3022,52 +3232,70 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys270Slc = r.DecodeBytes(yys270Slc, true, true) - yys270 := string(yys270Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys270 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv273 := &x.ObjectMeta - yyv273.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "subjects": if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv274 := &x.Subjects - yym275 := z.DecBinary() - _ = yym275 + yyv10 := &x.Subjects + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceSubject((*[]Subject)(yyv274), d) + h.decSliceSubject((*[]Subject)(yyv10), d) } } case "roleRef": if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv276 := &x.RoleRef - yyv276.CodecDecodeSelf(d) + yyv12 := &x.RoleRef + yyv12.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys270) - } // end switch yys270 - } // end for yyj270 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -3075,16 +3303,16 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj277 int - var yyb277 bool - var yyhl277 bool = l >= 0 - yyj277++ - if yyhl277 { - yyb277 = yyj277 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb277 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb277 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3092,15 +3320,21 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } } - yyj277++ - if yyhl277 { - yyb277 = yyj277 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb277 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb277 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3108,32 +3342,44 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } } - yyj277++ - if yyhl277 { - yyb277 = yyj277 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb277 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb277 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv280 := &x.ObjectMeta - yyv280.CodecDecodeSelf(d) + yyv18 := &x.ObjectMeta + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else { + z.DecFallback(yyv18, false) + } } - yyj277++ - if yyhl277 { - yyb277 = yyj277 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb277 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb277 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3141,21 +3387,21 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv281 := &x.Subjects - yym282 := z.DecBinary() - _ = yym282 + yyv20 := &x.Subjects + yym21 := z.DecBinary() + _ = yym21 if false { } else { - h.decSliceSubject((*[]Subject)(yyv281), d) + h.decSliceSubject((*[]Subject)(yyv20), d) } } - yyj277++ - if yyhl277 { - yyb277 = yyj277 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb277 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb277 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3163,21 +3409,21 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv283 := &x.RoleRef - yyv283.CodecDecodeSelf(d) + yyv22 := &x.RoleRef + yyv22.CodecDecodeSelf(d) } for { - yyj277++ - if yyhl277 { - yyb277 = yyj277 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb277 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb277 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj277-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -3189,37 +3435,37 @@ func (x *ClusterRoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym284 := z.EncBinary() - _ = yym284 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep285 := !z.EncBinary() - yy2arr285 := z.EncBasicHandle().StructToArray - var yyq285 [4]bool - _, _, _ = yysep285, yyq285, yy2arr285 - const yyr285 bool = false - yyq285[0] = x.Kind != "" - yyq285[1] = x.APIVersion != "" - yyq285[2] = true - var yynn285 int - if yyr285 || yy2arr285 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn285 = 1 - for _, b := range yyq285 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn285++ + yynn2++ } } - r.EncodeMapStart(yynn285) - yynn285 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr285 || yy2arr285 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq285[0] { - yym287 := z.EncBinary() - _ = yym287 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -3228,23 +3474,23 @@ func (x *ClusterRoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq285[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym288 := z.EncBinary() - _ = yym288 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr285 || yy2arr285 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq285[1] { - yym290 := z.EncBinary() - _ = yym290 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -3253,54 +3499,54 @@ func (x *ClusterRoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq285[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym291 := z.EncBinary() - _ = yym291 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr285 || yy2arr285 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq285[2] { - yy293 := &x.ListMeta - yym294 := z.EncBinary() - _ = yym294 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy293) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy293) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq285[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy295 := &x.ListMeta - yym296 := z.EncBinary() - _ = yym296 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy295) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy295) + z.EncFallback(yy12) } } } - if yyr285 || yy2arr285 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym298 := z.EncBinary() - _ = yym298 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e) @@ -3313,15 +3559,15 @@ func (x *ClusterRoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym299 := z.EncBinary() - _ = yym299 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e) } } } - if yyr285 || yy2arr285 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -3334,25 +3580,25 @@ func (x *ClusterRoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym300 := z.DecBinary() - _ = yym300 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct301 := r.ContainerType() - if yyct301 == codecSelferValueTypeMap1234 { - yyl301 := r.ReadMapStart() - if yyl301 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl301, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct301 == codecSelferValueTypeArray1234 { - yyl301 := r.ReadArrayStart() - if yyl301 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl301, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -3364,12 +3610,12 @@ func (x *ClusterRoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys302Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys302Slc - var yyhl302 bool = l >= 0 - for yyj302 := 0; ; yyj302++ { - if yyhl302 { - if yyj302 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -3378,51 +3624,63 @@ func (x *ClusterRoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Deco } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys302Slc = r.DecodeBytes(yys302Slc, true, true) - yys302 := string(yys302Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys302 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv305 := &x.ListMeta - yym306 := z.DecBinary() - _ = yym306 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv305) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv305, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv307 := &x.Items - yym308 := z.DecBinary() - _ = yym308 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv307), d) + h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys302) - } // end switch yys302 - } // end for yyj302 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -3430,16 +3688,16 @@ func (x *ClusterRoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj309 int - var yyb309 bool - var yyhl309 bool = l >= 0 - yyj309++ - if yyhl309 { - yyb309 = yyj309 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb309 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb309 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3447,15 +3705,21 @@ func (x *ClusterRoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj309++ - if yyhl309 { - yyb309 = yyj309 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb309 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb309 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3463,38 +3727,44 @@ func (x *ClusterRoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj309++ - if yyhl309 { - yyb309 = yyj309 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb309 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb309 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv312 := &x.ListMeta - yym313 := z.DecBinary() - _ = yym313 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv312) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv312, false) + z.DecFallback(yyv17, false) } } - yyj309++ - if yyhl309 { - yyb309 = yyj309 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb309 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb309 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3502,26 +3772,26 @@ func (x *ClusterRoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Items = nil } else { - yyv314 := &x.Items - yym315 := z.DecBinary() - _ = yym315 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv314), d) + h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv19), d) } } for { - yyj309++ - if yyhl309 { - yyb309 = yyj309 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb309 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb309 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj309-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -3533,37 +3803,37 @@ func (x *ClusterRoleList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym316 := z.EncBinary() - _ = yym316 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep317 := !z.EncBinary() - yy2arr317 := z.EncBasicHandle().StructToArray - var yyq317 [4]bool - _, _, _ = yysep317, yyq317, yy2arr317 - const yyr317 bool = false - yyq317[0] = x.Kind != "" - yyq317[1] = x.APIVersion != "" - yyq317[2] = true - var yynn317 int - if yyr317 || yy2arr317 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn317 = 1 - for _, b := range yyq317 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn317++ + yynn2++ } } - r.EncodeMapStart(yynn317) - yynn317 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr317 || yy2arr317 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq317[0] { - yym319 := z.EncBinary() - _ = yym319 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -3572,23 +3842,23 @@ func (x *ClusterRoleList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq317[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym320 := z.EncBinary() - _ = yym320 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr317 || yy2arr317 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq317[1] { - yym322 := z.EncBinary() - _ = yym322 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -3597,54 +3867,54 @@ func (x *ClusterRoleList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq317[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym323 := z.EncBinary() - _ = yym323 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr317 || yy2arr317 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq317[2] { - yy325 := &x.ListMeta - yym326 := z.EncBinary() - _ = yym326 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy325) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy325) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq317[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy327 := &x.ListMeta - yym328 := z.EncBinary() - _ = yym328 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy327) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy327) + z.EncFallback(yy12) } } } - if yyr317 || yy2arr317 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym330 := z.EncBinary() - _ = yym330 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceClusterRole(([]ClusterRole)(x.Items), e) @@ -3657,15 +3927,15 @@ func (x *ClusterRoleList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym331 := z.EncBinary() - _ = yym331 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceClusterRole(([]ClusterRole)(x.Items), e) } } } - if yyr317 || yy2arr317 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -3678,25 +3948,25 @@ func (x *ClusterRoleList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym332 := z.DecBinary() - _ = yym332 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct333 := r.ContainerType() - if yyct333 == codecSelferValueTypeMap1234 { - yyl333 := r.ReadMapStart() - if yyl333 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl333, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct333 == codecSelferValueTypeArray1234 { - yyl333 := r.ReadArrayStart() - if yyl333 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl333, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -3708,12 +3978,12 @@ func (x *ClusterRoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys334Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys334Slc - var yyhl334 bool = l >= 0 - for yyj334 := 0; ; yyj334++ { - if yyhl334 { - if yyj334 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -3722,51 +3992,63 @@ func (x *ClusterRoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys334Slc = r.DecodeBytes(yys334Slc, true, true) - yys334 := string(yys334Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys334 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv337 := &x.ListMeta - yym338 := z.DecBinary() - _ = yym338 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv337) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv337, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv339 := &x.Items - yym340 := z.DecBinary() - _ = yym340 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceClusterRole((*[]ClusterRole)(yyv339), d) + h.decSliceClusterRole((*[]ClusterRole)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys334) - } // end switch yys334 - } // end for yyj334 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -3774,16 +4056,16 @@ func (x *ClusterRoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj341 int - var yyb341 bool - var yyhl341 bool = l >= 0 - yyj341++ - if yyhl341 { - yyb341 = yyj341 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb341 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb341 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3791,15 +4073,21 @@ func (x *ClusterRoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj341++ - if yyhl341 { - yyb341 = yyj341 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb341 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb341 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3807,38 +4095,44 @@ func (x *ClusterRoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj341++ - if yyhl341 { - yyb341 = yyj341 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb341 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb341 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv344 := &x.ListMeta - yym345 := z.DecBinary() - _ = yym345 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv344) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv344, false) + z.DecFallback(yyv17, false) } } - yyj341++ - if yyhl341 { - yyb341 = yyj341 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb341 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb341 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3846,26 +4140,26 @@ func (x *ClusterRoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Items = nil } else { - yyv346 := &x.Items - yym347 := z.DecBinary() - _ = yym347 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceClusterRole((*[]ClusterRole)(yyv346), d) + h.decSliceClusterRole((*[]ClusterRole)(yyv19), d) } } for { - yyj341++ - if yyhl341 { - yyb341 = yyj341 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb341 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb341 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj341-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -3875,10 +4169,10 @@ func (x codecSelfer1234) encSlicePolicyRule(v []PolicyRule, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv348 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy349 := &yyv348 - yy349.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -3888,83 +4182,86 @@ func (x codecSelfer1234) decSlicePolicyRule(v *[]PolicyRule, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv350 := *v - yyh350, yyl350 := z.DecSliceHelperStart() - var yyc350 bool - if yyl350 == 0 { - if yyv350 == nil { - yyv350 = []PolicyRule{} - yyc350 = true - } else if len(yyv350) != 0 { - yyv350 = yyv350[:0] - yyc350 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []PolicyRule{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl350 > 0 { - var yyrr350, yyrl350 int - var yyrt350 bool - if yyl350 > cap(yyv350) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg350 := len(yyv350) > 0 - yyv2350 := yyv350 - yyrl350, yyrt350 = z.DecInferLen(yyl350, z.DecBasicHandle().MaxInitLen, 160) - if yyrt350 { - if yyrl350 <= cap(yyv350) { - yyv350 = yyv350[:yyrl350] + 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 { - yyv350 = make([]PolicyRule, yyrl350) + yyv1 = make([]PolicyRule, yyrl1) } } else { - yyv350 = make([]PolicyRule, yyrl350) + yyv1 = make([]PolicyRule, yyrl1) } - yyc350 = true - yyrr350 = len(yyv350) - if yyrg350 { - copy(yyv350, yyv2350) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl350 != len(yyv350) { - yyv350 = yyv350[:yyl350] - yyc350 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj350 := 0 - for ; yyj350 < yyrr350; yyj350++ { - yyh350.ElemContainerState(yyj350) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv350[yyj350] = PolicyRule{} + yyv1[yyj1] = PolicyRule{} } else { - yyv351 := &yyv350[yyj350] - yyv351.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt350 { - for ; yyj350 < yyl350; yyj350++ { - yyv350 = append(yyv350, PolicyRule{}) - yyh350.ElemContainerState(yyj350) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, PolicyRule{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv350[yyj350] = PolicyRule{} + yyv1[yyj1] = PolicyRule{} } else { - yyv352 := &yyv350[yyj350] - yyv352.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj350 := 0 - for ; !r.CheckBreak(); yyj350++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj350 >= len(yyv350) { - yyv350 = append(yyv350, PolicyRule{}) // var yyz350 PolicyRule - yyc350 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, PolicyRule{}) // var yyz1 PolicyRule + yyc1 = true } - yyh350.ElemContainerState(yyj350) - if yyj350 < len(yyv350) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv350[yyj350] = PolicyRule{} + yyv1[yyj1] = PolicyRule{} } else { - yyv353 := &yyv350[yyj350] - yyv353.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -3972,17 +4269,17 @@ func (x codecSelfer1234) decSlicePolicyRule(v *[]PolicyRule, d *codec1978.Decode } } - if yyj350 < len(yyv350) { - yyv350 = yyv350[:yyj350] - yyc350 = true - } else if yyj350 == 0 && yyv350 == nil { - yyv350 = []PolicyRule{} - yyc350 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []PolicyRule{} + yyc1 = true } } - yyh350.End() - if yyc350 { - *v = yyv350 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -3991,10 +4288,10 @@ func (x codecSelfer1234) encSliceSubject(v []Subject, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv354 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy355 := &yyv354 - yy355.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4004,83 +4301,86 @@ func (x codecSelfer1234) decSliceSubject(v *[]Subject, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv356 := *v - yyh356, yyl356 := z.DecSliceHelperStart() - var yyc356 bool - if yyl356 == 0 { - if yyv356 == nil { - yyv356 = []Subject{} - yyc356 = true - } else if len(yyv356) != 0 { - yyv356 = yyv356[:0] - yyc356 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []Subject{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl356 > 0 { - var yyrr356, yyrl356 int - var yyrt356 bool - if yyl356 > cap(yyv356) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg356 := len(yyv356) > 0 - yyv2356 := yyv356 - yyrl356, yyrt356 = z.DecInferLen(yyl356, z.DecBasicHandle().MaxInitLen, 64) - if yyrt356 { - if yyrl356 <= cap(yyv356) { - yyv356 = yyv356[:yyrl356] + 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 { - yyv356 = make([]Subject, yyrl356) + yyv1 = make([]Subject, yyrl1) } } else { - yyv356 = make([]Subject, yyrl356) + yyv1 = make([]Subject, yyrl1) } - yyc356 = true - yyrr356 = len(yyv356) - if yyrg356 { - copy(yyv356, yyv2356) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl356 != len(yyv356) { - yyv356 = yyv356[:yyl356] - yyc356 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj356 := 0 - for ; yyj356 < yyrr356; yyj356++ { - yyh356.ElemContainerState(yyj356) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv356[yyj356] = Subject{} + yyv1[yyj1] = Subject{} } else { - yyv357 := &yyv356[yyj356] - yyv357.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt356 { - for ; yyj356 < yyl356; yyj356++ { - yyv356 = append(yyv356, Subject{}) - yyh356.ElemContainerState(yyj356) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Subject{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv356[yyj356] = Subject{} + yyv1[yyj1] = Subject{} } else { - yyv358 := &yyv356[yyj356] - yyv358.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj356 := 0 - for ; !r.CheckBreak(); yyj356++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj356 >= len(yyv356) { - yyv356 = append(yyv356, Subject{}) // var yyz356 Subject - yyc356 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Subject{}) // var yyz1 Subject + yyc1 = true } - yyh356.ElemContainerState(yyj356) - if yyj356 < len(yyv356) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv356[yyj356] = Subject{} + yyv1[yyj1] = Subject{} } else { - yyv359 := &yyv356[yyj356] - yyv359.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -4088,17 +4388,17 @@ func (x codecSelfer1234) decSliceSubject(v *[]Subject, d *codec1978.Decoder) { } } - if yyj356 < len(yyv356) { - yyv356 = yyv356[:yyj356] - yyc356 = true - } else if yyj356 == 0 && yyv356 == nil { - yyv356 = []Subject{} - yyc356 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Subject{} + yyc1 = true } } - yyh356.End() - if yyc356 { - *v = yyv356 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -4107,10 +4407,10 @@ func (x codecSelfer1234) encSliceRoleBinding(v []RoleBinding, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv360 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy361 := &yyv360 - yy361.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4120,83 +4420,86 @@ func (x codecSelfer1234) decSliceRoleBinding(v *[]RoleBinding, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv362 := *v - yyh362, yyl362 := z.DecSliceHelperStart() - var yyc362 bool - if yyl362 == 0 { - if yyv362 == nil { - yyv362 = []RoleBinding{} - yyc362 = true - } else if len(yyv362) != 0 { - yyv362 = yyv362[:0] - yyc362 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []RoleBinding{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl362 > 0 { - var yyrr362, yyrl362 int - var yyrt362 bool - if yyl362 > cap(yyv362) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg362 := len(yyv362) > 0 - yyv2362 := yyv362 - yyrl362, yyrt362 = z.DecInferLen(yyl362, z.DecBasicHandle().MaxInitLen, 328) - if yyrt362 { - if yyrl362 <= cap(yyv362) { - yyv362 = yyv362[:yyrl362] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 328) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv362 = make([]RoleBinding, yyrl362) + yyv1 = make([]RoleBinding, yyrl1) } } else { - yyv362 = make([]RoleBinding, yyrl362) + yyv1 = make([]RoleBinding, yyrl1) } - yyc362 = true - yyrr362 = len(yyv362) - if yyrg362 { - copy(yyv362, yyv2362) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl362 != len(yyv362) { - yyv362 = yyv362[:yyl362] - yyc362 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj362 := 0 - for ; yyj362 < yyrr362; yyj362++ { - yyh362.ElemContainerState(yyj362) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv362[yyj362] = RoleBinding{} + yyv1[yyj1] = RoleBinding{} } else { - yyv363 := &yyv362[yyj362] - yyv363.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt362 { - for ; yyj362 < yyl362; yyj362++ { - yyv362 = append(yyv362, RoleBinding{}) - yyh362.ElemContainerState(yyj362) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, RoleBinding{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv362[yyj362] = RoleBinding{} + yyv1[yyj1] = RoleBinding{} } else { - yyv364 := &yyv362[yyj362] - yyv364.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj362 := 0 - for ; !r.CheckBreak(); yyj362++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj362 >= len(yyv362) { - yyv362 = append(yyv362, RoleBinding{}) // var yyz362 RoleBinding - yyc362 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, RoleBinding{}) // var yyz1 RoleBinding + yyc1 = true } - yyh362.ElemContainerState(yyj362) - if yyj362 < len(yyv362) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv362[yyj362] = RoleBinding{} + yyv1[yyj1] = RoleBinding{} } else { - yyv365 := &yyv362[yyj362] - yyv365.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -4204,17 +4507,17 @@ func (x codecSelfer1234) decSliceRoleBinding(v *[]RoleBinding, d *codec1978.Deco } } - if yyj362 < len(yyv362) { - yyv362 = yyv362[:yyj362] - yyc362 = true - } else if yyj362 == 0 && yyv362 == nil { - yyv362 = []RoleBinding{} - yyc362 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []RoleBinding{} + yyc1 = true } } - yyh362.End() - if yyc362 { - *v = yyv362 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -4223,10 +4526,10 @@ func (x codecSelfer1234) encSliceRole(v []Role, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv366 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy367 := &yyv366 - yy367.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4236,83 +4539,86 @@ func (x codecSelfer1234) decSliceRole(v *[]Role, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv368 := *v - yyh368, yyl368 := z.DecSliceHelperStart() - var yyc368 bool - if yyl368 == 0 { - if yyv368 == nil { - yyv368 = []Role{} - yyc368 = true - } else if len(yyv368) != 0 { - yyv368 = yyv368[:0] - yyc368 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []Role{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl368 > 0 { - var yyrr368, yyrl368 int - var yyrt368 bool - if yyl368 > cap(yyv368) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg368 := len(yyv368) > 0 - yyv2368 := yyv368 - yyrl368, yyrt368 = z.DecInferLen(yyl368, z.DecBasicHandle().MaxInitLen, 280) - if yyrt368 { - if yyrl368 <= cap(yyv368) { - yyv368 = yyv368[:yyrl368] + 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 { - yyv368 = make([]Role, yyrl368) + yyv1 = make([]Role, yyrl1) } } else { - yyv368 = make([]Role, yyrl368) + yyv1 = make([]Role, yyrl1) } - yyc368 = true - yyrr368 = len(yyv368) - if yyrg368 { - copy(yyv368, yyv2368) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl368 != len(yyv368) { - yyv368 = yyv368[:yyl368] - yyc368 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj368 := 0 - for ; yyj368 < yyrr368; yyj368++ { - yyh368.ElemContainerState(yyj368) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv368[yyj368] = Role{} + yyv1[yyj1] = Role{} } else { - yyv369 := &yyv368[yyj368] - yyv369.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt368 { - for ; yyj368 < yyl368; yyj368++ { - yyv368 = append(yyv368, Role{}) - yyh368.ElemContainerState(yyj368) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Role{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv368[yyj368] = Role{} + yyv1[yyj1] = Role{} } else { - yyv370 := &yyv368[yyj368] - yyv370.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj368 := 0 - for ; !r.CheckBreak(); yyj368++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj368 >= len(yyv368) { - yyv368 = append(yyv368, Role{}) // var yyz368 Role - yyc368 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Role{}) // var yyz1 Role + yyc1 = true } - yyh368.ElemContainerState(yyj368) - if yyj368 < len(yyv368) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv368[yyj368] = Role{} + yyv1[yyj1] = Role{} } else { - yyv371 := &yyv368[yyj368] - yyv371.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -4320,17 +4626,17 @@ func (x codecSelfer1234) decSliceRole(v *[]Role, d *codec1978.Decoder) { } } - if yyj368 < len(yyv368) { - yyv368 = yyv368[:yyj368] - yyc368 = true - } else if yyj368 == 0 && yyv368 == nil { - yyv368 = []Role{} - yyc368 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Role{} + yyc1 = true } } - yyh368.End() - if yyc368 { - *v = yyv368 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -4339,10 +4645,10 @@ func (x codecSelfer1234) encSliceClusterRoleBinding(v []ClusterRoleBinding, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv372 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy373 := &yyv372 - yy373.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4352,83 +4658,86 @@ func (x codecSelfer1234) decSliceClusterRoleBinding(v *[]ClusterRoleBinding, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv374 := *v - yyh374, yyl374 := z.DecSliceHelperStart() - var yyc374 bool - if yyl374 == 0 { - if yyv374 == nil { - yyv374 = []ClusterRoleBinding{} - yyc374 = true - } else if len(yyv374) != 0 { - yyv374 = yyv374[:0] - yyc374 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []ClusterRoleBinding{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl374 > 0 { - var yyrr374, yyrl374 int - var yyrt374 bool - if yyl374 > cap(yyv374) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg374 := len(yyv374) > 0 - yyv2374 := yyv374 - yyrl374, yyrt374 = z.DecInferLen(yyl374, z.DecBasicHandle().MaxInitLen, 328) - if yyrt374 { - if yyrl374 <= cap(yyv374) { - yyv374 = yyv374[:yyrl374] + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 328) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] } else { - yyv374 = make([]ClusterRoleBinding, yyrl374) + yyv1 = make([]ClusterRoleBinding, yyrl1) } } else { - yyv374 = make([]ClusterRoleBinding, yyrl374) + yyv1 = make([]ClusterRoleBinding, yyrl1) } - yyc374 = true - yyrr374 = len(yyv374) - if yyrg374 { - copy(yyv374, yyv2374) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl374 != len(yyv374) { - yyv374 = yyv374[:yyl374] - yyc374 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj374 := 0 - for ; yyj374 < yyrr374; yyj374++ { - yyh374.ElemContainerState(yyj374) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv374[yyj374] = ClusterRoleBinding{} + yyv1[yyj1] = ClusterRoleBinding{} } else { - yyv375 := &yyv374[yyj374] - yyv375.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt374 { - for ; yyj374 < yyl374; yyj374++ { - yyv374 = append(yyv374, ClusterRoleBinding{}) - yyh374.ElemContainerState(yyj374) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ClusterRoleBinding{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv374[yyj374] = ClusterRoleBinding{} + yyv1[yyj1] = ClusterRoleBinding{} } else { - yyv376 := &yyv374[yyj374] - yyv376.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj374 := 0 - for ; !r.CheckBreak(); yyj374++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj374 >= len(yyv374) { - yyv374 = append(yyv374, ClusterRoleBinding{}) // var yyz374 ClusterRoleBinding - yyc374 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ClusterRoleBinding{}) // var yyz1 ClusterRoleBinding + yyc1 = true } - yyh374.ElemContainerState(yyj374) - if yyj374 < len(yyv374) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv374[yyj374] = ClusterRoleBinding{} + yyv1[yyj1] = ClusterRoleBinding{} } else { - yyv377 := &yyv374[yyj374] - yyv377.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -4436,17 +4745,17 @@ func (x codecSelfer1234) decSliceClusterRoleBinding(v *[]ClusterRoleBinding, d * } } - if yyj374 < len(yyv374) { - yyv374 = yyv374[:yyj374] - yyc374 = true - } else if yyj374 == 0 && yyv374 == nil { - yyv374 = []ClusterRoleBinding{} - yyc374 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ClusterRoleBinding{} + yyc1 = true } } - yyh374.End() - if yyc374 { - *v = yyv374 + yyh1.End() + if yyc1 { + *v = yyv1 } } @@ -4455,10 +4764,10 @@ func (x codecSelfer1234) encSliceClusterRole(v []ClusterRole, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv378 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy379 := &yyv378 - yy379.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4468,83 +4777,86 @@ func (x codecSelfer1234) decSliceClusterRole(v *[]ClusterRole, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv380 := *v - yyh380, yyl380 := z.DecSliceHelperStart() - var yyc380 bool - if yyl380 == 0 { - if yyv380 == nil { - yyv380 = []ClusterRole{} - yyc380 = true - } else if len(yyv380) != 0 { - yyv380 = yyv380[:0] - yyc380 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []ClusterRole{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl380 > 0 { - var yyrr380, yyrl380 int - var yyrt380 bool - if yyl380 > cap(yyv380) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg380 := len(yyv380) > 0 - yyv2380 := yyv380 - yyrl380, yyrt380 = z.DecInferLen(yyl380, z.DecBasicHandle().MaxInitLen, 280) - if yyrt380 { - if yyrl380 <= cap(yyv380) { - yyv380 = yyv380[:yyrl380] + 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 { - yyv380 = make([]ClusterRole, yyrl380) + yyv1 = make([]ClusterRole, yyrl1) } } else { - yyv380 = make([]ClusterRole, yyrl380) + yyv1 = make([]ClusterRole, yyrl1) } - yyc380 = true - yyrr380 = len(yyv380) - if yyrg380 { - copy(yyv380, yyv2380) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl380 != len(yyv380) { - yyv380 = yyv380[:yyl380] - yyc380 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj380 := 0 - for ; yyj380 < yyrr380; yyj380++ { - yyh380.ElemContainerState(yyj380) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv380[yyj380] = ClusterRole{} + yyv1[yyj1] = ClusterRole{} } else { - yyv381 := &yyv380[yyj380] - yyv381.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt380 { - for ; yyj380 < yyl380; yyj380++ { - yyv380 = append(yyv380, ClusterRole{}) - yyh380.ElemContainerState(yyj380) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ClusterRole{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv380[yyj380] = ClusterRole{} + yyv1[yyj1] = ClusterRole{} } else { - yyv382 := &yyv380[yyj380] - yyv382.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj380 := 0 - for ; !r.CheckBreak(); yyj380++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj380 >= len(yyv380) { - yyv380 = append(yyv380, ClusterRole{}) // var yyz380 ClusterRole - yyc380 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ClusterRole{}) // var yyz1 ClusterRole + yyc1 = true } - yyh380.ElemContainerState(yyj380) - if yyj380 < len(yyv380) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv380[yyj380] = ClusterRole{} + yyv1[yyj1] = ClusterRole{} } else { - yyv383 := &yyv380[yyj380] - yyv383.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -4552,16 +4864,16 @@ func (x codecSelfer1234) decSliceClusterRole(v *[]ClusterRole, d *codec1978.Deco } } - if yyj380 < len(yyv380) { - yyv380 = yyv380[:yyj380] - yyc380 = true - } else if yyj380 == 0 && yyv380 == nil { - yyv380 = []ClusterRole{} - yyc380 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ClusterRole{} + yyc1 = true } } - yyh380.End() - if yyc380 { - *v = yyv380 + yyh1.End() + if yyc1 { + *v = yyv1 } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.go similarity index 78% rename from vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types.go rename to vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.go index eefa6636b..e9f8efb3b 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types.go +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.go @@ -17,9 +17,26 @@ limitations under the License. package v1alpha1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/runtime" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// Authorization is calculated against +// 1. evaluation of ClusterRoleBindings - short circuit on match +// 2. evaluation of RoleBindings in the namespace requested - short circuit on match +// 3. deny by default + +const ( + APIGroupAll = "*" + ResourceAll = "*" + VerbAll = "*" + NonResourceAll = "*" + + GroupKind = "Group" + ServiceAccountKind = "ServiceAccount" + UserKind = "User" + + // AutoUpdateAnnotationKey is the name of an annotation which prevents reconciliation if set to "false" + AutoUpdateAnnotationKey = "rbac.authorization.kubernetes.io/autoupdate" ) // Authorization is calculated against @@ -32,22 +49,23 @@ import ( type PolicyRule struct { // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"` - // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. - // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error. - AttributeRestrictions runtime.RawExtension `json:"attributeRestrictions,omitempty" protobuf:"bytes,2,opt,name=attributeRestrictions"` // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of // the enumerated resources in any API group will be allowed. + // +optional APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,3,rep,name=apiGroups"` // Resources is a list of resources this rule applies to. ResourceAll represents all resources. + // +optional Resources []string `json:"resources,omitempty" protobuf:"bytes,4,rep,name=resources"` // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + // +optional ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,5,rep,name=resourceNames"` // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. + // +optional NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,6,rep,name=nonResourceURLs"` } @@ -57,12 +75,17 @@ type Subject struct { // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". // If the Authorizer does not recognized the kind value, the Authorizer should report an error. Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` - // APIVersion holds the API group and version of the referenced object. + // APIVersion holds the API group and version of the referenced subject. + // Defaults to "v1" for ServiceAccount subjects. + // Defaults to "rbac.authorization.k8s.io/v1alpha1" for User and Group subjects. + // +k8s:conversion-gen=false + // +optional APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt.name=apiVersion"` // Name of the object being referenced. Name string `json:"name" protobuf:"bytes,3,opt,name=name"` // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty // the Authorizer should report an error. + // +optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"` } @@ -80,9 +103,10 @@ type RoleRef struct { // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. type Role struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Rules holds all the PolicyRules for this Role Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` @@ -94,9 +118,10 @@ type Role struct { // It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given // namespace only have effect in that namespace. type RoleBinding struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Subjects holds references to the objects the role applies to. Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` @@ -108,9 +133,10 @@ type RoleBinding struct { // RoleBindingList is a collection of RoleBindings type RoleBindingList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is a list of RoleBindings Items []RoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"` @@ -118,9 +144,10 @@ type RoleBindingList struct { // RoleList is a collection of Roles type RoleList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is a list of Roles Items []Role `json:"items" protobuf:"bytes,2,rep,name=items"` @@ -131,9 +158,10 @@ type RoleList struct { // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. type ClusterRole struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Rules holds all the PolicyRules for this ClusterRole Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` @@ -145,9 +173,10 @@ type ClusterRole struct { // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, // and adds who information via Subject. type ClusterRoleBinding struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Subjects holds references to the objects the role applies to. Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` @@ -159,9 +188,10 @@ type ClusterRoleBinding struct { // ClusterRoleBindingList is a collection of ClusterRoleBindings type ClusterRoleBindingList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is a list of ClusterRoleBindings Items []ClusterRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"` @@ -169,9 +199,10 @@ type ClusterRoleBindingList struct { // ClusterRoleList is a collection of ClusterRoles type ClusterRoleList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is a list of ClusterRoles Items []ClusterRole `json:"items" protobuf:"bytes,2,rep,name=items"` diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go similarity index 77% rename from vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go rename to vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go index 633bae979..d58a722af 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go @@ -69,13 +69,12 @@ func (ClusterRoleList) SwaggerDoc() map[string]string { } var map_PolicyRule = map[string]string{ - "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", - "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", - "attributeRestrictions": "AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.", - "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", - "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", - "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", + "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", } func (PolicyRule) SwaggerDoc() map[string]string { @@ -137,7 +136,7 @@ func (RoleRef) SwaggerDoc() map[string]string { var map_Subject = map[string]string{ "": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", "kind": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", - "apiVersion": "APIVersion holds the API group and version of the referenced object.", + "apiVersion": "APIVersion holds the API group and version of the referenced subject. Defaults to \"v1\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io/v1alpha1\" for User and Group subjects.", "name": "Name of the object being referenced.", "namespace": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go similarity index 62% rename from vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go rename to vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go index 49e957994..1471d529f 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ limitations under the License. package v1alpha1 import ( - api "k8s.io/client-go/1.5/pkg/api" - rbac "k8s.io/client-go/1.5/pkg/apis/rbac" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + rbac "k8s.io/client-go/pkg/apis/rbac" + unsafe "unsafe" ) func init() { @@ -39,12 +39,16 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole, Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding, Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding, + Convert_v1alpha1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder, + Convert_rbac_ClusterRoleBindingBuilder_To_v1alpha1_ClusterRoleBindingBuilder, Convert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList, Convert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList, Convert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList, Convert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList, Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule, Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule, + Convert_v1alpha1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder, + Convert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder, Convert_v1alpha1_Role_To_rbac_Role, Convert_rbac_Role_To_v1alpha1_Role, Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding, @@ -61,24 +65,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]rbac.PolicyRule, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Rules = nil - } + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules)) return nil } @@ -87,23 +75,11 @@ func Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac } func autoConvert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]PolicyRule, len(*in)) - for i := range *in { - if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } + out.ObjectMeta = in.ObjectMeta + if in.Rules == nil { + out.Rules = make([]PolicyRule, 0) } else { - out.Rules = nil + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) } return nil } @@ -113,13 +89,7 @@ func Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out } func autoConvert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]rbac.Subject, len(*in)) @@ -142,13 +112,7 @@ func Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterR } func autoConvert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) @@ -158,7 +122,7 @@ func autoConvert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in *rbac } } } else { - out.Subjects = nil + out.Subjects = make([]Subject, 0) } if err := Convert_rbac_RoleRef_To_v1alpha1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil { return err @@ -170,13 +134,30 @@ func Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in *rbac.Clu return autoConvert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in, out, s) } +func autoConvert_v1alpha1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error { + if err := Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil { + return err + } + return nil +} + +func Convert_v1alpha1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error { + return autoConvert_v1alpha1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in, out, s) +} + +func autoConvert_rbac_ClusterRoleBindingBuilder_To_v1alpha1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error { + if err := Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil { + return err + } + return nil +} + +func Convert_rbac_ClusterRoleBindingBuilder_To_v1alpha1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error { + return autoConvert_rbac_ClusterRoleBindingBuilder_To_v1alpha1_ClusterRoleBindingBuilder(in, out, s) +} + func autoConvert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error { - 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 - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]rbac.ClusterRoleBinding, len(*in)) @@ -196,12 +177,7 @@ func Convert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in * } func autoConvert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ClusterRoleBinding, len(*in)) @@ -211,7 +187,7 @@ func autoConvert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList( } } } else { - out.Items = nil + out.Items = make([]ClusterRoleBinding, 0) } return nil } @@ -221,23 +197,8 @@ func Convert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in * } func autoConvert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]rbac.ClusterRole, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.ListMeta = in.ListMeta + out.Items = *(*[]rbac.ClusterRole)(unsafe.Pointer(&in.Items)) return nil } @@ -246,22 +207,11 @@ func Convert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleLis } func autoConvert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterRole, len(*in)) - for i := range *in { - if err := Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]ClusterRole, 0) } else { - out.Items = nil + out.Items = *(*[]ClusterRole)(unsafe.Pointer(&in.Items)) } return nil } @@ -271,14 +221,11 @@ func Convert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in *rbac.ClusterRo } func autoConvert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error { - out.Verbs = in.Verbs - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.AttributeRestrictions, &out.AttributeRestrictions, s); err != nil { - return err - } - out.APIGroups = in.APIGroups - out.Resources = in.Resources - out.ResourceNames = in.ResourceNames - out.NonResourceURLs = in.NonResourceURLs + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups)) + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) return nil } @@ -287,14 +234,15 @@ func Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.Po } func autoConvert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error { - out.Verbs = in.Verbs - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.AttributeRestrictions, &out.AttributeRestrictions, s); err != nil { - return err + if in.Verbs == nil { + out.Verbs = make([]string, 0) + } else { + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) } - out.APIGroups = in.APIGroups - out.Resources = in.Resources - out.ResourceNames = in.ResourceNames - out.NonResourceURLs = in.NonResourceURLs + out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups)) + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) return nil } @@ -302,25 +250,31 @@ func Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in *rbac.PolicyRule, out *Po return autoConvert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in, out, s) } +func autoConvert_v1alpha1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error { + if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil { + return err + } + return nil +} + +func Convert_v1alpha1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error { + return autoConvert_v1alpha1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in, out, s) +} + +func autoConvert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error { + if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil { + return err + } + return nil +} + +func Convert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error { + return autoConvert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder(in, out, s) +} + func autoConvert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]rbac.PolicyRule, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Rules = nil - } + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules)) return nil } @@ -329,23 +283,11 @@ func Convert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.S } func autoConvert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]PolicyRule, len(*in)) - for i := range *in { - if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } + out.ObjectMeta = in.ObjectMeta + if in.Rules == nil { + out.Rules = make([]PolicyRule, 0) } else { - out.Rules = nil + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) } return nil } @@ -355,13 +297,7 @@ func Convert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.S } func autoConvert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]rbac.Subject, len(*in)) @@ -384,13 +320,7 @@ func Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac } func autoConvert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) @@ -400,7 +330,7 @@ func autoConvert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in *rbac.RoleBinding, } } } else { - out.Subjects = nil + out.Subjects = make([]Subject, 0) } if err := Convert_rbac_RoleRef_To_v1alpha1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil { return err @@ -413,12 +343,7 @@ func Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in *rbac.RoleBinding, out } func autoConvert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]rbac.RoleBinding, len(*in)) @@ -438,12 +363,7 @@ func Convert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingLis } func autoConvert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } + out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]RoleBinding, len(*in)) @@ -453,7 +373,7 @@ func autoConvert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in *rbac.RoleB } } } else { - out.Items = nil + out.Items = make([]RoleBinding, 0) } return nil } @@ -463,23 +383,8 @@ func Convert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in *rbac.RoleBindi } func autoConvert_v1alpha1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]rbac.Role, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_Role_To_rbac_Role(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.ListMeta = in.ListMeta + out.Items = *(*[]rbac.Role)(unsafe.Pointer(&in.Items)) return nil } @@ -488,22 +393,11 @@ func Convert_v1alpha1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList } func autoConvert_rbac_RoleList_To_v1alpha1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Role, len(*in)) - for i := range *in { - if err := Convert_rbac_Role_To_v1alpha1_Role(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]Role, 0) } else { - out.Items = nil + out.Items = *(*[]Role)(unsafe.Pointer(&in.Items)) } return nil } @@ -536,24 +430,16 @@ func Convert_rbac_RoleRef_To_v1alpha1_RoleRef(in *rbac.RoleRef, out *RoleRef, s func autoConvert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error { out.Kind = in.Kind - out.APIVersion = in.APIVersion + // INFO: in.APIVersion opted out of conversion generation out.Name = in.Name out.Namespace = in.Namespace return nil } -func Convert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error { - return autoConvert_v1alpha1_Subject_To_rbac_Subject(in, out, s) -} - func autoConvert_rbac_Subject_To_v1alpha1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error { out.Kind = in.Kind - out.APIVersion = in.APIVersion + // WARNING: in.APIGroup requires manual conversion: does not exist in peer-type out.Name = in.Name out.Namespace = in.Namespace return nil } - -func Convert_rbac_Subject_To_v1alpha1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error { - return autoConvert_rbac_Subject_To_v1alpha1_Subject(in, out, s) -} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go similarity index 79% rename from vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go index f8dd0b8a0..f4dfd3ca7 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,9 +21,9 @@ limitations under the License. package v1alpha1 import ( - v1 "k8s.io/client-go/1.5/pkg/api/v1" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" reflect "reflect" ) @@ -53,9 +53,11 @@ func DeepCopy_v1alpha1_ClusterRole(in interface{}, out interface{}, c *conversio { in := in.(*ClusterRole) out := out.(*ClusterRole) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -65,8 +67,6 @@ func DeepCopy_v1alpha1_ClusterRole(in interface{}, out interface{}, c *conversio return err } } - } else { - out.Rules = nil } return nil } @@ -76,20 +76,17 @@ func DeepCopy_v1alpha1_ClusterRoleBinding(in interface{}, out interface{}, c *co { in := in.(*ClusterRoleBinding) out := out.(*ClusterRoleBinding) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Subjects = nil + copy(*out, *in) } - out.RoleRef = in.RoleRef return nil } } @@ -98,8 +95,7 @@ func DeepCopy_v1alpha1_ClusterRoleBindingList(in interface{}, out interface{}, c { in := in.(*ClusterRoleBindingList) out := out.(*ClusterRoleBindingList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ClusterRoleBinding, len(*in)) @@ -108,8 +104,6 @@ func DeepCopy_v1alpha1_ClusterRoleBindingList(in interface{}, out interface{}, c return err } } - } else { - out.Items = nil } return nil } @@ -119,8 +113,7 @@ func DeepCopy_v1alpha1_ClusterRoleList(in interface{}, out interface{}, c *conve { in := in.(*ClusterRoleList) out := out.(*ClusterRoleList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ClusterRole, len(*in)) @@ -129,8 +122,6 @@ func DeepCopy_v1alpha1_ClusterRoleList(in interface{}, out interface{}, c *conve return err } } - } else { - out.Items = nil } return nil } @@ -140,43 +131,31 @@ func DeepCopy_v1alpha1_PolicyRule(in interface{}, out interface{}, c *conversion { in := in.(*PolicyRule) out := out.(*PolicyRule) + *out = *in if in.Verbs != nil { in, out := &in.Verbs, &out.Verbs *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Verbs = nil - } - if err := runtime.DeepCopy_runtime_RawExtension(&in.AttributeRestrictions, &out.AttributeRestrictions, c); err != nil { - return err } if in.APIGroups != nil { in, out := &in.APIGroups, &out.APIGroups *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.APIGroups = nil } if in.Resources != nil { in, out := &in.Resources, &out.Resources *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Resources = nil } if in.ResourceNames != nil { in, out := &in.ResourceNames, &out.ResourceNames *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.ResourceNames = nil } if in.NonResourceURLs != nil { in, out := &in.NonResourceURLs, &out.NonResourceURLs *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.NonResourceURLs = nil } return nil } @@ -186,9 +165,11 @@ func DeepCopy_v1alpha1_Role(in interface{}, out interface{}, c *conversion.Clone { in := in.(*Role) out := out.(*Role) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -198,8 +179,6 @@ func DeepCopy_v1alpha1_Role(in interface{}, out interface{}, c *conversion.Clone return err } } - } else { - out.Rules = nil } return nil } @@ -209,20 +188,17 @@ func DeepCopy_v1alpha1_RoleBinding(in interface{}, out interface{}, c *conversio { in := in.(*RoleBinding) out := out.(*RoleBinding) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Subjects = nil + copy(*out, *in) } - out.RoleRef = in.RoleRef return nil } } @@ -231,8 +207,7 @@ func DeepCopy_v1alpha1_RoleBindingList(in interface{}, out interface{}, c *conve { in := in.(*RoleBindingList) out := out.(*RoleBindingList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]RoleBinding, len(*in)) @@ -241,8 +216,6 @@ func DeepCopy_v1alpha1_RoleBindingList(in interface{}, out interface{}, c *conve return err } } - } else { - out.Items = nil } return nil } @@ -252,8 +225,7 @@ func DeepCopy_v1alpha1_RoleList(in interface{}, out interface{}, c *conversion.C { in := in.(*RoleList) out := out.(*RoleList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Role, len(*in)) @@ -262,8 +234,6 @@ func DeepCopy_v1alpha1_RoleList(in interface{}, out interface{}, c *conversion.C return err } } - } else { - out.Items = nil } return nil } @@ -273,9 +243,7 @@ func DeepCopy_v1alpha1_RoleRef(in interface{}, out interface{}, c *conversion.Cl { in := in.(*RoleRef) out := out.(*RoleRef) - out.APIGroup = in.APIGroup - out.Kind = in.Kind - out.Name = in.Name + *out = *in return nil } } @@ -284,10 +252,7 @@ func DeepCopy_v1alpha1_Subject(in interface{}, out interface{}, c *conversion.Cl { in := in.(*Subject) out := out.(*Subject) - out.Kind = in.Kind - out.APIVersion = in.APIVersion - out.Name = in.Name - out.Namespace = in.Namespace + *out = *in return nil } } diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.defaults.go new file mode 100644 index 000000000..1a5749be3 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,66 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&ClusterRoleBinding{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBinding(obj.(*ClusterRoleBinding)) }) + scheme.AddTypeDefaultingFunc(&ClusterRoleBindingList{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBindingList(obj.(*ClusterRoleBindingList)) }) + scheme.AddTypeDefaultingFunc(&RoleBinding{}, func(obj interface{}) { SetObjectDefaults_RoleBinding(obj.(*RoleBinding)) }) + scheme.AddTypeDefaultingFunc(&RoleBindingList{}, func(obj interface{}) { SetObjectDefaults_RoleBindingList(obj.(*RoleBindingList)) }) + return nil +} + +func SetObjectDefaults_ClusterRoleBinding(in *ClusterRoleBinding) { + SetDefaults_ClusterRoleBinding(in) + for i := range in.Subjects { + a := &in.Subjects[i] + SetDefaults_Subject(a) + } +} + +func SetObjectDefaults_ClusterRoleBindingList(in *ClusterRoleBindingList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ClusterRoleBinding(a) + } +} + +func SetObjectDefaults_RoleBinding(in *RoleBinding) { + SetDefaults_RoleBinding(in) + for i := range in.Subjects { + a := &in.Subjects[i] + SetDefaults_Subject(a) + } +} + +func SetObjectDefaults_RoleBindingList(in *RoleBindingList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_RoleBinding(a) + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/defaults.go new file mode 100644 index 000000000..6c29ae500 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/defaults.go @@ -0,0 +1,53 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + RegisterDefaults(scheme) + return scheme.AddDefaultingFuncs( + SetDefaults_ClusterRoleBinding, + SetDefaults_RoleBinding, + SetDefaults_Subject, + ) +} + +func SetDefaults_ClusterRoleBinding(obj *ClusterRoleBinding) { + if len(obj.RoleRef.APIGroup) == 0 { + obj.RoleRef.APIGroup = GroupName + } +} +func SetDefaults_RoleBinding(obj *RoleBinding) { + if len(obj.RoleRef.APIGroup) == 0 { + obj.RoleRef.APIGroup = GroupName + } +} +func SetDefaults_Subject(obj *Subject) { + if len(obj.APIGroup) == 0 { + switch obj.Kind { + case ServiceAccountKind: + obj.APIGroup = "" + case UserKind: + obj.APIGroup = GroupName + case GroupKind: + obj.APIGroup = GroupName + } + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/doc.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/doc.go new file mode 100644 index 000000000..a9ad4296e --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +groupName=rbac.authorization.k8s.io +package v1beta1 diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.pb.go new file mode 100644 index 000000000..5f553a57e --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.pb.go @@ -0,0 +1,2816 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. +// source: k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto +// DO NOT EDIT! + +/* + Package v1beta1 is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto + + It has these top-level messages: + ClusterRole + ClusterRoleBinding + ClusterRoleBindingBuilder + ClusterRoleBindingList + ClusterRoleList + PolicyRule + PolicyRuleBuilder + Role + RoleBinding + RoleBindingList + RoleList + RoleRef + Subject +*/ +package v1beta1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strings "strings" +import reflect "reflect" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +const _ = proto.GoGoProtoPackageIsVersion1 + +func (m *ClusterRole) Reset() { *m = ClusterRole{} } +func (*ClusterRole) ProtoMessage() {} +func (*ClusterRole) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } +func (*ClusterRoleBinding) ProtoMessage() {} +func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func (m *ClusterRoleBindingBuilder) Reset() { *m = ClusterRoleBindingBuilder{} } +func (*ClusterRoleBindingBuilder) ProtoMessage() {} +func (*ClusterRoleBindingBuilder) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{2} +} + +func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } +func (*ClusterRoleBindingList) ProtoMessage() {} +func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } + +func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } +func (*ClusterRoleList) ProtoMessage() {} +func (*ClusterRoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } + +func (m *PolicyRule) Reset() { *m = PolicyRule{} } +func (*PolicyRule) ProtoMessage() {} +func (*PolicyRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + +func (m *PolicyRuleBuilder) Reset() { *m = PolicyRuleBuilder{} } +func (*PolicyRuleBuilder) ProtoMessage() {} +func (*PolicyRuleBuilder) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } + +func (m *Role) Reset() { *m = Role{} } +func (*Role) ProtoMessage() {} +func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } + +func (m *RoleBinding) Reset() { *m = RoleBinding{} } +func (*RoleBinding) ProtoMessage() {} +func (*RoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } + +func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } +func (*RoleBindingList) ProtoMessage() {} +func (*RoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } + +func (m *RoleList) Reset() { *m = RoleList{} } +func (*RoleList) ProtoMessage() {} +func (*RoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } + +func (m *RoleRef) Reset() { *m = RoleRef{} } +func (*RoleRef) ProtoMessage() {} +func (*RoleRef) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } + +func (m *Subject) Reset() { *m = Subject{} } +func (*Subject) ProtoMessage() {} +func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } + +func init() { + proto.RegisterType((*ClusterRole)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRole") + proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRoleBinding") + proto.RegisterType((*ClusterRoleBindingBuilder)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRoleBindingBuilder") + proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRoleBindingList") + proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRoleList") + proto.RegisterType((*PolicyRule)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.PolicyRule") + proto.RegisterType((*PolicyRuleBuilder)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.PolicyRuleBuilder") + proto.RegisterType((*Role)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.Role") + proto.RegisterType((*RoleBinding)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.RoleBinding") + proto.RegisterType((*RoleBindingList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.RoleBindingList") + proto.RegisterType((*RoleList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.RoleList") + proto.RegisterType((*RoleRef)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.RoleRef") + proto.RegisterType((*Subject)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.Subject") +} +func (m *ClusterRole) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRole) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n1, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + if len(m.Rules) > 0 { + for _, msg := range m.Rules { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ClusterRoleBinding) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRoleBinding) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n2, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + if len(m.Subjects) > 0 { + for _, msg := range m.Subjects { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.RoleRef.Size())) + n3, err := m.RoleRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + return i, nil +} + +func (m *ClusterRoleBindingBuilder) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRoleBindingBuilder) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ClusterRoleBinding.Size())) + n4, err := m.ClusterRoleBinding.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + return i, nil +} + +func (m *ClusterRoleBindingList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRoleBindingList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n5, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ClusterRoleList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRoleList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n6, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *PolicyRule) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PolicyRule) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Verbs) > 0 { + for _, s := range m.Verbs { + data[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.APIGroups) > 0 { + for _, s := range m.APIGroups { + data[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.Resources) > 0 { + for _, s := range m.Resources { + data[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.ResourceNames) > 0 { + for _, s := range m.ResourceNames { + data[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.NonResourceURLs) > 0 { + for _, s := range m.NonResourceURLs { + data[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + return i, nil +} + +func (m *PolicyRuleBuilder) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PolicyRuleBuilder) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.PolicyRule.Size())) + n7, err := m.PolicyRule.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + return i, nil +} + +func (m *Role) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Role) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n8, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n8 + if len(m.Rules) > 0 { + for _, msg := range m.Rules { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *RoleBinding) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RoleBinding) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n9, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + if len(m.Subjects) > 0 { + for _, msg := range m.Subjects { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.RoleRef.Size())) + n10, err := m.RoleRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n10 + return i, nil +} + +func (m *RoleBindingList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RoleBindingList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n11, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n11 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *RoleList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RoleList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n12, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n12 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *RoleRef) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RoleRef) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.APIGroup))) + i += copy(data[i:], m.APIGroup) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) + i += copy(data[i:], m.Kind) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + return i, nil +} + +func (m *Subject) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Subject) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) + i += copy(data[i:], m.Kind) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.APIGroup))) + i += copy(data[i:], m.APIGroup) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Namespace))) + i += copy(data[i:], m.Namespace) + return i, nil +} + +func encodeFixed64Generated(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Generated(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintGenerated(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} +func (m *ClusterRole) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ClusterRoleBinding) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Subjects) > 0 { + for _, e := range m.Subjects { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.RoleRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ClusterRoleBindingBuilder) Size() (n int) { + var l int + _ = l + l = m.ClusterRoleBinding.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ClusterRoleBindingList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ClusterRoleList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PolicyRule) Size() (n int) { + var l int + _ = l + if len(m.Verbs) > 0 { + for _, s := range m.Verbs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.APIGroups) > 0 { + for _, s := range m.APIGroups { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Resources) > 0 { + for _, s := range m.Resources { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.ResourceNames) > 0 { + for _, s := range m.ResourceNames { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.NonResourceURLs) > 0 { + for _, s := range m.NonResourceURLs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PolicyRuleBuilder) Size() (n int) { + var l int + _ = l + l = m.PolicyRule.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Role) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *RoleBinding) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Subjects) > 0 { + for _, e := range m.Subjects { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.RoleRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *RoleBindingList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *RoleList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *RoleRef) Size() (n int) { + var l int + _ = l + l = len(m.APIGroup) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Subject) Size() (n int) { + var l int + _ = l + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.APIGroup) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *ClusterRole) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRole{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterRoleBinding) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRoleBinding{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`, + `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterRoleBindingBuilder) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRoleBindingBuilder{`, + `ClusterRoleBinding:` + strings.Replace(strings.Replace(this.ClusterRoleBinding.String(), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterRoleBindingList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRoleBindingList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterRoleList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRoleList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRole", "ClusterRole", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *PolicyRule) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PolicyRule{`, + `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, + `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`, + `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`, + `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, + `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`, + `}`, + }, "") + return s +} +func (this *PolicyRuleBuilder) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PolicyRuleBuilder{`, + `PolicyRule:` + strings.Replace(strings.Replace(this.PolicyRule.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Role) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Role{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RoleBinding) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RoleBinding{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`, + `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RoleBindingList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RoleBindingList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RoleBinding", "RoleBinding", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RoleList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RoleList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Role", "Role", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RoleRef) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RoleRef{`, + `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *Subject) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subject{`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *ClusterRole) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rules = append(m.Rules, PolicyRule{}) + if err := m.Rules[len(m.Rules)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterRoleBinding) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subjects = append(m.Subjects, Subject{}) + if err := m.Subjects[len(m.Subjects)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RoleRef.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterRoleBindingBuilder) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRoleBindingBuilder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRoleBindingBuilder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClusterRoleBinding", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ClusterRoleBinding.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterRoleBindingList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRoleBindingList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ClusterRoleBinding{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterRoleList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRoleList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRoleList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ClusterRole{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PolicyRule) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verbs = append(m.Verbs, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIGroups = append(m.APIGroups, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceNames = append(m.ResourceNames, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonResourceURLs = append(m.NonResourceURLs, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PolicyRuleBuilder) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PolicyRuleBuilder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PolicyRuleBuilder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyRule", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PolicyRule.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Role) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Role: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rules = append(m.Rules, PolicyRule{}) + if err := m.Rules[len(m.Rules)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoleBinding) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subjects = append(m.Subjects, Subject{}) + if err := m.Subjects[len(m.Subjects)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RoleRef.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoleBindingList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoleBindingList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, RoleBinding{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoleList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoleList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoleList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Role{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoleRef) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoleRef: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoleRef: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIGroup = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Subject) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Subject: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIGroup = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorGenerated = []byte{ + // 830 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x54, 0xbf, 0x8f, 0xe3, 0x44, + 0x14, 0xce, 0x64, 0x13, 0x6d, 0x3c, 0xcb, 0x2a, 0xec, 0x20, 0x21, 0x93, 0xc2, 0x89, 0xdc, 0xb0, + 0x88, 0x3b, 0xfb, 0xf6, 0xee, 0xc4, 0x21, 0x21, 0x0a, 0x4c, 0x81, 0x4e, 0x1c, 0xcb, 0x69, 0x10, + 0x88, 0x5f, 0x42, 0x37, 0x71, 0xe6, 0xbc, 0x43, 0xfc, 0x4b, 0x33, 0xe3, 0x88, 0x13, 0x14, 0x74, + 0xb4, 0xfc, 0x13, 0x74, 0xd7, 0xd1, 0x52, 0x51, 0x2d, 0x54, 0x57, 0x6e, 0x15, 0xb1, 0xe6, 0x0f, + 0x01, 0xd9, 0x1e, 0xff, 0x08, 0x4e, 0xd8, 0xb0, 0x48, 0x91, 0x90, 0xa8, 0x92, 0x79, 0xef, 0xfb, + 0xde, 0xbc, 0xef, 0xbd, 0xf1, 0x07, 0xef, 0xcd, 0x5f, 0x17, 0x16, 0x8b, 0xec, 0x79, 0x32, 0xa5, + 0x3c, 0xa4, 0x92, 0x0a, 0x3b, 0x9e, 0x7b, 0x36, 0x89, 0x99, 0xb0, 0xf9, 0x94, 0xb8, 0xf6, 0xe2, + 0x64, 0x4a, 0x25, 0x39, 0xb1, 0x3d, 0x1a, 0x52, 0x4e, 0x24, 0x9d, 0x59, 0x31, 0x8f, 0x64, 0x84, + 0x5e, 0x2e, 0x88, 0x56, 0x4d, 0xb4, 0xe2, 0xb9, 0x67, 0x65, 0x44, 0x2b, 0x23, 0x5a, 0x8a, 0x38, + 0xba, 0xe9, 0x31, 0x79, 0x96, 0x4c, 0x2d, 0x37, 0x0a, 0x6c, 0x2f, 0xf2, 0x22, 0x3b, 0xe7, 0x4f, + 0x93, 0xc7, 0xf9, 0x29, 0x3f, 0xe4, 0xff, 0x8a, 0xba, 0xa3, 0xbb, 0xaa, 0x21, 0x12, 0xb3, 0x80, + 0xb8, 0x67, 0x2c, 0xa4, 0xfc, 0x49, 0xdd, 0x52, 0x40, 0x25, 0xb1, 0x17, 0xad, 0x6e, 0x46, 0xf6, + 0x26, 0x16, 0x4f, 0x42, 0xc9, 0x02, 0xda, 0x22, 0xbc, 0x76, 0x15, 0x41, 0xb8, 0x67, 0x34, 0x20, + 0x2d, 0xde, 0x9d, 0x4d, 0xbc, 0x44, 0x32, 0xdf, 0x66, 0xa1, 0x14, 0x92, 0xb7, 0x48, 0x0d, 0x4d, + 0x82, 0xf2, 0x05, 0xe5, 0xb5, 0x20, 0xfa, 0x15, 0x09, 0x62, 0x9f, 0xae, 0xd3, 0x74, 0x63, 0xe3, + 0x6a, 0xd6, 0xa0, 0xcd, 0x5f, 0x00, 0x3c, 0x78, 0xdb, 0x4f, 0x84, 0xa4, 0x1c, 0x47, 0x3e, 0x45, + 0x8f, 0xe0, 0x20, 0x1b, 0xd6, 0x8c, 0x48, 0xa2, 0x83, 0x09, 0x38, 0x3e, 0xb8, 0x7d, 0xcb, 0x52, + 0x2b, 0x6b, 0xf6, 0x5e, 0x2f, 0x2d, 0x43, 0x5b, 0x8b, 0x13, 0xeb, 0xfd, 0xe9, 0x97, 0xd4, 0x95, + 0xef, 0x51, 0x49, 0x1c, 0x74, 0xbe, 0x1c, 0x77, 0xd2, 0xe5, 0x18, 0xd6, 0x31, 0x5c, 0x55, 0x45, + 0x1f, 0xc3, 0x3e, 0x4f, 0x7c, 0x2a, 0xf4, 0xee, 0x64, 0xef, 0xf8, 0xe0, 0xf6, 0x1d, 0x6b, 0xcb, + 0x17, 0x61, 0x3d, 0x8c, 0x7c, 0xe6, 0x3e, 0xc1, 0x89, 0x4f, 0x9d, 0x43, 0x75, 0x43, 0x3f, 0x3b, + 0x09, 0x5c, 0x14, 0x34, 0x7f, 0xec, 0x42, 0xd4, 0xd0, 0xe2, 0xb0, 0x70, 0xc6, 0x42, 0x6f, 0x07, + 0x92, 0xbe, 0x80, 0x03, 0x91, 0xe4, 0x89, 0x52, 0xd5, 0xad, 0xad, 0x55, 0x7d, 0x50, 0x10, 0x9d, + 0xe7, 0xd5, 0x0d, 0x03, 0x15, 0x10, 0xb8, 0xaa, 0x89, 0x3e, 0x83, 0xfb, 0x3c, 0xf2, 0x29, 0xa6, + 0x8f, 0xf5, 0xbd, 0x55, 0x01, 0x57, 0x96, 0xc7, 0x05, 0xcf, 0x19, 0xaa, 0xf2, 0xfb, 0x2a, 0x80, + 0xcb, 0x8a, 0xe6, 0x0f, 0x00, 0xbe, 0xd4, 0x9e, 0x9a, 0x93, 0x30, 0x7f, 0x46, 0x39, 0xfa, 0x0e, + 0x40, 0xe4, 0xb6, 0xb2, 0x6a, 0x8e, 0x6f, 0x6c, 0xdd, 0xc6, 0x9a, 0x0b, 0x46, 0xaa, 0xa3, 0x35, + 0x2b, 0xc3, 0x6b, 0xae, 0x34, 0x2f, 0x00, 0x7c, 0xb1, 0x0d, 0x7d, 0xc0, 0x84, 0x44, 0x9f, 0xb7, + 0x36, 0x6c, 0x6d, 0xb7, 0xe1, 0x8c, 0x9d, 0xef, 0xb7, 0x9a, 0x7e, 0x19, 0x69, 0x6c, 0xf7, 0x11, + 0xec, 0x33, 0x49, 0x83, 0x72, 0xb5, 0xff, 0x4a, 0x74, 0xf5, 0x70, 0xef, 0x67, 0x15, 0x71, 0x51, + 0xd8, 0xfc, 0x15, 0xc0, 0x61, 0x03, 0xbc, 0x03, 0x4d, 0x9f, 0xac, 0x6a, 0xba, 0x7b, 0x2d, 0x4d, + 0xeb, 0xc5, 0xfc, 0x01, 0x20, 0xac, 0x3f, 0x55, 0x34, 0x86, 0xfd, 0x05, 0xe5, 0x53, 0xa1, 0x83, + 0xc9, 0xde, 0xb1, 0xe6, 0x68, 0x19, 0xfe, 0xa3, 0x2c, 0x80, 0x8b, 0x38, 0x7a, 0x15, 0x6a, 0x24, + 0x66, 0xef, 0xf0, 0x28, 0x89, 0x8b, 0x76, 0x34, 0xe7, 0x30, 0x5d, 0x8e, 0xb5, 0xb7, 0x1e, 0xde, + 0x2f, 0x82, 0xb8, 0xce, 0x67, 0x60, 0x4e, 0x45, 0x94, 0x70, 0x97, 0x0a, 0x7d, 0xaf, 0x06, 0xe3, + 0x32, 0x88, 0xeb, 0x3c, 0xba, 0x07, 0x0f, 0xcb, 0xc3, 0x29, 0x09, 0xa8, 0xd0, 0x7b, 0x39, 0xe1, + 0x28, 0x5d, 0x8e, 0x0f, 0x71, 0x33, 0x81, 0x57, 0x71, 0xe8, 0x4d, 0x38, 0x0c, 0xa3, 0xb0, 0x84, + 0x7c, 0x88, 0x1f, 0x08, 0xbd, 0x9f, 0x53, 0x5f, 0x48, 0x97, 0xe3, 0xe1, 0xe9, 0x6a, 0x0a, 0xff, + 0x15, 0x6b, 0x7e, 0x03, 0x8f, 0x1a, 0x5e, 0xa5, 0x3e, 0x24, 0x0f, 0xc2, 0xb8, 0x0a, 0xaa, 0x8d, + 0x5e, 0xcb, 0xfb, 0x2a, 0x2b, 0xaa, 0x63, 0xb8, 0x51, 0xda, 0xfc, 0x19, 0xc0, 0xde, 0x7f, 0xde, + 0xca, 0x9f, 0x76, 0xe1, 0xc1, 0xff, 0x1e, 0xbe, 0xb5, 0x87, 0x67, 0x06, 0xb2, 0x5b, 0x53, 0xbc, + 0xb6, 0x81, 0x5c, 0xed, 0x86, 0x3f, 0x01, 0x38, 0xd8, 0x91, 0x0d, 0xe2, 0x55, 0x15, 0x37, 0xff, + 0x99, 0x8a, 0xf5, 0xed, 0x7f, 0x0d, 0xcb, 0xfd, 0xa0, 0x1b, 0x70, 0x50, 0x5a, 0x57, 0xde, 0xbc, + 0x56, 0x37, 0x53, 0xba, 0x1b, 0xae, 0x10, 0x68, 0x02, 0x7b, 0x73, 0x16, 0xce, 0xf4, 0x6e, 0x8e, + 0x7c, 0x4e, 0x21, 0x7b, 0xef, 0xb2, 0x70, 0x86, 0xf3, 0x4c, 0x86, 0x08, 0x49, 0x40, 0xf3, 0x07, + 0xd4, 0x40, 0x64, 0xa6, 0x85, 0xf3, 0x8c, 0xf9, 0x14, 0xc0, 0x7d, 0xf5, 0xf8, 0xaa, 0x7a, 0x60, + 0x63, 0xbd, 0x66, 0x7f, 0xdd, 0x6d, 0xfa, 0xfb, 0xfb, 0xdb, 0x91, 0x0d, 0xb5, 0xec, 0x57, 0xc4, + 0xc4, 0xa5, 0x7a, 0x2f, 0x87, 0x1d, 0x29, 0x98, 0x76, 0x5a, 0x26, 0x70, 0x8d, 0x71, 0x5e, 0x39, + 0xbf, 0x34, 0x3a, 0xcf, 0x2e, 0x8d, 0xce, 0xc5, 0xa5, 0xd1, 0xf9, 0x36, 0x35, 0xc0, 0x79, 0x6a, + 0x80, 0x67, 0xa9, 0x01, 0x7e, 0x4b, 0x0d, 0xf0, 0xfd, 0xef, 0x46, 0xe7, 0xd3, 0x7d, 0x35, 0xf1, + 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x96, 0xa1, 0xd4, 0x72, 0x0c, 0x00, 0x00, +} diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.proto new file mode 100644 index 000000000..542e2b027 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.proto @@ -0,0 +1,200 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.kubernetes.pkg.apis.rbac.v1beta1; + +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1beta1"; + +// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. +message ClusterRole { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Rules holds all the PolicyRules for this ClusterRole + repeated PolicyRule rules = 2; +} + +// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, +// and adds who information via Subject. +message ClusterRoleBinding { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Subjects holds references to the objects the role applies to. + repeated Subject subjects = 2; + + // RoleRef can only reference a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + optional RoleRef roleRef = 3; +} + +// +k8s:deepcopy-gen=false +// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types. +// We use it to construct bindings in code. It's more compact than trying to write them +// out in a literal. +message ClusterRoleBindingBuilder { + optional ClusterRoleBinding clusterRoleBinding = 1; +} + +// ClusterRoleBindingList is a collection of ClusterRoleBindings +message ClusterRoleBindingList { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is a list of ClusterRoleBindings + repeated ClusterRoleBinding items = 2; +} + +// ClusterRoleList is a collection of ClusterRoles +message ClusterRoleList { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is a list of ClusterRoles + repeated ClusterRole items = 2; +} + +// PolicyRule holds information that describes a policy rule, but does not contain information +// about who the rule applies to or which namespace the rule applies to. +message PolicyRule { + // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. + repeated string verbs = 1; + + // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of + // the enumerated resources in any API group will be allowed. + // +optional + repeated string apiGroups = 2; + + // Resources is a list of resources this rule applies to. ResourceAll represents all resources. + // +optional + repeated string resources = 3; + + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + // +optional + repeated string resourceNames = 4; + + // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path + // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. + // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. + // +optional + repeated string nonResourceURLs = 5; +} + +// +k8s:deepcopy-gen=false +// PolicyRuleBuilder let's us attach methods. A no-no for API types. +// We use it to construct rules in code. It's more compact than trying to write them +// out in a literal and allows us to perform some basic checking during construction +message PolicyRuleBuilder { + optional PolicyRule policyRule = 1; +} + +// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. +message Role { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Rules holds all the PolicyRules for this Role + repeated PolicyRule rules = 2; +} + +// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. +// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given +// namespace only have effect in that namespace. +message RoleBinding { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Subjects holds references to the objects the role applies to. + repeated Subject subjects = 2; + + // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + optional RoleRef roleRef = 3; +} + +// RoleBindingList is a collection of RoleBindings +message RoleBindingList { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is a list of RoleBindings + repeated RoleBinding items = 2; +} + +// RoleList is a collection of Roles +message RoleList { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is a list of Roles + repeated Role items = 2; +} + +// RoleRef contains information that points to the role being used +message RoleRef { + // APIGroup is the group for the resource being referenced + optional string apiGroup = 1; + + // Kind is the type of resource being referenced + optional string kind = 2; + + // Name is the name of resource being referenced + optional string name = 3; +} + +// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, +// or a value for non-objects such as user and group names. +message Subject { + // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". + // If the Authorizer does not recognized the kind value, the Authorizer should report an error. + optional string kind = 1; + + // APIGroup holds the API group of the referenced subject. + // Defaults to "" for ServiceAccount subjects. + // Defaults to "rbac.authorization.k8s.io" for User and Group subjects. + // +optional + optional string apiGroup = 2; + + // Name of the object being referenced. + optional string name = 3; + + // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty + // the Authorizer should report an error. + // +optional + optional string namespace = 4; +} + diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/helpers.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/helpers.go new file mode 100644 index 000000000..063b9ed3f --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/helpers.go @@ -0,0 +1,146 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// PolicyRuleBuilder let's us attach methods. A no-no for API types. +// We use it to construct rules in code. It's more compact than trying to write them +// out in a literal and allows us to perform some basic checking during construction +type PolicyRuleBuilder struct { + PolicyRule PolicyRule `protobuf:"bytes,1,opt,name=policyRule"` +} + +func NewRule(verbs ...string) *PolicyRuleBuilder { + return &PolicyRuleBuilder{ + PolicyRule: PolicyRule{Verbs: verbs}, + } +} + +func (r *PolicyRuleBuilder) Groups(groups ...string) *PolicyRuleBuilder { + r.PolicyRule.APIGroups = append(r.PolicyRule.APIGroups, groups...) + return r +} + +func (r *PolicyRuleBuilder) Resources(resources ...string) *PolicyRuleBuilder { + r.PolicyRule.Resources = append(r.PolicyRule.Resources, resources...) + return r +} + +func (r *PolicyRuleBuilder) Names(names ...string) *PolicyRuleBuilder { + r.PolicyRule.ResourceNames = append(r.PolicyRule.ResourceNames, names...) + return r +} + +func (r *PolicyRuleBuilder) URLs(urls ...string) *PolicyRuleBuilder { + r.PolicyRule.NonResourceURLs = append(r.PolicyRule.NonResourceURLs, urls...) + return r +} + +func (r *PolicyRuleBuilder) RuleOrDie() PolicyRule { + ret, err := r.Rule() + if err != nil { + panic(err) + } + return ret +} + +func (r *PolicyRuleBuilder) Rule() (PolicyRule, error) { + if len(r.PolicyRule.Verbs) == 0 { + return PolicyRule{}, fmt.Errorf("verbs are required: %#v", r.PolicyRule) + } + + switch { + case len(r.PolicyRule.NonResourceURLs) > 0: + if len(r.PolicyRule.APIGroups) != 0 || len(r.PolicyRule.Resources) != 0 || len(r.PolicyRule.ResourceNames) != 0 { + return PolicyRule{}, fmt.Errorf("non-resource rule may not have apiGroups, resources, or resourceNames: %#v", r.PolicyRule) + } + case len(r.PolicyRule.Resources) > 0: + if len(r.PolicyRule.NonResourceURLs) != 0 { + return PolicyRule{}, fmt.Errorf("resource rule may not have nonResourceURLs: %#v", r.PolicyRule) + } + if len(r.PolicyRule.APIGroups) == 0 { + // this a common bug + return PolicyRule{}, fmt.Errorf("resource rule must have apiGroups: %#v", r.PolicyRule) + } + default: + return PolicyRule{}, fmt.Errorf("a rule must have either nonResourceURLs or resources: %#v", r.PolicyRule) + } + + return r.PolicyRule, nil +} + +// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types. +// We use it to construct bindings in code. It's more compact than trying to write them +// out in a literal. +type ClusterRoleBindingBuilder struct { + ClusterRoleBinding ClusterRoleBinding `protobuf:"bytes,1,opt,name=clusterRoleBinding"` +} + +func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder { + return &ClusterRoleBindingBuilder{ + ClusterRoleBinding: ClusterRoleBinding{ + ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName}, + RoleRef: RoleRef{ + APIGroup: GroupName, + Kind: "ClusterRole", + Name: clusterRoleName, + }, + }, + } +} + +func (r *ClusterRoleBindingBuilder) Groups(groups ...string) *ClusterRoleBindingBuilder { + for _, group := range groups { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: GroupKind, Name: group}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder { + for _, user := range users { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: UserKind, Name: user}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *ClusterRoleBindingBuilder { + for _, saName := range serviceAccountNames { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: ServiceAccountKind, Namespace: namespace, Name: saName}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) BindingOrDie() ClusterRoleBinding { + ret, err := r.Binding() + if err != nil { + panic(err) + } + return ret +} + +func (r *ClusterRoleBindingBuilder) Binding() (ClusterRoleBinding, error) { + if len(r.ClusterRoleBinding.Subjects) == 0 { + return ClusterRoleBinding{}, fmt.Errorf("subjects are required: %#v", r.ClusterRoleBinding) + } + + return r.ClusterRoleBinding, nil +} diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/register.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/register.go new file mode 100644 index 000000000..cab2e77e4 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/register.go @@ -0,0 +1,55 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "rbac.authorization.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &Role{}, + &RoleBinding{}, + &RoleBindingList{}, + &RoleList{}, + + &ClusterRole{}, + &ClusterRoleBinding{}, + &ClusterRoleBindingList{}, + &ClusterRoleList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.generated.go new file mode 100644 index 000000000..56de3e3e7 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.generated.go @@ -0,0 +1,4879 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1beta1 + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81234 = 1 + codecSelferC_RAW1234 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1234 = 10 + codecSelferValueTypeMap1234 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1234 = 2 + codecSelfer_containerMapValue1234 = 3 + codecSelfer_containerMapEnd1234 = 4 + codecSelfer_containerArrayElem1234 = 6 + codecSelfer_containerArrayEnd1234 = 7 +) + +var ( + codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1234 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg1_v1.TypeMeta + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 + } +} + +func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = len(x.APIGroups) != 0 + yyq2[2] = len(x.Resources) != 0 + yyq2[3] = len(x.ResourceNames) != 0 + yyq2[4] = len(x.NonResourceURLs) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Verbs == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + z.F.EncSliceStringV(x.Verbs, false, e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("verbs")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Verbs == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + z.F.EncSliceStringV(x.Verbs, false, e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.APIGroups == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + z.F.EncSliceStringV(x.APIGroups, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiGroups")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.APIGroups == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + z.F.EncSliceStringV(x.APIGroups, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Resources == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + z.F.EncSliceStringV(x.Resources, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resources")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Resources == nil { + r.EncodeNil() + } else { + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + z.F.EncSliceStringV(x.Resources, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.ResourceNames == nil { + r.EncodeNil() + } else { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + z.F.EncSliceStringV(x.ResourceNames, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resourceNames")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ResourceNames == nil { + r.EncodeNil() + } else { + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + z.F.EncSliceStringV(x.ResourceNames, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + if x.NonResourceURLs == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + z.F.EncSliceStringV(x.NonResourceURLs, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nonResourceURLs")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.NonResourceURLs == nil { + r.EncodeNil() + } else { + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + z.F.EncSliceStringV(x.NonResourceURLs, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PolicyRule) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "verbs": + if r.TryDecodeAsNil() { + x.Verbs = nil + } else { + yyv4 := &x.Verbs + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + z.F.DecSliceStringX(yyv4, false, d) + } + } + case "apiGroups": + if r.TryDecodeAsNil() { + x.APIGroups = nil + } else { + yyv6 := &x.APIGroups + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + z.F.DecSliceStringX(yyv6, false, d) + } + } + case "resources": + if r.TryDecodeAsNil() { + x.Resources = nil + } else { + yyv8 := &x.Resources + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + z.F.DecSliceStringX(yyv8, false, d) + } + } + case "resourceNames": + if r.TryDecodeAsNil() { + x.ResourceNames = nil + } else { + yyv10 := &x.ResourceNames + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + z.F.DecSliceStringX(yyv10, false, d) + } + } + case "nonResourceURLs": + if r.TryDecodeAsNil() { + x.NonResourceURLs = nil + } else { + yyv12 := &x.NonResourceURLs + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + z.F.DecSliceStringX(yyv12, false, d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Verbs = nil + } else { + yyv15 := &x.Verbs + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + z.F.DecSliceStringX(yyv15, false, d) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIGroups = nil + } else { + yyv17 := &x.APIGroups + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + z.F.DecSliceStringX(yyv17, false, d) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Resources = nil + } else { + yyv19 := &x.Resources + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + z.F.DecSliceStringX(yyv19, false, d) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ResourceNames = nil + } else { + yyv21 := &x.ResourceNames + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + z.F.DecSliceStringX(yyv21, false, d) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NonResourceURLs = nil + } else { + yyv23 := &x.NonResourceURLs + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + z.F.DecSliceStringX(yyv23, false, d) + } + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj14-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *Subject) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.APIGroup != "" + yyq2[3] = x.Namespace != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiGroup")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("namespace")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Subject) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Subject) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiGroup": + if r.TryDecodeAsNil() { + x.APIGroup = "" + } else { + yyv6 := &x.APIGroup + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv8 := &x.Name + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "namespace": + if r.TryDecodeAsNil() { + x.Namespace = "" + } else { + yyv10 := &x.Namespace + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Subject) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIGroup = "" + } else { + yyv15 := &x.APIGroup + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv17 := &x.Name + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Namespace = "" + } else { + yyv19 := &x.Namespace + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *RoleRef) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 3 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiGroup")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RoleRef) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RoleRef) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "apiGroup": + if r.TryDecodeAsNil() { + x.APIGroup = "" + } else { + yyv4 := &x.APIGroup + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv6 := &x.Kind + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv8 := &x.Name + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RoleRef) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIGroup = "" + } else { + yyv11 := &x.APIGroup + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv15 := &x.Name + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Rules == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("rules")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Rules == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Role) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Role) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "rules": + if r.TryDecodeAsNil() { + x.Rules = nil + } else { + yyv10 := &x.Rules + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Rules = nil + } else { + yyv19 := &x.Rules + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Subjects == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceSubject(([]Subject)(x.Subjects), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("subjects")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Subjects == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceSubject(([]Subject)(x.Subjects), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy18 := &x.RoleRef + yy18.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("roleRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy20 := &x.RoleRef + yy20.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RoleBinding) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "subjects": + if r.TryDecodeAsNil() { + x.Subjects = nil + } else { + yyv10 := &x.Subjects + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceSubject((*[]Subject)(yyv10), d) + } + } + case "roleRef": + if r.TryDecodeAsNil() { + x.RoleRef = RoleRef{} + } else { + yyv12 := &x.RoleRef + yyv12.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv18 := &x.ObjectMeta + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else { + z.DecFallback(yyv18, false) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Subjects = nil + } else { + yyv20 := &x.Subjects + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + h.decSliceSubject((*[]Subject)(yyv20), d) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RoleRef = RoleRef{} + } else { + yyv22 := &x.RoleRef + yyv22.CodecDecodeSelf(d) + } + for { + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj13-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *RoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceRoleBinding(([]RoleBinding)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceRoleBinding(([]RoleBinding)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceRoleBinding((*[]RoleBinding)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceRoleBinding((*[]RoleBinding)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *RoleList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceRole(([]Role)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceRole(([]Role)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RoleList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceRole((*[]Role)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceRole((*[]Role)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Rules == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("rules")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Rules == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ClusterRole) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ClusterRole) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "rules": + if r.TryDecodeAsNil() { + x.Rules = nil + } else { + yyv10 := &x.Rules + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Rules = nil + } else { + yyv19 := &x.Rules + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Subjects == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceSubject(([]Subject)(x.Subjects), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("subjects")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Subjects == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceSubject(([]Subject)(x.Subjects), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy18 := &x.RoleRef + yy18.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("roleRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy20 := &x.RoleRef + yy20.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ClusterRoleBinding) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ClusterRoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "subjects": + if r.TryDecodeAsNil() { + x.Subjects = nil + } else { + yyv10 := &x.Subjects + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceSubject((*[]Subject)(yyv10), d) + } + } + case "roleRef": + if r.TryDecodeAsNil() { + x.RoleRef = RoleRef{} + } else { + yyv12 := &x.RoleRef + yyv12.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv18 := &x.ObjectMeta + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else { + z.DecFallback(yyv18, false) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Subjects = nil + } else { + yyv20 := &x.Subjects + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + h.decSliceSubject((*[]Subject)(yyv20), d) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RoleRef = RoleRef{} + } else { + yyv22 := &x.RoleRef + yyv22.CodecDecodeSelf(d) + } + for { + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj13-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ClusterRoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ClusterRoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ClusterRoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ClusterRoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ClusterRoleList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceClusterRole(([]ClusterRole)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceClusterRole(([]ClusterRole)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ClusterRoleList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ClusterRoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceClusterRole((*[]ClusterRole)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ClusterRoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceClusterRole((*[]ClusterRole)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) encSlicePolicyRule(v []PolicyRule, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSlicePolicyRule(v *[]PolicyRule, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []PolicyRule{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 120) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]PolicyRule, yyrl1) + } + } else { + yyv1 = make([]PolicyRule, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = PolicyRule{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, PolicyRule{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = PolicyRule{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, PolicyRule{}) // var yyz1 PolicyRule + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = PolicyRule{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []PolicyRule{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceSubject(v []Subject, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceSubject(v *[]Subject, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []Subject{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 64) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]Subject, yyrl1) + } + } else { + yyv1 = make([]Subject, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Subject{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Subject{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Subject{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Subject{}) // var yyz1 Subject + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = Subject{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Subject{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceRoleBinding(v []RoleBinding, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceRoleBinding(v *[]RoleBinding, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []RoleBinding{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 328) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]RoleBinding, yyrl1) + } + } else { + yyv1 = make([]RoleBinding, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = RoleBinding{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, RoleBinding{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = RoleBinding{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, RoleBinding{}) // var yyz1 RoleBinding + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = RoleBinding{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []RoleBinding{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceRole(v []Role, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceRole(v *[]Role, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []Role{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 280) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]Role, yyrl1) + } + } else { + yyv1 = make([]Role, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Role{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Role{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Role{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Role{}) // var yyz1 Role + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = Role{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Role{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceClusterRoleBinding(v []ClusterRoleBinding, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceClusterRoleBinding(v *[]ClusterRoleBinding, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []ClusterRoleBinding{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 328) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]ClusterRoleBinding, yyrl1) + } + } else { + yyv1 = make([]ClusterRoleBinding, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRoleBinding{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ClusterRoleBinding{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRoleBinding{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ClusterRoleBinding{}) // var yyz1 ClusterRoleBinding + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRoleBinding{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ClusterRoleBinding{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceClusterRole(v []ClusterRole, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceClusterRole(v *[]ClusterRole, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []ClusterRole{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 280) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]ClusterRole, yyrl1) + } + } else { + yyv1 = make([]ClusterRole, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRole{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ClusterRole{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRole{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ClusterRole{}) // var yyz1 ClusterRole + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRole{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ClusterRole{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.go new file mode 100644 index 000000000..89a47db9e --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.go @@ -0,0 +1,207 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// Authorization is calculated against +// 1. evaluation of ClusterRoleBindings - short circuit on match +// 2. evaluation of RoleBindings in the namespace requested - short circuit on match +// 3. deny by default + +const ( + APIGroupAll = "*" + ResourceAll = "*" + VerbAll = "*" + NonResourceAll = "*" + + GroupKind = "Group" + ServiceAccountKind = "ServiceAccount" + UserKind = "User" + + // AutoUpdateAnnotationKey is the name of an annotation which prevents reconciliation if set to "false" + AutoUpdateAnnotationKey = "rbac.authorization.kubernetes.io/autoupdate" +) + +// Authorization is calculated against +// 1. evaluation of ClusterRoleBindings - short circuit on match +// 2. evaluation of RoleBindings in the namespace requested - short circuit on match +// 3. deny by default + +// PolicyRule holds information that describes a policy rule, but does not contain information +// about who the rule applies to or which namespace the rule applies to. +type PolicyRule struct { + // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. + Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"` + + // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of + // the enumerated resources in any API group will be allowed. + // +optional + APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,2,rep,name=apiGroups"` + // Resources is a list of resources this rule applies to. ResourceAll represents all resources. + // +optional + Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"` + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + // +optional + ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,4,rep,name=resourceNames"` + + // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path + // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. + // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. + // +optional + NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,5,rep,name=nonResourceURLs"` +} + +// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, +// or a value for non-objects such as user and group names. +type Subject struct { + // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". + // If the Authorizer does not recognized the kind value, the Authorizer should report an error. + Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` + // APIGroup holds the API group of the referenced subject. + // Defaults to "" for ServiceAccount subjects. + // Defaults to "rbac.authorization.k8s.io" for User and Group subjects. + // +optional + APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,2,opt.name=apiGroup"` + // Name of the object being referenced. + Name string `json:"name" protobuf:"bytes,3,opt,name=name"` + // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty + // the Authorizer should report an error. + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"` +} + +// RoleRef contains information that points to the role being used +type RoleRef struct { + // APIGroup is the group for the resource being referenced + APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"` + // Kind is the type of resource being referenced + Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"` + // Name is the name of resource being referenced + Name string `json:"name" protobuf:"bytes,3,opt,name=name"` +} + +// +genclient=true + +// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. +type Role struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Rules holds all the PolicyRules for this Role + Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` +} + +// +genclient=true + +// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. +// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given +// namespace only have effect in that namespace. +type RoleBinding struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Subjects holds references to the objects the role applies to. + Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` + + // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"` +} + +// RoleBindingList is a collection of RoleBindings +type RoleBindingList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of RoleBindings + Items []RoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// RoleList is a collection of Roles +type RoleList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of Roles + Items []Role `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient=true +// +nonNamespaced=true + +// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. +type ClusterRole struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Rules holds all the PolicyRules for this ClusterRole + Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` +} + +// +genclient=true +// +nonNamespaced=true + +// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, +// and adds who information via Subject. +type ClusterRoleBinding struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Subjects holds references to the objects the role applies to. + Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` + + // RoleRef can only reference a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"` +} + +// ClusterRoleBindingList is a collection of ClusterRoleBindings +type ClusterRoleBindingList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of ClusterRoleBindings + Items []ClusterRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// ClusterRoleList is a collection of ClusterRoles +type ClusterRoleList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of ClusterRoles + Items []ClusterRole `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go new file mode 100644 index 000000000..1463d8fea --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go @@ -0,0 +1,148 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_ClusterRole = map[string]string{ + "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + "metadata": "Standard object's metadata.", + "rules": "Rules holds all the PolicyRules for this ClusterRole", +} + +func (ClusterRole) SwaggerDoc() map[string]string { + return map_ClusterRole +} + +var map_ClusterRoleBinding = map[string]string{ + "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", + "metadata": "Standard object's metadata.", + "subjects": "Subjects holds references to the objects the role applies to.", + "roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", +} + +func (ClusterRoleBinding) SwaggerDoc() map[string]string { + return map_ClusterRoleBinding +} + +var map_ClusterRoleBindingList = map[string]string{ + "": "ClusterRoleBindingList is a collection of ClusterRoleBindings", + "metadata": "Standard object's metadata.", + "items": "Items is a list of ClusterRoleBindings", +} + +func (ClusterRoleBindingList) SwaggerDoc() map[string]string { + return map_ClusterRoleBindingList +} + +var map_ClusterRoleList = map[string]string{ + "": "ClusterRoleList is a collection of ClusterRoles", + "metadata": "Standard object's metadata.", + "items": "Items is a list of ClusterRoles", +} + +func (ClusterRoleList) SwaggerDoc() map[string]string { + return map_ClusterRoleList +} + +var map_PolicyRule = map[string]string{ + "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", + "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", +} + +func (PolicyRule) SwaggerDoc() map[string]string { + return map_PolicyRule +} + +var map_Role = map[string]string{ + "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + "metadata": "Standard object's metadata.", + "rules": "Rules holds all the PolicyRules for this Role", +} + +func (Role) SwaggerDoc() map[string]string { + return map_Role +} + +var map_RoleBinding = map[string]string{ + "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", + "metadata": "Standard object's metadata.", + "subjects": "Subjects holds references to the objects the role applies to.", + "roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", +} + +func (RoleBinding) SwaggerDoc() map[string]string { + return map_RoleBinding +} + +var map_RoleBindingList = map[string]string{ + "": "RoleBindingList is a collection of RoleBindings", + "metadata": "Standard object's metadata.", + "items": "Items is a list of RoleBindings", +} + +func (RoleBindingList) SwaggerDoc() map[string]string { + return map_RoleBindingList +} + +var map_RoleList = map[string]string{ + "": "RoleList is a collection of Roles", + "metadata": "Standard object's metadata.", + "items": "Items is a list of Roles", +} + +func (RoleList) SwaggerDoc() map[string]string { + return map_RoleList +} + +var map_RoleRef = map[string]string{ + "": "RoleRef contains information that points to the role being used", + "apiGroup": "APIGroup is the group for the resource being referenced", + "kind": "Kind is the type of resource being referenced", + "name": "Name is the name of resource being referenced", +} + +func (RoleRef) SwaggerDoc() map[string]string { + return map_RoleRef +} + +var map_Subject = map[string]string{ + "": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + "kind": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + "apiGroup": "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", + "name": "Name of the object being referenced.", + "namespace": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", +} + +func (Subject) SwaggerDoc() map[string]string { + return map_Subject +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.conversion.go new file mode 100644 index 000000000..6a9b31f9d --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.conversion.go @@ -0,0 +1,389 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1beta1 + +import ( + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + rbac "k8s.io/client-go/pkg/apis/rbac" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1beta1_ClusterRole_To_rbac_ClusterRole, + Convert_rbac_ClusterRole_To_v1beta1_ClusterRole, + Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding, + Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding, + Convert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder, + Convert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder, + Convert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList, + Convert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList, + Convert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList, + Convert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList, + Convert_v1beta1_PolicyRule_To_rbac_PolicyRule, + Convert_rbac_PolicyRule_To_v1beta1_PolicyRule, + Convert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder, + Convert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder, + Convert_v1beta1_Role_To_rbac_Role, + Convert_rbac_Role_To_v1beta1_Role, + Convert_v1beta1_RoleBinding_To_rbac_RoleBinding, + Convert_rbac_RoleBinding_To_v1beta1_RoleBinding, + Convert_v1beta1_RoleBindingList_To_rbac_RoleBindingList, + Convert_rbac_RoleBindingList_To_v1beta1_RoleBindingList, + Convert_v1beta1_RoleList_To_rbac_RoleList, + Convert_rbac_RoleList_To_v1beta1_RoleList, + Convert_v1beta1_RoleRef_To_rbac_RoleRef, + Convert_rbac_RoleRef_To_v1beta1_RoleRef, + Convert_v1beta1_Subject_To_rbac_Subject, + Convert_rbac_Subject_To_v1beta1_Subject, + ) +} + +func autoConvert_v1beta1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules)) + return nil +} + +func Convert_v1beta1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRole_To_rbac_ClusterRole(in, out, s) +} + +func autoConvert_rbac_ClusterRole_To_v1beta1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if in.Rules == nil { + out.Rules = make([]PolicyRule, 0) + } else { + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) + } + return nil +} + +func Convert_rbac_ClusterRole_To_v1beta1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error { + return autoConvert_rbac_ClusterRole_To_v1beta1_ClusterRole(in, out, s) +} + +func autoConvert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Subjects = *(*[]rbac.Subject)(unsafe.Pointer(&in.Subjects)) + if err := Convert_v1beta1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in, out, s) +} + +func autoConvert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if in.Subjects == nil { + out.Subjects = make([]Subject, 0) + } else { + out.Subjects = *(*[]Subject)(unsafe.Pointer(&in.Subjects)) + } + if err := Convert_rbac_RoleRef_To_v1beta1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil { + return err + } + return nil +} + +func Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error { + return autoConvert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in, out, s) +} + +func autoConvert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error { + if err := Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in, out, s) +} + +func autoConvert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error { + if err := Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil { + return err + } + return nil +} + +func Convert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error { + return autoConvert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in, out, s) +} + +func autoConvert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]rbac.ClusterRoleBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in, out, s) +} + +func autoConvert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]ClusterRoleBinding, 0) + } else { + out.Items = *(*[]ClusterRoleBinding)(unsafe.Pointer(&in.Items)) + } + return nil +} + +func Convert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error { + return autoConvert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in, out, s) +} + +func autoConvert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]rbac.ClusterRole)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in, out, s) +} + +func autoConvert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]ClusterRole, 0) + } else { + out.Items = *(*[]ClusterRole)(unsafe.Pointer(&in.Items)) + } + return nil +} + +func Convert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error { + return autoConvert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in, out, s) +} + +func autoConvert_v1beta1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error { + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups)) + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) + return nil +} + +func Convert_v1beta1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error { + return autoConvert_v1beta1_PolicyRule_To_rbac_PolicyRule(in, out, s) +} + +func autoConvert_rbac_PolicyRule_To_v1beta1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error { + if in.Verbs == nil { + out.Verbs = make([]string, 0) + } else { + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + } + out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups)) + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) + return nil +} + +func Convert_rbac_PolicyRule_To_v1beta1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error { + return autoConvert_rbac_PolicyRule_To_v1beta1_PolicyRule(in, out, s) +} + +func autoConvert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error { + if err := Convert_v1beta1_PolicyRule_To_rbac_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error { + return autoConvert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in, out, s) +} + +func autoConvert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error { + if err := Convert_rbac_PolicyRule_To_v1beta1_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil { + return err + } + return nil +} + +func Convert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error { + return autoConvert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in, out, s) +} + +func autoConvert_v1beta1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules)) + return nil +} + +func Convert_v1beta1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error { + return autoConvert_v1beta1_Role_To_rbac_Role(in, out, s) +} + +func autoConvert_rbac_Role_To_v1beta1_Role(in *rbac.Role, out *Role, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if in.Rules == nil { + out.Rules = make([]PolicyRule, 0) + } else { + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) + } + return nil +} + +func Convert_rbac_Role_To_v1beta1_Role(in *rbac.Role, out *Role, s conversion.Scope) error { + return autoConvert_rbac_Role_To_v1beta1_Role(in, out, s) +} + +func autoConvert_v1beta1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Subjects = *(*[]rbac.Subject)(unsafe.Pointer(&in.Subjects)) + if err := Convert_v1beta1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error { + return autoConvert_v1beta1_RoleBinding_To_rbac_RoleBinding(in, out, s) +} + +func autoConvert_rbac_RoleBinding_To_v1beta1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if in.Subjects == nil { + out.Subjects = make([]Subject, 0) + } else { + out.Subjects = *(*[]Subject)(unsafe.Pointer(&in.Subjects)) + } + if err := Convert_rbac_RoleRef_To_v1beta1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil { + return err + } + return nil +} + +func Convert_rbac_RoleBinding_To_v1beta1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error { + return autoConvert_rbac_RoleBinding_To_v1beta1_RoleBinding(in, out, s) +} + +func autoConvert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]rbac.RoleBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error { + return autoConvert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in, out, s) +} + +func autoConvert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]RoleBinding, 0) + } else { + out.Items = *(*[]RoleBinding)(unsafe.Pointer(&in.Items)) + } + return nil +} + +func Convert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error { + return autoConvert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in, out, s) +} + +func autoConvert_v1beta1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]rbac.Role)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error { + return autoConvert_v1beta1_RoleList_To_rbac_RoleList(in, out, s) +} + +func autoConvert_rbac_RoleList_To_v1beta1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]Role, 0) + } else { + out.Items = *(*[]Role)(unsafe.Pointer(&in.Items)) + } + return nil +} + +func Convert_rbac_RoleList_To_v1beta1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error { + return autoConvert_rbac_RoleList_To_v1beta1_RoleList(in, out, s) +} + +func autoConvert_v1beta1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error { + out.APIGroup = in.APIGroup + out.Kind = in.Kind + out.Name = in.Name + return nil +} + +func Convert_v1beta1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error { + return autoConvert_v1beta1_RoleRef_To_rbac_RoleRef(in, out, s) +} + +func autoConvert_rbac_RoleRef_To_v1beta1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error { + out.APIGroup = in.APIGroup + out.Kind = in.Kind + out.Name = in.Name + return nil +} + +func Convert_rbac_RoleRef_To_v1beta1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error { + return autoConvert_rbac_RoleRef_To_v1beta1_RoleRef(in, out, s) +} + +func autoConvert_v1beta1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error { + out.Kind = in.Kind + out.APIGroup = in.APIGroup + out.Name = in.Name + out.Namespace = in.Namespace + return nil +} + +func Convert_v1beta1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error { + return autoConvert_v1beta1_Subject_To_rbac_Subject(in, out, s) +} + +func autoConvert_rbac_Subject_To_v1beta1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error { + out.Kind = in.Kind + out.APIGroup = in.APIGroup + out.Name = in.Name + out.Namespace = in.Namespace + return nil +} + +func Convert_rbac_Subject_To_v1beta1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error { + return autoConvert_rbac_Subject_To_v1beta1_Subject(in, out, s) +} diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000..dccae9b4f --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,258 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleList, InType: reflect.TypeOf(&ClusterRoleList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PolicyRule, InType: reflect.TypeOf(&PolicyRule{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Role, InType: reflect.TypeOf(&Role{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleBinding, InType: reflect.TypeOf(&RoleBinding{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleList, InType: reflect.TypeOf(&RoleList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleRef, InType: reflect.TypeOf(&RoleRef{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Subject, InType: reflect.TypeOf(&Subject{})}, + ) +} + +func DeepCopy_v1beta1_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ClusterRole) + out := out.(*ClusterRole) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]PolicyRule, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_ClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ClusterRoleBinding) + out := out.(*ClusterRoleBinding) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if in.Subjects != nil { + in, out := &in.Subjects, &out.Subjects + *out = make([]Subject, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1beta1_ClusterRoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ClusterRoleBindingList) + out := out.(*ClusterRoleBindingList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterRoleBinding, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_ClusterRoleBinding(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_ClusterRoleList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ClusterRoleList) + out := out.(*ClusterRoleList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterRole, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_ClusterRole(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_PolicyRule(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PolicyRule) + out := out.(*PolicyRule) + *out = *in + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.APIGroups != nil { + in, out := &in.APIGroups, &out.APIGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ResourceNames != nil { + in, out := &in.ResourceNames, &out.ResourceNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NonResourceURLs != nil { + in, out := &in.NonResourceURLs, &out.NonResourceURLs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1beta1_Role(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Role) + out := out.(*Role) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]PolicyRule, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RoleBinding) + out := out.(*RoleBinding) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if in.Subjects != nil { + in, out := &in.Subjects, &out.Subjects + *out = make([]Subject, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1beta1_RoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RoleBindingList) + out := out.(*RoleBindingList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RoleBinding, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_RoleBinding(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_RoleList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RoleList) + out := out.(*RoleList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Role, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_Role(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_RoleRef(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RoleRef) + out := out.(*RoleRef) + *out = *in + return nil + } +} + +func DeepCopy_v1beta1_Subject(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Subject) + out := out.(*Subject) + *out = *in + return nil + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.defaults.go new file mode 100644 index 000000000..fa5bfb6ab --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.defaults.go @@ -0,0 +1,66 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&ClusterRoleBinding{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBinding(obj.(*ClusterRoleBinding)) }) + scheme.AddTypeDefaultingFunc(&ClusterRoleBindingList{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBindingList(obj.(*ClusterRoleBindingList)) }) + scheme.AddTypeDefaultingFunc(&RoleBinding{}, func(obj interface{}) { SetObjectDefaults_RoleBinding(obj.(*RoleBinding)) }) + scheme.AddTypeDefaultingFunc(&RoleBindingList{}, func(obj interface{}) { SetObjectDefaults_RoleBindingList(obj.(*RoleBindingList)) }) + return nil +} + +func SetObjectDefaults_ClusterRoleBinding(in *ClusterRoleBinding) { + SetDefaults_ClusterRoleBinding(in) + for i := range in.Subjects { + a := &in.Subjects[i] + SetDefaults_Subject(a) + } +} + +func SetObjectDefaults_ClusterRoleBindingList(in *ClusterRoleBindingList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ClusterRoleBinding(a) + } +} + +func SetObjectDefaults_RoleBinding(in *RoleBinding) { + SetDefaults_RoleBinding(in) + for i := range in.Subjects { + a := &in.Subjects[i] + SetDefaults_Subject(a) + } +} + +func SetObjectDefaults_RoleBindingList(in *RoleBindingList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_RoleBinding(a) + } +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/rbac/zz_generated.deepcopy.go similarity index 77% rename from vendor/k8s.io/client-go/1.5/pkg/apis/rbac/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/apis/rbac/zz_generated.deepcopy.go index 20df3be7d..db5d08cdf 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/rbac/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/apis/rbac/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,9 +21,9 @@ limitations under the License. package rbac import ( - api "k8s.io/client-go/1.5/pkg/api" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" reflect "reflect" ) @@ -53,9 +53,11 @@ func DeepCopy_rbac_ClusterRole(in interface{}, out interface{}, c *conversion.Cl { in := in.(*ClusterRole) out := out.(*ClusterRole) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -65,8 +67,6 @@ func DeepCopy_rbac_ClusterRole(in interface{}, out interface{}, c *conversion.Cl return err } } - } else { - out.Rules = nil } return nil } @@ -76,20 +76,17 @@ func DeepCopy_rbac_ClusterRoleBinding(in interface{}, out interface{}, c *conver { in := in.(*ClusterRoleBinding) out := out.(*ClusterRoleBinding) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Subjects = nil + copy(*out, *in) } - out.RoleRef = in.RoleRef return nil } } @@ -98,8 +95,7 @@ func DeepCopy_rbac_ClusterRoleBindingList(in interface{}, out interface{}, c *co { in := in.(*ClusterRoleBindingList) out := out.(*ClusterRoleBindingList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ClusterRoleBinding, len(*in)) @@ -108,8 +104,6 @@ func DeepCopy_rbac_ClusterRoleBindingList(in interface{}, out interface{}, c *co return err } } - } else { - out.Items = nil } return nil } @@ -119,8 +113,7 @@ func DeepCopy_rbac_ClusterRoleList(in interface{}, out interface{}, c *conversio { in := in.(*ClusterRoleList) out := out.(*ClusterRoleList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ClusterRole, len(*in)) @@ -129,8 +122,6 @@ func DeepCopy_rbac_ClusterRoleList(in interface{}, out interface{}, c *conversio return err } } - } else { - out.Items = nil } return nil } @@ -140,47 +131,31 @@ func DeepCopy_rbac_PolicyRule(in interface{}, out interface{}, c *conversion.Clo { in := in.(*PolicyRule) out := out.(*PolicyRule) + *out = *in if in.Verbs != nil { in, out := &in.Verbs, &out.Verbs *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Verbs = nil - } - if in.AttributeRestrictions == nil { - out.AttributeRestrictions = nil - } else if newVal, err := c.DeepCopy(&in.AttributeRestrictions); err != nil { - return err - } else { - out.AttributeRestrictions = *newVal.(*runtime.Object) } if in.APIGroups != nil { in, out := &in.APIGroups, &out.APIGroups *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.APIGroups = nil } if in.Resources != nil { in, out := &in.Resources, &out.Resources *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.Resources = nil } if in.ResourceNames != nil { in, out := &in.ResourceNames, &out.ResourceNames *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.ResourceNames = nil } if in.NonResourceURLs != nil { in, out := &in.NonResourceURLs, &out.NonResourceURLs *out = make([]string, len(*in)) copy(*out, *in) - } else { - out.NonResourceURLs = nil } return nil } @@ -190,9 +165,11 @@ func DeepCopy_rbac_Role(in interface{}, out interface{}, c *conversion.Cloner) e { in := in.(*Role) out := out.(*Role) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -202,8 +179,6 @@ func DeepCopy_rbac_Role(in interface{}, out interface{}, c *conversion.Cloner) e return err } } - } else { - out.Rules = nil } return nil } @@ -213,20 +188,17 @@ func DeepCopy_rbac_RoleBinding(in interface{}, out interface{}, c *conversion.Cl { in := in.(*RoleBinding) out := out.(*RoleBinding) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } else { - out.Subjects = nil + copy(*out, *in) } - out.RoleRef = in.RoleRef return nil } } @@ -235,8 +207,7 @@ func DeepCopy_rbac_RoleBindingList(in interface{}, out interface{}, c *conversio { in := in.(*RoleBindingList) out := out.(*RoleBindingList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]RoleBinding, len(*in)) @@ -245,8 +216,6 @@ func DeepCopy_rbac_RoleBindingList(in interface{}, out interface{}, c *conversio return err } } - } else { - out.Items = nil } return nil } @@ -256,8 +225,7 @@ func DeepCopy_rbac_RoleList(in interface{}, out interface{}, c *conversion.Clone { in := in.(*RoleList) out := out.(*RoleList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Role, len(*in)) @@ -266,8 +234,6 @@ func DeepCopy_rbac_RoleList(in interface{}, out interface{}, c *conversion.Clone return err } } - } else { - out.Items = nil } return nil } @@ -277,9 +243,7 @@ func DeepCopy_rbac_RoleRef(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*RoleRef) out := out.(*RoleRef) - out.APIGroup = in.APIGroup - out.Kind = in.Kind - out.Name = in.Name + *out = *in return nil } } @@ -288,10 +252,7 @@ func DeepCopy_rbac_Subject(in interface{}, out interface{}, c *conversion.Cloner { in := in.(*Subject) out := out.(*Subject) - out.Kind = in.Kind - out.APIVersion = in.APIVersion - out.Name = in.Name - out.Namespace = in.Namespace + *out = *in return nil } } diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/doc.go b/vendor/k8s.io/client-go/pkg/apis/settings/doc.go new file mode 100644 index 000000000..90ccf882a --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/settings/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +groupName=settings.k8s.io +package settings diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/install/install.go b/vendor/k8s.io/client-go/pkg/apis/settings/install/install.go similarity index 50% rename from vendor/k8s.io/client-go/1.5/pkg/apis/policy/install/install.go rename to vendor/k8s.io/client-go/pkg/apis/settings/install/install.go index 26d374d46..ccdc70400 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/policy/install/install.go +++ b/vendor/k8s.io/client-go/pkg/apis/settings/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,28 +14,36 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package install installs the experimental API group, making it available as +// Package install installs the settings API group, making it available as // an option to all of the API encoding/decoding machinery. package install import ( - "k8s.io/client-go/1.5/pkg/apimachinery/announced" - "k8s.io/client-go/1.5/pkg/apis/policy" - "k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/apis/settings" + "k8s.io/client-go/pkg/apis/settings/v1alpha1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ - GroupName: policy.GroupName, + GroupName: settings.GroupName, VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version}, - ImportPrefix: "k8s.io/client-go/1.5/pkg/apis/policy", - AddInternalObjectsToScheme: policy.AddToScheme, + ImportPrefix: "k8s.io/client-go/pkg/apis/settings", + AddInternalObjectsToScheme: settings.AddToScheme, }, announced.VersionToSchemeFunc{ v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/register.go b/vendor/k8s.io/client-go/pkg/apis/settings/register.go new file mode 100644 index 000000000..858470127 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/settings/register.go @@ -0,0 +1,52 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package settings + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// GroupName is the group name use in this package +const GroupName = "settings.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &PodPreset{}, + &PodPresetList{}, + ) + return nil +} diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/types.go b/vendor/k8s.io/client-go/pkg/apis/settings/types.go new file mode 100644 index 000000000..f89a16d25 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/settings/types.go @@ -0,0 +1,63 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package settings + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/pkg/api" +) + +// +genclient=true + +// PodPreset is a policy resource that defines additional runtime +// requirements for a Pod. +type PodPreset struct { + metav1.TypeMeta + // +optional + metav1.ObjectMeta + + // +optional + Spec PodPresetSpec +} + +// PodPresetSpec is a description of a pod injection policy. +type PodPresetSpec struct { + // Selector is a label query over a set of resources, in this case pods. + // Required. + Selector metav1.LabelSelector + // Env defines the collection of EnvVar to inject into containers. + // +optional + Env []api.EnvVar + // EnvFrom defines the collection of EnvFromSource to inject into containers. + // +optional + EnvFrom []api.EnvFromSource + // Volumes defines the collection of Volume to inject into the pod. + // +optional + Volumes []api.Volume + // VolumeMounts defines the collection of VolumeMount to inject into containers. + // +optional + VolumeMounts []api.VolumeMount +} + +// PodPresetList is a list of PodPreset objects. +type PodPresetList struct { + metav1.TypeMeta + // +optional + metav1.ListMeta + + Items []PodPreset +} diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/doc.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/doc.go new file mode 100644 index 000000000..86390b523 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +groupName=settings.k8s.io +package v1alpha1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.pb.go similarity index 53% rename from vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/generated.pb.go rename to vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.pb.go index 8164d9105..88f85877a 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,20 +15,19 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.proto +// source: k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto // DO NOT EDIT! /* Package v1alpha1 is a generated protocol buffer package. It is generated from these files: - k8s.io/kubernetes/pkg/apis/apps/v1alpha1/generated.proto + k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto It has these top-level messages: - PetSet - PetSetList - PetSetSpec - PetSetStatus + PodPreset + PodPresetList + PodPresetSpec */ package v1alpha1 @@ -36,8 +35,7 @@ import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" -import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/1.5/pkg/api/v1" +import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1" import strings "strings" import reflect "reflect" @@ -53,29 +51,24 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. const _ = proto.GoGoProtoPackageIsVersion1 -func (m *PetSet) Reset() { *m = PetSet{} } -func (*PetSet) ProtoMessage() {} -func (*PetSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } +func (m *PodPreset) Reset() { *m = PodPreset{} } +func (*PodPreset) ProtoMessage() {} +func (*PodPreset) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } -func (m *PetSetList) Reset() { *m = PetSetList{} } -func (*PetSetList) ProtoMessage() {} -func (*PetSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } +func (m *PodPresetList) Reset() { *m = PodPresetList{} } +func (*PodPresetList) ProtoMessage() {} +func (*PodPresetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } -func (m *PetSetSpec) Reset() { *m = PetSetSpec{} } -func (*PetSetSpec) ProtoMessage() {} -func (*PetSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } - -func (m *PetSetStatus) Reset() { *m = PetSetStatus{} } -func (*PetSetStatus) ProtoMessage() {} -func (*PetSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } +func (m *PodPresetSpec) Reset() { *m = PodPresetSpec{} } +func (*PodPresetSpec) ProtoMessage() {} +func (*PodPresetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } func init() { - proto.RegisterType((*PetSet)(nil), "k8s.io.client-go.1.5.pkg.apis.apps.v1alpha1.PetSet") - proto.RegisterType((*PetSetList)(nil), "k8s.io.client-go.1.5.pkg.apis.apps.v1alpha1.PetSetList") - proto.RegisterType((*PetSetSpec)(nil), "k8s.io.client-go.1.5.pkg.apis.apps.v1alpha1.PetSetSpec") - proto.RegisterType((*PetSetStatus)(nil), "k8s.io.client-go.1.5.pkg.apis.apps.v1alpha1.PetSetStatus") + proto.RegisterType((*PodPreset)(nil), "k8s.io.client-go.pkg.apis.settings.v1alpha1.PodPreset") + proto.RegisterType((*PodPresetList)(nil), "k8s.io.client-go.pkg.apis.settings.v1alpha1.PodPresetList") + proto.RegisterType((*PodPresetSpec)(nil), "k8s.io.client-go.pkg.apis.settings.v1alpha1.PodPresetSpec") } -func (m *PetSet) Marshal() (data []byte, err error) { +func (m *PodPreset) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -85,7 +78,7 @@ func (m *PetSet) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *PetSet) MarshalTo(data []byte) (int, error) { +func (m *PodPreset) MarshalTo(data []byte) (int, error) { var i int _ = i var l int @@ -106,18 +99,10 @@ func (m *PetSet) MarshalTo(data []byte) (int, error) { return 0, err } i += n2 - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n3, err := m.Status.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 return i, nil } -func (m *PetSetList) Marshal() (data []byte, err error) { +func (m *PodPresetList) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -127,7 +112,7 @@ func (m *PetSetList) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *PetSetList) MarshalTo(data []byte) (int, error) { +func (m *PodPresetList) MarshalTo(data []byte) (int, error) { var i int _ = i var l int @@ -135,11 +120,11 @@ func (m *PetSetList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n4, err := m.ListMeta.MarshalTo(data[i:]) + n3, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n4 + i += n3 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -155,7 +140,7 @@ func (m *PetSetList) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *PetSetSpec) Marshal() (data []byte, err error) { +func (m *PodPresetSpec) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -165,36 +150,45 @@ func (m *PetSetSpec) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *PetSetSpec) MarshalTo(data []byte) (int, error) { +func (m *PodPresetSpec) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Replicas != nil { - data[i] = 0x8 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.Replicas)) - } - if m.Selector != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Selector.Size())) - n5, err := m.Selector.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - data[i] = 0x1a + data[i] = 0xa i++ - i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) - n6, err := m.Template.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Selector.Size())) + n4, err := m.Selector.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n6 - if len(m.VolumeClaimTemplates) > 0 { - for _, msg := range m.VolumeClaimTemplates { + i += n4 + if len(m.Env) > 0 { + for _, msg := range m.Env { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.EnvFrom) > 0 { + for _, msg := range m.EnvFrom { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Volumes) > 0 { + for _, msg := range m.Volumes { data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(msg.Size())) @@ -205,36 +199,18 @@ func (m *PetSetSpec) MarshalTo(data []byte) (int, error) { i += n } } - data[i] = 0x2a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.ServiceName))) - i += copy(data[i:], m.ServiceName) - return i, nil -} - -func (m *PetSetStatus) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if len(m.VolumeMounts) > 0 { + for _, msg := range m.VolumeMounts { + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } - return data[:n], nil -} - -func (m *PetSetStatus) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ObservedGeneration != nil { - data[i] = 0x8 - i++ - i = encodeVarintGenerated(data, i, uint64(*m.ObservedGeneration)) - } - data[i] = 0x10 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Replicas)) return i, nil } @@ -265,19 +241,17 @@ func encodeVarintGenerated(data []byte, offset int, v uint64) int { data[offset] = uint8(v) return offset + 1 } -func (m *PetSet) Size() (n int) { +func (m *PodPreset) Size() (n int) { var l int _ = l l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *PetSetList) Size() (n int) { +func (m *PodPresetList) Size() (n int) { var l int _ = l l = m.ListMeta.Size() @@ -291,36 +265,35 @@ func (m *PetSetList) Size() (n int) { return n } -func (m *PetSetSpec) Size() (n int) { +func (m *PodPresetSpec) Size() (n int) { var l int _ = l - if m.Replicas != nil { - n += 1 + sovGenerated(uint64(*m.Replicas)) - } - if m.Selector != nil { - l = m.Selector.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = m.Template.Size() + l = m.Selector.Size() n += 1 + l + sovGenerated(uint64(l)) - if len(m.VolumeClaimTemplates) > 0 { - for _, e := range m.VolumeClaimTemplates { + if len(m.Env) > 0 { + for _, e := range m.Env { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } - l = len(m.ServiceName) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *PetSetStatus) Size() (n int) { - var l int - _ = l - if m.ObservedGeneration != nil { - n += 1 + sovGenerated(uint64(*m.ObservedGeneration)) + if len(m.EnvFrom) > 0 { + for _, e := range m.EnvFrom { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Volumes) > 0 { + for _, e := range m.Volumes { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.VolumeMounts) > 0 { + for _, e := range m.VolumeMounts { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } } - n += 1 + sovGenerated(uint64(m.Replicas)) return n } @@ -337,50 +310,38 @@ func sovGenerated(x uint64) (n int) { func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *PetSet) String() string { +func (this *PodPreset) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&PetSet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PetSetSpec", "PetSetSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PetSetStatus", "PetSetStatus", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&PodPreset{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodPresetSpec", "PodPresetSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *PetSetList) String() string { +func (this *PodPresetList) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&PetSetList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PetSet", "PetSet", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&PodPresetList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodPreset", "PodPreset", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *PetSetSpec) String() string { +func (this *PodPresetSpec) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&PetSetSpec{`, - `Replicas:` + valueToStringGenerated(this.Replicas) + `,`, - `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_kubernetes_pkg_api_unversioned.LabelSelector", 1) + `,`, - `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`, - `VolumeClaimTemplates:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeClaimTemplates), "PersistentVolumeClaim", "k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim", 1), `&`, ``, 1) + `,`, - `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`, - `}`, - }, "") - return s -} -func (this *PetSetStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PetSetStatus{`, - `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`, - `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, + s := strings.Join([]string{`&PodPresetSpec{`, + `Selector:` + strings.Replace(strings.Replace(this.Selector.String(), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`, + `Env:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Env), "EnvVar", "k8s_io_kubernetes_pkg_api_v1.EnvVar", 1), `&`, ``, 1) + `,`, + `EnvFrom:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EnvFrom), "EnvFromSource", "k8s_io_kubernetes_pkg_api_v1.EnvFromSource", 1), `&`, ``, 1) + `,`, + `Volumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Volumes), "Volume", "k8s_io_kubernetes_pkg_api_v1.Volume", 1), `&`, ``, 1) + `,`, + `VolumeMounts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeMounts), "VolumeMount", "k8s_io_kubernetes_pkg_api_v1.VolumeMount", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -393,7 +354,7 @@ func valueToStringGenerated(v interface{}) string { pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } -func (m *PetSet) Unmarshal(data []byte) error { +func (m *PodPreset) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -416,10 +377,10 @@ func (m *PetSet) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PetSet: wiretype end group for non-group") + return fmt.Errorf("proto: PodPreset: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PetSet: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PodPreset: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -482,36 +443,6 @@ func (m *PetSet) Unmarshal(data []byte) error { 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:]) @@ -533,7 +464,7 @@ func (m *PetSet) Unmarshal(data []byte) error { } return nil } -func (m *PetSetList) Unmarshal(data []byte) error { +func (m *PodPresetList) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -556,10 +487,10 @@ func (m *PetSetList) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PetSetList: wiretype end group for non-group") + return fmt.Errorf("proto: PodPresetList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PetSetList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PodPresetList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -618,7 +549,7 @@ func (m *PetSetList) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, PetSet{}) + m.Items = append(m.Items, PodPreset{}) if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } @@ -644,7 +575,7 @@ func (m *PetSetList) Unmarshal(data []byte) error { } return nil } -func (m *PetSetSpec) Unmarshal(data []byte) error { +func (m *PodPresetSpec) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -667,33 +598,13 @@ func (m *PetSetSpec) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PetSetSpec: wiretype end group for non-group") + return fmt.Errorf("proto: PodPresetSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PetSetSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PodPresetSpec: 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) } @@ -719,16 +630,44 @@ func (m *PetSetSpec) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Selector == nil { - m.Selector = &k8s_io_kubernetes_pkg_api_unversioned.LabelSelector{} - } if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Env = append(m.Env, k8s_io_kubernetes_pkg_api_v1.EnvVar{}) + if err := m.Env[len(m.Env)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EnvFrom", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -752,13 +691,14 @@ func (m *PetSetSpec) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Template.Unmarshal(data[iNdEx:postIndex]); err != nil { + m.EnvFrom = append(m.EnvFrom, k8s_io_kubernetes_pkg_api_v1.EnvFromSource{}) + if err := m.EnvFrom[len(m.EnvFrom)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VolumeClaimTemplates", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -782,16 +722,16 @@ func (m *PetSetSpec) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.VolumeClaimTemplates = append(m.VolumeClaimTemplates, k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim{}) - if err := m.VolumeClaimTemplates[len(m.VolumeClaimTemplates)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + m.Volumes = append(m.Volumes, k8s_io_kubernetes_pkg_api_v1.Volume{}) + if err := m.Volumes[len(m.Volumes)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VolumeMounts", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -801,110 +741,23 @@ func (m *PetSetSpec) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.ServiceName = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { + m.VolumeMounts = append(m.VolumeMounts, k8s_io_kubernetes_pkg_api_v1.VolumeMount{}) + if err := m.VolumeMounts[len(m.VolumeMounts)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PetSetStatus) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PetSetStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PetSetStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ObservedGeneration = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) - } - m.Replicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Replicas |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -1032,44 +885,40 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 611 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6f, 0xd3, 0x4c, - 0x10, 0xc6, 0xeb, 0xa6, 0xa9, 0xfc, 0x6e, 0xf3, 0x22, 0xb4, 0x54, 0x28, 0x8a, 0x50, 0x8a, 0x72, - 0x8a, 0x50, 0xb3, 0x26, 0x85, 0xa2, 0x9e, 0x8d, 0x04, 0x42, 0x02, 0x5a, 0x39, 0x10, 0x21, 0x10, - 0x48, 0x6b, 0x67, 0x48, 0x97, 0xd8, 0x5e, 0xcb, 0xbb, 0xce, 0x99, 0x03, 0xdc, 0x39, 0xf3, 0x31, - 0xf8, 0x08, 0x9c, 0x72, 0xec, 0x91, 0x53, 0x05, 0xe5, 0x8b, 0xb0, 0x5e, 0xff, 0x49, 0xa8, 0x93, - 0x96, 0x1e, 0x36, 0xca, 0xee, 0xce, 0xf3, 0xdb, 0x99, 0x67, 0xc6, 0xe8, 0x60, 0x72, 0x20, 0x08, - 0xe3, 0xd6, 0x24, 0x71, 0x21, 0x0e, 0x41, 0x82, 0xb0, 0xa2, 0xc9, 0xd8, 0xa2, 0x11, 0x13, 0xea, - 0x27, 0x12, 0xd6, 0xb4, 0x4f, 0xfd, 0xe8, 0x98, 0xf6, 0xad, 0x31, 0x84, 0x10, 0x53, 0x09, 0x23, - 0x12, 0xc5, 0x5c, 0x72, 0xdc, 0xcd, 0x94, 0x64, 0xae, 0x24, 0x4a, 0x49, 0x52, 0x25, 0x49, 0x95, - 0xa4, 0x50, 0xb6, 0x7a, 0x63, 0x26, 0x8f, 0x13, 0x97, 0x78, 0x3c, 0xb0, 0xc6, 0x7c, 0xcc, 0x2d, - 0x0d, 0x70, 0x93, 0xf7, 0x7a, 0xa7, 0x37, 0xfa, 0x5f, 0x06, 0x6e, 0xed, 0xad, 0x4c, 0xc9, 0x8a, - 0x41, 0xf0, 0x24, 0xf6, 0xe0, 0x7c, 0x32, 0xad, 0xfd, 0xd5, 0x9a, 0x24, 0x9c, 0x42, 0x2c, 0x18, - 0x0f, 0x61, 0x54, 0x91, 0xed, 0xae, 0x96, 0x4d, 0x2b, 0x15, 0xb7, 0x7a, 0xcb, 0xa3, 0xe3, 0x24, - 0x94, 0x2c, 0xa8, 0xe6, 0xd4, 0x5f, 0x1e, 0x9e, 0x48, 0xe6, 0x5b, 0x2c, 0x94, 0x42, 0xc6, 0xe7, - 0x25, 0x9d, 0xaf, 0xeb, 0x68, 0xf3, 0x08, 0xe4, 0x00, 0x24, 0x7e, 0x85, 0xcc, 0x00, 0x24, 0x1d, - 0x51, 0x49, 0x9b, 0xc6, 0x6d, 0xa3, 0xbb, 0xb5, 0xd7, 0x25, 0x2b, 0x1d, 0x57, 0x5e, 0x93, 0x43, - 0xf7, 0x03, 0x78, 0xf2, 0x99, 0xd2, 0xd8, 0x78, 0x76, 0xba, 0xb3, 0x76, 0x76, 0xba, 0x83, 0xe6, - 0x67, 0x4e, 0x49, 0xc3, 0x43, 0xb4, 0x21, 0x22, 0xf0, 0x9a, 0xeb, 0x9a, 0x7a, 0x9f, 0xfc, 0x6b, - 0x1f, 0x49, 0x96, 0xd9, 0x40, 0x69, 0xed, 0x46, 0xfe, 0xc2, 0x46, 0xba, 0x73, 0x34, 0x0f, 0xbf, - 0x43, 0x9b, 0x42, 0x52, 0x99, 0x88, 0x66, 0x4d, 0x93, 0x1f, 0x5c, 0x99, 0xac, 0xd5, 0xf6, 0xb5, - 0x9c, 0xbd, 0x99, 0xed, 0x9d, 0x9c, 0xda, 0xf9, 0x6e, 0x20, 0x94, 0x05, 0x3e, 0x65, 0x42, 0xe2, - 0xb7, 0x15, 0x83, 0xac, 0x0b, 0x0c, 0x5a, 0x98, 0x02, 0x92, 0xca, 0xb5, 0x4f, 0xd7, 0xf3, 0x97, - 0xcc, 0xe2, 0x64, 0xc1, 0xa5, 0x97, 0xa8, 0xce, 0x24, 0x04, 0x42, 0xd9, 0x54, 0x53, 0xec, 0xbb, - 0x57, 0x2d, 0xc6, 0xfe, 0x3f, 0x87, 0xd7, 0x9f, 0xa4, 0x18, 0x27, 0xa3, 0x75, 0xbe, 0xd5, 0x8a, - 0x22, 0x52, 0xe7, 0x70, 0x17, 0x99, 0x31, 0x44, 0x3e, 0xf3, 0xa8, 0xd0, 0x45, 0xd4, 0xed, 0x46, - 0x9a, 0x8f, 0x93, 0x9f, 0x39, 0xe5, 0xad, 0x72, 0xd7, 0x14, 0xe0, 0xab, 0x6e, 0xf2, 0xf8, 0xf2, - 0xce, 0xfd, 0x5d, 0x2e, 0x75, 0xc1, 0x1f, 0xe4, 0xda, 0x8c, 0x5f, 0xec, 0x9c, 0x92, 0x89, 0xdf, - 0x20, 0x53, 0x25, 0x18, 0xf9, 0x6a, 0x1a, 0xf3, 0xfe, 0xf5, 0x2e, 0x9e, 0xb7, 0x23, 0x3e, 0x7a, - 0x91, 0x0b, 0xf4, 0x48, 0x94, 0x66, 0x16, 0xa7, 0x4e, 0x09, 0xc4, 0x9f, 0x0d, 0xb4, 0x3d, 0xe5, - 0x7e, 0x12, 0xc0, 0x43, 0x9f, 0xb2, 0xa0, 0x88, 0x10, 0xcd, 0x0d, 0x6d, 0xee, 0xbd, 0x4b, 0x5e, - 0x4a, 0x4b, 0x11, 0x12, 0x42, 0x39, 0x9c, 0x33, 0xec, 0x5b, 0xf9, 0x7b, 0xdb, 0xc3, 0x25, 0x60, - 0x67, 0xe9, 0x73, 0x78, 0x1f, 0x6d, 0x09, 0x88, 0xa7, 0xcc, 0x83, 0xe7, 0x34, 0x80, 0x66, 0x5d, - 0xd5, 0xf9, 0x9f, 0x7d, 0x23, 0x07, 0x6d, 0x0d, 0xe6, 0x57, 0xce, 0x62, 0x5c, 0xe7, 0x93, 0x81, - 0x1a, 0x8b, 0x23, 0x8a, 0x1f, 0x21, 0xcc, 0xdd, 0x34, 0x02, 0x46, 0x8f, 0xb3, 0x4f, 0x58, 0x59, - 0xad, 0x1b, 0x58, 0xb3, 0x6f, 0x2a, 0x14, 0x3e, 0xac, 0xdc, 0x3a, 0x4b, 0x14, 0x78, 0x77, 0xa1, - 0xfd, 0xeb, 0xba, 0xfd, 0xa5, 0x8b, 0xd5, 0x11, 0xb0, 0xef, 0xcc, 0x7e, 0xb5, 0xd7, 0x4e, 0xd4, - 0xfa, 0xa1, 0xd6, 0xc7, 0xb3, 0xb6, 0x31, 0x53, 0xeb, 0x44, 0xad, 0x9f, 0x6a, 0x7d, 0xf9, 0xdd, - 0x5e, 0x7b, 0x6d, 0x16, 0x43, 0xf8, 0x27, 0x00, 0x00, 0xff, 0xff, 0x14, 0xcf, 0x45, 0x01, 0xd8, - 0x05, 0x00, 0x00, + // 550 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x8b, 0xd3, 0x40, + 0x14, 0xc7, 0x9b, 0x6d, 0x4b, 0xeb, 0xb4, 0x8b, 0x12, 0x3c, 0x84, 0x1e, 0xb2, 0x4b, 0xf1, 0xb0, + 0xea, 0x3a, 0xb1, 0xab, 0xa8, 0xa0, 0xa7, 0xc8, 0x0a, 0x82, 0xcb, 0x2e, 0x29, 0xf4, 0x20, 0x2b, + 0x38, 0x4d, 0x9f, 0x69, 0x6c, 0x93, 0x09, 0x33, 0x93, 0xa0, 0x37, 0x3f, 0x82, 0x5f, 0x4a, 0x28, + 0xe8, 0x61, 0x8f, 0x9e, 0x16, 0x5b, 0xbf, 0x88, 0xcc, 0x74, 0xd2, 0x44, 0xba, 0x65, 0xab, 0xb7, + 0x79, 0x8f, 0xf7, 0xff, 0xbd, 0xff, 0x3f, 0x2f, 0xe8, 0xc5, 0xe4, 0x19, 0xc7, 0x21, 0x75, 0x26, + 0xe9, 0x10, 0x58, 0x0c, 0x02, 0xb8, 0x93, 0x4c, 0x02, 0x87, 0x24, 0x21, 0x77, 0x38, 0x08, 0x11, + 0xc6, 0x01, 0x77, 0xb2, 0x1e, 0x99, 0x26, 0x63, 0xd2, 0x73, 0x02, 0x88, 0x81, 0x11, 0x01, 0x23, + 0x9c, 0x30, 0x2a, 0xa8, 0x79, 0xb8, 0x54, 0xe3, 0x42, 0x8d, 0x93, 0x49, 0x80, 0xa5, 0x1a, 0xe7, + 0x6a, 0x9c, 0xab, 0x3b, 0x0f, 0x82, 0x50, 0x8c, 0xd3, 0x21, 0xf6, 0x69, 0xe4, 0x04, 0x34, 0xa0, + 0x8e, 0x82, 0x0c, 0xd3, 0x0f, 0xaa, 0x52, 0x85, 0x7a, 0x2d, 0xe1, 0x9d, 0xc7, 0xda, 0x1a, 0x49, + 0xc2, 0x88, 0xf8, 0xe3, 0x30, 0x06, 0xf6, 0xb9, 0x30, 0x17, 0x81, 0x20, 0x4e, 0xb6, 0x66, 0xa9, + 0xe3, 0x6c, 0x52, 0xb1, 0x34, 0x16, 0x61, 0x04, 0x6b, 0x82, 0x27, 0xd7, 0x09, 0xb8, 0x3f, 0x86, + 0x88, 0xac, 0xe9, 0x4a, 0xf6, 0x38, 0xb0, 0x0c, 0x58, 0xe1, 0x0d, 0x3e, 0x91, 0x28, 0x99, 0xc2, + 0x55, 0xf6, 0x0e, 0x37, 0x7e, 0xef, 0x2b, 0xa6, 0xbb, 0x3f, 0x0c, 0x74, 0xe3, 0x8c, 0x8e, 0xce, + 0x18, 0x70, 0x10, 0xe6, 0x7b, 0xd4, 0x94, 0xa9, 0x47, 0x44, 0x10, 0xcb, 0xd8, 0x37, 0x0e, 0x5a, + 0x47, 0x0f, 0xb1, 0x3e, 0x40, 0xd9, 0x7c, 0x71, 0x02, 0x39, 0x8d, 0xb3, 0x1e, 0x3e, 0x1d, 0x7e, + 0x04, 0x5f, 0x9c, 0x80, 0x20, 0xae, 0x39, 0xbb, 0xdc, 0xab, 0x2c, 0x2e, 0xf7, 0x50, 0xd1, 0xf3, + 0x56, 0x54, 0xf3, 0x1d, 0xaa, 0xf1, 0x04, 0x7c, 0x6b, 0x47, 0xd1, 0x9f, 0xe3, 0x7f, 0x39, 0x2f, + 0x5e, 0x19, 0xed, 0x27, 0xe0, 0xbb, 0x6d, 0xbd, 0xa8, 0x26, 0x2b, 0x4f, 0x61, 0xbb, 0xdf, 0x0d, + 0xb4, 0xbb, 0x9a, 0x7a, 0x13, 0x72, 0x61, 0x9e, 0xaf, 0x45, 0xc2, 0xdb, 0x45, 0x92, 0x6a, 0x15, + 0xe8, 0x96, 0xde, 0xd3, 0xcc, 0x3b, 0xa5, 0x38, 0xe7, 0xa8, 0x1e, 0x0a, 0x88, 0xb8, 0xb5, 0xb3, + 0x5f, 0x3d, 0x68, 0x1d, 0x3d, 0xfd, 0xcf, 0x3c, 0xee, 0xae, 0xde, 0x51, 0x7f, 0x2d, 0x69, 0xde, + 0x12, 0xda, 0xfd, 0x56, 0x2d, 0xa5, 0x91, 0x29, 0x4d, 0x82, 0x9a, 0x1c, 0xa6, 0xe0, 0x0b, 0xca, + 0x74, 0x9a, 0x47, 0x5b, 0xa6, 0x21, 0x43, 0x98, 0xf6, 0xb5, 0xb4, 0x88, 0x94, 0x77, 0xbc, 0x15, + 0xd6, 0x7c, 0x89, 0xaa, 0x10, 0x67, 0x3a, 0xd0, 0x9d, 0xcd, 0x81, 0x24, 0xf5, 0x38, 0xce, 0x06, + 0x84, 0xb9, 0x2d, 0x8d, 0xab, 0x1e, 0xc7, 0x99, 0x27, 0xd5, 0xe6, 0x00, 0x35, 0x20, 0xce, 0x5e, + 0x31, 0x1a, 0x59, 0x55, 0x05, 0xba, 0x7f, 0x2d, 0x48, 0x0e, 0xf7, 0x69, 0xca, 0x7c, 0x70, 0x6f, + 0x6a, 0x5e, 0x43, 0xb7, 0xbd, 0x1c, 0x66, 0x9e, 0xa2, 0x46, 0x46, 0xa7, 0x69, 0x04, 0xdc, 0xaa, + 0x6d, 0x63, 0x70, 0xa0, 0x86, 0x0b, 0xe0, 0xb2, 0xe6, 0x5e, 0x4e, 0x31, 0x7d, 0xd4, 0x5e, 0x3e, + 0x4f, 0x68, 0x1a, 0x0b, 0x6e, 0xd5, 0x15, 0xf5, 0xee, 0x36, 0x54, 0xa5, 0x70, 0x6f, 0x6b, 0x74, + 0xbb, 0xd4, 0xe4, 0xde, 0x5f, 0x50, 0xf7, 0xde, 0x6c, 0x6e, 0x57, 0x2e, 0xe6, 0x76, 0xe5, 0xe7, + 0xdc, 0xae, 0x7c, 0x59, 0xd8, 0xc6, 0x6c, 0x61, 0x1b, 0x17, 0x0b, 0xdb, 0xf8, 0xb5, 0xb0, 0x8d, + 0xaf, 0xbf, 0xed, 0xca, 0xdb, 0x66, 0xfe, 0x4f, 0xfc, 0x09, 0x00, 0x00, 0xff, 0xff, 0x91, 0x84, + 0x03, 0x10, 0x2f, 0x05, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.proto new file mode 100644 index 000000000..b5a80fa63 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.proto @@ -0,0 +1,76 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.kubernetes.pkg.apis.settings.v1alpha1; + +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1alpha1"; + +// PodPreset is a policy resource that defines additional runtime +// requirements for a Pod. +message PodPreset { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // +optional + optional PodPresetSpec spec = 2; +} + +// PodPresetList is a list of PodPreset objects. +message PodPresetList { + // Standard list metadata. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is a list of schema objects. + repeated PodPreset items = 2; +} + +// PodPresetSpec is a description of a pod injection policy. +message PodPresetSpec { + // Selector is a label query over a set of resources, in this case pods. + // Required. + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1; + + // Env defines the collection of EnvVar to inject into containers. + // +optional + repeated k8s.io.kubernetes.pkg.api.v1.EnvVar env = 2; + + // EnvFrom defines the collection of EnvFromSource to inject into containers. + // +optional + repeated k8s.io.kubernetes.pkg.api.v1.EnvFromSource envFrom = 3; + + // Volumes defines the collection of Volume to inject into the pod. + // +optional + repeated k8s.io.kubernetes.pkg.api.v1.Volume volumes = 4; + + // VolumeMounts defines the collection of VolumeMount to inject into containers. + // +optional + repeated k8s.io.kubernetes.pkg.api.v1.VolumeMount volumeMounts = 5; +} + diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/register.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/register.go new file mode 100644 index 000000000..45afb50ca --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/register.go @@ -0,0 +1,49 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "settings.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &PodPreset{}, + &PodPresetList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/types.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/types.go new file mode 100644 index 000000000..5b0c5d19f --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/types.go @@ -0,0 +1,67 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/pkg/api/v1" +) + +// +genclient=true + +// PodPreset is a policy resource that defines additional runtime +// requirements for a Pod. +type PodPreset struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // +optional + Spec PodPresetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// PodPresetSpec is a description of a pod injection policy. +type PodPresetSpec struct { + // Selector is a label query over a set of resources, in this case pods. + // Required. + Selector metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"` + + // Env defines the collection of EnvVar to inject into containers. + // +optional + Env []v1.EnvVar `json:"env,omitempty" protobuf:"bytes,2,rep,name=env"` + // EnvFrom defines the collection of EnvFromSource to inject into containers. + // +optional + EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,3,rep,name=envFrom"` + // Volumes defines the collection of Volume to inject into the pod. + // +optional + Volumes []v1.Volume `json:"volumes,omitempty" protobuf:"bytes,4,rep,name=volumes"` + // VolumeMounts defines the collection of VolumeMount to inject into containers. + // +optional + VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty" protobuf:"bytes,5,rep,name=volumeMounts"` +} + +// PodPresetList is a list of PodPreset objects. +type PodPresetList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of schema objects. + Items []PodPreset `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go new file mode 100644 index 000000000..5b4dc665d --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go @@ -0,0 +1,61 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_PodPreset = map[string]string{ + "": "PodPreset is a policy resource that defines additional runtime requirements for a Pod.", +} + +func (PodPreset) SwaggerDoc() map[string]string { + return map_PodPreset +} + +var map_PodPresetList = map[string]string{ + "": "PodPresetList is a list of PodPreset objects.", + "metadata": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "items": "Items is a list of schema objects.", +} + +func (PodPresetList) SwaggerDoc() map[string]string { + return map_PodPresetList +} + +var map_PodPresetSpec = map[string]string{ + "": "PodPresetSpec is a description of a pod injection policy.", + "selector": "Selector is a label query over a set of resources, in this case pods. Required.", + "env": "Env defines the collection of EnvVar to inject into containers.", + "envFrom": "EnvFrom defines the collection of EnvFromSource to inject into containers.", + "volumes": "Volumes defines the collection of Volume to inject into the pod.", + "volumeMounts": "VolumeMounts defines the collection of VolumeMount to inject into containers.", +} + +func (PodPresetSpec) SwaggerDoc() map[string]string { + return map_PodPresetSpec +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.conversion.go new file mode 100644 index 000000000..304af7ea0 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,159 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1alpha1 + +import ( + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + settings "k8s.io/client-go/pkg/apis/settings" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1alpha1_PodPreset_To_settings_PodPreset, + Convert_settings_PodPreset_To_v1alpha1_PodPreset, + Convert_v1alpha1_PodPresetList_To_settings_PodPresetList, + Convert_settings_PodPresetList_To_v1alpha1_PodPresetList, + Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec, + Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec, + ) +} + +func autoConvert_v1alpha1_PodPreset_To_settings_PodPreset(in *PodPreset, out *settings.PodPreset, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +func Convert_v1alpha1_PodPreset_To_settings_PodPreset(in *PodPreset, out *settings.PodPreset, s conversion.Scope) error { + return autoConvert_v1alpha1_PodPreset_To_settings_PodPreset(in, out, s) +} + +func autoConvert_settings_PodPreset_To_v1alpha1_PodPreset(in *settings.PodPreset, out *PodPreset, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +func Convert_settings_PodPreset_To_v1alpha1_PodPreset(in *settings.PodPreset, out *PodPreset, s conversion.Scope) error { + return autoConvert_settings_PodPreset_To_v1alpha1_PodPreset(in, out, s) +} + +func autoConvert_v1alpha1_PodPresetList_To_settings_PodPresetList(in *PodPresetList, out *settings.PodPresetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]settings.PodPreset, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_PodPreset_To_settings_PodPreset(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_v1alpha1_PodPresetList_To_settings_PodPresetList(in *PodPresetList, out *settings.PodPresetList, s conversion.Scope) error { + return autoConvert_v1alpha1_PodPresetList_To_settings_PodPresetList(in, out, s) +} + +func autoConvert_settings_PodPresetList_To_v1alpha1_PodPresetList(in *settings.PodPresetList, out *PodPresetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PodPreset, len(*in)) + for i := range *in { + if err := Convert_settings_PodPreset_To_v1alpha1_PodPreset(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = make([]PodPreset, 0) + } + return nil +} + +func Convert_settings_PodPresetList_To_v1alpha1_PodPresetList(in *settings.PodPresetList, out *PodPresetList, s conversion.Scope) error { + return autoConvert_settings_PodPresetList_To_v1alpha1_PodPresetList(in, out, s) +} + +func autoConvert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in *PodPresetSpec, out *settings.PodPresetSpec, s conversion.Scope) error { + out.Selector = in.Selector + out.Env = *(*[]api.EnvVar)(unsafe.Pointer(&in.Env)) + out.EnvFrom = *(*[]api.EnvFromSource)(unsafe.Pointer(&in.EnvFrom)) + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]api.Volume, len(*in)) + for i := range *in { + // TODO: Inefficient conversion - can we improve it? + if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil { + return err + } + } + } else { + out.Volumes = nil + } + out.VolumeMounts = *(*[]api.VolumeMount)(unsafe.Pointer(&in.VolumeMounts)) + return nil +} + +func Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in *PodPresetSpec, out *settings.PodPresetSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in, out, s) +} + +func autoConvert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in *settings.PodPresetSpec, out *PodPresetSpec, s conversion.Scope) error { + out.Selector = in.Selector + out.Env = *(*[]v1.EnvVar)(unsafe.Pointer(&in.Env)) + out.EnvFrom = *(*[]v1.EnvFromSource)(unsafe.Pointer(&in.EnvFrom)) + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]v1.Volume, len(*in)) + for i := range *in { + // TODO: Inefficient conversion - can we improve it? + if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil { + return err + } + } + } else { + out.Volumes = nil + } + out.VolumeMounts = *(*[]v1.VolumeMount)(unsafe.Pointer(&in.VolumeMounts)) + return nil +} + +func Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in *settings.PodPresetSpec, out *PodPresetSpec, s conversion.Scope) error { + return autoConvert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in, out, s) +} diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 000000000..017d8ccb0 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,124 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + api_v1 "k8s.io/client-go/pkg/api/v1" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPreset, InType: reflect.TypeOf(&PodPreset{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPresetList, InType: reflect.TypeOf(&PodPresetList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPresetSpec, InType: reflect.TypeOf(&PodPresetSpec{})}, + ) +} + +func DeepCopy_v1alpha1_PodPreset(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodPreset) + out := out.(*PodPreset) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_v1alpha1_PodPresetSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_v1alpha1_PodPresetList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodPresetList) + out := out.(*PodPresetList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PodPreset, len(*in)) + for i := range *in { + if err := DeepCopy_v1alpha1_PodPreset(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1alpha1_PodPresetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodPresetSpec) + out := out.(*PodPresetSpec) + *out = *in + if newVal, err := c.DeepCopy(&in.Selector); err != nil { + return err + } else { + out.Selector = *newVal.(*v1.LabelSelector) + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]api_v1.EnvVar, len(*in)) + for i := range *in { + if err := api_v1.DeepCopy_v1_EnvVar(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + if in.EnvFrom != nil { + in, out := &in.EnvFrom, &out.EnvFrom + *out = make([]api_v1.EnvFromSource, len(*in)) + for i := range *in { + if err := api_v1.DeepCopy_v1_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]api_v1.Volume, len(*in)) + for i := range *in { + if err := api_v1.DeepCopy_v1_Volume(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + if in.VolumeMounts != nil { + in, out := &in.VolumeMounts, &out.VolumeMounts + *out = make([]api_v1.VolumeMount, len(*in)) + copy(*out, *in) + } + return nil + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.defaults.go new file mode 100644 index 000000000..c178a3072 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,98 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" + v1 "k8s.io/client-go/pkg/api/v1" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&PodPreset{}, func(obj interface{}) { SetObjectDefaults_PodPreset(obj.(*PodPreset)) }) + scheme.AddTypeDefaultingFunc(&PodPresetList{}, func(obj interface{}) { SetObjectDefaults_PodPresetList(obj.(*PodPresetList)) }) + return nil +} + +func SetObjectDefaults_PodPreset(in *PodPreset) { + for i := range in.Spec.Env { + a := &in.Spec.Env[i] + if a.ValueFrom != nil { + if a.ValueFrom.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(a.ValueFrom.FieldRef) + } + } + } + for i := range in.Spec.Volumes { + a := &in.Spec.Volumes[i] + v1.SetDefaults_Volume(a) + if a.VolumeSource.Secret != nil { + v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret) + } + if a.VolumeSource.ISCSI != nil { + v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI) + } + if a.VolumeSource.RBD != nil { + v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD) + } + if a.VolumeSource.DownwardAPI != nil { + v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI) + for j := range a.VolumeSource.DownwardAPI.Items { + b := &a.VolumeSource.DownwardAPI.Items[j] + if b.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(b.FieldRef) + } + } + } + if a.VolumeSource.ConfigMap != nil { + v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap) + } + if a.VolumeSource.AzureDisk != nil { + v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk) + } + if a.VolumeSource.Projected != nil { + v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected) + for j := range a.VolumeSource.Projected.Sources { + b := &a.VolumeSource.Projected.Sources[j] + if b.DownwardAPI != nil { + for k := range b.DownwardAPI.Items { + c := &b.DownwardAPI.Items[k] + if c.FieldRef != nil { + v1.SetDefaults_ObjectFieldSelector(c.FieldRef) + } + } + } + } + } + if a.VolumeSource.ScaleIO != nil { + v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) + } + } +} + +func SetObjectDefaults_PodPresetList(in *PodPresetList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_PodPreset(a) + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/settings/zz_generated.deepcopy.go new file mode 100644 index 000000000..eb109b553 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/settings/zz_generated.deepcopy.go @@ -0,0 +1,124 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package settings + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + api "k8s.io/client-go/pkg/api" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPreset, InType: reflect.TypeOf(&PodPreset{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPresetList, InType: reflect.TypeOf(&PodPresetList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPresetSpec, InType: reflect.TypeOf(&PodPresetSpec{})}, + ) +} + +func DeepCopy_settings_PodPreset(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodPreset) + out := out.(*PodPreset) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_settings_PodPresetSpec(&in.Spec, &out.Spec, c); err != nil { + return err + } + return nil + } +} + +func DeepCopy_settings_PodPresetList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodPresetList) + out := out.(*PodPresetList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PodPreset, len(*in)) + for i := range *in { + if err := DeepCopy_settings_PodPreset(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_settings_PodPresetSpec(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodPresetSpec) + out := out.(*PodPresetSpec) + *out = *in + if newVal, err := c.DeepCopy(&in.Selector); err != nil { + return err + } else { + out.Selector = *newVal.(*v1.LabelSelector) + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]api.EnvVar, len(*in)) + for i := range *in { + if err := api.DeepCopy_api_EnvVar(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + if in.EnvFrom != nil { + in, out := &in.EnvFrom, &out.EnvFrom + *out = make([]api.EnvFromSource, len(*in)) + for i := range *in { + if err := api.DeepCopy_api_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]api.Volume, len(*in)) + for i := range *in { + if err := api.DeepCopy_api_Volume(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + if in.VolumeMounts != nil { + in, out := &in.VolumeMounts, &out.VolumeMounts + *out = make([]api.VolumeMount, len(*in)) + copy(*out, *in) + } + return nil + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/OWNERS b/vendor/k8s.io/client-go/pkg/apis/storage/OWNERS new file mode 100755 index 000000000..d59ed6e1d --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/storage/OWNERS @@ -0,0 +1,3 @@ +reviewers: +- deads2k +- mbohlool diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/doc.go b/vendor/k8s.io/client-go/pkg/apis/storage/doc.go new file mode 100644 index 000000000..ef6d2a9ba --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/storage/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +groupName=storage.k8s.io +package storage diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/install/install.go b/vendor/k8s.io/client-go/pkg/apis/storage/install/install.go similarity index 55% rename from vendor/k8s.io/client-go/1.5/pkg/apis/storage/install/install.go rename to vendor/k8s.io/client-go/pkg/apis/storage/install/install.go index 175ee2c71..fb590fecd 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/install/install.go +++ b/vendor/k8s.io/client-go/pkg/apis/storage/install/install.go @@ -19,25 +19,36 @@ limitations under the License. package install import ( - "k8s.io/client-go/1.5/pkg/apimachinery/announced" - "k8s.io/client-go/1.5/pkg/apis/storage" - "k8s.io/client-go/1.5/pkg/apis/storage/v1beta1" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/apis/storage" + "k8s.io/client-go/pkg/apis/storage/v1" + "k8s.io/client-go/pkg/apis/storage/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ - GroupName: storage.GroupName, - VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version}, - ImportPrefix: "k8s.io/client-go/1.5/pkg/apis/storage", + GroupName: storage.GroupName, + // TODO: change the order when GKE supports v1 + VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version, v1.SchemeGroupVersion.Version}, + ImportPrefix: "k8s.io/client-go/pkg/apis/storage", RootScopedKinds: sets.NewString("StorageClass"), AddInternalObjectsToScheme: storage.AddToScheme, }, announced.VersionToSchemeFunc{ + v1.SchemeGroupVersion.Version: v1.AddToScheme, v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/register.go b/vendor/k8s.io/client-go/pkg/apis/storage/register.go similarity index 76% rename from vendor/k8s.io/client-go/1.5/pkg/apis/storage/register.go rename to vendor/k8s.io/client-go/pkg/apis/storage/register.go index d71cdf61e..aaa619b4d 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/storage/register.go @@ -17,24 +17,23 @@ limitations under the License. package storage import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "storage.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} // Kind takes an unqualified kind and returns a Group qualified GroupKind -func Kind(kind string) unversioned.GroupKind { +func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) unversioned.GroupResource { +func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } @@ -45,10 +44,6 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &api.ListOptions{}, - &api.DeleteOptions{}, - &api.ExportOptions{}, - &StorageClass{}, &StorageClassList{}, ) diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/types.go b/vendor/k8s.io/client-go/pkg/apis/storage/types.go similarity index 82% rename from vendor/k8s.io/client-go/1.5/pkg/apis/storage/types.go rename to vendor/k8s.io/client-go/pkg/apis/storage/types.go index 20b70cee6..3d589de5c 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/types.go +++ b/vendor/k8s.io/client-go/pkg/apis/storage/types.go @@ -16,10 +16,7 @@ limitations under the License. package storage -import ( - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient=true // +nonNamespaced=true @@ -31,30 +28,33 @@ import ( // called "profiles" in other storage systems. // The name of a StorageClass object is significant, and is how users can request a particular class. type StorageClass struct { - unversioned.TypeMeta `json:",inline"` - api.ObjectMeta `json:"metadata,omitempty"` + metav1.TypeMeta + // +optional + metav1.ObjectMeta // provisioner is the driver expected to handle this StorageClass. // This is an optionally-prefixed name, like a label key. // For example: "kubernetes.io/gce-pd" or "kubernetes.io/aws-ebs". // This value may not be empty. - Provisioner string `json:"provisioner"` + Provisioner string // parameters holds parameters for the provisioner. // These values are opaque to the system and are passed directly // to the provisioner. The only validation done on keys is that they are // not empty. The maximum number of parameters is // 512, with a cumulative max size of 256K - Parameters map[string]string `json:"parameters,omitempty"` + // +optional + Parameters map[string]string } // StorageClassList is a collection of storage classes. type StorageClassList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta // Standard list metadata // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty"` + // +optional + metav1.ListMeta // Items is the list of StorageClasses - Items []StorageClass `json:"items"` + Items []StorageClass } diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/doc.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/doc.go new file mode 100644 index 000000000..2b8d05cfd --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +groupName=storage.k8s.io +package v1 diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/generated.pb.go new file mode 100644 index 000000000..531282ba6 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/generated.pb.go @@ -0,0 +1,730 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. +// source: k8s.io/kubernetes/pkg/apis/storage/v1/generated.proto +// DO NOT EDIT! + +/* + Package v1 is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/pkg/apis/storage/v1/generated.proto + + It has these top-level messages: + StorageClass + StorageClassList +*/ +package v1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +const _ = proto.GoGoProtoPackageIsVersion1 + +func (m *StorageClass) Reset() { *m = StorageClass{} } +func (*StorageClass) ProtoMessage() {} +func (*StorageClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func (m *StorageClassList) Reset() { *m = StorageClassList{} } +func (*StorageClassList) ProtoMessage() {} +func (*StorageClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func init() { + proto.RegisterType((*StorageClass)(nil), "k8s.io.client-go.pkg.apis.storage.v1.StorageClass") + proto.RegisterType((*StorageClassList)(nil), "k8s.io.client-go.pkg.apis.storage.v1.StorageClassList") +} +func (m *StorageClass) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *StorageClass) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n1, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Provisioner))) + i += copy(data[i:], m.Provisioner) + if len(m.Parameters) > 0 { + for k := range m.Parameters { + data[i] = 0x1a + i++ + v := m.Parameters[k] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + return i, nil +} + +func (m *StorageClassList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *StorageClassList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n2, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func encodeFixed64Generated(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Generated(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintGenerated(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} +func (m *StorageClass) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Provisioner) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Parameters) > 0 { + for k, v := range m.Parameters { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + return n +} + +func (m *StorageClassList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *StorageClass) String() string { + if this == nil { + return "nil" + } + keysForParameters := make([]string, 0, len(this.Parameters)) + for k := range this.Parameters { + keysForParameters = append(keysForParameters, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForParameters) + mapStringForParameters := "map[string]string{" + for _, k := range keysForParameters { + mapStringForParameters += fmt.Sprintf("%v: %v,", k, this.Parameters[k]) + } + mapStringForParameters += "}" + s := strings.Join([]string{`&StorageClass{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`, + `Parameters:` + mapStringForParameters + `,`, + `}`, + }, "") + return s +} +func (this *StorageClassList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StorageClassList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StorageClass", "StorageClass", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *StorageClass) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageClass: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provisioner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provisioner = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + 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.Parameters == nil { + m.Parameters = make(map[string]string) + } + m.Parameters[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageClassList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageClassList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageClassList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, StorageClass{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorGenerated = []byte{ + // 474 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x92, 0x4f, 0x6f, 0xd3, 0x30, + 0x18, 0xc6, 0xe3, 0x54, 0x95, 0x36, 0x17, 0x44, 0x15, 0x38, 0x54, 0x3d, 0x64, 0xd5, 0x04, 0x52, + 0x2f, 0xd8, 0x74, 0x63, 0x68, 0x42, 0xe2, 0xd2, 0x89, 0x03, 0x12, 0x88, 0x29, 0x5c, 0x10, 0xe2, + 0x80, 0xdb, 0xbd, 0xa4, 0x26, 0x4d, 0x1c, 0xd9, 0x6f, 0x02, 0xbd, 0xf1, 0x11, 0xf8, 0x58, 0x15, + 0xa7, 0x1d, 0x39, 0x0d, 0x1a, 0xbe, 0x08, 0xca, 0x1f, 0x96, 0x88, 0x6c, 0xa2, 0xda, 0x2d, 0xaf, + 0xed, 0xdf, 0xe3, 0xe7, 0x79, 0x1c, 0x7a, 0x14, 0x1c, 0x1b, 0x26, 0x15, 0x0f, 0x92, 0x19, 0xe8, + 0x08, 0x10, 0x0c, 0x8f, 0x03, 0x9f, 0x8b, 0x58, 0x1a, 0x6e, 0x50, 0x69, 0xe1, 0x03, 0x4f, 0x27, + 0xdc, 0x87, 0x08, 0xb4, 0x40, 0x38, 0x63, 0xb1, 0x56, 0xa8, 0x9c, 0x07, 0x25, 0xc6, 0x6a, 0x8c, + 0xc5, 0x81, 0xcf, 0x72, 0x8c, 0x55, 0x18, 0x4b, 0x27, 0xc3, 0x87, 0xbe, 0xc4, 0x45, 0x32, 0x63, + 0x73, 0x15, 0x72, 0x5f, 0xf9, 0x8a, 0x17, 0xf4, 0x2c, 0xf9, 0x58, 0x4c, 0xc5, 0x50, 0x7c, 0x95, + 0xaa, 0xc3, 0xc7, 0x95, 0x19, 0x11, 0xcb, 0x50, 0xcc, 0x17, 0x32, 0x02, 0xbd, 0xaa, 0xed, 0x84, + 0x80, 0xe2, 0x0a, 0x2f, 0x43, 0x7e, 0x1d, 0xa5, 0x93, 0x08, 0x65, 0x08, 0x2d, 0xe0, 0xc9, 0xff, + 0x00, 0x33, 0x5f, 0x40, 0x28, 0x5a, 0xdc, 0xe1, 0x75, 0x5c, 0x82, 0x72, 0xc9, 0x65, 0x84, 0x06, + 0x75, 0x0b, 0x6a, 0x64, 0x32, 0xa0, 0x53, 0xd0, 0x75, 0x20, 0xf8, 0x22, 0xc2, 0x78, 0x79, 0x55, + 0xbf, 0xfb, 0x3f, 0x6d, 0x7a, 0xeb, 0x4d, 0xd9, 0xe3, 0xc9, 0x52, 0x18, 0xe3, 0x7c, 0xa0, 0x3b, + 0x79, 0xfe, 0x33, 0x81, 0x62, 0x40, 0x46, 0x64, 0xdc, 0x3b, 0x78, 0xc4, 0xaa, 0x37, 0x68, 0xda, + 0xa9, 0x5f, 0x21, 0x3f, 0xcd, 0xd2, 0x09, 0x7b, 0x3d, 0xfb, 0x04, 0x73, 0x7c, 0x05, 0x28, 0xa6, + 0xce, 0xfa, 0x62, 0xcf, 0xca, 0x2e, 0xf6, 0x68, 0xbd, 0xe6, 0x5d, 0xaa, 0x3a, 0x47, 0xb4, 0x17, + 0x6b, 0x95, 0x4a, 0x23, 0x55, 0x04, 0x7a, 0x60, 0x8f, 0xc8, 0x78, 0x77, 0x7a, 0xb7, 0x42, 0x7a, + 0xa7, 0xf5, 0x96, 0xd7, 0x3c, 0xe7, 0x7c, 0xa6, 0x34, 0x16, 0x5a, 0x84, 0x80, 0xa0, 0xcd, 0xa0, + 0x33, 0xea, 0x8c, 0x7b, 0x07, 0x27, 0x6c, 0xab, 0xdf, 0x83, 0x35, 0x13, 0xb2, 0xd3, 0x4b, 0x95, + 0xe7, 0x11, 0xea, 0x55, 0xed, 0xb6, 0xde, 0xf0, 0x1a, 0x57, 0x0d, 0x9f, 0xd1, 0x3b, 0xff, 0x20, + 0x4e, 0x9f, 0x76, 0x02, 0x58, 0x15, 0xfd, 0xec, 0x7a, 0xf9, 0xa7, 0x73, 0x8f, 0x76, 0x53, 0xb1, + 0x4c, 0xa0, 0x8c, 0xe3, 0x95, 0xc3, 0x53, 0xfb, 0x98, 0xec, 0x7f, 0x27, 0xb4, 0xdf, 0xbc, 0xff, + 0xa5, 0x34, 0xe8, 0xbc, 0x6f, 0xb5, 0xcc, 0xb6, 0x6b, 0x39, 0xa7, 0x8b, 0x8e, 0xfb, 0x95, 0xeb, + 0x9d, 0xbf, 0x2b, 0x8d, 0x86, 0xdf, 0xd2, 0xae, 0x44, 0x08, 0xcd, 0xc0, 0x2e, 0x5a, 0x3a, 0xbc, + 0x41, 0x4b, 0xd3, 0xdb, 0x95, 0x7e, 0xf7, 0x45, 0xae, 0xe4, 0x95, 0x82, 0xd3, 0xfb, 0xeb, 0x8d, + 0x6b, 0x9d, 0x6f, 0x5c, 0xeb, 0xc7, 0xc6, 0xb5, 0xbe, 0x66, 0x2e, 0x59, 0x67, 0x2e, 0x39, 0xcf, + 0x5c, 0xf2, 0x2b, 0x73, 0xc9, 0xb7, 0xdf, 0xae, 0xf5, 0xce, 0x4e, 0x27, 0x7f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xe8, 0xe1, 0xb9, 0x93, 0xec, 0x03, 0x00, 0x00, +} diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/storage/v1/generated.proto new file mode 100644 index 000000000..92e18cf9e --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/generated.proto @@ -0,0 +1,63 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.kubernetes.pkg.apis.storage.v1; + +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1"; + +// StorageClass describes the parameters for a class of storage for +// which PersistentVolumes can be dynamically provisioned. +// +// StorageClasses are non-namespaced; the name of the storage class +// according to etcd is in ObjectMeta.Name. +message StorageClass { + // Standard object's metadata. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Provisioner indicates the type of the provisioner. + optional string provisioner = 2; + + // Parameters holds the parameters for the provisioner that should + // create volumes of this storage class. + // +optional + map parameters = 3; +} + +// StorageClassList is a collection of storage classes. +message StorageClassList { + // Standard list metadata + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of StorageClasses + repeated StorageClass items = 2; +} + diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/register.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/register.go new file mode 100644 index 000000000..24d6bfa7d --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/register.go @@ -0,0 +1,50 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "storage.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &StorageClass{}, + &StorageClassList{}, + ) + + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/types.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/types.go new file mode 100644 index 000000000..0591b397c --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/types.go @@ -0,0 +1,57 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient=true +// +nonNamespaced=true + +// StorageClass describes the parameters for a class of storage for +// which PersistentVolumes can be dynamically provisioned. +// +// StorageClasses are non-namespaced; the name of the storage class +// according to etcd is in ObjectMeta.Name. +type StorageClass struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Provisioner indicates the type of the provisioner. + Provisioner string `json:"provisioner" protobuf:"bytes,2,opt,name=provisioner"` + + // Parameters holds the parameters for the provisioner that should + // create volumes of this storage class. + // +optional + Parameters map[string]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"` +} + +// StorageClassList is a collection of storage classes. +type StorageClassList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of StorageClasses + Items []StorageClass `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/types_swagger_doc_generated.go new file mode 100644 index 000000000..6f2717708 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/types_swagger_doc_generated.go @@ -0,0 +1,51 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_StorageClass = map[string]string{ + "": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", + "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "provisioner": "Provisioner indicates the type of the provisioner.", + "parameters": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", +} + +func (StorageClass) SwaggerDoc() map[string]string { + return map_StorageClass +} + +var map_StorageClassList = map[string]string{ + "": "StorageClassList is a collection of storage classes.", + "metadata": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "items": "Items is the list of StorageClasses", +} + +func (StorageClassList) SwaggerDoc() map[string]string { + return map_StorageClassList +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.conversion.go new file mode 100644 index 000000000..3c0c5d4b3 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.conversion.go @@ -0,0 +1,89 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1 + +import ( + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + storage "k8s.io/client-go/pkg/apis/storage" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1_StorageClass_To_storage_StorageClass, + Convert_storage_StorageClass_To_v1_StorageClass, + Convert_v1_StorageClassList_To_storage_StorageClassList, + Convert_storage_StorageClassList_To_v1_StorageClassList, + ) +} + +func autoConvert_v1_StorageClass_To_storage_StorageClass(in *StorageClass, out *storage.StorageClass, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Provisioner = in.Provisioner + out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters)) + return nil +} + +func Convert_v1_StorageClass_To_storage_StorageClass(in *StorageClass, out *storage.StorageClass, s conversion.Scope) error { + return autoConvert_v1_StorageClass_To_storage_StorageClass(in, out, s) +} + +func autoConvert_storage_StorageClass_To_v1_StorageClass(in *storage.StorageClass, out *StorageClass, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Provisioner = in.Provisioner + out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters)) + return nil +} + +func Convert_storage_StorageClass_To_v1_StorageClass(in *storage.StorageClass, out *StorageClass, s conversion.Scope) error { + return autoConvert_storage_StorageClass_To_v1_StorageClass(in, out, s) +} + +func autoConvert_v1_StorageClassList_To_storage_StorageClassList(in *StorageClassList, out *storage.StorageClassList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]storage.StorageClass)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1_StorageClassList_To_storage_StorageClassList(in *StorageClassList, out *storage.StorageClassList, s conversion.Scope) error { + return autoConvert_v1_StorageClassList_To_storage_StorageClassList(in, out, s) +} + +func autoConvert_storage_StorageClassList_To_v1_StorageClassList(in *storage.StorageClassList, out *StorageClassList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]StorageClass, 0) + } else { + out.Items = *(*[]StorageClass)(unsafe.Pointer(&in.Items)) + } + return nil +} + +func Convert_storage_StorageClassList_To_v1_StorageClassList(in *storage.StorageClassList, out *StorageClassList, s conversion.Scope) error { + return autoConvert_storage_StorageClassList_To_v1_StorageClassList(in, out, s) +} diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..8b3786ab1 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.deepcopy.go @@ -0,0 +1,80 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_StorageClass, InType: reflect.TypeOf(&StorageClass{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_StorageClassList, InType: reflect.TypeOf(&StorageClassList{})}, + ) +} + +func DeepCopy_v1_StorageClass(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*StorageClass) + out := out.(*StorageClass) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) + } + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = make(map[string]string) + for key, val := range *in { + (*out)[key] = val + } + } + return nil + } +} + +func DeepCopy_v1_StorageClassList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*StorageClassList) + out := out.(*StorageClassList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageClass, len(*in)) + for i := range *in { + if err := DeepCopy_v1_StorageClass(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.defaults.go new file mode 100644 index 000000000..6df448eb9 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/doc.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/doc.go new file mode 100644 index 000000000..364321710 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +groupName=storage.k8s.io +package v1beta1 diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.pb.go similarity index 83% rename from vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/generated.pb.go rename to vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.pb.go index c865fbd6e..f1130cf37 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/generated.pb.go +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -58,8 +58,8 @@ func (*StorageClassList) ProtoMessage() {} func (*StorageClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } func init() { - proto.RegisterType((*StorageClass)(nil), "k8s.io.client-go.1.5.pkg.apis.storage.v1beta1.StorageClass") - proto.RegisterType((*StorageClassList)(nil), "k8s.io.client-go.1.5.pkg.apis.storage.v1beta1.StorageClassList") + proto.RegisterType((*StorageClass)(nil), "k8s.io.client-go.pkg.apis.storage.v1beta1.StorageClass") + proto.RegisterType((*StorageClassList)(nil), "k8s.io.client-go.pkg.apis.storage.v1beta1.StorageClassList") } func (m *StorageClass) Marshal() (data []byte, err error) { size := m.Size() @@ -233,7 +233,7 @@ func (this *StorageClass) String() string { } mapStringForParameters += "}" s := strings.Join([]string{`&StorageClass{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`, `Parameters:` + mapStringForParameters + `,`, `}`, @@ -245,7 +245,7 @@ func (this *StorageClassList) String() string { return "nil" } s := strings.Join([]string{`&StorageClassList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_kubernetes_pkg_api_unversioned.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StorageClass", "StorageClass", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -696,34 +696,36 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 455 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x92, 0x4d, 0x6b, 0x13, 0x41, - 0x18, 0xc7, 0xb3, 0x09, 0xc1, 0x76, 0xa2, 0x18, 0x46, 0x0f, 0x61, 0x0f, 0x69, 0xe9, 0xa9, 0x8a, - 0x9d, 0x21, 0x85, 0x42, 0x28, 0x78, 0x59, 0x11, 0x14, 0x14, 0xcb, 0x7a, 0x11, 0xa1, 0x87, 0xd9, - 0xe4, 0x71, 0x1d, 0x37, 0xbb, 0xb3, 0xcc, 0xcb, 0x42, 0xc1, 0x83, 0x1f, 0xc1, 0x8f, 0x95, 0x63, - 0x8e, 0x1e, 0xa4, 0x68, 0xfd, 0x22, 0xce, 0xbe, 0xd8, 0x5d, 0xb2, 0x59, 0x11, 0x0f, 0x0f, 0xcc, - 0xdb, 0xef, 0xff, 0xfc, 0x9f, 0x3f, 0x83, 0xce, 0xa3, 0xb9, 0x22, 0x5c, 0xd0, 0xc8, 0x04, 0x20, - 0x13, 0xd0, 0xa0, 0x68, 0x1a, 0x85, 0x94, 0xa5, 0x5c, 0x51, 0xa5, 0x85, 0x64, 0x21, 0xd0, 0x6c, - 0x16, 0x80, 0x66, 0x33, 0x1a, 0x42, 0x02, 0x92, 0x69, 0x58, 0x92, 0x54, 0x0a, 0x2d, 0xf0, 0xe3, - 0x92, 0x25, 0x35, 0x4b, 0x2c, 0x4b, 0x72, 0x96, 0x54, 0x2c, 0xa9, 0x58, 0xf7, 0x24, 0xe4, 0xfa, - 0xa3, 0x09, 0xc8, 0x42, 0xc4, 0x34, 0x14, 0xa1, 0xa0, 0x85, 0x44, 0x60, 0x3e, 0x14, 0xbb, 0x62, - 0x53, 0xac, 0x4a, 0x69, 0xf7, 0xb4, 0xd3, 0x16, 0x95, 0xa0, 0x84, 0x91, 0x0b, 0xd8, 0xb6, 0xe3, - 0x9e, 0x75, 0x33, 0x26, 0xc9, 0x40, 0x2a, 0x2e, 0x12, 0x58, 0xb6, 0xb0, 0x27, 0xdd, 0x58, 0xd6, - 0x9a, 0xd9, 0x3d, 0xd9, 0xfd, 0x5a, 0x9a, 0x44, 0xf3, 0xb8, 0xed, 0x69, 0xb6, 0xfb, 0xb9, 0xd1, - 0x7c, 0x45, 0x79, 0xa2, 0x95, 0x96, 0xdb, 0xc8, 0xd1, 0xf7, 0x3e, 0xba, 0xfb, 0xb6, 0x4c, 0xef, - 0xd9, 0x8a, 0x29, 0x85, 0xdf, 0xa1, 0xbd, 0xd8, 0x66, 0xb8, 0x64, 0x9a, 0x4d, 0x9c, 0x43, 0xe7, - 0x78, 0x74, 0x7a, 0x4c, 0x3a, 0x93, 0xb7, 0x81, 0x93, 0x37, 0xc1, 0x27, 0x58, 0xe8, 0xd7, 0x96, - 0xf1, 0xf0, 0xfa, 0xfa, 0xa0, 0x77, 0x73, 0x7d, 0x80, 0xea, 0x33, 0xff, 0x56, 0x0d, 0x9f, 0xa1, - 0x91, 0xed, 0x99, 0xf1, 0x22, 0x19, 0x39, 0xe9, 0x5b, 0xf1, 0x7d, 0xef, 0x41, 0x85, 0x8c, 0x2e, - 0xea, 0x2b, 0xbf, 0xf9, 0x0e, 0x7f, 0x46, 0x28, 0x65, 0x92, 0x59, 0x19, 0x1b, 0xea, 0x64, 0x70, - 0x38, 0xb0, 0x96, 0x5e, 0x90, 0x7f, 0xff, 0x0c, 0xa4, 0x39, 0x1e, 0xb9, 0xb8, 0x95, 0x7a, 0x9e, - 0x68, 0x79, 0x55, 0x5b, 0xae, 0x2f, 0xfc, 0x46, 0x3f, 0xf7, 0x29, 0xba, 0xbf, 0x85, 0xe0, 0x31, - 0x1a, 0x44, 0x70, 0x55, 0x84, 0xb3, 0xef, 0xe7, 0x4b, 0xfc, 0x10, 0x0d, 0x33, 0xb6, 0x32, 0x50, - 0xce, 0xe4, 0x97, 0x9b, 0xf3, 0xfe, 0xdc, 0x39, 0xda, 0x38, 0x68, 0xdc, 0xec, 0xff, 0x8a, 0x2b, - 0x8d, 0x2f, 0x5b, 0x11, 0xd3, 0xbf, 0x44, 0xdc, 0xf8, 0x4d, 0x24, 0xc7, 0x8b, 0xa4, 0xc7, 0x95, - 0xed, 0xbd, 0x3f, 0x27, 0x8d, 0x9c, 0x2f, 0xd1, 0x90, 0x6b, 0x88, 0x95, 0x75, 0x93, 0x67, 0x35, - 0xff, 0xdf, 0xac, 0xbc, 0x7b, 0x55, 0x93, 0xe1, 0xcb, 0x5c, 0xce, 0x2f, 0x55, 0xbd, 0x47, 0xeb, - 0x9f, 0xd3, 0xde, 0xc6, 0xd6, 0x37, 0x5b, 0x5f, 0x6e, 0xa6, 0xce, 0xda, 0xd6, 0xc6, 0xd6, 0x0f, - 0x5b, 0x5f, 0x7f, 0x4d, 0x7b, 0xef, 0xef, 0x54, 0x6a, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x86, - 0x21, 0xa9, 0x43, 0xef, 0x03, 0x00, 0x00, + // 486 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x92, 0xcf, 0x8b, 0xd3, 0x40, + 0x14, 0xc7, 0x33, 0x5d, 0x8a, 0xbb, 0x53, 0xc5, 0x12, 0x3d, 0x94, 0x1e, 0xb2, 0x65, 0x4f, 0x55, + 0x74, 0xc6, 0xae, 0x3f, 0x28, 0x0b, 0x5e, 0x2a, 0x82, 0x82, 0xe2, 0x12, 0x6f, 0xa2, 0xe0, 0xa4, + 0xfb, 0x4c, 0xc7, 0x34, 0x99, 0x30, 0xf3, 0x12, 0x2c, 0x78, 0xf0, 0x4f, 0xf0, 0xcf, 0xea, 0xcd, + 0x3d, 0x7a, 0x5a, 0x6c, 0xf4, 0x0f, 0x91, 0xfc, 0x70, 0x13, 0xcc, 0x16, 0x17, 0x6f, 0x99, 0x99, + 0xf7, 0xf9, 0xbe, 0xef, 0xfb, 0xbe, 0xd0, 0xa3, 0x60, 0x6a, 0x98, 0x54, 0x3c, 0x48, 0x3c, 0xd0, + 0x11, 0x20, 0x18, 0x1e, 0x07, 0x3e, 0x17, 0xb1, 0x34, 0xdc, 0xa0, 0xd2, 0xc2, 0x07, 0x9e, 0x4e, + 0x3c, 0x40, 0x31, 0xe1, 0x3e, 0x44, 0xa0, 0x05, 0xc2, 0x09, 0x8b, 0xb5, 0x42, 0x65, 0xdf, 0x2e, + 0x59, 0x56, 0xb3, 0x2c, 0x0e, 0x7c, 0x96, 0xb3, 0xac, 0x62, 0x59, 0xc5, 0x0e, 0xef, 0xfa, 0x12, + 0x17, 0x89, 0xc7, 0xe6, 0x2a, 0xe4, 0xbe, 0xf2, 0x15, 0x2f, 0x24, 0xbc, 0xe4, 0x43, 0x71, 0x2a, + 0x0e, 0xc5, 0x57, 0x29, 0x3d, 0x7c, 0x50, 0xd9, 0x12, 0xb1, 0x0c, 0xc5, 0x7c, 0x21, 0x23, 0xd0, + 0xab, 0xda, 0x58, 0x08, 0x28, 0x78, 0xda, 0x32, 0x34, 0xe4, 0xdb, 0x28, 0x9d, 0x44, 0x28, 0x43, + 0x68, 0x01, 0x8f, 0xfe, 0x05, 0x98, 0xf9, 0x02, 0x42, 0xd1, 0xe2, 0xee, 0x6f, 0xe3, 0x12, 0x94, + 0x4b, 0x2e, 0x23, 0x34, 0xa8, 0x5b, 0x50, 0x63, 0x26, 0x03, 0x3a, 0x05, 0x5d, 0x0f, 0x04, 0x9f, + 0x44, 0x18, 0x2f, 0xe1, 0xa2, 0x99, 0xee, 0x6c, 0x5d, 0xd0, 0x05, 0xd5, 0x07, 0xbf, 0x3a, 0xf4, + 0xea, 0xeb, 0x32, 0xfa, 0x27, 0x4b, 0x61, 0x8c, 0xfd, 0x9e, 0xee, 0xe6, 0x69, 0x9d, 0x08, 0x14, + 0x03, 0x32, 0x22, 0xe3, 0xde, 0xe1, 0x3d, 0x56, 0xad, 0xad, 0x69, 0xbe, 0x5e, 0x5c, 0x5e, 0xcd, + 0xd2, 0x09, 0x7b, 0xe5, 0x7d, 0x84, 0x39, 0xbe, 0x04, 0x14, 0x33, 0x7b, 0x7d, 0xb6, 0x6f, 0x65, + 0x67, 0xfb, 0xb4, 0xbe, 0x73, 0xcf, 0x55, 0xed, 0x87, 0xb4, 0x17, 0x6b, 0x95, 0x4a, 0x23, 0x55, + 0x04, 0x7a, 0xd0, 0x19, 0x91, 0xf1, 0xde, 0xec, 0x46, 0x85, 0xf4, 0x8e, 0xeb, 0x27, 0xb7, 0x59, + 0x67, 0x7f, 0xa6, 0x34, 0x16, 0x5a, 0x84, 0x80, 0xa0, 0xcd, 0x60, 0x67, 0xb4, 0x33, 0xee, 0x1d, + 0x3e, 0x63, 0x97, 0xff, 0xa3, 0x58, 0x73, 0x4c, 0x76, 0x7c, 0x2e, 0xf5, 0x34, 0x42, 0xbd, 0xaa, + 0x2d, 0xd7, 0x0f, 0x6e, 0xa3, 0xdf, 0xf0, 0x31, 0xbd, 0xfe, 0x17, 0x62, 0xf7, 0xe9, 0x4e, 0x00, + 0xab, 0x22, 0xa4, 0x3d, 0x37, 0xff, 0xb4, 0x6f, 0xd2, 0x6e, 0x2a, 0x96, 0x09, 0x94, 0x33, 0xb9, + 0xe5, 0xe1, 0xa8, 0x33, 0x25, 0x07, 0xdf, 0x08, 0xed, 0x37, 0xfb, 0xbf, 0x90, 0x06, 0xed, 0xb7, + 0xad, 0xa8, 0xd9, 0xe5, 0xa2, 0xce, 0xe9, 0x22, 0xe8, 0x7e, 0xe5, 0x7a, 0xf7, 0xcf, 0x4d, 0x23, + 0xe6, 0x77, 0xb4, 0x2b, 0x11, 0x42, 0x33, 0xe8, 0x14, 0x51, 0x4d, 0xff, 0x37, 0xaa, 0xd9, 0xb5, + 0xaa, 0x49, 0xf7, 0x79, 0x2e, 0xe7, 0x96, 0xaa, 0xb3, 0x5b, 0xeb, 0x8d, 0x63, 0x9d, 0x6e, 0x1c, + 0xeb, 0xfb, 0xc6, 0xb1, 0xbe, 0x64, 0x0e, 0x59, 0x67, 0x0e, 0x39, 0xcd, 0x1c, 0xf2, 0x23, 0x73, + 0xc8, 0xd7, 0x9f, 0x8e, 0xf5, 0xe6, 0x4a, 0xa5, 0xf6, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x99, 0xdf, + 0x66, 0x94, 0x33, 0x04, 0x00, 0x00, } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.proto similarity index 76% rename from vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/generated.proto rename to vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.proto index dbcdcc3c0..0b9dbaead 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/generated.proto +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,11 +21,12 @@ syntax = 'proto2'; package k8s.io.kubernetes.pkg.apis.storage.v1beta1; -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; -import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; +import "k8s.io/apiserver/pkg/apis/example/v1/generated.proto"; import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; @@ -38,13 +39,15 @@ option go_package = "v1beta1"; message StorageClass { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Provisioner indicates the type of the provisioner. optional string provisioner = 2; // Parameters holds the parameters for the provisioner that should // create volumes of this storage class. + // +optional map parameters = 3; } @@ -52,7 +55,8 @@ message StorageClass { message StorageClassList { // Standard list metadata // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is the list of StorageClasses repeated StorageClass items = 2; diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/register.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/register.go similarity index 69% rename from vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/register.go rename to vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/register.go index 97c322dcf..70087f379 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/register.go +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/register.go @@ -17,17 +17,21 @@ limitations under the License. package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - "k8s.io/client-go/1.5/pkg/runtime" - versionedwatch "k8s.io/client-go/1.5/pkg/watch/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "storage.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1beta1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) @@ -37,14 +41,10 @@ var ( // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &v1.ExportOptions{}, - &StorageClass{}, &StorageClassList{}, ) - versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types.generated.go similarity index 62% rename from vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/types.generated.go rename to vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types.generated.go index 4e8d77446..ddc516b28 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/types.generated.go +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types.generated.go @@ -25,9 +25,8 @@ import ( "errors" "fmt" codec1978 "github.com/ugorji/go/codec" - pkg1_unversioned "k8s.io/client-go/1.5/pkg/api/unversioned" - pkg2_v1 "k8s.io/client-go/1.5/pkg/api/v1" - pkg3_types "k8s.io/client-go/1.5/pkg/types" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -63,11 +62,10 @@ func init() { panic(err) } if false { // reference the types, but skip this branch at build/run time - var v0 pkg1_unversioned.TypeMeta - var v1 pkg2_v1.ObjectMeta - var v2 pkg3_types.UID - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v0 pkg1_v1.TypeMeta + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -168,14 +172,20 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy11 := &x.ObjectMeta - yy11.CodecEncodeSelf(e) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym13 := z.EncBinary() - _ = yym13 + yym15 := z.EncBinary() + _ = yym15 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Provisioner)) @@ -184,8 +194,8 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("provisioner")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym14 := z.EncBinary() - _ = yym14 + yym16 := z.EncBinary() + _ = yym16 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Provisioner)) @@ -197,8 +207,8 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) { if x.Parameters == nil { r.EncodeNil() } else { - yym16 := z.EncBinary() - _ = yym16 + yym18 := z.EncBinary() + _ = yym18 if false { } else { z.F.EncMapStringStringV(x.Parameters, false, e) @@ -215,8 +225,8 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) { if x.Parameters == nil { r.EncodeNil() } else { - yym17 := z.EncBinary() - _ = yym17 + yym19 := z.EncBinary() + _ = yym19 if false { } else { z.F.EncMapStringStringV(x.Parameters, false, e) @@ -237,25 +247,25 @@ func (x *StorageClass) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym18 := z.DecBinary() - _ = yym18 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct19 := r.ContainerType() - if yyct19 == codecSelferValueTypeMap1234 { - yyl19 := r.ReadMapStart() - if yyl19 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl19, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct19 == codecSelferValueTypeArray1234 { - yyl19 := r.ReadArrayStart() - if yyl19 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl19, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -267,12 +277,12 @@ func (x *StorageClass) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys20Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys20Slc - var yyhl20 bool = l >= 0 - for yyj20 := 0; ; yyj20++ { - if yyhl20 { - if yyj20 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -281,51 +291,75 @@ func (x *StorageClass) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys20Slc = r.DecodeBytes(yys20Slc, true, true) - yys20 := string(yys20Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys20 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv23 := &x.ObjectMeta - yyv23.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "provisioner": if r.TryDecodeAsNil() { x.Provisioner = "" } else { - x.Provisioner = string(r.DecodeString()) + yyv10 := &x.Provisioner + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } } case "parameters": if r.TryDecodeAsNil() { x.Parameters = nil } else { - yyv25 := &x.Parameters - yym26 := z.DecBinary() - _ = yym26 + yyv12 := &x.Parameters + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecMapStringStringX(yyv25, false, d) + z.F.DecMapStringStringX(yyv12, false, d) } } default: - z.DecStructFieldNotFound(-1, yys20) - } // end switch yys20 - } // end for yyj20 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -333,16 +367,16 @@ func (x *StorageClass) 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 + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb27 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb27 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -350,15 +384,21 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb27 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb27 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -366,32 +406,44 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb27 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb27 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv30 := &x.ObjectMeta - yyv30.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb27 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb27 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -399,15 +451,21 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Provisioner = "" } else { - x.Provisioner = string(r.DecodeString()) + yyv21 := &x.Provisioner + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb27 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb27 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -415,26 +473,26 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Parameters = nil } else { - yyv32 := &x.Parameters - yym33 := z.DecBinary() - _ = yym33 + yyv23 := &x.Parameters + yym24 := z.DecBinary() + _ = yym24 if false { } else { - z.F.DecMapStringStringX(yyv32, false, d) + z.F.DecMapStringStringX(yyv23, false, d) } } for { - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb27 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb27 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj27-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -446,37 +504,37 @@ func (x *StorageClassList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym34 := z.EncBinary() - _ = yym34 + yym1 := z.EncBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep35 := !z.EncBinary() - yy2arr35 := z.EncBasicHandle().StructToArray - var yyq35 [4]bool - _, _, _ = yysep35, yyq35, yy2arr35 - const yyr35 bool = false - yyq35[0] = x.Kind != "" - yyq35[1] = x.APIVersion != "" - yyq35[2] = true - var yynn35 int - if yyr35 || yy2arr35 { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { r.EncodeArrayStart(4) } else { - yynn35 = 1 - for _, b := range yyq35 { + yynn2 = 1 + for _, b := range yyq2 { if b { - yynn35++ + yynn2++ } } - r.EncodeMapStart(yynn35) - yynn35 = 0 + r.EncodeMapStart(yynn2) + yynn2 = 0 } - if yyr35 || yy2arr35 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq35[0] { - yym37 := z.EncBinary() - _ = yym37 + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -485,23 +543,23 @@ func (x *StorageClassList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq35[0] { + if yyq2[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym38 := z.EncBinary() - _ = yym38 + yym5 := z.EncBinary() + _ = yym5 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr35 || yy2arr35 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq35[1] { - yym40 := z.EncBinary() - _ = yym40 + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -510,54 +568,54 @@ func (x *StorageClassList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq35[1] { + if yyq2[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym41 := z.EncBinary() - _ = yym41 + yym8 := z.EncBinary() + _ = yym8 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr35 || yy2arr35 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq35[2] { - yy43 := &x.ListMeta - yym44 := z.EncBinary() - _ = yym44 + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 if false { - } else if z.HasExtensions() && z.EncExt(yy43) { + } else if z.HasExtensions() && z.EncExt(yy10) { } else { - z.EncFallback(yy43) + z.EncFallback(yy10) } } else { r.EncodeNil() } } else { - if yyq35[2] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy45 := &x.ListMeta - yym46 := z.EncBinary() - _ = yym46 + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 if false { - } else if z.HasExtensions() && z.EncExt(yy45) { + } else if z.HasExtensions() && z.EncExt(yy12) { } else { - z.EncFallback(yy45) + z.EncFallback(yy12) } } } - if yyr35 || yy2arr35 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym48 := z.EncBinary() - _ = yym48 + yym15 := z.EncBinary() + _ = yym15 if false { } else { h.encSliceStorageClass(([]StorageClass)(x.Items), e) @@ -570,15 +628,15 @@ func (x *StorageClassList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym49 := z.EncBinary() - _ = yym49 + yym16 := z.EncBinary() + _ = yym16 if false { } else { h.encSliceStorageClass(([]StorageClass)(x.Items), e) } } } - if yyr35 || yy2arr35 { + if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -591,25 +649,25 @@ func (x *StorageClassList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym50 := z.DecBinary() - _ = yym50 + yym1 := z.DecBinary() + _ = yym1 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct51 := r.ContainerType() - if yyct51 == codecSelferValueTypeMap1234 { - yyl51 := r.ReadMapStart() - if yyl51 == 0 { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl51, d) + x.codecDecodeSelfFromMap(yyl2, d) } - } else if yyct51 == codecSelferValueTypeArray1234 { - yyl51 := r.ReadArrayStart() - if yyl51 == 0 { + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl51, d) + x.codecDecodeSelfFromArray(yyl2, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -621,12 +679,12 @@ func (x *StorageClassList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys52Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys52Slc - var yyhl52 bool = l >= 0 - for yyj52 := 0; ; yyj52++ { - if yyhl52 { - if yyj52 >= l { + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { break } } else { @@ -635,51 +693,63 @@ func (x *StorageClassList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys52Slc = r.DecodeBytes(yys52Slc, true, true) - yys52 := string(yys52Slc) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys52 { + switch yys3 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } } case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv55 := &x.ListMeta - yym56 := z.DecBinary() - _ = yym56 + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 if false { - } else if z.HasExtensions() && z.DecExt(yyv55) { + } else if z.HasExtensions() && z.DecExt(yyv8) { } else { - z.DecFallback(yyv55, false) + z.DecFallback(yyv8, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv57 := &x.Items - yym58 := z.DecBinary() - _ = yym58 + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceStorageClass((*[]StorageClass)(yyv57), d) + h.decSliceStorageClass((*[]StorageClass)(yyv10), d) } } default: - z.DecStructFieldNotFound(-1, yys52) - } // end switch yys52 - } // end for yyj52 + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -687,16 +757,16 @@ func (x *StorageClassList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj59 int - var yyb59 bool - var yyhl59 bool = l >= 0 - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb59 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb59 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -704,15 +774,21 @@ func (x *StorageClassList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - x.Kind = string(r.DecodeString()) + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } } - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb59 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb59 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -720,38 +796,44 @@ func (x *StorageClassList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - x.APIVersion = string(r.DecodeString()) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb59 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb59 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg1_unversioned.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { - yyv62 := &x.ListMeta - yym63 := z.DecBinary() - _ = yym63 + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 if false { - } else if z.HasExtensions() && z.DecExt(yyv62) { + } else if z.HasExtensions() && z.DecExt(yyv17) { } else { - z.DecFallback(yyv62, false) + z.DecFallback(yyv17, false) } } - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb59 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb59 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -759,26 +841,26 @@ func (x *StorageClassList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Items = nil } else { - yyv64 := &x.Items - yym65 := z.DecBinary() - _ = yym65 + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceStorageClass((*[]StorageClass)(yyv64), d) + h.decSliceStorageClass((*[]StorageClass)(yyv19), d) } } for { - yyj59++ - if yyhl59 { - yyb59 = yyj59 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb59 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb59 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj59-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -788,10 +870,10 @@ func (x codecSelfer1234) encSliceStorageClass(v []StorageClass, e *codec1978.Enc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv66 := range v { + for _, yyv1 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy67 := &yyv66 - yy67.CodecEncodeSelf(e) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -801,83 +883,86 @@ func (x codecSelfer1234) decSliceStorageClass(v *[]StorageClass, d *codec1978.De z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv68 := *v - yyh68, yyl68 := z.DecSliceHelperStart() - var yyc68 bool - if yyl68 == 0 { - if yyv68 == nil { - yyv68 = []StorageClass{} - yyc68 = true - } else if len(yyv68) != 0 { - yyv68 = yyv68[:0] - yyc68 = true + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []StorageClass{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true } - } else if yyl68 > 0 { - var yyrr68, yyrl68 int - var yyrt68 bool - if yyl68 > cap(yyv68) { + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { - yyrg68 := len(yyv68) > 0 - yyv268 := yyv68 - yyrl68, yyrt68 = z.DecInferLen(yyl68, z.DecBasicHandle().MaxInitLen, 280) - if yyrt68 { - if yyrl68 <= cap(yyv68) { - yyv68 = yyv68[:yyrl68] + 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 { - yyv68 = make([]StorageClass, yyrl68) + yyv1 = make([]StorageClass, yyrl1) } } else { - yyv68 = make([]StorageClass, yyrl68) + yyv1 = make([]StorageClass, yyrl1) } - yyc68 = true - yyrr68 = len(yyv68) - if yyrg68 { - copy(yyv68, yyv268) + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) } - } else if yyl68 != len(yyv68) { - yyv68 = yyv68[:yyl68] - yyc68 = true + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true } - yyj68 := 0 - for ; yyj68 < yyrr68; yyj68++ { - yyh68.ElemContainerState(yyj68) + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv68[yyj68] = StorageClass{} + yyv1[yyj1] = StorageClass{} } else { - yyv69 := &yyv68[yyj68] - yyv69.CodecDecodeSelf(d) + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) } } - if yyrt68 { - for ; yyj68 < yyl68; yyj68++ { - yyv68 = append(yyv68, StorageClass{}) - yyh68.ElemContainerState(yyj68) + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, StorageClass{}) + yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv68[yyj68] = StorageClass{} + yyv1[yyj1] = StorageClass{} } else { - yyv70 := &yyv68[yyj68] - yyv70.CodecDecodeSelf(d) + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) } } } } else { - yyj68 := 0 - for ; !r.CheckBreak(); yyj68++ { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { - if yyj68 >= len(yyv68) { - yyv68 = append(yyv68, StorageClass{}) // var yyz68 StorageClass - yyc68 = true + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, StorageClass{}) // var yyz1 StorageClass + yyc1 = true } - yyh68.ElemContainerState(yyj68) - if yyj68 < len(yyv68) { + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv68[yyj68] = StorageClass{} + yyv1[yyj1] = StorageClass{} } else { - yyv71 := &yyv68[yyj68] - yyv71.CodecDecodeSelf(d) + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) } } else { @@ -885,16 +970,16 @@ func (x codecSelfer1234) decSliceStorageClass(v *[]StorageClass, d *codec1978.De } } - if yyj68 < len(yyv68) { - yyv68 = yyv68[:yyj68] - yyc68 = true - } else if yyj68 == 0 && yyv68 == nil { - yyv68 = []StorageClass{} - yyc68 = true + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []StorageClass{} + yyc1 = true } } - yyh68.End() - if yyc68 { - *v = yyv68 + yyh1.End() + if yyc1 { + *v = yyv1 } } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types.go similarity index 83% rename from vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/types.go rename to vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types.go index e281b5793..afbd5bcdb 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/types.go +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types.go @@ -17,8 +17,7 @@ limitations under the License. package v1beta1 import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // +genclient=true @@ -30,25 +29,28 @@ import ( // StorageClasses are non-namespaced; the name of the storage class // according to etcd is in ObjectMeta.Name. type StorageClass struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Provisioner indicates the type of the provisioner. Provisioner string `json:"provisioner" protobuf:"bytes,2,opt,name=provisioner"` // Parameters holds the parameters for the provisioner that should // create volumes of this storage class. + // +optional Parameters map[string]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"` } // StorageClassList is a collection of storage classes. type StorageClassList struct { - unversioned.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is the list of StorageClasses Items []StorageClass `json:"items" protobuf:"bytes,2,rep,name=items"` diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types_swagger_doc_generated.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/types_swagger_doc_generated.go rename to vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types_swagger_doc_generated.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.conversion.go similarity index 59% rename from vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/zz_generated.conversion.go rename to vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.conversion.go index fc900af2f..f5b1b2aa4 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ limitations under the License. package v1beta1 import ( - api "k8s.io/client-go/1.5/pkg/api" - storage "k8s.io/client-go/1.5/pkg/apis/storage" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + storage "k8s.io/client-go/pkg/apis/storage" + unsafe "unsafe" ) func init() { @@ -43,15 +43,9 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_StorageClass_To_storage_StorageClass(in *StorageClass, out *storage.StorageClass, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Provisioner = in.Provisioner - out.Parameters = in.Parameters + out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters)) return nil } @@ -60,15 +54,9 @@ func Convert_v1beta1_StorageClass_To_storage_StorageClass(in *StorageClass, out } func autoConvert_storage_StorageClass_To_v1beta1_StorageClass(in *storage.StorageClass, out *StorageClass, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Provisioner = in.Provisioner - out.Parameters = in.Parameters + out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters)) return nil } @@ -77,23 +65,8 @@ func Convert_storage_StorageClass_To_v1beta1_StorageClass(in *storage.StorageCla } func autoConvert_v1beta1_StorageClassList_To_storage_StorageClassList(in *StorageClassList, out *storage.StorageClassList, 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([]storage.StorageClass, len(*in)) - for i := range *in { - if err := Convert_v1beta1_StorageClass_To_storage_StorageClass(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.ListMeta = in.ListMeta + out.Items = *(*[]storage.StorageClass)(unsafe.Pointer(&in.Items)) return nil } @@ -102,22 +75,11 @@ func Convert_v1beta1_StorageClassList_To_storage_StorageClassList(in *StorageCla } func autoConvert_storage_StorageClassList_To_v1beta1_StorageClassList(in *storage.StorageClassList, out *StorageClassList, 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([]StorageClass, len(*in)) - for i := range *in { - if err := Convert_storage_StorageClass_To_v1beta1_StorageClass(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } + out.ListMeta = in.ListMeta + if in.Items == nil { + out.Items = make([]StorageClass, 0) } else { - out.Items = nil + out.Items = *(*[]StorageClass)(unsafe.Pointer(&in.Items)) } return nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go similarity index 82% rename from vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go index 27e39b68c..f2ea4f2fb 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,9 +21,9 @@ limitations under the License. package v1beta1 import ( - v1 "k8s.io/client-go/1.5/pkg/api/v1" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" reflect "reflect" ) @@ -44,19 +44,18 @@ func DeepCopy_v1beta1_StorageClass(in interface{}, out interface{}, c *conversio { in := in.(*StorageClass) out := out.(*StorageClass) - out.TypeMeta = in.TypeMeta - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } - out.Provisioner = in.Provisioner if in.Parameters != nil { in, out := &in.Parameters, &out.Parameters *out = make(map[string]string) for key, val := range *in { (*out)[key] = val } - } else { - out.Parameters = nil } return nil } @@ -66,8 +65,7 @@ func DeepCopy_v1beta1_StorageClassList(in interface{}, out interface{}, c *conve { in := in.(*StorageClassList) out := out.(*StorageClassList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]StorageClass, len(*in)) @@ -76,8 +74,6 @@ func DeepCopy_v1beta1_StorageClassList(in interface{}, out interface{}, c *conve return err } } - } else { - out.Items = nil } return nil } diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.defaults.go new file mode 100644 index 000000000..e24e70be3 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/storage/zz_generated.deepcopy.go similarity index 82% rename from vendor/k8s.io/client-go/1.5/pkg/apis/storage/zz_generated.deepcopy.go rename to vendor/k8s.io/client-go/pkg/apis/storage/zz_generated.deepcopy.go index d158ebcc6..2ef9f1767 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/apis/storage/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/pkg/apis/storage/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,9 +21,9 @@ limitations under the License. package storage import ( - api "k8s.io/client-go/1.5/pkg/api" - conversion "k8s.io/client-go/1.5/pkg/conversion" - runtime "k8s.io/client-go/1.5/pkg/runtime" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" reflect "reflect" ) @@ -44,19 +44,18 @@ func DeepCopy_storage_StorageClass(in interface{}, out interface{}, c *conversio { in := in.(*StorageClass) out := out.(*StorageClass) - out.TypeMeta = in.TypeMeta - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } - out.Provisioner = in.Provisioner if in.Parameters != nil { in, out := &in.Parameters, &out.Parameters *out = make(map[string]string) for key, val := range *in { (*out)[key] = val } - } else { - out.Parameters = nil } return nil } @@ -66,8 +65,7 @@ func DeepCopy_storage_StorageClassList(in interface{}, out interface{}, c *conve { in := in.(*StorageClassList) out := out.(*StorageClassList) - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + *out = *in if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]StorageClass, len(*in)) @@ -76,8 +74,6 @@ func DeepCopy_storage_StorageClassList(in interface{}, out interface{}, c *conve return err } } - } else { - out.Items = nil } return nil } diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/doc.go b/vendor/k8s.io/client-go/pkg/util/doc.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/util/doc.go rename to vendor/k8s.io/client-go/pkg/util/doc.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/parsers/parsers.go b/vendor/k8s.io/client-go/pkg/util/parsers/parsers.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/util/parsers/parsers.go rename to vendor/k8s.io/client-go/pkg/util/parsers/parsers.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/template.go b/vendor/k8s.io/client-go/pkg/util/template.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/util/template.go rename to vendor/k8s.io/client-go/pkg/util/template.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/umask.go b/vendor/k8s.io/client-go/pkg/util/umask.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/util/umask.go rename to vendor/k8s.io/client-go/pkg/util/umask.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/umask_windows.go b/vendor/k8s.io/client-go/pkg/util/umask_windows.go similarity index 94% rename from vendor/k8s.io/client-go/1.5/pkg/util/umask_windows.go rename to vendor/k8s.io/client-go/pkg/util/umask_windows.go index 8c1b2cbc7..7a1ba1538 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/umask_windows.go +++ b/vendor/k8s.io/client-go/pkg/util/umask_windows.go @@ -22,6 +22,6 @@ import ( "errors" ) -func Umask(mask int) (old int, err error) { +func Umask(mask int) (int, error) { return 0, errors.New("platform and architecture is not supported") } diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/util.go b/vendor/k8s.io/client-go/pkg/util/util.go similarity index 82% rename from vendor/k8s.io/client-go/1.5/pkg/util/util.go rename to vendor/k8s.io/client-go/pkg/util/util.go index 7a9414957..356b295a3 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/util.go +++ b/vendor/k8s.io/client-go/pkg/util/util.go @@ -84,36 +84,20 @@ func FileExists(filename string) (bool, error) { return true, nil } -// borrowed from ioutil.ReadDir -// ReadDir reads the directory named by dirname and returns -// a list of directory entries, minus those with lstat errors -func ReadDirNoExit(dirname string) ([]os.FileInfo, []error, error) { +// ReadDirNoStat returns a string of files/directories contained +// in dirname without calling lstat on them. +func ReadDirNoStat(dirname string) ([]string, error) { if dirname == "" { dirname = "." } f, err := os.Open(dirname) if err != nil { - return nil, nil, err + return nil, err } defer f.Close() - names, err := f.Readdirnames(-1) - list := make([]os.FileInfo, 0, len(names)) - errs := make([]error, 0, len(names)) - for _, filename := range names { - fip, lerr := os.Lstat(dirname + "/" + filename) - if os.IsNotExist(lerr) { - // File disappeared between readdir + stat. - // Just treat it as if it didn't exist. - continue - } - - list = append(list, fip) - errs = append(errs, lerr) - } - - return list, errs, nil + return f.Readdirnames(-1) } // IntPtr returns a pointer to an int diff --git a/vendor/k8s.io/client-go/1.5/pkg/version/base.go b/vendor/k8s.io/client-go/pkg/version/base.go similarity index 93% rename from vendor/k8s.io/client-go/1.5/pkg/version/base.go rename to vendor/k8s.io/client-go/pkg/version/base.go index c377705fe..f0f7338c7 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/version/base.go +++ b/vendor/k8s.io/client-go/pkg/version/base.go @@ -39,8 +39,8 @@ var ( // them irrelevant. (Next we'll take it out, which may muck with // scripts consuming the kubectl version output - but most of // these should be looking at gitVersion already anyways.) - gitMajor string = "" // major version, always numeric - gitMinor string = "" // minor version, numeric possibly followed by "+" + gitMajor string = "1" // major version, always numeric + gitMinor string = "6+" // minor version, numeric possibly followed by "+" // semantic version, derived by build scripts (see // https://github.com/kubernetes/kubernetes/blob/master/docs/design/versioning.md @@ -51,7 +51,7 @@ var ( // semantic version is a git hash, but the version itself is no // longer the direct output of "git describe", but a slight // translation to be semver compliant. - gitVersion string = "v0.0.0-master+$Format:%h$" + gitVersion string = "v1.6.1-beta.0+$Format:%h$" gitCommit string = "$Format:%H$" // sha1 from git, output of $(git rev-parse HEAD) gitTreeState string = "not a git tree" // state of git tree, either "clean" or "dirty" diff --git a/vendor/k8s.io/client-go/1.5/pkg/version/doc.go b/vendor/k8s.io/client-go/pkg/version/doc.go similarity index 92% rename from vendor/k8s.io/client-go/1.5/pkg/version/doc.go rename to vendor/k8s.io/client-go/pkg/version/doc.go index 380395784..4bf139ce8 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/version/doc.go +++ b/vendor/k8s.io/client-go/pkg/version/doc.go @@ -16,5 +16,4 @@ limitations under the License. // Package version supplies version information collected at build time to // kubernetes components. -// +k8s:openapi-gen=true -package version +package version // import "k8s.io/client-go/pkg/version" diff --git a/vendor/k8s.io/client-go/pkg/version/version.go b/vendor/k8s.io/client-go/pkg/version/version.go new file mode 100644 index 000000000..8c8350d13 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/version/version.go @@ -0,0 +1,42 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package version + +import ( + "fmt" + "runtime" + + apimachineryversion "k8s.io/apimachinery/pkg/version" +) + +// Get returns the overall codebase version. It's for detecting +// what code a binary was built from. +func Get() apimachineryversion.Info { + // These variables typically come from -ldflags settings and in + // their absence fallback to the settings in pkg/version/base.go + return apimachineryversion.Info{ + Major: gitMajor, + Minor: gitMinor, + GitVersion: gitVersion, + GitCommit: gitCommit, + GitTreeState: gitTreeState, + BuildDate: buildDate, + GoVersion: runtime.Version(), + Compiler: runtime.Compiler, + Platform: fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH), + } +} diff --git a/vendor/k8s.io/client-go/rest/OWNERS b/vendor/k8s.io/client-go/rest/OWNERS new file mode 100755 index 000000000..8d97da007 --- /dev/null +++ b/vendor/k8s.io/client-go/rest/OWNERS @@ -0,0 +1,24 @@ +reviewers: +- thockin +- smarterclayton +- caesarxuchao +- wojtek-t +- deads2k +- brendandburns +- liggitt +- nikhiljindal +- gmarek +- erictune +- sttts +- luxas +- dims +- errordeveloper +- hongchaodeng +- krousey +- resouer +- cjcullen +- rmmh +- lixiaobing10051267 +- asalkeld +- juanvallejo +- lojies diff --git a/vendor/k8s.io/client-go/1.5/rest/client.go b/vendor/k8s.io/client-go/rest/client.go similarity index 74% rename from vendor/k8s.io/client-go/1.5/rest/client.go rename to vendor/k8s.io/client-go/rest/client.go index c1fdf1f09..524e0d8eb 100644 --- a/vendor/k8s.io/client-go/1.5/rest/client.go +++ b/vendor/k8s.io/client-go/rest/client.go @@ -18,6 +18,7 @@ package rest import ( "fmt" + "mime" "net/http" "net/url" "os" @@ -25,10 +26,10 @@ import ( "strings" "time" - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/util/flowcontrol" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/util/flowcontrol" ) const ( @@ -38,6 +39,18 @@ const ( envBackoffDuration = "KUBE_CLIENT_BACKOFF_DURATION" ) +// Interface captures the set of operations for generically interacting with Kubernetes REST apis. +type Interface interface { + GetRateLimiter() flowcontrol.RateLimiter + Verb(verb string) *Request + Post() *Request + Put() *Request + Patch(pt types.PatchType) *Request + Get() *Request + Delete() *Request + APIVersion() schema.GroupVersion +} + // RESTClient imposes common Kubernetes API conventions on a set of resource paths. // The baseURL is expected to point to an HTTP or HTTPS path that is the parent // of one or more resources. The server should return a decodable API resource @@ -87,7 +100,7 @@ func NewRESTClient(baseURL *url.URL, versionedAPIPath string, config ContentConf base.Fragment = "" if config.GroupVersion == nil { - config.GroupVersion = &unversioned.GroupVersion{} + config.GroupVersion = &schema.GroupVersion{} } if len(config.ContentType) == 0 { config.ContentType = "application/json" @@ -141,34 +154,55 @@ func readExpBackoffConfig() BackoffManager { } // createSerializers creates all necessary serializers for given contentType. +// TODO: the negotiated serializer passed to this method should probably return +// serializers that control decoding and versioning without this package +// being aware of the types. Depends on whether RESTClient must deal with +// generic infrastructure. func createSerializers(config ContentConfig) (*Serializers, error) { - negotiated := config.NegotiatedSerializer + mediaTypes := config.NegotiatedSerializer.SupportedMediaTypes() contentType := config.ContentType - info, ok := negotiated.SerializerForMediaType(contentType, nil) + mediaType, _, err := mime.ParseMediaType(contentType) + if err != nil { + return nil, fmt.Errorf("the content type specified in the client configuration is not recognized: %v", err) + } + info, ok := runtime.SerializerInfoForMediaType(mediaTypes, mediaType) if !ok { - return nil, fmt.Errorf("serializer for %s not registered", contentType) + if len(contentType) != 0 || len(mediaTypes) == 0 { + return nil, fmt.Errorf("no serializers registered for %s", contentType) + } + info = mediaTypes[0] } - streamInfo, ok := negotiated.StreamingSerializerForMediaType(contentType, nil) - if !ok { - return nil, fmt.Errorf("streaming serializer for %s not registered", contentType) + + internalGV := schema.GroupVersions{ + { + Group: config.GroupVersion.Group, + Version: runtime.APIVersionInternal, + }, + // always include the legacy group as a decoding target to handle non-error `Status` return types + { + Group: "", + Version: runtime.APIVersionInternal, + }, } - internalGV := unversioned.GroupVersion{ - Group: config.GroupVersion.Group, - Version: runtime.APIVersionInternal, - } - return &Serializers{ - Encoder: negotiated.EncoderForVersion(info.Serializer, *config.GroupVersion), - Decoder: negotiated.DecoderToVersion(info.Serializer, internalGV), - StreamingSerializer: streamInfo.Serializer, - Framer: streamInfo.Framer, + + s := &Serializers{ + Encoder: config.NegotiatedSerializer.EncoderForVersion(info.Serializer, *config.GroupVersion), + Decoder: config.NegotiatedSerializer.DecoderToVersion(info.Serializer, internalGV), + RenegotiatedDecoder: func(contentType string, params map[string]string) (runtime.Decoder, error) { - renegotiated, ok := negotiated.SerializerForMediaType(contentType, params) + info, ok := runtime.SerializerInfoForMediaType(mediaTypes, contentType) if !ok { return nil, fmt.Errorf("serializer for %s not registered", contentType) } - return negotiated.DecoderToVersion(renegotiated.Serializer, internalGV), nil + return config.NegotiatedSerializer.DecoderToVersion(info.Serializer, internalGV), nil }, - }, nil + } + if info.StreamSerializer != nil { + s.StreamingSerializer = info.StreamSerializer.Serializer + s.Framer = info.StreamSerializer.Framer + } + + return s, nil } // Verb begins a request with a verb (GET, POST, PUT, DELETE). @@ -204,7 +238,7 @@ func (c *RESTClient) Put() *Request { } // Patch begins a PATCH request. Short for c.Verb("Patch"). -func (c *RESTClient) Patch(pt api.PatchType) *Request { +func (c *RESTClient) Patch(pt types.PatchType) *Request { return c.Verb("PATCH").SetHeader("Content-Type", string(pt)) } @@ -219,6 +253,6 @@ func (c *RESTClient) Delete() *Request { } // APIVersion returns the APIVersion this RESTClient is expected to use. -func (c *RESTClient) APIVersion() unversioned.GroupVersion { +func (c *RESTClient) APIVersion() schema.GroupVersion { return *c.contentConfig.GroupVersion } diff --git a/vendor/k8s.io/client-go/1.5/rest/config.go b/vendor/k8s.io/client-go/rest/config.go similarity index 82% rename from vendor/k8s.io/client-go/1.5/rest/config.go rename to vendor/k8s.io/client-go/rest/config.go index 5c5e1e038..2a2c03dff 100644 --- a/vendor/k8s.io/client-go/1.5/rest/config.go +++ b/vendor/k8s.io/client-go/rest/config.go @@ -25,16 +25,18 @@ import ( "path" gruntime "runtime" "strings" + "time" "github.com/golang/glog" - "k8s.io/client-go/1.5/pkg/api" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" - certutil "k8s.io/client-go/1.5/pkg/util/cert" - "k8s.io/client-go/1.5/pkg/util/flowcontrol" - "k8s.io/client-go/1.5/pkg/version" - clientcmdapi "k8s.io/client-go/1.5/tools/clientcmd/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/pkg/api" + "k8s.io/client-go/pkg/version" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + certutil "k8s.io/client-go/util/cert" + "k8s.io/client-go/util/flowcontrol" ) const ( @@ -69,8 +71,8 @@ type Config struct { // TODO: demonstrate an OAuth2 compatible client. BearerToken string - // Impersonate is the username that this RESTClient will impersonate - Impersonate string + // Impersonate is the configuration that RESTClient will use for impersonation. + Impersonate ImpersonationConfig // Server requires plugin-specified authentication. AuthProvider *clientcmdapi.AuthProviderConfig @@ -81,10 +83,6 @@ type Config struct { // TLSClientConfig contains settings to enable transport layer security TLSClientConfig - // Server should be accessed without verifying the TLS - // certificate. For testing only. - Insecure bool - // UserAgent is an optional field that specifies the caller of this request. UserAgent string @@ -109,13 +107,34 @@ type Config struct { // Rate limiter for limiting connections to the master from this client. If present overwrites QPS/Burst RateLimiter flowcontrol.RateLimiter + // The maximum length of time to wait before giving up on a server request. A value of zero means no timeout. + Timeout time.Duration + // Version forces a specific version to be used (if registered) // Do we need this? // Version string } +// ImpersonationConfig has all the available impersonation options +type ImpersonationConfig struct { + // UserName is the username to impersonate on each request. + UserName string + // Groups are the groups to impersonate on each request. + Groups []string + // Extra is a free-form field which can be used to link some authentication information + // to authorization information. This field allows you to impersonate it. + Extra map[string][]string +} + // TLSClientConfig contains settings to enable transport layer security type TLSClientConfig struct { + // Server should be accessed without verifying the TLS certificate. For testing only. + Insecure bool + // ServerName is passed to the server for SNI and is used in the client to check server + // ceritificates against. If ServerName is empty, the hostname used to contact the + // server is used. + ServerName string + // Server requires TLS client certificate authentication CertFile string // Server requires TLS client certificate authentication @@ -146,7 +165,7 @@ type ContentConfig struct { // GroupVersion is the API version to talk to. Must be provided when initializing // a RESTClient directly. When initializing a Client, will be set with the default // code version. - GroupVersion *unversioned.GroupVersion + GroupVersion *schema.GroupVersion // NegotiatedSerializer is used for obtaining encoders and decoders for multiple // supported media types. NegotiatedSerializer runtime.NegotiatedSerializer @@ -185,6 +204,9 @@ func RESTClientFor(config *Config) (*RESTClient, error) { var httpClient *http.Client if transport != http.DefaultTransport { httpClient = &http.Client{Transport: transport} + if config.Timeout > 0 { + httpClient.Timeout = config.Timeout + } } return NewRESTClient(baseURL, versionedAPIPath, config.ContentConfig, qps, burst, config.RateLimiter, httpClient) @@ -210,11 +232,14 @@ func UnversionedRESTClientFor(config *Config) (*RESTClient, error) { var httpClient *http.Client if transport != http.DefaultTransport { httpClient = &http.Client{Transport: transport} + if config.Timeout > 0 { + httpClient.Timeout = config.Timeout + } } versionConfig := config.ContentConfig if versionConfig.GroupVersion == nil { - v := unversioned.SchemeGroupVersion + v := metav1.SchemeGroupVersion versionConfig.GroupVersion = &v } @@ -333,3 +358,27 @@ func AddUserAgent(config *Config, userAgent string) *Config { config.UserAgent = fullUserAgent return config } + +// AnonymousClientConfig returns a copy of the given config with all user credentials (cert/key, bearer token, and username/password) removed +func AnonymousClientConfig(config *Config) *Config { + // copy only known safe fields + return &Config{ + Host: config.Host, + APIPath: config.APIPath, + Prefix: config.Prefix, + ContentConfig: config.ContentConfig, + TLSClientConfig: TLSClientConfig{ + Insecure: config.Insecure, + ServerName: config.ServerName, + CAFile: config.TLSClientConfig.CAFile, + CAData: config.TLSClientConfig.CAData, + }, + RateLimiter: config.RateLimiter, + UserAgent: config.UserAgent, + Transport: config.Transport, + WrapTransport: config.WrapTransport, + QPS: config.QPS, + Burst: config.Burst, + Timeout: config.Timeout, + } +} diff --git a/vendor/k8s.io/client-go/1.5/rest/plugin.go b/vendor/k8s.io/client-go/rest/plugin.go similarity index 97% rename from vendor/k8s.io/client-go/1.5/rest/plugin.go rename to vendor/k8s.io/client-go/rest/plugin.go index 9f1ce9973..cf8fbabfd 100644 --- a/vendor/k8s.io/client-go/1.5/rest/plugin.go +++ b/vendor/k8s.io/client-go/rest/plugin.go @@ -23,7 +23,7 @@ import ( "github.com/golang/glog" - clientcmdapi "k8s.io/client-go/1.5/tools/clientcmd/api" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) type AuthProvider interface { diff --git a/vendor/k8s.io/client-go/1.5/rest/request.go b/vendor/k8s.io/client-go/rest/request.go similarity index 77% rename from vendor/k8s.io/client-go/1.5/rest/request.go rename to vendor/k8s.io/client-go/rest/request.go index 4e57a0cc2..b87ddaff5 100644 --- a/vendor/k8s.io/client-go/1.5/rest/request.go +++ b/vendor/k8s.io/client-go/rest/request.go @@ -18,6 +18,7 @@ package rest import ( "bytes" + "context" "encoding/hex" "fmt" "io" @@ -32,20 +33,20 @@ import ( "time" "github.com/golang/glog" - "k8s.io/client-go/1.5/pkg/api/errors" - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/api/v1" - pathvalidation "k8s.io/client-go/1.5/pkg/api/validation/path" - "k8s.io/client-go/1.5/pkg/fields" - "k8s.io/client-go/1.5/pkg/labels" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/runtime/serializer/streaming" - "k8s.io/client-go/1.5/pkg/util/flowcontrol" - "k8s.io/client-go/1.5/pkg/util/net" - "k8s.io/client-go/1.5/pkg/util/sets" - "k8s.io/client-go/1.5/pkg/watch" - "k8s.io/client-go/1.5/pkg/watch/versioned" - "k8s.io/client-go/1.5/tools/metrics" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer/streaming" + "k8s.io/apimachinery/pkg/util/net" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/pkg/api/v1" + restclientwatch "k8s.io/client-go/rest/watch" + "k8s.io/client-go/tools/metrics" + "k8s.io/client-go/util/flowcontrol" ) var ( @@ -104,16 +105,14 @@ type Request struct { resource string resourceName string subresource string - selector labels.Selector timeout time.Duration // output err error body io.Reader - // The constructed request and the response - req *http.Request - resp *http.Response + // This is only used for per-request timeouts, deadlines, and cancellations. + ctx context.Context backoffMgr BackoffManager throttle flowcontrol.RateLimiter @@ -179,7 +178,7 @@ func (r *Request) Resource(resource string) *Request { r.err = fmt.Errorf("resource already set to %q, cannot change to %q", r.resource, resource) return r } - if msgs := pathvalidation.IsValidPathSegmentName(resource); len(msgs) != 0 { + if msgs := IsValidPathSegmentName(resource); len(msgs) != 0 { r.err = fmt.Errorf("invalid resource %q: %v", resource, msgs) return r } @@ -199,7 +198,7 @@ func (r *Request) SubResource(subresources ...string) *Request { return r } for _, s := range subresources { - if msgs := pathvalidation.IsValidPathSegmentName(s); len(msgs) != 0 { + if msgs := IsValidPathSegmentName(s); len(msgs) != 0 { r.err = fmt.Errorf("invalid subresource %q: %v", s, msgs) return r } @@ -221,7 +220,7 @@ func (r *Request) Name(resourceName string) *Request { r.err = fmt.Errorf("resource name already set to %q, cannot change to %q", r.resourceName, resourceName) return r } - if msgs := pathvalidation.IsValidPathSegmentName(resourceName); len(msgs) != 0 { + if msgs := IsValidPathSegmentName(resourceName); len(msgs) != 0 { r.err = fmt.Errorf("invalid resource name %q: %v", resourceName, msgs) return r } @@ -238,7 +237,7 @@ func (r *Request) Namespace(namespace string) *Request { r.err = fmt.Errorf("namespace already set to %q, cannot change to %q", r.namespace, namespace) return r } - if msgs := pathvalidation.IsValidPathSegmentName(namespace); len(msgs) != 0 { + if msgs := IsValidPathSegmentName(namespace); len(msgs) != 0 { r.err = fmt.Errorf("invalid namespace %q: %v", namespace, msgs) return r } @@ -333,10 +332,10 @@ func (r resourceTypeToFieldMapping) filterField(resourceType, field, value strin return fMapping.filterField(field, value) } -type versionToResourceToFieldMapping map[unversioned.GroupVersion]resourceTypeToFieldMapping +type versionToResourceToFieldMapping map[schema.GroupVersion]resourceTypeToFieldMapping // filterField transforms the given field/value selector for the given groupVersion and resource -func (v versionToResourceToFieldMapping) filterField(groupVersion *unversioned.GroupVersion, resourceType, field, value string) (newField, newValue string, err error) { +func (v versionToResourceToFieldMapping) filterField(groupVersion *schema.GroupVersion, resourceType, field, value string) (newField, newValue string, err error) { rMapping, ok := v[*groupVersion] if !ok { // no groupVersion overrides registered, default to identity mapping @@ -357,8 +356,9 @@ var fieldMappings = versionToResourceToFieldMapping{ nodeUnschedulable: nodeUnschedulable, }, "pods": clientFieldNameToAPIVersionFieldName{ - podHost: podHost, - podStatus: podStatus, + objectNameField: objectNameField, + podHost: podHost, + podStatus: podStatus, }, "secrets": clientFieldNameToAPIVersionFieldName{ secretType: secretType, @@ -403,7 +403,7 @@ func (r *Request) FieldsSelectorParam(s fields.Selector) *Request { r.err = err return r } - return r.setParam(unversioned.FieldSelectorQueryParam(r.content.GroupVersion.String()), s2.String()) + return r.setParam(metav1.FieldSelectorQueryParam(r.content.GroupVersion.String()), s2.String()) } // LabelsSelectorParam adds the given selector as a query parameter @@ -417,7 +417,7 @@ func (r *Request) LabelsSelectorParam(s labels.Selector) *Request { if s.Empty() { return r } - return r.setParam(unversioned.LabelSelectorQueryParam(r.content.GroupVersion.String()), s.String()) + return r.setParam(metav1.LabelSelectorQueryParam(r.content.GroupVersion.String()), s.String()) } // UintParam creates a query parameter with the given value. @@ -452,14 +452,14 @@ func (r *Request) VersionedParams(obj runtime.Object, codec runtime.ParameterCod for _, value := range v { // TODO: Move it to setParam method, once we get rid of // FieldSelectorParam & LabelSelectorParam methods. - if k == unversioned.LabelSelectorQueryParam(r.content.GroupVersion.String()) && value == "" { + if k == metav1.LabelSelectorQueryParam(r.content.GroupVersion.String()) && value == "" { // Don't set an empty selector for backward compatibility. // Since there is no way to get the difference between empty // and unspecified string, we don't set it to avoid having // labelSelector= param in every request. continue } - if k == unversioned.FieldSelectorQueryParam(r.content.GroupVersion.String()) { + if k == metav1.FieldSelectorQueryParam(r.content.GroupVersion.String()) { if len(value) == 0 { // Don't set an empty selector for backward compatibility. // Since there is no way to get the difference between empty @@ -538,10 +538,10 @@ func (r *Request) Body(obj interface{}) *Request { r.err = err return r } - glog.V(8).Infof("Request Body: %#v", string(data)) + glogBody("Request Body", data) r.body = bytes.NewReader(data) case []byte: - glog.V(8).Infof("Request Body: %#v", string(t)) + glogBody("Request Body", t) r.body = bytes.NewReader(t) case io.Reader: r.body = t @@ -555,7 +555,7 @@ func (r *Request) Body(obj interface{}) *Request { r.err = err return r } - glog.V(8).Infof("Request Body: %#v", string(data)) + glogBody("Request Body", data) r.body = bytes.NewReader(data) r.SetHeader("Content-Type", r.content.ContentType) default: @@ -564,6 +564,13 @@ func (r *Request) Body(obj interface{}) *Request { return r } +// Context adds a context to the request. Contexts are only used for +// timeouts, deadlines, and cancellations. +func (r *Request) Context(ctx context.Context) *Request { + r.ctx = ctx + return r +} + // URL returns the current working URL. func (r *Request) URL() *url.URL { p := r.pathPrefix @@ -649,6 +656,9 @@ func (r *Request) Watch() (watch.Interface, error) { if err != nil { return nil, err } + if r.ctx != nil { + req = req.WithContext(r.ctx) + } req.Header = r.headers client := r.client if client == nil { @@ -681,7 +691,7 @@ func (r *Request) Watch() (watch.Interface, error) { } framer := r.serializers.Framer.NewFrameReader(resp.Body) decoder := streaming.NewDecoder(framer, r.serializers.StreamingSerializer) - return watch.NewStreamWatcher(versioned.NewDecoder(decoder, r.serializers.Decoder)), nil + return watch.NewStreamWatcher(restclientwatch.NewDecoder(decoder, r.serializers.Decoder)), nil } // updateURLMetrics is a convenience function for pushing metrics. @@ -692,9 +702,10 @@ func updateURLMetrics(req *Request, resp *http.Response, err error) { url = req.baseURL.Host } - // If we have an error (i.e. apiserver down) we report that as a metric label. + // Errors can be arbitrary strings. Unbound label cardinality is not suitable for a metric + // system so we just report them as ``. if err != nil { - metrics.RequestResult.Increment(err.Error(), req.verb, url) + metrics.RequestResult.Increment("", req.verb, url) } else { //Metrics for failure codes metrics.RequestResult.Increment(strconv.Itoa(resp.StatusCode), req.verb, url) @@ -717,6 +728,9 @@ func (r *Request) Stream() (io.ReadCloser, error) { if err != nil { return nil, err } + if r.ctx != nil { + req = req.WithContext(r.ctx) + } req.Header = r.headers client := r.client if client == nil { @@ -745,10 +759,11 @@ func (r *Request) Stream() (io.ReadCloser, error) { defer resp.Body.Close() result := r.transformResponse(resp, req) - if result.err != nil { - return nil, result.err + err := result.Error() + if err == nil { + err = fmt.Errorf("%d while accessing %v: %s", result.statusCode, url, string(result.body)) } - return nil, fmt.Errorf("%d while accessing %v: %s", result.statusCode, url, string(result.body)) + return nil, err } } @@ -791,9 +806,18 @@ func (r *Request) request(fn func(*http.Request, *http.Response)) error { if err != nil { return err } + if r.ctx != nil { + req = req.WithContext(r.ctx) + } req.Header = r.headers r.backoffMgr.Sleep(r.backoffMgr.CalculateBackoff(r.URL())) + if retries > 0 { + // We are retrying the request that we already send to apiserver + // at least once before. + // This request should also be throttled with the client-internal throttler. + r.tryThrottle() + } resp, err := client.Do(req) updateURLMetrics(r, resp, err) if err != nil { @@ -802,7 +826,20 @@ func (r *Request) request(fn func(*http.Request, *http.Response)) error { r.backoffMgr.UpdateBackoff(r.URL(), err, resp.StatusCode) } if err != nil { - return err + // "Connection reset by peer" is usually a transient error. + // Thus in case of "GET" operations, we simply retry it. + // We are not automatically retrying "write" operations, as + // they are not idempotent. + if !net.IsConnectionReset(err) || r.verb != "GET" { + return err + } + // For the purpose of retry, we set the artificial "retry-after" response. + // TODO: Should we clean the original response if it exists? + resp = &http.Response{ + StatusCode: http.StatusInternalServerError, + Header: http.Header{"Retry-After": []string{"1"}}, + Body: ioutil.NopCloser(bytes.NewReader([]byte{})), + } } done := func() bool { @@ -869,6 +906,7 @@ func (r *Request) DoRaw() ([]byte, error) { var result Result err := r.request(func(req *http.Request, resp *http.Response) { result.body, result.err = ioutil.ReadAll(resp.Body) + glogBody("Response Body", result.body) if resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent { result.err = r.transformUnstructuredResponseError(resp, req, result.body) } @@ -888,14 +926,7 @@ func (r *Request) transformResponse(resp *http.Response, req *http.Request) Resu } } - if glog.V(8) { - switch { - case bytes.IndexFunc(body, func(r rune) bool { return r < 0x0a }) != -1: - glog.Infof("Response Body:\n%s", hex.Dump(body)) - default: - glog.Infof("Response Body: %s", string(body)) - } - } + glogBody("Response Body", body) // verify the content type is accurate contentType := resp.Header.Get("Content-Type") @@ -922,33 +953,21 @@ func (r *Request) transformResponse(resp *http.Response, req *http.Request) Resu } } - // Did the server give us a status response? - isStatusResponse := false - status := &unversioned.Status{} - // Because release-1.1 server returns Status with empty APIVersion at paths - // to the Extensions resources, we need to use DecodeInto here to provide - // default groupVersion, otherwise a status response won't be correctly - // decoded. - err := runtime.DecodeInto(decoder, body, status) - if err == nil && len(status.Status) > 0 { - isStatusResponse = true - } - switch { case resp.StatusCode == http.StatusSwitchingProtocols: // no-op, we've been upgraded case resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent: - if !isStatusResponse { - return Result{err: r.transformUnstructuredResponseError(resp, req, body)} + // calculate an unstructured error from the response which the Result object may use if the caller + // did not return a structured error. + retryAfter, _ := retryAfterSeconds(resp) + err := r.newUnstructuredResponseError(body, isTextResponse(resp), resp.StatusCode, req.Method, retryAfter) + return Result{ + body: body, + contentType: contentType, + statusCode: resp.StatusCode, + decoder: decoder, + err: err, } - return Result{err: errors.FromObject(status)} - } - - // If the server gave us a status back, look at what it was. - success := resp.StatusCode >= http.StatusOK && resp.StatusCode <= http.StatusPartialContent - if isStatusResponse && (status.Status != unversioned.StatusSuccess && !success) { - // "Failed" requests are clearly just an error and it makes sense to return them as such. - return Result{err: errors.FromObject(status)} } return Result{ @@ -959,6 +978,24 @@ func (r *Request) transformResponse(resp *http.Response, req *http.Request) Resu } } +// glogBody logs a body output that could be either JSON or protobuf. It explicitly guards against +// allocating a new string for the body output unless necessary. Uses a simple heuristic to determine +// whether the body is printable. +func glogBody(prefix string, body []byte) { + if glog.V(8) { + if bytes.IndexFunc(body, func(r rune) bool { + return r < 0x0a + }) != -1 { + glog.Infof("%s:\n%s", prefix, hex.Dump(body)) + } else { + glog.Infof("%s: %s", prefix, string(body)) + } + } +} + +// maxUnstructuredResponseTextBytes is an upper bound on how much output to include in the unstructured error. +const maxUnstructuredResponseTextBytes = 2048 + // transformUnstructuredResponseError handles an error from the server that is not in a structured form. // It is expected to transform any response that is not recognizable as a clear server sent error from the // K8S API using the information provided with the request. In practice, HTTP proxies and client libraries @@ -979,24 +1016,34 @@ func (r *Request) transformResponse(resp *http.Response, req *http.Request) Resu // TODO: introduce transformation of generic http.Client.Do() errors that separates 4. func (r *Request) transformUnstructuredResponseError(resp *http.Response, req *http.Request, body []byte) error { if body == nil && resp.Body != nil { - if data, err := ioutil.ReadAll(resp.Body); err == nil { + if data, err := ioutil.ReadAll(&io.LimitedReader{R: resp.Body, N: maxUnstructuredResponseTextBytes}); err == nil { body = data } } - glog.V(8).Infof("Response Body: %#v", string(body)) + retryAfter, _ := retryAfterSeconds(resp) + return r.newUnstructuredResponseError(body, isTextResponse(resp), resp.StatusCode, req.Method, retryAfter) +} + +// newUnstructuredResponseError instantiates the appropriate generic error for the provided input. It also logs the body. +func (r *Request) newUnstructuredResponseError(body []byte, isTextResponse bool, statusCode int, method string, retryAfter int) error { + // cap the amount of output we create + if len(body) > maxUnstructuredResponseTextBytes { + body = body[:maxUnstructuredResponseTextBytes] + } message := "unknown" - if isTextResponse(resp) { + if isTextResponse { message = strings.TrimSpace(string(body)) } - retryAfter, _ := retryAfterSeconds(resp) + var groupResource schema.GroupResource + if len(r.resource) > 0 { + groupResource.Group = r.content.GroupVersion.Group + groupResource.Resource = r.resource + } return errors.NewGenericServerResponse( - resp.StatusCode, - req.Method, - unversioned.GroupResource{ - Group: r.content.GroupVersion.Group, - Resource: r.resource, - }, + statusCode, + method, + groupResource, r.resourceName, message, retryAfter, @@ -1056,15 +1103,31 @@ func (r Result) Raw() ([]byte, error) { return r.body, r.err } -// Get returns the result as an object. +// Get returns the result as an object, which means it passes through the decoder. +// If the returned object is of type Status and has .Status != StatusSuccess, the +// additional information in Status will be used to enrich the error. func (r Result) Get() (runtime.Object, error) { if r.err != nil { - return nil, r.err + // Check whether the result has a Status object in the body and prefer that. + return nil, r.Error() } if r.decoder == nil { return nil, fmt.Errorf("serializer for %s doesn't exist", r.contentType) } - return runtime.Decode(r.decoder, r.body) + + // decode, but if the result is Status return that as an error instead. + out, _, err := r.decoder.Decode(r.body, nil, nil) + if err != nil { + return nil, err + } + switch t := out.(type) { + case *metav1.Status: + // any status besides StatusSuccess is considered an error. + if t.Status != metav1.StatusSuccess { + return nil, errors.FromObject(t) + } + } + return out, nil } // StatusCode returns the HTTP status code of the request. (Only valid if no @@ -1075,14 +1138,31 @@ func (r Result) StatusCode(statusCode *int) Result { } // Into stores the result into obj, if possible. If obj is nil it is ignored. +// If the returned object is of type Status and has .Status != StatusSuccess, the +// additional information in Status will be used to enrich the error. func (r Result) Into(obj runtime.Object) error { if r.err != nil { - return r.err + // Check whether the result has a Status object in the body and prefer that. + return r.Error() } if r.decoder == nil { return fmt.Errorf("serializer for %s doesn't exist", r.contentType) } - return runtime.DecodeInto(r.decoder, r.body, obj) + + out, _, err := r.decoder.Decode(r.body, nil, obj) + if err != nil || out == obj { + return err + } + // if a different object is returned, see if it is Status and avoid double decoding + // the object. + switch t := out.(type) { + case *metav1.Status: + // any status besides StatusSuccess is considered an error. + if t.Status != metav1.StatusSuccess { + return errors.FromObject(t) + } + } + return nil } // WasCreated updates the provided bool pointer to whether the server returned @@ -1093,7 +1173,75 @@ func (r Result) WasCreated(wasCreated *bool) Result { } // Error returns the error executing the request, nil if no error occurred. +// If the returned object is of type Status and has Status != StatusSuccess, the +// additional information in Status will be used to enrich the error. // See the Request.Do() comment for what errors you might get. func (r Result) Error() error { + // if we have received an unexpected server error, and we have a body and decoder, we can try to extract + // a Status object. + if r.err == nil || !errors.IsUnexpectedServerError(r.err) || len(r.body) == 0 || r.decoder == nil { + return r.err + } + + // attempt to convert the body into a Status object + // to be backwards compatible with old servers that do not return a version, default to "v1" + out, _, err := r.decoder.Decode(r.body, &schema.GroupVersionKind{Version: "v1"}, nil) + if err != nil { + glog.V(5).Infof("body was not decodable (unable to check for Status): %v", err) + return r.err + } + switch t := out.(type) { + case *metav1.Status: + // because we default the kind, we *must* check for StatusFailure + if t.Status == metav1.StatusFailure { + return errors.FromObject(t) + } + } return r.err } + +// NameMayNotBe specifies strings that cannot be used as names specified as path segments (like the REST API or etcd store) +var NameMayNotBe = []string{".", ".."} + +// NameMayNotContain specifies substrings that cannot be used in names specified as path segments (like the REST API or etcd store) +var NameMayNotContain = []string{"/", "%"} + +// IsValidPathSegmentName validates the name can be safely encoded as a path segment +func IsValidPathSegmentName(name string) []string { + for _, illegalName := range NameMayNotBe { + if name == illegalName { + return []string{fmt.Sprintf(`may not be '%s'`, illegalName)} + } + } + + var errors []string + for _, illegalContent := range NameMayNotContain { + if strings.Contains(name, illegalContent) { + errors = append(errors, fmt.Sprintf(`may not contain '%s'`, illegalContent)) + } + } + + return errors +} + +// IsValidPathSegmentPrefix validates the name can be used as a prefix for a name which will be encoded as a path segment +// It does not check for exact matches with disallowed names, since an arbitrary suffix might make the name valid +func IsValidPathSegmentPrefix(name string) []string { + var errors []string + for _, illegalContent := range NameMayNotContain { + if strings.Contains(name, illegalContent) { + errors = append(errors, fmt.Sprintf(`may not contain '%s'`, illegalContent)) + } + } + + return errors +} + +// ValidatePathSegmentName validates the name can be safely encoded as a path segment +func ValidatePathSegmentName(name string, prefix bool) []string { + if prefix { + return IsValidPathSegmentPrefix(name) + } else { + return IsValidPathSegmentName(name) + } +} diff --git a/vendor/k8s.io/client-go/1.5/rest/transport.go b/vendor/k8s.io/client-go/rest/transport.go similarity index 79% rename from vendor/k8s.io/client-go/1.5/rest/transport.go rename to vendor/k8s.io/client-go/rest/transport.go index 6cd2757a2..ba43752bc 100644 --- a/vendor/k8s.io/client-go/1.5/rest/transport.go +++ b/vendor/k8s.io/client-go/rest/transport.go @@ -20,13 +20,13 @@ import ( "crypto/tls" "net/http" - "k8s.io/client-go/1.5/transport" + "k8s.io/client-go/transport" ) // TLSConfigFor returns a tls.Config that will provide the transport level security defined // by the provided Config. Will return nil if no transport level security is requested. func TLSConfigFor(config *Config) (*tls.Config, error) { - cfg, err := config.transportConfig() + cfg, err := config.TransportConfig() if err != nil { return nil, err } @@ -37,7 +37,7 @@ func TLSConfigFor(config *Config) (*tls.Config, error) { // or transport level security defined by the provided Config. Will return the // default http.DefaultTransport if no special case behavior is needed. func TransportFor(config *Config) (http.RoundTripper, error) { - cfg, err := config.transportConfig() + cfg, err := config.TransportConfig() if err != nil { return nil, err } @@ -49,15 +49,15 @@ func TransportFor(config *Config) (http.RoundTripper, error) { // the underlying connection (like WebSocket or HTTP2 clients). Pure HTTP clients should use // the higher level TransportFor or RESTClientFor methods. func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTripper, error) { - cfg, err := config.transportConfig() + cfg, err := config.TransportConfig() if err != nil { return nil, err } return transport.HTTPWrappersForConfig(cfg, rt) } -// transportConfig converts a client config to an appropriate transport config. -func (c *Config) transportConfig() (*transport.Config, error) { +// TransportConfig converts a client config to an appropriate transport config. +func (c *Config) TransportConfig() (*transport.Config, error) { wt := c.WrapTransport if c.AuthProvider != nil { provider, err := GetAuthProvider(c.Host, c.AuthProvider, c.AuthConfigPersister) @@ -78,17 +78,22 @@ func (c *Config) transportConfig() (*transport.Config, error) { Transport: c.Transport, WrapTransport: wt, TLS: transport.TLSConfig{ - CAFile: c.CAFile, - CAData: c.CAData, - CertFile: c.CertFile, - CertData: c.CertData, - KeyFile: c.KeyFile, - KeyData: c.KeyData, - Insecure: c.Insecure, + Insecure: c.Insecure, + ServerName: c.ServerName, + CAFile: c.CAFile, + CAData: c.CAData, + CertFile: c.CertFile, + CertData: c.CertData, + KeyFile: c.KeyFile, + KeyData: c.KeyData, }, Username: c.Username, Password: c.Password, BearerToken: c.BearerToken, - Impersonate: c.Impersonate, + Impersonate: transport.ImpersonationConfig{ + UserName: c.Impersonate.UserName, + Groups: c.Impersonate.Groups, + Extra: c.Impersonate.Extra, + }, }, nil } diff --git a/vendor/k8s.io/client-go/1.5/rest/url_utils.go b/vendor/k8s.io/client-go/rest/url_utils.go similarity index 89% rename from vendor/k8s.io/client-go/1.5/rest/url_utils.go rename to vendor/k8s.io/client-go/rest/url_utils.go index f674f47d1..14f94650a 100644 --- a/vendor/k8s.io/client-go/1.5/rest/url_utils.go +++ b/vendor/k8s.io/client-go/rest/url_utils.go @@ -21,22 +21,19 @@ import ( "net/url" "path" - "k8s.io/client-go/1.5/pkg/api/unversioned" + "k8s.io/apimachinery/pkg/runtime/schema" ) // DefaultServerURL converts a host, host:port, or URL string to the default base server API path // to use with a Client at a given API version following the standard conventions for a // Kubernetes API. -func DefaultServerURL(host, apiPath string, groupVersion unversioned.GroupVersion, defaultTLS bool) (*url.URL, string, error) { +func DefaultServerURL(host, apiPath string, groupVersion schema.GroupVersion, defaultTLS bool) (*url.URL, string, error) { if host == "" { return nil, "", fmt.Errorf("host must be a URL or a host:port pair") } base := host hostURL, err := url.Parse(base) - if err != nil { - return nil, "", err - } - if hostURL.Scheme == "" || hostURL.Host == "" { + if err != nil || hostURL.Scheme == "" || hostURL.Host == "" { scheme := "http://" if defaultTLS { scheme = "https://" @@ -89,5 +86,5 @@ func defaultServerUrlFor(config *Config) (*url.URL, string, error) { if config.GroupVersion != nil { return DefaultServerURL(host, config.APIPath, *config.GroupVersion, defaultTLS) } - return DefaultServerURL(host, config.APIPath, unversioned.GroupVersion{}, defaultTLS) + return DefaultServerURL(host, config.APIPath, schema.GroupVersion{}, defaultTLS) } diff --git a/vendor/k8s.io/client-go/1.5/rest/urlbackoff.go b/vendor/k8s.io/client-go/rest/urlbackoff.go similarity index 97% rename from vendor/k8s.io/client-go/1.5/rest/urlbackoff.go rename to vendor/k8s.io/client-go/rest/urlbackoff.go index bac7477ff..eff848abc 100644 --- a/vendor/k8s.io/client-go/1.5/rest/urlbackoff.go +++ b/vendor/k8s.io/client-go/rest/urlbackoff.go @@ -21,8 +21,8 @@ import ( "time" "github.com/golang/glog" - "k8s.io/client-go/1.5/pkg/util/flowcontrol" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/util/flowcontrol" ) // Set of resp. Codes that we backoff for. diff --git a/vendor/k8s.io/client-go/1.5/rest/versions.go b/vendor/k8s.io/client-go/rest/versions.go similarity index 95% rename from vendor/k8s.io/client-go/1.5/rest/versions.go rename to vendor/k8s.io/client-go/rest/versions.go index e2cd9212c..9d41812f2 100644 --- a/vendor/k8s.io/client-go/1.5/rest/versions.go +++ b/vendor/k8s.io/client-go/rest/versions.go @@ -22,7 +22,7 @@ import ( "net/http" "path" - "k8s.io/client-go/1.5/pkg/api/unversioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) const ( @@ -57,7 +57,7 @@ func ServerAPIVersions(c *Config) (groupVersions []string, err error) { if err != nil { return nil, err } - var v unversioned.APIVersions + var v metav1.APIVersions defer resp.Body.Close() err = json.NewDecoder(resp.Body).Decode(&v) if err != nil { @@ -71,7 +71,7 @@ func ServerAPIVersions(c *Config) (groupVersions []string, err error) { if err != nil { return nil, err } - var apiGroupList unversioned.APIGroupList + var apiGroupList metav1.APIGroupList defer resp2.Body.Close() err = json.NewDecoder(resp2.Body).Decode(&apiGroupList) if err != nil { diff --git a/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/decoder.go b/vendor/k8s.io/client-go/rest/watch/decoder.go similarity index 88% rename from vendor/k8s.io/client-go/1.5/pkg/watch/versioned/decoder.go rename to vendor/k8s.io/client-go/rest/watch/decoder.go index 150623348..73bb63add 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/decoder.go +++ b/vendor/k8s.io/client-go/rest/watch/decoder.go @@ -19,9 +19,10 @@ package versioned import ( "fmt" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/runtime/serializer/streaming" - "k8s.io/client-go/1.5/pkg/watch" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer/streaming" + "k8s.io/apimachinery/pkg/watch" ) // Decoder implements the watch.Decoder interface for io.ReadClosers that @@ -44,13 +45,13 @@ func NewDecoder(decoder streaming.Decoder, embeddedDecoder runtime.Decoder) *Dec // Decode blocks until it can return the next object in the reader. Returns an error // if the reader is closed or an object can't be decoded. func (d *Decoder) Decode() (watch.EventType, runtime.Object, error) { - var got Event + var got metav1.WatchEvent res, _, err := d.decoder.Decode(nil, &got) if err != nil { return "", nil, err } if res != &got { - return "", nil, fmt.Errorf("unable to decode to versioned.Event") + return "", nil, fmt.Errorf("unable to decode to metav1.Event") } switch got.Type { case string(watch.Added), string(watch.Modified), string(watch.Deleted), string(watch.Error): diff --git a/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/encoder.go b/vendor/k8s.io/client-go/rest/watch/encoder.go similarity index 79% rename from vendor/k8s.io/client-go/1.5/pkg/watch/versioned/encoder.go rename to vendor/k8s.io/client-go/rest/watch/encoder.go index 0f499d4bb..e55aa12d9 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/watch/versioned/encoder.go +++ b/vendor/k8s.io/client-go/rest/watch/encoder.go @@ -19,14 +19,16 @@ package versioned import ( "encoding/json" - "k8s.io/client-go/1.5/pkg/runtime" - "k8s.io/client-go/1.5/pkg/runtime/serializer/streaming" - "k8s.io/client-go/1.5/pkg/watch" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer/streaming" + "k8s.io/apimachinery/pkg/watch" ) // Encoder serializes watch.Events into io.Writer. The internal objects // are encoded using embedded encoder, and the outer Event is serialized // using encoder. +// TODO: this type is only used by tests type Encoder struct { encoder streaming.Encoder embeddedEncoder runtime.Encoder @@ -47,5 +49,8 @@ func (e *Encoder) Encode(event *watch.Event) error { return err } // FIXME: get rid of json.RawMessage. - return e.encoder.Encode(&Event{string(event.Type), runtime.RawExtension{Raw: json.RawMessage(data)}}) + return e.encoder.Encode(&metav1.WatchEvent{ + Type: string(event.Type), + Object: runtime.RawExtension{Raw: json.RawMessage(data)}, + }) } diff --git a/vendor/k8s.io/client-go/tools/cache/OWNERS b/vendor/k8s.io/client-go/tools/cache/OWNERS new file mode 100755 index 000000000..e923c7709 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/OWNERS @@ -0,0 +1,41 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- derekwaynecarr +- caesarxuchao +- mikedanese +- liggitt +- nikhiljindal +- bprashanth +- erictune +- davidopp +- pmorie +- kargakis +- janetkuo +- justinsb +- eparis +- soltysh +- jsafrane +- dims +- madhusudancs +- hongchaodeng +- krousey +- markturansky +- fgrzadkowski +- xiang90 +- mml +- ingvagabund +- resouer +- jessfraz +- david-mcmahon +- mfojtik +- '249043822' +- lixiaobing10051267 +- ddysher +- mqliang +- feihujiang +- sdminonne diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/controller.go b/vendor/k8s.io/client-go/tools/cache/controller.go similarity index 84% rename from vendor/k8s.io/client-go/1.5/tools/cache/controller.go rename to vendor/k8s.io/client-go/tools/cache/controller.go index 413f45589..06bc04f85 100644 --- a/vendor/k8s.io/client-go/1.5/tools/cache/controller.go +++ b/vendor/k8s.io/client-go/tools/cache/controller.go @@ -20,16 +20,17 @@ import ( "sync" "time" - "k8s.io/client-go/1.5/pkg/runtime" - utilruntime "k8s.io/client-go/1.5/pkg/util/runtime" - "k8s.io/client-go/1.5/pkg/util/wait" + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/clock" ) // Config contains all the settings for a Controller. type Config struct { // The queue for your objects; either a FIFO or // a DeltaFIFO. Your Process() function should accept - // the output of this Oueue's Pop() method. + // the output of this Queue's Pop() method. Queue // Something that can list and watch your objects. @@ -50,6 +51,11 @@ type Config struct { // queue. FullResyncPeriod time.Duration + // ShouldResync, if specified, is invoked when the controller's reflector determines the next + // periodic sync should occur. If this returns true, it means the reflector should proceed with + // the resync. + ShouldResync ShouldResyncFunc + // If true, when Process() returns an error, re-enqueue the object. // TODO: add interface to let you inject a delay/backoff or drop // the object completely if desired. Pass the object in @@ -57,26 +63,33 @@ type Config struct { RetryOnError bool } +// ShouldResyncFunc is a type of function that indicates if a reflector should perform a +// resync or not. It can be used by a shared informer to support multiple event handlers with custom +// resync periods. +type ShouldResyncFunc func() bool + // ProcessFunc processes a single object. type ProcessFunc func(obj interface{}) error // Controller is a generic controller framework. -type Controller struct { +type controller struct { config Config reflector *Reflector reflectorMutex sync.RWMutex + clock clock.Clock } -// TODO make the "Controller" private, and convert all references to use ControllerInterface instead -type ControllerInterface interface { +type Controller interface { Run(stopCh <-chan struct{}) HasSynced() bool + LastSyncResourceVersion() string } // New makes a new Controller from the given Config. -func New(c *Config) *Controller { - ctlr := &Controller{ +func New(c *Config) Controller { + ctlr := &controller{ config: *c, + clock: &clock.RealClock{}, } return ctlr } @@ -84,14 +97,20 @@ func New(c *Config) *Controller { // Run begins processing items, and will continue until a value is sent down stopCh. // It's an error to call Run more than once. // Run blocks; call via go. -func (c *Controller) Run(stopCh <-chan struct{}) { +func (c *controller) Run(stopCh <-chan struct{}) { defer utilruntime.HandleCrash() + go func() { + <-stopCh + c.config.Queue.Close() + }() r := NewReflector( c.config.ListerWatcher, c.config.ObjectType, c.config.Queue, c.config.FullResyncPeriod, ) + r.ShouldResync = c.config.ShouldResync + r.clock = c.clock c.reflectorMutex.Lock() c.reflector = r @@ -103,28 +122,33 @@ func (c *Controller) Run(stopCh <-chan struct{}) { } // Returns true once this controller has completed an initial resource listing -func (c *Controller) HasSynced() bool { +func (c *controller) HasSynced() bool { return c.config.Queue.HasSynced() } -// Requeue adds the provided object back into the queue if it does not already exist. -func (c *Controller) Requeue(obj interface{}) error { - return c.config.Queue.AddIfNotPresent(Deltas{ - Delta{ - Type: Sync, - Object: obj, - }, - }) +func (c *controller) LastSyncResourceVersion() string { + if c.reflector == nil { + return "" + } + return c.reflector.LastSyncResourceVersion() } // processLoop drains the work queue. // TODO: Consider doing the processing in parallel. This will require a little thought // to make sure that we don't end up processing the same object multiple times // concurrently. -func (c *Controller) processLoop() { +// +// TODO: Plumb through the stopCh here (and down to the queue) so that this can +// actually exit when the controller is stopped. Or just give up on this stuff +// ever being stoppable. Converting this whole package to use Context would +// also be helpful. +func (c *controller) processLoop() { for { obj, err := c.config.Queue.Pop(PopProcessFunc(c.config.Process)) if err != nil { + if err == FIFOClosedError { + return + } if c.config.RetryOnError { // This is the safe way to re-enqueue. c.config.Queue.AddIfNotPresent(obj) @@ -134,7 +158,7 @@ func (c *Controller) processLoop() { } // ResourceEventHandler can handle notifications for events that happen to a -// resource. The events are informational only, so you can't return an +// resource. The events are informational only, so you can't return an // error. // * OnAdd is called when an object is added. // * OnUpdate is called when an object is modified. Note that oldObj is the @@ -213,7 +237,7 @@ func NewInformer( objType runtime.Object, resyncPeriod time.Duration, h ResourceEventHandler, -) (Store, *Controller) { +) (Store, Controller) { // This will hold the client state, as we know it. clientState := NewStore(DeletionHandlingMetaNamespaceKeyFunc) @@ -279,7 +303,7 @@ func NewIndexerInformer( resyncPeriod time.Duration, h ResourceEventHandler, indexers Indexers, -) (Indexer, *Controller) { +) (Indexer, Controller) { // This will hold the client state, as we know it. clientState := NewIndexer(DeletionHandlingMetaNamespaceKeyFunc, indexers) diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/delta_fifo.go b/vendor/k8s.io/client-go/tools/cache/delta_fifo.go similarity index 94% rename from vendor/k8s.io/client-go/1.5/tools/cache/delta_fifo.go rename to vendor/k8s.io/client-go/tools/cache/delta_fifo.go index b26eefe6a..a71db6048 100644 --- a/vendor/k8s.io/client-go/1.5/tools/cache/delta_fifo.go +++ b/vendor/k8s.io/client-go/tools/cache/delta_fifo.go @@ -21,7 +21,7 @@ import ( "fmt" "sync" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/sets" "github.com/golang/glog" ) @@ -118,6 +118,12 @@ type DeltaFIFO struct { // purpose of figuring out which items have been deleted // when Replace() or Delete() is called. knownObjects KeyListerGetter + + // Indication the queue is closed. + // Used to indicate a queue is closed so a control loop can exit when a queue is empty. + // Currently, not used to gate any of CRED operations. + closed bool + closedLock sync.Mutex } var ( @@ -132,6 +138,14 @@ var ( ErrZeroLengthDeltasObject = errors.New("0 length Deltas object; can't get key") ) +// Close the queue. +func (f *DeltaFIFO) Close() { + f.closedLock.Lock() + defer f.closedLock.Unlock() + f.closed = true + f.cond.Broadcast() +} + // KeyOf exposes f's keyFunc, but also detects the key of a Deltas object or // DeletedFinalStateUnknown objects. func (f *DeltaFIFO) KeyOf(obj interface{}) (string, error) { @@ -387,6 +401,16 @@ func (f *DeltaFIFO) GetByKey(key string) (item interface{}, exists bool, err err return d, exists, nil } +// Checks if the queue is closed +func (f *DeltaFIFO) IsClosed() bool { + f.closedLock.Lock() + defer f.closedLock.Unlock() + if f.closed { + return true + } + return false +} + // Pop blocks until an item is added to the queue, and then returns it. If // multiple items are ready, they are returned in the order in which they were // added/updated. The item is removed from the queue (and the store) before it @@ -404,6 +428,13 @@ func (f *DeltaFIFO) Pop(process PopProcessFunc) (interface{}, error) { defer f.lock.Unlock() for { for len(f.queue) == 0 { + // When the queue is empty, invocation of Pop() is blocked until new item is enqueued. + // When Close() is called, the f.closed is set and the condition is broadcasted. + // Which causes this loop to continue and return from the Pop(). + if f.IsClosed() { + return nil, FIFOClosedError + } + f.cond.Wait() } id := f.queue[0] @@ -437,11 +468,6 @@ func (f *DeltaFIFO) Replace(list []interface{}, resourceVersion string) error { defer f.lock.Unlock() keys := make(sets.String, len(list)) - if !f.populated { - f.populated = true - f.initialPopulationCount = len(list) - } - for _, item := range list { key, err := f.KeyOf(item) if err != nil { @@ -467,6 +493,12 @@ func (f *DeltaFIFO) Replace(list []interface{}, resourceVersion string) error { return err } } + + if !f.populated { + f.populated = true + f.initialPopulationCount = len(list) + } + return nil } @@ -474,6 +506,7 @@ func (f *DeltaFIFO) Replace(list []interface{}, resourceVersion string) error { // TODO(lavalamp): This may be racy-- we aren't properly locked // with knownObjects. Unproven. knownKeys := f.knownObjects.ListKeys() + queuedDeletions := 0 for _, k := range knownKeys { if keys.Has(k) { continue @@ -487,23 +520,28 @@ func (f *DeltaFIFO) Replace(list []interface{}, resourceVersion string) error { deletedObj = nil glog.Infof("Key %v does not exist in known objects store, placing DeleteFinalStateUnknown marker without object", k) } + queuedDeletions++ if err := f.queueActionLocked(Deleted, DeletedFinalStateUnknown{k, deletedObj}); err != nil { return err } } + + if !f.populated { + f.populated = true + f.initialPopulationCount = len(list) + queuedDeletions + } + return nil } // Resync will send a sync event for each item func (f *DeltaFIFO) Resync() error { - var keys []string - func() { - f.lock.RLock() - defer f.lock.RUnlock() - keys = f.knownObjects.ListKeys() - }() + f.lock.Lock() + defer f.lock.Unlock() + + keys := f.knownObjects.ListKeys() for _, k := range keys { - if err := f.syncKey(k); err != nil { + if err := f.syncKeyLocked(k); err != nil { return err } } @@ -513,6 +551,11 @@ func (f *DeltaFIFO) Resync() error { func (f *DeltaFIFO) syncKey(key string) error { f.lock.Lock() defer f.lock.Unlock() + + return f.syncKeyLocked(key) +} + +func (f *DeltaFIFO) syncKeyLocked(key string) error { obj, exists, err := f.knownObjects.GetByKey(key) if err != nil { glog.Errorf("Unexpected error %v during lookup of key %v, unable to queue object for sync", err, key) diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/doc.go b/vendor/k8s.io/client-go/tools/cache/doc.go similarity index 94% rename from vendor/k8s.io/client-go/1.5/tools/cache/doc.go rename to vendor/k8s.io/client-go/tools/cache/doc.go index 72b39f2f9..56b61d300 100644 --- a/vendor/k8s.io/client-go/1.5/tools/cache/doc.go +++ b/vendor/k8s.io/client-go/tools/cache/doc.go @@ -21,4 +21,4 @@ limitations under the License. // list currently available nodes), and one that additionally acts as // a FIFO queue (for example, to allow a scheduler to process incoming // pods). -package cache // import "k8s.io/client-go/1.5/tools/cache" +package cache // import "k8s.io/client-go/tools/cache" diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/expiration_cache.go b/vendor/k8s.io/client-go/tools/cache/expiration_cache.go similarity index 99% rename from vendor/k8s.io/client-go/1.5/tools/cache/expiration_cache.go rename to vendor/k8s.io/client-go/tools/cache/expiration_cache.go index 07f5dee40..befac1c75 100644 --- a/vendor/k8s.io/client-go/1.5/tools/cache/expiration_cache.go +++ b/vendor/k8s.io/client-go/tools/cache/expiration_cache.go @@ -21,7 +21,7 @@ import ( "time" "github.com/golang/glog" - "k8s.io/client-go/1.5/pkg/util/clock" + "k8s.io/client-go/util/clock" ) // ExpirationCache implements the store interface diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/expiration_cache_fakes.go b/vendor/k8s.io/client-go/tools/cache/expiration_cache_fakes.go similarity index 94% rename from vendor/k8s.io/client-go/1.5/tools/cache/expiration_cache_fakes.go rename to vendor/k8s.io/client-go/tools/cache/expiration_cache_fakes.go index 53a346ce4..ab2f57687 100644 --- a/vendor/k8s.io/client-go/1.5/tools/cache/expiration_cache_fakes.go +++ b/vendor/k8s.io/client-go/tools/cache/expiration_cache_fakes.go @@ -17,8 +17,8 @@ limitations under the License. package cache import ( - "k8s.io/client-go/1.5/pkg/util/clock" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/util/clock" ) type fakeThreadSafeMap struct { diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/fake_custom_store.go b/vendor/k8s.io/client-go/tools/cache/fake_custom_store.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/tools/cache/fake_custom_store.go rename to vendor/k8s.io/client-go/tools/cache/fake_custom_store.go diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/fifo.go b/vendor/k8s.io/client-go/tools/cache/fifo.go similarity index 90% rename from vendor/k8s.io/client-go/1.5/tools/cache/fifo.go rename to vendor/k8s.io/client-go/tools/cache/fifo.go index d0c002c52..3f6e2a948 100644 --- a/vendor/k8s.io/client-go/1.5/tools/cache/fifo.go +++ b/vendor/k8s.io/client-go/tools/cache/fifo.go @@ -17,9 +17,10 @@ limitations under the License. package cache import ( + "errors" "sync" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/sets" ) // PopProcessFunc is passed to Pop() method of Queue interface. @@ -33,6 +34,8 @@ type ErrRequeue struct { Err error } +var FIFOClosedError error = errors.New("DeltaFIFO: manipulating with closed queue") + func (e ErrRequeue) Error() string { if e.Err == nil { return "the popped item should be requeued without returning an error" @@ -58,6 +61,9 @@ type Queue interface { // Return true if the first batch of items has been popped HasSynced() bool + + // Close queue + Close() } // Helper function for popping from Queue. @@ -100,12 +106,26 @@ type FIFO struct { // keyFunc is used to make the key used for queued item insertion and retrieval, and // should be deterministic. keyFunc KeyFunc + + // Indication the queue is closed. + // Used to indicate a queue is closed so a control loop can exit when a queue is empty. + // Currently, not used to gate any of CRED operations. + closed bool + closedLock sync.Mutex } var ( _ = Queue(&FIFO{}) // FIFO is a Queue ) +// Close the queue. +func (f *FIFO) Close() { + f.closedLock.Lock() + defer f.closedLock.Unlock() + f.closed = true + f.cond.Broadcast() +} + // Return true if an Add/Update/Delete/AddIfNotPresent are called first, // or an Update called first but the first batch of items inserted by Replace() has been popped func (f *FIFO) HasSynced() bool { @@ -222,6 +242,16 @@ func (f *FIFO) GetByKey(key string) (item interface{}, exists bool, err error) { return item, exists, nil } +// Checks if the queue is closed +func (f *FIFO) IsClosed() bool { + f.closedLock.Lock() + defer f.closedLock.Unlock() + if f.closed { + return true + } + return false +} + // Pop waits until an item is ready and processes it. If multiple items are // ready, they are returned in the order in which they were added/updated. // The item is removed from the queue (and the store) before it is processed, @@ -233,6 +263,13 @@ func (f *FIFO) Pop(process PopProcessFunc) (interface{}, error) { defer f.lock.Unlock() for { for len(f.queue) == 0 { + // When the queue is empty, invocation of Pop() is blocked until new item is enqueued. + // When Close() is called, the f.closed is set and the condition is broadcasted. + // Which causes this loop to continue and return from the Pop(). + if f.IsClosed() { + return nil, FIFOClosedError + } + f.cond.Wait() } id := f.queue[0] diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/index.go b/vendor/k8s.io/client-go/tools/cache/index.go similarity index 97% rename from vendor/k8s.io/client-go/1.5/tools/cache/index.go rename to vendor/k8s.io/client-go/tools/cache/index.go index bc257ae03..42fc6c7a2 100644 --- a/vendor/k8s.io/client-go/1.5/tools/cache/index.go +++ b/vendor/k8s.io/client-go/tools/cache/index.go @@ -19,8 +19,8 @@ package cache import ( "fmt" - "k8s.io/client-go/1.5/pkg/api/meta" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/util/sets" ) // Indexer is a storage interface that lets you list objects using multiple indexing functions diff --git a/vendor/k8s.io/client-go/tools/cache/listers.go b/vendor/k8s.io/client-go/tools/cache/listers.go new file mode 100644 index 000000000..27d51a6b3 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/listers.go @@ -0,0 +1,160 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "github.com/golang/glog" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// AppendFunc is used to add a matching item to whatever list the caller is using +type AppendFunc func(interface{}) + +func ListAll(store Store, selector labels.Selector, appendFn AppendFunc) error { + for _, m := range store.List() { + metadata, err := meta.Accessor(m) + if err != nil { + return err + } + if selector.Matches(labels.Set(metadata.GetLabels())) { + appendFn(m) + } + } + return nil +} + +func ListAllByNamespace(indexer Indexer, namespace string, selector labels.Selector, appendFn AppendFunc) error { + if namespace == metav1.NamespaceAll { + for _, m := range indexer.List() { + metadata, err := meta.Accessor(m) + if err != nil { + return err + } + if selector.Matches(labels.Set(metadata.GetLabels())) { + appendFn(m) + } + } + return nil + } + + items, err := indexer.Index(NamespaceIndex, &metav1.ObjectMeta{Namespace: namespace}) + if err != nil { + // Ignore error; do slow search without index. + glog.Warningf("can not retrieve list of objects using index : %v", err) + for _, m := range indexer.List() { + metadata, err := meta.Accessor(m) + if err != nil { + return err + } + if metadata.GetNamespace() == namespace && selector.Matches(labels.Set(metadata.GetLabels())) { + appendFn(m) + } + + } + return nil + } + for _, m := range items { + metadata, err := meta.Accessor(m) + if err != nil { + return err + } + if selector.Matches(labels.Set(metadata.GetLabels())) { + appendFn(m) + } + } + + return nil +} + +// GenericLister is a lister skin on a generic Indexer +type GenericLister interface { + // List will return all objects across namespaces + List(selector labels.Selector) (ret []runtime.Object, err error) + // Get will attempt to retrieve assuming that name==key + Get(name string) (runtime.Object, error) + // ByNamespace will give you a GenericNamespaceLister for one namespace + ByNamespace(namespace string) GenericNamespaceLister +} + +// GenericNamespaceLister is a lister skin on a generic Indexer +type GenericNamespaceLister interface { + // List will return all objects in this namespace + List(selector labels.Selector) (ret []runtime.Object, err error) + // Get will attempt to retrieve by namespace and name + Get(name string) (runtime.Object, error) +} + +func NewGenericLister(indexer Indexer, resource schema.GroupResource) GenericLister { + return &genericLister{indexer: indexer, resource: resource} +} + +type genericLister struct { + indexer Indexer + resource schema.GroupResource +} + +func (s *genericLister) List(selector labels.Selector) (ret []runtime.Object, err error) { + err = ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(runtime.Object)) + }) + return ret, err +} + +func (s *genericLister) ByNamespace(namespace string) GenericNamespaceLister { + return &genericNamespaceLister{indexer: s.indexer, namespace: namespace, resource: s.resource} +} + +func (s *genericLister) Get(name string) (runtime.Object, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(s.resource, name) + } + return obj.(runtime.Object), nil +} + +type genericNamespaceLister struct { + indexer Indexer + namespace string + resource schema.GroupResource +} + +func (s *genericNamespaceLister) List(selector labels.Selector) (ret []runtime.Object, err error) { + err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(runtime.Object)) + }) + return ret, err +} + +func (s *genericNamespaceLister) Get(name string) (runtime.Object, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(s.resource, name) + } + return obj.(runtime.Object), nil +} diff --git a/vendor/k8s.io/client-go/tools/cache/listwatch.go b/vendor/k8s.io/client-go/tools/cache/listwatch.go new file mode 100644 index 000000000..af01d4745 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/listwatch.go @@ -0,0 +1,162 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "time" + + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" +) + +// ListerWatcher is any object that knows how to perform an initial list and start a watch on a resource. +type ListerWatcher interface { + // List should return a list type object; the Items field will be extracted, and the + // ResourceVersion field will be used to start the watch in the right place. + List(options metav1.ListOptions) (runtime.Object, error) + // Watch should begin a watch at the specified version. + Watch(options metav1.ListOptions) (watch.Interface, error) +} + +// ListFunc knows how to list resources +type ListFunc func(options metav1.ListOptions) (runtime.Object, error) + +// WatchFunc knows how to watch resources +type WatchFunc func(options metav1.ListOptions) (watch.Interface, error) + +// ListWatch knows how to list and watch a set of apiserver resources. It satisfies the ListerWatcher interface. +// It is a convenience function for users of NewReflector, etc. +// ListFunc and WatchFunc must not be nil +type ListWatch struct { + ListFunc ListFunc + WatchFunc WatchFunc +} + +// Getter interface knows how to access Get method from RESTClient. +type Getter interface { + Get() *restclient.Request +} + +// NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector. +func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSelector fields.Selector) *ListWatch { + listFunc := func(options metav1.ListOptions) (runtime.Object, error) { + return c.Get(). + Namespace(namespace). + Resource(resource). + VersionedParams(&options, metav1.ParameterCodec). + FieldsSelectorParam(fieldSelector). + Do(). + Get() + } + watchFunc := func(options metav1.ListOptions) (watch.Interface, error) { + options.Watch = true + return c.Get(). + Namespace(namespace). + Resource(resource). + VersionedParams(&options, metav1.ParameterCodec). + FieldsSelectorParam(fieldSelector). + Watch() + } + return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc} +} + +func timeoutFromListOptions(options metav1.ListOptions) time.Duration { + if options.TimeoutSeconds != nil { + return time.Duration(*options.TimeoutSeconds) * time.Second + } + return 0 +} + +// List a set of apiserver resources +func (lw *ListWatch) List(options metav1.ListOptions) (runtime.Object, error) { + return lw.ListFunc(options) +} + +// Watch a set of apiserver resources +func (lw *ListWatch) Watch(options metav1.ListOptions) (watch.Interface, error) { + return lw.WatchFunc(options) +} + +// TODO: check for watch expired error and retry watch from latest point? Same issue exists for Until. +func ListWatchUntil(timeout time.Duration, lw ListerWatcher, conditions ...watch.ConditionFunc) (*watch.Event, error) { + if len(conditions) == 0 { + return nil, nil + } + + list, err := lw.List(metav1.ListOptions{}) + if err != nil { + return nil, err + } + initialItems, err := meta.ExtractList(list) + if err != nil { + return nil, err + } + + // use the initial items as simulated "adds" + var lastEvent *watch.Event + currIndex := 0 + passedConditions := 0 + for _, condition := range conditions { + // check the next condition against the previous event and short circuit waiting for the next watch + if lastEvent != nil { + done, err := condition(*lastEvent) + if err != nil { + return lastEvent, err + } + if done { + passedConditions = passedConditions + 1 + continue + } + } + + ConditionSucceeded: + for currIndex < len(initialItems) { + lastEvent = &watch.Event{Type: watch.Added, Object: initialItems[currIndex]} + currIndex++ + + done, err := condition(*lastEvent) + if err != nil { + return lastEvent, err + } + if done { + passedConditions = passedConditions + 1 + break ConditionSucceeded + } + } + } + if passedConditions == len(conditions) { + return lastEvent, nil + } + remainingConditions := conditions[passedConditions:] + + metaObj, err := meta.ListAccessor(list) + if err != nil { + return nil, err + } + currResourceVersion := metaObj.GetResourceVersion() + + watchInterface, err := lw.Watch(metav1.ListOptions{ResourceVersion: currResourceVersion}) + if err != nil { + return nil, err + } + + return watch.Until(timeout, watchInterface, remainingConditions...) +} diff --git a/vendor/k8s.io/client-go/tools/cache/mutation_detector.go b/vendor/k8s.io/client-go/tools/cache/mutation_detector.go new file mode 100644 index 000000000..cc7399114 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/mutation_detector.go @@ -0,0 +1,135 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "fmt" + "os" + "reflect" + "strconv" + "sync" + "time" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/client-go/pkg/api" +) + +var mutationDetectionEnabled = false + +func init() { + mutationDetectionEnabled, _ = strconv.ParseBool(os.Getenv("KUBE_CACHE_MUTATION_DETECTOR")) +} + +type CacheMutationDetector interface { + AddObject(obj interface{}) + Run(stopCh <-chan struct{}) +} + +func NewCacheMutationDetector(name string) CacheMutationDetector { + if !mutationDetectionEnabled { + return dummyMutationDetector{} + } + return &defaultCacheMutationDetector{name: name, period: 1 * time.Second} +} + +type dummyMutationDetector struct{} + +func (dummyMutationDetector) Run(stopCh <-chan struct{}) { +} +func (dummyMutationDetector) AddObject(obj interface{}) { +} + +// defaultCacheMutationDetector gives a way to detect if a cached object has been mutated +// It has a list of cached objects and their copies. I haven't thought of a way +// to see WHO is mutating it, just that it's getting mutated. +type defaultCacheMutationDetector struct { + name string + period time.Duration + + lock sync.Mutex + cachedObjs []cacheObj + + // failureFunc is injectable for unit testing. If you don't have it, the process will panic. + // This panic is intentional, since turning on this detection indicates you want a strong + // failure signal. This failure is effectively a p0 bug and you can't trust process results + // after a mutation anyway. + failureFunc func(message string) +} + +// cacheObj holds the actual object and a copy +type cacheObj struct { + cached interface{} + copied interface{} +} + +func (d *defaultCacheMutationDetector) Run(stopCh <-chan struct{}) { + // we DON'T want protection from panics. If we're running this code, we want to die + go func() { + for { + d.CompareObjects() + + select { + case <-stopCh: + return + case <-time.After(d.period): + } + } + }() +} + +// AddObject makes a deep copy of the object for later comparison. It only works on runtime.Object +// but that covers the vast majority of our cached objects +func (d *defaultCacheMutationDetector) AddObject(obj interface{}) { + if _, ok := obj.(DeletedFinalStateUnknown); ok { + return + } + if _, ok := obj.(runtime.Object); !ok { + return + } + + copiedObj, err := api.Scheme.Copy(obj.(runtime.Object)) + if err != nil { + return + } + + d.lock.Lock() + defer d.lock.Unlock() + d.cachedObjs = append(d.cachedObjs, cacheObj{cached: obj, copied: copiedObj}) +} + +func (d *defaultCacheMutationDetector) CompareObjects() { + d.lock.Lock() + defer d.lock.Unlock() + + altered := false + for i, obj := range d.cachedObjs { + if !reflect.DeepEqual(obj.cached, obj.copied) { + fmt.Printf("CACHE %s[%d] ALTERED!\n%v\n", d.name, i, diff.ObjectDiff(obj.cached, obj.copied)) + altered = true + } + } + + if altered { + msg := fmt.Sprintf("cache %s modified", d.name) + if d.failureFunc != nil { + d.failureFunc(msg) + return + } + panic(msg) + } +} diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/reflector.go b/vendor/k8s.io/client-go/tools/cache/reflector.go similarity index 86% rename from vendor/k8s.io/client-go/1.5/tools/cache/reflector.go rename to vendor/k8s.io/client-go/tools/cache/reflector.go index 8dacf3ac1..b43f43a5e 100644 --- a/vendor/k8s.io/client-go/1.5/tools/cache/reflector.go +++ b/vendor/k8s.io/client-go/tools/cache/reflector.go @@ -34,27 +34,19 @@ import ( "time" "github.com/golang/glog" - "k8s.io/client-go/1.5/pkg/api" - apierrs "k8s.io/client-go/1.5/pkg/api/errors" - "k8s.io/client-go/1.5/pkg/api/meta" - "k8s.io/client-go/1.5/pkg/runtime" - utilruntime "k8s.io/client-go/1.5/pkg/util/runtime" - "k8s.io/client-go/1.5/pkg/util/wait" - "k8s.io/client-go/1.5/pkg/watch" + apierrs "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/util/clock" ) -// ListerWatcher is any object that knows how to perform an initial list and start a watch on a resource. -type ListerWatcher interface { - // List should return a list type object; the Items field will be extracted, and the - // ResourceVersion field will be used to start the watch in the right place. - List(options api.ListOptions) (runtime.Object, error) - // Watch should begin a watch at the specified version. - Watch(options api.ListOptions) (watch.Interface, error) -} - // Reflector watches a specified resource and causes all changes to be reflected in the given store. type Reflector struct { - // name identifies this reflector. By default it will be a file:line if possible. + // name identifies this reflector. By default it will be a file:line if possible. name string // The type of object we expect to place in the store. @@ -67,8 +59,9 @@ type Reflector struct { // the beginning of the next one. period time.Duration resyncPeriod time.Duration - // now() returns current time - exposed for testing purposes - now func() time.Time + ShouldResync func() bool + // clock allows tests to manipulate time + clock clock.Clock // lastSyncResourceVersion is the resource version token last // observed when doing a sync with the underlying store // it is thread safe, but not synchronized with the underlying store @@ -83,12 +76,6 @@ var ( // However, it can be modified to avoid periodic resync to break the // TCP connection. minWatchTimeout = 5 * time.Minute - // If we are within 'forceResyncThreshold' from the next planned resync - // and are just before issuing Watch(), resync will be forced now. - forceResyncThreshold = 3 * time.Second - // We try to set timeouts for Watch() so that we will finish about - // than 'timeoutThreshold' from next planned periodic resync. - timeoutThreshold = 1 * time.Second ) // NewNamespaceKeyedIndexerAndReflector creates an Indexer and a Reflector @@ -118,14 +105,14 @@ func NewNamedReflector(name string, lw ListerWatcher, expectedType interface{}, expectedType: reflect.TypeOf(expectedType), period: time.Second, resyncPeriod: resyncPeriod, - now: time.Now, + clock: &clock.RealClock{}, } return r } -// internalPackages are packages that ignored when creating a default reflector name. These packages are in the common +// internalPackages are packages that ignored when creating a default reflector name. These packages are in the common // call chains to NewReflector, so they'd be low entropy names for reflectors -var internalPackages = []string{"kubernetes/pkg/client/cache/", "kubernetes/pkg/controller/framework/", "/runtime/asm_"} +var internalPackages = []string{"client-go/tools/cache/", "/runtime/asm_"} // getDefaultReflectorName walks back through the call stack until we find a caller from outside of the ignoredPackages // it returns back a shortpath/filename:line to aid in identification of this reflector when it starts logging @@ -164,8 +151,8 @@ func hasPackage(file string, ignoredPackages []string) bool { // trimPackagePrefix reduces duplicate values off the front of a package name. func trimPackagePrefix(file string) string { - if l := strings.LastIndex(file, "k8s.io/client-go/1.5/pkg/"); l >= 0 { - return file[l+len("k8s.io/client-go/1.5/"):] + if l := strings.LastIndex(file, "k8s.io/client-go/pkg/"); l >= 0 { + return file[l+len("k8s.io/client-go/"):] } if l := strings.LastIndex(file, "/src/"); l >= 0 { return file[l+5:] @@ -238,8 +225,8 @@ func (r *Reflector) resyncChan() (<-chan time.Time, func() bool) { // always fail so we end up listing frequently. Then, if we don't // manually stop the timer, we could end up with many timers active // concurrently. - t := time.NewTimer(r.resyncPeriod) - return t.C, t.Stop + t := r.clock.NewTimer(r.resyncPeriod) + return t.C(), t.Stop } // ListAndWatch first lists all items and get the resource version at the moment of call, @@ -254,7 +241,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { // Explicitly set "0" as resource version - it's fine for the List() // to be served from cache and potentially be delayed relative to // etcd contents. Reflector framework will catch up via Watch() eventually. - options := api.ListOptions{ResourceVersion: "0"} + options := metav1.ListOptions{ResourceVersion: "0"} list, err := r.listerWatcher.List(options) if err != nil { return fmt.Errorf("%s: Failed to list %v: %v", r.name, r.expectedType, err) @@ -274,18 +261,24 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { r.setLastSyncResourceVersion(resourceVersion) resyncerrc := make(chan error, 1) + cancelCh := make(chan struct{}) + defer close(cancelCh) go func() { for { select { case <-resyncCh: case <-stopCh: return - } - glog.V(4).Infof("%s: forcing resync", r.name) - if err := r.store.Resync(); err != nil { - resyncerrc <- err + case <-cancelCh: return } + if r.ShouldResync == nil || r.ShouldResync() { + glog.V(4).Infof("%s: forcing resync", r.name) + if err := r.store.Resync(); err != nil { + resyncerrc <- err + return + } + } cleanup() resyncCh, cleanup = r.resyncChan() } @@ -293,7 +286,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { for { timemoutseconds := int64(minWatchTimeout.Seconds() * (rand.Float64() + 1.0)) - options = api.ListOptions{ + options = metav1.ListOptions{ ResourceVersion: resourceVersion, // We want to avoid situations of hanging watchers. Stop any wachers that do not // receive any events within the timeout window. @@ -345,7 +338,7 @@ func (r *Reflector) syncWith(items []runtime.Object, resourceVersion string) err // watchHandler watches w and keeps *resourceVersion up to date. func (r *Reflector) watchHandler(w watch.Interface, resourceVersion *string, errc chan error, stopCh <-chan struct{}) error { - start := time.Now() + start := r.clock.Now() eventCount := 0 // Stopping the watcher should be idempotent and if we return from this function there's no way @@ -378,14 +371,23 @@ loop: newResourceVersion := meta.GetResourceVersion() switch event.Type { case watch.Added: - r.store.Add(event.Object) + err := r.store.Add(event.Object) + if err != nil { + utilruntime.HandleError(fmt.Errorf("%s: unable to add watch event object (%#v) to store: %v", r.name, event.Object, err)) + } case watch.Modified: - r.store.Update(event.Object) + err := r.store.Update(event.Object) + if err != nil { + utilruntime.HandleError(fmt.Errorf("%s: unable to update watch event object (%#v) to store: %v", r.name, event.Object, err)) + } case watch.Deleted: // TODO: Will any consumers need access to the "last known // state", which is passed in event.Object? If so, may need // to change this. - r.store.Delete(event.Object) + err := r.store.Delete(event.Object) + if err != nil { + utilruntime.HandleError(fmt.Errorf("%s: unable to delete watch event object (%#v) from store: %v", r.name, event.Object, err)) + } default: utilruntime.HandleError(fmt.Errorf("%s: unable to understand watch event %#v", r.name, event)) } @@ -395,7 +397,7 @@ loop: } } - watchDuration := time.Now().Sub(start) + watchDuration := r.clock.Now().Sub(start) if watchDuration < 1*time.Second && eventCount == 0 { glog.V(4).Infof("%s: Unexpected watch close - watch lasted less than a second and no items received", r.name) return errors.New("very short watch") diff --git a/vendor/k8s.io/client-go/tools/cache/shared_informer.go b/vendor/k8s.io/client-go/tools/cache/shared_informer.go new file mode 100644 index 000000000..1349f335d --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/shared_informer.go @@ -0,0 +1,581 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "fmt" + "sync" + "time" + + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/clock" + + "github.com/golang/glog" +) + +// SharedInformer has a shared data cache and is capable of distributing notifications for changes +// to the cache to multiple listeners who registered via AddEventHandler. If you use this, there is +// one behavior change compared to a standard Informer. When you receive a notification, the cache +// will be AT LEAST as fresh as the notification, but it MAY be more fresh. You should NOT depend +// on the contents of the cache exactly matching the notification you've received in handler +// functions. If there was a create, followed by a delete, the cache may NOT have your item. This +// has advantages over the broadcaster since it allows us to share a common cache across many +// controllers. Extending the broadcaster would have required us keep duplicate caches for each +// watch. +type SharedInformer interface { + // AddEventHandler adds an event handler to the shared informer using the shared informer's resync + // period. Events to a single handler are delivered sequentially, but there is no coordination + // between different handlers. + AddEventHandler(handler ResourceEventHandler) + // AddEventHandlerWithResyncPeriod adds an event handler to the shared informer using the + // specified resync period. Events to a single handler are delivered sequentially, but there is + // no coordination between different handlers. + AddEventHandlerWithResyncPeriod(handler ResourceEventHandler, resyncPeriod time.Duration) + // GetStore returns the Store. + GetStore() Store + // GetController gives back a synthetic interface that "votes" to start the informer + GetController() Controller + // Run starts the shared informer, which will be stopped when stopCh is closed. + Run(stopCh <-chan struct{}) + // HasSynced returns true if the shared informer's store has synced. + HasSynced() bool + // LastSyncResourceVersion is the resource version observed when last synced with the underlying + // store. The value returned is not synchronized with access to the underlying store and is not + // thread-safe. + LastSyncResourceVersion() string +} + +type SharedIndexInformer interface { + SharedInformer + // AddIndexers add indexers to the informer before it starts. + AddIndexers(indexers Indexers) error + GetIndexer() Indexer +} + +// NewSharedInformer creates a new instance for the listwatcher. +func NewSharedInformer(lw ListerWatcher, objType runtime.Object, resyncPeriod time.Duration) SharedInformer { + return NewSharedIndexInformer(lw, objType, resyncPeriod, Indexers{}) +} + +// NewSharedIndexInformer creates a new instance for the listwatcher. +func NewSharedIndexInformer(lw ListerWatcher, objType runtime.Object, defaultEventHandlerResyncPeriod time.Duration, indexers Indexers) SharedIndexInformer { + realClock := &clock.RealClock{} + sharedIndexInformer := &sharedIndexInformer{ + processor: &sharedProcessor{clock: realClock}, + indexer: NewIndexer(DeletionHandlingMetaNamespaceKeyFunc, indexers), + listerWatcher: lw, + objectType: objType, + resyncCheckPeriod: defaultEventHandlerResyncPeriod, + defaultEventHandlerResyncPeriod: defaultEventHandlerResyncPeriod, + cacheMutationDetector: NewCacheMutationDetector(fmt.Sprintf("%T", objType)), + clock: realClock, + } + return sharedIndexInformer +} + +// InformerSynced is a function that can be used to determine if an informer has synced. This is useful for determining if caches have synced. +type InformerSynced func() bool + +// syncedPollPeriod controls how often you look at the status of your sync funcs +const syncedPollPeriod = 100 * time.Millisecond + +// WaitForCacheSync waits for caches to populate. It returns true if it was successful, false +// if the contoller should shutdown +func WaitForCacheSync(stopCh <-chan struct{}, cacheSyncs ...InformerSynced) bool { + err := wait.PollUntil(syncedPollPeriod, + func() (bool, error) { + for _, syncFunc := range cacheSyncs { + if !syncFunc() { + return false, nil + } + } + return true, nil + }, + stopCh) + if err != nil { + glog.V(2).Infof("stop requested") + return false + } + + glog.V(4).Infof("caches populated") + return true +} + +type sharedIndexInformer struct { + indexer Indexer + controller Controller + + processor *sharedProcessor + cacheMutationDetector CacheMutationDetector + + // This block is tracked to handle late initialization of the controller + listerWatcher ListerWatcher + objectType runtime.Object + + // resyncCheckPeriod is how often we want the reflector's resync timer to fire so it can call + // shouldResync to check if any of our listeners need a resync. + resyncCheckPeriod time.Duration + // defaultEventHandlerResyncPeriod is the default resync period for any handlers added via + // AddEventHandler (i.e. they don't specify one and just want to use the shared informer's default + // value). + defaultEventHandlerResyncPeriod time.Duration + // clock allows for testability + clock clock.Clock + + started bool + startedLock sync.Mutex + + // blockDeltas gives a way to stop all event distribution so that a late event handler + // can safely join the shared informer. + blockDeltas sync.Mutex + // stopCh is the channel used to stop the main Run process. We have to track it so that + // late joiners can have a proper stop + stopCh <-chan struct{} +} + +// dummyController hides the fact that a SharedInformer is different from a dedicated one +// where a caller can `Run`. The run method is disonnected in this case, because higher +// level logic will decide when to start the SharedInformer and related controller. +// Because returning information back is always asynchronous, the legacy callers shouldn't +// notice any change in behavior. +type dummyController struct { + informer *sharedIndexInformer +} + +func (v *dummyController) Run(stopCh <-chan struct{}) { +} + +func (v *dummyController) HasSynced() bool { + return v.informer.HasSynced() +} + +func (c *dummyController) LastSyncResourceVersion() string { + return "" +} + +type updateNotification struct { + oldObj interface{} + newObj interface{} +} + +type addNotification struct { + newObj interface{} +} + +type deleteNotification struct { + oldObj interface{} +} + +func (s *sharedIndexInformer) Run(stopCh <-chan struct{}) { + defer utilruntime.HandleCrash() + + fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, nil, s.indexer) + + cfg := &Config{ + Queue: fifo, + ListerWatcher: s.listerWatcher, + ObjectType: s.objectType, + FullResyncPeriod: s.resyncCheckPeriod, + RetryOnError: false, + ShouldResync: s.processor.shouldResync, + + Process: s.HandleDeltas, + } + + func() { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + s.controller = New(cfg) + s.controller.(*controller).clock = s.clock + s.started = true + }() + + s.stopCh = stopCh + s.cacheMutationDetector.Run(stopCh) + s.processor.run(stopCh) + s.controller.Run(stopCh) +} + +func (s *sharedIndexInformer) isStarted() bool { + s.startedLock.Lock() + defer s.startedLock.Unlock() + return s.started +} + +func (s *sharedIndexInformer) HasSynced() bool { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + if s.controller == nil { + return false + } + return s.controller.HasSynced() +} + +func (s *sharedIndexInformer) LastSyncResourceVersion() string { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + if s.controller == nil { + return "" + } + return s.controller.LastSyncResourceVersion() +} + +func (s *sharedIndexInformer) GetStore() Store { + return s.indexer +} + +func (s *sharedIndexInformer) GetIndexer() Indexer { + return s.indexer +} + +func (s *sharedIndexInformer) AddIndexers(indexers Indexers) error { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + if s.started { + return fmt.Errorf("informer has already started") + } + + return s.indexer.AddIndexers(indexers) +} + +func (s *sharedIndexInformer) GetController() Controller { + return &dummyController{informer: s} +} + +func (s *sharedIndexInformer) AddEventHandler(handler ResourceEventHandler) { + s.AddEventHandlerWithResyncPeriod(handler, s.defaultEventHandlerResyncPeriod) +} + +func determineResyncPeriod(desired, check time.Duration) time.Duration { + if desired == 0 { + return desired + } + if check == 0 { + glog.Warningf("The specified resyncPeriod %v is invalid because this shared informer doesn't support resyncing", desired) + return 0 + } + if desired < check { + glog.Warningf("The specified resyncPeriod %v is being increased to the minimum resyncCheckPeriod %v", desired, check) + return check + } + return desired +} + +const minimumResyncPeriod = 1 * time.Second + +func (s *sharedIndexInformer) AddEventHandlerWithResyncPeriod(handler ResourceEventHandler, resyncPeriod time.Duration) { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + if resyncPeriod > 0 { + if resyncPeriod < minimumResyncPeriod { + glog.Warningf("resyncPeriod %d is too small. Changing it to the minimum allowed value of %d", resyncPeriod, minimumResyncPeriod) + resyncPeriod = minimumResyncPeriod + } + + if resyncPeriod < s.resyncCheckPeriod { + if s.started { + glog.Warningf("resyncPeriod %d is smaller than resyncCheckPeriod %d and the informer has already started. Changing it to %d", resyncPeriod, s.resyncCheckPeriod, s.resyncCheckPeriod) + resyncPeriod = s.resyncCheckPeriod + } else { + // if the event handler's resyncPeriod is smaller than the current resyncCheckPeriod, update + // resyncCheckPeriod to match resyncPeriod and adjust the resync periods of all the listeners + // accordingly + s.resyncCheckPeriod = resyncPeriod + s.processor.resyncCheckPeriodChanged(resyncPeriod) + } + } + } + + listener := newProcessListener(handler, resyncPeriod, determineResyncPeriod(resyncPeriod, s.resyncCheckPeriod), s.clock.Now()) + + if !s.started { + s.processor.addListener(listener) + return + } + + // in order to safely join, we have to + // 1. stop sending add/update/delete notifications + // 2. do a list against the store + // 3. send synthetic "Add" events to the new handler + // 4. unblock + s.blockDeltas.Lock() + defer s.blockDeltas.Unlock() + + s.processor.addListener(listener) + + go listener.run(s.stopCh) + go listener.pop(s.stopCh) + + items := s.indexer.List() + for i := range items { + listener.add(addNotification{newObj: items[i]}) + } +} + +func (s *sharedIndexInformer) HandleDeltas(obj interface{}) error { + s.blockDeltas.Lock() + defer s.blockDeltas.Unlock() + + // from oldest to newest + for _, d := range obj.(Deltas) { + switch d.Type { + case Sync, Added, Updated: + isSync := d.Type == Sync + s.cacheMutationDetector.AddObject(d.Object) + if old, exists, err := s.indexer.Get(d.Object); err == nil && exists { + if err := s.indexer.Update(d.Object); err != nil { + return err + } + s.processor.distribute(updateNotification{oldObj: old, newObj: d.Object}, isSync) + } else { + if err := s.indexer.Add(d.Object); err != nil { + return err + } + s.processor.distribute(addNotification{newObj: d.Object}, isSync) + } + case Deleted: + if err := s.indexer.Delete(d.Object); err != nil { + return err + } + s.processor.distribute(deleteNotification{oldObj: d.Object}, false) + } + } + return nil +} + +type sharedProcessor struct { + listenersLock sync.RWMutex + listeners []*processorListener + syncingListeners []*processorListener + clock clock.Clock +} + +func (p *sharedProcessor) addListener(listener *processorListener) { + p.listenersLock.Lock() + defer p.listenersLock.Unlock() + + p.listeners = append(p.listeners, listener) + p.syncingListeners = append(p.syncingListeners, listener) +} + +func (p *sharedProcessor) distribute(obj interface{}, sync bool) { + p.listenersLock.RLock() + defer p.listenersLock.RUnlock() + + if sync { + for _, listener := range p.syncingListeners { + listener.add(obj) + } + } else { + for _, listener := range p.listeners { + listener.add(obj) + } + } +} + +func (p *sharedProcessor) run(stopCh <-chan struct{}) { + p.listenersLock.RLock() + defer p.listenersLock.RUnlock() + + for _, listener := range p.listeners { + go listener.run(stopCh) + go listener.pop(stopCh) + } +} + +// shouldResync queries every listener to determine if any of them need a resync, based on each +// listener's resyncPeriod. +func (p *sharedProcessor) shouldResync() bool { + p.listenersLock.Lock() + defer p.listenersLock.Unlock() + + p.syncingListeners = []*processorListener{} + + resyncNeeded := false + now := p.clock.Now() + for _, listener := range p.listeners { + // need to loop through all the listeners to see if they need to resync so we can prepare any + // listeners that are going to be resyncing. + if listener.shouldResync(now) { + resyncNeeded = true + p.syncingListeners = append(p.syncingListeners, listener) + listener.determineNextResync(now) + } + } + return resyncNeeded +} + +func (p *sharedProcessor) resyncCheckPeriodChanged(resyncCheckPeriod time.Duration) { + p.listenersLock.RLock() + defer p.listenersLock.RUnlock() + + for _, listener := range p.listeners { + resyncPeriod := determineResyncPeriod(listener.requestedResyncPeriod, resyncCheckPeriod) + listener.setResyncPeriod(resyncPeriod) + } +} + +type processorListener struct { + // lock/cond protects access to 'pendingNotifications'. + lock sync.RWMutex + cond sync.Cond + + // pendingNotifications is an unbounded slice that holds all notifications not yet distributed + // there is one per listener, but a failing/stalled listener will have infinite pendingNotifications + // added until we OOM. + // TODO This is no worse that before, since reflectors were backed by unbounded DeltaFIFOs, but + // we should try to do something better + pendingNotifications []interface{} + + nextCh chan interface{} + + handler ResourceEventHandler + + // requestedResyncPeriod is how frequently the listener wants a full resync from the shared informer + requestedResyncPeriod time.Duration + // resyncPeriod is how frequently the listener wants a full resync from the shared informer. This + // value may differ from requestedResyncPeriod if the shared informer adjusts it to align with the + // informer's overall resync check period. + resyncPeriod time.Duration + // nextResync is the earliest time the listener should get a full resync + nextResync time.Time + // resyncLock guards access to resyncPeriod and nextResync + resyncLock sync.Mutex +} + +func newProcessListener(handler ResourceEventHandler, requestedResyncPeriod, resyncPeriod time.Duration, now time.Time) *processorListener { + ret := &processorListener{ + pendingNotifications: []interface{}{}, + nextCh: make(chan interface{}), + handler: handler, + requestedResyncPeriod: requestedResyncPeriod, + resyncPeriod: resyncPeriod, + } + + ret.cond.L = &ret.lock + + ret.determineNextResync(now) + + return ret +} + +func (p *processorListener) add(notification interface{}) { + p.lock.Lock() + defer p.lock.Unlock() + + p.pendingNotifications = append(p.pendingNotifications, notification) + p.cond.Broadcast() +} + +func (p *processorListener) pop(stopCh <-chan struct{}) { + defer utilruntime.HandleCrash() + + for { + blockingGet := func() (interface{}, bool) { + p.lock.Lock() + defer p.lock.Unlock() + + for len(p.pendingNotifications) == 0 { + // check if we're shutdown + select { + case <-stopCh: + return nil, true + default: + } + p.cond.Wait() + } + + nt := p.pendingNotifications[0] + p.pendingNotifications = p.pendingNotifications[1:] + return nt, false + } + + notification, stopped := blockingGet() + if stopped { + return + } + + select { + case <-stopCh: + return + case p.nextCh <- notification: + } + } +} + +func (p *processorListener) run(stopCh <-chan struct{}) { + defer utilruntime.HandleCrash() + + for { + var next interface{} + select { + case <-stopCh: + func() { + p.lock.Lock() + defer p.lock.Unlock() + p.cond.Broadcast() + }() + return + case next = <-p.nextCh: + } + + switch notification := next.(type) { + case updateNotification: + p.handler.OnUpdate(notification.oldObj, notification.newObj) + case addNotification: + p.handler.OnAdd(notification.newObj) + case deleteNotification: + p.handler.OnDelete(notification.oldObj) + default: + utilruntime.HandleError(fmt.Errorf("unrecognized notification: %#v", next)) + } + } +} + +// shouldResync deterimines if the listener needs a resync. If the listener's resyncPeriod is 0, +// this always returns false. +func (p *processorListener) shouldResync(now time.Time) bool { + p.resyncLock.Lock() + defer p.resyncLock.Unlock() + + if p.resyncPeriod == 0 { + return false + } + + return now.After(p.nextResync) || now.Equal(p.nextResync) +} + +func (p *processorListener) determineNextResync(now time.Time) { + p.resyncLock.Lock() + defer p.resyncLock.Unlock() + + p.nextResync = now.Add(p.resyncPeriod) +} + +func (p *processorListener) setResyncPeriod(resyncPeriod time.Duration) { + p.resyncLock.Lock() + defer p.resyncLock.Unlock() + + p.resyncPeriod = resyncPeriod +} diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/store.go b/vendor/k8s.io/client-go/tools/cache/store.go similarity index 99% rename from vendor/k8s.io/client-go/1.5/tools/cache/store.go rename to vendor/k8s.io/client-go/tools/cache/store.go index 6dcf50a66..ee6b3bd46 100755 --- a/vendor/k8s.io/client-go/1.5/tools/cache/store.go +++ b/vendor/k8s.io/client-go/tools/cache/store.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - "k8s.io/client-go/1.5/pkg/api/meta" + "k8s.io/apimachinery/pkg/api/meta" ) // Store is a generic object storage interface. Reflector knows how to watch a server diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/thread_safe_store.go b/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go similarity index 99% rename from vendor/k8s.io/client-go/1.5/tools/cache/thread_safe_store.go rename to vendor/k8s.io/client-go/tools/cache/thread_safe_store.go index 913a77ac2..4d6a01297 100644 --- a/vendor/k8s.io/client-go/1.5/tools/cache/thread_safe_store.go +++ b/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go @@ -20,7 +20,7 @@ import ( "fmt" "sync" - "k8s.io/client-go/1.5/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/sets" ) // ThreadSafeStore is an interface that allows concurrent access to a storage backend. diff --git a/vendor/k8s.io/client-go/1.5/tools/cache/undelta_store.go b/vendor/k8s.io/client-go/tools/cache/undelta_store.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/tools/cache/undelta_store.go rename to vendor/k8s.io/client-go/tools/cache/undelta_store.go diff --git a/vendor/k8s.io/client-go/1.5/tools/clientcmd/api/helpers.go b/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/tools/clientcmd/api/helpers.go rename to vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go diff --git a/vendor/k8s.io/client-go/1.5/tools/clientcmd/api/register.go b/vendor/k8s.io/client-go/tools/clientcmd/api/register.go similarity index 68% rename from vendor/k8s.io/client-go/1.5/tools/clientcmd/api/register.go rename to vendor/k8s.io/client-go/tools/clientcmd/api/register.go index a7f46d5ac..2eec3881c 100644 --- a/vendor/k8s.io/client-go/1.5/tools/clientcmd/api/register.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/register.go @@ -17,13 +17,13 @@ limitations under the License. package api import ( - "k8s.io/client-go/1.5/pkg/api/unversioned" - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) // SchemeGroupVersion is group version used to register these objects // TODO this should be in the "kubeconfig" group -var SchemeGroupVersion = unversioned.GroupVersion{Group: "", Version: runtime.APIVersionInternal} +var SchemeGroupVersion = schema.GroupVersion{Group: "", Version: runtime.APIVersionInternal} var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) @@ -37,10 +37,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { return nil } -func (obj *Config) GetObjectKind() unversioned.ObjectKind { return obj } -func (obj *Config) SetGroupVersionKind(gvk unversioned.GroupVersionKind) { +func (obj *Config) GetObjectKind() schema.ObjectKind { return obj } +func (obj *Config) SetGroupVersionKind(gvk schema.GroupVersionKind) { obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() } -func (obj *Config) GroupVersionKind() unversioned.GroupVersionKind { - return unversioned.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) +func (obj *Config) GroupVersionKind() schema.GroupVersionKind { + return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) } diff --git a/vendor/k8s.io/client-go/1.5/tools/clientcmd/api/types.go b/vendor/k8s.io/client-go/tools/clientcmd/api/types.go similarity index 95% rename from vendor/k8s.io/client-go/1.5/tools/clientcmd/api/types.go rename to vendor/k8s.io/client-go/tools/clientcmd/api/types.go index 7b7ed9f5b..fa9d40a9b 100644 --- a/vendor/k8s.io/client-go/1.5/tools/clientcmd/api/types.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/types.go @@ -17,7 +17,7 @@ limitations under the License. package api import ( - "k8s.io/client-go/1.5/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" ) // Where possible, json tags match the cli argument names. @@ -28,12 +28,14 @@ import ( type Config struct { // Legacy field from pkg/api/types.go TypeMeta. // TODO(jlowdermilk): remove this after eliminating downstream dependencies. + // +optional Kind string `json:"kind,omitempty"` // DEPRECATED: APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc). // Because a cluster can run multiple API groups and potentially multiple versions of each, it no longer makes sense to specify // a single value for the cluster version. // This field isn't really needed anyway, so we are deprecating it without replacement. // It will be ignored if it is present. + // +optional APIVersion string `json:"apiVersion,omitempty"` // Preferences holds general information to be use for cli interactions Preferences Preferences `json:"preferences"` @@ -46,13 +48,16 @@ type Config struct { // CurrentContext is the name of the context that you would like to use by default CurrentContext string `json:"current-context"` // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional Extensions map[string]runtime.Object `json:"extensions,omitempty"` } // IMPORTANT if you add fields to this struct, please update IsConfigEmpty() type Preferences struct { + // +optional Colors bool `json:"colors,omitempty"` // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional Extensions map[string]runtime.Object `json:"extensions,omitempty"` } @@ -63,14 +68,19 @@ type Cluster struct { // Server is the address of the kubernetes cluster (https://hostname:port). Server string `json:"server"` // APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc). + // +optional APIVersion string `json:"api-version,omitempty"` // InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure. + // +optional InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"` // CertificateAuthority is the path to a cert file for the certificate authority. + // +optional CertificateAuthority string `json:"certificate-authority,omitempty"` // CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority + // +optional CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"` // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional Extensions map[string]runtime.Object `json:"extensions,omitempty"` } @@ -79,26 +89,37 @@ type AuthInfo struct { // LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized. LocationOfOrigin string // ClientCertificate is the path to a client cert file for TLS. + // +optional ClientCertificate string `json:"client-certificate,omitempty"` // ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate + // +optional ClientCertificateData []byte `json:"client-certificate-data,omitempty"` // ClientKey is the path to a client key file for TLS. + // +optional ClientKey string `json:"client-key,omitempty"` // ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey + // +optional ClientKeyData []byte `json:"client-key-data,omitempty"` // Token is the bearer token for authentication to the kubernetes cluster. + // +optional Token string `json:"token,omitempty"` // TokenFile is a pointer to a file that contains a bearer token (as described above). If both Token and TokenFile are present, Token takes precedence. + // +optional TokenFile string `json:"tokenFile,omitempty"` // Impersonate is the username to act-as. + // +optional Impersonate string `json:"act-as,omitempty"` // Username is the username for basic authentication to the kubernetes cluster. + // +optional Username string `json:"username,omitempty"` // Password is the password for basic authentication to the kubernetes cluster. + // +optional Password string `json:"password,omitempty"` // AuthProvider specifies a custom authentication plugin for the kubernetes cluster. + // +optional AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"` // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional Extensions map[string]runtime.Object `json:"extensions,omitempty"` } @@ -111,14 +132,17 @@ type Context struct { // AuthInfo is the name of the authInfo for this context AuthInfo string `json:"user"` // Namespace is the default namespace to use on unspecified requests + // +optional Namespace string `json:"namespace,omitempty"` // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional Extensions map[string]runtime.Object `json:"extensions,omitempty"` } // AuthProviderConfig holds the configuration for a specified auth provider. type AuthProviderConfig struct { - Name string `json:"name"` + Name string `json:"name"` + // +optional Config map[string]string `json:"config,omitempty"` } diff --git a/vendor/k8s.io/client-go/tools/metrics/OWNERS b/vendor/k8s.io/client-go/tools/metrics/OWNERS new file mode 100755 index 000000000..ff5179807 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/metrics/OWNERS @@ -0,0 +1,7 @@ +reviewers: +- wojtek-t +- eparis +- krousey +- jayunit100 +- fgrzadkowski +- tmrts diff --git a/vendor/k8s.io/client-go/1.5/tools/metrics/metrics.go b/vendor/k8s.io/client-go/tools/metrics/metrics.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/tools/metrics/metrics.go rename to vendor/k8s.io/client-go/tools/metrics/metrics.go diff --git a/vendor/k8s.io/client-go/transport/OWNERS b/vendor/k8s.io/client-go/transport/OWNERS new file mode 100755 index 000000000..bf0ba5b9f --- /dev/null +++ b/vendor/k8s.io/client-go/transport/OWNERS @@ -0,0 +1,7 @@ +reviewers: +- smarterclayton +- wojtek-t +- deads2k +- liggitt +- krousey +- caesarxuchao diff --git a/vendor/k8s.io/client-go/1.5/transport/cache.go b/vendor/k8s.io/client-go/transport/cache.go similarity index 98% rename from vendor/k8s.io/client-go/1.5/transport/cache.go rename to vendor/k8s.io/client-go/transport/cache.go index 6902757e1..8d76def34 100644 --- a/vendor/k8s.io/client-go/1.5/transport/cache.go +++ b/vendor/k8s.io/client-go/transport/cache.go @@ -23,7 +23,7 @@ import ( "sync" "time" - utilnet "k8s.io/client-go/1.5/pkg/util/net" + utilnet "k8s.io/apimachinery/pkg/util/net" ) // TlsTransportCache caches TLS http.RoundTrippers different configurations. The diff --git a/vendor/k8s.io/client-go/1.5/transport/config.go b/vendor/k8s.io/client-go/transport/config.go similarity index 82% rename from vendor/k8s.io/client-go/1.5/transport/config.go rename to vendor/k8s.io/client-go/transport/config.go index 6e5c68a30..820594ba3 100644 --- a/vendor/k8s.io/client-go/1.5/transport/config.go +++ b/vendor/k8s.io/client-go/transport/config.go @@ -34,8 +34,8 @@ type Config struct { // Bearer token for authentication BearerToken string - // Impersonate is the username that this Config will impersonate - Impersonate string + // Impersonate is the config that this Config will impersonate using + Impersonate ImpersonationConfig // Transport may be used for custom HTTP behavior. This attribute may // not be specified with the TLS client certificate options. Use @@ -50,6 +50,16 @@ type Config struct { WrapTransport func(rt http.RoundTripper) http.RoundTripper } +// ImpersonationConfig has all the available impersonation options +type ImpersonationConfig struct { + // UserName matches user.Info.GetName() + UserName string + // Groups matches user.Info.GetGroups() + Groups []string + // Extra matches user.Info.GetExtra() + Extra map[string][]string +} + // HasCA returns whether the configuration has a certificate authority or not. func (c *Config) HasCA() bool { return len(c.TLS.CAData) > 0 || len(c.TLS.CAFile) > 0 @@ -76,7 +86,8 @@ type TLSConfig struct { CertFile string // Path of the PEM-encoded client certificate. KeyFile string // Path of the PEM-encoded client key. - Insecure bool // Server should be accessed without verifying the certificate. For testing only. + Insecure bool // Server should be accessed without verifying the certificate. For testing only. + ServerName string // Override for the server name passed to the server for SNI and used to verify certificates. CAData []byte // Bytes of the PEM-encoded server trusted root certificates. Supercedes CAFile. CertData []byte // Bytes of the PEM-encoded client certificate. Supercedes CertFile. diff --git a/vendor/k8s.io/client-go/1.5/transport/round_trippers.go b/vendor/k8s.io/client-go/transport/round_trippers.go similarity index 71% rename from vendor/k8s.io/client-go/1.5/transport/round_trippers.go rename to vendor/k8s.io/client-go/transport/round_trippers.go index aadf0cbf9..a6f396fbb 100644 --- a/vendor/k8s.io/client-go/1.5/transport/round_trippers.go +++ b/vendor/k8s.io/client-go/transport/round_trippers.go @@ -19,6 +19,7 @@ package transport import ( "fmt" "net/http" + "strings" "time" "github.com/golang/glog" @@ -48,7 +49,9 @@ func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTrip if len(config.UserAgent) > 0 { rt = NewUserAgentRoundTripper(config.UserAgent, rt) } - if len(config.Impersonate) > 0 { + if len(config.Impersonate.UserName) > 0 || + len(config.Impersonate.Groups) > 0 || + len(config.Impersonate.Extra) > 0 { rt = NewImpersonatingRoundTripper(config.Impersonate, rt) } return rt, nil @@ -74,6 +77,71 @@ type requestCanceler interface { CancelRequest(*http.Request) } +type authProxyRoundTripper struct { + username string + groups []string + extra map[string][]string + + rt http.RoundTripper +} + +// NewAuthProxyRoundTripper provides a roundtripper which will add auth proxy fields to requests for +// authentication terminating proxy cases +// assuming you pull the user from the context: +// username is the user.Info.GetName() of the user +// groups is the user.Info.GetGroups() of the user +// extra is the user.Info.GetExtra() of the user +// extra can contain any additional information that the authenticator +// thought was interesting, for example authorization scopes. +// In order to faithfully round-trip through an impersonation flow, these keys +// MUST be lowercase. +func NewAuthProxyRoundTripper(username string, groups []string, extra map[string][]string, rt http.RoundTripper) http.RoundTripper { + return &authProxyRoundTripper{ + username: username, + groups: groups, + extra: extra, + rt: rt, + } +} + +func (rt *authProxyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + req = cloneRequest(req) + SetAuthProxyHeaders(req, rt.username, rt.groups, rt.extra) + + return rt.rt.RoundTrip(req) +} + +// SetAuthProxyHeaders stomps the auth proxy header fields. It mutates its argument. +func SetAuthProxyHeaders(req *http.Request, username string, groups []string, extra map[string][]string) { + req.Header.Del("X-Remote-User") + req.Header.Del("X-Remote-Group") + for key := range req.Header { + if strings.HasPrefix(strings.ToLower(key), strings.ToLower("X-Remote-Extra-")) { + req.Header.Del(key) + } + } + + req.Header.Set("X-Remote-User", username) + for _, group := range groups { + req.Header.Add("X-Remote-Group", group) + } + for key, values := range extra { + for _, value := range values { + req.Header.Add("X-Remote-Extra-"+key, value) + } + } +} + +func (rt *authProxyRoundTripper) CancelRequest(req *http.Request) { + if canceler, ok := rt.rt.(requestCanceler); ok { + canceler.CancelRequest(req) + } else { + glog.Errorf("CancelRequest not implemented") + } +} + +func (rt *authProxyRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt } + type userAgentRoundTripper struct { agent string rt http.RoundTripper @@ -133,22 +201,53 @@ func (rt *basicAuthRoundTripper) CancelRequest(req *http.Request) { func (rt *basicAuthRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt } +// These correspond to the headers used in pkg/apis/authentication. We don't want the package dependency, +// but you must not change the values. +const ( + // ImpersonateUserHeader is used to impersonate a particular user during an API server request + ImpersonateUserHeader = "Impersonate-User" + + // ImpersonateGroupHeader is used to impersonate a particular group during an API server request. + // It can be repeated multiplied times for multiple groups. + ImpersonateGroupHeader = "Impersonate-Group" + + // ImpersonateUserExtraHeaderPrefix is a prefix for a header used to impersonate an entry in the + // extra map[string][]string for user.Info. The key for the `extra` map is suffix. + // The same key can be repeated multiple times to have multiple elements in the slice under a single key. + // For instance: + // Impersonate-Extra-Foo: one + // Impersonate-Extra-Foo: two + // results in extra["Foo"] = []string{"one", "two"} + ImpersonateUserExtraHeaderPrefix = "Impersonate-Extra-" +) + type impersonatingRoundTripper struct { - impersonate string + impersonate ImpersonationConfig delegate http.RoundTripper } // NewImpersonatingRoundTripper will add an Act-As header to a request unless it has already been set. -func NewImpersonatingRoundTripper(impersonate string, delegate http.RoundTripper) http.RoundTripper { +func NewImpersonatingRoundTripper(impersonate ImpersonationConfig, delegate http.RoundTripper) http.RoundTripper { return &impersonatingRoundTripper{impersonate, delegate} } func (rt *impersonatingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - if len(req.Header.Get("Impersonate-User")) != 0 { + // use the user header as marker for the rest. + if len(req.Header.Get(ImpersonateUserHeader)) != 0 { return rt.delegate.RoundTrip(req) } req = cloneRequest(req) - req.Header.Set("Impersonate-User", rt.impersonate) + req.Header.Set(ImpersonateUserHeader, rt.impersonate.UserName) + + for _, group := range rt.impersonate.Groups { + req.Header.Add(ImpersonateGroupHeader, group) + } + for k, vv := range rt.impersonate.Extra { + for _, v := range vv { + req.Header.Add(ImpersonateUserExtraHeaderPrefix+k, v) + } + } + return rt.delegate.RoundTrip(req) } diff --git a/vendor/k8s.io/client-go/1.5/transport/transport.go b/vendor/k8s.io/client-go/transport/transport.go similarity index 99% rename from vendor/k8s.io/client-go/1.5/transport/transport.go rename to vendor/k8s.io/client-go/transport/transport.go index 9c5b9ef3c..15be0a3e6 100644 --- a/vendor/k8s.io/client-go/1.5/transport/transport.go +++ b/vendor/k8s.io/client-go/transport/transport.go @@ -68,6 +68,7 @@ func TLSConfigFor(c *Config) (*tls.Config, error) { // Can't use TLSv1.1 because of RC4 cipher usage MinVersion: tls.VersionTLS12, InsecureSkipVerify: c.TLS.Insecure, + ServerName: c.TLS.ServerName, } if c.HasCA() { diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/cert/cert.go b/vendor/k8s.io/client-go/util/cert/cert.go similarity index 72% rename from vendor/k8s.io/client-go/1.5/pkg/util/cert/cert.go rename to vendor/k8s.io/client-go/util/cert/cert.go index 8617744a7..6854d4152 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/cert/cert.go +++ b/vendor/k8s.io/client-go/util/cert/cert.go @@ -25,6 +25,7 @@ import ( "crypto/x509" "crypto/x509/pkix" "encoding/pem" + "errors" "fmt" "math" "math/big" @@ -42,6 +43,7 @@ type Config struct { CommonName string Organization []string AltNames AltNames + Usages []x509.ExtKeyUsage } // AltNames contains the domain names and IP addresses that will be added @@ -86,11 +88,17 @@ func NewSignedCert(cfg Config, key *rsa.PrivateKey, caCert *x509.Certificate, ca if err != nil { return nil, err } + if len(cfg.CommonName) == 0 { + return nil, errors.New("must specify a CommonName") + } + if len(cfg.Usages) == 0 { + return nil, errors.New("must specify at least one ExtKeyUsage") + } certTmpl := x509.Certificate{ Subject: pkix.Name{ CommonName: cfg.CommonName, - Organization: caCert.Subject.Organization, + Organization: cfg.Organization, }, DNSNames: cfg.AltNames.DNSNames, IPAddresses: cfg.AltNames.IPs, @@ -98,7 +106,7 @@ func NewSignedCert(cfg Config, key *rsa.PrivateKey, caCert *x509.Certificate, ca NotBefore: caCert.NotBefore, NotAfter: time.Now().Add(duration365d).UTC(), KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, - ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth, x509.ExtKeyUsageClientAuth}, + ExtKeyUsage: cfg.Usages, } certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &certTmpl, caCert, key.Public(), caKey) if err != nil { @@ -120,22 +128,19 @@ func MakeEllipticPrivateKeyPEM() ([]byte, error) { } privateKeyPemBlock := &pem.Block{ - Type: "EC PRIVATE KEY", + Type: ECPrivateKeyBlockType, Bytes: derBytes, } return pem.EncodeToMemory(privateKeyPemBlock), nil } -// GenerateSelfSignedCert creates a self-signed certificate and key for the given host. +// GenerateSelfSignedCertKey creates a self-signed certificate and key for the given host. // Host may be an IP or a DNS name // You may also specify additional subject alt names (either ip or dns names) for the certificate -// The certificate will be created with file mode 0644. The key will be created with file mode 0600. -// If the certificate or key files already exist, they will be overwritten. -// Any parent directories of the certPath or keyPath will be created as needed with file mode 0755. -func GenerateSelfSignedCert(host, certPath, keyPath string, alternateIPs []net.IP, alternateDNS []string) error { +func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS []string) ([]byte, []byte, error) { priv, err := rsa.GenerateKey(cryptorand.Reader, 2048) if err != nil { - return err + return nil, nil, err } template := x509.Certificate{ @@ -163,28 +168,48 @@ func GenerateSelfSignedCert(host, certPath, keyPath string, alternateIPs []net.I derBytes, err := x509.CreateCertificate(cryptorand.Reader, &template, &template, &priv.PublicKey, priv) if err != nil { - return err + return nil, nil, err } // Generate cert certBuffer := bytes.Buffer{} - if err := pem.Encode(&certBuffer, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}); err != nil { - return err + if err := pem.Encode(&certBuffer, &pem.Block{Type: CertificateBlockType, Bytes: derBytes}); err != nil { + return nil, nil, err } // Generate key keyBuffer := bytes.Buffer{} - if err := pem.Encode(&keyBuffer, &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(priv)}); err != nil { - return err + if err := pem.Encode(&keyBuffer, &pem.Block{Type: RSAPrivateKeyBlockType, Bytes: x509.MarshalPKCS1PrivateKey(priv)}); err != nil { + return nil, nil, err } - if err := WriteCert(certPath, certBuffer.Bytes()); err != nil { - return err - } - - if err := WriteKey(keyPath, keyBuffer.Bytes()); err != nil { - return err - } - - return nil + return certBuffer.Bytes(), keyBuffer.Bytes(), nil +} + +// FormatBytesCert receives byte array certificate and formats in human-readable format +func FormatBytesCert(cert []byte) (string, error) { + block, _ := pem.Decode(cert) + c, err := x509.ParseCertificate(block.Bytes) + if err != nil { + return "", fmt.Errorf("failed to parse certificate [%v]", err) + } + return FormatCert(c), nil +} + +// FormatCert receives certificate and formats in human-readable format +func FormatCert(c *x509.Certificate) string { + var ips []string + for _, ip := range c.IPAddresses { + ips = append(ips, ip.String()) + } + altNames := append(ips, c.DNSNames...) + res := fmt.Sprintf( + "Issuer: CN=%s | Subject: CN=%s | CA: %t\n", + c.Issuer.CommonName, c.Subject.CommonName, c.IsCA, + ) + res += fmt.Sprintf("Not before: %s Not After: %s", c.NotBefore, c.NotAfter) + if len(altNames) > 0 { + res += fmt.Sprintf("\nAlternate Names: %v", altNames) + } + return res } diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/cert/csr.go b/vendor/k8s.io/client-go/util/cert/csr.go similarity index 61% rename from vendor/k8s.io/client-go/1.5/pkg/util/cert/csr.go rename to vendor/k8s.io/client-go/util/cert/csr.go index f03e8d826..280d249fe 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/cert/csr.go +++ b/vendor/k8s.io/client-go/util/cert/csr.go @@ -22,60 +22,54 @@ import ( "crypto/x509" "crypto/x509/pkix" "encoding/pem" - "errors" "net" - - "k8s.io/client-go/1.5/pkg/apis/certificates" ) -// ParseCSR extracts the CSR from the API object and decodes it. -func ParseCSR(obj *certificates.CertificateSigningRequest) (*x509.CertificateRequest, error) { - // extract PEM from request object - pemBytes := obj.Spec.Request - block, _ := pem.Decode(pemBytes) - if block == nil || block.Type != "CERTIFICATE REQUEST" { - return nil, errors.New("PEM block type must be CERTIFICATE REQUEST") - } - csr, err := x509.ParseCertificateRequest(block.Bytes) - if err != nil { - return nil, err - } - return csr, nil -} - // MakeCSR generates a PEM-encoded CSR using the supplied private key, subject, and SANs. // All key types that are implemented via crypto.Signer are supported (This includes *rsa.PrivateKey and *ecdsa.PrivateKey.) func MakeCSR(privateKey interface{}, subject *pkix.Name, dnsSANs []string, ipSANs []net.IP) (csr []byte, err error) { - // Customize the signature for RSA keys, depending on the key size - var sigType x509.SignatureAlgorithm - if privateKey, ok := privateKey.(*rsa.PrivateKey); ok { - keySize := privateKey.N.BitLen() - switch { - case keySize >= 4096: - sigType = x509.SHA512WithRSA - case keySize >= 3072: - sigType = x509.SHA384WithRSA - default: - sigType = x509.SHA256WithRSA - } - } - template := &x509.CertificateRequest{ - Subject: *subject, - SignatureAlgorithm: sigType, - DNSNames: dnsSANs, - IPAddresses: ipSANs, + Subject: *subject, + DNSNames: dnsSANs, + IPAddresses: ipSANs, } - csr, err = x509.CreateCertificateRequest(cryptorand.Reader, template, privateKey) + return MakeCSRFromTemplate(privateKey, template) +} + +// MakeCSRFromTemplate generates a PEM-encoded CSR using the supplied private +// key and certificate request as a template. All key types that are +// implemented via crypto.Signer are supported (This includes *rsa.PrivateKey +// and *ecdsa.PrivateKey.) +func MakeCSRFromTemplate(privateKey interface{}, template *x509.CertificateRequest) ([]byte, error) { + t := *template + t.SignatureAlgorithm = sigType(privateKey) + + csrDER, err := x509.CreateCertificateRequest(cryptorand.Reader, &t, privateKey) if err != nil { return nil, err } csrPemBlock := &pem.Block{ Type: "CERTIFICATE REQUEST", - Bytes: csr, + Bytes: csrDER, } return pem.EncodeToMemory(csrPemBlock), nil } + +func sigType(privateKey interface{}) x509.SignatureAlgorithm { + // Customize the signature for RSA keys, depending on the key size + if privateKey, ok := privateKey.(*rsa.PrivateKey); ok { + keySize := privateKey.N.BitLen() + switch { + case keySize >= 4096: + return x509.SHA512WithRSA + case keySize >= 3072: + return x509.SHA384WithRSA + default: + return x509.SHA256WithRSA + } + } + return x509.UnknownSignatureAlgorithm +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/cert/io.go b/vendor/k8s.io/client-go/util/cert/io.go similarity index 57% rename from vendor/k8s.io/client-go/1.5/pkg/util/cert/io.go rename to vendor/k8s.io/client-go/util/cert/io.go index 9a3e1622f..b6b690383 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/cert/io.go +++ b/vendor/k8s.io/client-go/util/cert/io.go @@ -18,21 +18,31 @@ package cert import ( "crypto/x509" - "errors" "fmt" "io/ioutil" "os" "path/filepath" ) -// CanReadCertOrKey returns true if the certificate or key files already exists, -// otherwise returns false. -func CanReadCertOrKey(certPath, keyPath string) bool { - if canReadFile(certPath) || canReadFile(keyPath) { - return true +// CanReadCertAndKey returns true if the certificate and key files already exists, +// otherwise returns false. If lost one of cert and key, returns error. +func CanReadCertAndKey(certPath, keyPath string) (bool, error) { + certReadable := canReadFile(certPath) + keyReadable := canReadFile(keyPath) + + if certReadable == false && keyReadable == false { + return false, nil } - return false + if certReadable == false { + return false, fmt.Errorf("error reading %s, certificate and key must be supplied as a pair", certPath) + } + + if keyReadable == false { + return false, fmt.Errorf("error reading %s, certificate and key must be supplied as a pair", keyPath) + } + + return true, nil } // If the file represented by path exists and @@ -76,10 +86,31 @@ func WriteKey(keyPath string, data []byte) error { return nil } +// LoadOrGenerateKeyFile looks for a key in the file at the given path. If it +// can't find one, it will generate a new key and store it there. +func LoadOrGenerateKeyFile(keyPath string) (data []byte, wasGenerated bool, err error) { + loadedData, err := ioutil.ReadFile(keyPath) + if err == nil { + return loadedData, false, err + } + if !os.IsNotExist(err) { + return nil, false, fmt.Errorf("error loading key from %s: %v", keyPath, err) + } + + generatedData, err := MakeEllipticPrivateKeyPEM() + if err != nil { + return nil, false, fmt.Errorf("error generating key: %v", err) + } + if err := WriteKey(keyPath, generatedData); err != nil { + return nil, false, fmt.Errorf("error writing key to %s: %v", keyPath, err) + } + return generatedData, true, nil +} + // NewPool returns an x509.CertPool containing the certificates in the given PEM-encoded file. // Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates func NewPool(filename string) (*x509.CertPool, error) { - certs, err := certsFromFile(filename) + certs, err := CertsFromFile(filename) if err != nil { return nil, err } @@ -90,12 +121,9 @@ func NewPool(filename string) (*x509.CertPool, error) { return pool, nil } -// certsFromFile returns the x509.Certificates contained in the given PEM-encoded file. +// CertsFromFile returns the x509.Certificates contained in the given PEM-encoded file. // Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates -func certsFromFile(file string) ([]*x509.Certificate, error) { - if len(file) == 0 { - return nil, errors.New("error reading certificates from an empty filename") - } +func CertsFromFile(file string) ([]*x509.Certificate, error) { pemBlock, err := ioutil.ReadFile(file) if err != nil { return nil, err @@ -106,3 +134,17 @@ func certsFromFile(file string) ([]*x509.Certificate, error) { } return certs, nil } + +// PrivateKeyFromFile returns the private key in rsa.PrivateKey or ecdsa.PrivateKey format from a given PEM-encoded file. +// Returns an error if the file could not be read or if the private key could not be parsed. +func PrivateKeyFromFile(file string) (interface{}, error) { + pemBlock, err := ioutil.ReadFile(file) + if err != nil { + return nil, err + } + key, err := ParsePrivateKeyPEM(pemBlock) + if err != nil { + return nil, fmt.Errorf("error reading %s: %v", file, err) + } + return key, nil +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/cert/pem.go b/vendor/k8s.io/client-go/util/cert/pem.go similarity index 56% rename from vendor/k8s.io/client-go/1.5/pkg/util/cert/pem.go rename to vendor/k8s.io/client-go/util/cert/pem.go index 59e602d2f..899845857 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/cert/pem.go +++ b/vendor/k8s.io/client-go/util/cert/pem.go @@ -24,6 +24,21 @@ import ( "fmt" ) +const ( + // ECPrivateKeyBlockType is a possible value for pem.Block.Type. + ECPrivateKeyBlockType = "EC PRIVATE KEY" + // RSAPrivateKeyBlockType is a possible value for pem.Block.Type. + RSAPrivateKeyBlockType = "RSA PRIVATE KEY" + // CertificateBlockType is a possible value for pem.Block.Type. + CertificateBlockType = "CERTIFICATE" + // CertificateRequestBlockType is a possible value for pem.Block.Type. + CertificateRequestBlockType = "CERTIFICATE REQUEST" + // PrivateKeyBlockType is a possible value for pem.Block.Type. + PrivateKeyBlockType = "PRIVATE KEY" + // PublicKeyBlockType is a possible value for pem.Block.Type. + PublicKeyBlockType = "PUBLIC KEY" +) + // EncodePublicKeyPEM returns PEM-endcode public data func EncodePublicKeyPEM(key *rsa.PublicKey) ([]byte, error) { der, err := x509.MarshalPKIXPublicKey(key) @@ -31,7 +46,7 @@ func EncodePublicKeyPEM(key *rsa.PublicKey) ([]byte, error) { return []byte{}, err } block := pem.Block{ - Type: "PUBLIC KEY", + Type: PublicKeyBlockType, Bytes: der, } return pem.EncodeToMemory(&block), nil @@ -40,7 +55,7 @@ func EncodePublicKeyPEM(key *rsa.PublicKey) ([]byte, error) { // EncodePrivateKeyPEM returns PEM-encoded private key data func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte { block := pem.Block{ - Type: "RSA PRIVATE KEY", + Type: RSAPrivateKeyBlockType, Bytes: x509.MarshalPKCS1PrivateKey(key), } return pem.EncodeToMemory(&block) @@ -49,30 +64,46 @@ func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte { // EncodeCertPEM returns PEM-endcoded certificate data func EncodeCertPEM(cert *x509.Certificate) []byte { block := pem.Block{ - Type: "CERTIFICATE", + Type: CertificateBlockType, Bytes: cert.Raw, } return pem.EncodeToMemory(&block) } // ParsePrivateKeyPEM returns a private key parsed from a PEM block in the supplied data. -// Recognizes PEM blocks for "EC PRIVATE KEY" and "RSA PRIVATE KEY" +// Recognizes PEM blocks for "EC PRIVATE KEY", "RSA PRIVATE KEY", or "PRIVATE KEY" func ParsePrivateKeyPEM(keyData []byte) (interface{}, error) { + var privateKeyPemBlock *pem.Block for { - var privateKeyPemBlock *pem.Block privateKeyPemBlock, keyData = pem.Decode(keyData) if privateKeyPemBlock == nil { - // we read all the PEM blocks and didn't recognize one - return nil, fmt.Errorf("no private key PEM block found") + break } switch privateKeyPemBlock.Type { - case "EC PRIVATE KEY": - return x509.ParseECPrivateKey(privateKeyPemBlock.Bytes) - case "RSA PRIVATE KEY": - return x509.ParsePKCS1PrivateKey(privateKeyPemBlock.Bytes) + case ECPrivateKeyBlockType: + // ECDSA Private Key in ASN.1 format + if key, err := x509.ParseECPrivateKey(privateKeyPemBlock.Bytes); err == nil { + return key, nil + } + case RSAPrivateKeyBlockType: + // RSA Private Key in PKCS#1 format + if key, err := x509.ParsePKCS1PrivateKey(privateKeyPemBlock.Bytes); err == nil { + return key, nil + } + case PrivateKeyBlockType: + // RSA or ECDSA Private Key in unencrypted PKCS#8 format + if key, err := x509.ParsePKCS8PrivateKey(privateKeyPemBlock.Bytes); err == nil { + return key, nil + } } + + // tolerate non-key PEM blocks for compatibility with things like "EC PARAMETERS" blocks + // originally, only the first PEM block was parsed and expected to be a key block } + + // we read all the PEM blocks and didn't recognize one + return nil, fmt.Errorf("data does not contain a valid RSA or ECDSA private key") } // ParseCertsPEM returns the x509.Certificates contained in the given PEM-encoded byte array @@ -87,7 +118,7 @@ func ParseCertsPEM(pemCerts []byte) ([]*x509.Certificate, error) { break } // Only use PEM "CERTIFICATE" blocks without extra headers - if block.Type != "CERTIFICATE" || len(block.Headers) != 0 { + if block.Type != CertificateBlockType || len(block.Headers) != 0 { continue } diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/clock/clock.go b/vendor/k8s.io/client-go/util/clock/clock.go similarity index 65% rename from vendor/k8s.io/client-go/1.5/pkg/util/clock/clock.go rename to vendor/k8s.io/client-go/util/clock/clock.go index 2ea1b53c1..c303a212a 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/clock/clock.go +++ b/vendor/k8s.io/client-go/util/clock/clock.go @@ -27,6 +27,7 @@ type Clock interface { Now() time.Time Since(time.Time) time.Duration After(d time.Duration) <-chan time.Time + NewTimer(d time.Duration) Timer Sleep(d time.Duration) Tick(d time.Duration) <-chan time.Time } @@ -55,6 +56,12 @@ func (RealClock) After(d time.Duration) <-chan time.Time { return time.After(d) } +func (RealClock) NewTimer(d time.Duration) Timer { + return &realTimer{ + timer: time.NewTimer(d), + } +} + func (RealClock) Tick(d time.Duration) <-chan time.Time { return time.Tick(d) } @@ -76,7 +83,8 @@ type fakeClockWaiter struct { targetTime time.Time stepInterval time.Duration skipIfBlocked bool - destChan chan<- time.Time + destChan chan time.Time + fired bool } func NewFakeClock(t time.Time) *FakeClock { @@ -112,6 +120,23 @@ func (f *FakeClock) After(d time.Duration) <-chan time.Time { return ch } +// Fake version of time.NewTimer(d). +func (f *FakeClock) NewTimer(d time.Duration) Timer { + f.lock.Lock() + defer f.lock.Unlock() + stopTime := f.time.Add(d) + ch := make(chan time.Time, 1) // Don't block! + timer := &fakeTimer{ + fakeClock: f, + waiter: fakeClockWaiter{ + targetTime: stopTime, + destChan: ch, + }, + } + f.waiters = append(f.waiters, timer.waiter) + return timer +} + func (f *FakeClock) Tick(d time.Duration) <-chan time.Time { f.lock.Lock() defer f.lock.Unlock() @@ -127,7 +152,7 @@ func (f *FakeClock) Tick(d time.Duration) <-chan time.Time { return ch } -// Move clock by Duration, notify anyone that's called After or Tick +// Move clock by Duration, notify anyone that's called After, Tick, or NewTimer func (f *FakeClock) Step(d time.Duration) { f.lock.Lock() defer f.lock.Unlock() @@ -152,10 +177,12 @@ func (f *FakeClock) setTimeLocked(t time.Time) { if w.skipIfBlocked { select { case w.destChan <- t: + w.fired = true default: } } else { w.destChan <- t + w.fired = true } if w.stepInterval > 0 { @@ -207,6 +234,12 @@ func (*IntervalClock) After(d time.Duration) <-chan time.Time { panic("IntervalClock doesn't implement After") } +// Unimplemented, will panic. +// TODO: make interval clock use FakeClock so this can be implemented. +func (*IntervalClock) NewTimer(d time.Duration) Timer { + panic("IntervalClock doesn't implement NewTimer") +} + // Unimplemented, will panic. // TODO: make interval clock use FakeClock so this can be implemented. func (*IntervalClock) Tick(d time.Duration) <-chan time.Time { @@ -216,3 +249,79 @@ func (*IntervalClock) Tick(d time.Duration) <-chan time.Time { func (*IntervalClock) Sleep(d time.Duration) { panic("IntervalClock doesn't implement Sleep") } + +// Timer allows for injecting fake or real timers into code that +// needs to do arbitrary things based on time. +type Timer interface { + C() <-chan time.Time + Stop() bool + Reset(d time.Duration) bool +} + +var ( + _ = Timer(&realTimer{}) + _ = Timer(&fakeTimer{}) +) + +// realTimer is backed by an actual time.Timer. +type realTimer struct { + timer *time.Timer +} + +// C returns the underlying timer's channel. +func (r *realTimer) C() <-chan time.Time { + return r.timer.C +} + +// Stop calls Stop() on the underlying timer. +func (r *realTimer) Stop() bool { + return r.timer.Stop() +} + +// Reset calls Reset() on the underlying timer. +func (r *realTimer) Reset(d time.Duration) bool { + return r.timer.Reset(d) +} + +// fakeTimer implements Timer based on a FakeClock. +type fakeTimer struct { + fakeClock *FakeClock + waiter fakeClockWaiter +} + +// C returns the channel that notifies when this timer has fired. +func (f *fakeTimer) C() <-chan time.Time { + return f.waiter.destChan +} + +// Stop stops the timer and returns true if the timer has not yet fired, or false otherwise. +func (f *fakeTimer) Stop() bool { + f.fakeClock.lock.Lock() + defer f.fakeClock.lock.Unlock() + + newWaiters := make([]fakeClockWaiter, 0, len(f.fakeClock.waiters)) + for i := range f.fakeClock.waiters { + w := &f.fakeClock.waiters[i] + if w != &f.waiter { + newWaiters = append(newWaiters, *w) + } + } + + f.fakeClock.waiters = newWaiters + + return !f.waiter.fired +} + +// Reset resets the timer to the fake clock's "now" + d. It returns true if the timer has not yet +// fired, or false otherwise. +func (f *fakeTimer) Reset(d time.Duration) bool { + f.fakeClock.lock.Lock() + defer f.fakeClock.lock.Unlock() + + active := !f.waiter.fired + + f.waiter.fired = false + f.waiter.targetTime = f.fakeClock.time.Add(d) + + return active +} diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/flowcontrol/backoff.go b/vendor/k8s.io/client-go/util/flowcontrol/backoff.go similarity index 98% rename from vendor/k8s.io/client-go/1.5/pkg/util/flowcontrol/backoff.go rename to vendor/k8s.io/client-go/util/flowcontrol/backoff.go index dae898065..030b15a56 100644 --- a/vendor/k8s.io/client-go/1.5/pkg/util/flowcontrol/backoff.go +++ b/vendor/k8s.io/client-go/util/flowcontrol/backoff.go @@ -20,8 +20,8 @@ import ( "sync" "time" - "k8s.io/client-go/1.5/pkg/util/clock" - "k8s.io/client-go/1.5/pkg/util/integer" + "k8s.io/client-go/util/clock" + "k8s.io/client-go/util/integer" ) type backoffEntry struct { diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/flowcontrol/throttle.go b/vendor/k8s.io/client-go/util/flowcontrol/throttle.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/util/flowcontrol/throttle.go rename to vendor/k8s.io/client-go/util/flowcontrol/throttle.go diff --git a/vendor/k8s.io/client-go/1.5/pkg/util/integer/integer.go b/vendor/k8s.io/client-go/util/integer/integer.go similarity index 100% rename from vendor/k8s.io/client-go/1.5/pkg/util/integer/integer.go rename to vendor/k8s.io/client-go/util/integer/integer.go diff --git a/vendor/vendor.json b/vendor/vendor.json index 631073955..495602d22 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -234,69 +234,6 @@ "revision": "3ac7bf7a47d159a033b107610db8a1b6575507a4", "revisionTime": "2016-02-29T21:34:45Z" }, - { - "checksumSHA1": "n+s4YwtzpMWW5Rt0dEaQa7NHDGQ=", - "origin": "k8s.io/client-go/1.5/vendor/github.com/blang/semver", - "path": "github.com/blang/semver", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" - }, - { - "checksumSHA1": "Z2AOGSmDKKvI6nuxa+UPjQWpIeM=", - "origin": "k8s.io/client-go/1.5/vendor/github.com/coreos/go-oidc/http", - "path": "github.com/coreos/go-oidc/http", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" - }, - { - "checksumSHA1": "8yvt1xKCgNwuuavJdxRnvaIjrIc=", - "origin": "k8s.io/client-go/1.5/vendor/github.com/coreos/go-oidc/jose", - "path": "github.com/coreos/go-oidc/jose", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" - }, - { - "checksumSHA1": "zhXKrWBSSJLqZxVE/Xsw0M9ynFQ=", - "origin": "k8s.io/client-go/1.5/vendor/github.com/coreos/go-oidc/key", - "path": "github.com/coreos/go-oidc/key", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" - }, - { - "checksumSHA1": "bkW0mnXvmHQwHprW/6wrbpP7lAk=", - "origin": "k8s.io/client-go/1.5/vendor/github.com/coreos/go-oidc/oauth2", - "path": "github.com/coreos/go-oidc/oauth2", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" - }, - { - "checksumSHA1": "E1x2k5FdhJ+dzFrh3kCmC6aJfVw=", - "origin": "k8s.io/client-go/1.5/vendor/github.com/coreos/go-oidc/oidc", - "path": "github.com/coreos/go-oidc/oidc", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" - }, - { - "checksumSHA1": "O0UMBRCOD9ItMayDqLQ2MJEjkVE=", - "origin": "k8s.io/client-go/1.5/vendor/github.com/coreos/pkg/health", - "path": "github.com/coreos/pkg/health", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" - }, - { - "checksumSHA1": "74vyZz/d49FZXMbFaHOfCGvSLj0=", - "origin": "k8s.io/client-go/1.5/vendor/github.com/coreos/pkg/httputil", - "path": "github.com/coreos/pkg/httputil", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" - }, - { - "checksumSHA1": "etBdQ0LN6ojGunfvUt6B5C3FNrQ=", - "origin": "k8s.io/client-go/1.5/vendor/github.com/coreos/pkg/timeutil", - "path": "github.com/coreos/pkg/timeutil", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" - }, { "checksumSHA1": "SdSd7pyjONWWTHc5XE3AhglLo34=", "origin": "k8s.io/client-go/1.5/vendor/github.com/davecgh/go-spew/spew", @@ -387,18 +324,16 @@ "revisionTime": "2016-09-30T00:14:02Z" }, { - "checksumSHA1": "BIyZQL97iG7mzZ2UMR3XpiXbZdc=", - "origin": "k8s.io/client-go/1.5/vendor/github.com/gogo/protobuf/proto", + "checksumSHA1": "6ZxSmrIx3Jd15aou16oG0HPylP4=", "path": "github.com/gogo/protobuf/proto", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "revision": "30433562cfbf487fe1df7cd26c7bab168d2f14d0", + "revisionTime": "2017-04-25T17:14:30Z" }, { - "checksumSHA1": "e6cMbpJj41MpihS5eP4SIliRBK4=", - "origin": "k8s.io/client-go/1.5/vendor/github.com/gogo/protobuf/sortkeys", + "checksumSHA1": "HPVQZu059/Rfw2bAWM538bVTcUc=", "path": "github.com/gogo/protobuf/sortkeys", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "revision": "30433562cfbf487fe1df7cd26c7bab168d2f14d0", + "revisionTime": "2017-04-25T17:14:30Z" }, { "checksumSHA1": "URsJa4y/sUUw/STmbeYx9EKqaYE=", @@ -460,13 +395,6 @@ "revision": "bd40a432e4c76585ef6b72d3fd96fb9b6dc7b68d", "revisionTime": "2016-08-03T19:07:31Z" }, - { - "checksumSHA1": "9ZVOEbIXnTuYpVqce4en8rwlkPE=", - "origin": "k8s.io/client-go/1.5/vendor/github.com/jonboulle/clockwork", - "path": "github.com/jonboulle/clockwork", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" - }, { "checksumSHA1": "gA95N2LM2hEJLoqrTPaFsSWDJ2Y=", "origin": "k8s.io/client-go/1.5/vendor/github.com/juju/ratelimit", @@ -513,13 +441,6 @@ "revision": "58f52c57ce9df13460ac68200cef30a008b9c468", "revisionTime": "2016-10-18T06:08:08Z" }, - { - "checksumSHA1": "3YJklSuzSE1Rt8A+2dhiWSmf/fw=", - "origin": "k8s.io/client-go/1.5/vendor/github.com/pborman/uuid", - "path": "github.com/pborman/uuid", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" - }, { "checksumSHA1": "zKKp5SZ3d3ycKe4EKMNT0BqAWBw=", "origin": "github.com/stretchr/testify/vendor/github.com/pmezard/go-difflib/difflib", @@ -983,622 +904,694 @@ "revisionTime": "2015-06-24T11:29:02+01:00" }, { - "checksumSHA1": "st0Nbu4zwLcP3mz03lDOJVZtn8Y=", - "path": "k8s.io/client-go/1.5/discovery", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "yugSOlAEbiAH8bhs5RLNAAmR3Cc=", + "path": "k8s.io/apimachinery/pkg/api/errors", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "S+OzpkipMb46LGZoWuveqSLAcoM=", - "path": "k8s.io/client-go/1.5/kubernetes", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "jy7AVFN9kxRRc/+IcEBrW0/w6RY=", + "path": "k8s.io/apimachinery/pkg/api/meta", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "yCBn8ig1TUMrk+ljtK0nDr7E5Vo=", - "path": "k8s.io/client-go/1.5/kubernetes/typed/apps/v1alpha1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "0iZGAJ4tN12kkf6L9/HPbMMfiKY=", + "path": "k8s.io/apimachinery/pkg/api/resource", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "ZRnUz5NrpvJsXAjtnRdEv5UYhSI=", - "path": "k8s.io/client-go/1.5/kubernetes/typed/authentication/v1beta1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "e/FuiIWG97eGJ+48yAZPw/THUlk=", + "path": "k8s.io/apimachinery/pkg/apimachinery", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "TY55Np20olmPMzXgfVlIUIyqv04=", - "path": "k8s.io/client-go/1.5/kubernetes/typed/authorization/v1beta1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "Hd4ESY5hCC8x73iVZTB21vMd3nw=", + "path": "k8s.io/apimachinery/pkg/apimachinery/announced", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "FRByJsFff/6lPH20FtJPaK1NPWI=", - "path": "k8s.io/client-go/1.5/kubernetes/typed/autoscaling/v1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "BV1QVm2PziaEQEQalt5X3zCRW28=", + "path": "k8s.io/apimachinery/pkg/apimachinery/registered", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "3Cy2as7HnQ2FDcvpNbatpFWx0P4=", - "path": "k8s.io/client-go/1.5/kubernetes/typed/batch/v1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "WPFsKHs9NX4OGMVjKanWqeEhPl0=", + "path": "k8s.io/apimachinery/pkg/apis/meta/v1", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "RUKywApIbSLLsfkYxXzifh7HIvs=", - "path": "k8s.io/client-go/1.5/kubernetes/typed/certificates/v1alpha1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "vsWGhOqx/lokFtZOcV0drEqjy78=", + "path": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "4+Lsxu+sYgzsS2JOHP7CdrZLSKc=", - "path": "k8s.io/client-go/1.5/kubernetes/typed/core/v1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "TAFI3FU4ZjvIClZkPcIgc4AWcOQ=", + "path": "k8s.io/apimachinery/pkg/conversion", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "H8jzevN03YUfmf2krJt0qj2P9sU=", - "path": "k8s.io/client-go/1.5/kubernetes/typed/extensions/v1beta1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "xEo+z/ITZUVyycIHoPDhK0eMd9c=", + "path": "k8s.io/apimachinery/pkg/conversion/queryparams", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "hrpA6xxtwj3oMcQbFxI2cDhO2ZA=", - "path": "k8s.io/client-go/1.5/kubernetes/typed/policy/v1alpha1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "qZzCF/6VlY8r5g8bviNnft1ea4s=", + "path": "k8s.io/apimachinery/pkg/fields", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "B2+F12NeMwrOHvHK2ALyEcr3UGA=", - "path": "k8s.io/client-go/1.5/kubernetes/typed/rbac/v1alpha1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "qWIpmMOqjEEV6KoP/hQg+ur/ogs=", + "path": "k8s.io/apimachinery/pkg/labels", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "h2eSNUym87RWPlez7UKujShwrUQ=", - "path": "k8s.io/client-go/1.5/kubernetes/typed/storage/v1beta1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "9BqzTUa7RFscc25qyAQKLkAYHgY=", + "path": "k8s.io/apimachinery/pkg/openapi", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "+oIykJ3A0wYjAWbbrGo0jNnMLXw=", - "path": "k8s.io/client-go/1.5/pkg/api", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "mSWcGlciPb7Nmo6Nhy8ic5rqf70=", + "path": "k8s.io/apimachinery/pkg/runtime", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "UsUsIdhuy5Ej2vI0hbmSsrimoaQ=", - "path": "k8s.io/client-go/1.5/pkg/api/errors", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "SHAUerkMKVWY30mfLu3Lca5Hx9U=", + "path": "k8s.io/apimachinery/pkg/runtime/schema", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "Eo6LLHFqG6YznIAKr2mVjuqUj6k=", - "path": "k8s.io/client-go/1.5/pkg/api/install", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "zrzqafjVBMG7MbUDRkDjvb/tKjM=", + "path": "k8s.io/apimachinery/pkg/runtime/serializer", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "dYznkLcCEai21z1dX8kZY7uDsck=", - "path": "k8s.io/client-go/1.5/pkg/api/meta", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "h1WROKxiVBW5FH6InZr89w4rhUs=", + "path": "k8s.io/apimachinery/pkg/runtime/serializer/json", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "b06esG4xMj/YNFD85Lqq00cx+Yo=", - "path": "k8s.io/client-go/1.5/pkg/api/meta/metatypes", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "inmKlIskO3iMYraepPTfQPf6a+I=", + "path": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "L9svak1yut0Mx8r9VLDOwpqZzBk=", - "path": "k8s.io/client-go/1.5/pkg/api/resource", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "CxRm8Ny1sWZVlEw1WBfbOMtJP40=", + "path": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "m7jGshKDLH9kdokfa6MwAqzxRQk=", - "path": "k8s.io/client-go/1.5/pkg/api/unversioned", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "U768j7bVYHO5DwtNAHdIuBtpFMc=", + "path": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "iI6s5WAexr1PEfqrbvuscB+oVik=", - "path": "k8s.io/client-go/1.5/pkg/api/v1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "9K+3sgiTaGZTnv8KXf8UjR8a5lQ=", + "path": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "ikac34qI/IkTWHnfi8pPl9irPyo=", - "path": "k8s.io/client-go/1.5/pkg/api/validation/path", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "p9Wv7xurZXAW0jYL/SLNPbiUjaA=", + "path": "k8s.io/apimachinery/pkg/selection", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "MJyygSPp8N6z+7SPtcROz4PEwas=", - "path": "k8s.io/client-go/1.5/pkg/apimachinery", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "pPDILUNQnLdZq//lQfcbouI8zOs=", + "path": "k8s.io/apimachinery/pkg/types", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "EGb4IcSTQ1VXCmX0xcyG5GpWId8=", - "path": "k8s.io/client-go/1.5/pkg/apimachinery/announced", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "NtbgtroNspdoTC3jSyvEUfZ16dc=", + "path": "k8s.io/apimachinery/pkg/util/diff", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "vhSyuINHQhCsDKTyBmvJT1HzDHI=", - "path": "k8s.io/client-go/1.5/pkg/apimachinery/registered", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "0yXRmDoh+ixnHcPgD2TVuQr96Wc=", + "path": "k8s.io/apimachinery/pkg/util/errors", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "rXeBnwLg8ZFe6m5/Ki7tELVBYDk=", - "path": "k8s.io/client-go/1.5/pkg/apis/apps", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "bQOeFTINeXcfMOAOPArjRma/1mk=", + "path": "k8s.io/apimachinery/pkg/util/framer", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "KzHaG858KV1tBh5cuLInNcm+G5s=", - "path": "k8s.io/client-go/1.5/pkg/apis/apps/install", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "1D6uxyKvuYcpf5dWSuAkju4V74U=", + "path": "k8s.io/apimachinery/pkg/util/intstr", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "fynWdchlRbPaxuST2oGDKiKLTqE=", - "path": "k8s.io/client-go/1.5/pkg/apis/apps/v1alpha1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "pHhdHm4qbXomRjEXMRgJiAI3LnQ=", + "path": "k8s.io/apimachinery/pkg/util/json", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "hreIYssoH4Ef/+Aglpitn3GNLR4=", - "path": "k8s.io/client-go/1.5/pkg/apis/authentication", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "lgGrBbreZzae+kWnbZx0JRHlww0=", + "path": "k8s.io/apimachinery/pkg/util/net", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "EgUqJH4CqB9vXVg6T8II2OEt5LE=", - "path": "k8s.io/client-go/1.5/pkg/apis/authentication/install", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "CIMK51VUL/ytdt9K6aDwcoN2OWQ=", + "path": "k8s.io/apimachinery/pkg/util/rand", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "Z3DKgomzRPGcBv/8hlL6pfnIpXI=", - "path": "k8s.io/client-go/1.5/pkg/apis/authentication/v1beta1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "Om1Zl0Z1mqcAgbl7rL6U3lqw29U=", + "path": "k8s.io/apimachinery/pkg/util/runtime", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "GpuScB2Z+NOT4WIQg1mVvVSDUts=", - "path": "k8s.io/client-go/1.5/pkg/apis/authorization", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "326d8P0Tw6T7B4pyvBbr+6devTU=", + "path": "k8s.io/apimachinery/pkg/util/sets", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "+u3UD+HY9lBH+PFi/2B4W564JEw=", - "path": "k8s.io/client-go/1.5/pkg/apis/authorization/install", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "7gNiplzDd213IdDzfBtH9ZLQIac=", + "path": "k8s.io/apimachinery/pkg/util/validation", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "zIFzgWjmlWNLHGHMpCpDCvoLtKY=", - "path": "k8s.io/client-go/1.5/pkg/apis/authorization/v1beta1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "aN6xdUVpDdALXX7eXIpHkB2KeOI=", + "path": "k8s.io/apimachinery/pkg/util/validation/field", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "tdpzQFQyVkt5kCLTvtKTVqT+maE=", - "path": "k8s.io/client-go/1.5/pkg/apis/autoscaling", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "wQmzvUriA0AIc5pd64EG+Zjz4IA=", + "path": "k8s.io/apimachinery/pkg/util/wait", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "nb6LbYGS5tv8H8Ovptg6M7XuDZ4=", - "path": "k8s.io/client-go/1.5/pkg/apis/autoscaling/install", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "BTh0mc+q8UHMqwS8vhILP1ORZO8=", + "path": "k8s.io/apimachinery/pkg/util/yaml", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "DNb1/nl/5RDdckRrJoXBRagzJXs=", - "path": "k8s.io/client-go/1.5/pkg/apis/autoscaling/v1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "jNSfgzj8hPVchQHSblfJ1U/YO2g=", + "path": "k8s.io/apimachinery/pkg/version", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "4bLhH2vNl5l4Qp6MjLhWyWVAPE0=", - "path": "k8s.io/client-go/1.5/pkg/apis/batch", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "tNFWlf1AlPjwt45gyZN3jmsIN1U=", + "path": "k8s.io/apimachinery/pkg/watch", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "RpAAEynmxlvOlLLZK1KEUQRnYzk=", - "path": "k8s.io/client-go/1.5/pkg/apis/batch/install", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "bce6lDX/UQHPd1qRfo9d9B2dweU=", + "path": "k8s.io/apimachinery/third_party/forked/golang/reflect", + "revision": "75b8dd260ef0469d96d578705a87cffd0e09dab8", + "revisionTime": "2017-03-21T21:09:47Z" }, { - "checksumSHA1": "uWJ2BHmjL/Gq4FFlNkqiN6vvPyM=", - "path": "k8s.io/client-go/1.5/pkg/apis/batch/v1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "aZfBu8yGnljbJHjiz20WLiSMsfI=", + "path": "k8s.io/client-go/discovery", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "mHWt/p724dKeP1vqLtWQCye7zaE=", - "path": "k8s.io/client-go/1.5/pkg/apis/batch/v2alpha1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "s0L1FiqMM+WQke6bVnkIjtrjfwU=", + "path": "k8s.io/client-go/kubernetes", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "6dJ1dGfXkB3A42TOtMaY/rvv4N8=", - "path": "k8s.io/client-go/1.5/pkg/apis/certificates", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "rRh34tAEtq08Aae/YBTlLXV8Mbw=", + "path": "k8s.io/client-go/kubernetes/scheme", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "Bkrhm6HbFYANwtzUE8eza9SWBk0=", - "path": "k8s.io/client-go/1.5/pkg/apis/certificates/install", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "mPYUwNdFVuICD7UiiqkU73gSGfA=", + "path": "k8s.io/client-go/kubernetes/typed/apps/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "nRRPIBQ5O3Ad24kscNtK+gPC+fk=", - "path": "k8s.io/client-go/1.5/pkg/apis/certificates/v1alpha1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "oIuu1tM2ZCePxQW03oiUIS0cqm8=", + "path": "k8s.io/client-go/kubernetes/typed/authentication/v1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "KUMhoaOg9GXHN/aAVvSLO18SgqU=", - "path": "k8s.io/client-go/1.5/pkg/apis/extensions", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "gxfSKIFSwg0Q9lQ9Ru6VBdgS7nc=", + "path": "k8s.io/client-go/kubernetes/typed/authentication/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "eSo2VhNAYtesvmpEPqn05goW4LY=", - "path": "k8s.io/client-go/1.5/pkg/apis/extensions/install", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "gauXUMKCxFFQR0vYjMgWa0JEdFY=", + "path": "k8s.io/client-go/kubernetes/typed/authorization/v1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "DunWIPrCC5iGMWzkaaugMOxD+hg=", - "path": "k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "9k1t+56EdB1mQkBWGw23tiAPuNQ=", + "path": "k8s.io/client-go/kubernetes/typed/authorization/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "rVGYi2ko0E7vL5OZSMYX+NAGPYw=", - "path": "k8s.io/client-go/1.5/pkg/apis/policy", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "QJVvfabGlmrHydChSbkIYIKDMUY=", + "path": "k8s.io/client-go/kubernetes/typed/autoscaling/v1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "llJHd2H0LzABGB6BcletzIHnexo=", - "path": "k8s.io/client-go/1.5/pkg/apis/policy/install", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "OlZ/WP9Lv6SQeQPn6S69cwv8opE=", + "path": "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "j44bqyY13ldnuCtysYE8nRkMD7o=", - "path": "k8s.io/client-go/1.5/pkg/apis/policy/v1alpha1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "bv+dr19WQcDrubXbIUv2toN4DWc=", + "path": "k8s.io/client-go/kubernetes/typed/batch/v1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "vT7rFxowcKMTYc55mddePqUFRgE=", - "path": "k8s.io/client-go/1.5/pkg/apis/rbac", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "3rgXMCVpnVPMpqiwVLcZ6AUx9VA=", + "path": "k8s.io/client-go/kubernetes/typed/batch/v2alpha1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "r1MzUXsG+Zyn30aU8I5R5dgrJPA=", - "path": "k8s.io/client-go/1.5/pkg/apis/rbac/install", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "wVHdBwUm3iiSr2FIOFDmveLc44c=", + "path": "k8s.io/client-go/kubernetes/typed/certificates/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "aNfO8xn8VDO3fM9CpVCe6EIB+GA=", - "path": "k8s.io/client-go/1.5/pkg/apis/rbac/v1alpha1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "Fr6enVUrMGiReymOpl7G5Jb4x6Y=", + "path": "k8s.io/client-go/kubernetes/typed/core/v1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "rQCxrbisCXmj2wymlYG63kcTL9I=", - "path": "k8s.io/client-go/1.5/pkg/apis/storage", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "3liVtBqf4n49k/E8ZHG8a5V57Gw=", + "path": "k8s.io/client-go/kubernetes/typed/extensions/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "wZyxh5nt5Eh6kF7YNAIYukKWWy0=", - "path": "k8s.io/client-go/1.5/pkg/apis/storage/install", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "qXM2hNXC5tGX03uImzx4XSPUU1s=", + "path": "k8s.io/client-go/kubernetes/typed/policy/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "P8ANOt/I4Cs3QtjVXWmDA/gpQdg=", - "path": "k8s.io/client-go/1.5/pkg/apis/storage/v1beta1", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "DXqxFLINH6dV1XE6nsvix66mUnc=", + "path": "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "qnVPwzvNLz2mmr3BXdU9qIhQXXU=", - "path": "k8s.io/client-go/1.5/pkg/auth/user", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "dsF5arKiA1Mgfe5bx3EznJtI+XM=", + "path": "k8s.io/client-go/kubernetes/typed/rbac/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "KrIchxhapSs242yAy8yrTS1XlZo=", - "path": "k8s.io/client-go/1.5/pkg/conversion", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "I0RCWyWrT83nbEwvIRw3AErv/uU=", + "path": "k8s.io/client-go/kubernetes/typed/settings/v1alpha1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "weZqKFcOhcnF47eDDHXzluCKSF0=", - "path": "k8s.io/client-go/1.5/pkg/conversion/queryparams", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "FQb3kXWYLcURqpZp9J1g1vUDtqU=", + "path": "k8s.io/client-go/kubernetes/typed/storage/v1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "T3EMfyXZX5939/OOQ1JU+Nmbk4k=", - "path": "k8s.io/client-go/1.5/pkg/fields", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "By0ty5ntYvanInEXAgnS9VKln2U=", + "path": "k8s.io/client-go/kubernetes/typed/storage/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "2v11s3EBH8UBl2qfImT29tQN2kM=", - "path": "k8s.io/client-go/1.5/pkg/genericapiserver/openapi/common", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "NnHqF5QII9GH4l2bBCO4WAI9tPw=", + "path": "k8s.io/client-go/pkg/api", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "GvBlph6PywK3zguou/T9kKNNdoQ=", - "path": "k8s.io/client-go/1.5/pkg/labels", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "8a+TkAQbGwIr7xn1mq4A/4W5Zi8=", + "path": "k8s.io/client-go/pkg/api/install", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "Vtrgy827r0rWzIAgvIWY4flu740=", - "path": "k8s.io/client-go/1.5/pkg/runtime", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "xR+RJV1Y0ApIxJc5HJ9ROPJzAUE=", + "path": "k8s.io/client-go/pkg/api/v1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "SEcZqRATexhgHvDn+eHvMc07UJs=", - "path": "k8s.io/client-go/1.5/pkg/runtime/serializer", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "LXlUYCUTS+vvHBunesoJIoQpjeg=", + "path": "k8s.io/client-go/pkg/apis/apps", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "qzYKG9YZSj8l/W1QVTOrGAry/BM=", - "path": "k8s.io/client-go/1.5/pkg/runtime/serializer/json", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "pWRcTUwLPlUrxnuSf13Je9vUb5k=", + "path": "k8s.io/client-go/pkg/apis/apps/install", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "F7h+8zZ0JPLYkac4KgSVljguBE4=", - "path": "k8s.io/client-go/1.5/pkg/runtime/serializer/protobuf", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "ey+jPC0jAsdJMRXytd/Kf5ud8+4=", + "path": "k8s.io/client-go/pkg/apis/apps/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "CvySOL8C85e3y7EWQ+Au4cwUZJM=", - "path": "k8s.io/client-go/1.5/pkg/runtime/serializer/recognizer", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "1Bgq5sNb7Lr/DpAQ18tSfdcxRc0=", + "path": "k8s.io/client-go/pkg/apis/authentication", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "eCitoKeIun+lJzYFhAfdSIIicSM=", - "path": "k8s.io/client-go/1.5/pkg/runtime/serializer/streaming", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "tcR4IcZhoRhb2ESgint0e+ciCFg=", + "path": "k8s.io/client-go/pkg/apis/authentication/install", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "kVWvZuLGltJ4YqQsiaCLRRLDDK0=", - "path": "k8s.io/client-go/1.5/pkg/runtime/serializer/versioning", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "YKQVSsTKKDyORxuu032FmGwak+A=", + "path": "k8s.io/client-go/pkg/apis/authentication/v1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "m51+LAeQ9RK1KHX+l2iGcwbVCKs=", - "path": "k8s.io/client-go/1.5/pkg/selection", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "1d8umgBD03+/B0dPkm8ibEfXnYY=", + "path": "k8s.io/client-go/pkg/apis/authentication/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "dp4IWcC3U6a0HeOdVCDQWODWCbw=", - "path": "k8s.io/client-go/1.5/pkg/third_party/forked/golang/reflect", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "fROwttd7znBTHtVgI5fptVch/E0=", + "path": "k8s.io/client-go/pkg/apis/authorization", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "ER898XJD1ox4d71gKZD8TLtTSpM=", - "path": "k8s.io/client-go/1.5/pkg/types", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "hy7/VvKfkGFFBmuvGQx0AkR6rf0=", + "path": "k8s.io/client-go/pkg/apis/authorization/install", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "BVdXtnLDlmBQksRPfHOIG+qdeVg=", - "path": "k8s.io/client-go/1.5/pkg/util", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "5BUDpdzd0RJ386SDbQAEitJ7gqk=", + "path": "k8s.io/client-go/pkg/apis/authorization/v1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "nnh8Sa4dCupxRI4bbKaozGp1d/A=", - "path": "k8s.io/client-go/1.5/pkg/util/cert", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "zsRAXUsCpt0MEpKaMPyUMSQ4W6U=", + "path": "k8s.io/client-go/pkg/apis/authorization/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "S32d5uduNlwouM8+mIz+ALpliUQ=", - "path": "k8s.io/client-go/1.5/pkg/util/clock", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "RcNhGbiTRR9lgY5SuGeH/pnCTUo=", + "path": "k8s.io/client-go/pkg/apis/autoscaling", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "Y6rWC0TUw2/uUeUjJ7kazyEUzBQ=", - "path": "k8s.io/client-go/1.5/pkg/util/errors", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "QonQuKQ/5PKrXJrrROhecb2sks4=", + "path": "k8s.io/client-go/pkg/apis/autoscaling/install", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "C7IfEAdCOePw3/IraaZCNXuYXLw=", - "path": "k8s.io/client-go/1.5/pkg/util/flowcontrol", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "fqjBkYwQuCHRtqGRlsM7CCY/oJY=", + "path": "k8s.io/client-go/pkg/apis/autoscaling/v1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "EuslQHnhBSRXaWimYqLEqhMPV48=", - "path": "k8s.io/client-go/1.5/pkg/util/framer", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "yVDh7CTkmsXAmyPlm0WnWDbbBDo=", + "path": "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "ByO18NbZwiifFr8qtLyfJAHXguA=", - "path": "k8s.io/client-go/1.5/pkg/util/integer", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "mCfnnrJMt42LaBFP70iMAn1tglQ=", + "path": "k8s.io/client-go/pkg/apis/batch", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "ww+RfsoIlUBDwThg2oqC5QVz33Y=", - "path": "k8s.io/client-go/1.5/pkg/util/intstr", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "nL13CbbwoobyU3L2XEuYte21BXQ=", + "path": "k8s.io/client-go/pkg/apis/batch/install", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "7E8f8dLlXW7u6r9sggMjvB4HEiw=", - "path": "k8s.io/client-go/1.5/pkg/util/json", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "KPiDNUjzRvxOxWWGbsl/wkzsnts=", + "path": "k8s.io/client-go/pkg/apis/batch/v1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "d0pFZxMJG9j95acNmaIM1l+X+QU=", - "path": "k8s.io/client-go/1.5/pkg/util/labels", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "kk+5pPULA7r+HVhORCY7xvnjLYA=", + "path": "k8s.io/client-go/pkg/apis/batch/v2alpha1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "wCN7u1lE+25neM9jXeI7aE8EAfk=", - "path": "k8s.io/client-go/1.5/pkg/util/net", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "UvjuR9+K7/J4egvLRCJlFOF86T8=", + "path": "k8s.io/client-go/pkg/apis/certificates", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "g+kBkxcb+tYmFtRRly+VE+JAIfw=", - "path": "k8s.io/client-go/1.5/pkg/util/parsers", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "R617NaU9x7BC5qLCH8KayH4oVeo=", + "path": "k8s.io/client-go/pkg/apis/certificates/install", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "S4wUnE5VkaWWrkLbgPL/1oNLJ4g=", - "path": "k8s.io/client-go/1.5/pkg/util/rand", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "XnYE+PADIIf6LPbf/TB3vmyPVj4=", + "path": "k8s.io/client-go/pkg/apis/certificates/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "8j9c2PqTKybtnymXbStNYRexRj8=", - "path": "k8s.io/client-go/1.5/pkg/util/runtime", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "V5SktS1jIYIRcC/WZMuO8XXB0lg=", + "path": "k8s.io/client-go/pkg/apis/extensions", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "aAz4e8hLGs0+ZAz1TdA5tY/9e1A=", - "path": "k8s.io/client-go/1.5/pkg/util/sets", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "StZg3zfhODhOM7iSvZE1S4eS71M=", + "path": "k8s.io/client-go/pkg/apis/extensions/install", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "P/fwh6QZ5tsjVyHTaASDWL3WaGs=", - "path": "k8s.io/client-go/1.5/pkg/util/uuid", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "r03CaZpSonU1YhTMALq3a+9fePA=", + "path": "k8s.io/client-go/pkg/apis/extensions/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "P9Bq/1qbF4SvnN9HyCTRpbUz7sQ=", - "path": "k8s.io/client-go/1.5/pkg/util/validation", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "uK2jynPvFbMEMWF7hr1GyJubgVQ=", + "path": "k8s.io/client-go/pkg/apis/policy", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "D0JIEjlP69cuPOZEdsSKeFgsnI8=", - "path": "k8s.io/client-go/1.5/pkg/util/validation/field", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "9RnFX43MNdGVGi1V/30t7k/HSME=", + "path": "k8s.io/client-go/pkg/apis/policy/install", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "T7ba8t8i+BtgClMgL+aMZM94fcI=", - "path": "k8s.io/client-go/1.5/pkg/util/wait", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "t9ESUxOQm/+3iDK46b/HUgb4Hm8=", + "path": "k8s.io/client-go/pkg/apis/policy/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "6RCTv/KDiw7as4KeyrgU3XrUSQI=", - "path": "k8s.io/client-go/1.5/pkg/util/yaml", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "O1jhGYkRjesZMcVtHFm1rRMRTJo=", + "path": "k8s.io/client-go/pkg/apis/rbac", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "OwKlsSeKtz1FBVC9cQ5gWRL5pKc=", - "path": "k8s.io/client-go/1.5/pkg/version", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "OvZ8dIDwbOwQGiRP8JbyC5hjE4k=", + "path": "k8s.io/client-go/pkg/apis/rbac/install", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "Oil9WGw/dODbpBopn6LWQGS3DYg=", - "path": "k8s.io/client-go/1.5/pkg/watch", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "lZNbMgiUj55f9OXhAYFJINPstow=", + "path": "k8s.io/client-go/pkg/apis/rbac/v1alpha1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "r5alnRCbLaPsbTeJjjTVn/bt6uw=", - "path": "k8s.io/client-go/1.5/pkg/watch/versioned", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "bQV+lTglPnO1dqeibaEaMBCrjLA=", + "path": "k8s.io/client-go/pkg/apis/rbac/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "X1+ltyfHui/XCwDupXIf39+9gWQ=", - "path": "k8s.io/client-go/1.5/plugin/pkg/client/auth", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "Q1+vWNab1/wGZc6KYpwFSx7/QbM=", + "path": "k8s.io/client-go/pkg/apis/settings", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "KYy+js37AS0ZT08g5uBr1ZoMPmE=", - "path": "k8s.io/client-go/1.5/plugin/pkg/client/auth/gcp", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "npUnJMBJNwv9CPanReQ0X3rP8Z4=", + "path": "k8s.io/client-go/pkg/apis/settings/install", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "wQ9G5++lbQpejqCzGHo037N3YcY=", - "path": "k8s.io/client-go/1.5/plugin/pkg/client/auth/oidc", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "J54pr0/7r5xGm8gT55ZzZ5KyN7I=", + "path": "k8s.io/client-go/pkg/apis/settings/v1alpha1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "ABe8YfZVEDoRpAUqp2BKP8o1VIA=", - "path": "k8s.io/client-go/1.5/rest", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "a0Q8SOgvkSxIuEu665UtgDtmpCU=", + "path": "k8s.io/client-go/pkg/apis/storage", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "Gbe0Vs9hkI7X5hhbXUuWdRFffSI=", - "path": "k8s.io/client-go/1.5/tools/cache", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "m6lo9e5aXsfZNNc1KStRJ0Mw2cY=", + "path": "k8s.io/client-go/pkg/apis/storage/install", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "K/oOznXABjqSS1c2Fs407c5F8KA=", - "path": "k8s.io/client-go/1.5/tools/clientcmd/api", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "2TAFlLYih7oRtZ8KbvMmIrziGXQ=", + "path": "k8s.io/client-go/pkg/apis/storage/v1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "c1PQ4WJRfpA9BYcFHW2+46hu5IE=", - "path": "k8s.io/client-go/1.5/tools/metrics", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "MnArzVKB12JFUZDbCvaaLCBRpxU=", + "path": "k8s.io/client-go/pkg/apis/storage/v1beta1", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" }, { - "checksumSHA1": "e4W2q+6wvjejv3V0UCI1mewTTro=", - "path": "k8s.io/client-go/1.5/transport", - "revision": "c589d0c9f0d81640c518354c7bcae77d99820aa3", - "revisionTime": "2016-09-30T00:14:02Z" + "checksumSHA1": "/wssE6/+5UY8QrrbYnpkieVwp8Y=", + "path": "k8s.io/client-go/pkg/util", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" + }, + { + "checksumSHA1": "U4YjTHHqEs+YZFYdiV1exJyuwDM=", + "path": "k8s.io/client-go/pkg/util/parsers", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" + }, + { + "checksumSHA1": "ApqZCY/0FjkcTCymLF/hn1557rc=", + "path": "k8s.io/client-go/pkg/version", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" + }, + { + "checksumSHA1": "WKKCrNPVWbJYm1im1DA9145z6xI=", + "path": "k8s.io/client-go/rest", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" + }, + { + "checksumSHA1": "+wYCwQaVc1GvMWwOWc3wXd2GT5s=", + "path": "k8s.io/client-go/rest/watch", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" + }, + { + "checksumSHA1": "ITSxtOSOLAw9NIIJDXhauEtzo+M=", + "path": "k8s.io/client-go/tools/cache", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" + }, + { + "checksumSHA1": "1jUQmUDroNs5XYhsQna4kNTzMik=", + "path": "k8s.io/client-go/tools/clientcmd/api", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" + }, + { + "checksumSHA1": "rRC9GCWXfyIXKHBCeKpw7exVybE=", + "path": "k8s.io/client-go/tools/metrics", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" + }, + { + "checksumSHA1": "X7AC6lZGlUJdhKLplcncvP7e8Jc=", + "path": "k8s.io/client-go/transport", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" + }, + { + "checksumSHA1": "y6BpqJVXsBeykiGljn95RvGONCg=", + "path": "k8s.io/client-go/util/cert", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" + }, + { + "checksumSHA1": "kyu4NFcUmCTsUMpsPeyFrigorCE=", + "path": "k8s.io/client-go/util/clock", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" + }, + { + "checksumSHA1": "pCmdxpwnhYqoDSls5ehHtQFglm4=", + "path": "k8s.io/client-go/util/flowcontrol", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" + }, + { + "checksumSHA1": "W6bJiNAwgNwNJC+y+TPtacgUGlY=", + "path": "k8s.io/client-go/util/integer", + "revision": "3627aeb7d4f6ade38f995d2c923e459146493c7e", + "revisionTime": "2017-03-31T20:34:26Z" } ], "rootPath": "github.com/prometheus/prometheus"